@verdocs/web-sdk 1.12.16 → 1.12.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-sign.cjs.entry.js +12 -2
  3. package/dist/cjs/verdocs-view.cjs.entry.js +12 -2
  4. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  5. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +2 -1
  6. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +29 -1
  7. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +6 -6
  8. package/dist/collection/components/embeds/verdocs-view/verdocs-view.css +2 -1
  9. package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +29 -1
  10. package/dist/collection/components/embeds/verdocs-view/verdocs-view.stories.js +2 -2
  11. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +1 -1
  12. package/dist/components/verdocs-sign.js +13 -2
  13. package/dist/components/verdocs-view2.js +13 -2
  14. package/dist/docs.json +36 -2
  15. package/dist/esm/loader.js +1 -1
  16. package/dist/esm/verdocs-sign.entry.js +12 -2
  17. package/dist/esm/verdocs-view.entry.js +12 -2
  18. package/dist/esm/verdocs-web-sdk.js +1 -1
  19. package/dist/esm-es5/loader.js +1 -1
  20. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  21. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  22. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  23. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +11 -0
  24. package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +11 -0
  25. package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +4 -0
  26. package/dist/types/components.d.ts +18 -2
  27. package/dist/verdocs-web-sdk/p-1eeceef9.system.entry.js +1 -0
  28. package/dist/verdocs-web-sdk/p-354ab558.entry.js +1 -0
  29. package/dist/verdocs-web-sdk/p-474268c1.entry.js +1 -0
  30. package/dist/verdocs-web-sdk/p-7e6d7c07.system.js +1 -1
  31. package/dist/verdocs-web-sdk/p-afa3d3fc.system.entry.js +1 -0
  32. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  33. package/package.json +1 -1
  34. package/dist/verdocs-web-sdk/p-29b854c2.system.entry.js +0 -1
  35. package/dist/verdocs-web-sdk/p-4af9b368.entry.js +0 -1
  36. package/dist/verdocs-web-sdk/p-be30c368.entry.js +0 -1
  37. package/dist/verdocs-web-sdk/p-be701e81.system.entry.js +0 -1
@@ -1 +1 @@
1
- import{p as promiseResolve,b as bootstrapLazy}from"./index-e64d45e2.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy(JSON.parse('[["verdocs-template-roles",[[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["verdocs-field-initial",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-signature",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-checkbox",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-dropdown",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-radio-button",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-loader",[[0,"verdocs-loader"]]],["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-template-properties",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["verdocs-template-reminders",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["verdocs-template-name",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"rolesCompleted":[32],"reset":[64]}]]],["verdocs-template-visibility",[[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"loading":[32],"personal":[32],"public":[32]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"isProcessing":[32]}]]],["verdocs-upload-dialog",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-template-document-page",[[0,"verdocs-template-document-page",{"endpoint":[16],"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]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-template-attachments",[[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32]}]]],["verdocs-floating-menu",[[0,"verdocs-floating-menu",{"options":[16]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"field":[16],"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],"rerender":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-button",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-checkbox_4",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"type":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-initial-dialog",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-signature-dialog",[[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-toggle-button",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-contact-picker",[[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]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-template-role-properties_2",[[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],"fullName":[32],"email":[32],"phone":[32],"allowDelegation":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]],["verdocs-template-create_2",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"selectedRoleName":[32],"rerender":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["verdocs-quick-functions_3",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-toolbar-icon",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}]]],["verdocs-dropdown_2",[[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],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}],[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["verdocs-button-panel_3",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1,"field-name"],"dirty":[32],"loading":[32],"type":[32],"setting":[32],"name":[32],"roleName":[32],"fieldType":[32],"required":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32]}],[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]]]'),e)}));
1
+ import{p as promiseResolve,b as bootstrapLazy}from"./index-e64d45e2.js";var patchBrowser=function(){var e=import.meta.url;var t={};if(e!==""){t.resourcesUrl=new URL(".",e).href}return promiseResolve(t)};patchBrowser().then((function(e){return bootstrapLazy(JSON.parse('[["verdocs-template-roles",[[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["verdocs-field-initial",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-signature",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-checkbox",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-dropdown",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-radio-button",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-loader",[[0,"verdocs-loader"]]],["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-template-properties",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["verdocs-template-reminders",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["verdocs-template-name",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"rolesCompleted":[32],"reset":[64]}]]],["verdocs-template-visibility",[[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"loading":[32],"personal":[32],"public":[32]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"isProcessing":[32]}]]],["verdocs-upload-dialog",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-template-document-page",[[0,"verdocs-template-document-page",{"endpoint":[16],"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]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-template-attachments",[[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32]}]]],["verdocs-floating-menu",[[0,"verdocs-floating-menu",{"options":[16]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"field":[16],"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],"rerender":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-button",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-checkbox_4",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"type":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-initial-dialog",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-signature-dialog",[[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-toggle-button",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-contact-picker",[[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]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-template-role-properties_2",[[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],"fullName":[32],"email":[32],"phone":[32],"allowDelegation":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]],["verdocs-template-create_2",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"selectedRoleName":[32],"rerender":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["verdocs-quick-functions_3",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-toolbar-icon",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}]]],["verdocs-dropdown_2",[[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],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}],[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["verdocs-button-panel_3",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1,"field-name"],"dirty":[32],"loading":[32],"type":[32],"setting":[32],"name":[32],"roleName":[32],"fieldType":[32],"required":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32]}],[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]]]'),e)}));
@@ -33,6 +33,16 @@ export declare class VerdocsSign {
33
33
  * The invite code for the signer.
34
34
  */
35
35
  inviteCode: string | null;
36
+ /**
37
+ * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this
38
+ * component renders, the header will be removed from its default location and placed in the target element.
39
+ * This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed").
40
+ *
41
+ * The movement of the header to the target container is not dynamic - it is performed only on the initial
42
+ * render. Host applications should not conditionally render this container. If the header's visibility must
43
+ * be externally controlled, use CSS display options to hide/show it instead.
44
+ */
45
+ headerTargetId: string | null;
36
46
  /**
37
47
  * Event fired if an error occurs. The event details will contain information about the error. Most errors will
38
48
  * terminate the process, and the calling application should correct the condition and re-render the component.
@@ -69,6 +79,7 @@ export declare class VerdocsSign {
69
79
  recipientIndex: number;
70
80
  componentWillLoad(): void;
71
81
  componentDidLoad(): Promise<void>;
82
+ componentDidRender(): void;
72
83
  handleClickAgree(): void;
73
84
  handleOptionSelected(e: any): Promise<void>;
74
85
  updateRecipientFieldValue(fieldName: string, updateResult: any): void;
@@ -15,6 +15,16 @@ export declare class VerdocsView {
15
15
  * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.
16
16
  */
17
17
  envelopeId: string;
18
+ /**
19
+ * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this
20
+ * component renders, the header will be removed from its default location and placed in the target element.
21
+ * This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed").
22
+ *
23
+ * The movement of the header to the target container is not dynamic - it is performed only on the initial
24
+ * render. Host applications should not conditionally render this container. If the header's visibility must
25
+ * be externally controlled, use CSS display options to hide/show it instead.
26
+ */
27
+ headerTargetId: string | null;
18
28
  /**
19
29
  * Event fired if an error occurs. The event details will contain information about the error. Most errors will
20
30
  * terminate the process, and the calling application should correct the condition and re-render the component.
@@ -31,6 +41,7 @@ export declare class VerdocsView {
31
41
  isProcessing: boolean;
32
42
  componentWillLoad(): void;
33
43
  componentDidLoad(): Promise<void>;
44
+ componentDidRender(): void;
34
45
  reloadEnvelope(): Promise<void>;
35
46
  handlePageRendered(e: any): void;
36
47
  handleOptionSelected(e: any): Promise<void>;
@@ -21,6 +21,10 @@ export declare class VerdocsTemplateFields {
21
21
  * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this
22
22
  * component renders, the toolbar will be removed from its default location and placed in the target element.
23
23
  * This allows the parent application to more easily control its placement and scroll effects.
24
+ *
25
+ * The movement of the toolbar to the target container is not dynamic - it is performed only on the initial
26
+ * render. Host applications should not conditionally render this container. If the toolbar's visibility must
27
+ * be externally controlled, use CSS display options to hide/show it instead.
24
28
  */
25
29
  toolbarTargetId: string | null;
26
30
  /**
@@ -722,6 +722,10 @@ export namespace Components {
722
722
  * The ID of the envelope to sign.
723
723
  */
724
724
  "envelopeId": string | null;
725
+ /**
726
+ * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the header will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed"). The movement of the header to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the header's visibility must be externally controlled, use CSS display options to hide/show it instead.
727
+ */
728
+ "headerTargetId": string | null;
725
729
  /**
726
730
  * The invite code for the signer.
727
731
  */
@@ -831,7 +835,7 @@ export namespace Components {
831
835
  */
832
836
  "templateId": string | null;
833
837
  /**
834
- * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the toolbar will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects.
838
+ * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the toolbar will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects. The movement of the toolbar to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the toolbar's visibility must be externally controlled, use CSS display options to hide/show it instead.
835
839
  */
836
840
  "toolbarTargetId": string | null;
837
841
  }
@@ -1003,6 +1007,10 @@ export namespace Components {
1003
1007
  * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.
1004
1008
  */
1005
1009
  "envelopeId": string;
1010
+ /**
1011
+ * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the header will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed"). The movement of the header to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the header's visibility must be externally controlled, use CSS display options to hide/show it instead.
1012
+ */
1013
+ "headerTargetId": string | null;
1006
1014
  }
1007
1015
  }
