@verdocs/web-sdk 6.8.6 → 6.8.8
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/{Datastore-B-sxWSPD.js → Datastore-C-Pojt3E.js} +3 -3
- package/dist/{esm-es5/Datastore-bS8INhRF.js.map → cjs/Datastore-C-Pojt3E.js.map} +1 -1
- package/dist/cjs/index-CQ5bTnED.js +14 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-ecG41L2k.js → utils-kkGeJs-8.js} +6 -3
- package/dist/cjs/utils-kkGeJs-8.js.map +1 -0
- package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +5 -3
- package/dist/cjs/verdocs-build.entry.cjs.js.map +1 -1
- package/dist/cjs/{verdocs-button-panel_2.cjs.entry.js → verdocs-button-panel.cjs.entry.js} +1 -27
- package/dist/cjs/verdocs-button-panel.entry.cjs.js.map +1 -0
- package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-summary.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +119 -51
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +16 -9
- package/dist/cjs/verdocs-field-payment.entry.cjs.js.map +1 -1
- package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.cjs.js.map +1 -0
- package/dist/cjs/{verdocs-preview_7.cjs.entry.js → verdocs-preview_6.cjs.entry.js} +56 -214
- package/dist/cjs/verdocs-sign.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-signing-progress.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-tabs.cjs.entry.js +31 -0
- package/dist/cjs/verdocs-tabs.entry.cjs.js.map +1 -0
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-settings.cjs.entry.js +150 -0
- package/dist/cjs/verdocs-template-settings.entry.cjs.js.map +1 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.css +4 -0
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +5 -3
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js +10 -0
- package/dist/collection/components/embeds/verdocs-preview/verdocs-preview.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +15 -5
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js +15 -5
- package/dist/collection/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js +15 -5
- package/dist/collection/components/fields/verdocs-field-date/verdocs-field-date.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js +15 -5
- package/dist/collection/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +13 -5
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.js +18 -8
- package/dist/collection/components/fields/verdocs-field-payment/verdocs-field-payment.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js +15 -5
- package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +13 -5
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +15 -5
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +15 -5
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js.map +1 -1
- package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js +17 -5
- package/dist/collection/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.js.map +1 -1
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.css +41 -49
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.js +25 -45
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.js.map +1 -1
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +31 -52
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js.map +1 -1
- package/dist/collection/utils/Datastore.js +1 -1
- package/dist/collection/utils/Datastore.js.map +1 -1
- package/dist/collection/utils/utils.js +4 -1
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/{p-CRIrD66O.js → p---tnXjlx.js} +3 -3
- package/dist/components/{p-CRIrD66O.js.map → p---tnXjlx.js.map} +1 -1
- package/dist/components/{p-BgNCVox7.js → p-1oPQs4-S.js} +3 -3
- package/dist/components/{p-BgNCVox7.js.map → p-1oPQs4-S.js.map} +1 -1
- package/dist/components/{p-CFi6VKgU.js → p-2sD6OXzl.js} +19 -10
- package/dist/components/p-2sD6OXzl.js.map +1 -0
- package/dist/components/{p-CWGxLuye.js → p-7dtIf4QF.js} +19 -10
- package/dist/components/p-7dtIf4QF.js.map +1 -0
- package/dist/components/{p-CherENoi.js → p-BCiVZnf0.js} +3 -3
- package/dist/components/{p-CherENoi.js.map → p-BCiVZnf0.js.map} +1 -1
- package/dist/components/{p-BYDdRCru.js → p-BEI7Iwuj.js} +34 -42
- package/dist/components/p-BEI7Iwuj.js.map +1 -0
- package/dist/components/{p-DLV8jNf8.js → p-BUaaBFra.js} +17 -10
- package/dist/components/p-BUaaBFra.js.map +1 -0
- package/dist/components/{p-BZRJWqKI.js → p-BVu-nE_L.js} +19 -10
- package/dist/components/p-BVu-nE_L.js.map +1 -0
- package/dist/components/{p-By2QlfRC.js → p-BihWiABu.js} +19 -10
- package/dist/components/p-BihWiABu.js.map +1 -0
- package/dist/components/p-BqoZV7Do.js +156 -0
- package/dist/components/p-BqoZV7Do.js.map +1 -0
- package/dist/components/{p-D1tvdWaA.js → p-BrtyCjOf.js} +4 -4
- package/dist/components/{p-D1tvdWaA.js.map → p-BrtyCjOf.js.map} +1 -1
- package/dist/components/{p-tSwumenv.js → p-Bzs-6uU0.js} +3 -3
- package/dist/components/{p-tSwumenv.js.map → p-Bzs-6uU0.js.map} +1 -1
- package/dist/components/{p-Dj_oFCRK.js → p-C02BWoNV.js} +17 -10
- package/dist/components/p-C02BWoNV.js.map +1 -0
- package/dist/{esm/Datastore-bS8INhRF.js → components/p-C7hFgM52.js} +3 -3
- package/dist/components/p-C7hFgM52.js.map +1 -0
- package/dist/components/{p-CjDMm6od.js → p-CD24uAWY.js} +19 -10
- package/dist/components/p-CD24uAWY.js.map +1 -0
- package/dist/components/{p-_igYrwND.js → p-CDR7tIN-.js} +3 -3
- package/dist/components/{p-_igYrwND.js.map → p-CDR7tIN-.js.map} +1 -1
- package/dist/components/{p-tyY7kKNB.js → p-CPIwQCo_.js} +21 -10
- package/dist/components/p-CPIwQCo_.js.map +1 -0
- package/dist/components/{p-Bafj7hI1.js → p-Cli5nWln.js} +19 -10
- package/dist/components/p-Cli5nWln.js.map +1 -0
- package/dist/components/{p-Dpu4D5bv.js → p-Cx0Mif05.js} +6 -3
- package/dist/components/p-Cx0Mif05.js.map +1 -0
- package/dist/components/{p-BF4y1YRU.js → p-CzvUUEq1.js} +3 -3
- package/dist/components/{p-BF4y1YRU.js.map → p-CzvUUEq1.js.map} +1 -1
- package/dist/components/{p-DzM2oGUr.js → p-D1TqIILD.js} +19 -10
- package/dist/components/p-D1TqIILD.js.map +1 -0
- package/dist/components/{p-CYRfkDZa.js → p-Dj2R-VU1.js} +26 -16
- package/dist/components/p-Dj2R-VU1.js.map +1 -0
- package/dist/components/{p-Cal5IvqT.js → p-DmEzMnt3.js} +3 -3
- package/dist/components/{p-Cal5IvqT.js.map → p-DmEzMnt3.js.map} +1 -1
- package/dist/components/{p-C5fwD53I.js → p-Dz6Xrh7z.js} +3 -3
- package/dist/components/{p-C5fwD53I.js.map → p-Dz6Xrh7z.js.map} +1 -1
- package/dist/components/{p-DaWDoIag.js → p-IJa78J36.js} +4 -4
- package/dist/components/{p-DaWDoIag.js.map → p-IJa78J36.js.map} +1 -1
- package/dist/components/{p-DtpXCLdt.js → p-RdlD8c2P.js} +5 -5
- package/dist/components/{p-DtpXCLdt.js.map → p-RdlD8c2P.js.map} +1 -1
- package/dist/components/{p-DmyvK-Tr.js → p-aH_YLUuP.js} +15 -15
- package/dist/components/{p-DmyvK-Tr.js.map → p-aH_YLUuP.js.map} +1 -1
- package/dist/components/{p-DyfpSDn-.js → p-zAW1BOj6.js} +3 -3
- package/dist/components/{p-DyfpSDn-.js.map → p-zAW1BOj6.js.map} +1 -1
- package/dist/components/verdocs-build.js +73 -95
- package/dist/components/verdocs-build.js.map +1 -1
- package/dist/components/verdocs-button-panel.js +98 -1
- package/dist/components/verdocs-button-panel.js.map +1 -1
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-envelope-document-page.js +1 -1
- package/dist/components/verdocs-envelope-recipient-link.js +1 -1
- package/dist/components/verdocs-envelope-recipient-summary.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +3 -3
- package/dist/components/verdocs-envelope-update-recipient.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +2 -2
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-checkbox.js +1 -1
- package/dist/components/verdocs-field-date.js +1 -1
- package/dist/components/verdocs-field-dropdown.js +1 -1
- package/dist/components/verdocs-field-initial.js +1 -1
- package/dist/components/verdocs-field-payment.js +20 -11
- package/dist/components/verdocs-field-payment.js.map +1 -1
- package/dist/components/verdocs-field-radio.js +1 -1
- package/dist/components/verdocs-field-signature.js +1 -1
- package/dist/components/verdocs-field-textarea.js +1 -1
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-field-timestamp.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-quick-filter.js +1 -1
- package/dist/components/verdocs-send.js +1 -1
- package/dist/components/verdocs-sign-footer.js +1 -1
- package/dist/components/verdocs-sign.js +5 -5
- package/dist/components/verdocs-signing-progress.js +1 -1
- package/dist/components/verdocs-tabs.js +45 -1
- package/dist/components/verdocs-tabs.js.map +1 -1
- package/dist/components/verdocs-template-attachments.js +1 -1
- package/dist/components/verdocs-template-build-tabs.js +1 -1
- package/dist/components/verdocs-template-document-page.js +1 -1
- package/dist/components/verdocs-template-field-properties.js +1 -1
- package/dist/components/verdocs-template-fields.js +1 -1
- package/dist/components/verdocs-template-role-properties.js +1 -1
- package/dist/components/verdocs-template-roles.js +1 -1
- package/dist/components/verdocs-template-settings.js +215 -1
- package/dist/components/verdocs-template-settings.js.map +1 -1
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/custom-elements.json +0 -6
- package/dist/{components/p-bS8INhRF.js → esm/Datastore-C7hFgM52.js} +3 -3
- package/dist/{cjs/Datastore-B-sxWSPD.js.map → esm/Datastore-C7hFgM52.js.map} +1 -1
- package/dist/esm/index-BIRwgFLv.js +14 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-CerrMWqr.js → utils-CPSY5rft.js} +6 -3
- package/dist/esm/utils-CPSY5rft.js.map +1 -0
- package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +5 -3
- package/dist/esm/verdocs-build.entry.js.map +1 -1
- package/dist/{components/p-rboJNAPD.js → esm/verdocs-button-panel.entry.js} +9 -32
- package/dist/esm/verdocs-button-panel.entry.js.map +1 -0
- package/dist/esm/verdocs-checkbox_5.entry.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-download-dialog_4.entry.js +2 -2
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-recipient-summary.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-attachment_11.entry.js +119 -51
- package/dist/esm/verdocs-field-payment.entry.js +16 -9
- package/dist/esm/verdocs-field-payment.entry.js.map +1 -1
- package/dist/esm/verdocs-menu-panel_2.entry.js +1 -1
- package/dist/esm/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.js.map +1 -0
- package/dist/esm/{verdocs-preview_7.entry.js → verdocs-preview_6.entry.js} +58 -215
- package/dist/esm/verdocs-sign.entry.js +2 -2
- package/dist/esm/verdocs-signing-progress.entry.js +1 -1
- package/dist/{components/p-e7e4Os6T.js → esm/verdocs-tabs.entry.js} +8 -29
- package/dist/esm/verdocs-tabs.entry.js.map +1 -0
- package/dist/esm/verdocs-template-document-page_2.entry.js +2 -2
- package/dist/{components/p-Cp7g7TMK.js → esm/verdocs-template-settings.entry.js} +12 -84
- package/dist/esm/verdocs-template-settings.entry.js.map +1 -0
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{Datastore-bS8INhRF.js → Datastore-C7hFgM52.js} +2 -2
- package/dist/{esm/Datastore-bS8INhRF.js.map → esm-es5/Datastore-C7hFgM52.js.map} +1 -1
- package/dist/esm-es5/index-BIRwgFLv.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/utils-CPSY5rft.js +2 -0
- package/dist/esm-es5/utils-CPSY5rft.js.map +1 -0
- package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-button-panel.entry.js +2 -0
- package/dist/esm-es5/verdocs-button-panel.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- 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 -1
- package/dist/esm-es5/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment_11.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-preview_6.entry.js +8 -0
- package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-signing-progress.entry.js +1 -1
- package/dist/esm-es5/verdocs-tabs.entry.js +2 -0
- package/dist/esm-es5/verdocs-tabs.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-settings.entry.js +2 -0
- package/dist/esm-es5/verdocs-template-settings.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +1 -1
- package/dist/types/components/embeds/verdocs-preview/verdocs-preview.d.ts +1 -0
- package/dist/types/components/fields/verdocs-field-attachment/verdocs-field-attachment.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-checkbox/verdocs-field-checkbox.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-date/verdocs-field-date.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-dropdown/verdocs-field-dropdown.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +1 -1
- package/dist/types/components/fields/verdocs-field-payment/verdocs-field-payment.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-radio/verdocs-field-radio.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-signature/verdocs-field-signature.d.ts +1 -1
- package/dist/types/components/fields/verdocs-field-textarea/verdocs-field-textarea.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +2 -1
- package/dist/types/components/fields/verdocs-field-timestamp/verdocs-field-timestamp.d.ts +2 -1
- package/dist/types/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.d.ts +8 -3
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +4 -9
- package/dist/types/components.d.ts +2 -4
- package/dist/verdocs-web-sdk/{p-2ff00959.system.entry.js → p-032e8fb0.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-fe5aabfb.entry.js → p-04981f9f.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-7f7da7d6.system.entry.js → p-066eaea8.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-53be15dc.entry.js → p-0b59a4a5.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-0e4aa0d1.entry.js +8 -0
- package/dist/verdocs-web-sdk/p-0e4aa0d1.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-107a1995.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-e65af831.system.entry.js.map → p-107a1995.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-1b5b8ffa.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-1b5b8ffa.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-be9c544d.system.entry.js → p-2ba8c771.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-2ebc769e.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-2ebc769e.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-311bb5b2.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-da28bd7d.entry.js.map → p-311bb5b2.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-069169a7.entry.js → p-3202f0eb.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-edc49225.entry.js → p-3648e4c0.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-3648e4c0.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-39b03469.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-39b03469.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-64b9e2de.entry.js → p-3be22031.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f4c4a49e.system.entry.js → p-4424623c.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-7a086c18.entry.js → p-4f820bee.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-2fc50938.system.entry.js → p-53530f64.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f1ca6e1c.system.entry.js → p-60cfa50a.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-93e9df57.system.entry.js → p-641dbbfa.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-6c8883ff.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-8e8c0110.entry.js.map → p-6c8883ff.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-6d41df5d.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-6d41df5d.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-8062bb99.entry.js → p-6d5af60f.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6038e4c1.system.entry.js → p-774961dc.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-63c0f31d.system.entry.js → p-822694c1.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-9b367391.system.entry.js → p-91316504.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-0c24c1b8.entry.js → p-92b4f218.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-adcbb1c2.entry.js → p-9586b268.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-CC3ukJv1.system.js.map → p-BFC8G6sY.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-LGooaeHw.system.js.map → p-BJ0cUjeu.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-CRk-MpSX.system.js.map → p-BJx8Y9VG.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-BUFQbxzf.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-CWh-S6N5.system.js.map → p-BuHYXI2L.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-bS8INhRF.js → p-C7hFgM52.js} +2 -2
- package/dist/verdocs-web-sdk/{p-bS8INhRF.js.map → p-C7hFgM52.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-C9JdpYtM.js +2 -0
- package/dist/verdocs-web-sdk/p-C9JdpYtM.js.map +1 -0
- package/dist/verdocs-web-sdk/p-CCv1s4sj.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-COM7km0I.system.js.map → p-CVmJ8lYI.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-Cd268O-w.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-C5U_96FD.system.js.map → p-CyPGia16.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-DGti20Vc.system.js +2 -0
- package/dist/verdocs-web-sdk/p-DGti20Vc.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-Db5fIu2w.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-BcNo_mbk.system.js.map → p-DmQa-gqf.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-dY2me2i5.system.js.map → p-Dmc2VIXX.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-DrBEr1CO.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-C-5pmv-B.system.js.map → p-N4-IQ3Cb.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-TQtp_Nv2.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-BvI8gTGk.system.js.map → p-WCWuCFHk.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-a06b40a9.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-a06b40a9.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-ESsv28K0.system.js.map → p-a51WVEiq.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-c0c4b822.entry.js → p-a7e0e67a.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-abfa8b47.system.entry.js +8 -0
- package/dist/verdocs-web-sdk/p-abfa8b47.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-ad41a644.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-ad41a644.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-333d4a2e.system.entry.js → p-b7d907b4.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-b83472cd.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-b83472cd.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-e4b13df9.system.entry.js → p-bcffad7a.system.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-8d5c3516.entry.js → p-c7bfe2f1.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-081b245d.system.entry.js → p-d52e6117.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-dde291ad.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-dde291ad.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-0faa3e84.entry.js → p-e262ea96.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-8b2d4ca5.entry.js → p-f7f33a99.entry.js} +3 -3
- package/dist/verdocs-web-sdk/{p-lEpx1l-p.system.js → p-fEbwslLK.system.js} +2 -2
- package/dist/verdocs-web-sdk/{p-lEpx1l-p.system.js.map → p-fEbwslLK.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-fd923850.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-fd923850.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-0-YdlCL1.system.js.map → p-x_N0ZS08.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-yFbTWZrj.system.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-D1RF_rpl.system.js.map → p-yUsULl32.system.js.map} +1 -1
- package/dist/verdocs-web-sdk/verdocs-build.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-button-panel.entry.esm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-payment.entry.esm.js.map +1 -1
- package/dist/verdocs-web-sdk/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.entry.esm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-tabs.entry.esm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-template-settings.entry.esm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/utils-ecG41L2k.js.map +0 -1
- package/dist/cjs/verdocs-button-panel.verdocs-tabs.entry.cjs.js.map +0 -1
- package/dist/cjs/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.cjs.js.map +0 -1
- package/dist/components/p-BYDdRCru.js.map +0 -1
- package/dist/components/p-BZRJWqKI.js.map +0 -1
- package/dist/components/p-Bafj7hI1.js.map +0 -1
- package/dist/components/p-By2QlfRC.js.map +0 -1
- package/dist/components/p-CFi6VKgU.js.map +0 -1
- package/dist/components/p-CWGxLuye.js.map +0 -1
- package/dist/components/p-CYRfkDZa.js.map +0 -1
- package/dist/components/p-CjDMm6od.js.map +0 -1
- package/dist/components/p-Cp7g7TMK.js.map +0 -1
- package/dist/components/p-DLV8jNf8.js.map +0 -1
- package/dist/components/p-Dj_oFCRK.js.map +0 -1
- package/dist/components/p-Dpu4D5bv.js.map +0 -1
- package/dist/components/p-DzM2oGUr.js.map +0 -1
- package/dist/components/p-bS8INhRF.js.map +0 -1
- package/dist/components/p-e7e4Os6T.js.map +0 -1
- package/dist/components/p-hDK3S4nn.js +0 -188
- package/dist/components/p-hDK3S4nn.js.map +0 -1
- package/dist/components/p-rboJNAPD.js.map +0 -1
- package/dist/components/p-tyY7kKNB.js.map +0 -1
- package/dist/esm/utils-CerrMWqr.js.map +0 -1
- package/dist/esm/verdocs-button-panel.verdocs-tabs.entry.js.map +0 -1
- package/dist/esm/verdocs-button-panel_2.entry.js +0 -105
- package/dist/esm/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.js.map +0 -1
- package/dist/esm-es5/utils-CerrMWqr.js +0 -2
- package/dist/esm-es5/utils-CerrMWqr.js.map +0 -1
- package/dist/esm-es5/verdocs-button-panel.verdocs-tabs.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-button-panel_2.entry.js +0 -2
- package/dist/esm-es5/verdocs-button-panel_2.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-preview_7.entry.js +0 -8
- package/dist/esm-es5/verdocs-preview_7.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-07bd9f14.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-07bd9f14.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-5bc00fc6.entry.js +0 -8
- package/dist/verdocs-web-sdk/p-5bc00fc6.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-6bbe3f73.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-6bbe3f73.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-8e8c0110.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-B390zQJa.js +0 -2
- package/dist/verdocs-web-sdk/p-B390zQJa.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BZv_Bu9M.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-CT1VA0C-.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-CaEXyfjG.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DEv3ZZhp.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DGOssAS4.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-a6b008ef.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-a6b008ef.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-aaad7b8a.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-aaad7b8a.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-acf58947.system.entry.js +0 -8
- package/dist/verdocs-web-sdk/p-acf58947.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-da28bd7d.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e3075674.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-e3075674.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-e65af831.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-edc49225.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f589tneI.system.js +0 -2
- package/dist/verdocs-web-sdk/p-f589tneI.system.js.map +0 -1
- package/dist/verdocs-web-sdk/verdocs-button-panel.verdocs-tabs.entry.esm.js.map +0 -1
- package/dist/verdocs-web-sdk/verdocs-preview.verdocs-send.verdocs-template-attachments.verdocs-template-build-tabs.verdocs-template-fields.verdocs-template-roles.verdocs-template-settings.entry.esm.js.map +0 -1
- /package/dist/verdocs-web-sdk/{p-2ff00959.system.entry.js.map → p-032e8fb0.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-fe5aabfb.entry.js.map → p-04981f9f.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-7f7da7d6.system.entry.js.map → p-066eaea8.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-53be15dc.entry.js.map → p-0b59a4a5.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-be9c544d.system.entry.js.map → p-2ba8c771.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-069169a7.entry.js.map → p-3202f0eb.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-64b9e2de.entry.js.map → p-3be22031.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-f4c4a49e.system.entry.js.map → p-4424623c.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-7a086c18.entry.js.map → p-4f820bee.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-2fc50938.system.entry.js.map → p-53530f64.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-f1ca6e1c.system.entry.js.map → p-60cfa50a.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-93e9df57.system.entry.js.map → p-641dbbfa.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-8062bb99.entry.js.map → p-6d5af60f.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6038e4c1.system.entry.js.map → p-774961dc.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-63c0f31d.system.entry.js.map → p-822694c1.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-9b367391.system.entry.js.map → p-91316504.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0c24c1b8.entry.js.map → p-92b4f218.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-adcbb1c2.entry.js.map → p-9586b268.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-c0c4b822.entry.js.map → p-a7e0e67a.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-333d4a2e.system.entry.js.map → p-b7d907b4.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-e4b13df9.system.entry.js.map → p-bcffad7a.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-8d5c3516.entry.js.map → p-c7bfe2f1.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-081b245d.system.entry.js.map → p-d52e6117.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-0faa3e84.entry.js.map → p-e262ea96.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-8b2d4ca5.entry.js.map → p-f7f33a99.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=a(0),s["throw"]=a(1),s["return"]=a(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(n=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];o=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,o=t.length,r;n<o;n++){if(r||!(n in t)){if(!r)r=Array.prototype.slice.call(t,0,n);r[n]=t[n]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,g as getElement}from"./index-BIRwgFLv.js";import{VerdocsEndpoint,DEFAULT_DISCLOSURES,startSigningSession,envelopeRecipientAgree,getEnvelope,updateEnvelopeField,createSignature,createInitials,sortFields,envelopeRecipientSubmit,isFieldValid,isFieldFilled,uploadEnvelopeFieldAttachment,deleteEnvelopeFieldAttachment,formatFullName,fullNameToInitials,verifySigner,delegateRecipient,envelopeRecipientDecline,integerSequence,askQuestion,getEnvelopeDocumentDownloadLink,getEnvelopesZip}from"@verdocs/js-sdk";import{u as updateDocumentFieldValue,g as getFieldId,r as renderDocumentFlag,a as renderDocumentField,d as defaultHeight}from"./utils-CerrMWqr.js";import{D as DocumentPageIcon,C as CheckCircleIcon}from"./Icons-BU5rnXp2.js";import{V as VerdocsToast}from"./Toast-D97GxsI-.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-bS8INhRF.js";import"./index-dzBXqXlK.js";import"./Types-BqoC0yeA.js";var verdocsSignCss='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;min-height:700px;position:relative;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f5;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;padding-right:140px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign>.document .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;max-width:1028px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-sign>.document .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-sign>.document .document-separator:first-child{margin-top:0}verdocs-sign .signed-document-container{width:64%;margin-left:260px;-webkit-transition:all 0.3s ease;transition:all 0.3s ease}verdocs-sign .signed-document-container.zoom-normal{width:64%;margin-left:260px}verdocs-sign .signed-document-container.zoom-zoom1{width:80%;margin-left:200px}verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:150px}verdocs-sign .signed-document-container.zoom-zoom2 .verdocs-flag-instance{opacity:0;pointer-events:none}@media (max-width: 768px){verdocs-sign verdocs-sign-footer{padding:0 10px}verdocs-sign verdocs-sign-footer .buttons{gap:8px}verdocs-sign verdocs-sign-footer .buttons button{font-size:10px}verdocs-sign .signed-document-container{width:100%;margin-left:0}verdocs-sign .signed-document-container.zoom-normal,verdocs-sign .signed-document-container.zoom-zoom1,verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:0}verdocs-sign>.document{padding-right:15px}verdocs-sign .verdocs-flag-instance{display:none !important}verdocs-sign .controls-toolbar .center-controls{display:none}verdocs-sign .controls-toolbar .right-controls .mobile-next-button{display:block;margin-right:10px}verdocs-sign .controls-toolbar .right-controls .minus,verdocs-sign .controls-toolbar .right-controls .plus{display:none}}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header,.controls-toolbar,.verdocs-flag-instance,verdocs-signing-progress{display:none !important}verdocs-sign{min-height:auto;background-color:white}verdocs-sign>.document{overflow:visible;height:auto;display:block;padding:0;margin:0}verdocs-sign>.document .document-separator{display:none}verdocs-sign .signed-document-container{width:100%;margin:0}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}#verdocs-sign-header .remaining-count{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;color:#ffffff;font-size:13px;font-weight:400;white-space:nowrap}#verdocs-sign-header .remaining-count .check-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}#verdocs-sign-header .remaining-count .check-icon svg{width:16px;height:16px;fill:#55bc81}#verdocs-sign-header .remaining-count .separator{opacity:0.5;margin:0 2px}#verdocs-sign-header .remaining-count .review-optional{cursor:pointer;text-decoration:underline}#verdocs-sign-header .remaining-count .review-optional:hover{color:#54d68c}#verdocs-sign-header .icon-button{width:20px;height:32px;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}#verdocs-sign-header .icon-button svg path{fill:#ffffff}#verdocs-sign-header .icon-button:hover{background-color:rgba(255, 255, 255, 0.1)}#verdocs-sign-header .icon-button.disabled{opacity:0.35;pointer-events:none}#verdocs-sign-header .icon-button+.icon-button{margin-left:-6px}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}.controls-toolbar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:54px;padding:0 12px 0 24px;background-color:#ffffff;border-bottom:1px solid #e0e0e0;-webkit-box-shadow:none;box-shadow:none;font-family:"Inter", sans-serif;color:#424242;z-index:1000}.controls-toolbar .left-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .left-controls .title{font-weight:500;font-size:16px;color:#242424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.controls-toolbar .center-controls{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:10px;font-size:14px;display:none}.controls-toolbar .center-controls .label{color:#000000;font-weight:300}.controls-toolbar .center-controls .select-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .center-controls .select-wrapper verdocs-select-input{margin:0}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-label{display:none}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element{background:transparent;border:1px solid #e0e0e0;height:32px;padding:2px 8px;min-width:60px;text-align:center;font-family:inherit;color:#424242}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element:focus{border-color:var(--verdocs-primary-color, #55bc81)}.controls-toolbar .center-controls .count{color:#000000;font-weight:300}.controls-toolbar .right-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.controls-toolbar .right-controls .mobile-next-button{display:none}.controls-toolbar .right-controls .icon-button{width:32px;height:32px;display:-ms-flexbox;display:flex;color:#424242;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}.controls-toolbar .right-controls .icon-button:hover{background-color:#f5f5f5}.controls-toolbar .right-controls .icon-button.disabled{opacity:0.3;pointer-events:none}.controls-toolbar .right-controls .icon-button svg{display:block;width:20px;height:20px}';var ToolbarMinusIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z" fill="#424242" /></svg>';var ToolbarPlusIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z" fill="#424242" /></svg>';var ToolbarDownloadIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z" fill="#424242"/></svg>';var ToolbarPrintIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z" fill="#424242"/></svg>';var VerdocsSign=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.envelopeLoaded=createEvent(this,"envelopeLoaded");this.envelopeUpdated=createEvent(this,"envelopeUpdated");this.endpoint=new VerdocsEndpoint({sessionType:"signing"});this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.toolbarStyle="menu";this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=DEFAULT_DISCLOSURES;this.fieldUpdateCounter=0;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.adoptingSignature=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.signatureId=null;this.initialId=null;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.pageNumber=1;this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.showDownloadDialog=false;this.loading=true;this.envelope=null;this.zoomLevel="normal";this.signingProgressMode="start";this.polling=true;this.renderedPages={};this.pollingInterval=null}e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,r,s,a;var l=this;return __generator(this,(function(c){switch(c.label){case 0:this.updateZoomFromWindow();window.addEventListener("resize",(function(){return l.updateZoomFromWindow()}));if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new SDKError("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError("[SIGN] Missing required inviteCode",500,""));return[2]}c.label=1;case 1:c.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,startSigningSession(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:s=c.sent();this.processAuthResponse(s);return[3,4];case 3:a=c.sent();console.log("[SIGN] Error with signing session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(a.message,(o=a.response)===null||o===void 0?void 0:o.status,(r=a.response)===null||r===void 0?void 0:r.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}this.setupIntersectionObserver()};e.prototype.disconnectedCallback=function(){var e=this;var t,i;this.stopPolling();(t=this.observer)===null||t===void 0?void 0:t.disconnect();window.removeEventListener("resize",(function(){return e.updateZoomFromWindow()}));(i=document.getElementById(this.getOrgStyleOverridesId()))===null||i===void 0?void 0:i.remove()};e.prototype.updateZoomFromWindow=function(){var e=window.innerWidth;if(e<768){if(this.zoomLevel!=="zoom2")this.zoomLevel="zoom2"}else if(e<1024){if(this.zoomLevel!=="zoom1")this.zoomLevel="zoom1"}else{if(this.zoomLevel!=="normal")this.zoomLevel="normal"}};e.prototype.setupIntersectionObserver=function(){var e=this;var t=this.el.querySelectorAll("verdocs-envelope-document-page");if(t.length===0)return;if(this.observer){this.observer.disconnect()}var i=this.el.querySelector(".signed-document-container");var n={root:i,rootMargin:"-40% 0px -40% 0px",threshold:0};this.observer=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting){var i=t.target.id;var n=parseInt(i.replace("page-",""),10);if(!isNaN(n)&&e.pageNumber!==n){e.pageNumber=n}}}))}),n);t.forEach((function(t){return e.observer.observe(t)}))};e.prototype.getOrgStyleOverridesId=function(){return"verdocs-org-style-overrides-".concat(this.envelopeId)};e.prototype.applyOrgStyleOverrides=function(){var e,t;var i=this.getOrgStyleOverridesId();var n=document.getElementById(i);var o=(t=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||t===void 0?void 0:t.style_overrides;if(typeof o==="string"){var r=n||document.createElement("style");r.id=i;r.textContent=o;if(!n){document.head.appendChild(r)}}else if(n){n.remove()}};e.prototype.processAuthResponse=function(e){var t,i,n,o;var r=e.envelope,s=e.recipient;(t=r.documents)===null||t===void 0?void 0:t.sort((function(e,t){return e.order!==t.order?e.order-t.order:e.created_at.localeCompare(t.created_at)}));var a=s.auth_step;this.recipient=s;this.envelope=r;this.disclosures=((n=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||n===void 0?void 0:n.disclaimer)||DEFAULT_DISCLOSURES;this.applyOrgStyleOverrides();this.authStep=a;this.delegated=!!s.delegated_to;this.agreed=s.agreed;this.signatureId=null;this.initialId=null;this.submitted=s.status==="submitted";this.loading=false;this.isDone=this.submitted;this.showDone=this.submitted;Store.updateEnvelope(this.envelopeId,r);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=s.auth_method_states||{};this.kbaQuestions=s.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(s.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this request. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(o=this.envelopeLoaded)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);envelopeRecipientAgree(this.endpoint,this.envelopeId,this.roleId,this.disclosures).then((function(){var t;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(t){var i,n,o;console.log("[SIGN] Unable to accept disclosures",t);VerdocsToast("Unable to accept disclosures, please try again later",{style:"error"});(i=e.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(o=t.response)===null||o===void 0?void 0:o.data));e.submitting=false}))};e.prototype.handlePageSelect=function(e){var t=parseInt(e.target.value);if(!isNaN(t)){this.pageNumber=t;var i=this.el.querySelector(".signed-document-container");var n=this.el.querySelector("#page-".concat(t));if(i&&n){var o=n.offsetTop-20;i.scrollTo({top:o,behavior:"smooth"})}}};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(n){switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":this.showDownloadDialog=true;this.startPolling();break}return[2]}))}))};e.prototype.startPolling=function(){var e=this;this.stopPolling();var t=function(){var t,i,n,o,r,s;var a=((t=e.envelope)===null||t===void 0?void 0:t.status)==="complete"||!!((i=e.envelope)===null||i===void 0?void 0:i.signed);var l=(o=(n=e.envelope)===null||n===void 0?void 0:n.documents)===null||o===void 0?void 0:o.some((function(e){return e.type==="certificate"}));var c=(s=(r=e.envelope)===null||r===void 0?void 0:r.recipients)===null||s===void 0?void 0:s.every((function(e){return e.status==="submitted"}));if(a&&l)return false;if(!c)return false;return true};if(!t()){return}this.polling=true;this.pollingInterval=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,getEnvelope(this.endpoint,this.envelopeId)];case 1:e=n.sent();this.envelope=e;Store.updateEnvelope(this.envelopeId,e);this.checkRecipientFields();if(!t()){this.stopPolling()}return[3,3];case 2:i=n.sent();console.error("[SIGN] Polling error",i);this.stopPolling();return[3,3];case 3:return[2]}}))}))}),5e3)};e.prototype.stopPolling=function(){if(this.pollingInterval){clearInterval(this.pollingInterval);this.pollingInterval=null}this.polling=false};e.prototype.handleZoomIn=function(){if(this.zoomLevel==="normal"){this.zoomLevel="zoom1"}else if(this.zoomLevel==="zoom1"){this.zoomLevel="zoom2"}};e.prototype.handleZoomOut=function(){if(this.zoomLevel==="zoom1"){this.zoomLevel="normal"}else if(this.zoomLevel==="zoom2"){this.zoomLevel="zoom1"}};e.prototype.updateRecipientFieldValue=function(e,t){var i=this;console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=t.value;n.settings=t.settings;updateDocumentFieldValue(n);i.fieldUpdateCounter++;i.markEnvelopeStarted();i.checkRecipientFields()}}))};e.prototype.getStartedKey=function(){var e;return"".concat(this.envelopeId,":").concat(((e=this.recipient)===null||e===void 0?void 0:e.role_name)||"")};e.prototype.markEnvelopeStarted=function(){var e=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var t=this.getStartedKey();if(!e.includes(t)){e.push(t);while(e.length>10){e.shift()}localStorage.setItem("startedEnvelopes",JSON.stringify(e))}};e.prototype.saveFieldChange=function(e,t,i){var n=this;var o=this.getRecipientFields().find((function(t){return t.name===e}));if(o===null||o===void 0?void 0:o.readonly){return}console.log("[SIGN] saveFieldChange",e,{value:t,prepared:i});updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e,t,i).then((function(t){return n.updateRecipientFieldValue(e,t)})).catch((function(e){var t,i,o,r,s,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((o=(i=e.response)===null||i===void 0?void 0:i.data)===null||o===void 0?void 0:o.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.fatalErrorHeader="Signing Session Expired";n.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);VerdocsToast("Unable to save change, please try again later",{style:"error"})}(r=n.sdkError)===null||r===void 0?void 0:r.emit(new SDKError(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,o,r,s,s,s,a,s,s,s,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:if(!t.target){return[2]}i=t.target,n=i.value,o=i.checked;r=e.type;switch(r){case"textarea":return[3,1];case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,14];case"date":return[3,23];case"timestamp":return[3,24]}return[3,25];case 1:return[2,this.saveFieldChange(e.name,n,false)];case 2:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=3;case 3:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,t.detail,false)];case 5:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,7];console.log("[SIGN] Clearing initial");return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 6:s=u.sent();return[2,this.updateRecipientFieldValue(e.name,s)];case 7:if(!this.initialId)return[3,9];console.log("[SIGN] Reusing initial",this.initialId);return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,this.initialId,false)];case 8:s=u.sent();return[2,this.updateRecipientFieldValue(e.name,s)];case 9:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,11];console.log("[SIGN] Reusing initial",t.detail);return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 10:s=u.sent();this.initialId=t.detail;return[2,this.updateRecipientFieldValue(e.name,s)];case 11:this.showSpinner=true;return[4,fetch(t.detail)];case 12:return[4,u.sent().blob()];case 13:a=u.sent();return[2,createInitials(this.endpoint,"initial",a).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.initialId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);VerdocsToast("Unable to save initials, please try again later",{style:"error"});d.showSpinner=false}))];case 14:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,16];console.log("[SIGN] Clearing signature");return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 15:s=u.sent();return[2,this.updateRecipientFieldValue(e.name,s)];case 16:if(!this.signatureId)return[3,18];console.log("[SIGN] Reusing signature",this.signatureId);return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,this.signatureId,false)];case 17:s=u.sent();return[2,this.updateRecipientFieldValue(e.name,s)];case 18:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,20];console.log("[SIGN] Reusing signature",t.detail);return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 19:s=u.sent();this.signatureId=t.detail;return[2,this.updateRecipientFieldValue(e.name,s)];case 20:this.showSpinner=true;return[4,fetch(t.detail)];case 21:return[4,u.sent().blob()];case 22:l=u.sent();console.log("[SIGN] Creating new signature");return[2,createSignature(this.endpoint,"signature",l).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",t);return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.signatureId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);VerdocsToast("Unable to save signature, please try again later",{style:"error"});d.showSpinner=false}))];case 23:c=t.detail.formattedDate;if(c){return[2,this.saveFieldChange(e.name,c,false)]}return[3,26];case 24:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,26];case 25:console.log("[SIGN] Unhandled field update",{value:n,checked:o},e);return[3,26];case 26:return[2]}}))}))};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"&&!e.readonly}));sortFields(e);return e};e.prototype.getSortedDisplayableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));sortFields(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,r,s;var a=this;return __generator(this,(function(l){switch(l.label){case 0:if(!this.nextSubmits)return[3,5];l.label=1;case 1:l.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,envelopeRecipientSubmit(this.endpoint,this.envelopeId,this.roleId)];case 2:t=l.sent();console.log("[SIGN] Submitted successfully",t);window.location.reload();return[3,4];case 3:i=l.sent();console.log("[SIGN] Error submitting",i);this.submitting=false;VerdocsToast("Unable to submit document, please try again.",{style:"error"});return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return!a.isFieldActuallyFilled(e)}));o=this.getNextFieldFromList(n);if(o){r=getFieldId(o);s=document.getElementById(r);s===null||s===void 0?void 0:s.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});s===null||s===void 0?void 0:s.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.handleNextOptional=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)}));var i=this.getNextFieldFromList(t);if(i){var n=getFieldId(i);var o=document.getElementById(n);o===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});o===null||o===void 0?void 0:o.focusField();this.focusedField=i.name}};e.prototype.getRecipientFields=function(){var e=this;var t;return((t=this.envelope)===null||t===void 0?void 0:t.fields.filter((function(t){return t.role_name===e.recipient.role_name})))||[]};e.prototype.getRequiredTotalCount=function(){return this.getSortedFillableFields().filter((function(e){return e.required})).length};e.prototype.getRequiredFilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return t.required&&e.isFieldActuallyFilled(t)})).length};e.prototype.getOptionalUnfilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)})).length};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!isFieldValid(t,e.getRecipientFields())}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}this.updateAllFlags();var i=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var n=i.includes(this.getStartedKey());if(this.nextSubmits){this.signingProgressMode="completed"}else if(n){this.signingProgressMode="signing"}else{this.signingProgressMode="start"}};e.prototype.isFieldActuallyFilled=function(e){if(e.type==="radio"&&e.group){var t=this.getRecipientFields().some((function(t){return t.group===e.group&&t.value==="true"}));if(t){return true}}return isFieldFilled(e,this.getRecipientFields())&&(e.type!=="dropdown"||!!e.value)&&(e.type!=="radio"||e.value==="true")&&(e.type!=="checkbox"||e.value==="true")};e.prototype.getNextRequiredField=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return t.required&&!e.isFieldActuallyFilled(t)}));sortFields(t);if(t.length===0){var i=this.getSortedFillableFields().filter((function(t){return!e.isFieldActuallyFilled(t)}));sortFields(i);if(i.length>0){return this.getNextFieldFromList(i)}return null}return this.getNextFieldFromList(t)};e.prototype.getNextFieldFromList=function(e){var t=this;var i=e.findIndex((function(e){return e.name===t.focusedField}));var n=i+1;if(n>=e.length){n=0}return e[n]};e.prototype.handlePrev=function(){var e=this;var t;var i=this.getSortedFillableFields();var n=i.findIndex((function(t){return t.name===e.focusedField}));if(n>0){var o=i[n-1];var r=getFieldId(o);var s=document.getElementById(r);s===null||s===void 0?void 0:s.scrollIntoView({behavior:"smooth",block:"center"});(t=s===null||s===void 0?void 0:s.focusField)===null||t===void 0?void 0:t.call(s);this.focusedField=o.name}};e.prototype.updateAllFlags=function(){var e=this;Object.values(this.renderedPages).forEach((function(t){e.updateFlagsForPage(t)}))};e.prototype.updateFlagsForPage=function(e){var t=this;if(!e)return;var i=document.getElementById(e.containerId+"-controls");if(!i)return;var n=i.querySelectorAll(".verdocs-flag-instance");n.forEach((function(e){return e.remove()}));var o=this.getNextRequiredField();var r=this.getRecipientFields().find((function(e){return e.name===t.focusedField}));if(r&&!isFieldFilled(r,this.getRecipientFields())){o=r}if(o&&o.page===e.pageNumber&&o.document_id===e.documentId){var s="fill";var a="FILL";var l=false;switch(o.type){case"signature":a="SIGN";break;case"initial":a="INITIAL";break;case"checkbox":a="CHECK";break;case"radio":a="SELECT";break;case"date":case"dropdown":a="SELECT";break;case"attachment":a="ATTACH";break;case"payment":a="PAY";break;default:a="FILL";break}if(!o.required){l=true}renderDocumentFlag(e,o.y,o.height||defaultHeight(o.type),{variant:s,label:a,showSkip:l,onSkip:function(){t.handleNext()},onClick:function(){var e;var t=getFieldId(o);var i=document.getElementById(t);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center"});(e=i===null||i===void 0?void 0:i.focusField)===null||e===void 0?void 0:e.call(i)}})}};e.prototype.attachFieldAttributes=function(e,t,i){var n=this;if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(function(e){if(e.target.type==="radio"||e.target.type==="checkbox"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));i.addEventListener("attached",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,o,r;return __generator(this,(function(s){switch(s.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;s.label=1;case 1:s.trys.push([1,3,,4]);return[4,uploadEnvelopeFieldAttachment(this.endpoint,this.envelopeId,this.roleId,t.name,i.detail)];case 2:n=s.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:r=s.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("deleted",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,o,r;return __generator(this,(function(s){switch(s.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;s.label=1;case 1:s.trys.push([1,3,,4]);return[4,deleteEnvelopeFieldAttachment(this.endpoint,this.envelopeId,this.roleId,t.name)];case 2:n=s.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:r=s.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("focusout",(function(e){if(t.type!=="dropdown"&&t.type!=="attachment"&&t.type!=="signature"&&t.type!=="initial"&&t.type!=="checkbox"&&t.type!=="radio"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.addEventListener("adopt",(function(){n.focusedField=t.name;n.adoptingSignature=true}));i.setAttribute("templateid",this.envelope.template_id);i.setAttribute("fieldname",t.name);i.setAttribute("page",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);var o=formatFullName(this.recipient);i.setAttribute("initials",fullNameToInitials(o));i.setAttribute("name",o);if(this.signatureId){i.setAttribute("signatureid",this.signatureId)}if(this.initialId){i.setAttribute("initialid",this.initialId)}};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;this.renderedPages["".concat(i.documentId,":").concat(i.pageNumber)]=i;var n=this.getSortedDisplayableFields();n.filter((function(e){return e&&e.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e,n){var o=renderDocumentField("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!o){return}if(Array.isArray(o)){o.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,o)}}));this.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){t.getRecipientFields().filter((function(e){return e.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e){var n=renderDocumentField("envelope",e,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,n)}}))}));this.checkRecipientFields();this.updateFlagsForPage(i)};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);verifySigner(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,o,r,s,a;console.log("[SIGN] Error submitting authentication step",e);console.log((i=e.response)===null||i===void 0?void 0:i.data);if((r=(o=(n=e.response)===null||n===void 0?void 0:n.data)===null||o===void 0?void 0:o.error)===null||r===void 0?void 0:r.includes("failed")){t.fatalErrorHeader="Recipient Verification Failed";t.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";t.isDone=true}else{VerdocsToast(((a=(s=e.response)===null||s===void 0?void 0:s.data)===null||a===void 0?void 0:a.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;var t;if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:"Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.",buttonLabel:"OK",onNext:function(){window.location.reload()}}))}if(!this.envelope){return h(Host,null,h("verdocs-loader",null))}if(this.fatalErrorMessage){return h(Host,{class:{agreed:this.agreed}},h("div",{class:"fatal-error"},h("div",{class:"message"},h("div",{class:"header"},this.fatalErrorHeader),h("p",null,this.fatalErrorMessage))))}if(this.delegated){return h(Host,{class:{agreed:false}},h("div",{class:"fatal-error"},h("div",{class:"message"},h("div",{class:"header"},"Delegated Signing Request"),h("p",null,"You have delegated signing to another recipient. You will not be able to sign this request again."))))}if(this.isDone){return h(Host,{class:{agreed:this.agreed}},h("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var i;return(i=e.sdkError)===null||i===void 0?void 0:i.emit(t.detail)}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(t){t.preventDefault();t.stopPropagation();e.showDone=false;e.isDone=true}}),this.submitting&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))}if(this.delegating){return h(Host,{class:"agreed"},h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:function(){return e.delegating=false},onNext:function(t){delegateRecipient(e.endpoint,e.envelopeId,e.roleId,t.detail).then((function(t){VerdocsToast("Delegation request submitted.",{style:"success"});console.log("[SIGN] Delegated successfully",t);e.delegated=true;e.delegating=false})).catch((function(e){console.log("[SIGN] Error delegating request",e);VerdocsToast("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return h(Host,{class:"agreed"},h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("verdocs-ok-dialog",{heading:"Decline Signing Request",message:"If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.",buttonLabel:"OK",showCancel:true,onExit:function(){return e.declining=false},onNext:function(){envelopeRecipientDecline(e.endpoint,e.envelopeId,e.roleId).then((function(e){console.log("[SIGN] Decline result",e);window.location.reload()})).catch((function(e){console.warn("[SIGN] Error declining signing session",e);VerdocsToast("Unable to decline, please try again later",{style:"error"})}))}}))}if(!this.agreed){return h(Host,{class:"agreed"},h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("verdocs-disclosure-dialog",{disclosures:this.disclosures,delegator:this.recipient.delegator,onDelegate:function(){return e.delegating=true},onDecline:function(){return e.declining=true},onAccept:function(){return e.handleClickAgree()}}))}if(this.authStep==="passcode"){return h("verdocs-passcode-dialog",{endpoint:this.endpoint,onNext:function(t){return e.processAuthResponse(t.detail.response)}})}if(this.authStep==="email"){return h("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.processAuthResponse(t.detail.response);return[2]}))}))}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("div",{class:"cover"},h("div",{class:"kba"},h("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=t.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:e.first_name,last_name:e.last_name,address:e.address,city:e.city,state:e.state,zip:e.zip,dob:e.dob});return[2]}))}))}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){var i=this.kbaChoices.length;var n=this.kbaQuestions[i];return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("div",{class:"cover"},h("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?h("verdocs-spinner",null):h("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(n===null||n===void 0?void 0:n.prompt)||"Please select one of the options below.",choices:(n===null||n===void 0?void 0:n.answer)||["Skip Question"],step:i+1,steps:this.kbaQuestions.length,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i;var n=this;return __generator(this,(function(o){e=t.detail;this.kbaChoices=__spreadArray(__spreadArray([],this.kbaChoices,true),[e],false);if(this.kbaChoices.length>=this.kbaQuestions.length){i=this.kbaQuestions.map((function(e,t){return{type:e.type,answer:n.kbaChoices[t]}}));console.log("Submitting KBA responses",this.kbaChoices,i);this.handleAuthenticateSigner({auth_method:"kba",responses:i})}return[2]}))}))}}))))}var o=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var r=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){o.unshift({id:"delegate",label:"Delegate"})}var s=this.getRecipientFields().filter((function(t){return!isFieldValid(t,e.getRecipientFields())}));s.length>0?console.log("[SIGN] Invalid fields remaining",s.map((function(e){return e.name}))):console.log("[SIGN] All field valid");var a=this.envelope.documents.reduce((function(e,t){return e+t.pages}),0);var l=integerSequence(1,a).map((function(e){return{label:e.toString(),value:e.toString()}}));var c=0;return h(Host,null,this.toolbarStyle==="menu"&&h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),!this.finishLater&&function(){var t=e.getRequiredTotalCount()-e.getRequiredFilledCount();var i=e.getOptionalUnfilledCount();if(t>0){return h("span",{class:"remaining-count"},t," required field",t===1?"":"s"," left")}return h("span",{class:"remaining-count"},h("span",{class:"check-icon",innerHTML:CheckCircleIcon}),"All required fields complete",i>0&&h("span",{class:"separator"},"|"),i>0&&h("span",{class:"review-optional",onClick:function(){return e.handleNextOptional()}},"Review ",i," optional"))}(),!this.finishLater&&h("verdocs-button",{size:"xsmall",label:this.nextButtonLabel==="Next"?"Next Required":this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),h("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:ToolbarMinusIcon,onClick:function(){return e.handleZoomOut()}}),h("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:ToolbarPlusIcon,onClick:function(){return e.handleZoomIn()}}),h("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?o:r,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),this.toolbarStyle==="controls"&&h("div",{class:"controls-toolbar"},h("div",{class:"left-controls"},h("div",{class:"title"},this.envelope.name)),h("div",{class:"center-controls"},h("span",{class:"label"},"Page"),h("div",{class:"select-wrapper"},h("verdocs-select-input",{options:l,value:this.pageNumber.toString(),onInput:function(t){return e.handlePageSelect(t)}})),h("span",{class:"count"},"of ",a)),h("div",{class:"right-controls"},h("verdocs-button",{class:"mobile-next-button",label:this.nextButtonLabel,size:"xsmall",disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),h("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:ToolbarMinusIcon,onClick:function(){return e.handleZoomOut()}}),h("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:ToolbarPlusIcon,onClick:function(){return e.handleZoomIn()}}),h("div",{class:"icon-button download",innerHTML:ToolbarDownloadIcon,onClick:function(){return e.handleOptionSelected({detail:{id:"download"}})}}),h("div",{class:"icon-button print",innerHTML:ToolbarPrintIcon,onClick:function(){return e.handleOptionSelected({detail:{id:"print"}})}}))),h("div",{class:"document signed-document-container zoom-".concat(this.zoomLevel)},(this.envelope.documents||[]).map((function(t){var i=integerSequence(1,t.pages);return h(Fragment,null,e.envelope.documents.length>1&&h("div",{class:"document-separator"},h("div",{innerHTML:DocumentPageIcon}),h("span",null,t.name)),i.map((function(i){var n;var o=((n=t.page_sizes)===null||n===void 0?void 0:n[i])||{width:612,height:792};c++;return h("verdocs-envelope-document-page",{id:"page-".concat(c),envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:o.width,virtualHeight:o.height,pageNumber:i,onPageRendered:function(t){return e.handlePageRendered(t)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&h("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){e.isDone=true;e.showFinishLater=false}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.adoptingSignature&&h("verdocs-adopt-signature-dialog",{name:formatFullName(this.recipient),nameLocked:!!((t=this.recipient)===null||t===void 0?void 0:t.name_locked),onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,r,s,a,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:console.log("[SIGN] Adopting signature/initials block",t.detail);this.showSpinner=true;return[4,fetch(t.detail.signature)];case 1:return[4,u.sent().blob()];case 2:e=u.sent();return[4,fetch(t.detail.initials)];case 3:return[4,u.sent().blob()];case 4:i=u.sent();return[4,createSignature(this.endpoint,"signature",e)];case 5:n=u.sent();console.log("[SIGN] Created signature",n);this.signatureId=n.id;return[4,createInitials(this.endpoint,"initial",i)];case 6:o=u.sent();console.log("[SIGN] Created initials",o);this.initialId=o.id;this.showSpinner=false;this.adoptingSignature=false;this.markEnvelopeStarted();if(!this.focusedField)return[3,9];r=this.getRecipientFields().find((function(e){return e.name===d.focusedField}));if(!r)return[3,8];s=r.type==="signature"?this.signatureId:r.type==="initial"?this.initialId:null;if(!s)return[3,8];return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,r.name,s,false)];case 7:a=u.sent();this.updateRecipientFieldValue(r.name,a);u.label=8;case 8:this.focusedField="";u.label=9;case 9:l=this.el.querySelectorAll("verdocs-field-signature");l.forEach((function(e){return e.setAttribute("signatureid",d.signatureId)}));c=this.el.querySelectorAll("verdocs-field-initial");c.forEach((function(e){return e.setAttribute("initialid",d.initialId)}));this.checkRecipientFields();return[2]}}))}))},onExit:function(){return e.adoptingSignature=false}}),(this.submitting||this.showSpinner)&&h("verdocs-portal",null,h("div",{class:"spinner-overlay"},h("verdocs-spinner",null))),this.showDownloadDialog&&h("verdocs-download-dialog",{signed:this.envelope.signed,polling:this.polling,documents:this.envelope.documents,onExit:function(){e.showDownloadDialog=false;e.stopPolling()},onDownload:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,r,s,a,s,l,s,c,d;return __generator(this,(function(u){switch(u.label){case 0:i=t.detail,n=i.action,o=i.documentId;console.log("[SIGN] Download action selected:",n,o);u.label=1;case 1:u.trys.push([1,11,,12]);if(!(n==="document"))return[3,4];r=o||((e=this.envelope.documents.find((function(e){return e.type==="attachment"})))===null||e===void 0?void 0:e.id);if(!r)return[3,3];return[4,getEnvelopeDocumentDownloadLink(this.endpoint,r)];case 2:s=u.sent();window.open(s,"_blank");u.label=3;case 3:return[3,10];case 4:if(!(n==="certificate"))return[3,8];a=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!a)return[3,6];return[4,getEnvelopeDocumentDownloadLink(this.endpoint,a.id)];case 5:s=u.sent();window.open(s,"_blank");return[3,7];case 6:VerdocsToast("Certificate not yet available.",{style:"info"});u.label=7;case 7:return[3,10];case 8:if(!(n==="zip"))return[3,10];return[4,getEnvelopesZip(this.endpoint,[this.envelopeId])];case 9:l=u.sent();s=window.URL.createObjectURL(l.data);c=document.createElement("a");c.href=s;c.download="".concat(this.envelope.name,".zip");document.body.appendChild(c);c.click();c.remove();window.URL.revokeObjectURL(s);u.label=10;case 10:return[3,12];case 11:d=u.sent();console.error("Download error",d);VerdocsToast("Unable to complete download request.",{style:"error"});return[3,12];case 12:return[2]}}))}))}}),!this.loading&&!this.isDone&&h("verdocs-sign-footer",{endpoint:this.endpoint,envelopeId:this.envelopeId,isDone:this.isDone,onAskQuestion:function(t){askQuestion(e.endpoint,e.envelopeId,e.roleId,{question:t.detail.question}).then((function(){return VerdocsToast("Your question has been sent.",{style:"success"})})).catch((function(e){console.log("Error asking question",e);VerdocsToast("Unable to send question, please try again later.",{style:"error"})}))},onDecline:function(){return e.declining=true},onFinishLater:function(){return e.showFinishLater=true}}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsSign.style=verdocsSignCss;export{VerdocsSign as verdocs_sign};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function s(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,o,r,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=a(0),s["throw"]=a(1),s["return"]=a(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(n=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;o=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];o=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,o=t.length,r;n<o;n++){if(r||!(n in t)){if(!r)r=Array.prototype.slice.call(t,0,n);r[n]=t[n]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,g as getElement}from"./index-BIRwgFLv.js";import{VerdocsEndpoint,DEFAULT_DISCLOSURES,startSigningSession,envelopeRecipientAgree,getEnvelope,updateEnvelopeField,createSignature,createInitials,sortFields,envelopeRecipientSubmit,isFieldValid,isFieldFilled,uploadEnvelopeFieldAttachment,deleteEnvelopeFieldAttachment,formatFullName,fullNameToInitials,verifySigner,delegateRecipient,envelopeRecipientDecline,integerSequence,askQuestion,getEnvelopeDocumentDownloadLink,getEnvelopesZip}from"@verdocs/js-sdk";import{u as updateDocumentFieldValue,g as getFieldId,r as renderDocumentFlag,a as renderDocumentField,d as defaultHeight}from"./utils-CPSY5rft.js";import{D as DocumentPageIcon,C as CheckCircleIcon}from"./Icons-BU5rnXp2.js";import{V as VerdocsToast}from"./Toast-D97GxsI-.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-C7hFgM52.js";import"./index-dzBXqXlK.js";import"./Types-BqoC0yeA.js";var verdocsSignCss='verdocs-sign{display:-ms-flexbox;display:flex;overflow:hidden;min-height:700px;position:relative;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#f5f5f5;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;padding-right:140px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign>.document .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;max-width:1028px;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:#33364b;color:white;border-radius:6px;font-size:16px;font-weight:500;margin-top:20px;-webkit-box-shadow:0 2px 4px rgba(0, 0, 0, 0.1);box-shadow:0 2px 4px rgba(0, 0, 0, 0.1)}verdocs-sign>.document .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-sign>.document .document-separator:first-child{margin-top:0}verdocs-sign .signed-document-container{width:64%;margin-left:260px;-webkit-transition:all 0.3s ease;transition:all 0.3s ease}verdocs-sign .signed-document-container.zoom-normal{width:64%;margin-left:260px}verdocs-sign .signed-document-container.zoom-zoom1{width:80%;margin-left:200px}verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:150px}verdocs-sign .signed-document-container.zoom-zoom2 .verdocs-flag-instance{opacity:0;pointer-events:none}@media (max-width: 768px){verdocs-sign verdocs-sign-footer{padding:0 10px}verdocs-sign verdocs-sign-footer .buttons{gap:8px}verdocs-sign verdocs-sign-footer .buttons button{font-size:10px}verdocs-sign .signed-document-container{width:100%;margin-left:0}verdocs-sign .signed-document-container.zoom-normal,verdocs-sign .signed-document-container.zoom-zoom1,verdocs-sign .signed-document-container.zoom-zoom2{width:100%;margin-left:0}verdocs-sign>.document{padding-right:15px}verdocs-sign .verdocs-flag-instance{display:none !important}verdocs-sign .controls-toolbar .center-controls{display:none}verdocs-sign .controls-toolbar .right-controls .mobile-next-button{display:block;margin-right:10px}verdocs-sign .controls-toolbar .right-controls .minus,verdocs-sign .controls-toolbar .right-controls .plus{display:none}}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);margin-top:15px}verdocs-sign .fatal-error .message{max-width:360px;width:50%;font-size:16px;background:white;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header,.controls-toolbar,.verdocs-flag-instance,verdocs-signing-progress{display:none !important}verdocs-sign{min-height:auto;background-color:white}verdocs-sign>.document{overflow:visible;height:auto;display:block;padding:0;margin:0}verdocs-sign>.document .document-separator{display:none}verdocs-sign .signed-document-container{width:100%;margin:0}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}#verdocs-sign-header .remaining-count{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;gap:8px;color:#ffffff;font-size:13px;font-weight:400;white-space:nowrap}#verdocs-sign-header .remaining-count .check-icon{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}#verdocs-sign-header .remaining-count .check-icon svg{width:16px;height:16px;fill:#55bc81}#verdocs-sign-header .remaining-count .separator{opacity:0.5;margin:0 2px}#verdocs-sign-header .remaining-count .review-optional{cursor:pointer;text-decoration:underline}#verdocs-sign-header .remaining-count .review-optional:hover{color:#54d68c}#verdocs-sign-header .icon-button{width:20px;height:32px;display:-ms-flexbox;display:flex;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:4px;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}#verdocs-sign-header .icon-button svg path{fill:#ffffff}#verdocs-sign-header .icon-button:hover{background-color:rgba(255, 255, 255, 0.1)}#verdocs-sign-header .icon-button.disabled{opacity:0.35;pointer-events:none}#verdocs-sign-header .icon-button+.icon-button{margin-left:-6px}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}.controls-toolbar{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:54px;padding:0 12px 0 24px;background-color:#ffffff;border-bottom:1px solid #e0e0e0;-webkit-box-shadow:none;box-shadow:none;font-family:"Inter", sans-serif;color:#424242;z-index:1000}.controls-toolbar .left-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .left-controls .title{font-weight:500;font-size:16px;color:#242424;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.controls-toolbar .center-controls{-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:10px;font-size:14px;display:none}.controls-toolbar .center-controls .label{color:#000000;font-weight:300}.controls-toolbar .center-controls .select-wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.controls-toolbar .center-controls .select-wrapper verdocs-select-input{margin:0}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-label{display:none}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element{background:transparent;border:1px solid #e0e0e0;height:32px;padding:2px 8px;min-width:60px;text-align:center;font-family:inherit;color:#424242}.controls-toolbar .center-controls .select-wrapper verdocs-select-input .input-element:focus{border-color:var(--verdocs-primary-color, #55bc81)}.controls-toolbar .center-controls .count{color:#000000;font-weight:300}.controls-toolbar .right-controls{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.controls-toolbar .right-controls .mobile-next-button{display:none}.controls-toolbar .right-controls .icon-button{width:32px;height:32px;display:-ms-flexbox;display:flex;color:#424242;cursor:pointer;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:background-color 0.2s;transition:background-color 0.2s}.controls-toolbar .right-controls .icon-button:hover{background-color:#f5f5f5}.controls-toolbar .right-controls .icon-button.disabled{opacity:0.3;pointer-events:none}.controls-toolbar .right-controls .icon-button svg{display:block;width:20px;height:20px}';var ToolbarMinusIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 8C11.2761 8 11.5 8.22386 11.5 8.5C11.5 8.77614 11.2761 9 11 9H6C5.72386 9 5.5 8.77614 5.5 8.5C5.5 8.22386 5.72386 8 6 8H11ZM14 8.5C14 5.46243 11.5376 3 8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.83879 14 11.0659 13.5217 12.0196 12.7266L16.1464 16.8536L16.2157 16.9114C16.4106 17.0464 16.68 17.0271 16.8536 16.8536C17.0488 16.6583 17.0488 16.3417 16.8536 16.1464L12.7266 12.0196C13.5217 11.0659 14 9.83879 14 8.5ZM4 8.5C4 6.01472 6.01472 4 8.5 4C10.9853 4 13 6.01472 13 8.5C13 10.9853 10.9853 13 8.5 13C6.01472 13 4 10.9853 4 8.5Z" fill="#424242" /></svg>';var ToolbarPlusIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11.5 8.5C11.5 8.22386 11.2761 8 11 8H9V6C9 5.72386 8.77614 5.5 8.5 5.5C8.22386 5.5 8 5.72386 8 6V8H6C5.72386 8 5.5 8.22386 5.5 8.5C5.5 8.77614 5.72386 9 6 9H8V11C8 11.2761 8.22386 11.5 8.5 11.5C8.77614 11.5 9 11.2761 9 11V9H11C11.2761 9 11.5 8.77614 11.5 8.5ZM8.5 3C11.5376 3 14 5.46243 14 8.5C14 9.83879 13.5217 11.0659 12.7266 12.0196L16.8536 16.1464C17.0488 16.3417 17.0488 16.6583 16.8536 16.8536C16.68 17.0271 16.4106 17.0464 16.2157 16.9114L16.1464 16.8536L12.0196 12.7266C11.0659 13.5217 9.83879 14 8.5 14C5.46243 14 3 11.5376 3 8.5C3 5.46243 5.46243 3 8.5 3ZM8.5 4C6.01472 4 4 6.01472 4 8.5C4 10.9853 6.01472 13 8.5 13C10.9853 13 13 10.9853 13 8.5C13 6.01472 10.9853 4 8.5 4Z" fill="#424242" /></svg>';var ToolbarDownloadIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 16.9988C15.7761 16.9988 16 17.2226 16 17.4988C16 17.7442 15.8231 17.9484 15.5899 17.9907L15.5 17.9988H4.5C4.22386 17.9988 4 17.7749 4 17.4988C4 17.2533 4.17688 17.0492 4.41012 17.0068L4.5 16.9988H15.5ZM10.0001 2.00098C10.2456 2.00098 10.4497 2.17798 10.492 2.41124L10.5 2.50112L10.496 14.295L14.1414 10.6466C14.3148 10.4729 14.5842 10.4534 14.7792 10.5882L14.8485 10.646C15.0222 10.8194 15.0418 11.0888 14.907 11.2838L14.8492 11.3531L10.3574 15.8531C10.285 15.9257 10.1957 15.9714 10.1021 15.9901L9.99608 15.9999C9.83511 15.9999 9.69192 15.9237 9.60051 15.8056L5.14386 11.3537C4.94846 11.1586 4.94823 10.842 5.14336 10.6466C5.3168 10.4729 5.58621 10.4534 5.78117 10.5883L5.85046 10.6461L9.496 14.287L9.5 2.50083C9.50008 2.22469 9.724 2.00098 10.0001 2.00098Z" fill="#424242"/></svg>';var ToolbarPrintIcon='<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M5 4.5C5 3.67157 5.67157 3 6.5 3H13.5C14.3284 3 15 3.67157 15 4.5V5H15.5C16.8807 5 18 6.11929 18 7.5V12.5C18 13.3284 17.3284 14 16.5 14H15V15.5C15 16.3284 14.3284 17 13.5 17H6.5C5.67157 17 5 16.3284 5 15.5V14H3.5C2.67157 14 2 13.3284 2 12.5V7.5C2 6.11929 3.11929 5 4.5 5H5V4.5ZM6 5H14V4.5C14 4.22386 13.7761 4 13.5 4H6.5C6.22386 4 6 4.22386 6 4.5V5ZM5 13V11.5C5 10.6716 5.67157 10 6.5 10H13.5C14.3284 10 15 10.6716 15 11.5V13H16.5C16.7761 13 17 12.7761 17 12.5V7.5C17 6.67157 16.3284 6 15.5 6H4.5C3.67157 6 3 6.67157 3 7.5V12.5C3 12.7761 3.22386 13 3.5 13H5ZM6.5 11C6.22386 11 6 11.2239 6 11.5V15.5C6 15.7761 6.22386 16 6.5 16H13.5C13.7761 16 14 15.7761 14 15.5V11.5C14 11.2239 13.7761 11 13.5 11H6.5Z" fill="#424242"/></svg>';var VerdocsSign=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.envelopeLoaded=createEvent(this,"envelopeLoaded");this.envelopeUpdated=createEvent(this,"envelopeUpdated");this.endpoint=new VerdocsEndpoint({sessionType:"signing"});this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.toolbarStyle="menu";this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.disclosures=DEFAULT_DISCLOSURES;this.fieldUpdateCounter=0;this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.adoptingSignature=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.signatureId=null;this.initialId=null;this.documentsSingularPlural="document";this.authStep=null;this.authMethodStates={};this.pageNumber=1;this.kbaQuestions=null;this.showSpinner=false;this.declining=false;this.delegating=false;this.delegated=false;this.kbaChoices=[];this.showDownloadDialog=false;this.loading=true;this.envelope=null;this.zoomLevel="normal";this.signingProgressMode="start";this.polling=true;this.renderedPages={};this.pollingInterval=null}e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,r,s,a;var l=this;return __generator(this,(function(c){switch(c.label){case 0:this.updateZoomFromWindow();window.addEventListener("resize",(function(){return l.updateZoomFromWindow()}));if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new SDKError("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError("[SIGN] Missing required inviteCode",500,""));return[2]}c.label=1;case 1:c.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,startSigningSession(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:s=c.sent();this.processAuthResponse(s);return[3,4];case 3:a=c.sent();console.log("[SIGN] Error with signing session",a);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(a.message,(o=a.response)===null||o===void 0?void 0:o.status,(r=a.response)===null||r===void 0?void 0:r.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}this.setupIntersectionObserver()};e.prototype.disconnectedCallback=function(){var e=this;var t,i;this.stopPolling();(t=this.observer)===null||t===void 0?void 0:t.disconnect();window.removeEventListener("resize",(function(){return e.updateZoomFromWindow()}));(i=document.getElementById(this.getOrgStyleOverridesId()))===null||i===void 0?void 0:i.remove()};e.prototype.updateZoomFromWindow=function(){var e=window.innerWidth;if(e<768){if(this.zoomLevel!=="zoom2")this.zoomLevel="zoom2"}else if(e<1024){if(this.zoomLevel!=="zoom1")this.zoomLevel="zoom1"}else{if(this.zoomLevel!=="normal")this.zoomLevel="normal"}};e.prototype.setupIntersectionObserver=function(){var e=this;var t=this.el.querySelectorAll("verdocs-envelope-document-page");if(t.length===0)return;if(this.observer){this.observer.disconnect()}var i=this.el.querySelector(".signed-document-container");var n={root:i,rootMargin:"-40% 0px -40% 0px",threshold:0};this.observer=new IntersectionObserver((function(t){t.forEach((function(t){if(t.isIntersecting){var i=t.target.id;var n=parseInt(i.replace("page-",""),10);if(!isNaN(n)&&e.pageNumber!==n){e.pageNumber=n}}}))}),n);t.forEach((function(t){return e.observer.observe(t)}))};e.prototype.getOrgStyleOverridesId=function(){return"verdocs-org-style-overrides-".concat(this.envelopeId)};e.prototype.applyOrgStyleOverrides=function(){var e,t;var i=this.getOrgStyleOverridesId();var n=document.getElementById(i);var o=(t=(e=this.envelope)===null||e===void 0?void 0:e.organization)===null||t===void 0?void 0:t.style_overrides;if(typeof o==="string"){var r=n||document.createElement("style");r.id=i;r.textContent=o;if(!n){document.head.appendChild(r)}}else if(n){n.remove()}};e.prototype.processAuthResponse=function(e){var t,i,n,o;var r=e.envelope,s=e.recipient;(t=r.documents)===null||t===void 0?void 0:t.sort((function(e,t){return e.order!==t.order?e.order-t.order:e.created_at.localeCompare(t.created_at)}));var a=s.auth_step;this.recipient=s;this.envelope=r;this.disclosures=((n=(i=this.envelope)===null||i===void 0?void 0:i.organization)===null||n===void 0?void 0:n.disclaimer)||DEFAULT_DISCLOSURES;this.applyOrgStyleOverrides();this.authStep=a;this.delegated=!!s.delegated_to;this.agreed=s.agreed;this.signatureId=null;this.initialId=null;this.submitted=s.status==="submitted";this.loading=false;this.isDone=this.submitted;this.showDone=this.submitted;Store.updateEnvelope(this.envelopeId,r);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=s.auth_method_states||{};this.kbaQuestions=s.kba_questions;if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(s.status==="declined"){this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this request. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(o=this.envelopeLoaded)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,envelope:this.envelope})};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;console.log("[SIGN] Accepting disclosures",this.disclosures);envelopeRecipientAgree(this.endpoint,this.envelopeId,this.roleId,this.disclosures).then((function(){var t;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(t){var i,n,o;console.log("[SIGN] Unable to accept disclosures",t);VerdocsToast("Unable to accept disclosures, please try again later",{style:"error"});(i=e.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(o=t.response)===null||o===void 0?void 0:o.data));e.submitting=false}))};e.prototype.handlePageSelect=function(e){var t=parseInt(e.target.value);if(!isNaN(t)){this.pageNumber=t;var i=this.el.querySelector(".signed-document-container");var n=this.el.querySelector("#page-".concat(t));if(i&&n){var o=n.offsetTop-20;i.scrollTo({top:o,behavior:"smooth"})}}};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i;return __generator(this,(function(n){switch(e.detail.id){case"later":this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});break;case"delegate":this.delegating=true;break;case"decline":this.declining=true;break;case"print":window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});break;case"download":this.showDownloadDialog=true;this.startPolling();break}return[2]}))}))};e.prototype.startPolling=function(){var e=this;this.stopPolling();var t=function(){var t,i,n,o,r,s;var a=((t=e.envelope)===null||t===void 0?void 0:t.status)==="complete"||!!((i=e.envelope)===null||i===void 0?void 0:i.signed);var l=(o=(n=e.envelope)===null||n===void 0?void 0:n.documents)===null||o===void 0?void 0:o.some((function(e){return e.type==="certificate"}));var c=(s=(r=e.envelope)===null||r===void 0?void 0:r.recipients)===null||s===void 0?void 0:s.every((function(e){return e.status==="submitted"}));if(a&&l)return false;if(!c)return false;return true};if(!t()){return}this.polling=true;this.pollingInterval=setInterval((function(){return __awaiter(e,void 0,void 0,(function(){var e,i;return __generator(this,(function(n){switch(n.label){case 0:n.trys.push([0,2,,3]);return[4,getEnvelope(this.endpoint,this.envelopeId)];case 1:e=n.sent();this.envelope=e;Store.updateEnvelope(this.envelopeId,e);this.checkRecipientFields();if(!t()){this.stopPolling()}return[3,3];case 2:i=n.sent();console.error("[SIGN] Polling error",i);this.stopPolling();return[3,3];case 3:return[2]}}))}))}),5e3)};e.prototype.stopPolling=function(){if(this.pollingInterval){clearInterval(this.pollingInterval);this.pollingInterval=null}this.polling=false};e.prototype.handleZoomIn=function(){if(this.zoomLevel==="normal"){this.zoomLevel="zoom1"}else if(this.zoomLevel==="zoom1"){this.zoomLevel="zoom2"}};e.prototype.handleZoomOut=function(){if(this.zoomLevel==="zoom1"){this.zoomLevel="normal"}else if(this.zoomLevel==="zoom2"){this.zoomLevel="zoom1"}};e.prototype.updateRecipientFieldValue=function(e,t){var i=this;console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=t.value;n.settings=t.settings;updateDocumentFieldValue(n);i.fieldUpdateCounter++;i.markEnvelopeStarted();i.checkRecipientFields()}}))};e.prototype.getStartedKey=function(){var e;return"".concat(this.envelopeId,":").concat(((e=this.recipient)===null||e===void 0?void 0:e.role_name)||"")};e.prototype.markEnvelopeStarted=function(){var e=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var t=this.getStartedKey();if(!e.includes(t)){e.push(t);while(e.length>10){e.shift()}localStorage.setItem("startedEnvelopes",JSON.stringify(e))}};e.prototype.saveFieldChange=function(e,t,i){var n=this;var o=this.getRecipientFields().find((function(t){return t.name===e}));if(o===null||o===void 0?void 0:o.readonly){return}console.log("[SIGN] saveFieldChange",e,{value:t,prepared:i});updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e,t,i).then((function(t){return n.updateRecipientFieldValue(e,t)})).catch((function(e){var t,i,o,r,s,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((o=(i=e.response)===null||i===void 0?void 0:i.data)===null||o===void 0?void 0:o.error)==="jwt expired"){console.log("[SIGN] Signing session expired");n.fatalErrorHeader="Signing Session Expired";n.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e);VerdocsToast("Unable to save change, please try again later",{style:"error"})}(r=n.sdkError)===null||r===void 0?void 0:r.emit(new SDKError(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,o,r,s,s,s,a,s,s,s,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:if(!t.target){return[2]}i=t.target,n=i.value,o=i.checked;r=e.type;switch(r){case"textarea":return[3,1];case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,14];case"date":return[3,23];case"timestamp":return[3,24]}return[3,25];case 1:return[2,this.saveFieldChange(e.name,n,false)];case 2:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=3;case 3:{return[2,this.saveFieldChange(e.name,String(t.target.checked),false)]}u.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,t.detail,false)];case 5:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,7];console.log("[SIGN] Clearing initial");return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 6:s=u.sent();return[2,this.updateRecipientFieldValue(e.name,s)];case 7:if(!this.initialId)return[3,9];console.log("[SIGN] Reusing initial",this.initialId);return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,this.initialId,false)];case 8:s=u.sent();return[2,this.updateRecipientFieldValue(e.name,s)];case 9:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,11];console.log("[SIGN] Reusing initial",t.detail);return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 10:s=u.sent();this.initialId=t.detail;return[2,this.updateRecipientFieldValue(e.name,s)];case 11:this.showSpinner=true;return[4,fetch(t.detail)];case 12:return[4,u.sent().blob()];case 13:a=u.sent();return[2,createInitials(this.endpoint,"initial",a).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.initialId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);VerdocsToast("Unable to save initials, please try again later",{style:"error"});d.showSpinner=false}))];case 14:if(t.detail===undefined){return[2]}if(!(t.detail===null))return[3,16];console.log("[SIGN] Clearing signature");return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,null,false)];case 15:s=u.sent();return[2,this.updateRecipientFieldValue(e.name,s)];case 16:if(!this.signatureId)return[3,18];console.log("[SIGN] Reusing signature",this.signatureId);return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,this.signatureId,false)];case 17:s=u.sent();return[2,this.updateRecipientFieldValue(e.name,s)];case 18:if(!(typeof t.detail==="string"&&/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(t.detail)))return[3,20];console.log("[SIGN] Reusing signature",t.detail);return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,t.detail,false)];case 19:s=u.sent();this.signatureId=t.detail;return[2,this.updateRecipientFieldValue(e.name,s)];case 20:this.showSpinner=true;return[4,fetch(t.detail)];case 21:return[4,u.sent().blob()];case 22:l=u.sent();console.log("[SIGN] Creating new signature");return[2,createSignature(this.endpoint,"signature",l).then((function(t){return __awaiter(d,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",t);return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,e.name,t.id,false)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.signatureId=t.id;this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);VerdocsToast("Unable to save signature, please try again later",{style:"error"});d.showSpinner=false}))];case 23:c=t.detail.formattedDate;if(c){return[2,this.saveFieldChange(e.name,c,false)]}return[3,26];case 24:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,26];case 25:console.log("[SIGN] Unhandled field update",{value:n,checked:o},e);return[3,26];case 26:return[2]}}))}))};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"&&!e.readonly}));sortFields(e);return e};e.prototype.getSortedDisplayableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));sortFields(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,r,s;var a=this;return __generator(this,(function(l){switch(l.label){case 0:if(!this.nextSubmits)return[3,5];l.label=1;case 1:l.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,envelopeRecipientSubmit(this.endpoint,this.envelopeId,this.roleId)];case 2:t=l.sent();console.log("[SIGN] Submitted successfully",t);window.location.reload();return[3,4];case 3:i=l.sent();console.log("[SIGN] Error submitting",i);this.submitting=false;VerdocsToast("Unable to submit document, please try again.",{style:"error"});return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return!a.isFieldActuallyFilled(e)}));o=this.getNextFieldFromList(n);if(o){r=getFieldId(o);s=document.getElementById(r);s===null||s===void 0?void 0:s.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});s===null||s===void 0?void 0:s.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.handleNextOptional=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)}));var i=this.getNextFieldFromList(t);if(i){var n=getFieldId(i);var o=document.getElementById(n);o===null||o===void 0?void 0:o.scrollIntoView({behavior:"smooth",block:"center",inline:"center"});o===null||o===void 0?void 0:o.focusField();this.focusedField=i.name}};e.prototype.getRecipientFields=function(){var e=this;var t;return((t=this.envelope)===null||t===void 0?void 0:t.fields.filter((function(t){return t.role_name===e.recipient.role_name})))||[]};e.prototype.getRequiredTotalCount=function(){return this.getSortedFillableFields().filter((function(e){return e.required})).length};e.prototype.getRequiredFilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return t.required&&e.isFieldActuallyFilled(t)})).length};e.prototype.getOptionalUnfilledCount=function(){var e=this;return this.getSortedFillableFields().filter((function(t){return!t.required&&!e.isFieldActuallyFilled(t)})).length};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!isFieldValid(t,e.getRecipientFields())}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{this.nextButtonLabel="Next";this.nextSubmits=false}this.updateAllFlags();var i=JSON.parse(localStorage.getItem("startedEnvelopes")||"[]");var n=i.includes(this.getStartedKey());if(this.nextSubmits){this.signingProgressMode="completed"}else if(n){this.signingProgressMode="signing"}else{this.signingProgressMode="start"}};e.prototype.isFieldActuallyFilled=function(e){if(e.type==="radio"&&e.group){var t=this.getRecipientFields().some((function(t){return t.group===e.group&&t.value==="true"}));if(t){return true}}return isFieldFilled(e,this.getRecipientFields())&&(e.type!=="dropdown"||!!e.value)&&(e.type!=="radio"||e.value==="true")&&(e.type!=="checkbox"||e.value==="true")};e.prototype.getNextRequiredField=function(){var e=this;var t=this.getSortedFillableFields().filter((function(t){return t.required&&!e.isFieldActuallyFilled(t)}));sortFields(t);if(t.length===0){var i=this.getSortedFillableFields().filter((function(t){return!e.isFieldActuallyFilled(t)}));sortFields(i);if(i.length>0){return this.getNextFieldFromList(i)}return null}return this.getNextFieldFromList(t)};e.prototype.getNextFieldFromList=function(e){var t=this;var i=e.findIndex((function(e){return e.name===t.focusedField}));var n=i+1;if(n>=e.length){n=0}return e[n]};e.prototype.handlePrev=function(){var e=this;var t;var i=this.getSortedFillableFields();var n=i.findIndex((function(t){return t.name===e.focusedField}));if(n>0){var o=i[n-1];var r=getFieldId(o);var s=document.getElementById(r);s===null||s===void 0?void 0:s.scrollIntoView({behavior:"smooth",block:"center"});(t=s===null||s===void 0?void 0:s.focusField)===null||t===void 0?void 0:t.call(s);this.focusedField=o.name}};e.prototype.updateAllFlags=function(){var e=this;Object.values(this.renderedPages).forEach((function(t){e.updateFlagsForPage(t)}))};e.prototype.updateFlagsForPage=function(e){var t=this;if(!e)return;var i=document.getElementById(e.containerId+"-controls");if(!i)return;var n=i.querySelectorAll(".verdocs-flag-instance");n.forEach((function(e){return e.remove()}));var o=this.getNextRequiredField();var r=this.getRecipientFields().find((function(e){return e.name===t.focusedField}));if(r&&!isFieldFilled(r,this.getRecipientFields())){o=r}if(o&&o.page===e.pageNumber&&o.document_id===e.documentId){var s="fill";var a="FILL";var l=false;switch(o.type){case"signature":a="SIGN";break;case"initial":a="INITIAL";break;case"checkbox":a="CHECK";break;case"radio":a="SELECT";break;case"date":case"dropdown":a="SELECT";break;case"attachment":a="ATTACH";break;case"payment":a="PAY";break;default:a="FILL";break}if(!o.required){l=true}renderDocumentFlag(e,o.y,o.height||defaultHeight(o.type),{variant:s,label:a,showSkip:l,onSkip:function(){t.handleNext()},onClick:function(){var e;var t=getFieldId(o);var i=document.getElementById(t);i===null||i===void 0?void 0:i.scrollIntoView({behavior:"smooth",block:"center"});(e=i===null||i===void 0?void 0:i.focusField)===null||e===void 0?void 0:e.call(i)}})}};e.prototype.attachFieldAttributes=function(e,t,i){var n=this;if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(function(e){if(e.target.type==="radio"||e.target.type==="checkbox"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));i.addEventListener("attached",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,o,r;return __generator(this,(function(s){switch(s.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;s.label=1;case 1:s.trys.push([1,3,,4]);return[4,uploadEnvelopeFieldAttachment(this.endpoint,this.envelopeId,this.roleId,t.name,i.detail)];case 2:n=s.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:r=s.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("deleted",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,o,r;return __generator(this,(function(s){switch(s.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;s.label=1;case 1:s.trys.push([1,3,,4]);return[4,deleteEnvelopeFieldAttachment(this.endpoint,this.envelopeId,this.roleId,t.name)];case 2:n=s.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();o=renderDocumentField("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,o);this.showSpinner=false;return[3,4];case 3:r=s.sent();console.log("Error uploading attachment",r);VerdocsToast("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("focusout",(function(e){if(t.type!=="dropdown"&&t.type!=="attachment"&&t.type!=="signature"&&t.type!=="initial"&&t.type!=="checkbox"&&t.type!=="radio"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.addEventListener("adopt",(function(){n.focusedField=t.name;n.adoptingSignature=true}));i.setAttribute("templateid",this.envelope.template_id);i.setAttribute("fieldname",t.name);i.setAttribute("page",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);var o=formatFullName(this.recipient);i.setAttribute("initials",fullNameToInitials(o));i.setAttribute("name",o);if(this.signatureId){i.setAttribute("signatureid",this.signatureId)}if(this.initialId){i.setAttribute("initialid",this.initialId)}};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;this.renderedPages["".concat(i.documentId,":").concat(i.pageNumber)]=i;var n=this.getSortedDisplayableFields();n.filter((function(e){return e&&e.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e,n){var o=renderDocumentField("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!o){return}if(Array.isArray(o)){o.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,o)}}));this.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){t.getRecipientFields().filter((function(e){return e.document_id===i.documentId&&e.page===i.pageNumber})).forEach((function(e){var n=renderDocumentField("envelope",e,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,n)}}))}));this.checkRecipientFields();this.updateFlagsForPage(i)};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);verifySigner(this.endpoint,e).then((function(e){console.log("[SIGN] Verification successful",e);t.processAuthResponse(e)})).catch((function(e){var i,n,o,r,s,a;console.log("[SIGN] Error submitting authentication step",e);console.log((i=e.response)===null||i===void 0?void 0:i.data);if((r=(o=(n=e.response)===null||n===void 0?void 0:n.data)===null||o===void 0?void 0:o.error)===null||r===void 0?void 0:r.includes("failed")){t.fatalErrorHeader="Recipient Verification Failed";t.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";t.isDone=true}else{VerdocsToast(((a=(s=e.response)===null||s===void 0?void 0:s.data)===null||a===void 0?void 0:a.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;var t;if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:"Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.",buttonLabel:"OK",onNext:function(){window.location.reload()}}))}if(!this.envelope){return h(Host,null,h("verdocs-loader",null))}if(this.fatalErrorMessage){return h(Host,{class:{agreed:this.agreed}},h("div",{class:"fatal-error"},h("div",{class:"message"},h("div",{class:"header"},this.fatalErrorHeader),h("p",null,this.fatalErrorMessage))))}if(this.delegated){return h(Host,{class:{agreed:false}},h("div",{class:"fatal-error"},h("div",{class:"message"},h("div",{class:"header"},"Delegated Signing Request"),h("p",null,"You have delegated signing to another recipient. You will not be able to sign this request again."))))}if(this.isDone){return h(Host,{class:{agreed:this.agreed}},h("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var i;return(i=e.sdkError)===null||i===void 0?void 0:i.emit(t.detail)}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(t){t.preventDefault();t.stopPropagation();e.showDone=false;e.isDone=true}}),this.submitting&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)))}if(this.delegating){return h(Host,{class:"agreed"},h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("verdocs-delegate-dialog",{endpoint:this.endpoint,envelope:this.envelope,onExit:function(){return e.delegating=false},onNext:function(t){delegateRecipient(e.endpoint,e.envelopeId,e.roleId,t.detail).then((function(t){VerdocsToast("Delegation request submitted.",{style:"success"});console.log("[SIGN] Delegated successfully",t);e.delegated=true;e.delegating=false})).catch((function(e){console.log("[SIGN] Error delegating request",e);VerdocsToast("Unable to process delegation request. Please try again later.",{style:"error"})}))}}))}if(this.declining){return h(Host,{class:"agreed"},h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("verdocs-ok-dialog",{heading:"Decline Signing Request",message:"If you decline to sign this request, you will not be able to sign again in the future. The envelope sender will be notified.",buttonLabel:"OK",showCancel:true,onExit:function(){return e.declining=false},onNext:function(){envelopeRecipientDecline(e.endpoint,e.envelopeId,e.roleId).then((function(e){console.log("[SIGN] Decline result",e);window.location.reload()})).catch((function(e){console.warn("[SIGN] Error declining signing session",e);VerdocsToast("Unable to decline, please try again later",{style:"error"})}))}}))}if(!this.agreed){return h(Host,{class:"agreed"},h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("verdocs-disclosure-dialog",{disclosures:this.disclosures,delegator:this.recipient.delegator,onDelegate:function(){return e.delegating=true},onDecline:function(){return e.declining=true},onAccept:function(){return e.handleClickAgree()}}))}if(this.authStep==="passcode"){return h("verdocs-passcode-dialog",{endpoint:this.endpoint,onNext:function(t){return e.processAuthResponse(t.detail.response)}})}if(this.authStep==="email"){return h("verdocs-otp-dialog",{endpoint:this.endpoint,method:"email",onNext:function(t){return __awaiter(e,void 0,void 0,(function(){return __generator(this,(function(e){this.processAuthResponse(t.detail.response);return[2]}))}))}})}if(this.authStep==="kba"&&!this.authMethodStates.kba){return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("div",{class:"cover"},h("div",{class:"kba"},h("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=t.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:e.first_name,last_name:e.last_name,address:e.address,city:e.city,state:e.state,zip:e.zip,dob:e.dob});return[2]}))}))}}))))}if(this.authStep==="kba"&&this.authMethodStates.kba==="questions"){var i=this.kbaChoices.length;var n=this.kbaQuestions[i];return h(Host,{class:"kba"},h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name))),h("div",{class:"document",style:{paddingTop:"15px"}},h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),h("div",{class:"cover"},h("div",{class:"kba"},this.kbaChoices.length>=this.kbaQuestions.length?h("verdocs-spinner",null):h("verdocs-kba-dialog",{mode:"choice",helptitle:"Your identity requires additional verification",helptext:(n===null||n===void 0?void 0:n.prompt)||"Please select one of the options below.",choices:(n===null||n===void 0?void 0:n.answer)||["Skip Question"],step:i+1,steps:this.kbaQuestions.length,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i;var n=this;return __generator(this,(function(o){e=t.detail;this.kbaChoices=__spreadArray(__spreadArray([],this.kbaChoices,true),[e],false);if(this.kbaChoices.length>=this.kbaQuestions.length){i=this.kbaQuestions.map((function(e,t){return{type:e.type,answer:n.kbaChoices[t]}}));console.log("Submitting KBA responses",this.kbaChoices,i);this.handleAuthenticateSigner({auth_method:"kba",responses:i})}return[2]}))}))}}))))}var o=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var r=[{id:"print",label:"Print"},{id:"download",label:"Download"}];if(this.recipient.delegator){o.unshift({id:"delegate",label:"Delegate"})}var s=this.getRecipientFields().filter((function(t){return!isFieldValid(t,e.getRecipientFields())}));s.length>0?console.log("[SIGN] Invalid fields remaining",s.map((function(e){return e.name}))):console.log("[SIGN] All field valid");var a=this.envelope.documents.reduce((function(e,t){return e+t.pages}),0);var l=integerSequence(1,a).map((function(e){return{label:e.toString(),value:e.toString()}}));var c=0;return h(Host,null,this.toolbarStyle==="menu"&&h("div",{id:"verdocs-sign-header"},h("div",{class:"inner"},h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),!this.finishLater&&function(){var t=e.getRequiredTotalCount()-e.getRequiredFilledCount();var i=e.getOptionalUnfilledCount();if(t>0){return h("span",{class:"remaining-count"},t," required field",t===1?"":"s"," left")}return h("span",{class:"remaining-count"},h("span",{class:"check-icon",innerHTML:CheckCircleIcon}),"All required fields complete",i>0&&h("span",{class:"separator"},"|"),i>0&&h("span",{class:"review-optional",onClick:function(){return e.handleNextOptional()}},"Review ",i," optional"))}(),!this.finishLater&&h("verdocs-button",{size:"xsmall",label:this.nextButtonLabel==="Next"?"Next Required":this.nextButtonLabel,disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),h("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:ToolbarMinusIcon,onClick:function(){return e.handleZoomOut()}}),h("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:ToolbarPlusIcon,onClick:function(){return e.handleZoomIn()}}),h("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?o:r,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),this.toolbarStyle==="controls"&&h("div",{class:"controls-toolbar"},h("div",{class:"left-controls"},h("div",{class:"title"},this.envelope.name)),h("div",{class:"center-controls"},h("span",{class:"label"},"Page"),h("div",{class:"select-wrapper"},h("verdocs-select-input",{options:l,value:this.pageNumber.toString(),onInput:function(t){return e.handlePageSelect(t)}})),h("span",{class:"count"},"of ",a)),h("div",{class:"right-controls"},h("verdocs-button",{class:"mobile-next-button",label:this.nextButtonLabel,size:"xsmall",disabled:!this.agreed||this.submitting,onClick:function(){return e.handleNext()}}),h("div",{class:{"icon-button":true,minus:true,disabled:this.zoomLevel==="normal"},innerHTML:ToolbarMinusIcon,onClick:function(){return e.handleZoomOut()}}),h("div",{class:{"icon-button":true,plus:true,disabled:this.zoomLevel==="zoom2"},innerHTML:ToolbarPlusIcon,onClick:function(){return e.handleZoomIn()}}),h("div",{class:"icon-button download",innerHTML:ToolbarDownloadIcon,onClick:function(){return e.handleOptionSelected({detail:{id:"download"}})}}),h("div",{class:"icon-button print",innerHTML:ToolbarPrintIcon,onClick:function(){return e.handleOptionSelected({detail:{id:"print"}})}}))),h("div",{class:"document signed-document-container zoom-".concat(this.zoomLevel)},(this.envelope.documents||[]).map((function(t){var i=integerSequence(1,t.pages);return h(Fragment,null,e.envelope.documents.length>1&&h("div",{class:"document-separator"},h("div",{innerHTML:DocumentPageIcon}),h("span",null,t.name)),i.map((function(i){var n;var o=((n=t.page_sizes)===null||n===void 0?void 0:n[i])||{width:612,height:792};c++;return h("verdocs-envelope-document-page",{id:"page-".concat(c),envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:o.width,virtualHeight:o.height,pageNumber:i,onPageRendered:function(t){return e.handlePageRendered(t)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&h("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){e.isDone=true;e.showFinishLater=false}}),this.showDone&&h("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.adoptingSignature&&h("verdocs-adopt-signature-dialog",{name:formatFullName(this.recipient),nameLocked:!!((t=this.recipient)===null||t===void 0?void 0:t.name_locked),onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,r,s,a,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:console.log("[SIGN] Adopting signature/initials block",t.detail);this.showSpinner=true;return[4,fetch(t.detail.signature)];case 1:return[4,u.sent().blob()];case 2:e=u.sent();return[4,fetch(t.detail.initials)];case 3:return[4,u.sent().blob()];case 4:i=u.sent();return[4,createSignature(this.endpoint,"signature",e)];case 5:n=u.sent();console.log("[SIGN] Created signature",n);this.signatureId=n.id;return[4,createInitials(this.endpoint,"initial",i)];case 6:o=u.sent();console.log("[SIGN] Created initials",o);this.initialId=o.id;this.showSpinner=false;this.adoptingSignature=false;this.markEnvelopeStarted();if(!this.focusedField)return[3,9];r=this.getRecipientFields().find((function(e){return e.name===d.focusedField}));if(!r)return[3,8];s=r.type==="signature"?this.signatureId:r.type==="initial"?this.initialId:null;if(!s)return[3,8];return[4,updateEnvelopeField(this.endpoint,this.envelopeId,this.roleId,r.name,s,false)];case 7:a=u.sent();this.updateRecipientFieldValue(r.name,a);u.label=8;case 8:this.focusedField="";u.label=9;case 9:l=this.el.querySelectorAll("verdocs-field-signature");l.forEach((function(e){return e.setAttribute("signatureid",d.signatureId)}));c=this.el.querySelectorAll("verdocs-field-initial");c.forEach((function(e){return e.setAttribute("initialid",d.initialId)}));this.checkRecipientFields();return[2]}}))}))},onExit:function(){return e.adoptingSignature=false}}),(this.submitting||this.showSpinner)&&h("verdocs-portal",null,h("div",{class:"spinner-overlay"},h("verdocs-spinner",null))),this.showDownloadDialog&&h("verdocs-download-dialog",{signed:this.envelope.signed,polling:this.polling,documents:this.envelope.documents,onExit:function(){e.showDownloadDialog=false;e.stopPolling()},onDownload:function(t){return __awaiter(e,void 0,void 0,(function(){var e,i,n,o,r,s,a,s,l,s,c,d;return __generator(this,(function(u){switch(u.label){case 0:i=t.detail,n=i.action,o=i.documentId;console.log("[SIGN] Download action selected:",n,o);u.label=1;case 1:u.trys.push([1,11,,12]);if(!(n==="document"))return[3,4];r=o||((e=this.envelope.documents.find((function(e){return e.type==="attachment"})))===null||e===void 0?void 0:e.id);if(!r)return[3,3];return[4,getEnvelopeDocumentDownloadLink(this.endpoint,r)];case 2:s=u.sent();window.open(s,"_blank");u.label=3;case 3:return[3,10];case 4:if(!(n==="certificate"))return[3,8];a=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!a)return[3,6];return[4,getEnvelopeDocumentDownloadLink(this.endpoint,a.id)];case 5:s=u.sent();window.open(s,"_blank");return[3,7];case 6:VerdocsToast("Certificate not yet available.",{style:"info"});u.label=7;case 7:return[3,10];case 8:if(!(n==="zip"))return[3,10];return[4,getEnvelopesZip(this.endpoint,[this.envelopeId])];case 9:l=u.sent();s=window.URL.createObjectURL(l.data);c=document.createElement("a");c.href=s;c.download="".concat(this.envelope.name,".zip");document.body.appendChild(c);c.click();c.remove();window.URL.revokeObjectURL(s);u.label=10;case 10:return[3,12];case 11:d=u.sent();console.error("Download error",d);VerdocsToast("Unable to complete download request.",{style:"error"});return[3,12];case 12:return[2]}}))}))}}),!this.loading&&!this.isDone&&h("verdocs-sign-footer",{endpoint:this.endpoint,envelopeId:this.envelopeId,isDone:this.isDone,onAskQuestion:function(t){askQuestion(e.endpoint,e.envelopeId,e.roleId,{question:t.detail.question}).then((function(){return VerdocsToast("Your question has been sent.",{style:"success"})})).catch((function(e){console.log("Error asking question",e);VerdocsToast("Unable to send question, please try again later.",{style:"error"})}))},onDecline:function(){return e.declining=true},onFinishLater:function(){return e.showFinishLater=true}}))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsSign.style=verdocsSignCss;export{VerdocsSign as verdocs_sign};
|
|
2
2
|
//# sourceMappingURL=verdocs-sign.entry.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h}from"./index-BIRwgFLv.js";import{isFieldFilled}from"@verdocs/js-sdk";import{b as getFieldLabel}from"./utils-
|
|
1
|
+
import{r as registerInstance,c as createEvent,h}from"./index-BIRwgFLv.js";import{isFieldFilled}from"@verdocs/js-sdk";import{b as getFieldLabel}from"./utils-CPSY5rft.js";import"./index-dzBXqXlK.js";import"./Types-BqoC0yeA.js";var verdocsSigningProgressCss='verdocs-signing-progress{position:fixed;top:64px;left:20px;z-index:900;display:block;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}@media (max-width: 600px){verdocs-signing-progress{display:none}}verdocs-signing-progress .card{background:white;padding:16px;border-radius:8px;-webkit-box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);width:240px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}verdocs-signing-progress .header{font-size:14px;color:#111827;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:6px}verdocs-signing-progress .header .progress-line.optional{color:#6b7280}verdocs-signing-progress .header-completed{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;font-size:14px;font-weight:500;color:#111827}verdocs-signing-progress .description{font-size:12px;line-height:16px;color:#374151}verdocs-signing-progress .field-label{font-family:var(--verdocs-primary-font, var(--verdocs-primary-font, "Inter", "Barlow", sans-serif));font-size:0.75rem;line-height:1rem;font-weight:400;color:var(--verdocs-body-color, #242424)}verdocs-signing-progress .field-completed{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;font-size:0.75rem;line-height:1rem;font-weight:400;color:var(--verdocs-body-color, #242424)}verdocs-signing-progress .field-completed .text{position:relative;top:-2px}verdocs-signing-progress .separator{height:1px;background-color:#e5e7eb;width:100%}verdocs-signing-progress .btn{width:100%;height:32px;border-radius:4px;font-weight:600;font-size:0.75rem;line-height:1rem;cursor:pointer;border:1px solid transparent;-webkit-transition:all 0.2s;transition:all 0.2s;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-signing-progress .btn:disabled{background-color:#f0f0f0;border:1px solid #e0e0e0;color:#bdbdbd;cursor:not-allowed;opacity:1}verdocs-signing-progress .btn.start,verdocs-signing-progress .btn.submit,verdocs-signing-progress .btn.next{background-color:var(--verdocs-primary-color, #55bc81);color:white}verdocs-signing-progress .btn.start:hover:not(:disabled),verdocs-signing-progress .btn.submit:hover:not(:disabled),verdocs-signing-progress .btn.next:hover:not(:disabled){background-color:var(--verdocs-primary-color-hover, #2b995b)}verdocs-signing-progress .btn.start:disabled,verdocs-signing-progress .btn.submit:disabled,verdocs-signing-progress .btn.next:disabled{background-color:#f0f0f0;border:1px solid #e0e0e0;color:#bdbdbd;cursor:not-allowed;opacity:1}verdocs-signing-progress .btn.prev,verdocs-signing-progress .btn.previous{background-color:#f3f4f6;color:#374151}verdocs-signing-progress .btn.prev:hover:not(:disabled),verdocs-signing-progress .btn.previous:hover:not(:disabled){background-color:#e5e7eb}verdocs-signing-progress .btn.prev:disabled,verdocs-signing-progress .btn.previous:disabled{background-color:#f0f0f0;border:1px solid #e0e0e0;color:#bdbdbd;cursor:not-allowed;opacity:1}verdocs-signing-progress .nav-buttons{display:-ms-flexbox;display:flex;gap:12px;width:100%}verdocs-signing-progress .nav-buttons .btn{-ms-flex:1;flex:1}';var VerdocsSigningProgress=function(){function s(s){registerInstance(this,s);this.started=createEvent(this,"started");this.next=createEvent(this,"next");this.previous=createEvent(this,"previous");this.exit=createEvent(this,"exit");this.mode="start";this.focusedField="";this.fields=[];this.recipientFields=[]}s.prototype.renderSuccessIcon=function(){return h("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3ZM13.3584 7.64645C13.532 7.82001 13.5513 8.08944 13.4163 8.28431L13.3584 8.35355L9.35355 12.3584C9.17999 12.532 8.91056 12.5513 8.71569 12.4163L8.64645 12.3584L6.64645 10.3584C6.45118 10.1632 6.45118 9.84658 6.64645 9.65131C6.82001 9.47775 7.08944 9.45846 7.28431 9.59346L7.35355 9.65131L9 11.298L12.6513 7.64645C12.8466 7.45118 13.1632 7.45118 13.3584 7.64645Z",fill:"#107C10"}))};s.prototype.renderContent=function(s,e,r){if(this.mode==="start"){return h("div",{class:"field-label"},s)}if(e&&r){return h("div",{class:"field-completed"},h("div",{class:"icon"},this.renderSuccessIcon()),h("span",{class:"text"},"Ready to submit."))}return h("div",{class:"field-label"},s)};s.prototype.renderFooter=function(s,e,r){var i=this;if(this.mode==="start"){return h("button",{class:"btn start",onClick:function(){return i.started.emit()}},"Start Signing")}return h("div",{class:"nav-buttons"},r===0?h("button",{class:"btn submit",onClick:function(){return i.exit.emit()}},"Submit"):[h("button",{class:"btn previous",disabled:s<=1,onClick:function(){return i.previous.emit()}},"Previous"),h("button",{class:"btn next",disabled:s>=e,onClick:function(){return i.next.emit()}},"Next")])};s.prototype.renderCompleted=function(){var s=this;return h("div",{class:"card completed"},h("div",{class:"header-completed"},h("div",{class:"icon"},this.renderSuccessIcon()),"Ready to Submit"),h("div",{class:"description"},"You have entered all requested signatures. Select Submit to complete the signing process."),h("div",{class:"separator"}),h("button",{class:"btn submit",onClick:function(){return s.exit.emit()}},"Submit"))};s.prototype.render=function(){var s=this;if(this.mode==="completed"){return this.renderCompleted()}var e=function(e){return isFieldFilled(e,s.recipientFields)&&(e.type!=="dropdown"||!!e.value)&&(e.type!=="radio"||e.value==="true")&&(e.type!=="checkbox"||e.value==="true")};var r=this.fields.filter((function(s){return s.required}));var i=r.filter((function(s){return!e(s)})).length;var o=this.fields.filter((function(s){return!s.required}));var n=o.filter((function(s){return!e(s)})).length;var t=this.fields.find((function(e){return e.name===s.focusedField}));var d=this.fields.findIndex((function(e){return e.name===s.focusedField}))+1;var l=this.fields.length;return h("div",{class:"card"},h("div",{class:"header"},h("div",{class:"progress-line"},i," of ",r.length," required fields remaining"),o.length>0&&h("div",{class:"progress-line optional"},n," of ",o.length," optional fields remaining")),h("div",{class:"body"},this.renderContent(getFieldLabel(t),t?!!e(t):false,i===0)),h("div",{class:"separator"}),this.renderFooter(Math.max(1,d),l,i))};return s}();VerdocsSigningProgress.style=verdocsSigningProgressCss;export{VerdocsSigningProgress as verdocs_signing_progress};
|
|
2
2
|
//# sourceMappingURL=verdocs-signing-progress.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host}from"./index-BIRwgFLv.js";var verdocsTabsCss='verdocs-tabs{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row;font-family:"Inter", "Barlow", sans-serif}verdocs-tabs .tab{display:-ms-flexbox;display:flex;color:#111111;cursor:pointer;font-size:14px;font-weight:400;padding:5px 10px;-ms-flex-align:center;align-items:center;text-transform:none;-ms-flex-pack:center;justify-content:center;border-bottom:4px solid transparent}verdocs-tabs .tab:focus{border:none;outline:none}verdocs-tabs .tab.active{color:#000000;font-weight:500;border-bottom:4px solid #654dcb}verdocs-tabs .tab.disabled{color:#aaaaaa;cursor:default}';var VerdocsTabs=function(){function e(e){registerInstance(this,e);this.selectTab=createEvent(this,"selectTab");this.tabs=[];this.selectedTab=0}e.prototype.handleSelectTab=function(e){var s;(s=this.selectTab)===null||s===void 0?void 0:s.emit({tab:this.tabs[e],index:e})};e.prototype.render=function(){var e=this;return h(Host,{key:"b78818a23892499517726f89f5cce6af6b7f42e1"},this.tabs.map((function(s,t){return h("div",{class:"tab ".concat(t===e.selectedTab?"active":""," ").concat(s.disabled?"disabled":""),onClick:s.disabled?function(){}:function(){return e.handleSelectTab(t)}},s.label)})),h("div",{key:"2105eefb878bc7237bd9c46d8533085d580b94f8",class:"flex flex-1"}),h("slot",{key:"c477b2f6880442e15bc3bc95f67dec12f1134074"},h("div",{key:"c6481423137eb98ee64cc9afedea6d43eca89b75"})))};return e}();VerdocsTabs.style=verdocsTabsCss;export{VerdocsTabs as verdocs_tabs};
|
|
2
|
+
//# sourceMappingURL=verdocs-tabs.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdocs-tabs.entry.js","sources":["src/components/controls/verdocs-tabs/verdocs-tabs.scss?tag=verdocs-tabs","src/components/controls/verdocs-tabs/verdocs-tabs.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-tabs {\n gap: 10px;\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n font-family: $primary-font;\n\n .tab {\n display: flex;\n color: #111111;\n cursor: pointer;\n font-size: 14px;\n font-weight: 400;\n padding: 5px 10px;\n align-items: center;\n text-transform: none;\n justify-content: center;\n border-bottom: 4px solid transparent;\n\n &:focus {\n border: none;\n outline: none;\n }\n\n &.active {\n color: #000000;\n font-weight: 500;\n border-bottom: 4px solid #654dcb;\n }\n\n &.disabled {\n color: #aaaaaa;\n cursor: default;\n }\n }\n}\n","import {Component, Prop, Host, h, Event, EventEmitter} from '@stencil/core';\n\nexport interface ITab {\n id?: string;\n label: string;\n disabled?: boolean;\n // TODO: Tooltips?\n}\n\n/**\n * Display a simple row of selectable tabs. This is a controlled element.\n * The parent must adjust selectedTab as selection events are fired.\n *\n * ```ts\n * <verdocs-tabs tabs={[...tabs]} />\n * ```\n */\n@Component({\n tag: 'verdocs-tabs',\n styleUrl: 'verdocs-tabs.scss',\n})\nexport class VerdocsTabs {\n /**\n * The tabs to display\n */\n @Prop() tabs: ITab[] = [];\n\n /**\n * The index of the tab to show selected.\n */\n @Prop() selectedTab: number = 0;\n\n /**\n * Event fired when the user clicks a template to view it. Typically the host application will use this to navigate\n * to the template preview. This is also fired when the user selects \"Preview/Send\" fropm the dropdown menu.\n */\n @Event({composed: true}) selectTab: EventEmitter<{tab: ITab; index: number}>;\n\n handleSelectTab(index: number) {\n this.selectTab?.emit({tab: this.tabs[index], index});\n }\n\n render() {\n return (\n <Host>\n {this.tabs.map((tab, index) => (\n <div class={`tab ${index === this.selectedTab ? 'active' : ''} ${tab.disabled ? 'disabled' : ''}`} onClick={tab.disabled ? () => {} : () => this.handleSelectTab(index)}>\n {tab.label}\n </div>\n ))}\n\n <div class=\"flex flex-1\" />\n\n <slot>\n <div />\n </slot>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;AAAA,MAAM,cAAc,GAAG,goBAAgoB;;MCqB1oB,WAAW,GAAA,MAAA;AAJxB,IAAA,WAAA,CAAA,OAAA,EAAA;;;AAKE;;AAEG;AACK,QAAA,IAAI,CAAA,IAAA,GAAW,EAAE;AAEzB;;AAEG;AACK,QAAA,IAAW,CAAA,WAAA,GAAW,CAAC;AA6BhC;AArBC,IAAA,eAAe,CAAC,KAAa,EAAA;;AAC3B,QAAA,CAAA,EAAA,GAAA,IAAI,CAAC,SAAS,0CAAE,IAAI,CAAC,EAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,KAAK,EAAC,CAAC;;IAGtD,MAAM,GAAA;AACJ,QAAA,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACF,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,KAAK,MACxB,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE,CAAA,IAAA,EAAO,KAAK,KAAK,IAAI,CAAC,WAAW,GAAG,QAAQ,GAAG,EAAE,CAAI,CAAA,EAAA,GAAG,CAAC,QAAQ,GAAG,UAAU,GAAG,EAAE,CAAE,CAAA,EAAE,OAAO,EAAE,GAAG,CAAC,QAAQ,GAAG,MAAK,GAAG,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,IACpK,GAAG,CAAC,KAAK,CACN,CACP,CAAC,EAEF,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,aAAa,EAAG,CAAA,EAE3B,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACE,CAAO,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,CAAA,CACF,CACF;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function a(e){try{l(o.next(e))}catch(e){s(e)}}function n(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):r(e.value).then(a,n)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,r,s,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=n(0),a["throw"]=n(1),a["return"]=n(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function n(e){return function(t){return l([e,t])}}function l(n){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,n[0]&&(i=0)),i)try{if(o=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:i.label++;return{value:n[1],done:false};case 5:i.label++;r=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!s||n[1]>s[0]&&n[1]<s[3])){i.label=n[1];break}if(n[0]===6&&i.label<s[1]){i.label=s[1];s=n;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(n);break}if(s[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];r=0}finally{o=s=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,g as getElement}from"./index-BIRwgFLv.js";import{VerdocsEndpoint,getTemplateDocumentPageDisplayUri,getTemplate}from"@verdocs/js-sdk";import{t as throttle,e as getControlStyles,g as getFieldId}from"./utils-CerrMWqr.js";import{S as Store}from"./Datastore-bS8INhRF.js";import{c as createPopper}from"./popper-BfP9ezJQ.js";import"./index-dzBXqXlK.js";import"./Types-BqoC0yeA.js";var verdocsTemplateDocumentPageCss="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 rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";var VerdocsTemplateDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-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="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,getTemplateDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.listenToTemplate();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(t){for(var i=0,o=t;i<o.length;i++){var r=o[i];var s=r.contentRect.width;e.renderedWidth=s;e.renderedHeight=e.virtualHeight*(s/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}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:e,yScale:t})};e.prototype.render=function(){var e=this;if(this.loading){return h(Host,null,h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}var t="".concat(this.renderedHeight,"px");return h(Host,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){var o;return i.type==="div"?h("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}},i.name==="controls"&&(((o=e.template)===null||o===void 0?void 0:o.fields)||[]).filter((function(t){return t&&t.document_id===e.documentId&&t.page===e.pageNumber})).map((function(t){var i,o;var r=getFieldId(t);var s=t.name,a=t.type,n=t.multiline;var l=e,c=l.xScale,d=l.yScale,u=l.templateId,p=l.editable,f=l.disabled,m=l.done,v=l.pageNumber;if(((i=t["setting"])===null||i===void 0?void 0:i.leading)>0||((o=t["settings"])===null||o===void 0?void 0:o.leading)>0){a="textarea";n=true}switch(a){case"textbox":return h("verdocs-field-textbox",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,multiline:n,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"textarea":return h("verdocs-field-textarea",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"date":return h("verdocs-field-date",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"attachment":return h("verdocs-field-attachment",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"dropdown":return h("verdocs-field-dropdown",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"initial":return h("verdocs-field-initial",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"signature":return h("verdocs-field-signature",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,e.xScale,e.yScale)});case"timestamp":return h("verdocs-field-timestamp",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"checkbox":return h("verdocs-field-checkbox",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"radio":return h("verdocs-field-radio",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});default:return h(Fragment,null,s)}}))):e.pageDisplayUri?h("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsTemplateDocumentPage.style=verdocsTemplateDocumentPageCss;var verdocsToolbarIconCss='verdocs-toolbar-icon{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}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 VerdocsToolbarIcon=function(){function e(e){registerInstance(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=createPopper(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return h(Host,{key:"64a2e66b73bc714068abbc7024f4446444525b51",class:{}},h("div",{key:"8271ad6342aa1000d9b639c34a07f050cf223782","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),h("div",{key:"1612f539226e949d28b2a44e6bec1d737e486efb",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,h("div",{key:"9a34206611c0f3cec8b0641ab78e0c9199a2dd42","data-popper-arrow":"true",class:"arrow"})))};return e}();VerdocsToolbarIcon.style=verdocsToolbarIconCss;export{VerdocsTemplateDocumentPage as verdocs_template_document_page,VerdocsToolbarIcon as verdocs_toolbar_icon};
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,o){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function a(e){try{l(o.next(e))}catch(e){s(e)}}function n(e){try{l(o["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):r(e.value).then(a,n)}l((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},o,r,s,a=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return a.next=n(0),a["throw"]=n(1),a["return"]=n(2),typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function n(e){return function(t){return l([e,t])}}function l(n){if(o)throw new TypeError("Generator is already executing.");while(a&&(a=0,n[0]&&(i=0)),i)try{if(o=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:i.label++;return{value:n[1],done:false};case 5:i.label++;r=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!s||n[1]>s[0]&&n[1]<s[3])){i.label=n[1];break}if(n[0]===6&&i.label<s[1]){i.label=s[1];s=n;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(n);break}if(s[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];r=0}finally{o=s=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment,g as getElement}from"./index-BIRwgFLv.js";import{VerdocsEndpoint,getTemplateDocumentPageDisplayUri,getTemplate}from"@verdocs/js-sdk";import{t as throttle,e as getControlStyles,g as getFieldId}from"./utils-CPSY5rft.js";import{S as Store}from"./Datastore-C7hFgM52.js";import{c as createPopper}from"./popper-BfP9ezJQ.js";import"./index-dzBXqXlK.js";import"./Types-BqoC0yeA.js";var verdocsTemplateDocumentPageCss="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 rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-document-page .verdocs-template-document-page-layer.img{width:100%}verdocs-template-document-page .placeholder{opacity:0.1;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}";var VerdocsTemplateDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.editable=false;this.disabled=false;this.done=false;this.templateId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.containerId="verdocs-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="";this.xScale=1;this.yScale=1;this.loading=true;this.template=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,getTemplateDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber)];case 1:e.pageDisplayUri=t.sent();this.listenToTemplate();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(t){for(var i=0,o=t;i<o.length;i++){var r=o[i];var s=r.contentRect.width;e.renderedWidth=s;e.renderedHeight=e.virtualHeight*(s/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.componentDidUpdate=function(){this.notifyRenderedSize()};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){e.template=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}var e=this.renderedWidth/this.virtualWidth;if(this.xScale!==e){this.xScale=e}var t=this.renderedHeight/this.virtualHeight;if(this.yScale!==t){this.yScale=t}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:e,yScale:t})};e.prototype.render=function(){var e=this;if(this.loading){return h(Host,null,h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",class:"placeholder",alt:"Placeholder page"}))}var t="".concat(this.renderedHeight,"px");return h(Host,{id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){var o;return i.type==="div"?h("div",{class:"verdocs-template-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}},i.name==="controls"&&(((o=e.template)===null||o===void 0?void 0:o.fields)||[]).filter((function(t){return t&&t.document_id===e.documentId&&t.page===e.pageNumber})).map((function(t){var i,o;var r=getFieldId(t);var s=t.name,a=t.type,n=t.multiline;var l=e,c=l.xScale,d=l.yScale,u=l.templateId,p=l.editable,f=l.disabled,m=l.done,v=l.pageNumber;if(((i=t["setting"])===null||i===void 0?void 0:i.leading)>0||((o=t["settings"])===null||o===void 0?void 0:o.leading)>0){a="textarea";n=true}switch(a){case"textbox":return h("verdocs-field-textbox",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,multiline:n,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"textarea":return h("verdocs-field-textarea",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"date":return h("verdocs-field-date",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"attachment":return h("verdocs-field-attachment",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"dropdown":return h("verdocs-field-dropdown",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"initial":return h("verdocs-field-initial",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"signature":return h("verdocs-field-signature",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,e.xScale,e.yScale)});case"timestamp":return h("verdocs-field-timestamp",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"checkbox":return h("verdocs-field-checkbox",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});case"radio":return h("verdocs-field-radio",{id:r,fieldname:s,source:"template",sourceid:u,editable:p,disabled:f,done:m,xscale:c,yscale:d,pagenumber:v,isPreview:true,style:getControlStyles(t,c,d)});default:return h(Fragment,null,s)}}))):e.pageDisplayUri?h("img",{class:"verdocs-template-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsTemplateDocumentPage.style=verdocsTemplateDocumentPageCss;var verdocsToolbarIconCss='verdocs-toolbar-icon{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}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 VerdocsToolbarIcon=function(){function e(e){registerInstance(this,e);this.text="";this.icon="";this.placement="bottom";this.containerId="verdocs-toolbar-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=createPopper(this.iconEl,this.tooltip,{placement:this.placement,modifiers:this.placement==="left"?[{name:"offset",options:{offset:[0,20]}}]:[]})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return h(Host,{key:"64a2e66b73bc714068abbc7024f4446444525b51",class:{}},h("div",{key:"8271ad6342aa1000d9b639c34a07f050cf223782","aria-describedby":this.containerId,class:"icon",innerHTML:this.icon,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.iconEl=t}}),h("div",{key:"1612f539226e949d28b2a44e6bec1d737e486efb",id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":this.placement,ref:function(t){return e.tooltip=t}},this.text,h("div",{key:"9a34206611c0f3cec8b0641ab78e0c9199a2dd42","data-popper-arrow":"true",class:"arrow"})))};return e}();VerdocsToolbarIcon.style=verdocsToolbarIconCss;export{VerdocsTemplateDocumentPage as verdocs_template_document_page,VerdocsToolbarIcon as verdocs_toolbar_icon};
|
|
2
2
|
//# sourceMappingURL=verdocs-template-document-page_2.entry.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,n,i){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,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?n(e.value):o(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,s=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return s.next=a(0),s["throw"]=a(1),s["return"]=a(2),typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(n=0)),n)try{if(i=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){n.label=a[1];break}if(a[0]===6&&n.label<r[1]){n.label=r[1];r=a;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(a);break}if(r[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];o=0}finally{i=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-BIRwgFLv.js";import{VerdocsEndpoint,getTemplate,updateTemplate}from"@verdocs/js-sdk";import{V as VerdocsToast}from"./Toast-D97GxsI-.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-C7hFgM52.js";var verdocsTemplateSettingsCss='verdocs-template-settings{display:block;max-width:600px;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-template-settings>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-settings>form h5{font-size:16px;font-weight:bold;color:#46497d;margin:0 0 10px 0}verdocs-template-settings>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-settings>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-settings>form input:focus{outline:none}verdocs-template-settings>form .row{margin:20px 0 0 0}verdocs-template-settings .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-settings ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-settings ::-moz-placeholder{color:#aaaaaa}verdocs-template-settings :-ms-input-placeholder{color:#aaaaaa}verdocs-template-settings ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-settings ::placeholder{color:#aaaaaa}';var MS_PER_DAY=24*60*60*1e3;var VerdocsTemplateSettings=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next");this.exit=createEvent(this,"exit");this.sdkError=createEvent(this,"sdkError");this.templateUpdated=createEvent(this,"templateUpdated");this.templateListenerId=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.name=null;this.visibility="private";this.sender="envelope_creator";this.sendReminders=false;this.initialReminder=0;this.followupReminders=0;this.dirty=false;this.loading=true;this.template=null}e.prototype.disconnectedCallback=function(){this.unlistenToTemplate()};e.prototype.listenToTemplate=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){console.log("[SETTINGS] Loading template",this.templateId);this.unlistenToTemplate();Store.subscribe("templates",this.templateId,(function(){return getTemplate(e.endpoint,e.templateId)}),false,(function(t){console.log("[SETTINGS] Template Updated",t);e.template=t;e.name=t.name;e.visibility=t.visibility;e.sender=t.sender;e.sendReminders=t.initial_reminder!==null;e.initialReminder=t.initial_reminder?Math.floor(t.initial_reminder/MS_PER_DAY):null;e.followupReminders=t.followup_reminders?Math.floor(t.followup_reminders/MS_PER_DAY):null;e.dirty=false;e.loading=false}));return[2]}))}))};e.prototype.unlistenToTemplate=function(){if(this.templateListenerId){Store.store.delListener(this.templateListenerId);this.templateListenerId=null}};e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(i){try{this.endpoint.loadSession();if(!this.templateId){console.log("[SETTINGS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[SETTINGS] Unable to start builder session, must be authenticated");return[2]}this.listenToTemplate()}catch(i){console.log("[SETTINGS] Error with preview session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data))}return[2]}))}))};e.prototype.handleCancel=function(){var e;(e=this.exit)===null||e===void 0?void 0:e.emit()};e.prototype.handleSubmit=function(){var e=this;updateTemplate(this.endpoint,this.templateId,{name:this.name,visibility:this.visibility,sender:this.sender,initial_reminder:this.sendReminders?this.initialReminder*MS_PER_DAY:null,followup_reminders:this.sendReminders?this.followupReminders*MS_PER_DAY:null}).then((function(t){var n,i;console.log("[SETTINGS] Template Updated",t);e.dirty=false;e.name=t.name;e.visibility=t.visibility;e.sender=t.sender;e.sendReminders=t.initial_reminder!==null;e.initialReminder=t.initial_reminder?Math.floor(t.initial_reminder/MS_PER_DAY):null;e.followupReminders=t.followup_reminders?Math.floor(t.followup_reminders/MS_PER_DAY):null;(n=e.templateUpdated)===null||n===void 0?void 0:n.emit({endpoint:e.endpoint,template:t,event:"update"});(i=e.next)===null||i===void 0?void 0:i.emit()})).catch((function(t){var n,i,o,r,s;console.log("[SETTINGS] Error updating template",t);(n=e.sdkError)===null||n===void 0?void 0:n.emit(new SDKError(t.message,(i=t.response)===null||i===void 0?void 0:i.status,(o=t.response)===null||o===void 0?void 0:o.data));VerdocsToast(((s=(r=t.response)===null||r===void 0?void 0:r.data)===null||s===void 0?void 0:s.error)||"Error updating template, please try again later.")}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(this.loading||!this.template){return h(Host,{class:"loading"},h("verdocs-loader",null))}return h(Host,null,h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("h5",null,"Settings"),h("div",{class:"row"},h("verdocs-text-input",{id:"verdocs-field-name",label:"Template Name",value:this.name,autocomplete:"off",placeholder:"Template Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}})),h("div",{class:"row"},h("verdocs-select-input",{label:"Visibility",value:this.visibility,onInput:function(t){e.visibility=t.target.value;e.dirty=true},options:[{value:"private",label:"Private"},{value:"shared",label:"Shared"},{value:"public",label:"Public"}]})),h("div",{class:"row"},h("verdocs-select-input",{label:"Owner for envelopes created from this template",value:this.sender,onInput:function(t){e.sender=t.target.value;e.dirty=true},options:[{value:"envelope_creator",label:"Envelope Creator"},{value:"template_owner",label:"Template Owner"}]})),h("div",{class:"row"},h("label",null,"Send Reminders"),h("verdocs-switch",{checked:this.sendReminders,onCheckedChange:function(t){return e.sendReminders=t.detail}})),this.sendReminders&&h("div",{class:"row"},h("verdocs-text-input",{id:"verdocs-field-name",label:"First Reminder (days)",value:String(this.initialReminder||0),autocomplete:"off",placeholder:"Delay in days...",onInput:function(t){e.initialReminder=+t.target.value;e.dirty=true}})),this.sendReminders&&h("div",{class:"row"},h("verdocs-text-input",{id:"verdocs-field-name",label:"Follow-up Reminders (days)",value:String(this.followupReminders||0),autocomplete:"off",placeholder:"Delay in days...",onInput:function(t){e.followupReminders=+t.target.value;e.dirty=true}})),h("div",{class:"buttons"},h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:"Save",size:"small",onClick:function(){return e.handleSubmit()},disabled:!this.dirty}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsTemplateSettings.style=verdocsTemplateSettingsCss;export{VerdocsTemplateSettings as verdocs_template_settings};
|
|
2
|
+
//# sourceMappingURL=verdocs-template-settings.entry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verdocs-template-settings.entry.js","sources":["src/components/templates/verdocs-template-settings/verdocs-template-settings.scss?tag=verdocs-template-settings","src/components/templates/verdocs-template-settings/verdocs-template-settings.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-template-settings {\n display: block;\n max-width: 600px;\n font-family: $verdocs-primary-font;\n\n > form {\n display: flex;\n flex-direction: column;\n background-color: $verdocs-grey-4;\n\n // The extra right padding helps ensure when dragged elements move to absolute positioning\n padding: 12px;\n\n h5 {\n font-size: 16px;\n font-weight: bold;\n color: $verdocs-grey-blue;\n margin: 0 0 10px 0;\n }\n\n label {\n display: block;\n font-size: 14px;\n font-weight: 500;\n margin: 0 0 4px 0;\n color: $verdocs-bg-4;\n }\n\n input {\n border: none;\n font-size: 18px;\n padding: 3px 6px 3px 0;\n background: transparent;\n border-bottom: 1px solid $verdocs-dark-blue;\n\n &:focus {\n outline: none;\n }\n }\n\n .row {\n margin: 20px 0 0 0;\n }\n }\n\n .buttons {\n display: flex;\n column-gap: 8px;\n margin-top: 16px;\n flex-direction: row;\n }\n\n ::placeholder {\n color: $verdocs-bg-2;\n }\n}\n","import {Component, h, Element, Event, EventEmitter, Host, Prop, State} from '@stencil/core';\nimport {getTemplate, ITemplate, TTemplateSender, TTemplateVisibility, updateTemplate, VerdocsEndpoint} from '@verdocs/js-sdk';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst MS_PER_DAY = 24 * 60 * 60 * 1000;\n\n/**\n * Display an edit form that allows the user to adjust a template's roles and workflow.\n */\n@Component({\n tag: 'verdocs-template-settings',\n styleUrl: 'verdocs-template-settings.scss',\n shadow: false,\n})\nexport class VerdocsTemplateSettings {\n private templateListenerId = null;\n\n @Element()\n el: HTMLElement;\n\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop() endpoint: VerdocsEndpoint = VerdocsEndpoint.getDefault();\n\n /**\n * The template ID to edit.\n */\n @Prop() templateId: string = '';\n\n /**\n * Event fired when the user clicks to proceed.\n */\n @Event({composed: true}) next: EventEmitter;\n\n /**\n * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved \"cancel\" event name.\n */\n @Event({composed: true}) exit: EventEmitter;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the template is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n @Event({composed: true}) templateUpdated: EventEmitter<{endpoint: VerdocsEndpoint; template: ITemplate; event: string}>;\n\n @State() name: string | null = null;\n @State() visibility: TTemplateVisibility = 'private';\n @State() sender: TTemplateSender = 'envelope_creator';\n @State() sendReminders = false;\n @State() initialReminder = 0;\n @State() followupReminders = 0;\n @State() dirty = false;\n\n @State() loading = true;\n @State() template: ITemplate | null = null;\n\n disconnectedCallback() {\n this.unlistenToTemplate();\n }\n\n async listenToTemplate() {\n console.log('[SETTINGS] Loading template', this.templateId);\n this.unlistenToTemplate();\n Store.subscribe(\n 'templates',\n this.templateId,\n () => getTemplate(this.endpoint, this.templateId),\n false,\n (template: ITemplate) => {\n console.log('[SETTINGS] Template Updated', template);\n this.template = template;\n this.name = template.name;\n this.visibility = template.visibility;\n this.sender = template.sender;\n this.sendReminders = template.initial_reminder !== null;\n this.initialReminder = template.initial_reminder ? Math.floor(template.initial_reminder / MS_PER_DAY) : null;\n this.followupReminders = template.followup_reminders ? Math.floor(template.followup_reminders / MS_PER_DAY) : null;\n this.dirty = false;\n this.loading = false;\n },\n );\n }\n\n unlistenToTemplate() {\n if (this.templateListenerId) {\n Store.store.delListener(this.templateListenerId);\n this.templateListenerId = null;\n }\n }\n\n async componentWillLoad() {\n try {\n this.endpoint.loadSession();\n\n if (!this.templateId) {\n console.log(`[SETTINGS] Missing required template ID ${this.templateId}`);\n return;\n }\n\n if (!this.endpoint.session) {\n console.log('[SETTINGS] Unable to start builder session, must be authenticated');\n return;\n }\n\n this.listenToTemplate();\n } catch (e) {\n console.log('[SETTINGS] Error with preview session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n }\n }\n\n handleCancel() {\n this.exit?.emit();\n }\n\n handleSubmit() {\n updateTemplate(this.endpoint, this.templateId, {\n name: this.name,\n visibility: this.visibility,\n sender: this.sender,\n initial_reminder: this.sendReminders ? this.initialReminder * MS_PER_DAY : null,\n followup_reminders: this.sendReminders ? this.followupReminders * MS_PER_DAY : null,\n })\n .then(template => {\n console.log('[SETTINGS] Template Updated', template);\n this.dirty = false;\n this.name = template.name;\n this.visibility = template.visibility;\n this.sender = template.sender;\n this.sendReminders = template.initial_reminder !== null;\n this.initialReminder = template.initial_reminder ? Math.floor(template.initial_reminder / MS_PER_DAY) : null;\n this.followupReminders = template.followup_reminders ? Math.floor(template.followup_reminders / MS_PER_DAY) : null;\n this.templateUpdated?.emit({endpoint: this.endpoint, template, event: 'update'});\n this.next?.emit();\n })\n .catch(e => {\n console.log('[SETTINGS] Error updating template', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n VerdocsToast(e.response?.data?.error || 'Error updating template, please try again later.');\n });\n }\n\n render() {\n if (!this.endpoint.session) {\n return (\n <Host>\n <verdocs-component-error message=\"You must be authenticated to use this module.\" />\n </Host>\n );\n }\n\n if (this.loading || !this.template) {\n return (\n <Host class=\"loading\">\n <verdocs-loader />\n </Host>\n );\n }\n\n return (\n <Host>\n <form onSubmit={e => e.preventDefault()} onClick={e => e.stopPropagation()} autocomplete=\"off\">\n <h5>Settings</h5>\n\n <div class=\"row\">\n <verdocs-text-input\n id=\"verdocs-field-name\"\n label=\"Template Name\"\n value={this.name}\n autocomplete=\"off\"\n placeholder=\"Template Name...\"\n onInput={(e: any) => {\n this.name = e.target.value;\n this.dirty = true;\n }}\n />\n </div>\n\n <div class=\"row\">\n <verdocs-select-input\n label=\"Visibility\"\n value={this.visibility}\n onInput={(e: any) => {\n this.visibility = e.target.value;\n this.dirty = true;\n }}\n options={[\n {value: 'private', label: 'Private'},\n {value: 'shared', label: 'Shared'},\n {value: 'public', label: 'Public'},\n ]}\n />\n </div>\n\n <div class=\"row\">\n <verdocs-select-input\n label=\"Owner for envelopes created from this template\"\n value={this.sender}\n onInput={(e: any) => {\n this.sender = e.target.value;\n this.dirty = true;\n }}\n options={[\n {value: 'envelope_creator', label: 'Envelope Creator'},\n {value: 'template_owner', label: 'Template Owner'},\n ]}\n />\n </div>\n\n <div class=\"row\">\n <label>Send Reminders</label>\n <verdocs-switch checked={this.sendReminders} onCheckedChange={e => (this.sendReminders = e.detail)} />\n </div>\n\n {this.sendReminders && (\n <div class=\"row\">\n <verdocs-text-input\n id=\"verdocs-field-name\"\n label=\"First Reminder (days)\"\n value={String(this.initialReminder || 0)}\n autocomplete=\"off\"\n placeholder=\"Delay in days...\"\n onInput={(e: any) => {\n this.initialReminder = +e.target.value;\n this.dirty = true;\n }}\n />\n </div>\n )}\n\n {this.sendReminders && (\n <div class=\"row\">\n <verdocs-text-input\n id=\"verdocs-field-name\"\n label=\"Follow-up Reminders (days)\"\n value={String(this.followupReminders || 0)}\n autocomplete=\"off\"\n placeholder=\"Delay in days...\"\n onInput={(e: any) => {\n this.followupReminders = +e.target.value;\n this.dirty = true;\n }}\n />\n </div>\n )}\n\n <div class=\"buttons\">\n <verdocs-button variant=\"outline\" label=\"Cancel\" size=\"small\" onClick={() => this.handleCancel()} />\n <verdocs-button label=\"Save\" size=\"small\" onClick={() => this.handleSubmit()} disabled={!this.dirty} />\n </div>\n </form>\n </Host>\n );\n }\n}\n"],"names":[],"mappings":";;;;;;AAAA,MAAM,0BAA0B,GAAG,qtCAAqtC;;ACMxvC,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI;MAUzB,uBAAuB,GAAA,MAAA;AALpC,IAAA,WAAA,CAAA,OAAA,EAAA;;;;;;AAMU,QAAA,IAAkB,CAAA,kBAAA,GAAG,IAAI;AAKjC;;AAEG;AACK,QAAA,IAAA,CAAA,QAAQ,GAAoB,eAAe,CAAC,UAAU,EAAE;AAEhE;;AAEG;AACK,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAuBtB,QAAA,IAAI,CAAA,IAAA,GAAkB,IAAI;AAC1B,QAAA,IAAU,CAAA,UAAA,GAAwB,SAAS;AAC3C,QAAA,IAAM,CAAA,MAAA,GAAoB,kBAAkB;AAC5C,QAAA,IAAa,CAAA,aAAA,GAAG,KAAK;AACrB,QAAA,IAAe,CAAA,eAAA,GAAG,CAAC;AACnB,QAAA,IAAiB,CAAA,iBAAA,GAAG,CAAC;AACrB,QAAA,IAAK,CAAA,KAAA,GAAG,KAAK;AAEb,QAAA,IAAO,CAAA,OAAA,GAAG,IAAI;AACd,QAAA,IAAQ,CAAA,QAAA,GAAqB,IAAI;AAwM3C;IAtMC,oBAAoB,GAAA;QAClB,IAAI,CAAC,kBAAkB,EAAE;;AAG3B,IAAA,MAAM,gBAAgB,GAAA;QACpB,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,IAAI,CAAC,UAAU,CAAC;QAC3D,IAAI,CAAC,kBAAkB,EAAE;AACzB,QAAA,KAAK,CAAC,SAAS,CACb,WAAW,EACX,IAAI,CAAC,UAAU,EACf,MAAM,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,EACjD,KAAK,EACL,CAAC,QAAmB,KAAI;AACtB,YAAA,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,QAAQ,CAAC;AACpD,YAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ;AACxB,YAAA,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI;AACzB,YAAA,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU;AACrC,YAAA,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM;YAC7B,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,gBAAgB,KAAK,IAAI;YACvD,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,gBAAgB,GAAG,UAAU,CAAC,GAAG,IAAI;YAC5G,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,kBAAkB,GAAG,UAAU,CAAC,GAAG,IAAI;AAClH,YAAA,IAAI,CAAC,KAAK,GAAG,KAAK;AAClB,YAAA,IAAI,CAAC,OAAO,GAAG,KAAK;AACtB,SAAC,CACF;;IAGH,kBAAkB,GAAA;AAChB,QAAA,IAAI,IAAI,CAAC,kBAAkB,EAAE;YAC3B,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,kBAAkB,CAAC;AAChD,YAAA,IAAI,CAAC,kBAAkB,GAAG,IAAI;;;AAIlC,IAAA,MAAM,iBAAiB,GAAA;;AACrB,QAAA,IAAI;AACF,YAAA,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE;AAE3B,YAAA,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE;gBACpB,OAAO,CAAC,GAAG,CAAC,CAAA,wCAAA,EAA2C,IAAI,CAAC,UAAU,CAAE,CAAA,CAAC;gBACzE;;AAGF,YAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;AAC1B,gBAAA,OAAO,CAAC,GAAG,CAAC,mEAAmE,CAAC;gBAChF;;YAGF,IAAI,CAAC,gBAAgB,EAAE;;QACvB,OAAO,CAAC,EAAE;AACV,YAAA,OAAO,CAAC,GAAG,CAAC,uCAAuC,EAAE,CAAC,CAAC;AACvD,YAAA,CAAA,EAAA,GAAA,IAAI,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,MAAM,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,QAAQ,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,CAAC;;;IAItF,YAAY,GAAA;;QACV,CAAA,EAAA,GAAA,IAAI,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,EAAE;;IAGnB,YAAY,GAAA;QACV,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,UAAU,EAAE;YAC7C,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,UAAU,EAAE,IAAI,CAAC,UAAU;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;AACnB,YAAA,gBAAgB,EAAE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,eAAe,GAAG,UAAU,GAAG,IAAI;AAC/E,YAAA,kBAAkB,EAAE,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,iBAAiB,GAAG,UAAU,GAAG,IAAI;SACpF;aACE,IAAI,CAAC,QAAQ,IAAG;;AACf,YAAA,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,QAAQ,CAAC;AACpD,YAAA,IAAI,CAAC,KAAK,GAAG,KAAK;AAClB,YAAA,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI;AACzB,YAAA,IAAI,CAAC,UAAU,GAAG,QAAQ,CAAC,UAAU;AACrC,YAAA,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM;YAC7B,IAAI,CAAC,aAAa,GAAG,QAAQ,CAAC,gBAAgB,KAAK,IAAI;YACvD,IAAI,CAAC,eAAe,GAAG,QAAQ,CAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,gBAAgB,GAAG,UAAU,CAAC,GAAG,IAAI;YAC5G,IAAI,CAAC,iBAAiB,GAAG,QAAQ,CAAC,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,kBAAkB,GAAG,UAAU,CAAC,GAAG,IAAI;AAClH,YAAA,CAAA,EAAA,GAAA,IAAI,CAAC,eAAe,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,CAAC,EAAC,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC,CAAC;YAChF,CAAA,EAAA,GAAA,IAAI,CAAC,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,EAAE;AACnB,SAAC;aACA,KAAK,CAAC,CAAC,IAAG;;AACT,YAAA,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,CAAC,CAAC;AACpD,YAAA,CAAA,EAAA,GAAA,IAAI,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,IAAI,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,OAAO,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,QAAQ,MAAA,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAE,MAAM,EAAE,CAAA,EAAA,GAAA,CAAC,CAAC,QAAQ,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,CAAC,CAAC;YAClF,YAAY,CAAC,CAAA,CAAA,EAAA,GAAA,CAAA,EAAA,GAAA,CAAC,CAAC,QAAQ,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,IAAI,MAAE,IAAA,IAAA,EAAA,KAAA,MAAA,GAAA,MAAA,GAAA,EAAA,CAAA,KAAK,KAAI,kDAAkD,CAAC;AAC7F,SAAC,CAAC;;IAGN,MAAM,GAAA;AACJ,QAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE;AAC1B,YAAA,QACE,EAAC,IAAI,EAAA,IAAA,EACH,CAAA,CAAA,yBAAA,EAAA,EAAyB,OAAO,EAAC,+CAA+C,EAAG,CAAA,CAC9E;;QAIX,IAAI,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAClC,YAAA,QACE,CAAC,CAAA,IAAI,EAAC,EAAA,KAAK,EAAC,SAAS,EAAA,EACnB,CAAkB,CAAA,gBAAA,EAAA,IAAA,CAAA,CACb;;AAIX,QAAA,QACE,EAAC,IAAI,EAAA,IAAA,EACH,CAAM,CAAA,MAAA,EAAA,EAAA,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,EAAE,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE,YAAY,EAAC,KAAK,EAAA,EAC5F,CAAiB,CAAA,IAAA,EAAA,IAAA,EAAA,UAAA,CAAA,EAEjB,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,KAAK,EAAA,EACd,CACE,CAAA,oBAAA,EAAA,EAAA,EAAE,EAAC,oBAAoB,EACvB,KAAK,EAAC,eAAe,EACrB,KAAK,EAAE,IAAI,CAAC,IAAI,EAChB,YAAY,EAAC,KAAK,EAClB,WAAW,EAAC,kBAAkB,EAC9B,OAAO,EAAE,CAAC,CAAM,KAAI;gBAClB,IAAI,CAAC,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK;AAC1B,gBAAA,IAAI,CAAC,KAAK,GAAG,IAAI;AACnB,aAAC,GACD,CACE,EAEN,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,KAAK,EAAA,EACd,CAAA,CAAA,sBAAA,EAAA,EACE,KAAK,EAAC,YAAY,EAClB,KAAK,EAAE,IAAI,CAAC,UAAU,EACtB,OAAO,EAAE,CAAC,CAAM,KAAI;gBAClB,IAAI,CAAC,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK;AAChC,gBAAA,IAAI,CAAC,KAAK,GAAG,IAAI;aAClB,EACD,OAAO,EAAE;AACP,gBAAA,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,EAAC;AACpC,gBAAA,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;AAClC,gBAAA,EAAC,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;AACnC,aAAA,EAAA,CACD,CACE,EAEN,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,KAAK,EAAA,EACd,CAAA,CAAA,sBAAA,EAAA,EACE,KAAK,EAAC,gDAAgD,EACtD,KAAK,EAAE,IAAI,CAAC,MAAM,EAClB,OAAO,EAAE,CAAC,CAAM,KAAI;gBAClB,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK;AAC5B,gBAAA,IAAI,CAAC,KAAK,GAAG,IAAI;aAClB,EACD,OAAO,EAAE;AACP,gBAAA,EAAC,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,kBAAkB,EAAC;AACtD,gBAAA,EAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,EAAC;aACnD,EAAA,CACD,CACE,EAEN,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,KAAK,EAAA,EACd,CAA6B,CAAA,OAAA,EAAA,IAAA,EAAA,gBAAA,CAAA,EAC7B,CAAgB,CAAA,gBAAA,EAAA,EAAA,OAAO,EAAE,IAAI,CAAC,aAAa,EAAE,eAAe,EAAE,CAAC,KAAK,IAAI,CAAC,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,EAAA,CAAI,CAClG,EAEL,IAAI,CAAC,aAAa,KACjB,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,KAAK,EAAA,EACd,CAAA,CAAA,oBAAA,EAAA,EACE,EAAE,EAAC,oBAAoB,EACvB,KAAK,EAAC,uBAAuB,EAC7B,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,eAAe,IAAI,CAAC,CAAC,EACxC,YAAY,EAAC,KAAK,EAClB,WAAW,EAAC,kBAAkB,EAC9B,OAAO,EAAE,CAAC,CAAM,KAAI;gBAClB,IAAI,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK;AACtC,gBAAA,IAAI,CAAC,KAAK,GAAG,IAAI;aAClB,EAAA,CACD,CACE,CACP,EAEA,IAAI,CAAC,aAAa,KACjB,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,KAAK,EAAA,EACd,CAAA,CAAA,oBAAA,EAAA,EACE,EAAE,EAAC,oBAAoB,EACvB,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,CAAC,EAC1C,YAAY,EAAC,KAAK,EAClB,WAAW,EAAC,kBAAkB,EAC9B,OAAO,EAAE,CAAC,CAAM,KAAI;gBAClB,IAAI,CAAC,iBAAiB,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK;AACxC,gBAAA,IAAI,CAAC,KAAK,GAAG,IAAI;AACnB,aAAC,EAAA,CACD,CACE,CACP,EAED,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,SAAS,EAAA,EAClB,CAAgB,CAAA,gBAAA,EAAA,EAAA,OAAO,EAAC,SAAS,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAI,CAAA,EACpG,CAAA,CAAA,gBAAA,EAAA,EAAgB,KAAK,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,OAAO,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,KAAK,EAAI,CAAA,CACnG,CACD,CACF;;;;;;;;"}
|