@verdocs/web-sdk 1.14.12 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/DateTime-ec575ec3.js +45 -0
- package/dist/cjs/{EnvelopeStore-a4231cf7.js → EnvelopeStore-00d2572c.js} +1 -1
- package/dist/cjs/{Envelopes-e5ffb6a5.js → Envelopes-43302e10.js} +17 -0
- package/dist/cjs/{Permissions-4b710db2.js → Permissions-0229bc30.js} +14 -0
- package/dist/cjs/{TemplateStore-f2fb6a62.js → TemplateStore-19f84862.js} +1 -1
- package/dist/cjs/{index-6528b430.js → index-7c19ba1d.js} +63 -219
- package/dist/cjs/ipc-test.cjs.entry.js +37 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-f4efefe3.js → utils-2eefb975.js} +2 -2
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +91 -0
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dropdown.cjs.entry.js +88 -0
- package/dist/cjs/{verdocs-template-document-page.cjs.entry.js → verdocs-envelope-document-page.cjs.entry.js} +14 -14
- package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +233 -0
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-date.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-radio-button.cjs.entry.js +23 -0
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-sign.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +236 -0
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +150 -0
- package/dist/cjs/{verdocs-template-attachments_4.cjs.entry.js → verdocs-template-fields_4.cjs.entry.js} +242 -233
- package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +12 -2
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +91 -0
- package/dist/cjs/verdocs-view.cjs.entry.js +5 -5
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +5 -1
- package/dist/collection/components/envelopes/verdocs-activity-box/verdocs-activity-box.css +130 -0
- package/dist/collection/components/envelopes/verdocs-activity-box/verdocs-activity-box.js +246 -0
- package/dist/collection/components/envelopes/verdocs-activity-box/verdocs-activity-box.stories.js +15 -0
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.css +74 -0
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +474 -0
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.stories.js +18 -0
- package/dist/collection/components/other/ipctest/ipc-test.css +4 -0
- package/dist/collection/components/other/ipctest/ipc-test.js +79 -0
- package/dist/collection/components/other/ipctest/ipc-test.stories.js +8 -0
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.css +3 -0
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +246 -0
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.stories.js +16 -0
- package/dist/components/DateTime.js +43 -0
- package/dist/components/Envelopes.js +17 -1
- package/dist/components/Permissions.js +13 -1
- package/dist/components/VerdocsEndpoint.js +30 -30
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +4 -0
- package/dist/components/index2.js +63 -219
- package/dist/components/ipc-test.d.ts +11 -0
- package/dist/components/ipc-test.js +142 -0
- package/dist/components/utils.js +1 -1
- package/dist/components/verdocs-activity-box.d.ts +11 -0
- package/dist/components/verdocs-activity-box.js +120 -0
- package/dist/components/verdocs-envelope-recipient-summary2.js +1 -1
- package/dist/components/verdocs-envelopes-list.d.ts +11 -0
- package/dist/components/verdocs-envelopes-list.js +298 -0
- package/dist/components/verdocs-sign.js +1 -1
- package/dist/components/verdocs-status-indicator.js +1 -7463
- package/dist/components/verdocs-status-indicator2.js +7465 -0
- package/dist/components/verdocs-template-fields2.js +1 -1
- package/dist/components/verdocs-template-reminders.js +10 -0
- package/dist/components/verdocs-templates-list.d.ts +11 -0
- package/dist/components/verdocs-templates-list.js +120 -0
- package/dist/components/verdocs-view2.js +2 -2
- package/dist/docs.json +667 -39
- package/dist/esm/DateTime-402fe7ca.js +43 -0
- package/dist/esm/{EnvelopeStore-28f5d8f5.js → EnvelopeStore-2a74a367.js} +1 -1
- package/dist/esm/{Envelopes-105a4a8f.js → Envelopes-e69b678a.js} +17 -1
- package/dist/esm/{Permissions-7192ef7c.js → Permissions-2ac18553.js} +13 -1
- package/dist/esm/{TemplateStore-87c99dfc.js → TemplateStore-852097c3.js} +1 -1
- package/dist/esm/{index-d264c496.js → index-914ed6f7.js} +63 -219
- package/dist/esm/ipc-test.entry.js +33 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-1bb75f32.js → utils-8ae39b63.js} +3 -3
- package/dist/esm/verdocs-activity-box.entry.js +87 -0
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-button-panel_3.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-dropdown.entry.js +84 -0
- package/dist/esm/{verdocs-template-document-page.entry.js → verdocs-envelope-document-page.entry.js} +14 -14
- package/dist/esm/verdocs-envelope-recipient-summary.entry.js +4 -4
- package/dist/esm/verdocs-envelope-sidebar.entry.js +5 -5
- package/dist/esm/verdocs-envelopes-list.entry.js +229 -0
- package/dist/esm/verdocs-field-checkbox.entry.js +3 -3
- package/dist/esm/verdocs-field-date.entry.js +3 -3
- package/dist/esm/verdocs-field-dropdown.entry.js +3 -3
- package/dist/esm/verdocs-field-initial.entry.js +3 -3
- package/dist/esm/verdocs-field-payment.entry.js +3 -3
- package/dist/esm/verdocs-field-radio-button.entry.js +3 -3
- package/dist/esm/verdocs-field-signature.entry.js +3 -3
- package/dist/esm/verdocs-field-textarea.entry.js +4 -4
- package/dist/esm/verdocs-field-textbox.entry.js +4 -4
- package/dist/esm/verdocs-field-timestamp.entry.js +3 -3
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/verdocs-organization-card.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +5 -5
- package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm/verdocs-radio-button.entry.js +19 -0
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +5 -5
- package/dist/esm/verdocs-sign.entry.js +4 -4
- package/dist/esm/verdocs-template-attachments_2.entry.js +231 -0
- package/dist/esm/verdocs-template-document-page_2.entry.js +145 -0
- package/dist/esm/{verdocs-template-attachments_4.entry.js → verdocs-template-fields_4.entry.js} +239 -230
- package/dist/esm/verdocs-template-name.entry.js +2 -2
- package/dist/esm/verdocs-template-reminders.entry.js +12 -2
- package/dist/esm/verdocs-template-visibility.entry.js +2 -2
- package/dist/esm/verdocs-templates-list.entry.js +87 -0
- package/dist/esm/verdocs-view.entry.js +5 -5
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/DateTime-402fe7ca.js +1 -0
- package/dist/esm-es5/{EnvelopeStore-28f5d8f5.js → EnvelopeStore-2a74a367.js} +1 -1
- package/dist/esm-es5/Envelopes-e69b678a.js +1 -0
- package/dist/esm-es5/{Permissions-7192ef7c.js → Permissions-2ac18553.js} +1 -1
- package/dist/esm-es5/{TemplateStore-87c99dfc.js → TemplateStore-852097c3.js} +1 -1
- package/dist/esm-es5/{VerdocsEndpoint-6d7a17ce.js → VerdocsEndpoint-5b92f115.js} +1 -1
- package/dist/esm-es5/index-914ed6f7.js +1 -0
- package/dist/esm-es5/ipc-test.entry.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-1bb75f32.js → utils-8ae39b63.js} +2 -2
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -0
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown.entry.js +1 -0
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -0
- package/dist/esm-es5/verdocs-envelope-recipient-summary.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-radio-button.entry.js +1 -0
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-attachments_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -0
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/envelopes/verdocs-activity-box/verdocs-activity-box.d.ts +60 -0
- package/dist/types/components/envelopes/verdocs-activity-box/verdocs-activity-box.stories.d.ts +10 -0
- package/dist/types/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.d.ts +76 -0
- package/dist/types/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.stories.d.ts +10 -0
- package/dist/types/components/other/ipctest/ipc-test.d.ts +17 -0
- package/dist/types/components/other/ipctest/ipc-test.stories.d.ts +4 -0
- package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.d.ts +55 -0
- package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.stories.d.ts +7 -0
- package/dist/types/components.d.ts +228 -2
- package/dist/verdocs-web-sdk/{p-10bb1e56.entry.js → p-0177fb6c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-255a66f9.system.entry.js → p-0529a428.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-0a5390c7.js +1 -0
- package/dist/verdocs-web-sdk/{p-172f5d37.system.entry.js → p-0aaca8d5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ff662b13.js → p-0b4ea5f9.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ac2b339a.system.entry.js → p-0c0ac290.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bbdafeac.entry.js → p-0f8c70ec.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-dfbf689b.entry.js → p-10e8d145.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8109a994.system.entry.js → p-13200610.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-138fd801.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-2a3de488.system.entry.js → p-1420d87e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-83535db7.entry.js → p-16baf630.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-18a67b44.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-237edd0b.entry.js → p-19e1c76a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-886461cd.system.entry.js → p-1a0cccea.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-204f69c7.entry.js → p-1ae77200.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-c0635249.system.entry.js → p-208b2e94.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7399931a.system.entry.js → p-21e90bbf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b1ffa27a.entry.js → p-22939ee9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-244414ca.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-2672bfb4.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e5365d23.system.entry.js → p-2750155d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2d2bdf3c.system.entry.js → p-2d32da1d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a78616fe.entry.js → p-2d7d69a2.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-2f0cd03d.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-3a9d248d.entry.js → p-31a49d0c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8387794f.system.entry.js → p-31e3d00e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d21e9e04.system.js → p-3c6f9c7f.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-9d90ed3d.system.entry.js → p-3e4f73cb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-017dc2a9.entry.js → p-3f9d879c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4083d24f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-8fcb22ea.entry.js → p-438daf23.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-18ee4fd5.js → p-4391cd11.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3ea489e9.js → p-4b65e2f3.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a6258dde.system.js → p-4cc5d833.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bcda78a9.system.entry.js → p-4e025c82.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8dacb527.entry.js → p-4f0bf0de.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-12f0c4e0.system.entry.js → p-51cfde70.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-522127c8.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-52428dff.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-773a2544.system.entry.js → p-57ee65dc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-58bb657b.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-68662f17.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-43f5476c.entry.js → p-6c01e798.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f61f02a7.entry.js → p-6e62e65a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-70b42a9c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ededd783.entry.js → p-7ac080d6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-750fabdb.entry.js → p-7fb69dde.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-df439631.system.entry.js → p-8080f854.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9dd19ab5.system.entry.js → p-84457a67.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-87cf1148.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-89aac159.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5d19f075.entry.js → p-8aba7c0a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8fb2cf32.js → p-8ec8d450.js} +2 -2
- package/dist/verdocs-web-sdk/{p-bf850bb9.system.entry.js → p-95fc08e1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-9e9ab67f.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a5eebbfa.entry.js → p-a5bce263.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-aa3fd489.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-d763dac2.entry.js → p-ac58dba7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-acaf51f7.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-25870f11.system.entry.js → p-ad7f71cf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-afeff3d1.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b43d0cd6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-1236c197.system.entry.js → p-b56feb8c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e702cf26.entry.js → p-be3c4aa9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c16d1ce1.js +1 -0
- package/dist/verdocs-web-sdk/p-c220af42.js +1 -0
- package/dist/verdocs-web-sdk/p-c6e4d0fc.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-c7dbe82b.system.entry.js → p-c6f6fe4f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-19450d55.system.entry.js → p-c841a530.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-cafd699c.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-1c4f6ae6.entry.js → p-cc3ff9dc.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-365a8a00.entry.js → p-cd1e5de4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a596cd4f.system.entry.js → p-d35f7faa.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d5316866.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-365a0216.system.js → p-dc849a58.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-dc9c4361.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-56c65857.system.entry.js → p-e4ceaebf.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d09a9e1b.system.entry.js → p-e59117c8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d146b48e.entry.js → p-e72c075e.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e82a7328.js +1 -0
- package/dist/verdocs-web-sdk/p-e8418235.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-991afbb9.entry.js → p-ebca6188.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-ee84ffc0.system.js +1 -0
- package/dist/verdocs-web-sdk/p-f0749d37.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5df694ab.system.entry.js → p-f1accb35.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7917673a.system.entry.js → p-f37f1ebc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ca57cd6e.entry.js → p-f483cd49.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f9c6fa6c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-fdc4e659.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/Roles-9b593b95.js +0 -28
- package/dist/cjs/verdocs-dropdown_2.cjs.entry.js +0 -187
- package/dist/cjs/verdocs-radio-button_3.cjs.entry.js +0 -241
- package/dist/cjs/verdocs-toolbar-icon.cjs.entry.js +0 -51
- package/dist/esm/Roles-6eb459df.js +0 -24
- package/dist/esm/verdocs-dropdown_2.entry.js +0 -182
- package/dist/esm/verdocs-radio-button_3.entry.js +0 -235
- package/dist/esm/verdocs-toolbar-icon.entry.js +0 -47
- package/dist/esm-es5/Envelopes-105a4a8f.js +0 -1
- package/dist/esm-es5/Roles-6eb459df.js +0 -1
- package/dist/esm-es5/index-d264c496.js +0 -1
- package/dist/esm-es5/verdocs-dropdown_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-radio-button_3.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-attachments_4.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-document-page.entry.js +0 -1
- package/dist/esm-es5/verdocs-toolbar-icon.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1e8d9829.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-27846894.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-42aa31a9.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-51a3ea62.system.js +0 -1
- package/dist/verdocs-web-sdk/p-76b73d80.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-789dc7fe.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7a23c2c8.system.js +0 -1
- package/dist/verdocs-web-sdk/p-8027431e.js +0 -1
- package/dist/verdocs-web-sdk/p-807dbe83.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8229e6df.system.js +0 -1
- package/dist/verdocs-web-sdk/p-89f34463.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8c57f5d0.system.js +0 -1
- package/dist/verdocs-web-sdk/p-8fd812f4.system.js +0 -1
- package/dist/verdocs-web-sdk/p-a3931094.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a58691dc.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a654311c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ab01f71e.js +0 -1
- package/dist/verdocs-web-sdk/p-ad11a39a.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c4c8af4c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cf790f4f.js +0 -1
- package/dist/verdocs-web-sdk/p-d869c39c.js +0 -1
- package/dist/cjs/{VerdocsEndpoint-e6517a50.js → VerdocsEndpoint-f2af9468.js} +30 -30
- package/dist/esm/{VerdocsEndpoint-6d7a17ce.js → VerdocsEndpoint-5b92f115.js} +30 -30
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,i){function r(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function n(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i["throw"](e))}catch(e){s(e)}}function l(e){e.done?o(e.value):r(e.value).then(n,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,r,s,n;return n={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function a(e){return function(t){return l([e,t])}}function l(n){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,r&&(s=n[0]&2?r["return"]:n[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,n[1])).done)return s;if(r=0,s)n=[n[0]&2,s.value];switch(n[0]){case 0:case 1:s=n;break;case 4:o.label++;return{value:n[1],done:false};case 5:o.label++;r=n[1];n=[0];continue;case 7:n=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(n[0]===6||n[0]===2)){o=0;continue}if(n[0]===3&&(!s||n[1]>s[0]&&n[1]<s[3])){o.label=n[1];break}if(n[0]===6&&o.label<s[1]){o.label=s[1];s=n;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(n);break}if(s[2])o.ops.pop();o.trys.pop();continue}n=t.call(e,o)}catch(e){n=[6,e];r=0}finally{i=s=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var i=0,r=t.length,s;i<r;i++){if(s||!(i in t)){if(!s)s=Array.prototype.slice.call(t,0,i);s[i]=t[i]}}return e.concat(s||Array.prototype.slice.call(t))};System.register(["./p-934a39b4.system.js","./p-54498887.system.js","./p-6e9af353.system.js","./p-365a0216.system.js","./p-455d16dc.system.js","./p-a6258dde.system.js","./p-187b20b7.system.js","./p-4ac861c9.system.js","./p-3305a941.system.js","./p-b1288daf.system.js","./p-d50523fd.system.js","./p-d21e9e04.system.js","./p-8229e6df.system.js","./p-05eb4fed.system.js","./p-b4d11d90.system.js","./p-bbee73c8.system.js","./p-8fd812f4.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,o,i,r,s,n,a,l,d,c,p,u,h,m,f,v,g,x,b,w,y,q,E,C,k,_,L,M,S,R,I,Z,H;return{setters:[function(e){t=e.r;o=e.c;i=e.h;r=e.H;s=e.F;n=e.a},function(){},function(e){a=e.c;l=e.d},function(e){d=e.V;c=e.T},function(e){p=e.D;u=e.P;h=e.J;m=e.a;f=e.F;v=e.b;g=e.T},function(e){x=e.g;b=e.a},function(e){w=e.S},function(e){y=e.c},function(e){q=e.i},function(e){E=e.u;C=e.c},function(e){k=e.i},function(e){_=e.a;L=e.r;M=e.c;S=e.d;R=e.e},function(e){I=e.u;Z=e.c},function(e){H=e.g},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var z;var A='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';var D=e("verdocs_template_attachments",function(){function e(e){t(this,e);this.exit=o(this,"exit",7);this.next=o(this,"next",7);this.templateUpdate=o(this,"templateUpdate",7);this.sdkError=o(this,"sdkError",7);this.endpoint=d.getDefault();this.templateId="";this.uploading=false;this.progressLabel="Uploading...";this.progressPercent=0;this.showDeleteError=false;this.confirmDeleteDocument=null;this.store=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,r;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}i=this;return[4,x(this.endpoint,this.templateId,false)];case 1:i.store=s.sent();return[3,3];case 2:r=s.sent();console.log("[TEMPLATE ATTACHMENTS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(o=r.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleUploadProgress=function(e){if(e>=99){this.progressPercent=100;this.progressLabel="Processing..."}else{this.progressPercent=e}};e.prototype.handleUpload=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,r,s,n,l;return __generator(this,(function(d){switch(d.label){case 0:e.stopPropagation();r=e.detail.file;if(!r){return[2]}console.log("[ATTACHMENTS] Uploading...",r);this.uploading=true;this.progressLabel="Uploading...";d.label=1;case 1:d.trys.push([1,4,,5]);return[4,a(this.endpoint,this.templateId,r,this.handleUploadProgress.bind(this))];case 2:s=d.sent();console.log("[ATTACHMENTS] Created attachment",s);n=this;return[4,x(this.endpoint,this.templateId,true)];case 3:n.store=d.sent();console.log("[ATTACHMENTS] New template",this.store.state);this.uploading=false;this.progressLabel="";this.progressPercent=0;return[3,5];case 4:l=d.sent();console.log("[ATTACHMENTS] Error creating template",l);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new w(l.message,(o=l.response)===null||o===void 0?void 0:o.status,(i=l.response)===null||i===void 0?void 0:i.data));this.uploading=false;return[3,5];case 5:return[2]}}))}))};e.prototype.handleNext=function(e){var t;e.stopPropagation();this.uploading=false;this.progressLabel="";this.progressPercent=0;(t=this.next)===null||t===void 0?void 0:t.emit({template:this.store.state})};e.prototype.confirmDelete=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,l(this.endpoint,this.templateId,this.confirmDeleteDocument.id)];case 1:t.sent();e=this;return[4,x(this.endpoint,this.templateId,true)];case 2:e.store=t.sent();console.log("[ATTACHMENTS] New template",this.store.state);this.confirmDeleteDocument=null;return[2]}}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(o){if(((t=this.store.state)===null||t===void 0?void 0:t.template_documents.length)>1){this.confirmDeleteDocument=e}else{this.showDeleteError=true}return[2]}))}))};e.prototype.getFileIcon=function(e){switch(e.mime){case"application/pdf":return m;case"image/jpeg":return h;case"image/png":return u;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return p}return f};e.prototype.render=function(){var e=this;var t,o,s;if(!this.endpoint.session){return i(r,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}var n=(t=this.store)===null||t===void 0?void 0:t.state;if(!n.isLoaded){return i(r,{class:"loading"},i("verdocs-loader",null))}if(!this.endpoint.session||!n.profile_id){return i(r,{class:"empty"})}return i(r,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},(o=this.store)===null||o===void 0?void 0:o.state.template_documents.map((function(t){return i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:e.getFileIcon(t)}),i("div",{class:"filename",title:t.name},t.name),i("div",{class:"pages"},i("div",{class:"count"},t.page_numbers),i("div",{class:"pages-icon",innerHTML:v})),i("div",{class:"trash-icon",innerHTML:g,onClick:function(){return e.handleDelete(t)}}))}))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:function(t){return e.handleUpload(t)}}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleNext(t)},disabled:!((s=this.store)===null||s===void 0?void 0:s.state.template_documents.length)||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:function(){return e.showDeleteError=false}}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:function(){return e.confirmDelete()},showCancel:true,onExit:function(){e.confirmDeleteDocument=null}}))};return e}());D.style=A;var T='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var N=" ";var V='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var P=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=o(this,"exit",7);this.next=o(this,"next",7);this.sdkError=o(this,"sdkError",7);this.endpoint=d.getDefault();this.file=undefined;this.creating=false;this.progressLabel="Uploading...";this.progressPercent=0}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,r,s,n;var a=this;return __generator(this,(function(l){switch(l.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;this.progressLabel="Uploading...";l.label=1;case 1:l.trys.push([1,3,,4]);return[4,y(this.endpoint,{name:this.file.name,documents:[this.file]},(function(e){if(e>=99){a.progressLabel="Processing...";a.progressPercent=100}else{a.progressPercent=e}}))];case 2:s=l.sent();console.log("[CREATE] Created template",s);(t=this.next)===null||t===void 0?void 0:t.emit(s);this.creating=false;this.progressLabel="";this.progressPercent=0;return[3,4];case 3:n=l.sent();console.log("[CREATE] Error creating template",n);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new w(n.message,(i=n.response)===null||i===void 0?void 0:i.status,(r=n.response)===null||r===void 0?void 0:r.data));this.creating=false;return[3,4];case 4:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return i(r,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return i(r,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):i("div",{class:"upload-box",onDrop:function(t){t.preventDefault();t.target.classList.remove("drag-over");e.file=t.dataTransfer.files[0]},onDragOver:function(e){e.preventDefault();e.dataTransfer.dropEffect="copy"},onDragEnter:function(e){return e.target.classList.add("drag-over")},onDragLeave:function(e){return e.target.classList.remove("drag-over")}},i("div",null,i("span",{innerHTML:V})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?N:"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating}))))};return e}());P.style=T;var F="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio_button_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";var U='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var j='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>';var O='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var B='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var Q='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var W='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var Y='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var X='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>';var G='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var K='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';var J=[{id:"signature",tooltip:"Signature",icon:W},{id:"initial",tooltip:"Initials",icon:Y},{id:"sep1",tooltip:"",icon:K},{id:"textbox",tooltip:"Text Box",icon:U},{id:"textarea",tooltip:"Text Area",icon:j},{id:"checkbox_group",tooltip:"Check Box",icon:O},{id:"radio_button_group",tooltip:"Radio Button",icon:B},{id:"dropdown",tooltip:"Dropdown",icon:G},{id:"sep2",tooltip:"",icon:K},{id:"date",tooltip:"Date",icon:Q},{id:"timestamp",tooltip:"Timestamp",icon:X}];var $=e("verdocs_template_fields",function(){function e(e){t(this,e);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.pageHeights={};this.store=null;this.cachedPageInfo={};this.endpoint=d.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.showMustSelectRole=false;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,r,s,n,a,l;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[FIELDS] Unable to start builder session, must be authenticated");return[2]}a=this;return[4,x(this.endpoint,this.templateId,true)];case 1:a.store=d.sent();console.log("[FIELDS] Loaded template ".concat(this.templateId),this.store.state);this.selectedRoleName=((i=(o=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles)===null||o===void 0?void 0:o[0])===null||i===void 0?void 0:i.name)||"";console.log("[FIELDS] Starting with role",this.selectedRoleName);return[3,3];case 2:l=d.sent();console.log("[FIELDS] Error with preview session",l);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new w(l.message,(s=l.response)===null||s===void 0?void 0:s.status,(n=l.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.componentDidRender=function(){q.dynamicDrop(true);var e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){console.log("[FIELDS] Moving toolbar");t.remove();e.append(t)}};e.prototype.componentWillUpdate=function(){var e=this;var t,o,i,r,s,n;if(!this.selectedRoleName||!(((o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.roles)||[]).find((function(t){return t.name===e.selectedRoleName}))){this.selectedRoleName=((n=(s=(r=(i=this.store)===null||i===void 0?void 0:i.state)===null||r===void 0?void 0:r.roles)===null||s===void 0?void 0:s[0])===null||n===void 0?void 0:n.name)||"";console.log("[FIELDS] Selected new role",this.selectedRoleName)}};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,o){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){console.log("[FIELDS] handleFieldChange",e,t,o);this.rerender++;return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,o,i){var r=this;i.addEventListener("input",(function(e){return r.handleFieldChange(t,e)}));i.addEventListener("settingsChanged",(function(s){var n,a,l,d;console.log("[FIELDS] settingsChanged",s.detail);Object.assign(t.setting,s.detail.settings);r.selectedRoleName=t.role_name;i.setAttribute("roleindex",_(b(r.store),t.role_name));i.field=(a=(n=r.store)===null||n===void 0?void 0:n.state)===null||a===void 0?void 0:a.fields.find((function(e){return e.name===t.name}));r.rerender++;i.setAttribute("rerender",r.rerender);(l=r.templateUpdated)===null||l===void 0?void 0:l.emit({endpoint:r.endpoint,template:(d=r.store)===null||d===void 0?void 0:d.state,event:"updated-field"});console.log("[FIELDS] Re-rendering field",t.name,e.pageNumber);r.reRenderField(t,e.pageNumber);var c=L(t,e,o,{disabled:true,editable:true,draggable:true});if(!c){return}}));i.addEventListener("deleted",(function(){var e,o;console.log("deleted",r,t);i.remove();r.rerender++;(e=r.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:r.endpoint,template:(o=r.store)===null||o===void 0?void 0:o.state,event:"updated-field"})}));i.setAttribute("templateid",this.templateId);i.setAttribute("roleindex",o);i.setAttribute("pageNumber",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);i.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var o;var i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var r=(o=this.store)===null||o===void 0?void 0:o.state.fields.filter((function(e){return e.page_sequence===i.pageNumber}));r.forEach((function(e){return t.reRenderField(e,i.pageNumber)}))};e.prototype.reRenderField=function(e,t){var o=this;var i=this.cachedPageInfo[t];var r=_(b(this.store),e.role_name);var s=L(e,i,r,{disabled:true,editable:true,draggable:true});if(!s){return}if(Array.isArray(s)){s.forEach((function(t){o.attachFieldAttributes(i,e,r,t);q(t).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var o=+(e.target.getAttribute("posY")||0);var i=+(e.target.getAttribute("xScale")||1);var r=+(e.target.getAttribute("yScale")||1);var s=e.dx/i+t;var n=e.dy/r+o;e.target.setAttribute("posX",s);e.target.setAttribute("posy",n);M(e.target,"translate","".concat(s,"px, ").concat(n,"px"))},end:o.handleMoveField.bind(o)}})}))}else{this.attachFieldAttributes(i,e,r,s);q(s).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var o=+(e.target.getAttribute("posY")||0);var i=+(e.target.getAttribute("xScale")||1);var r=+(e.target.getAttribute("yScale")||1);var s=e.dx/i+t;var n=e.dy/r+o;e.target.setAttribute("posX",s);e.target.setAttribute("posy",n);M(e.target,"translate","".concat(s,"px, ").concat(n,"px"))},end:this.handleMoveField.bind(this)}})}};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,o,i,r,s,n,a,l,d,c,p,u,h,m,f,v,g,x,b,w,y;return __generator(this,(function(q){switch(q.label){case 0:o=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[o],r=i.naturalWidth,s=r===void 0?612:r,n=i.naturalHeight,a=n===void 0?792:n,l=i.renderedHeight,d=l===void 0?792:l;console.log("[FIELDS] Drag ended",o,e.target);c=e.target.getBoundingClientRect();p=e.target.parentElement;u=p.getBoundingClientRect();h=Math.max(c.left-u.left,0);m=Math.max(d-(u.bottom-c.bottom),0);f=this.viewCoordinatesToPageCoordinates(h,m,o,s-e.rect.width,a-e.rect.height),v=f.x,g=f.y;x=e.target.getAttribute("name");b=+(e.target.getAttribute("option")||"0");w=(t=this.store)===null||t===void 0?void 0:t.state.fields.find((function(e){return e.name===x}));console.log("Will update",x,b,w);if(!w)return[3,2];switch(w.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":w.setting.x=v;w.setting.y=g;break;case"checkbox_group":case"radio_button_group":{y=w.setting.options[b];if(y){y.x=v;y.y=g}}break}return[4,E(this.endpoint,this.templateId,x,w)];case 1:q.sent();this.handlePageRendered({detail:this.cachedPageInfo[o]});q.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var o,i;var r=1;var s;do{s="".concat(e,"P").concat(t,"-").concat(r);console.log("testing field",s);r++}while((o=this.store)===null||o===void 0?void 0:o.state.fields.some((function(e){return e.name===s})));console.log("Will use field name",this,s,(i=this.store)===null||i===void 0?void 0:i.state.fields);return s};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,o,i,r){var s=this.cachedPageInfo[o],n=s.xScale,a=n===void 0?1:n,l=s.yScale,d=l===void 0?1:l,c=s.renderedHeight,p=c===void 0?792:c;var u=Math.floor(Math.min(e/a,i));var h=Math.floor(Math.min(Math.max(p-t,0)/d,r));return{x:u,y:h}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var o,i,r,s,n,a,l,d,c,p,u,h,m,f,v,g,x;return __generator(this,(function(b){switch(b.label){case 0:if(!this.placing)return[3,2];console.log("Placing field",this,this.selectedRoleName,this.placing,t,e.offsetX,e.offsetY);s=e.offsetX;n=e.offsetY;a=S(this.placing);l=R(this.placing);d=this.cachedPageInfo[t];c=d.naturalWidth,p=c===void 0?612:c,u=d.naturalHeight,h=u===void 0?792:u;m=this.viewCoordinatesToPageCoordinates(s,n,t,p-a,h-l);f=Math.floor(m.x);v=Math.floor(m.y);g={name:this.generateFieldName(this.placing,t),role_name:this.selectedRoleName,template_id:this.templateId,document_id:d.documentId,type:this.placing,required:true,page_sequence:t,validator:null,setting:{x:f,y:v},x:f,y:v,tabindex:0,width:a,height:l};switch(g.type){case"attachment":case"payment":g.setting={x:f,y:v};break;case"initial":case"signature":g.setting={x:f,y:v,result:""};break;case"checkbox_group":g.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:"".concat(g.name,"-1"),value:"Option 1",checked:false,x:f,y:v}]};break;case"date":g.setting={x:f,y:v,width:a,height:l,result:""};break;case"dropdown":g.required=false;g.setting={x:f,y:v,width:a,height:l,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":g.setting={options:[{id:"".concat(g.name,"-1"),value:"Option 1",selected:false,x:f,y:v}]};break;case"textarea":case"textbox":g.setting={x:f,y:v,width:a,height:l,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":g.setting={x:f,y:v,width:a,height:l};break}if(g.type==="textarea"){g.setting.leading=16;g.type="textbox"}return[4,C(this.endpoint,this.templateId,g)];case 1:x=b.sent();console.log("Saved field",x);if(this.store.state){this.store.state.fields=__spreadArray(__spreadArray([],(o=this.store)===null||o===void 0?void 0:o.state.fields,true),[x],false)}this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:(r=this.store)===null||r===void 0?void 0:r.state,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[t]});b.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;var o,s,n,a,l,d,c,p;console.log("[FIELDS] Rendering",this.selectedRoleName);if(!this.endpoint.session){return i(r,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!((o=this.store)===null||o===void 0?void 0:o.state.isLoaded)){return i(r,null,i("verdocs-loader",null))}var u=(n=(s=this.store)===null||s===void 0?void 0:s.state)===null||n===void 0?void 0:n.roles.map((function(e){return{value:e.name,label:e.name}}));return i(r,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},i("div",{id:"verdocs-template-fields-toolbar"},i("div",{class:"add-for"},"Add field:"),i("verdocs-select-input",{value:this.selectedRoleName,options:u,onInput:function(e){return t.selectedRoleName=e.target.value}}),J.map((function(e){return i("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){if(e.tooltip){if(t.selectedRoleName){t.placing=e.id}else{t.showMustSelectRole=true}}}})}))),i("div",{class:"pages"},(((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.template_documents)||[]).map((function(e){var o=k(1,e.page_numbers);return o.map((function(o){return i("verdocs-template-document-page",{templateId:t.templateId,documentId:e.id,pageNumber:o,virtualWidth:612,virtualHeight:792,onClick:function(e){return t.handleClickPage(e,o)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))}))),this.showMustSelectRole&&i("verdocs-ok-dialog",{heading:"Unable to add field",message:((p=(c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.roles)===null||p===void 0?void 0:p.length)>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:function(){return t.showMustSelectRole=false}}))};return e}());$.style=F;var ee='verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';var te=(z={},z[c.EVERYONE]="Everyone",z[c.EVERYONE_AS_CREATOR]="Everyone as Me",z[c.ORGANIZATION_MEMBER]="Organization member",z[c.ORGANIZATION_MEMBER_AS_CREATOR]="Organization Member as Me",z[c.CREATOR]="Me",z);var oe='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';var ie='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>';var re='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>';var se='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>';var ne='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var ae='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var le='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>';var de='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>';var ce=e("verdocs_template_roles",function(){function e(e){t(this,e);this.next=o(this,"next",7);this.exit=o(this,"exit",7);this.sdkError=o(this,"sdkError",7);this.templateUpdated=o(this,"templateUpdated",7);this.sequences=[];this.store=null;this.endpoint=d.getDefault();this.templateId="";this.showingRoleDialog=null;this.showingSenderDialog=false;this.sender=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,r;return __generator(this,(function(s){switch(s.label){case 0:s.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}i=this;return[4,x(this.endpoint,this.templateId,true)];case 1:i.store=s.sent();this.sortTemplateRoles();this.renumberTemplateRoles();return[3,3];case 2:r=s.sent();console.log("[FIELDS] Error with preview session",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new w(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(o=r.response)===null||o===void 0?void 0:o.data));return[3,3];case 3:return[2]}}))}))};e.prototype.componentDidRender=function(){q.dynamicDrop(true);q(".recipient").draggable({listeners:{start:function e(t){t.target.classList.add("dragging");this.el.classList.add("dragging")}.bind(this),move:function e(t){var o=+(t.target.getAttribute("posX")||0);var i=+(t.target.getAttribute("posY")||0);var r=t.dx+o;var s=t.dy+i;t.target.setAttribute("posX",r);t.target.setAttribute("posy",s);t.target.style.transform="translate(".concat(r+100,"px, ").concat(s-40,"px)")}.bind(this),end:function e(t){t.target.classList.remove("dragging");this.el.classList.remove("dragging");t.target.setAttribute("posX",0);t.target.setAttribute("posy",0);t.target.style.transform="translate(0px, 0px)"}.bind(this)}});q(".dropzone").dropzone({overlap:.05,ondrop:function e(t){var o=this;var i,r,s,n,a;t.target.classList.remove("active");var l=t.relatedTarget.dataset.rolename;var d=+t.target.dataset.sequence;var c=+t.target.dataset.order;var p=(s=(r=(i=this.store)===null||i===void 0?void 0:i.state)===null||r===void 0?void 0:r.roles)===null||s===void 0?void 0:s.find((function(e){return e.name===l}));if(p){p.sequence=d;p.order=c;this.sortTemplateRoles();this.renumberTemplateRoles();this.forceRerender++;Promise.all((a=(n=this.store)===null||n===void 0?void 0:n.state)===null||a===void 0?void 0:a.roles.map((function(e){return I(o.endpoint,o.templateId,e.name,{sequence:e.sequence,order:e.order})}))).then((function(){var e,t;console.log("[ROLES] Updated roles");(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({event:"updated-role",endpoint:o.endpoint,template:(t=o.store)===null||t===void 0?void 0:t.state})})).catch((function(e){return console.log("[ROLES] Role updates failed",e)}))}}.bind(this),ondropactivate:function(e){e.target.classList.add("visible")},ondropdeactivate:function(e){e.target.classList.remove("visible")},ondragenter:function(e){e.target.classList.add("active")},ondragleave:function(e){e.target.classList.remove("active")}})};e.prototype.handleCancel=function(){var e;(e=this.exit)===null||e===void 0?void 0:e.emit()};e.prototype.handleSubmit=function(){var e;(e=this.next)===null||e===void 0?void 0:e.emit()};e.prototype.sortTemplateRoles=function(){var e,t;(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.sort((function(e,t){return e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence}))};e.prototype.extractSequenceNumbers=function(){var e=this;var t,o;this.sequences=[];(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.roles.forEach((function(t){if(!e.sequences.includes(t.sequence)){e.sequences.push(t.sequence)}}))};e.prototype.renumberTemplateRoles=function(){var e=this;this.extractSequenceNumbers();var t=[];this.sequences.sort((function(e,t){return e-t}));this.sequences.forEach((function(o,i){var r,s;(s=(r=e.store)===null||r===void 0?void 0:r.state)===null||s===void 0?void 0:s.roles.filter((function(e){return e.sequence===o})).forEach((function(e,o){if(!t.includes(e.name)){e.sequence=i+1;e.order=o+1;t.push(e.name)}}))}));this.extractSequenceNumbers()};e.prototype.getNextRoleName=function(){var e,t,o,i;var r="";var s=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.length;do{s++;r="Recipient ".concat(s)}while(!r||((i=(o=this.store)===null||o===void 0?void 0:o.state)===null||i===void 0?void 0:i.roles.some((function(e){return e.name===r}))));return r};e.prototype.callCreateRole=function(e,t,o){var i=this;console.log("[ROLES] Will create role",{name:e,sequence:t,order:o});Z(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,order:o,full_name:"",email:"",phone:"",type:"signer",delegator:false}).then((function(e){return __awaiter(i,void 0,void 0,(function(){var t,o,i;return __generator(this,(function(r){switch(r.label){case 0:console.log("[ROLES] Created role",e);i=this;return[4,x(this.endpoint,this.templateId,true)];case 1:i.store=r.sent();this.sortTemplateRoles();this.renumberTemplateRoles();(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({event:"created-role",endpoint:this.endpoint,template:(o=this.store)===null||o===void 0?void 0:o.state});return[2]}}))}))})).catch((function(e){console.log("[ROLES] Error creating role",e)}))};e.prototype.handleAddRole=function(e,t){var o;e.stopPropagation();var i=((o=this.store)===null||o===void 0?void 0:o.state.roles.filter((function(e){return e.sequence===t})).length)+1;var r=this.getNextRoleName();this.callCreateRole(r,t,i)};e.prototype.handleAddStep=function(e,t){e.stopPropagation();var o=1;var i=this.getNextRoleName();this.callCreateRole(i,t,o)};e.prototype.render=function(){var e=this;var t,o,n,a,l,d;console.log("[ROLES] Rendering");if(!this.endpoint.session){return i(r,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!((t=this.store)===null||t===void 0?void 0:t.state.isLoaded)){return i(r,{class:"loading"},i("verdocs-loader",null))}var c=(((n=(o=this.store)===null||o===void 0?void 0:o.state)===null||n===void 0?void 0:n.roles)||[]).map((function(e){return e.name}));return i(r,null,i("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off","data-r":(a=this.store.state)===null||a===void 0?void 0:a.updateCount},i("h5",null,"Roles and Workflow"),i("div",{class:"participants"},i("div",{class:"left-line"}),i("div",{class:"row"},i("div",{class:"icon",innerHTML:ie}),i("div",{class:"row-roles"},i("div",{class:"sender"},i("span",{class:"label"},"Sender:")," ",te[(d=(l=this.store)===null||l===void 0?void 0:l.state)===null||d===void 0?void 0:d.sender]," ",i("div",{class:"settings-button",innerHTML:oe,onClick:function(){return e.showingSenderDialog=true},"aria-role":"button"})))),i("div",{class:"row add-sequence","data-sequence":0},i("div",{class:"icon",innerHTML:ne}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((function(t){var o,r;return i(s,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:re}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-order":.5,"data-sequence":t}),(r=(o=e.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.roles.filter((function(e){return e.sequence===t})).map((function(o){var r=!o.email;return r?i(s,null,i("div",{class:"recipient",style:{backgroundColor:H(_(c,o.name))},"data-rolename":o.name},i("span",{class:"type-icon",innerHTML:o.type==="signer"?ae:o.type==="cc"?de:le}),o.name," ",i("div",{class:"settings-button",innerHTML:oe,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),i("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":t})):i(s,null,i("div",{class:"recipient",style:{borderColor:H(_(c,o.name))},"data-rolename":o.name},i("span",{class:"type-icon",innerHTML:o.type==="signer"?ae:o.type==="cc"?de:le}),o.full_name," ",i("div",{class:"settings-button",innerHTML:oe,onClick:function(){return e.showingRoleDialog=o.name},"aria-role":"button"})),i("div",{class:"dropzone","data-order":o.order+.5,"data-sequence":t}))})),i("button",{class:"add-role",innerHTML:ne,onClick:function(o){return e.handleAddRole(o,t)}}))),e.sequences.length>0&&i("div",{class:"row add-sequence","data-sequence":t},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:ne}),i("div",{class:"dropzone","data-sequence":t+1,"data-order":1},"Add Step"))))})),i("div",{class:"row","data-sequence":this.sequences.length+1},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:ne}),i("button",{class:"add-step",innerHTML:ne,onClick:function(t){return e.handleAddStep(t,e.sequences.length+1)}}))),i("div",{class:"row"},i("div",{class:"icon",innerHTML:se}),i("div",{class:"row-roles"},i("div",{class:"complete"},"Document Complete")))),c.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:ne})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(){return e.handleCancel()}}),i("verdocs-button",{label:"OK",size:"small",onClick:function(){return e.handleSubmit()},disabled:c.length<1}))),this.showingRoleDialog&&i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:function(){e.showingRoleDialog=null},onDelete:function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(o){switch(o.label){case 0:return[4,x(this.endpoint,this.templateId,true)];case 1:o.sent();this.renumberTemplateRoles();this.showingRoleDialog=null;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({event:"deleted-role",endpoint:this.endpoint,template:(t=this.store)===null||t===void 0?void 0:t.state});return[2]}}))}))}}),this.showingSenderDialog&&i("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:function(){return e.showingSenderDialog=false}}))};Object.defineProperty(e.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());ce.style=ee}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./p-54498887.system.js"],(function(t){"use strict";var e;return{setters:[function(t){e=t.E}],execute:function(){var n=t("u",(function(t,e){return e.profile_id===(t===null||t===void 0?void 0:t.profile_id)}));var u=t("a",(function(t,u){return n(t,u)&&u.status!==e.COMPLETE&&u.status!==e.DECLINED&&u.status!==e.CANCELED}));var i=function(t){return!["submitted","canceled","declined"].includes(t.status)};var r=t("g",(function(t){return((t===null||t===void 0?void 0:t.recipients)||[]).filter(i)}));var s=t("r",(function(t,e){var n;return t.sequence===((n=e===null||e===void 0?void 0:e[0])===null||n===void 0?void 0:n.sequence)}))}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./p-54498887.system.js"],(function(n){"use strict";var e;return{setters:[function(n){e=n.d}],execute:function(){var t=undefined&&undefined.__awaiter||function(n,e,t,o){function r(n){return n instanceof t?n:new t((function(e){e(n)}))}return new(t||(t=Promise))((function(t,i){function u(n){try{a(o.next(n))}catch(n){i(n)}}function c(n){try{a(o["throw"](n))}catch(n){i(n)}}function a(n){n.done?t(n.value):r(n.value).then(u,c)}a((o=o.apply(n,e||[])).next())}))};var o=undefined&&undefined.__generator||function(n,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,r,i,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(n){return function(e){return a([n,e])}}function a(c){if(o)throw new TypeError("Generator is already executing.");while(u&&(u=0,c[0]&&(t=0)),t)try{if(o=1,r&&(i=c[0]&2?r["return"]:c[0]?r["throw"]||((i=r["return"])&&i.call(r),0):r.next)&&!(i=i.call(r,c[1])).done)return i;if(r=0,i)c=[c[0]&2,i.value];switch(c[0]){case 0:case 1:i=c;break;case 4:t.label++;return{value:c[1],done:false};case 5:t.label++;r=c[1];c=[0];continue;case 7:c=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){t.label=c[1];break}if(c[0]===6&&t.label<i[1]){t.label=i[1];i=c;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(c);break}if(i[2])t.ops.pop();t.trys.pop();continue}c=e.call(n,t)}catch(n){c=[6,n];r=0}finally{o=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var r=n("d",(function(n,r){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,n.api.get("/envelopes/".concat(r.envelopeId,"/recipients/").concat(encodeURIComponent(r.roleId),"/invitation/").concat(r.inviteCode)).then((function(t){var o;var r=((o=t.headers)===null||o===void 0?void 0:o.signer_token)||"";var i=e(r);n.setToken(r);return{recipient:t.data,session:i,signerToken:r}}))]}))}))}));var i=n("g",(function(n,e){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,n.api.get("/envelopes/".concat(e)).then((function(n){return n.data}))]}))}))}));var u=n("c",(function(n,e){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,n.api.put("/envelopes/".concat(e),{action:"cancel"}).then((function(n){return n.data}))]}))}))}));var c=n("a",(function(n,e,r){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,n.api.get("/envelopes/".concat(e,"/envelope_documents/").concat(r,"?file=true"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))}));var a=n("u",(function(n,e,r,i){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,n.api.put("/envelopes/".concat(e,"/fields/").concat(r),i).then((function(n){return n.data}))]}))}))}));var f=n("e",(function(n,e,r,i){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,n.api.put("/envelopes/".concat(e,"/fields/").concat(r,"/signature/").concat(i)).then((function(n){return n.data}))]}))}))}));var d=n("f",(function(n,e,r,i){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,n.api.put("/envelopes/".concat(e,"/fields/").concat(r,"/initial/").concat(i)).then((function(n){return n.data}))]}))}))}));var s=n("b",(function(n,e,r){return t(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,n.api.get("/envelopes/".concat(e,"/fields/").concat(r,"/document"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))}));var v=n("h",(function(n,e,r,i,u){if(u===void 0){u="original"}return t(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,n.api.get("/envelopes/".concat(e,"/envelope_documents/").concat(r,"/pages/").concat(i,"/image?type=").concat(u),{timeout:2e4,"axios-retry":{retries:5}}).then((function(n){return n.data}))]}))}))}));var l={};var p=n("t",(function(n,e){if(l[e]&&l[e].loaded+2e3<(new Date).getTime()){return l[e].envelope}return i(n,e).then((function(n){l[e]={loaded:(new Date).getTime(),envelope:n};return n}))}))}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
System.register(["./p-934a39b4.system.js","./p-5e0c6e7c.system.js"],(function(o){"use strict";var t,e,i,r;return{setters:[function(o){t=o.r;e=o.h;i=o.H},function(o){r=o.c}],execute:function(){var n='verdocs-toolbar-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block}verdocs-toolbar-icon .icon{display:inline-block;cursor:pointer}verdocs-toolbar-icon .icon svg{fill:#5c6575}verdocs-toolbar-icon .tooltip{display:none;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;padding:5px 10px;font-size:13px;position:relative;border-radius:4px;z-index:20000;white-space:nowrap}verdocs-toolbar-icon .tooltip .arrow,verdocs-toolbar-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-toolbar-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-toolbar-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-toolbar-icon .tooltip[data-show]{display:block}verdocs-toolbar-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]{padding:3px 10px}verdocs-toolbar-icon .tooltip[data-popper-placement^=left]>.arrow{right:-1px}';var p=o("verdocs_toolbar_icon",function(){function o(o){t(this,o);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}o.prototype.componentDidLoad=function(){this.popperInstance=r(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};o.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};o.prototype.show=function(){var o,t;(o=this.tooltip)===null||o===void 0?void 0:o.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};o.prototype.hide=function(){var o;(o=this.tooltip)===null||o===void 0?void 0:o.removeAttribute("data-show")};o.prototype.render=function(){var o=this;return e(i,{class:{}},e("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return o.show()},onFocus:function(){return o.show()},onMouseLeave:function(){return o.hide()},onBlur:function(){return o.hide()},ref:function(t){return o.iconEl=t}}),e("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return o.tooltip=t}},this.text,e("div",{"data-popper-arrow":"true",class:"arrow"})))};return o}());p.style=n}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as t,c as i,h as s,H as e,a as h}from"./p-9cf1a627.js";import"./p-05788c2b.js";import{g as a}from"./p-567a6e7c.js";import{V as o}from"./p-ff662b13.js";import{t as r}from"./p-8fb2cf32.js";import"./p-eab67c09.js";import"./p-cf790f4f.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-ab01f71e.js";const d=class{constructor(s){t(this,s),this.pageRendered=i(this,"pageRendered",7),this.endpoint=o.getDefault(),this.templateId="",this.documentId="",this.pageNumber=1,this.virtualWidth=612,this.virtualHeight=792,this.layers=[{name:"page",type:"canvas"}],this.containerId=`verdocs-document-page-${Math.random().toString(36).substring(2,11)}`,this.renderedWidth=this.virtualWidth,this.renderedHeight=this.virtualHeight,this.naturalWidth=this.virtualWidth,this.naturalHeight=this.virtualHeight,this.aspectRatio=this.virtualWidth/this.virtualHeight,this.skipFirstNotification=!0,this.pageDisplayUri=""}async componentWillLoad(){this.pageDisplayUri=await a(this.endpoint,this.templateId,this.documentId,this.pageNumber)}componentDidLoad(){this.resizeObserver=new ResizeObserver(r((t=>{for(const i of t){const t=i.contentRect.width;this.renderedWidth=t,this.renderedHeight=this.virtualHeight*(t/this.virtualWidth)}this.notifyRenderedSize()}),100)),this.resizeObserver.observe(this.container)}disconnectedCallback(){var t;null===(t=this.resizeObserver)||void 0===t||t.disconnect()}notifyRenderedSize(){this.skipFirstNotification?this.skipFirstNotification=!1:this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const t=`${this.renderedHeight}px`;return s(e,{id:`${this.containerId}`,style:{height:t,flex:`0 0 ${t}`}},this.layers.map((i=>"div"===i.type?s("div",{class:"verdocs-template-document-page-layer",id:`${this.containerId}-${i.name}`,style:{height:t}}):this.pageDisplayUri?s("img",{class:"verdocs-template-document-page-layer img",id:`${this.containerId}-${i.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":!0,loading:"lazy",onLoad:t=>{this.naturalWidth=t.target.naturalWidth,this.naturalHeight=t.target.naturalHeight,this.aspectRatio=this.naturalWidth/this.naturalHeight,this.virtualHeight=this.virtualWidth/this.aspectRatio,this.renderedHeight=t.target.offsetWidth/this.aspectRatio}}):s("div",null))))}get container(){return h(this)}};d.style="verdocs-template-document-page{width:100%;position:relative}verdocs-template-document-page .verdocs-template-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}";export{d as verdocs_template_document_page}
|
@@ -1 +0,0 @@
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i["throw"](e))}catch(e){r(e)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next: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(o)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var i=0,n=t.length,r;i<n;i++){if(r||!(i in t)){if(!r)r=Array.prototype.slice.call(t,0,i);r[i]=t[i]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-934a39b4.system.js","./p-54498887.system.js","./p-8229e6df.system.js","./p-365a0216.system.js","./p-a6258dde.system.js","./p-187b20b7.system.js","./p-4ac861c9.system.js","./p-b4d11d90.system.js"],(function(e){"use strict";var t,o,i,n,r,s,a,l,d,c,p;return{setters:[function(e){t=e.r;o=e.h;i=e.H;n=e.c},function(){},function(e){r=e.u;s=e.d},function(e){a=e.V;l=e.T},function(e){d=e.g},function(e){c=e.S},function(e){p=e.u},function(){}],execute:function(){var u='verdocs-radio-button{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:20px;height:20px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border-radius:100%}verdocs-radio-button.disabled{opacity:0.5}verdocs-radio-button input[type=radio]{position:absolute;opacity:0}verdocs-radio-button input[type=radio]+label:before{content:"";background:#f5f5fa;border-radius:100%;border:1px solid rgba(0, 0, 0, 0.6);display:inline-block;width:16px;height:16px;position:absolute;left:1px;top:1px;cursor:pointer;text-align:center;-webkit-transition:all 250ms ease;transition:all 250ms ease}verdocs-radio-button input[type=radio]:checked+label:before{background-color:#55bc81;-webkit-box-shadow:inset 0 0 0 2px #f5f5fa;box-shadow:inset 0 0 0 2px #f5f5fa}verdocs-radio-button input[type=radio]:focus+label:before{outline:none;border-color:#55bc81}verdocs-radio-button input[type=radio]:disabled+label:before{-webkit-box-shadow:inset 0 0 0 4px #f5f5fa;box-shadow:inset 0 0 0 4px #f5f5fa;border-color:#a0a0d0;background:#a0a0d0}verdocs-radio-button input[type=radio]+label:empty:before{margin-right:0}verdocs-radio-button.required input[type=radio]+label:before{border:1px solid #cc0000}verdocs-radio-button.hide{display:none}verdocs-radio-button.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';var f=e("verdocs_radio_button",function(){function e(e){t(this,e);this.checked=false;this.name="";this.value="";this.disabled=false}e.prototype.render=function(){return o(i,{class:{disabled:this.disabled}},o("input",{type:"radio",value:this.value,name:this.name,id:"verdocs-radio-button-".concat(this.name,"-").concat(this.value),checked:this.checked,disabled:this.disabled}),o("label",{htmlFor:"verdocs-radio-button-".concat(this.name,"-").concat(this.value)}))};return e}());f.style=u;var h='verdocs-template-role-properties{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-role-properties .background-overlay{position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-role-properties .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-role-properties .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-role-properties .buttons verdocs-button{margin-left:16px}verdocs-template-role-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-role-properties verdocs-text-input{margin:0 0 10px 0}verdocs-template-role-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-role-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-role-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties verdocs-text-input verdocs-text-input{margin:0}verdocs-template-role-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-role-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;padding:0 6px;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-role-properties .delete-button svg{width:24px;height:24px}verdocs-template-role-properties .delete-button:active{background:#f3f3f3}';var m='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var v=e("verdocs_template_role_properties",function(){function e(e){t(this,e);this.close=n(this,"close",7);this.delete=n(this,"delete",7);this.sdkError=n(this,"sdkError",7);this.store=null;this.endpoint=a.getDefault();this.templateId="";this.roleName="";this.sender=l.EVERYONE;this.dirty=false;this.saving=false;this.name="";this.type="signer";this.fullName="";this.email="";this.phone="";this.allowDelegation=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s,a;var l=this;return __generator(this,(function(p){switch(p.label){case 0:p.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLE_PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLE_PROPERTIES] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,d(this.endpoint,this.templateId,false)];case 1:r.store=p.sent();s=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.roles.find((function(e){return e.name===l.roleName}));if(s){this.name=s.name;this.type=s.type;this.fullName=s.full_name;this.email=s.email;this.phone=s.phone;this.allowDelegation=s.delegator;console.log("[ROLES] Editing role",s)}return[3,3];case 2:a=p.sent();console.log("[TEMPLATE ROLE PROPERTIES] Error with preview session",a);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new c(a.message,(i=a.response)===null||i===void 0?void 0:i.status,(n=a.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,o,i;e.stopPropagation();this.name=(o=(t=this.store)===null||t===void 0?void 0:t.state)===null||o===void 0?void 0:o.name;this.dirty=false;(i=this.close)===null||i===void 0?void 0:i.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();this.saving=true;r(this.endpoint,this.templateId,this.roleName,{name:this.name,type:this.type,full_name:this.fullName,email:this.email,phone:this.phone,delegator:this.allowDelegation}).then((function(e){return __awaiter(t,void 0,void 0,(function(){var t,o;return __generator(this,(function(i){switch(i.label){case 0:console.log("[ROLE_PROPERTIES] Update result",e);this.saving=false;this.dirty=false;o=this;return[4,d(this.endpoint,this.templateId,true)];case 1:o.store=i.sent();(t=this.close)===null||t===void 0?void 0:t.emit();return[2]}}))}))})).catch((function(e){console.log("Update error",e);t.saving=false}));return[2]}))}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this role? All associated fields will be removed as well. This action cannot be undone.")){s(this.endpoint,this.templateId,this.roleName).then((function(e){var o;console.log("Role deleted",e);t.store.state.roles=__spreadArray([],t.store.state.roles.filter((function(e){return e.name!==t.roleName})),true);(o=t.delete)===null||o===void 0?void 0:o.emit({templateId:t.templateId,roleName:t.roleName})})).catch((function(e){console.log("Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t=(this.store.state.fields||[]).findIndex((function(t){return t.role_name===e.roleName}))!==-1;return o(i,null,o("div",{class:"background-overlay",onClick:function(t){return e.handleCancel(t)}},o("div",{class:"dialog"},o("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},o("verdocs-text-input",{id:"verdocs-recipient-name",label:"Role Name",value:this.name,autocomplete:"off",disabled:t,helpText:t?"This role has fields assigned and can no longer be renamed.":"A unique name to identify the role in the workflow. Submitted data will also be tagged with this value.",placeholder:"Template Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}}),o("div",{class:"row"},o("div",{class:"input-label"},"Type:"),o("verdocs-select-input",{value:this.type,options:[{label:"Signer",value:"signer"},{label:"CC",value:"cc"},{label:"Approver",value:"approver"}],onInput:function(t){e.type=t.target.value;e.dirty=true}}),o("verdocs-help-icon",{text:"Most participants are Signers. CC roles are notified when documents are signed, but have no other actions. Approvers get notified when signing is completed to perform a final review."})),o("verdocs-text-input",{id:"verdocs-recipient-email",label:"Full Name",value:this.fullName,autocomplete:"off",helpText:"The recipient's full name, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Full Name...",onInput:function(t){e.fullName=t.target.value;e.dirty=true}}),o("verdocs-text-input",{id:"verdocs-recipient-email",label:"Email",value:this.email,autocomplete:"off",helpText:"The recipient's email address, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Email Address...",onInput:function(t){e.email=t.target.value;e.dirty=true}}),o("verdocs-text-input",{id:"verdocs-recipient-phone",label:"Phone",value:this.phone,autocomplete:"off",helpText:"The recipient's phone number, if it will always stay the same. Leave blank to supply this value later, when each new envelope is created from the template.",placeholder:"Phone Number...",onInput:function(t){e.phone=t.target.value;e.dirty=true}}),o("div",{class:"row"},o("div",{class:"input-label"},"May Delegate:"),o("div",{class:"checkbox-wrapper"},o("verdocs-checkbox",{checked:this.allowDelegation,onInput:function(t){e.allowDelegation=t.target.checked;e.dirty=true}})),o("verdocs-help-icon",{text:"If enabled, this recipient may delegate their actions to another individual."})),o("div",{class:"buttons"},o("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:m}),o("div",{style:{flex:"1"}}),o("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),o("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))))};return e}());v.style=h;var b='verdocs-template-sender{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-sender .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-template-sender .dialog{width:340px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#ffffff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-template-sender .heading{display:-ms-flexbox;display:flex;font-size:20px;font-weight:500;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-sender .buttons verdocs-button{margin-left:16px}verdocs-template-sender .options{row-gap:10px}verdocs-template-sender .options .option{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-sender .options .option .description{margin-left:10px}verdocs-template-sender .options .option .description .name{display:inline-block;vertical-align:top;margin-top:4px;margin-right:4px}';var x=e("verdocs_template_sender",function(){function e(e){t(this,e);this.close=n(this,"close",7);this.sdkError=n(this,"sdkError",7);this.store=null;this.endpoint=a.getDefault();this.templateId="";this.sender=l.EVERYONE;this.saving=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,i,n,r,s;return __generator(this,(function(a){switch(a.label){case 0:a.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[SENDER] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SENDER] Unable to start builder session, must be authenticated");return[2]}r=this;return[4,d(this.endpoint,this.templateId,false)];case 1:r.store=a.sent();this.sender=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.sender;return[3,3];case 2:s=a.sent();console.log("[SENDER] Error with preview session",s);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new c(s.message,(i=s.response)===null||i===void 0?void 0:i.status,(n=s.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleClose=function(){this.close.emit()};e.prototype.handleDismiss=function(e){if(e.target.className==="background-overlay"){e.preventDefault();this.handleClose()}};e.prototype.handleSelectSetting=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){this.saving=true;p(this.endpoint,this.templateId,{sender:e}).then((function(o){var i;console.log("Update result",o);if((i=t.store)===null||i===void 0?void 0:i.state){t.store.state.sender=e}t.saving=false;t.sender=e})).catch((function(e){console.log("Error saving",e);t.saving=false}));return[2]}))}))};e.prototype.render=function(){var e=this;return o(i,null,o("div",{class:"background-overlay",onClick:function(t){return e.handleDismiss(t)}},o("div",{class:"dialog"},o("div",{class:"options"},o("div",{class:"option"},o("verdocs-radio-button",{name:"template-sender",value:l.EVERYONE,checked:this.sender===l.EVERYONE,onInput:function(){return e.handleSelectSetting(l.EVERYONE)}}),o("div",{class:"description"},o("div",{class:"name"},"Anyone on the Web"),o("verdocs-help-icon",{text:"Anyone can use this template. (Make its visibility is set to to 'Public' or 'Shared'.)"}))),o("div",{class:"option"},o("verdocs-radio-button",{name:"template-sender",value:l.EVERYONE_AS_CREATOR,checked:this.sender===l.EVERYONE_AS_CREATOR,onInput:function(){return e.handleSelectSetting(l.EVERYONE_AS_CREATOR)}}),o("div",{class:"description"},o("div",{class:"name"},"Anyone on the Web as me"),o("verdocs-help-icon",{text:"Anyone can use this template on my behalf. (Make sure its visibility is set to 'Public' or 'Shared'.)"}))),o("div",{class:"option"},o("verdocs-radio-button",{name:"template-sender",value:l.ORGANIZATION_MEMBER,checked:this.sender===l.ORGANIZATION_MEMBER,onInput:function(){return e.handleSelectSetting(l.ORGANIZATION_MEMBER)}}),o("div",{class:"description"},o("div",{class:"name"},"Anyone in my organization"),o("verdocs-help-icon",{text:"Anyone in my organization can use this template. (Make sure its visibility is set to 'Shared')"}))),o("div",{class:"option"},o("verdocs-radio-button",{name:"template-sender",value:l.ORGANIZATION_MEMBER_AS_CREATOR,checked:this.sender===l.ORGANIZATION_MEMBER_AS_CREATOR,onInput:function(){return e.handleSelectSetting(l.ORGANIZATION_MEMBER_AS_CREATOR)}}),o("div",{class:"description"},o("div",{class:"name"},"Anyone in my organization as me"),o("verdocs-help-icon",{text:"Anyone in my organization can use this template on my behalf. (Make sure its visibility is set to to 'Shared'.)"}))),o("div",{class:"option"},o("verdocs-radio-button",{name:"template-sender",value:l.CREATOR,checked:this.sender===l.CREATOR,onInput:function(){return e.handleSelectSetting(l.CREATOR)}}),o("div",{class:"description"},o("div",{class:"name"},"Me"),o("verdocs-help-icon",{text:"Only I can use this template."})))),o("div",{class:"buttons"},o("verdocs-button",{label:"Close",onClick:function(){return e.handleClose()}})))))};return e}());x.style=b}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
function t(t){if(null===t||!0===t||!1===t)return NaN;var n=Number(t);return isNaN(n)?n:n<0?Math.ceil(n):Math.floor(n)}function n(t,n){if(n.length<t)throw new TypeError(t+" argument"+(t>1?"s":"")+" required, but only "+n.length+" present")}function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function r(t){n(1,arguments);var r=Object.prototype.toString.call(t);return t instanceof Date||"object"===e(t)&&"[object Date]"===r?new Date(t.getTime()):"number"==typeof t||"[object Number]"===r?new Date(t):("string"!=typeof t&&"[object String]"!==r||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function a(e,a){n(2,arguments);var i=r(e).getTime(),o=t(a);return new Date(i+o)}var i={};function o(){return i}function u(t){var n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),t.getTime()-n.getTime()}function c(t){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t){return n(1,arguments),t instanceof Date||"object"===c(t)&&"[object Date]"===Object.prototype.toString.call(t)}function s(t){if(n(1,arguments),!d(t)&&"number"!=typeof t)return!1;var e=r(t);return!isNaN(Number(e))}function f(e,r){n(2,arguments);var i=t(r);return a(e,-i)}function l(t){n(1,arguments);var e=1,a=r(t),i=a.getUTCDay(),o=(i<e?7:0)+i-e;return a.setUTCDate(a.getUTCDate()-o),a.setUTCHours(0,0,0,0),a}function h(t){n(1,arguments);var e=r(t),a=e.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(a+1,0,4),i.setUTCHours(0,0,0,0);var o=l(i),u=new Date(0);u.setUTCFullYear(a,0,4),u.setUTCHours(0,0,0,0);var c=l(u);return e.getTime()>=o.getTime()?a+1:e.getTime()>=c.getTime()?a:a-1}function m(t){n(1,arguments);var e=h(t),r=new Date(0);r.setUTCFullYear(e,0,4),r.setUTCHours(0,0,0,0);var a=l(r);return a}function v(e,a){var i,u,c,d,s,f,l,h;n(1,arguments);var m=o(),v=t(null!==(i=null!==(u=null!==(c=null!==(d=null==a?void 0:a.weekStartsOn)&&void 0!==d?d:null==a||null===(s=a.locale)||void 0===s||null===(f=s.options)||void 0===f?void 0:f.weekStartsOn)&&void 0!==c?c:m.weekStartsOn)&&void 0!==u?u:null===(l=m.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==i?i:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var w=r(e),g=w.getUTCDay(),b=(g<v?7:0)+g-v;return w.setUTCDate(w.getUTCDate()-b),w.setUTCHours(0,0,0,0),w}function w(e,a){var i,u,c,d,s,f,l,h;n(1,arguments);var m=r(e),w=m.getUTCFullYear(),g=o(),b=t(null!==(i=null!==(u=null!==(c=null!==(d=null==a?void 0:a.firstWeekContainsDate)&&void 0!==d?d:null==a||null===(s=a.locale)||void 0===s||null===(f=s.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==c?c:g.firstWeekContainsDate)&&void 0!==u?u:null===(l=g.locale)||void 0===l||null===(h=l.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==i?i:1);if(!(b>=1&&b<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(w+1,0,b),y.setUTCHours(0,0,0,0);var p=v(y,a),M=new Date(0);M.setUTCFullYear(w,0,b),M.setUTCHours(0,0,0,0);var x=v(M,a);return m.getTime()>=p.getTime()?w+1:m.getTime()>=x.getTime()?w:w-1}function g(e,r){var a,i,u,c,d,s,f,l;n(1,arguments);var h=o(),m=t(null!==(a=null!==(i=null!==(u=null!==(c=null==r?void 0:r.firstWeekContainsDate)&&void 0!==c?c:null==r||null===(d=r.locale)||void 0===d||null===(s=d.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==u?u:h.firstWeekContainsDate)&&void 0!==i?i:null===(f=h.locale)||void 0===f||null===(l=f.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==a?a:1),g=w(e,r),b=new Date(0);b.setUTCFullYear(g,0,m),b.setUTCHours(0,0,0,0);var y=v(b,r);return y}function b(t,n){for(var e=t<0?"-":"",r=Math.abs(t).toString();r.length<n;)r="0"+r;return e+r}var y={G:function(t,n,e){var r=t.getUTCFullYear()>0?1:0;switch(n){case"G":case"GG":case"GGG":return e.era(r,{width:"abbreviated"});case"GGGGG":return e.era(r,{width:"narrow"});case"GGGG":default:return e.era(r,{width:"wide"})}},y:function(t,n,e){if("yo"===n){var r=t.getUTCFullYear();return e.ordinalNumber(r>0?r:1-r,{unit:"year"})}return function(t,n){var e=t.getUTCFullYear(),r=e>0?e:1-e;return b("yy"===n?r%100:r,n.length)}(t,n)},Y:function(t,n,e,r){var a=w(t,r),i=a>0?a:1-a;return"YY"===n?b(i%100,2):"Yo"===n?e.ordinalNumber(i,{unit:"year"}):b(i,n.length)},R:function(t,n){return b(h(t),n.length)},u:function(t,n){return b(t.getUTCFullYear(),n.length)},Q:function(t,n,e){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"Q":return String(r);case"QQ":return b(r,2);case"Qo":return e.ordinalNumber(r,{unit:"quarter"});case"QQQ":return e.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,n,e){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(n){case"q":return String(r);case"qq":return b(r,2);case"qo":return e.ordinalNumber(r,{unit:"quarter"});case"qqq":return e.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,n,e){var r=t.getUTCMonth();switch(n){case"M":case"MM":return function(t,n){var e=t.getUTCMonth();return"M"===n?String(e+1):b(e+1,2)}(t,n);case"Mo":return e.ordinalNumber(r+1,{unit:"month"});case"MMM":return e.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(r,{width:"wide",context:"formatting"})}},L:function(t,n,e){var r=t.getUTCMonth();switch(n){case"L":return String(r+1);case"LL":return b(r+1,2);case"Lo":return e.ordinalNumber(r+1,{unit:"month"});case"LLL":return e.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,a,i){var o=function(t,e){n(1,arguments);var a=r(t),i=v(a,e).getTime()-g(a,e).getTime();return Math.round(i/6048e5)+1}(t,i);return"wo"===e?a.ordinalNumber(o,{unit:"week"}):b(o,e.length)},I:function(t,e,a){var i=function(t){n(1,arguments);var e=r(t),a=l(e).getTime()-m(e).getTime();return Math.round(a/6048e5)+1}(t);return"Io"===e?a.ordinalNumber(i,{unit:"week"}):b(i,e.length)},d:function(t,n,e){return"do"===n?e.ordinalNumber(t.getUTCDate(),{unit:"date"}):function(t,n){return b(t.getUTCDate(),n.length)}(t,n)},D:function(t,e,a){var i=function(t){n(1,arguments);var e=r(t),a=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var i=e.getTime();return Math.floor((a-i)/864e5)+1}(t);return"Do"===e?a.ordinalNumber(i,{unit:"dayOfYear"}):b(i,e.length)},E:function(t,n,e){var r=t.getUTCDay();switch(n){case"E":case"EE":case"EEE":return e.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(r,{width:"short",context:"formatting"});case"EEEE":default:return e.day(r,{width:"wide",context:"formatting"})}},e:function(t,n,e,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(n){case"e":return String(i);case"ee":return b(i,2);case"eo":return e.ordinalNumber(i,{unit:"day"});case"eee":return e.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(a,{width:"short",context:"formatting"});case"eeee":default:return e.day(a,{width:"wide",context:"formatting"})}},c:function(t,n,e,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(n){case"c":return String(i);case"cc":return b(i,n.length);case"co":return e.ordinalNumber(i,{unit:"day"});case"ccc":return e.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(a,{width:"narrow",context:"standalone"});case"cccccc":return e.day(a,{width:"short",context:"standalone"});case"cccc":default:return e.day(a,{width:"wide",context:"standalone"})}},i:function(t,n,e){var r=t.getUTCDay(),a=0===r?7:r;switch(n){case"i":return String(a);case"ii":return b(a,n.length);case"io":return e.ordinalNumber(a,{unit:"day"});case"iii":return e.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(r,{width:"short",context:"formatting"});case"iiii":default:return e.day(r,{width:"wide",context:"formatting"})}},a:function(t,n,e){var r=t.getUTCHours()/12>=1?"pm":"am";switch(n){case"a":case"aa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,n,e){var r,a=t.getUTCHours();switch(r=12===a?"noon":0===a?"midnight":a/12>=1?"pm":"am",n){case"b":case"bb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,n,e){var r,a=t.getUTCHours();switch(r=a>=17?"evening":a>=12?"afternoon":a>=4?"morning":"night",n){case"B":case"BB":case"BBB":return e.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,n,e){if("ho"===n){var r=t.getUTCHours()%12;return 0===r&&(r=12),e.ordinalNumber(r,{unit:"hour"})}return function(t,n){return b(t.getUTCHours()%12||12,n.length)}(t,n)},H:function(t,n,e){return"Ho"===n?e.ordinalNumber(t.getUTCHours(),{unit:"hour"}):function(t,n){return b(t.getUTCHours(),n.length)}(t,n)},K:function(t,n,e){var r=t.getUTCHours()%12;return"Ko"===n?e.ordinalNumber(r,{unit:"hour"}):b(r,n.length)},k:function(t,n,e){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===n?e.ordinalNumber(r,{unit:"hour"}):b(r,n.length)},m:function(t,n,e){return"mo"===n?e.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):function(t,n){return b(t.getUTCMinutes(),n.length)}(t,n)},s:function(t,n,e){return"so"===n?e.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):function(t,n){return b(t.getUTCSeconds(),n.length)}(t,n)},S:function(t,n){return function(t,n){var e=n.length,r=t.getUTCMilliseconds();return b(Math.floor(r*Math.pow(10,e-3)),n.length)}(t,n)},X:function(t,n,e,r){var a=(r._originalDate||t).getTimezoneOffset();if(0===a)return"Z";switch(n){case"X":return M(a);case"XXXX":case"XX":return x(a);case"XXXXX":case"XXX":default:return x(a,":")}},x:function(t,n,e,r){var a=(r._originalDate||t).getTimezoneOffset();switch(n){case"x":return M(a);case"xxxx":case"xx":return x(a);case"xxxxx":case"xxx":default:return x(a,":")}},O:function(t,n,e,r){var a=(r._originalDate||t).getTimezoneOffset();switch(n){case"O":case"OO":case"OOO":return"GMT"+p(a,":");case"OOOO":default:return"GMT"+x(a,":")}},z:function(t,n,e,r){var a=(r._originalDate||t).getTimezoneOffset();switch(n){case"z":case"zz":case"zzz":return"GMT"+p(a,":");case"zzzz":default:return"GMT"+x(a,":")}},t:function(t,n,e,r){return b(Math.floor((r._originalDate||t).getTime()/1e3),n.length)},T:function(t,n,e,r){return b((r._originalDate||t).getTime(),n.length)}};function p(t,n){var e=t>0?"-":"+",r=Math.abs(t),a=Math.floor(r/60),i=r%60;if(0===i)return e+String(a);var o=n||"";return e+String(a)+o+b(i,2)}function M(t,n){return t%60==0?(t>0?"-":"+")+b(Math.abs(t)/60,2):x(t,n)}function x(t,n){var e=n||"",r=t>0?"-":"+",a=Math.abs(t);return r+b(Math.floor(a/60),2)+e+b(a%60,2)}var S=function(t,n){switch(t){case"P":return n.date({width:"short"});case"PP":return n.date({width:"medium"});case"PPP":return n.date({width:"long"});case"PPPP":default:return n.date({width:"full"})}},P=function(t,n){switch(t){case"p":return n.time({width:"short"});case"pp":return n.time({width:"medium"});case"ppp":return n.time({width:"long"});case"pppp":default:return n.time({width:"full"})}},D={p:P,P:function(t,n){var e,r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return S(t,n);switch(a){case"P":e=n.dateTime({width:"short"});break;case"PP":e=n.dateTime({width:"medium"});break;case"PPP":e=n.dateTime({width:"long"});break;case"PPPP":default:e=n.dateTime({width:"full"})}return e.replace("{{date}}",S(a,n)).replace("{{time}}",P(i,n))}},E=["D","DD"],k=["YY","YYYY"];function W(t){return-1!==E.indexOf(t)}function q(t){return-1!==k.indexOf(t)}function Y(t,n,e){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(n,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(n,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(n,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(n,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var X={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function O(t){return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=n.width?String(n.width):t.defaultWidth,r=t.formats[e]||t.formats[t.defaultWidth];return r}}var Q={date:O({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:O({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:O({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},j={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function G(t){return function(n,e){var r;if("formatting"===(null!=e&&e.context?String(e.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,i=null!=e&&e.width?String(e.width):a;r=t.formattingValues[i]||t.formattingValues[a]}else{var o=t.defaultWidth,u=null!=e&&e.width?String(e.width):t.defaultWidth;r=t.values[u]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(n):n]}}function T(t){return function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=n.match(a);if(!i)return null;var o,u=i[0],c=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(c)?z(c,(function(t){return t.test(u)})):L(c,(function(t){return t.test(u)}));o=t.valueCallback?t.valueCallback(d):d,o=e.valueCallback?e.valueCallback(o):o;var s=n.slice(u.length);return{value:o,rest:s}}}function L(t,n){for(var e in t)if(t.hasOwnProperty(e)&&n(t[e]))return e}function z(t,n){for(var e=0;e<t.length;e++)if(n(t[e]))return e}var B,N={code:"en-US",formatDistance:function(t,n,e){var r,a=X[t];return r="string"==typeof a?a:1===n?a.one:a.other.replace("{{count}}",n.toString()),null!=e&&e.addSuffix?e.comparison&&e.comparison>0?"in "+r:r+" ago":r},formatLong:Q,formatRelative:function(t){return j[t]},localize:{ordinalNumber:function(t){var n=Number(t),e=n%100;if(e>20||e<10)switch(e%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:G({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:G({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:G({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:G({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:G({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(B={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:function(t){return parseInt(t,10)}},function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=t.match(B.matchPattern);if(!e)return null;var r=e[0],a=t.match(B.parsePattern);if(!a)return null;var i=B.valueCallback?B.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;var o=t.slice(r.length);return{value:i,rest:o}}),era:T({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:T({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:T({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:T({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:T({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}},A=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,R=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,C=/^'([^]*?)'?$/,F=/''/g,J=/[a-zA-Z]/;function I(e,a,i){var c,d,l,h,m,v,w,g,b,p,M,x,S,P,E,k,X,O;n(2,arguments);var Q=String(a),j=o(),G=null!==(c=null!==(d=null==i?void 0:i.locale)&&void 0!==d?d:j.locale)&&void 0!==c?c:N,T=t(null!==(l=null!==(h=null!==(m=null!==(v=null==i?void 0:i.firstWeekContainsDate)&&void 0!==v?v:null==i||null===(w=i.locale)||void 0===w||null===(g=w.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==m?m:j.firstWeekContainsDate)&&void 0!==h?h:null===(b=j.locale)||void 0===b||null===(p=b.options)||void 0===p?void 0:p.firstWeekContainsDate)&&void 0!==l?l:1);if(!(T>=1&&T<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var L=t(null!==(M=null!==(x=null!==(S=null!==(P=null==i?void 0:i.weekStartsOn)&&void 0!==P?P:null==i||null===(E=i.locale)||void 0===E||null===(k=E.options)||void 0===k?void 0:k.weekStartsOn)&&void 0!==S?S:j.weekStartsOn)&&void 0!==x?x:null===(X=j.locale)||void 0===X||null===(O=X.options)||void 0===O?void 0:O.weekStartsOn)&&void 0!==M?M:0);if(!(L>=0&&L<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!G.localize)throw new RangeError("locale must contain localize property");if(!G.formatLong)throw new RangeError("locale must contain formatLong property");var z=r(e);if(!s(z))throw new RangeError("Invalid time value");var B=u(z),C=f(z,B),F={firstWeekContainsDate:T,weekStartsOn:L,locale:G,_originalDate:z},I=Q.match(R).map((function(t){var n=t[0];return"p"===n||"P"===n?(0,D[n])(t,G.formatLong):t})).join("").match(A).map((function(t){if("''"===t)return"'";var n=t[0];if("'"===n)return H(t);var r=y[n];if(r)return null!=i&&i.useAdditionalWeekYearTokens||!q(t)||Y(t,a,String(e)),null!=i&&i.useAdditionalDayOfYearTokens||!W(t)||Y(t,a,String(e)),r(C,t,G.localize,F);if(n.match(J))throw new RangeError("Format string contains an unescaped latin alphabet character `"+n+"`");return t})).join("");return I}function H(t){var n=t.match(C);return n?n[1].replace(F,"'"):t}export{I as f}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{r as e,c as t,h as i,H as o,F as s,a as l}from"./p-9cf1a627.js";import"./p-05788c2b.js";import{c as a,d as r}from"./p-567a6e7c.js";import{V as n,T as d}from"./p-ff662b13.js";import{D as c,P as p,J as h,a as m,F as v,b as g,T as f}from"./p-637fee9b.js";import{g as u,a as x}from"./p-3ea489e9.js";import{S as w}from"./p-7a1b2643.js";import{c as b}from"./p-822ba467.js";import{i as y}from"./p-0d28cf05.js";import{u as q,c as C}from"./p-feb442b1.js";import{i as k}from"./p-7291906c.js";import{a as E,r as M,c as Z,d as H,e as z}from"./p-8fb2cf32.js";import{u as L,c as S}from"./p-8027431e.js";import{g as V}from"./p-6de76553.js";import"./p-790beec1.js";import"./p-eab67c09.js";import"./p-cf790f4f.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-ab01f71e.js";const T=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.templateUpdate=t(this,"templateUpdate",7),this.sdkError=t(this,"sdkError",7),this.endpoint=n.getDefault(),this.templateId="",this.uploading=!1,this.progressLabel="Uploading...",this.progressPercent=0,this.showDeleteError=!1,this.confirmDeleteDocument=null,this.store=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await u(this.endpoint,this.templateId,!1)}catch(o){console.log("[TEMPLATE ATTACHMENTS] Error loading template",o),null===(e=this.sdkError)||void 0===e||e.emit(new w(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}}handleCancel(e){e.stopPropagation(),this.exit.emit()}handleUploadProgress(e){e>=99?(this.progressPercent=100,this.progressLabel="Processing..."):this.progressPercent=e}async handleUpload(e){var t,i,o;e.stopPropagation();const s=e.detail.file;if(s){console.log("[ATTACHMENTS] Uploading...",s),this.uploading=!0,this.progressLabel="Uploading...";try{const e=await a(this.endpoint,this.templateId,s,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e),this.store=await u(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] New template",this.store.state),this.uploading=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e),null===(t=this.sdkError)||void 0===t||t.emit(new w(e.message,null===(i=e.response)||void 0===i?void 0:i.status,null===(o=e.response)||void 0===o?void 0:o.data)),this.uploading=!1}}}handleNext(e){var t;e.stopPropagation(),this.uploading=!1,this.progressLabel="",this.progressPercent=0,null===(t=this.next)||void 0===t||t.emit({template:this.store.state})}async confirmDelete(){await r(this.endpoint,this.templateId,this.confirmDeleteDocument.id),this.store=await u(this.endpoint,this.templateId,!0),console.log("[ATTACHMENTS] New template",this.store.state),this.confirmDeleteDocument=null}async handleDelete(e){var t;(null===(t=this.store.state)||void 0===t?void 0:t.template_documents.length)>1?this.confirmDeleteDocument=e:this.showDeleteError=!0}getFileIcon(e){switch(e.mime){case"application/pdf":return m;case"image/jpeg":return h;case"image/png":return p;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return c}return v}render(){var e,t,s;if(!this.endpoint.session)return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));const l=null===(e=this.store)||void 0===e?void 0:e.state;return l.isLoaded?this.endpoint.session&&l.profile_id?i(o,null,i("h5",null,"Existing Attachments"),i("div",{class:"attachments"},null===(t=this.store)||void 0===t?void 0:t.state.template_documents.map((e=>i("div",{class:"attachment"},i("div",{class:"file-icon",innerHTML:this.getFileIcon(e)}),i("div",{class:"filename",title:e.name},e.name),i("div",{class:"pages"},i("div",{class:"count"},e.page_numbers),i("div",{class:"pages-icon",innerHTML:g})),i("div",{class:"trash-icon",innerHTML:f,onClick:()=>this.handleDelete(e)}))))),i("h5",null,"Attach a New Document"),this.uploading?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("verdocs-file-chooser",{onFileSelected:e=>this.handleUpload(e)}),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.uploading}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleNext(e),disabled:!(null===(s=this.store)||void 0===s?void 0:s.state.template_documents.length)||this.uploading})),this.showDeleteError&&i("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:()=>this.showDeleteError=!1}),this.confirmDeleteDocument&&i("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:()=>this.confirmDelete(),showCancel:!0,onExit:()=>{this.confirmDeleteDocument=null}})):i(o,{class:"empty"}):i(o,{class:"loading"},i("verdocs-loader",null))}};T.style='verdocs-template-attachments{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}';const D=class{constructor(i){e(this,i),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.endpoint=n.getDefault(),this.file=void 0,this.creating=!1,this.progressLabel="Uploading...",this.progressPercent=0}componentWillLoad(){this.endpoint.setTimeout(3e4),this.endpoint.loadSession()}handleFileChanged(e){var t;this.file=(null===(t=e.target.files)||void 0===t?void 0:t[0])||null,console.log("[CREATE] Selected file",this.file)}handleUpload(e){e.stopPropagation(),document.getElementById("verdocs-template-create-file").click()}handleCancel(e){e.stopPropagation(),this.exit.emit()}async handleSubmit(e){var t,i,o,s;if(e.stopPropagation(),console.log("Submitting"),this.file){this.creating=!0,this.progressLabel="Uploading...";try{const e=await b(this.endpoint,{name:this.file.name,documents:[this.file]},(e=>{e>=99?(this.progressLabel="Processing...",this.progressPercent=100):this.progressPercent=e}));console.log("[CREATE] Created template",e),null===(t=this.next)||void 0===t||t.emit(e),this.creating=!1,this.progressLabel="",this.progressPercent=0}catch(e){console.log("[CREATE] Error creating template",e),null===(i=this.sdkError)||void 0===i||i.emit(new w(e.message,null===(o=e.response)||void 0===o?void 0:o.status,null===(s=e.response)||void 0===s?void 0:s.data)),this.creating=!1}}}render(){return i(o,null,this.endpoint.session?i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("input",{type:"file",id:"verdocs-template-create-file",multiple:!0,accept:"application/pdf",style:{display:"none"},onChange:e=>this.handleFileChanged(e)}),this.creating?i("div",{class:"loader-wrapper"},i("verdocs-loader",null),this.progressLabel&&i("div",{class:"progress-wrapper"},i("verdocs-progress-bar",{showPercent:!0,percent:this.progressPercent,label:this.progressLabel}))):i("div",{class:"upload-box",onDrop:e=>{e.preventDefault(),e.target.classList.remove("drag-over"),this.file=e.dataTransfer.files[0]},onDragOver:e=>{e.preventDefault(),e.dataTransfer.dropEffect="copy"},onDragEnter:e=>e.target.classList.add("drag-over"),onDragLeave:e=>e.target.classList.remove("drag-over")},i("div",null,i("span",{innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>'})),i("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),i("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?" ":"Or, if you prefer..."),i("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:e=>this.handleUpload(e)})),i("div",{class:"buttons"},i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.creating}),i("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleSubmit(e),disabled:!this.file||this.creating}))):i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};D.style='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box.drag-over{border:2px solid #4c56cb}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .progress-wrapper{padding:20px}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';const R='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>',I=[{id:"signature",tooltip:"Signature",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>'},{id:"initial",tooltip:"Initials",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>'},{id:"sep1",tooltip:"",icon:R},{id:"textbox",tooltip:"Text Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>'},{id:"textarea",tooltip:"Text Area",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>'},{id:"checkbox_group",tooltip:"Check Box",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>'},{id:"radio_button_group",tooltip:"Radio Button",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>'},{id:"dropdown",tooltip:"Dropdown",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>'},{id:"sep2",tooltip:"",icon:R},{id:"date",tooltip:"Date",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>'},{id:"timestamp",tooltip:"Timestamp",icon:'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z"></path></svg>'}],_=class{constructor(i){e(this,i),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.pageHeights={},this.store=null,this.cachedPageInfo={},this.endpoint=n.getDefault(),this.templateId=null,this.toolbarTargetId=null,this.placing=null,this.showMustSelectRole=!1,this.selectedRoleName="",this.rerender=1}async componentWillLoad(){var e,t,i,o,s,l,a;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[FIELDS] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[FIELDS] Unable to start builder session, must be authenticated");this.store=await u(this.endpoint,this.templateId,!0),console.log(`[FIELDS] Loaded template ${this.templateId}`,this.store.state),this.selectedRoleName=(null===(o=null===(i=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||void 0===i?void 0:i[0])||void 0===o?void 0:o.name)||"",console.log("[FIELDS] Starting with role",this.selectedRoleName)}catch(e){console.log("[FIELDS] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new w(e.message,null===(l=e.response)||void 0===l?void 0:l.status,null===(a=e.response)||void 0===a?void 0:a.data))}}componentDidRender(){y.dynamicDrop(!0);const e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null,t=document.getElementById("verdocs-template-fields-toolbar");e&&t&&(console.log("[FIELDS] Moving toolbar"),t.remove(),e.append(t))}componentWillUpdate(){var e,t,i,o,s,l;this.selectedRoleName&&((null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles)||[]).find((e=>e.name===this.selectedRoleName))||(this.selectedRoleName=(null===(l=null===(s=null===(o=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===o?void 0:o.roles)||void 0===s?void 0:s[0])||void 0===l?void 0:l.name)||"",console.log("[FIELDS] Selected new role",this.selectedRoleName))}handleKeyDown(e){"Escape"===e.key&&(this.placing=null)}async handleFieldChange(e,t,i){console.log("[FIELDS] handleFieldChange",e,t,i),this.rerender++}attachFieldAttributes(e,t,i,o){o.addEventListener("input",(e=>this.handleFieldChange(t,e))),o.addEventListener("settingsChanged",(s=>{var l,a,r,n;console.log("[FIELDS] settingsChanged",s.detail),Object.assign(t.setting,s.detail.settings),this.selectedRoleName=t.role_name,o.setAttribute("roleindex",E(x(this.store),t.role_name)),o.field=null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.fields.find((e=>e.name===t.name)),this.rerender++,o.setAttribute("rerender",this.rerender),null===(r=this.templateUpdated)||void 0===r||r.emit({endpoint:this.endpoint,template:null===(n=this.store)||void 0===n?void 0:n.state,event:"updated-field"}),console.log("[FIELDS] Re-rendering field",t.name,e.pageNumber),this.reRenderField(t,e.pageNumber),M(t,e,i,{disabled:!0,editable:!0,draggable:!0})})),o.addEventListener("deleted",(()=>{var e,i;console.log("deleted",this,t),o.remove(),this.rerender++,null===(e=this.templateUpdated)||void 0===e||e.emit({endpoint:this.endpoint,template:null===(i=this.store)||void 0===i?void 0:i.state,event:"updated-field"})})),o.setAttribute("templateid",this.templateId),o.setAttribute("roleindex",i),o.setAttribute("pageNumber",e.pageNumber),o.setAttribute("xScale",e.xScale),o.setAttribute("yScale",e.yScale),o.setAttribute("name",t.name)}handlePageRendered(e){var t;const i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i),this.cachedPageInfo[i.pageNumber]=i,this.pageHeights[i.pageNumber]=i.naturalHeight,(null===(t=this.store)||void 0===t?void 0:t.state.fields.filter((e=>e.page_sequence===i.pageNumber))).forEach((e=>this.reRenderField(e,i.pageNumber)))}reRenderField(e,t){const i=this.cachedPageInfo[t],o=E(x(this.store),e.role_name),s=M(e,i,o,{disabled:!0,editable:!0,draggable:!0});s&&(Array.isArray(s)?s.forEach((t=>{this.attachFieldAttributes(i,e,o,t),y(t).draggable({listeners:{start(e){console.log("[FIELDS] Drag started",e.type,e.target)},move(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),o=+(e.target.getAttribute("xScale")||1),s=+(e.target.getAttribute("yScale")||1),l=e.dx/o+t,a=e.dy/s+i;e.target.setAttribute("posX",l),e.target.setAttribute("posy",a),Z(e.target,"translate",`${l}px, ${a}px`)},end:this.handleMoveField.bind(this)}})})):(this.attachFieldAttributes(i,e,o,s),y(s).draggable({listeners:{start(e){console.log("[FIELDS] Drag started",e.type,e.target)},move(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),o=+(e.target.getAttribute("xScale")||1),s=+(e.target.getAttribute("yScale")||1),l=e.dx/o+t,a=e.dy/s+i;e.target.setAttribute("posX",l),e.target.setAttribute("posy",a),Z(e.target,"translate",`${l}px, ${a}px`)},end:this.handleMoveField.bind(this)}})))}async handleMoveField(e){var t;const i=e.target.getAttribute("pageNumber"),{naturalWidth:o=612,naturalHeight:s=792,renderedHeight:l=792}=this.cachedPageInfo[i];console.log("[FIELDS] Drag ended",i,e.target);const a=e.target.getBoundingClientRect(),r=e.target.parentElement.getBoundingClientRect(),n=Math.max(a.left-r.left,0),d=Math.max(l-(r.bottom-a.bottom),0),{x:c,y:p}=this.viewCoordinatesToPageCoordinates(n,d,i,o-e.rect.width,s-e.rect.height),h=e.target.getAttribute("name"),m=+(e.target.getAttribute("option")||"0"),v=null===(t=this.store)||void 0===t?void 0:t.state.fields.find((e=>e.name===h));if(console.log("Will update",h,m,v),v){switch(v.type){case"attachment":case"payment":case"initial":case"signature":case"date":case"dropdown":case"textarea":case"textbox":case"timestamp":v.setting.x=c,v.setting.y=p;break;case"checkbox_group":case"radio_button_group":{const e=v.setting.options[m];e&&(e.x=c,e.y=p)}}await q(this.endpoint,this.templateId,h,v),this.handlePageRendered({detail:this.cachedPageInfo[i]})}}generateFieldName(e,t){var i,o;let s,l=1;do{s=`${e}P${t}-${l}`,console.log("testing field",s),l++}while(null===(i=this.store)||void 0===i?void 0:i.state.fields.some((e=>e.name===s)));return console.log("Will use field name",this,s,null===(o=this.store)||void 0===o?void 0:o.state.fields),s}viewCoordinatesToPageCoordinates(e,t,i,o,s){const{xScale:l=1,yScale:a=1,renderedHeight:r=792}=this.cachedPageInfo[i];return{x:Math.floor(Math.min(e/l,o)),y:Math.floor(Math.min(Math.max(r-t,0)/a,s))}}async handleClickPage(e,t){var i,o,s;if(this.placing){console.log("Placing field",this,this.selectedRoleName,this.placing,t,e.offsetX,e.offsetY);const l=e.offsetX,a=e.offsetY,r=H(this.placing),n=z(this.placing),d=this.cachedPageInfo[t],{naturalWidth:c=612,naturalHeight:p=792}=d,h=this.viewCoordinatesToPageCoordinates(l,a,t,c-r,p-n),m=Math.floor(h.x),v=Math.floor(h.y),g={name:this.generateFieldName(this.placing,t),role_name:this.selectedRoleName,template_id:this.templateId,document_id:d.documentId,type:this.placing,required:!0,page_sequence:t,validator:null,setting:{x:m,y:v},x:m,y:v,tabindex:0,width:r,height:n};switch(g.type){case"attachment":case"payment":g.setting={x:m,y:v};break;case"initial":case"signature":g.setting={x:m,y:v,result:""};break;case"checkbox_group":g.setting={minimum_checked:0,maximum_checked:1e3,options:[{id:`${g.name}-1`,value:"Option 1",checked:!1,x:m,y:v}]};break;case"date":g.setting={x:m,y:v,width:r,height:n,result:""};break;case"dropdown":g.required=!1,g.setting={x:m,y:v,width:r,height:n,value:null,placeholder:"Choose",options:[{id:"option-1",value:"Option 1"}]};break;case"radio_button_group":g.setting={options:[{id:`${g.name}-1`,value:"Option 1",selected:!1,x:m,y:v}]};break;case"textarea":case"textbox":g.setting={x:m,y:v,width:r,height:n,result:"",leading:0,alignment:0,upperCase:!1};break;case"timestamp":g.setting={x:m,y:v,width:r,height:n}}"textarea"===g.type&&(g.setting.leading=16,g.type="textbox");const f=await C(this.endpoint,this.templateId,g);console.log("Saved field",f),this.store.state&&(this.store.state.fields=[...null===(i=this.store)||void 0===i?void 0:i.state.fields,f]),this.placing=null,null===(o=this.templateUpdated)||void 0===o||o.emit({endpoint:this.endpoint,template:null===(s=this.store)||void 0===s?void 0:s.state,event:"added-field"}),this.handlePageRendered({detail:this.cachedPageInfo[t]})}}render(){var e,t,s,l,a,r,n,d;if(console.log("[FIELDS] Rendering",this.selectedRoleName),!this.endpoint.session)return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(!(null===(e=this.store)||void 0===e?void 0:e.state.isLoaded))return i(o,null,i("verdocs-loader",null));const c=null===(s=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===s?void 0:s.roles.map((e=>({value:e.name,label:e.name})));return i(o,{class:this.placing?{[`placing-${this.placing}`]:!0}:{},"data-r":this.rerender,onSubmit:()=>{console.log("onSubmit")}},i("div",{id:"verdocs-template-fields-toolbar"},i("div",{class:"add-for"},"Add field:"),i("verdocs-select-input",{value:this.selectedRoleName,options:c,onInput:e=>this.selectedRoleName=e.target.value}),I.map((e=>i("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:()=>{e.tooltip&&(this.selectedRoleName?this.placing=e.id:this.showMustSelectRole=!0)}})))),i("div",{class:"pages"},((null===(a=null===(l=this.store)||void 0===l?void 0:l.state)||void 0===a?void 0:a.template_documents)||[]).map((e=>k(1,e.page_numbers).map((t=>i("verdocs-template-document-page",{templateId:this.templateId,documentId:e.id,pageNumber:t,virtualWidth:612,virtualHeight:792,onClick:e=>this.handleClickPage(e,t),onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})))))),this.showMustSelectRole&&i("verdocs-ok-dialog",{heading:"Unable to add field",message:(null===(d=null===(n=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===n?void 0:n.roles)||void 0===d?void 0:d.length)>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:()=>this.showMustSelectRole=!1}))}};_.style="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio_button_group{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E\") 16 16, pointer}";const j={[d.EVERYONE]:"Everyone",[d.EVERYONE_AS_CREATOR]:"Everyone as Me",[d.ORGANIZATION_MEMBER]:"Organization member",[d.ORGANIZATION_MEMBER_AS_CREATOR]:"Organization Member as Me",[d.CREATOR]:"Me"},A='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>',F='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>',N='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>',Q='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>',U='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>',O=class{constructor(i){e(this,i),this.next=t(this,"next",7),this.exit=t(this,"exit",7),this.sdkError=t(this,"sdkError",7),this.templateUpdated=t(this,"templateUpdated",7),this.sequences=[],this.store=null,this.endpoint=n.getDefault(),this.templateId="",this.showingRoleDialog=null,this.showingSenderDialog=!1,this.sender=null}async componentWillLoad(){var e,t,i;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await u(this.endpoint,this.templateId,!0),this.sortTemplateRoles(),this.renumberTemplateRoles()}catch(o){console.log("[FIELDS] Error with preview session",o),null===(e=this.sdkError)||void 0===e||e.emit(new w(o.message,null===(t=o.response)||void 0===t?void 0:t.status,null===(i=o.response)||void 0===i?void 0:i.data))}}componentDidRender(){y.dynamicDrop(!0),y(".recipient").draggable({listeners:{start:function(e){e.target.classList.add("dragging"),this.el.classList.add("dragging")}.bind(this),move:function(e){const t=+(e.target.getAttribute("posX")||0),i=+(e.target.getAttribute("posY")||0),o=e.dx+t,s=e.dy+i;e.target.setAttribute("posX",o),e.target.setAttribute("posy",s),e.target.style.transform=`translate(${o+100}px, ${s-40}px)`}.bind(this),end:function(e){e.target.classList.remove("dragging"),this.el.classList.remove("dragging"),e.target.setAttribute("posX",0),e.target.setAttribute("posy",0),e.target.style.transform="translate(0px, 0px)"}.bind(this)}}),y(".dropzone").dropzone({overlap:.05,ondrop:function(e){var t,i,o,s,l;e.target.classList.remove("active");const a=e.relatedTarget.dataset.rolename,r=+e.target.dataset.sequence,n=+e.target.dataset.order,d=null===(o=null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.roles)||void 0===o?void 0:o.find((e=>e.name===a));d&&(d.sequence=r,d.order=n,this.sortTemplateRoles(),this.renumberTemplateRoles(),this.forceRerender++,Promise.all(null===(l=null===(s=this.store)||void 0===s?void 0:s.state)||void 0===l?void 0:l.roles.map((e=>L(this.endpoint,this.templateId,e.name,{sequence:e.sequence,order:e.order})))).then((()=>{var e,t;console.log("[ROLES] Updated roles"),null===(e=this.templateUpdated)||void 0===e||e.emit({event:"updated-role",endpoint:this.endpoint,template:null===(t=this.store)||void 0===t?void 0:t.state})})).catch((e=>console.log("[ROLES] Role updates failed",e))))}.bind(this),ondropactivate:e=>{e.target.classList.add("visible")},ondropdeactivate:e=>{e.target.classList.remove("visible")},ondragenter:e=>{e.target.classList.add("active")},ondragleave:e=>{e.target.classList.remove("active")}})}handleCancel(){var e;null===(e=this.exit)||void 0===e||e.emit()}handleSubmit(){var e;null===(e=this.next)||void 0===e||e.emit()}sortTemplateRoles(){var e,t;null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t||t.roles.sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}extractSequenceNumbers(){var e,t;this.sequences=[],null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t||t.roles.forEach((e=>{this.sequences.includes(e.sequence)||this.sequences.push(e.sequence)}))}renumberTemplateRoles(){this.extractSequenceNumbers();const e=[];this.sequences.sort(((e,t)=>e-t)),this.sequences.forEach(((t,i)=>{var o,s;null===(s=null===(o=this.store)||void 0===o?void 0:o.state)||void 0===s||s.roles.filter((e=>e.sequence===t)).forEach(((t,o)=>{e.includes(t.name)||(t.sequence=i+1,t.order=o+1,e.push(t.name))}))})),this.extractSequenceNumbers()}getNextRoleName(){var e,t,i,o;let s="",l=null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.roles.length;do{l++,s=`Recipient ${l}`}while(!s||(null===(o=null===(i=this.store)||void 0===i?void 0:i.state)||void 0===o?void 0:o.roles.some((e=>e.name===s))));return s}callCreateRole(e,t,i){console.log("[ROLES] Will create role",{name:e,sequence:t,order:i}),S(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,order:i,full_name:"",email:"",phone:"",type:"signer",delegator:!1}).then((async e=>{var t,i;console.log("[ROLES] Created role",e),this.store=await u(this.endpoint,this.templateId,!0),this.sortTemplateRoles(),this.renumberTemplateRoles(),null===(t=this.templateUpdated)||void 0===t||t.emit({event:"created-role",endpoint:this.endpoint,template:null===(i=this.store)||void 0===i?void 0:i.state})})).catch((e=>{console.log("[ROLES] Error creating role",e)}))}handleAddRole(e,t){var i;e.stopPropagation();const o=(null===(i=this.store)||void 0===i?void 0:i.state.roles.filter((e=>e.sequence===t)).length)+1,s=this.getNextRoleName();this.callCreateRole(s,t,o)}handleAddStep(e,t){e.stopPropagation();const i=this.getNextRoleName();this.callCreateRole(i,t,1)}render(){var e,t,l,a,r,n;if(console.log("[ROLES] Rendering"),!this.endpoint.session)return i(o,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(!(null===(e=this.store)||void 0===e?void 0:e.state.isLoaded))return i(o,{class:"loading"},i("verdocs-loader",null));const d=((null===(l=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===l?void 0:l.roles)||[]).map((e=>e.name));return i(o,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off","data-r":null===(a=this.store.state)||void 0===a?void 0:a.updateCount},i("h5",null,"Roles and Workflow"),i("div",{class:"participants"},i("div",{class:"left-line"}),i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}),i("div",{class:"row-roles"},i("div",{class:"sender"},i("span",{class:"label"},"Sender:")," ",j[null===(n=null===(r=this.store)||void 0===r?void 0:r.state)||void 0===n?void 0:n.sender]," ",i("div",{class:"settings-button",innerHTML:A,onClick:()=>this.showingSenderDialog=!0,"aria-role":"button"})))),i("div",{class:"row add-sequence","data-sequence":0},i("div",{class:"icon",innerHTML:F}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((e=>{var t,o;return i(s,null,i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'}),i("div",{class:"row-roles"},i("div",{class:"dropzone","data-order":.5,"data-sequence":e}),null===(o=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===o?void 0:o.roles.filter((t=>t.sequence===e)).map((t=>i(s,null,t.email?i("div",{class:"recipient",style:{borderColor:V(E(d,t.name))},"data-rolename":t.name},i("span",{class:"type-icon",innerHTML:"signer"===t.type?N:"cc"===t.type?U:Q}),t.full_name," ",i("div",{class:"settings-button",innerHTML:A,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"})):i("div",{class:"recipient",style:{backgroundColor:V(E(d,t.name))},"data-rolename":t.name},i("span",{class:"type-icon",innerHTML:"signer"===t.type?N:"cc"===t.type?U:Q}),t.name," ",i("div",{class:"settings-button",innerHTML:A,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"})),i("div",{class:"dropzone","data-order":t.order+.5,"data-sequence":e})))),i("button",{class:"add-role",innerHTML:F,onClick:t=>this.handleAddRole(t,e)}))),this.sequences.length>0&&i("div",{class:"row add-sequence","data-sequence":e},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:F}),i("div",{class:"dropzone","data-sequence":e+1,"data-order":1},"Add Step"))))})),i("div",{class:"row","data-sequence":this.sequences.length+1},i("div",{class:"row-roles"},i("div",{class:"icon",innerHTML:F}),i("button",{class:"add-step",innerHTML:F,onClick:e=>this.handleAddStep(e,this.sequences.length+1)}))),i("div",{class:"row"},i("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}),i("div",{class:"row-roles"},i("div",{class:"complete"},"Document Complete")))),d.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:F})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"OK",size:"small",onClick:()=>this.handleSubmit(),disabled:d.length<1}))),this.showingRoleDialog&&i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{this.showingRoleDialog=null},onDelete:async()=>{var e,t;await u(this.endpoint,this.templateId,!0),this.renumberTemplateRoles(),this.showingRoleDialog=null,null===(e=this.templateUpdated)||void 0===e||e.emit({event:"deleted-role",endpoint:this.endpoint,template:null===(t=this.store)||void 0===t?void 0:t.state})}}),this.showingSenderDialog&&i("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:()=>this.showingSenderDialog=!1}))}get el(){return l(this)}};O.style='verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;line-height:30px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 15px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{display:-ms-flexbox;display:flex;cursor:pointer;margin:0 0 0 9px}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:2px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';export{T as verdocs_template_attachments,D as verdocs_template_create,_ as verdocs_template_fields,O as verdocs_template_roles}
|
@@ -1 +0,0 @@
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++){e=arguments[i];for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r))t[r]=e[r]}return t};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(t,e,i,n){function r(t){return t instanceof i?t:new i((function(e){e(t)}))}return new(i||(i=Promise))((function(i,o){function a(t){try{d(n.next(t))}catch(t){o(t)}}function s(t){try{d(n["throw"](t))}catch(t){o(t)}}function d(t){t.done?i(t.value):r(t.value).then(a,s)}d((n=n.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return d([t,e])}}function d(a){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=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:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=e.call(t,i)}catch(t){a=[6,t];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(t,e,i){if(i||arguments.length===2)for(var n=0,r=e.length,o;n<r;n++){if(o||!(n in e)){if(!o)o=Array.prototype.slice.call(e,0,n);o[n]=e[n]}}return t.concat(o||Array.prototype.slice.call(e))};System.register(["./p-934a39b4.system.js","./p-5e0c6e7c.system.js","./p-8fd812f4.system.js","./p-54498887.system.js","./p-365a0216.system.js","./p-d21e9e04.system.js","./p-bbee73c8.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-51a3ea62.system.js"],(function(t){"use strict";var e,i,n,r,o,a,s,d,c;return{setters:[function(t){e=t.r;i=t.c;n=t.h;r=t.H;o=t.a},function(t){a=t.c},function(t){s=t.h},function(){},function(t){d=t.V},function(t){c=t.t},function(){},function(){},function(){},function(){}],execute:function(){var l='verdocs-dropdown{font-family:"Inter", "Barlow", sans-serif;display:block}verdocs-dropdown .arrow{width:32px;height:26px;background:#fff;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #cccccc;-ms-flex-pack:center;justify-content:center}verdocs-dropdown .arrow svg{fill:#55bc81;-webkit-transition:0.3s;transition:0.3s}verdocs-dropdown .items{width:200px;display:none;z-index:10000;border-radius:5px;background:#33354c;border:1px solid #654dcb}verdocs-dropdown .items[data-show]{display:block}verdocs-dropdown .option{width:100%;color:#fff;border:none;display:block;text-align:left;background:none;padding:10px 20px}verdocs-dropdown .option:hover{cursor:pointer;background:#55bc81}verdocs-dropdown .option[disabled]{color:#aaaaaa}verdocs-dropdown .option[disabled]:hover{color:#aaaaaa;cursor:inherit;background:transparent}verdocs-dropdown .separator{border-top:1px solid #ffffff5f;height:1px;padding-top:5px;margin-top:5px}verdocs-dropdown.open .items{display:block}verdocs-dropdown.open .arrow{background:#4c56cb;border:1px solid #707ae5}verdocs-dropdown.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1);fill:#fff}';var p='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#50BE80"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>';var u=t("verdocs_dropdown",function(){function t(t){e(this,t);this.optionSelected=i(this,"optionSelected",7);this.clickListenerSymbol=new AbortController;this.options=[];this.open=undefined}t.prototype.componentDidLoad=function(){this.popper=a(this.dropdownButton,this.dropdownMenu,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,6]}}]});window.addEventListener("click",this.clickListener.bind(this),{signal:this.clickListenerSymbol.signal})};t.prototype.disconnectedCallback=function(){this.clickListenerSymbol.abort()};t.prototype.clickListener=function(t){var e=!(t.target==this.el||this.el.contains(t.target));if(e){this.hide()}};t.prototype.handleSelectOption=function(t,e){t.stopPropagation();this.optionSelected.emit(e);this.hide()};t.prototype.showDropdown=function(){var t,e;this.open=true;this.dropdownMenu.setAttribute("data-show","");this.dropdownMenu.removeAttribute("aria-hidden");(t=this.popper)===null||t===void 0?void 0:t.setOptions((function(t){return __assign(__assign({},t),{modifiers:__spreadArray(__spreadArray([],t.modifiers,true),[{name:"eventListeners",enabled:true}],false)})})).catch((function(){}));(e=this.popper)===null||e===void 0?void 0:e.update().catch((function(){}))};t.prototype.handleHideDropdown=function(t){var e,i;if(((e=t===null||t===void 0?void 0:t.target)===null||e===void 0?void 0:e.localName)==="button"&&((i=t===null||t===void 0?void 0:t.target)===null||i===void 0?void 0:i.className)==="arrow"){return}this.hide()};t.prototype.toggleDropdown=function(t){t.stopPropagation();if(this.open){this.hide()}else{this.showDropdown()}};t.prototype.hide=function(){var t;this.open=false;this.dropdownMenu.removeAttribute("data-show");this.dropdownMenu.setAttribute("aria-hidden","true");(t=this.popper)===null||t===void 0?void 0:t.setOptions((function(t){return __assign(__assign({},t),{modifiers:__spreadArray(__spreadArray([],t.modifiers,true),[{name:"eventListeners",enabled:false}],false)})})).catch((function(){}))};t.prototype.render=function(){var t=this;var e;return n(r,{class:{open:!!this.open}},n("button",{class:"arrow",innerHTML:p,"aria-label":"Open Menu",onClick:function(e){return t.toggleDropdown(e)},onBlur:function(e){return t.handleHideDropdown(e)},ref:function(e){return t.dropdownButton=e}}),n("div",{class:"items","aria-hidden":!this.open,ref:function(e){return t.dropdownMenu=e}},(e=this.options)===null||e===void 0?void 0:e.map((function(e){return e.label?n("button",{onClick:function(i){return t.handleSelectOption(i,e)},class:"option",disabled:e.disabled},e.label):n("div",{class:"separator"})}))))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());u.style=l;var h="verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}";var f=t("verdocs_envelope_document_page",function(){function t(t){e(this,t);this.pageRendered=i(this,"pageRendered",7);this.endpoint=d.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}t.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:t=this;return[4,s(this.endpoint,this.envelopeId,this.documentId,this.pageNumber,this.type)];case 1:t.pageDisplayUri=e.sent();return[2]}}))}))};t.prototype.componentDidLoad=function(){var t=this;this.resizeObserver=new ResizeObserver(c((function(e){for(var i=0,n=e;i<n.length;i++){var r=n[i];var o=r.contentRect.width;t.renderedWidth=o;t.renderedHeight=t.virtualHeight*(o/t.virtualWidth)}t.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};t.prototype.disconnectedCallback=function(){var t;(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()};t.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};t.prototype.render=function(){var t=this;var e="".concat(this.renderedHeight,"px");return n(r,{id:"".concat(this.containerId),style:{height:e,flex:"0 0 ".concat(e)}},this.layers.map((function(i){return i.type==="div"?n("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(t.containerId,"-").concat(i.name),style:{height:e}}):t.pageDisplayUri?n("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(t.containerId,"-").concat(i.name),src:t.pageDisplayUri,alt:"Page ".concat(t.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(e){t.naturalWidth=e.target.naturalWidth;t.naturalHeight=e.target.naturalHeight;t.aspectRatio=t.naturalWidth/t.naturalHeight;t.virtualHeight=t.virtualWidth/t.aspectRatio;t.renderedHeight=e.target.offsetWidth/t.aspectRatio}}):n("div",null)})))};Object.defineProperty(t.prototype,"container",{get:function(){return o(this)},enumerable:false,configurable:true});return t}());f.style=h}}}));
|
@@ -1 +0,0 @@
|
|
1
|
-
import{d as n}from"./p-05788c2b.js";var e=function(n,e,t,i){return new(t||(t=Promise))((function(r,o){function u(n){try{f(i.next(n))}catch(n){o(n)}}function c(n){try{f(i.throw(n))}catch(n){o(n)}}function f(n){var e;n.done?r(n.value):(e=n.value,e instanceof t?e:new t((function(n){n(e)}))).then(u,c)}f((i=i.apply(n,e||[])).next())}))},t=function(n,e){var t,i,r,o,u={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(c){return function(f){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o&&(o=0,c[0]&&(u=0)),u;)try{if(t=1,i&&(r=2&c[0]?i.return:c[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,c[1])).done)return r;switch(i=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return u.label++,{value:c[1],done:!1};case 5:u.label++,i=c[1],c=[0];continue;case 7:c=u.ops.pop(),u.trys.pop();continue;default:if(!((r=(r=u.trys).length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){u=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){u.label=c[1];break}if(6===c[0]&&u.label<r[1]){u.label=r[1],r=c;break}if(r&&u.label<r[2]){u.label=r[2],u.ops.push(c);break}r[2]&&u.ops.pop(),u.trys.pop();continue}c=e.call(n,u)}catch(n){c=[6,n],i=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,f])}}},i=function(i,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,i.api.get("/envelopes/".concat(r.envelopeId,"/recipients/").concat(encodeURIComponent(r.roleId),"/invitation/").concat(r.inviteCode)).then((function(e){var t,r=(null===(t=e.headers)||void 0===t?void 0:t.signer_token)||"",o=n(r);return i.setToken(r),{recipient:e.data,session:o,signerToken:r}}))]}))}))},r=function(n,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(i)).then((function(n){return n.data}))]}))}))},o=function(n,i){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(i),{action:"cancel"}).then((function(n){return n.data}))]}))}))},u=function(n,i,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(i,"/envelope_documents/").concat(r,"?file=true"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))},c=function(n,i,r,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(i,"/fields/").concat(r),o).then((function(n){return n.data}))]}))}))},f=function(n,i,r,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(i,"/fields/").concat(r,"/signature/").concat(o)).then((function(n){return n.data}))]}))}))},s=function(n,i,r,o){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.put("/envelopes/".concat(i,"/fields/").concat(r,"/initial/").concat(o)).then((function(n){return n.data}))]}))}))},v=function(n,i,r){return e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(i,"/fields/").concat(r,"/document"),{responseType:"blob"}).then((function(n){return n.data}))]}))}))},a=function(n,i,r,o,u){return void 0===u&&(u="original"),e(void 0,void 0,void 0,(function(){return t(this,(function(){return[2,n.api.get("/envelopes/".concat(i,"/envelope_documents/").concat(r,"/pages/").concat(o,"/image?type=").concat(u),{timeout:2e4,"axios-retry":{retries:5}}).then((function(n){return n.data}))]}))}))},d={},l=function(n,e){return d[e]&&d[e].loaded+2e3<(new Date).getTime()?d[e].envelope:r(n,e).then((function(n){return d[e]={loaded:(new Date).getTime(),envelope:n},n}))};export{u as a,v as b,o as c,i as d,f as e,s as f,r as g,a as h,l as t,c as u}
|
@@ -1 +0,0 @@
|
|
1
|
-
import{E as n}from"./p-05788c2b.js";var r=function(n,r){return r.profile_id===(null==n?void 0:n.profile_id)},u=function(u,t){return r(u,t)&&t.status!==n.COMPLETE&&t.status!==n.DECLINED&&t.status!==n.CANCELED},t=function(n){return!["submitted","canceled","declined"].includes(n.status)},i=function(n){return((null==n?void 0:n.recipients)||[]).filter(t)},o=function(n,r){var u;return n.sequence===(null===(u=null==r?void 0:r[0])||void 0===u?void 0:u.sequence)};export{u as a,i as g,o as r,r as u}
|
@@ -2,6 +2,36 @@
|
|
2
2
|
|
3
3
|
const Types = require('./Types-f89f9116.js');
|
4
4
|
|
5
|
+
exports.TemplateSenderTypes = void 0;
|
6
|
+
(function (TemplateSenderTypes) {
|
7
|
+
TemplateSenderTypes["CREATOR"] = "creator";
|
8
|
+
TemplateSenderTypes["ORGANIZATION_MEMBER"] = "organization_member";
|
9
|
+
TemplateSenderTypes["ORGANIZATION_MEMBER_AS_CREATOR"] = "organization_member_as_creator";
|
10
|
+
TemplateSenderTypes["EVERYONE"] = "everyone";
|
11
|
+
TemplateSenderTypes["EVERYONE_AS_CREATOR"] = "everyone_as_creator";
|
12
|
+
})(exports.TemplateSenderTypes || (exports.TemplateSenderTypes = {}));
|
13
|
+
var TemplateActions;
|
14
|
+
(function (TemplateActions) {
|
15
|
+
TemplateActions["CREATE_PERSONAL"] = "create_personal";
|
16
|
+
TemplateActions["CREATE_ORG"] = "create_org";
|
17
|
+
TemplateActions["CREATE_PUBLIC"] = "create_public";
|
18
|
+
TemplateActions["READ"] = "read";
|
19
|
+
TemplateActions["WRITE"] = "write";
|
20
|
+
TemplateActions["DELETE"] = "delete";
|
21
|
+
TemplateActions["CHANGE_VISIBILITY_PERSONAL"] = "change_visibility_personal";
|
22
|
+
TemplateActions["CHANGE_VISIBILITY_ORG"] = "change_visibility_org";
|
23
|
+
TemplateActions["CHANGE_VISIBILITY_PUBLIC"] = "change_visibility_public";
|
24
|
+
})(TemplateActions || (TemplateActions = {}));
|
25
|
+
var SortOptions;
|
26
|
+
(function (SortOptions) {
|
27
|
+
SortOptions["CREATED_AT"] = "created_at";
|
28
|
+
SortOptions["UPDATED_AT"] = "updated_at";
|
29
|
+
SortOptions["NAME"] = "name";
|
30
|
+
SortOptions["LAST_USED_AT"] = "last_used_at";
|
31
|
+
SortOptions["COUNTER"] = "counter";
|
32
|
+
SortOptions["STAR_COUNTER"] = "star_counter";
|
33
|
+
})(SortOptions || (SortOptions = {}));
|
34
|
+
|
5
35
|
/**
|
6
36
|
* Operation within Verdocs that users may perform.
|
7
37
|
*/
|
@@ -50,36 +80,6 @@ var Roles;
|
|
50
80
|
Roles["MEMBER"] = "member";
|
51
81
|
})(Roles || (Roles = {}));
|
52
82
|
|
53
|
-
exports.TemplateSenderTypes = void 0;
|
54
|
-
(function (TemplateSenderTypes) {
|
55
|
-
TemplateSenderTypes["CREATOR"] = "creator";
|
56
|
-
TemplateSenderTypes["ORGANIZATION_MEMBER"] = "organization_member";
|
57
|
-
TemplateSenderTypes["ORGANIZATION_MEMBER_AS_CREATOR"] = "organization_member_as_creator";
|
58
|
-
TemplateSenderTypes["EVERYONE"] = "everyone";
|
59
|
-
TemplateSenderTypes["EVERYONE_AS_CREATOR"] = "everyone_as_creator";
|
60
|
-
})(exports.TemplateSenderTypes || (exports.TemplateSenderTypes = {}));
|
61
|
-
var TemplateActions;
|
62
|
-
(function (TemplateActions) {
|
63
|
-
TemplateActions["CREATE_PERSONAL"] = "create_personal";
|
64
|
-
TemplateActions["CREATE_ORG"] = "create_org";
|
65
|
-
TemplateActions["CREATE_PUBLIC"] = "create_public";
|
66
|
-
TemplateActions["READ"] = "read";
|
67
|
-
TemplateActions["WRITE"] = "write";
|
68
|
-
TemplateActions["DELETE"] = "delete";
|
69
|
-
TemplateActions["CHANGE_VISIBILITY_PERSONAL"] = "change_visibility_personal";
|
70
|
-
TemplateActions["CHANGE_VISIBILITY_ORG"] = "change_visibility_org";
|
71
|
-
TemplateActions["CHANGE_VISIBILITY_PUBLIC"] = "change_visibility_public";
|
72
|
-
})(TemplateActions || (TemplateActions = {}));
|
73
|
-
var SortOptions;
|
74
|
-
(function (SortOptions) {
|
75
|
-
SortOptions["CREATED_AT"] = "created_at";
|
76
|
-
SortOptions["UPDATED_AT"] = "updated_at";
|
77
|
-
SortOptions["NAME"] = "name";
|
78
|
-
SortOptions["LAST_USED_AT"] = "last_used_at";
|
79
|
-
SortOptions["COUNTER"] = "counter";
|
80
|
-
SortOptions["STAR_COUNTER"] = "star_counter";
|
81
|
-
})(SortOptions || (SortOptions = {}));
|
82
|
-
|
83
83
|
const denyList = new Set([
|
84
84
|
'ENOTFOUND',
|
85
85
|
'ENETUNREACH',
|