1008
1016
  export interface VerdocsAuthCustomEvent<T> extends CustomEvent<T> {
@@ -2494,6 +2502,10 @@ declare namespace LocalJSX {
2494
2502
  * The ID of the envelope to sign.
2495
2503
  */
2496
2504
  "envelopeId"?: string | null;
2505
+ /**
2506
+ * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the header will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed"). The movement of the header to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the header's visibility must be externally controlled, use CSS display options to hide/show it instead.
2507
+ */
2508
+ "headerTargetId"?: string | null;
2497
2509
  /**
2498
2510
  * The invite code for the signer.
2499
2511
  */
@@ -2671,7 +2683,7 @@ declare namespace LocalJSX {
2671
2683
  */
2672
2684
  "templateId"?: string | null;
2673
2685
  /**
2674
- * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the toolbar will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects.
2686
+ * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the toolbar will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects. The movement of the toolbar to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the toolbar's visibility must be externally controlled, use CSS display options to hide/show it instead.
2675
2687
  */
2676
2688
  "toolbarTargetId"?: string | null;
2677
2689
  }
@@ -2927,6 +2939,10 @@ declare namespace LocalJSX {
2927
2939
  * The envelope ID to render. Set ONE OF templateId or envelopeId. If both are set, envelopeId will be ignored.
2928
2940
  */
2929
2941
  "envelopeId"?: string;
2942
+ /**
2943
+ * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this component renders, the header will be removed from its default location and placed in the target element. This allows the parent application to more easily control its placement and scroll effects (e.g. "fixed"). The movement of the header to the target container is not dynamic - it is performed only on the initial render. Host applications should not conditionally render this container. If the header's visibility must be externally controlled, use CSS display options to hide/show it instead.
2944
+ */
2945
+ "headerTargetId"?: string | null;
2930
2946
  /**
2931
2947
  * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
2932
2948
  */
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=s[0]&2?r["return"]:s[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;if(r=0,o)s=[s[0]&2,o.value];switch(s[0]){case 0:case 1:o=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;r=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!o||s[1]>o[0]&&s[1]<o[3])){n.label=s[1];break}if(s[0]===6&&n.label<o[1]){n.label=o[1];o=s;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(s);break}if(o[2])n.ops.pop();n.trys.pop();continue}s=t.call(e,n)}catch(e){s=[6,e];r=0}finally{i=o=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,n){if(n||arguments.length===2)for(var i=0,r=t.length,o;i<r;i++){if(o||!(i in t)){if(!o)o=Array.prototype.slice.call(t,0,i);o[i]=t[i]}}return e.concat(o||Array.prototype.slice.call(t))};System.register(["./p-9422b807.system.js","./p-43c3073f.system.js","./p-d46a428b.system.js","./p-e3b7c0fd.system.js","./p-7efdefa3.system.js","./p-d50523fd.system.js","./p-fdcf756a.system.js","./p-f088f649.system.js","./p-187b20b7.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js"],(function(e){"use strict";var t,n,i,r,o,s,a,l,d,c,u,p,h,f,v,g,m,b,x,y,w;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H;o=e.F},function(e){s=e.c;a=e.u;l=e.d;d=e.e},function(){},function(e){c=e.V},function(e){u=e.a;p=e.i},function(e){h=e.f},function(e){f=e.s;v=e.u;g=e.b;m=e.r;b=e.d},function(e){x=e.g;y=e.s},function(e){w=e.S},function(){},function(){},function(){}],execute:function(){var I=undefined&&undefined.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function s(e){try{l(i.next(e))}catch(e){o(e)}}function a(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var k=undefined&&undefined.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var S=function(e,t,n,i){return I(void 0,void 0,void 0,(function(){return k(this,(function(r){return[2,e.api.put("/envelopes/".concat(t,"/recipients/").concat(n),i).then((function(e){return e.data}))]}))}))};var F=function(e,t,n){return S(e,t,n,{action:"submit"})};var _=function(e,t,n){return S(e,t,n,{action:"decline"})};var N=function(e,t,n,i){return S(e,t,n,{action:"update",agreed:i})};var E=function(e,t,n){var i=new FormData;i.append("signature",n,t);return e.api.post("/signatures",i).then((function(e){return e.data}))};var L=function(e,t,n){var i=new FormData;i.append("initial",n,t);return e.api.post("/initials",i).then((function(e){return e.data}))};var A='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-sign .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:70px 15px 15px 15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}';var D=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var C=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var G=e("verdocs_sign",function(){function e(e){t(this,e);this.sdkError=n(this,"sdkError",7);this.envelopeLoaded=n(this,"envelopeLoaded",7);this.envelopeUpdated=n(this,"envelopeUpdated",7);this.endpoint=null;this.recipientIndex=-1;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.recipient=null;this.signerToken=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.errorMessage="";this.focusedField="";this.isDone=false;this.showDone=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document"}e.prototype.componentWillLoad=function(){this.endpoint=new c({sessionType:"signing"})};e.prototype.componentDidLoad=function(){return I(this,void 0,void 0,(function(){var e,t,n,i,r,o,a,l,d,c,u,p;var h=this;return k(this,(function(f){switch(f.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new w("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(n=this.sdkError)===null||n===void 0?void 0:n.emit(new w("[SIGN] Missing required inviteCode",500,""));return[2]}f.label=1;case 1:f.trys.push([1,4,,5]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,s(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode})];case 2:l=f.sent(),d=l.session,c=l.recipient,u=l.signerToken;console.log("[SIGN] Loaded signing session ".concat(d.email," / ").concat(d.profile_id));this.recipient=c;console.log("[SIGN] We are recipient",this.recipient);this.signerToken=u;this.endpoint.setToken(u);if(this.agreed){this.nextButtonLabel="Next"}return[4,x(this.endpoint,this.envelopeId,true)];case 3:f.sent();if(y.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.recipientIndex=y.envelope.recipients.findIndex((function(e){return e.role_name==h.roleId}));if(this.recipientIndex>-1){this.recipient=y.envelope.recipients[this.recipientIndex];this.agreed=this.recipient.agreed;console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)}else{console.log("[SIGN] Could not find our recipient record",this.roleId,y.envelope.recipients)}this.isDone=["submitted","canceled","declined"].includes(this.recipient.status);(i=this.envelopeLoaded)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:y.envelope});return[3,5];case 4:p=f.sent();console.log("Error with signing session",p);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new w(p.message,(o=p.response)===null||o===void 0?void 0:o.status,(a=p.response)===null||a===void 0?void 0:a.data));return[3,5];case 5:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}};e.prototype.handleClickAgree=function(){var e=this;N(this.endpoint,this.envelopeId,this.roleId,true).then((function(){var t;e.nextButtonLabel="Next";e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:y.envelope,event:"agreed"})})).catch((function(t){var n,i,r;console.log("Update failure",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new w(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(r=t.response)===null||r===void 0?void 0:r.data))}))};e.prototype.handleOptionSelected=function(e){return I(this,void 0,void 0,(function(){var t,n,i,r,o,s,a;return k(this,(function(l){switch(l.label){case 0:s=e.detail.id;switch(s){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:y.envelope,event:"later"});return[3,7];case 2:window.alert("This feature will be available in an upcoming release.");(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:y.envelope,event:"claimed"});return[3,7];case 3:return[4,_(this.endpoint,this.envelopeId,this.roleId)];case 4:a=l.sent();console.log("Decline result",a);(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:y.envelope,event:"declined"});this.isDone=true;return[3,7];case 5:window.print();(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:y.envelope,event:"printed"});return[3,7];case 6:f(this.endpoint,y.envelope,y.envelope.envelope_document_id).catch((function(e){console.log("Error downloading PDF",e)}));(o=this.envelopeUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:y.envelope,event:"downloaded"});return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,t){this.recipient.fields.forEach((function(n){if(n.name===e){n.settings=t.settings;v(n)}}))};e.prototype.saveFieldChange=function(e,t){var n=this;a(this.endpoint,this.envelopeId,e,t).then((function(t){n.updateRecipientFieldValue(e,t)})).catch((function(e){var t,i,r,o,s,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((r=(i=e.response)===null||i===void 0?void 0:i.data)===null||r===void 0?void 0:r.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.errorMessage="Signing session expired. Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(o=n.sdkError)===null||o===void 0?void 0:o.emit(new w(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return I(this,void 0,void 0,(function(){var n,i,r,o,s,s,a,c,u;var p=this;return k(this,(function(h){switch(h.label){case 0:n=t.target,i=n.value,r=n.checked;o=e.type;switch(o){case"textbox":return[3,1];case"checkbox_group":return[3,2];case"radio_button_group":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:i})];case 2:{s=e.settings.options.map((function(e){return{id:e.id,checked:t.target.checked}}));return[2,this.saveFieldChange(e.name,{prepared:false,value:{options:s}})]}h.label=3;case 3:{s=e.settings.options.map((function(e){return{id:e.id,selected:t.target.value===e.id}}));return[2,this.saveFieldChange(e.name,{prepared:false,value:{options:s}})]}h.label=4;case 4:return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:return[4,fetch(t.detail)];case 6:return[4,h.sent().blob()];case 7:a=h.sent();return[2,L(this.endpoint,"initial",a).then((function(t){return I(p,void 0,void 0,(function(){var n;return k(this,(function(i){switch(i.label){case 0:return[4,d(this.endpoint,this.envelopeId,e.name,t.id)];case 1:n=i.sent();this.updateRecipientFieldValue(e.name,n);return[2]}}))}))}))];case 8:return[4,fetch(t.detail)];case 9:return[4,h.sent().blob()];case 10:c=h.sent();return[2,E(this.endpoint,"signature",c).then((function(t){return I(p,void 0,void 0,(function(){var n;return k(this,(function(i){switch(i.label){case 0:return[4,l(this.endpoint,this.envelopeId,e.name,t.id)];case 1:n=i.sent();this.updateRecipientFieldValue(e.name,n);return[2]}}))}))}))];case 11:u=t.target.getAttribute("iso");return[2,this.saveFieldChange(e.name,{prepared:false,value:u})];case 12:console.log("Updating timestamp",{value:i,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("Unhandled field update",{value:i,checked:r},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldValid=function(e){var t,n,i,r,o,s,a;var l=e.required,d=l===void 0?false:l;var c=e.settings||{},h=c.result,f=h===void 0?"":h,v=c.value,g=v===void 0?"":v,m=c.base64,b=m===void 0?"":m;switch(e.type){case"textbox":switch(((t=e.settings)===null||t===void 0?void 0:t.validator)||""){case"email":return p(f);case"phone":return u(f);default:return!d||f!==""}case"signature":case"initial":return!d||b!=="";case"timestamp":return true;case"textarea":case"date":case"attachment":return!d||f!=="";case"dropdown":return!d||g!=="";case"checkbox_group":var x=(((i=(n=e.settings)===null||n===void 0?void 0:n.options)===null||i===void 0?void 0:i.filter((function(e){return e.checked})))||[]).length;return!d||x>=(((r=e.settings)===null||r===void 0?void 0:r.minimum_checked)||0)&&x<=(((o=e.settings)===null||o===void 0?void 0:o.maximum_checked)||999);case"radio_button_group":return!d||(((a=(s=e.settings)===null||s===void 0?void 0:s.options)===null||a===void 0?void 0:a.filter((function(e){return e.selected})))||[]).length>0;default:return false}};e.prototype.handleNext=function(){return I(this,void 0,void 0,(function(){var e,t,n,i,r,o,s,a,l,d;var c=this;return k(this,(function(u){switch(u.label){case 0:if(!this.nextSubmits)return[3,5];u.label=1;case 1:u.trys.push([1,3,,4]);return[4,F(this.endpoint,this.envelopeId,this.roleId)];case 2:t=u.sent();console.log("[SIGN] Submitted successfully",t);this.showDone=true;this.isDone=true;return[3,4];case 3:n=u.sent();console.log("Error submitting",n);return[3,4];case 4:return[2];case 5:i=this.recipient.fields.filter((function(e){return e.required}));r=i.findIndex((function(e){return e.name===c.focusedField}));o=r+1;if(o>=i.length){o=0}s=i[o];a=0;if(a<i.length&&["signature","initial"].includes(s.type)&&((e=s.settings)===null||e===void 0?void 0:e.result)==="signed"){a++;o++;if(o>=i.length){o=0}s=i[o]}if(a>=i.length){s=null}if(s){l=b(s);d=document.getElementById(l);d===null||d===void 0?void 0:d.focusField();this.focusedField=s.name}return[2]}}))}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.recipient.fields.filter((function(t){return!e.isFieldValid(t)}));if(t.length<1){this.nextButtonLabel="Finish";this.nextSubmits=true}else{console.log("[SIGN] Remaining invalid fields",t);this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,n,i){var r=this;var o;i.addEventListener("input",(function(){return r.checkRecipientFields()}));i.addEventListener("focusout",(function(e){return r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}));i.addEventListener("fieldChange",(function(e){return r.handleFieldChange(t,e).finally((function(){return r.checkRecipientFields()}))}));i.setAttribute("roleindex",n);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);i.setAttribute("initials",this.recipient?h(this.recipient.full_name):"");i.setAttribute("name",((o=this.recipient)===null||o===void 0?void 0:o.full_name)||"")};e.prototype.handlePageRendered=function(e){var t=this;var n=e.detail;var i=g(y.roleNames,this.recipient.role_name);var r=this.recipient.fields.filter((function(e){return e.page===n.pageNumber}));console.log("[SIGN] Page rendered, updating fields",{pageInfo:n,roleIndex:i,recipientFields:r});r.forEach((function(e){var r=m(e,n,i,{disabled:false,editable:false,draggable:false,done:t.isDone});if(!r){return}if(Array.isArray(r)){r.map((function(r){return t.attachFieldAttributes(n,e,i,r)}))}else{t.attachFieldAttributes(n,e,i,r)}}));y.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name})).forEach((function(e){var i=g(y.roleNames,e.role_name);var r=e.fields.filter((function(e){return e.page===n.pageNumber}));r.forEach((function(e){var r=m(e,n,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!r){return}if(r.setAttribute){r.setAttribute("roleindex",i);r.setAttribute("xScale",n.xScale);r.setAttribute("yScale",n.yScale)}}))}));this.checkRecipientFields()};e.prototype.render=function(){var e=this;if(y.loading||!y.envelope){return i(r,null,i("verdocs-loader",null))}if(this.isDone){return i(r,{class:{agreed:this.agreed},"data-r":y.updateCount},this.isDone?i("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)}}):i("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var n;return(n=e.sdkError)===null||n===void 0?void 0:n.emit(t.detail)}}),this.errorMessage&&i("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}))}return i(r,{class:{agreed:this.agreed},"data-r":y.updateCount},!this.finishLater&&i("div",{class:"intro"},"Please review and act on these documents."),i("div",{class:"header",id:"verdocs-sign-header"},!this.agreed?i("div",{class:"agree"},i("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:function(){return e.handleClickAgree()}})):i(o,null,i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},y.envelope.name),i("div",{style:{flex:"1"}})),!this.finishLater&&i("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:function(){return e.handleNext()}}),i("div",{style:{marginLeft:"10px"}}),i("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?D:C,onOptionSelected:function(t){return e.handleOptionSelected(t)}})),!this.agreed?i("div",{class:"cover"}):i("div",{style:{display:"none"}}),i("div",{class:"document"},(y.envelope.documents||[]).map((function(t){var n=__spreadArray([],(t===null||t===void 0?void 0:t.pages)||[],true);n.sort((function(e,t){return e.sequence-t.sequence}));return i(o,null,n.map((function(n){return i("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:n.sequence,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&i("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.errorMessage&&i("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:function(){return e.errorMessage=""}}),this.showDone&&i("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){return e.showDone=false}}))};return e}());G.style=A}}}));
@@ -0,0 +1 @@
1
+ import{r as e,c as o,h as i,H as n,F as t,a as s}from"./p-7239d28d.js";import{f as l}from"./p-5abaf86d.js";import{E as d}from"./p-2bc0d9be.js";import{V as a}from"./p-83b89865.js";import{i as r,j as c,s as p}from"./p-3d0efcc9.js";import{g as v,s as h}from"./p-4718a722.js";import{S as x}from"./p-7a1b2643.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-8b2040be.js";const m=class{constructor(i){e(this,i),this.sdkError=o(this,"sdkError",7),this.envelopeUpdated=o(this,"envelopeUpdated",7),this.endpoint=a.getDefault(),this.envelopeId="",this.headerTargetId=null,this.isProcessing=!1}componentWillLoad(){this.endpoint.loadSession()}async componentDidLoad(){if(this.envelopeId)return this.reloadEnvelope();console.error("[VIEW] Missing required envelopeId")}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,o=document.getElementById("verdocs-view-header");e&&o&&(console.log("[VIEW] Moving header"),o.remove(),e.append(o))}async reloadEnvelope(){var e,o,i;console.log("[VIEW] Checking for updated envelope");try{await v(this.endpoint,this.envelopeId,!0),this.isProcessing=h.envelope.documents.some((e=>"attachment"===e.type&&!e.processed)),this.isProcessing&&setTimeout((()=>this.reloadEnvelope()),3e3)}catch(n){null===(e=this.sdkError)||void 0===e||e.emit(new x(n.message,null===(o=n.response)||void 0===o?void 0:o.status,null===(i=n.response)||void 0===i?void 0:i.data))}}handlePageRendered(e){console.log("[VIEW] Page rendered",e.detail)}async handleOptionSelected(e){var o,i;switch(e.detail.id){case"cancel":confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")&&(await l(this.endpoint,this.envelopeId),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:h.envelope,event:"canceled"}));break;case"print":window.print(),null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:h.envelope,event:"printed"});break;case"download-attachments":p(this.endpoint,h.envelope,h.envelope.envelope_document_id).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:h.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading PDF",e)}));break;case"download-certificate":c(this.endpoint,h.envelope,h.envelope.certificate_document_id).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:h.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading PDF",e)}));break;case"download-all":r(this.endpoint,[h.envelope]).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:h.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading Zip",e)}))}}render(){var e;if(h.loading||!h.envelope)return i(n,null,i("verdocs-loader",null));if(h.error)return i(n,null,i("div",null,h.error));const o=[{id:"print",label:"Print"}];var s;(function(e,o){return o.profile_id===(null==e?void 0:e.profile_id)})(this.endpoint.session,s=h.envelope)&&s.status!==d.COMPLETE&&s.status!==d.DECLINED&&s.status!==d.CANCELED&&o.push({id:"cancel",label:"Cancel"});const l=h.envelope.documents.length>0,a=!!h.envelope.certificate;return(l||a)&&(o.push({label:""}),l&&o.push({id:"download-attachments",label:"Download Documents(s)"}),a&&o.push({id:"download-certificate",label:"Download Certificate"}),l&&a&&o.push({id:"download-all",label:"Download All Files"})),i(n,{"data-r":h.updateCount},i("div",{class:"header",id:"verdocs-view-header"},i(t,null,i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},h.envelope.name),i("div",{style:{flex:"1"}}),i("div",{style:{marginLeft:"10px"}}),i("verdocs-dropdown",{options:o,onOptionSelected:e=>this.handleOptionSelected(e)}))),i("div",{class:"document"},((null===(e=h.envelope)||void 0===e?void 0:e.documents)||[]).filter((e=>"certificate"!==e.type)).map((e=>{const o=[...(null==e?void 0:e.pages)||[]];return o.sort(((e,o)=>e.sequence-o.sequence)),e.processed?i(t,null,o.map((o=>i("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:o.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})))):i("verdocs-loader",null)}))))}get component(){return s(this)}};m.style='verdocs-view{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}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 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-view .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-view .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:70px 15px 15px 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}';export{m as verdocs_view}
@@ -0,0 +1 @@
1
+ import{r as e,c as i,h as t,H as s,F as n}from"./p-7239d28d.js";import{c as o,u as r,d as a,e as l}from"./p-5abaf86d.js";import"./p-2bc0d9be.js";import{V as d}from"./p-83b89865.js";import{a as c,i as h}from"./p-e662f81b.js";import{f as u}from"./p-7291906c.js";import{s as p,u as v,b as g,r as f,d as x}from"./p-3d0efcc9.js";import{g as m,s as b}from"./p-4718a722.js";import{S as w}from"./p-7a1b2643.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-8b2040be.js";var y=function(e,i,t,s){return n=void 0,o=void 0,a=function(){return function(e,i){var t,s,n,o,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(t=1,s&&(n=2&a[0]?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,s=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!((n=(n=r.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){r.label=a[1];break}if(6===a[0]&&r.label<n[1]){r.label=n[1],n=a;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(a);break}n[2]&&r.ops.pop(),r.trys.pop();continue}a=i.call(e,r)}catch(e){a=[6,e],s=0}finally{t=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,(function(){return[2,e.api.put("/envelopes/".concat(i,"/recipients/").concat(t),s).then((function(e){return e.data}))]}))},new((r=void 0)||(r=Promise))((function(e,i){function t(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(i){var n;i.done?e(i.value):(n=i.value,n instanceof r?n:new r((function(e){e(n)}))).then(t,s)}l((a=a.apply(n,o||[])).next())}));var n,o,r,a};const k=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}],S=[{id:"print",label:"Print"},{id:"download",label:"Download"}],I=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeLoaded=i(this,"envelopeLoaded",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=null,this.recipientIndex=-1,this.envelopeId=null,this.roleId=null,this.inviteCode=null,this.headerTargetId=null,this.recipient=null,this.signerToken=null,this.hasSignature=!1,this.nextButtonLabel="Start",this.nextSubmits=!1,this.errorMessage="",this.focusedField="",this.isDone=!1,this.showDone=!1,this.finishLater=!1,this.showFinishLater=!1,this.agreed=!1,this.documentsSingularPlural="document"}componentWillLoad(){this.endpoint=new d({sessionType:"signing"})}async componentDidLoad(){var e,i,t,s,n,r,a;if(this.envelopeId)if(this.roleId)if(this.inviteCode)try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{session:e,recipient:i,signerToken:t}=await o(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode});console.log(`[SIGN] Loaded signing session ${e.email} / ${e.profile_id}`),this.recipient=i,console.log("[SIGN] We are recipient",this.recipient),this.signerToken=t,this.endpoint.setToken(t),this.agreed&&(this.nextButtonLabel="Next"),await m(this.endpoint,this.envelopeId,!0),b.envelope.documents.length>0&&(this.documentsSingularPlural="document(s)"),this.recipientIndex=b.envelope.recipients.findIndex((e=>e.role_name==this.roleId)),this.recipientIndex>-1?(this.recipient=b.envelope.recipients[this.recipientIndex],this.agreed=this.recipient.agreed,console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)):console.log("[SIGN] Could not find our recipient record",this.roleId,b.envelope.recipients),this.isDone=["submitted","canceled","declined"].includes(this.recipient.status),null===(s=this.envelopeLoaded)||void 0===s||s.emit({endpoint:this.endpoint,envelope:b.envelope})}catch(e){console.log("Error with signing session",e),null===(n=this.sdkError)||void 0===n||n.emit(new w(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(a=e.response)||void 0===a?void 0:a.data))}else null===(t=this.sdkError)||void 0===t||t.emit(new w("[SIGN] Missing required inviteCode",500,""));else null===(i=this.sdkError)||void 0===i||i.emit(new w("[SIGN] Missing required roleId",500,""));else null===(e=this.sdkError)||void 0===e||e.emit(new w("[SIGN] Missing required envelopId",500,""))}componentDidRender(){const e=this.headerTargetId?document.getElementById(this.headerTargetId):null,i=document.getElementById("verdocs-sign-header");e&&i&&(console.log("[SIGN] Moving header"),i.remove(),e.append(i))}handleClickAgree(){var e,i,t;(e=this.endpoint,i=this.envelopeId,t=this.roleId,!0,y(e,i,t,{action:"update",agreed:true})).then((()=>{var e;this.nextButtonLabel="Next",this.agreed=!0,null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:b.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("Update failure",e),null===(i=this.sdkError)||void 0===i||i.emit(new w(e.message,null===(t=e.response)||void 0===t?void 0:t.status,null===(s=e.response)||void 0===s?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,n,o,r,a,l;switch(e.detail.id){case"later":this.finishLater=!0,this.showFinishLater=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:b.envelope,event:"later"});break;case"claim":window.alert("This feature will be available in an upcoming release."),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:b.envelope,event:"claimed"});break;case"decline":{const e=await(r=this.endpoint,a=this.envelopeId,l=this.roleId,y(r,a,l,{action:"decline"}));console.log("Decline result",e),null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:b.envelope,event:"declined"}),this.isDone=!0}break;case"print":window.print(),null===(n=this.envelopeUpdated)||void 0===n||n.emit({endpoint:this.endpoint,envelope:b.envelope,event:"printed"});break;case"download":p(this.endpoint,b.envelope,b.envelope.envelope_document_id).catch((e=>{console.log("Error downloading PDF",e)})),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:b.envelope,event:"downloaded"})}}updateRecipientFieldValue(e,i){this.recipient.fields.forEach((t=>{t.name===e&&(t.settings=i.settings,v(t))}))}saveFieldChange(e,i){r(this.endpoint,this.envelopeId,e,i).then((i=>{this.updateRecipientFieldValue(e,i)})).catch((e=>{var i,t,s,n,o,r;401===(null===(i=e.response)||void 0===i?void 0:i.status)&&"jwt expired"===(null===(s=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===s?void 0:s.error)?(console.log("[SIGN] Signing session expired"),this.errorMessage="Signing session expired. Please reload your browser to continue."):console.log("[SIGN] Server error",e),null===(n=this.sdkError)||void 0===n||n.emit(new w(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(r=e.response)||void 0===r?void 0:r.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:!1,value:t});case"checkbox_group":{const t=e.settings.options.map((e=>({id:e.id,checked:i.target.checked})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"radio_button_group":{const t=e.settings.options.map((e=>({id:e.id,selected:i.target.value===e.id})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"dropdown":return this.saveFieldChange(e.name,{prepared:!1,value:i.detail});case"initial":const d=await(await fetch(i.detail)).blob();return(n=this.endpoint,"initial",o=d,r=new FormData,r.append("initial",o,"initial"),n.api.post("/initials",r).then((function(e){return e.data}))).then((async i=>{const t=await l(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"signature":const c=await(await fetch(i.detail)).blob();return function(e,i,t){var s=new FormData;return s.append("signature",t,"signature"),e.api.post("/signatures",s).then((function(e){return e.data}))}(this.endpoint,0,c).then((async i=>{const t=await a(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"date":const h=i.target.getAttribute("iso");return this.saveFieldChange(e.name,{prepared:!1,value:h});case"timestamp":console.log("Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("Unhandled field update",{value:t,checked:s},e)}var n,o,r}isFieldValid(e){var i,t,s,n,o,r,a;const{required:l=!1}=e,{result:d="",value:u="",base64:p=""}=e.settings||{};switch(e.type){case"textbox":switch((null===(i=e.settings)||void 0===i?void 0:i.validator)||""){case"email":return h(d);case"phone":return c(d);default:return!l||""!==d}case"signature":case"initial":return!l||""!==p;case"timestamp":return!0;case"textarea":case"date":case"attachment":return!l||""!==d;case"dropdown":return!l||""!==u;case"checkbox_group":const v=((null===(s=null===(t=e.settings)||void 0===t?void 0:t.options)||void 0===s?void 0:s.filter((e=>e.checked)))||[]).length;return!l||v>=((null===(n=e.settings)||void 0===n?void 0:n.minimum_checked)||0)&&v<=((null===(o=e.settings)||void 0===o?void 0:o.maximum_checked)||999);case"radio_button_group":return!l||((null===(a=null===(r=e.settings)||void 0===r?void 0:r.options)||void 0===a?void 0:a.filter((e=>e.selected)))||[]).length>0;default:return!1}}async handleNext(){var e,i,t,s;if(this.nextSubmits){try{const e=await(i=this.endpoint,t=this.envelopeId,s=this.roleId,y(i,t,s,{action:"submit"}));console.log("[SIGN] Submitted successfully",e),this.showDone=!0,this.isDone=!0}catch(e){console.log("Error submitting",e)}return}const n=this.recipient.fields.filter((e=>e.required));let o=n.findIndex((e=>e.name===this.focusedField))+1;o>=n.length&&(o=0);let r=n[o],a=0;if(a<n.length&&["signature","initial"].includes(r.type)&&"signed"===(null===(e=r.settings)||void 0===e?void 0:e.result)&&(a++,o++,o>=n.length&&(o=0),r=n[o]),a>=n.length&&(r=null),r){const e=x(r),i=document.getElementById(e);null==i||i.focusField(),this.focusedField=r.name}}checkRecipientFields(){const e=this.recipient.fields.filter((e=>!this.isFieldValid(e)));e.length<1?(this.nextButtonLabel="Finish",this.nextSubmits=!0):(console.log("[SIGN] Remaining invalid fields",e),this.nextButtonLabel="Next",this.nextSubmits=!1)}attachFieldAttributes(e,i,t,s){var n;s.addEventListener("input",(()=>this.checkRecipientFields())),s.addEventListener("focusout",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.addEventListener("fieldChange",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.setAttribute("roleindex",t),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("initials",this.recipient?u(this.recipient.full_name):""),s.setAttribute("name",(null===(n=this.recipient)||void 0===n?void 0:n.full_name)||"")}handlePageRendered(e){const i=e.detail,t=g(b.roleNames,this.recipient.role_name),s=this.recipient.fields.filter((e=>e.page===i.pageNumber));console.log("[SIGN] Page rendered, updating fields",{pageInfo:i,roleIndex:t,recipientFields:s}),s.forEach((e=>{const s=f(e,i,t,{disabled:!1,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))})),b.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name)).forEach((e=>{const t=g(b.roleNames,e.role_name);e.fields.filter((e=>e.page===i.pageNumber)).forEach((e=>{const s=f(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&s.setAttribute&&(s.setAttribute("roleindex",t),s.setAttribute("xScale",i.xScale),s.setAttribute("yScale",i.yScale))}))})),this.checkRecipientFields()}render(){return b.loading||!b.envelope?t(s,null,t("verdocs-loader",null)):this.isDone?t(s,{class:{agreed:this.agreed},"data-r":b.updateCount},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return null===(i=this.sdkError)||void 0===i?void 0:i.emit(e.detail)}}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""})):t(s,{class:{agreed:this.agreed},"data-r":b.updateCount},!this.finishLater&&t("div",{class:"intro"},"Please review and act on these documents."),t("div",{class:"header",id:"verdocs-sign-header"},this.agreed?t(n,null,t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},b.envelope.name),t("div",{style:{flex:"1"}})):t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:()=>this.handleClickAgree()})),!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:this.isDone||this.finishLater?S:k,onOptionSelected:e=>this.handleOptionSelected(e)})),t("div",this.agreed?{style:{display:"none"}}:{class:"cover"}),t("div",{class:"document"},(b.envelope.documents||[]).map((e=>{const i=[...(null==e?void 0:e.pages)||[]];return i.sort(((e,i)=>e.sequence-i.sequence)),t(n,null,i.map((i=>t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:i.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=!1}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>this.showDone=!1}))}};I.style='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-sign .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:70px 15px 15px 15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}';export{I as verdocs_sign}
@@ -1 +1 @@
1
- System.register(["./p-9422b807.system.js"],(function(e,t){"use strict";var d,i;return{setters:[function(e){d=e.p;i=e.b}],execute:function(){var e=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return d(i)};e().then((function(e){return i(JSON.parse('[["p-6d2386d1.system",[[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["p-a8c30709.system",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-8612c102.system",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-c1fdae98.system",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-be9bf14d.system",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-17e5e3d2.system",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-5e2f0571.system",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-1498a643.system",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-db54f1b4.system",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-9f28288c.system",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-69ded49f.system",[[0,"verdocs-loader"]]],["p-2cadb341.system",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["p-be701e81.system",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["p-b8baf9d7.system",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["p-37adaeae.system",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["p-c1a6a086.system",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["p-51010fb4.system",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["p-30d55a71.system",[[0,"verdocs-search",{"endpoint":[16]}]]],["p-7bae4cd2.system",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"rolesCompleted":[32],"reset":[64]}]]],["p-43014432.system",[[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"loading":[32],"personal":[32],"public":[32]}]]],["p-29b854c2.system",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"isProcessing":[32]}]]],["p-f1863a57.system",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["p-7cc7a50d.system",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-37bab4c1.system",[[0,"verdocs-template-document-page",{"endpoint":[16],"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]}]]],["p-8124d679.system",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["p-c93c0129.system",[[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}]]],["p-017e0370.system",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32]}]]],["p-5cb8b228.system",[[0,"verdocs-floating-menu",{"options":[16]}]]],["p-504d51c9.system",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["p-8391ba92.system",[[0,"verdocs-field-payment",{"field":[16],"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],"rerender":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-5777de38.system",[[0,"verdocs-organization-card",{"organization":[16]}]]],["p-137837c5.system",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["p-0fff0dbd.system",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["p-b3ea279b.system",[[0,"verdocs-template-card",{"template":[16]}]]],["p-cb2dd06d.system",[[0,"verdocs-template-tags",{"tags":[16]}]]],["p-f3169208.system",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["p-3c0672cf.system",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["p-6b84bd24.system",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"type":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["p-30f1611a.system",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["p-257d232d.system",[[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["p-6affb629.system",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["p-fd72df84.system",[[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]}]]],["p-04bf80c2.system",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["p-603adb97.system",[[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],"fullName":[32],"email":[32],"phone":[32],"allowDelegation":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]],["p-0cbf3b46.system",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"selectedRoleName":[32],"rerender":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32]}]]],["p-a8ff2439.system",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["p-3d891611.system",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["p-2a6d69c2.system",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}]]],["p-f87f1072.system",[[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],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}],[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["p-f7c9c9ea.system",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1,"field-name"],"dirty":[32],"loading":[32],"type":[32],"setting":[32],"name":[32],"roleName":[32],"fieldType":[32],"required":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32]}],[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]]]'),e)}))}}}));
1
+ System.register(["./p-9422b807.system.js"],(function(e,t){"use strict";var d,i;return{setters:[function(e){d=e.p;i=e.b}],execute:function(){var e=function(){var e=t.meta.url;var i={};if(e!==""){i.resourcesUrl=new URL(".",e).href}return d(i)};e().then((function(e){return i(JSON.parse('[["p-6d2386d1.system",[[0,"verdocs-template-roles",{"endpoint":[16],"templateId":[1,"template-id"],"showingRoleDialog":[32],"showingSenderDialog":[32],"sender":[32],"forceRerender":[32]}]]],["p-a8c30709.system",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempInitials":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-8612c102.system",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"tempSignature":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-c1fdae98.system",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-be9bf14d.system",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"containerId":[32],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-17e5e3d2.system",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-5e2f0571.system",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2],"editable":[4],"moveable":[4],"rerender":[2],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-1498a643.system",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-db54f1b4.system",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-9f28288c.system",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-69ded49f.system",[[0,"verdocs-loader"]]],["p-2cadb341.system",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["p-1eeceef9.system",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"headerTargetId":[1,"header-target-id"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["p-b8baf9d7.system",[[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}]]],["p-37adaeae.system",[[0,"verdocs-template-reminders",{"endpoint":[16],"templateId":[1,"template-id"],"showPlanBlocker":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32],"dirty":[32],"loading":[32]}]]],["p-c1a6a086.system",[[0,"verdocs-template-name",{"endpoint":[16],"templateId":[1,"template-id"],"name":[32],"dirty":[32],"loading":[32]}]]],["p-51010fb4.system",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["p-30d55a71.system",[[0,"verdocs-search",{"endpoint":[16]}]]],["p-7bae4cd2.system",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"rolesCompleted":[32],"reset":[64]}]]],["p-43014432.system",[[0,"verdocs-template-visibility",{"endpoint":[16],"templateId":[1,"template-id"],"dirty":[32],"loading":[32],"personal":[32],"public":[32]}]]],["p-afa3d3fc.system",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"headerTargetId":[1,"header-target-id"],"isProcessing":[32]}]]],["p-f1863a57.system",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["p-7cc7a50d.system",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"rerender":[2],"focusField":[64],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-37bab4c1.system",[[0,"verdocs-template-document-page",{"endpoint":[16],"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]}]]],["p-8124d679.system",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["p-c93c0129.system",[[0,"verdocs-template-attachments",{"endpoint":[16],"templateId":[1,"template-id"],"loading":[32]}]]],["p-017e0370.system",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32]}]]],["p-5cb8b228.system",[[0,"verdocs-floating-menu",{"options":[16]}]]],["p-504d51c9.system",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["p-8391ba92.system",[[0,"verdocs-field-payment",{"field":[16],"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],"rerender":[2],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32],"showSettingsPanel":[64],"hideSettingsPanel":[64]}]]],["p-5777de38.system",[[0,"verdocs-organization-card",{"organization":[16]}]]],["p-137837c5.system",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["p-0fff0dbd.system",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["p-b3ea279b.system",[[0,"verdocs-template-card",{"template":[16]}]]],["p-cb2dd06d.system",[[0,"verdocs-template-tags",{"tags":[16]}]]],["p-f3169208.system",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["p-3c0672cf.system",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["p-6b84bd24.system",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"helpText":[1,"help-text"],"type":[1],"disabled":[4]}],[0,"verdocs-component-error",{"message":[1]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["p-30f1611a.system",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["p-257d232d.system",[[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["p-6affb629.system",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["p-fd72df84.system",[[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]}]]],["p-04bf80c2.system",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["p-603adb97.system",[[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],"fullName":[32],"email":[32],"phone":[32],"allowDelegation":[32]}],[0,"verdocs-template-sender",{"endpoint":[16],"templateId":[1,"template-id"],"sender":[1],"saving":[32]}]]],["p-0cbf3b46.system",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"],"toolbarTargetId":[1,"toolbar-target-id"],"placing":[32],"selectedRoleName":[32],"rerender":[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-create",{"endpoint":[16],"file":[32],"creating":[32]}]]],["p-a8ff2439.system",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["p-3d891611.system",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["p-2a6d69c2.system",[[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"placement":[1],"containerId":[32]}]]],["p-f87f1072.system",[[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],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32],"pageDisplayUri":[32]}],[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["p-f7c9c9ea.system",[[0,"verdocs-template-field-properties",{"endpoint":[16],"templateId":[1,"template-id"],"fieldName":[1,"field-name"],"dirty":[32],"loading":[32],"type":[32],"setting":[32],"name":[32],"roleName":[32],"fieldType":[32],"required":[32],"options":[32],"placeholder":[32],"defaultValue":[32],"showingHelp":[32]}],[4,"verdocs-button-panel",{"icon":[1],"showPanel":[64],"hidePanel":[64],"toggle":[64]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}]]]]'),e)}))}}}));
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,n,t,o){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,r){function l(e){try{a(o.next(e))}catch(e){r(e)}}function s(e){try{a(o["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(l,s)}a((o=o.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,l;return l={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(l[Symbol.iterator]=function(){return this}),l;function s(e){return function(n){return a([e,n])}}function a(l){if(o)throw new TypeError("Generator is already executing.");while(t)try{if(o=1,i&&(r=l[0]&2?i["return"]:l[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,l[1])).done)return r;if(i=0,r)l=[l[0]&2,r.value];switch(l[0]){case 0:case 1:r=l;break;case 4:t.label++;return{value:l[1],done:false};case 5:t.label++;i=l[1];l=[0];continue;case 7:l=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){t.label=l[1];break}if(l[0]===6&&t.label<r[1]){t.label=r[1];r=l;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(l);break}if(r[2])t.ops.pop();t.trys.pop();continue}l=n.call(e,t)}catch(e){l=[6,e];i=0}finally{o=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,t){if(t||arguments.length===2)for(var o=0,i=n.length,r;o<i;o++){if(r||!(o in n)){if(!r)r=Array.prototype.slice.call(n,0,o);r[o]=n[o]}}return e.concat(r||Array.prototype.slice.call(n))};System.register(["./p-9422b807.system.js","./p-43c3073f.system.js","./p-d46a428b.system.js","./p-e3b7c0fd.system.js","./p-fdcf756a.system.js","./p-f088f649.system.js","./p-187b20b7.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js"],(function(e){"use strict";var n,t,o,i,r,l,s,a,d,c,p,u,v,f,h;return{setters:[function(e){n=e.r;t=e.c;o=e.h;i=e.H;r=e.F;l=e.a},function(e){s=e.f},function(e){a=e.E},function(e){d=e.V},function(e){c=e.i;p=e.j;u=e.s},function(e){v=e.g;f=e.s},function(e){h=e.S},function(){},function(){},function(){}],execute:function(){var m=function(e,n){return n.profile_id===(e===null||e===void 0?void 0:e.profile_id)};var g=function(e,n){return m(e,n)&&n.status!==a.COMPLETE&&n.status!==a.DECLINED&&n.status!==a.CANCELED};var w='verdocs-view{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}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 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-view .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-view .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:70px 15px 15px 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}';var x=e("verdocs_view",function(){function e(e){n(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.endpoint=d.getDefault();this.envelopeId="";this.headerTargetId=null;this.isProcessing=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}return[2,this.reloadEnvelope()]}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var n=document.getElementById("verdocs-view-header");if(e&&n){console.log("[VIEW] Moving header");n.remove();e.append(n)}};e.prototype.reloadEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,t,o;var i=this;return __generator(this,(function(r){switch(r.label){case 0:console.log("[VIEW] Checking for updated envelope");r.label=1;case 1:r.trys.push([1,3,,4]);return[4,v(this.endpoint,this.envelopeId,true)];case 2:r.sent();this.isProcessing=f.envelope.documents.some((function(e){return e.type==="attachment"&&!e.processed}));if(this.isProcessing){setTimeout((function(){return i.reloadEnvelope()}),3e3)}return[3,4];case 3:o=r.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(o.message,(n=o.response)===null||n===void 0?void 0:n.status,(t=o.response)===null||t===void 0?void 0:t.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handlePageRendered=function(e){var n=e.detail;console.log("[VIEW] Page rendered",n)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var n,t,o;var i=this;return __generator(this,(function(r){switch(r.label){case 0:o=e.detail.id;switch(o){case"cancel":return[3,1];case"print":return[3,4];case"download-attachments":return[3,5];case"download-certificate":return[3,6];case"download-all":return[3,7]}return[3,8];case 1:if(!confirm("Are you sure you wish to cancel this envelope? This action cannot be undone."))return[3,3];return[4,s(this.endpoint,this.envelopeId)];case 2:r.sent();(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:f.envelope,event:"canceled"});r.label=3;case 3:return[3,8];case 4:window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:f.envelope,event:"printed"});return[3,8];case 5:u(this.endpoint,f.envelope,f.envelope.envelope_document_id).then((function(){var e;(e=i.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:i.endpoint,envelope:f.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading PDF",e)}));return[3,8];case 6:p(this.endpoint,f.envelope,f.envelope.certificate_document_id).then((function(){var e;(e=i.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:i.endpoint,envelope:f.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading PDF",e)}));return[3,8];case 7:c(this.endpoint,[f.envelope]).then((function(){var e;(e=i.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:i.endpoint,envelope:f.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,8];case 8:return[2]}}))}))};e.prototype.render=function(){var e=this;var n;if(f.loading||!f.envelope){return o(i,null,o("verdocs-loader",null))}if(f.error){return o(i,null,o("div",null,f.error))}var t=[{id:"print",label:"Print"}];if(g(this.endpoint.session,f.envelope)){t.push({id:"cancel",label:"Cancel"})}var l=f.envelope.documents.length>0;var s=!!f.envelope.certificate;if(l||s){t.push({label:""});if(l){t.push({id:"download-attachments",label:"Download Documents(s)"})}if(s){t.push({id:"download-certificate",label:"Download Certificate"})}if(l&&s){t.push({id:"download-all",label:"Download All Files"})}}return o(i,{"data-r":f.updateCount},o("div",{class:"header",id:"verdocs-view-header"},o(r,null,o("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),o("div",{class:"title"},f.envelope.name),o("div",{style:{flex:"1"}}),o("div",{style:{marginLeft:"10px"}}),o("verdocs-dropdown",{options:t,onOptionSelected:function(n){return e.handleOptionSelected(n)}}))),o("div",{class:"document"},(((n=f.envelope)===null||n===void 0?void 0:n.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(n){var t=__spreadArray([],(n===null||n===void 0?void 0:n.pages)||[],true);t.sort((function(e,n){return e.sequence-n.sequence}));if(!n.processed){return o("verdocs-loader",null)}return o(r,null,t.map((function(t){return o("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:n.id,endpoint:e.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:t.sequence,onPageRendered:function(n){return e.handlePageRendered(n)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))))};Object.defineProperty(e.prototype,"component",{get:function(){return l(this)},enumerable:false,configurable:true});return e}());x.style=w}}}));
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-7239d28d.js";(()=>{const t=import.meta.url,d={};return""!==t&&(d.resourcesUrl=new URL(".",t).href),e(d)})().then((e=>t([["p-a13a8b81",[[0,"verdocs-template-roles",{endpoint:[16],templateId:[1,"template-id"],showingRoleDialog:[32],showingSenderDialog:[32],sender:[32],forceRerender:[32]}]]],["p-d87925e0",[[0,"verdocs-field-initial",{field:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],tempInitials:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-a7fbb26e",[[0,"verdocs-field-signature",{field:[16],name:[1],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],tempSignature:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-b173ba1c",[[0,"verdocs-field-checkbox",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],rerender:[2],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-c51176b3",[[0,"verdocs-field-date",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],containerId:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-a49d94a5",[[0,"verdocs-field-dropdown",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-acb10f44",[[0,"verdocs-field-radio-button",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],rerender:[2],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-32b09c04",[[0,"verdocs-field-textarea",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-151df9b1",[[0,"verdocs-field-textbox",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-cce3a36c",[[0,"verdocs-field-timestamp",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-af1eb1d8",[[0,"verdocs-loader"]]],["p-c6f81ab9",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-4af9b368",[[0,"verdocs-sign",{envelopeId:[1,"envelope-id"],roleId:[1,"role-id"],inviteCode:[1,"invite-code"],recipient:[32],signerToken:[32],hasSignature:[32],nextButtonLabel:[32],nextSubmits:[32],errorMessage:[32],focusedField:[32],isDone:[32],showDone:[32],finishLater:[32],showFinishLater:[32],agreed:[32],documentsSingularPlural:[32]}]]],["p-6a3a4a5a",[[0,"verdocs-template-properties",{endpoint:[16],templateId:[1,"template-id"],template:[32],name:[32],visibility:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32]}]]],["p-17f37dca",[[0,"verdocs-template-reminders",{endpoint:[16],templateId:[1,"template-id"],showPlanBlocker:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32],dirty:[32],loading:[32]}]]],["p-11f98973",[[0,"verdocs-template-name",{endpoint:[16],templateId:[1,"template-id"],name:[32],dirty:[32],loading:[32]}]]],["p-83eb6fcc",[[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],isAuthenticated:[32],displayMode:[32],username:[32],password:[32],loggingIn:[32],activeSession:[32],loginError:[32]}]]],["p-65effdc2",[[0,"verdocs-search",{endpoint:[16]}]]],["p-f773f3a1",[[0,"verdocs-send",{endpoint:[16],templateId:[1,"template-id"],containerId:[32],rolesAtLevel:[32],showPickerForId:[32],sessionContacts:[32],rolesCompleted:[32],reset:[64]}]]],["p-a2ac88a4",[[0,"verdocs-template-visibility",{endpoint:[16],templateId:[1,"template-id"],dirty:[32],loading:[32],personal:[32],public:[32]}]]],["p-be30c368",[[0,"verdocs-view",{endpoint:[16],envelopeId:[1,"envelope-id"],isProcessing:[32]}]]],["p-79b5b76f",[[0,"verdocs-upload-dialog",{draggingOver:[32],decodedFiles:[32]}]]],["p-e15a4cc6",[[0,"verdocs-field-attachment",{field:[16],disabled:[4],roleIndex:[2,"role-index"],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-1f4d73da",[[0,"verdocs-template-document-page",{endpoint:[16],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]}]]],["p-efa81a50",[[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"]}]]],["p-a209882e",[[0,"verdocs-template-attachments",{endpoint:[16],templateId:[1,"template-id"],loading:[32]}]]],["p-f397f21d",[[0,"verdocs-envelope-sidebar",{endpoint:[16],envelopeId:[1,"envelope-id"],activeTab:[32],panelOpen:[32]}]]],["p-0031154e",[[0,"verdocs-floating-menu",{options:[16]}]]],["p-04ca7746",[[0,"verdocs-kba-dialog",{step:[2],steps:[2],helptitle:[1],helptext:[1],mode:[1],label:[1],placeholder:[1],choices:[16],response:[32]}]]],["p-9a57225a",[[0,"verdocs-field-payment",{field:[16],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],rerender:[2],roleindex:[2],preparedMessage:[32],signatureUrl:[32],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-f93d3324",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-9f532d65",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-ab2ab46e",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],envelope:[16],isOpen:[32],recipientStatusIcons:[32],containerId:[32]}]]],["p-140e1871",[[0,"verdocs-template-card",{template:[16]}]]],["p-7cb46b17",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-d9aab909",[[0,"verdocs-toggle",{options:[16],theme:[1],selectedOption:[32]}]]],["p-d8696ee6",[[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-09c48cd5",[[0,"verdocs-checkbox",{checked:[4],name:[1],label:[1],value:[1],theme:[1],disabled:[4]}],[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],helpText:[1,"help-text"],type:[1],disabled:[4]}],[0,"verdocs-component-error",{message:[1]}],[0,"verdocs-help-icon",{text:[1],containerId:[32]}]]],["p-d0fc924d",[[0,"verdocs-initial-dialog",{initials:[1],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-f75b2973",[[0,"verdocs-signature-dialog",{name:[1],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-facf681e",[[0,"verdocs-toggle-button",{active:[4],icon:[1],label:[1],size:[1],_active:[32]}]]],["p-8f85b842",[[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]}]]],["p-0ccb837b",[[0,"verdocs-radio-button",{checked:[4],name:[1],value:[1],disabled:[4]}]]],["p-2f46a9a5",[[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],fullName:[32],email:[32],phone:[32],allowDelegation:[32]}],[0,"verdocs-template-sender",{endpoint:[16],templateId:[1,"template-id"],sender:[1],saving:[32]}]]],["p-e624832c",[[0,"verdocs-template-fields",{endpoint:[16],templateId:[1,"template-id"],toolbarTargetId:[1,"toolbar-target-id"],placing:[32],selectedRoleName:[32],rerender:[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-create",{endpoint:[16],file:[32],creating:[32]}]]],["p-607b66bb",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],showCancel:[4,"show-cancel"]}]]],["p-eef54cf7",[[0,"verdocs-quick-functions",{endpoint:[16]}],[0,"verdocs-search-activity",{endpoint:[16],type:[1],options:[8],emptyMessage:[32],authFailure:[32],title:[32],recent:[32],saved:[32],starred:[32]}],[0,"verdocs-search-box",{endpoint:[16],placeholder:[1],type:[1],query:[1],grabsFocus:[4,"grabs-focus"],focusField:[64]}]]],["p-e5c28d78",[[0,"verdocs-toolbar-icon",{text:[1],icon:[1],placement:[1],containerId:[32]}]]],["p-508bbabc",[[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],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32],pageDisplayUri:[32]}],[0,"verdocs-dropdown",{options:[16],open:[32]}]]],["p-85409b28",[[0,"verdocs-template-field-properties",{endpoint:[16],templateId:[1,"template-id"],fieldName:[1,"field-name"],dirty:[32],loading:[32],type:[32],setting:[32],name:[32],roleName:[32],fieldType:[32],required:[32],options:[32],placeholder:[32],defaultValue:[32],showingHelp:[32]}],[4,"verdocs-button-panel",{icon:[1],showPanel:[64],hidePanel:[64],toggle:[64]}],[0,"verdocs-select-input",{value:[1],label:[1],options:[16],disabled:[4]}]]]],e)));
1
+ import{p as e,b as t}from"./p-7239d28d.js";(()=>{const t=import.meta.url,d={};return""!==t&&(d.resourcesUrl=new URL(".",t).href),e(d)})().then((e=>t([["p-a13a8b81",[[0,"verdocs-template-roles",{endpoint:[16],templateId:[1,"template-id"],showingRoleDialog:[32],showingSenderDialog:[32],sender:[32],forceRerender:[32]}]]],["p-d87925e0",[[0,"verdocs-field-initial",{field:[16],disabled:[4],initials:[1],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],tempInitials:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-a7fbb26e",[[0,"verdocs-field-signature",{field:[16],name:[1],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],tempSignature:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-b173ba1c",[[0,"verdocs-field-checkbox",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],rerender:[2],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-c51176b3",[[0,"verdocs-field-date",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],containerId:[32],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-a49d94a5",[[0,"verdocs-field-dropdown",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-acb10f44",[[0,"verdocs-field-radio-button",{field:[16],option:[2],disabled:[4],done:[4],roleindex:[2],editable:[4],moveable:[4],rerender:[2],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-32b09c04",[[0,"verdocs-field-textarea",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-151df9b1",[[0,"verdocs-field-textbox",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-cce3a36c",[[0,"verdocs-field-timestamp",{field:[16],disabled:[4],editable:[4],moveable:[4],done:[4],roleindex:[2],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-af1eb1d8",[[0,"verdocs-loader"]]],["p-c6f81ab9",[[0,"verdocs-build",{endpoint:[16],templateId:[1,"template-id"],step:[32],pdfUrl:[32],template:[32]}]]],["p-474268c1",[[0,"verdocs-sign",{envelopeId:[1,"envelope-id"],roleId:[1,"role-id"],inviteCode:[1,"invite-code"],headerTargetId:[1,"header-target-id"],recipient:[32],signerToken:[32],hasSignature:[32],nextButtonLabel:[32],nextSubmits:[32],errorMessage:[32],focusedField:[32],isDone:[32],showDone:[32],finishLater:[32],showFinishLater:[32],agreed:[32],documentsSingularPlural:[32]}]]],["p-6a3a4a5a",[[0,"verdocs-template-properties",{endpoint:[16],templateId:[1,"template-id"],template:[32],name:[32],visibility:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32]}]]],["p-17f37dca",[[0,"verdocs-template-reminders",{endpoint:[16],templateId:[1,"template-id"],showPlanBlocker:[32],sendReminders:[32],firstReminderDays:[32],reminderDays:[32],dirty:[32],loading:[32]}]]],["p-11f98973",[[0,"verdocs-template-name",{endpoint:[16],templateId:[1,"template-id"],name:[32],dirty:[32],loading:[32]}]]],["p-83eb6fcc",[[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],isAuthenticated:[32],displayMode:[32],username:[32],password:[32],loggingIn:[32],activeSession:[32],loginError:[32]}]]],["p-65effdc2",[[0,"verdocs-search",{endpoint:[16]}]]],["p-f773f3a1",[[0,"verdocs-send",{endpoint:[16],templateId:[1,"template-id"],containerId:[32],rolesAtLevel:[32],showPickerForId:[32],sessionContacts:[32],rolesCompleted:[32],reset:[64]}]]],["p-a2ac88a4",[[0,"verdocs-template-visibility",{endpoint:[16],templateId:[1,"template-id"],dirty:[32],loading:[32],personal:[32],public:[32]}]]],["p-354ab558",[[0,"verdocs-view",{endpoint:[16],envelopeId:[1,"envelope-id"],headerTargetId:[1,"header-target-id"],isProcessing:[32]}]]],["p-79b5b76f",[[0,"verdocs-upload-dialog",{draggingOver:[32],decodedFiles:[32]}]]],["p-e15a4cc6",[[0,"verdocs-field-attachment",{field:[16],disabled:[4],roleIndex:[2,"role-index"],rerender:[2],focusField:[64],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-1f4d73da",[[0,"verdocs-template-document-page",{endpoint:[16],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]}]]],["p-efa81a50",[[0,"verdocs-preview",{endpoint:[16],templateId:[1,"template-id"]}]]],["p-a209882e",[[0,"verdocs-template-attachments",{endpoint:[16],templateId:[1,"template-id"],loading:[32]}]]],["p-f397f21d",[[0,"verdocs-envelope-sidebar",{endpoint:[16],envelopeId:[1,"envelope-id"],activeTab:[32],panelOpen:[32]}]]],["p-0031154e",[[0,"verdocs-floating-menu",{options:[16]}]]],["p-04ca7746",[[0,"verdocs-kba-dialog",{step:[2],steps:[2],helptitle:[1],helptext:[1],mode:[1],label:[1],placeholder:[1],choices:[16],response:[32]}]]],["p-9a57225a",[[0,"verdocs-field-payment",{field:[16],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],rerender:[2],roleindex:[2],preparedMessage:[32],signatureUrl:[32],showSettingsPanel:[64],hideSettingsPanel:[64]}]]],["p-f93d3324",[[0,"verdocs-organization-card",{organization:[16]}]]],["p-9f532d65",[[0,"verdocs-search-tabs",{selected:[32]}]]],["p-ab2ab46e",[[0,"verdocs-status-indicator",{size:[1],theme:[1],status:[1],envelope:[16],isOpen:[32],recipientStatusIcons:[32],containerId:[32]}]]],["p-140e1871",[[0,"verdocs-template-card",{template:[16]}]]],["p-7cb46b17",[[0,"verdocs-template-tags",{tags:[16]}]]],["p-d9aab909",[[0,"verdocs-toggle",{options:[16],theme:[1],selectedOption:[32]}]]],["p-d8696ee6",[[0,"verdocs-button",{label:[1],startIcon:[1,"start-icon"],endIcon:[1,"end-icon"],size:[1],type:[1],variant:[1],disabled:[4]}]]],["p-09c48cd5",[[0,"verdocs-checkbox",{checked:[4],name:[1],label:[1],value:[1],theme:[1],disabled:[4]}],[0,"verdocs-text-input",{value:[1],label:[1],placeholder:[1],autocomplete:[1],helpText:[1,"help-text"],type:[1],disabled:[4]}],[0,"verdocs-component-error",{message:[1]}],[0,"verdocs-help-icon",{text:[1],containerId:[32]}]]],["p-d0fc924d",[[0,"verdocs-initial-dialog",{initials:[1],fontLoaded:[32],enteredInitials:[32],mode:[32]}]]],["p-f75b2973",[[0,"verdocs-signature-dialog",{name:[1],fontLoaded:[32],enteredName:[32],mode:[32]}]]],["p-facf681e",[[0,"verdocs-toggle-button",{active:[4],icon:[1],label:[1],size:[1],_active:[32]}]]],["p-8f85b842",[[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]}]]],["p-0ccb837b",[[0,"verdocs-radio-button",{checked:[4],name:[1],value:[1],disabled:[4]}]]],["p-2f46a9a5",[[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],fullName:[32],email:[32],phone:[32],allowDelegation:[32]}],[0,"verdocs-template-sender",{endpoint:[16],templateId:[1,"template-id"],sender:[1],saving:[32]}]]],["p-e624832c",[[0,"verdocs-template-fields",{endpoint:[16],templateId:[1,"template-id"],toolbarTargetId:[1,"toolbar-target-id"],placing:[32],selectedRoleName:[32],rerender:[32]},[[4,"keydown","handleKeyDown"]]],[0,"verdocs-template-create",{endpoint:[16],file:[32],creating:[32]}]]],["p-607b66bb",[[0,"verdocs-ok-dialog",{heading:[1],message:[1],showCancel:[4,"show-cancel"]}]]],["p-eef54cf7",[[0,"verdocs-quick-functions",{endpoint:[16]}],[0,"verdocs-search-activity",{endpoint:[16],type:[1],options:[8],emptyMessage:[32],authFailure:[32],title:[32],recent:[32],saved:[32],starred:[32]}],[0,"verdocs-search-box",{endpoint:[16],placeholder:[1],type:[1],query:[1],grabsFocus:[4,"grabs-focus"],focusField:[64]}]]],["p-e5c28d78",[[0,"verdocs-toolbar-icon",{text:[1],icon:[1],placement:[1],containerId:[32]}]]],["p-508bbabc",[[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],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32],pageDisplayUri:[32]}],[0,"verdocs-dropdown",{options:[16],open:[32]}]]],["p-85409b28",[[0,"verdocs-template-field-properties",{endpoint:[16],templateId:[1,"template-id"],fieldName:[1,"field-name"],dirty:[32],loading:[32],type:[32],setting:[32],name:[32],roleName:[32],fieldType:[32],required:[32],options:[32],placeholder:[32],defaultValue:[32],showingHelp:[32]}],[4,"verdocs-button-panel",{icon:[1],showPanel:[64],hidePanel:[64],toggle:[64]}],[0,"verdocs-select-input",{value:[1],label:[1],options:[16],disabled:[4]}]]]],e)));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verdocs/web-sdk",
3
- "version": "1.12.16",
3
+ "version": "1.12.18",
4
4
  "private": false,
5
5
  "description": "Verdocs Web SDK",
6
6
  "license": "MIT",
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,n,t,o){function i(e){return e instanceof t?e:new t((function(n){n(e)}))}return new(t||(t=Promise))((function(t,r){function s(e){try{a(o.next(e))}catch(e){r(e)}}function l(e){try{a(o["throw"](e))}catch(e){r(e)}}function a(e){e.done?t(e.value):i(e.value).then(s,l)}a((o=o.apply(e,n||[])).next())}))};var __generator=this&&this.__generator||function(e,n){var t={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},o,i,r,s;return s={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function l(e){return function(n){return a([e,n])}}function a(s){if(o)throw new TypeError("Generator is already executing.");while(t)try{if(o=1,i&&(r=s[0]&2?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;if(i=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:t.label++;return{value:s[1],done:false};case 5:t.label++;i=s[1];s=[0];continue;case 7:s=t.ops.pop();t.trys.pop();continue;default:if(!(r=t.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){t=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){t.label=s[1];break}if(s[0]===6&&t.label<r[1]){t.label=r[1];r=s;break}if(r&&t.label<r[2]){t.label=r[2];t.ops.push(s);break}if(r[2])t.ops.pop();t.trys.pop();continue}s=n.call(e,t)}catch(e){s=[6,e];i=0}finally{o=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,n,t){if(t||arguments.length===2)for(var o=0,i=n.length,r;o<i;o++){if(r||!(o in n)){if(!r)r=Array.prototype.slice.call(n,0,o);r[o]=n[o]}}return e.concat(r||Array.prototype.slice.call(n))};System.register(["./p-9422b807.system.js","./p-43c3073f.system.js","./p-d46a428b.system.js","./p-e3b7c0fd.system.js","./p-fdcf756a.system.js","./p-f088f649.system.js","./p-187b20b7.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js"],(function(e){"use strict";var n,t,o,i,r,s,l,a,d,c,p,u,v,f,h;return{setters:[function(e){n=e.r;t=e.c;o=e.h;i=e.H;r=e.F;s=e.a},function(e){l=e.f},function(e){a=e.E},function(e){d=e.V},function(e){c=e.i;p=e.j;u=e.s},function(e){v=e.g;f=e.s},function(e){h=e.S},function(){},function(){},function(){}],execute:function(){var m=function(e,n){return n.profile_id===(e===null||e===void 0?void 0:e.profile_id)};var g=function(e,n){return m(e,n)&&n.status!==a.COMPLETE&&n.status!==a.DECLINED&&n.status!==a.CANCELED};var w='verdocs-view{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}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 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-view .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-view .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}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;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}';var b=e("verdocs_view",function(){function e(e){n(this,e);this.sdkError=t(this,"sdkError",7);this.envelopeUpdated=t(this,"envelopeUpdated",7);this.endpoint=d.getDefault();this.envelopeId="";this.isProcessing=false}e.prototype.componentWillLoad=function(){this.endpoint.loadSession()};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}return[2,this.reloadEnvelope()]}))}))};e.prototype.reloadEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e,n,t,o;var i=this;return __generator(this,(function(r){switch(r.label){case 0:console.log("[VIEW] Checking for updated envelope");r.label=1;case 1:r.trys.push([1,3,,4]);return[4,v(this.endpoint,this.envelopeId,true)];case 2:r.sent();this.isProcessing=f.envelope.documents.some((function(e){return e.type==="attachment"&&!e.processed}));if(this.isProcessing){setTimeout((function(){return i.reloadEnvelope()}),3e3)}return[3,4];case 3:o=r.sent();(e=this.sdkError)===null||e===void 0?void 0:e.emit(new h(o.message,(n=o.response)===null||n===void 0?void 0:n.status,(t=o.response)===null||t===void 0?void 0:t.data));return[3,4];case 4:return[2]}}))}))};e.prototype.handlePageRendered=function(e){var n=e.detail;console.log("[VIEW] Page rendered",n)};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var n,t,o;var i=this;return __generator(this,(function(r){switch(r.label){case 0:o=e.detail.id;switch(o){case"cancel":return[3,1];case"print":return[3,4];case"download-attachments":return[3,5];case"download-certificate":return[3,6];case"download-all":return[3,7]}return[3,8];case 1:if(!confirm("Are you sure you wish to cancel this envelope? This action cannot be undone."))return[3,3];return[4,l(this.endpoint,this.envelopeId)];case 2:r.sent();(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:f.envelope,event:"canceled"});r.label=3;case 3:return[3,8];case 4:window.print();(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:f.envelope,event:"printed"});return[3,8];case 5:u(this.endpoint,f.envelope,f.envelope.envelope_document_id).then((function(){var e;(e=i.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:i.endpoint,envelope:f.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading PDF",e)}));return[3,8];case 6:p(this.endpoint,f.envelope,f.envelope.certificate_document_id).then((function(){var e;(e=i.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:i.endpoint,envelope:f.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading PDF",e)}));return[3,8];case 7:c(this.endpoint,[f.envelope]).then((function(){var e;(e=i.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:i.endpoint,envelope:f.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,8];case 8:return[2]}}))}))};e.prototype.render=function(){var e=this;var n;if(f.loading||!f.envelope){return o(i,null,o("verdocs-loader",null))}if(f.error){return o(i,null,o("div",null,f.error))}var t=[{id:"print",label:"Print"}];if(g(this.endpoint.session,f.envelope)){t.push({id:"cancel",label:"Cancel"})}var s=f.envelope.documents.length>0;var l=!!f.envelope.certificate;if(s||l){t.push({label:""});if(s){t.push({id:"download-attachments",label:"Download Documents(s)"})}if(l){t.push({id:"download-certificate",label:"Download Certificate"})}if(s&&l){t.push({id:"download-all",label:"Download All Files"})}}return o(i,{"data-r":f.updateCount},o("div",{class:"header"},o(r,null,o("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),o("div",{class:"title"},f.envelope.name),o("div",{style:{flex:"1"}}),o("div",{style:{marginLeft:"10px"}}),o("verdocs-dropdown",{options:t,onOptionSelected:function(n){return e.handleOptionSelected(n)}}))),o("div",{class:"document"},(((n=f.envelope)===null||n===void 0?void 0:n.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(n){var t=__spreadArray([],(n===null||n===void 0?void 0:n.pages)||[],true);t.sort((function(e,n){return e.sequence-n.sequence}));if(!n.processed){return o("verdocs-loader",null)}return o(r,null,t.map((function(t){return o("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:n.id,endpoint:e.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:t.sequence,onPageRendered:function(n){return e.handlePageRendered(n)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))))};Object.defineProperty(e.prototype,"component",{get:function(){return s(this)},enumerable:false,configurable:true});return e}());b.style=w}}}));
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as t,H as s,F as n}from"./p-7239d28d.js";import{c as o,u as r,d as a,e as l}from"./p-5abaf86d.js";import"./p-2bc0d9be.js";import{V as d}from"./p-83b89865.js";import{a as c,i as h}from"./p-e662f81b.js";import{f as u}from"./p-7291906c.js";import{s as p,u as v,b as g,r as f,d as x}from"./p-3d0efcc9.js";import{g as m,s as b}from"./p-4718a722.js";import{S as w}from"./p-7a1b2643.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-8b2040be.js";var y=function(e,i,t,s){return n=void 0,o=void 0,a=function(){return function(e,i){var t,s,n,o,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(l){return function(a){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(r=0)),r;)try{if(t=1,s&&(n=2&a[0]?s.return:a[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,a[1])).done)return n;switch(s=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,s=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!((n=(n=r.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){r.label=a[1];break}if(6===a[0]&&r.label<n[1]){r.label=n[1],n=a;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(a);break}n[2]&&r.ops.pop(),r.trys.pop();continue}a=i.call(e,r)}catch(e){a=[6,e],s=0}finally{t=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}(this,(function(){return[2,e.api.put("/envelopes/".concat(i,"/recipients/").concat(t),s).then((function(e){return e.data}))]}))},new((r=void 0)||(r=Promise))((function(e,i){function t(e){try{l(a.next(e))}catch(e){i(e)}}function s(e){try{l(a.throw(e))}catch(e){i(e)}}function l(i){var n;i.done?e(i.value):(n=i.value,n instanceof r?n:new r((function(e){e(n)}))).then(t,s)}l((a=a.apply(n,o||[])).next())}));var n,o,r,a};const k=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}],S=[{id:"print",label:"Print"},{id:"download",label:"Download"}],I=class{constructor(t){e(this,t),this.sdkError=i(this,"sdkError",7),this.envelopeLoaded=i(this,"envelopeLoaded",7),this.envelopeUpdated=i(this,"envelopeUpdated",7),this.endpoint=null,this.recipientIndex=-1,this.envelopeId=null,this.roleId=null,this.inviteCode=null,this.recipient=null,this.signerToken=null,this.hasSignature=!1,this.nextButtonLabel="Start",this.nextSubmits=!1,this.errorMessage="",this.focusedField="",this.isDone=!1,this.showDone=!1,this.finishLater=!1,this.showFinishLater=!1,this.agreed=!1,this.documentsSingularPlural="document"}componentWillLoad(){this.endpoint=new d({sessionType:"signing"})}async componentDidLoad(){var e,i,t,s,n,r,a;if(this.envelopeId)if(this.roleId)if(this.inviteCode)try{console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);const{session:e,recipient:i,signerToken:t}=await o(this.endpoint,{envelopeId:this.envelopeId,roleId:this.roleId,inviteCode:this.inviteCode});console.log(`[SIGN] Loaded signing session ${e.email} / ${e.profile_id}`),this.recipient=i,console.log("[SIGN] We are recipient",this.recipient),this.signerToken=t,this.endpoint.setToken(t),this.agreed&&(this.nextButtonLabel="Next"),await m(this.endpoint,this.envelopeId,!0),b.envelope.documents.length>0&&(this.documentsSingularPlural="document(s)"),this.recipientIndex=b.envelope.recipients.findIndex((e=>e.role_name==this.roleId)),this.recipientIndex>-1?(this.recipient=b.envelope.recipients[this.recipientIndex],this.agreed=this.recipient.agreed,console.log("[SIGN] Found our recipient in the envelope",this.recipientIndex,this.recipient)):console.log("[SIGN] Could not find our recipient record",this.roleId,b.envelope.recipients),this.isDone=["submitted","canceled","declined"].includes(this.recipient.status),null===(s=this.envelopeLoaded)||void 0===s||s.emit({endpoint:this.endpoint,envelope:b.envelope})}catch(e){console.log("Error with signing session",e),null===(n=this.sdkError)||void 0===n||n.emit(new w(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(a=e.response)||void 0===a?void 0:a.data))}else null===(t=this.sdkError)||void 0===t||t.emit(new w("[SIGN] Missing required inviteCode",500,""));else null===(i=this.sdkError)||void 0===i||i.emit(new w("[SIGN] Missing required roleId",500,""));else null===(e=this.sdkError)||void 0===e||e.emit(new w("[SIGN] Missing required envelopId",500,""))}handleClickAgree(){var e,i,t;(e=this.endpoint,i=this.envelopeId,t=this.roleId,!0,y(e,i,t,{action:"update",agreed:true})).then((()=>{var e;this.nextButtonLabel="Next",this.agreed=!0,null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:b.envelope,event:"agreed"})})).catch((e=>{var i,t,s;console.log("Update failure",e),null===(i=this.sdkError)||void 0===i||i.emit(new w(e.message,null===(t=e.response)||void 0===t?void 0:t.status,null===(s=e.response)||void 0===s?void 0:s.data))}))}async handleOptionSelected(e){var i,t,s,n,o,r,a,l;switch(e.detail.id){case"later":this.finishLater=!0,this.showFinishLater=!0,null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:b.envelope,event:"later"});break;case"claim":window.alert("This feature will be available in an upcoming release."),null===(t=this.envelopeUpdated)||void 0===t||t.emit({endpoint:this.endpoint,envelope:b.envelope,event:"claimed"});break;case"decline":{const e=await(r=this.endpoint,a=this.envelopeId,l=this.roleId,y(r,a,l,{action:"decline"}));console.log("Decline result",e),null===(s=this.envelopeUpdated)||void 0===s||s.emit({endpoint:this.endpoint,envelope:b.envelope,event:"declined"}),this.isDone=!0}break;case"print":window.print(),null===(n=this.envelopeUpdated)||void 0===n||n.emit({endpoint:this.endpoint,envelope:b.envelope,event:"printed"});break;case"download":p(this.endpoint,b.envelope,b.envelope.envelope_document_id).catch((e=>{console.log("Error downloading PDF",e)})),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:b.envelope,event:"downloaded"})}}updateRecipientFieldValue(e,i){this.recipient.fields.forEach((t=>{t.name===e&&(t.settings=i.settings,v(t))}))}saveFieldChange(e,i){r(this.endpoint,this.envelopeId,e,i).then((i=>{this.updateRecipientFieldValue(e,i)})).catch((e=>{var i,t,s,n,o,r;401===(null===(i=e.response)||void 0===i?void 0:i.status)&&"jwt expired"===(null===(s=null===(t=e.response)||void 0===t?void 0:t.data)||void 0===s?void 0:s.error)?(console.log("[SIGN] Signing session expired"),this.errorMessage="Signing session expired. Please reload your browser to continue."):console.log("[SIGN] Server error",e),null===(n=this.sdkError)||void 0===n||n.emit(new w(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(r=e.response)||void 0===r?void 0:r.data))}))}async handleFieldChange(e,i){const{value:t,checked:s}=i.target;switch(e.type){case"textbox":return this.saveFieldChange(e.name,{prepared:!1,value:t});case"checkbox_group":{const t=e.settings.options.map((e=>({id:e.id,checked:i.target.checked})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"radio_button_group":{const t=e.settings.options.map((e=>({id:e.id,selected:i.target.value===e.id})));return this.saveFieldChange(e.name,{prepared:!1,value:{options:t}})}case"dropdown":return this.saveFieldChange(e.name,{prepared:!1,value:i.detail});case"initial":const d=await(await fetch(i.detail)).blob();return(n=this.endpoint,"initial",o=d,r=new FormData,r.append("initial",o,"initial"),n.api.post("/initials",r).then((function(e){return e.data}))).then((async i=>{const t=await l(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"signature":const c=await(await fetch(i.detail)).blob();return function(e,i,t){var s=new FormData;return s.append("signature",t,"signature"),e.api.post("/signatures",s).then((function(e){return e.data}))}(this.endpoint,0,c).then((async i=>{const t=await a(this.endpoint,this.envelopeId,e.name,i.id);this.updateRecipientFieldValue(e.name,t)}));case"date":const h=i.target.getAttribute("iso");return this.saveFieldChange(e.name,{prepared:!1,value:h});case"timestamp":console.log("Updating timestamp",{value:t,ts:i.target.getAttribute("timestamp")});break;default:console.log("Unhandled field update",{value:t,checked:s},e)}var n,o,r}isFieldValid(e){var i,t,s,n,o,r,a;const{required:l=!1}=e,{result:d="",value:u="",base64:p=""}=e.settings||{};switch(e.type){case"textbox":switch((null===(i=e.settings)||void 0===i?void 0:i.validator)||""){case"email":return h(d);case"phone":return c(d);default:return!l||""!==d}case"signature":case"initial":return!l||""!==p;case"timestamp":return!0;case"textarea":case"date":case"attachment":return!l||""!==d;case"dropdown":return!l||""!==u;case"checkbox_group":const v=((null===(s=null===(t=e.settings)||void 0===t?void 0:t.options)||void 0===s?void 0:s.filter((e=>e.checked)))||[]).length;return!l||v>=((null===(n=e.settings)||void 0===n?void 0:n.minimum_checked)||0)&&v<=((null===(o=e.settings)||void 0===o?void 0:o.maximum_checked)||999);case"radio_button_group":return!l||((null===(a=null===(r=e.settings)||void 0===r?void 0:r.options)||void 0===a?void 0:a.filter((e=>e.selected)))||[]).length>0;default:return!1}}async handleNext(){var e,i,t,s;if(this.nextSubmits){try{const e=await(i=this.endpoint,t=this.envelopeId,s=this.roleId,y(i,t,s,{action:"submit"}));console.log("[SIGN] Submitted successfully",e),this.showDone=!0,this.isDone=!0}catch(e){console.log("Error submitting",e)}return}const n=this.recipient.fields.filter((e=>e.required));let o=n.findIndex((e=>e.name===this.focusedField))+1;o>=n.length&&(o=0);let r=n[o],a=0;if(a<n.length&&["signature","initial"].includes(r.type)&&"signed"===(null===(e=r.settings)||void 0===e?void 0:e.result)&&(a++,o++,o>=n.length&&(o=0),r=n[o]),a>=n.length&&(r=null),r){const e=x(r),i=document.getElementById(e);null==i||i.focusField(),this.focusedField=r.name}}checkRecipientFields(){const e=this.recipient.fields.filter((e=>!this.isFieldValid(e)));e.length<1?(this.nextButtonLabel="Finish",this.nextSubmits=!0):(console.log("[SIGN] Remaining invalid fields",e),this.nextButtonLabel="Next",this.nextSubmits=!1)}attachFieldAttributes(e,i,t,s){var n;s.addEventListener("input",(()=>this.checkRecipientFields())),s.addEventListener("focusout",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.addEventListener("fieldChange",(e=>this.handleFieldChange(i,e).finally((()=>this.checkRecipientFields())))),s.setAttribute("roleindex",t),s.setAttribute("xScale",e.xScale),s.setAttribute("yScale",e.yScale),s.setAttribute("initials",this.recipient?u(this.recipient.full_name):""),s.setAttribute("name",(null===(n=this.recipient)||void 0===n?void 0:n.full_name)||"")}handlePageRendered(e){const i=e.detail,t=g(b.roleNames,this.recipient.role_name),s=this.recipient.fields.filter((e=>e.page===i.pageNumber));console.log("[SIGN] Page rendered, updating fields",{pageInfo:i,roleIndex:t,recipientFields:s}),s.forEach((e=>{const s=f(e,i,t,{disabled:!1,editable:!1,draggable:!1,done:this.isDone});s&&(Array.isArray(s)?s.map((s=>this.attachFieldAttributes(i,e,t,s))):this.attachFieldAttributes(i,e,t,s))})),b.envelope.recipients.filter((e=>e.role_name!==this.recipient.role_name)).forEach((e=>{const t=g(b.roleNames,e.role_name);e.fields.filter((e=>e.page===i.pageNumber)).forEach((e=>{const s=f(e,i,t,{disabled:!0,editable:!1,draggable:!1,done:this.isDone});s&&s.setAttribute&&(s.setAttribute("roleindex",t),s.setAttribute("xScale",i.xScale),s.setAttribute("yScale",i.yScale))}))})),this.checkRecipientFields()}render(){return b.loading||!b.envelope?t(s,null,t("verdocs-loader",null)):this.isDone?t(s,{class:{agreed:this.agreed},"data-r":b.updateCount},t("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:e=>{var i;return null===(i=this.sdkError)||void 0===i?void 0:i.emit(e.detail)}}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""})):t(s,{class:{agreed:this.agreed},"data-r":b.updateCount},!this.finishLater&&t("div",{class:"intro"},"Please review and act on these documents."),t("div",{class:"header"},this.agreed?t(n,null,t("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),t("div",{class:"title"},b.envelope.name),t("div",{style:{flex:"1"}})):t("div",{class:"agree"},t("verdocs-checkbox",{name:"agree",label:"I agree to use electronic records and signatures.",onInput:()=>this.handleClickAgree()})),!this.finishLater&&t("verdocs-button",{size:"small",label:this.nextButtonLabel,disabled:!this.agreed,onClick:()=>this.handleNext()}),t("div",{style:{marginLeft:"10px"}}),t("verdocs-dropdown",{options:this.isDone||this.finishLater?S:k,onOptionSelected:e=>this.handleOptionSelected(e)})),t("div",this.agreed?{style:{display:"none"}}:{class:"cover"}),t("div",{class:"document"},(b.envelope.documents||[]).map((e=>{const i=[...(null==e?void 0:e.pages)||[]];return i.sort(((e,i)=>e.sequence-i.sequence)),t(n,null,i.map((i=>t("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:i.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))))}))),this.showFinishLater&&t("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`,onNext:()=>this.showFinishLater=!1}),this.errorMessage&&t("verdocs-ok-dialog",{heading:"Network Error",message:this.errorMessage,onNext:()=>this.errorMessage=""}),this.showDone&&t("verdocs-ok-dialog",{heading:"You're Done!",message:`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`,onNext:()=>this.showDone=!1}))}};I.style='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign .header{color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-sign .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-sign .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}verdocs-sign .intro{width:100%;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;color:#111111;padding:0 15px;font-size:18px;font-weight:500;line-height:28px;-ms-flex-direction:row;flex-direction:row;background:#ffffff;-ms-flex-align:center;align-items:center}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;z-index:999;position:absolute;background:rgba(0, 0, 0, 0.5)}verdocs-sign>.document{-ms-flex:1;flex:1;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .agree{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;padding:0 15px}verdocs-sign .agree .intro{display:none}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}@media print{verdocs-sign .header{display:none}}';export{I as verdocs_sign}
@@ -1 +0,0 @@
1
- import{r as e,c as o,h as i,H as n,F as t,a as s}from"./p-7239d28d.js";import{f as l}from"./p-5abaf86d.js";import{E as a}from"./p-2bc0d9be.js";import{V as d}from"./p-83b89865.js";import{i as r,j as c,s as p}from"./p-3d0efcc9.js";import{g as v,s as h}from"./p-4718a722.js";import{S as x}from"./p-7a1b2643.js";import"./p-aa124212.js";import"./p-ab01f71e.js";import"./p-8b2040be.js";const m=class{constructor(i){e(this,i),this.sdkError=o(this,"sdkError",7),this.envelopeUpdated=o(this,"envelopeUpdated",7),this.endpoint=d.getDefault(),this.envelopeId="",this.isProcessing=!1}componentWillLoad(){this.endpoint.loadSession()}async componentDidLoad(){if(this.envelopeId)return this.reloadEnvelope();console.error("[VIEW] Missing required envelopeId")}async reloadEnvelope(){var e,o,i;console.log("[VIEW] Checking for updated envelope");try{await v(this.endpoint,this.envelopeId,!0),this.isProcessing=h.envelope.documents.some((e=>"attachment"===e.type&&!e.processed)),this.isProcessing&&setTimeout((()=>this.reloadEnvelope()),3e3)}catch(n){null===(e=this.sdkError)||void 0===e||e.emit(new x(n.message,null===(o=n.response)||void 0===o?void 0:o.status,null===(i=n.response)||void 0===i?void 0:i.data))}}handlePageRendered(e){console.log("[VIEW] Page rendered",e.detail)}async handleOptionSelected(e){var o,i;switch(e.detail.id){case"cancel":confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")&&(await l(this.endpoint,this.envelopeId),null===(o=this.envelopeUpdated)||void 0===o||o.emit({endpoint:this.endpoint,envelope:h.envelope,event:"canceled"}));break;case"print":window.print(),null===(i=this.envelopeUpdated)||void 0===i||i.emit({endpoint:this.endpoint,envelope:h.envelope,event:"printed"});break;case"download-attachments":p(this.endpoint,h.envelope,h.envelope.envelope_document_id).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:h.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading PDF",e)}));break;case"download-certificate":c(this.endpoint,h.envelope,h.envelope.certificate_document_id).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:h.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading PDF",e)}));break;case"download-all":r(this.endpoint,[h.envelope]).then((()=>{var e;null===(e=this.envelopeUpdated)||void 0===e||e.emit({endpoint:this.endpoint,envelope:h.envelope,event:"downloaded"})})).catch((e=>{console.log("Error downloading Zip",e)}))}}render(){var e;if(h.loading||!h.envelope)return i(n,null,i("verdocs-loader",null));if(h.error)return i(n,null,i("div",null,h.error));const o=[{id:"print",label:"Print"}];var s;(function(e,o){return o.profile_id===(null==e?void 0:e.profile_id)})(this.endpoint.session,s=h.envelope)&&s.status!==a.COMPLETE&&s.status!==a.DECLINED&&s.status!==a.CANCELED&&o.push({id:"cancel",label:"Cancel"});const l=h.envelope.documents.length>0,d=!!h.envelope.certificate;return(l||d)&&(o.push({label:""}),l&&o.push({id:"download-attachments",label:"Download Documents(s)"}),d&&o.push({id:"download-certificate",label:"Download Certificate"}),l&&d&&o.push({id:"download-all",label:"Download All Files"})),i(n,{"data-r":h.updateCount},i("div",{class:"header"},i(t,null,i("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),i("div",{class:"title"},h.envelope.name),i("div",{style:{flex:"1"}}),i("div",{style:{marginLeft:"10px"}}),i("verdocs-dropdown",{options:o,onOptionSelected:e=>this.handleOptionSelected(e)}))),i("div",{class:"document"},((null===(e=h.envelope)||void 0===e?void 0:e.documents)||[]).filter((e=>"certificate"!==e.type)).map((e=>{const o=[...(null==e?void 0:e.pages)||[]];return o.sort(((e,o)=>e.sequence-o.sequence)),e.processed?i(t,null,o.map((o=>i("verdocs-envelope-document-page",{envelopeId:this.envelopeId,documentId:e.id,endpoint:this.endpoint,virtualWidth:612,virtualHeight:792,pageNumber:o.sequence,onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})))):i("verdocs-loader",null)}))))}get component(){return s(this)}};m.style='verdocs-view{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}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 15px;font-size:12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}verdocs-view .header .logo{width:80px;display:none;margin:-6px 0 0 10px}verdocs-view .header .title{padding-left:16px;font-size:18px;font-weight:500;text-overflow:ellipsis;white-space:nowrap}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;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}';export{m as verdocs_view}