@verdocs/web-sdk 6.9.10 → 6.9.13
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/verdocs-adopt-signature-dialog_7.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-adopt-signature-dialog_7.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +4 -0
- package/dist/cjs/verdocs-auth.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +121 -15
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js +9 -8
- package/dist/cjs/verdocs-download-dialog_4.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +6 -6
- package/dist/cjs/verdocs-field-attachment_11.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-menu-panel_2.cjs.entry.js +7 -7
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview_6.cjs.entry.js +4 -0
- package/dist/cjs/verdocs-preview_6.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-quick-functions.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +7 -3
- package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
- package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js +6 -5
- package/dist/collection/components/dialogs/verdocs-download-dialog/verdocs-download-dialog.js.map +1 -1
- package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-otp-dialog/verdocs-otp-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-passcode-dialog/verdocs-passcode-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-question-dialog/verdocs-question-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +1 -1
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +1 -1
- package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +1 -1
- package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +4 -0
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +4 -0
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +7 -3
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +1 -1
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js.map +1 -1
- package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +1 -1
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +6 -6
- package/dist/collection/components/envelopes/verdocs-sign-footer/verdocs-sign-footer.js +1 -1
- package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.js +2 -2
- package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.js +1 -1
- package/dist/collection/components/templates/verdocs-template-role-properties/verdocs-template-role-properties.js +7 -7
- package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +1 -1
- package/dist/collection/components/templates/verdocs-template-tags/verdocs-template-tags.js +1 -1
- package/dist/components/{p-BxOEoXie.js → p-BIc5CIpg.js} +2 -2
- package/dist/components/{p-DjOTs59Z.js → p-BcQsqsDy.js} +2 -2
- package/dist/components/{p-Dtndevf4.js → p-BfKv6ivN.js} +2 -2
- package/dist/components/{p-Ce29XBfJ.js → p-Bkae9I4G.js} +2 -2
- package/dist/components/{p-Ce29XBfJ.js.map → p-Bkae9I4G.js.map} +1 -1
- package/dist/components/{p-D3qUITiS.js → p-BwUTiBud.js} +2 -2
- package/dist/components/{p-BVhOFpVZ.js → p-C8r3qDBh.js} +2 -2
- package/dist/components/p-C8r3qDBh.js.map +1 -0
- package/dist/components/{p-DsEO0-XR.js → p-CGWVITS0.js} +2 -2
- package/dist/components/{p-BvtSJusb.js → p-CGt7KiUu.js} +2 -2
- package/dist/components/{p-u16vefxk.js → p-CQUV5gMT.js} +2 -2
- package/dist/components/{p-Dmw-lE3L.js → p-CSIVZcVx.js} +2 -2
- package/dist/components/{p-C-V6jrel.js → p-DClinO5r.js} +2 -2
- package/dist/components/{p-D_8TNtkM.js → p-DGws2Zgt.js} +2 -2
- package/dist/components/p-DGws2Zgt.js.map +1 -0
- package/dist/components/{p-DVGumEtx.js → p-DRgoGiAA.js} +2 -2
- package/dist/components/{p-BT8wzCXz.js → p-DSK9z7EN.js} +2 -2
- package/dist/components/{p-tub_01MP.js → p-DXbBz25U.js} +2 -2
- package/dist/components/p-DeQsR41s.js +3 -0
- package/dist/components/p-DeQsR41s.js.map +1 -0
- package/dist/components/{p-DIOVejyL.js → p-DyhyfLyV.js} +2 -2
- package/dist/components/{p-Yxa93LOl.js → p-db6IAGB0.js} +2 -2
- package/dist/components/{p-CDMCVJys.js → p-qDQgyl7L.js} +2 -2
- package/dist/components/{p-CFEw4Xbi.js → p-sPseFic3.js} +2 -2
- package/dist/components/verdocs-auth.js +1 -1
- package/dist/components/verdocs-auth.js.map +1 -1
- package/dist/components/verdocs-build.js +1 -1
- package/dist/components/verdocs-contact-picker.js +1 -1
- package/dist/components/verdocs-download-dialog.js +1 -1
- package/dist/components/verdocs-envelope-document-page.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +1 -1
- package/dist/components/verdocs-envelopes-list.js +1 -1
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-initial-dialog.js +1 -1
- package/dist/components/verdocs-ok-dialog.js +1 -1
- package/dist/components/verdocs-otp-dialog.js +1 -1
- package/dist/components/verdocs-passcode-dialog.js +1 -1
- package/dist/components/verdocs-preview.js +1 -1
- package/dist/components/verdocs-question-dialog.js +1 -1
- package/dist/components/verdocs-quick-functions.js +1 -1
- package/dist/components/verdocs-search-tabs.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 +1 -1
- package/dist/components/verdocs-sign.js.map +1 -1
- package/dist/components/verdocs-signature-dialog.js +1 -1
- package/dist/components/verdocs-status-indicator.js +1 -1
- package/dist/components/verdocs-template-attachments.js +1 -1
- package/dist/components/verdocs-template-card.js +1 -1
- package/dist/components/verdocs-template-document-page.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-star.js +1 -1
- package/dist/components/verdocs-template-tags.js +1 -1
- package/dist/components/verdocs-templates-list.js +1 -1
- package/dist/components/verdocs-upload-dialog.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js +3 -3
- package/dist/esm/verdocs-adopt-signature-dialog_7.entry.js.map +1 -1
- package/dist/esm/verdocs-auth.entry.js +4 -0
- package/dist/esm/verdocs-auth.entry.js.map +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +121 -15
- package/dist/esm/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm/verdocs-download-dialog_4.entry.js +9 -8
- package/dist/esm/verdocs-download-dialog_4.entry.js.map +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +6 -6
- package/dist/esm/verdocs-field-attachment_11.entry.js +1 -1
- package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm/verdocs-menu-panel_2.entry.js +7 -7
- package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm/verdocs-preview_6.entry.js +4 -0
- package/dist/esm/verdocs-preview_6.entry.js.map +1 -1
- package/dist/esm/verdocs-quick-functions.entry.js +1 -1
- package/dist/esm/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +7 -3
- package/dist/esm/verdocs-sign.entry.js.map +1 -1
- package/dist/esm/verdocs-signature-dialog.entry.js +1 -1
- package/dist/esm/verdocs-status-indicator.entry.js +2 -2
- package/dist/esm/verdocs-template-card.entry.js +1 -1
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-template-tags.entry.js +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_7.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm-es5/verdocs-contact-picker.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js.map +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-initial-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-menu-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_6.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
- package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
- package/dist/verdocs-web-sdk/{p-2f96e7c9.system.entry.js → p-0625e073.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-40f5ecf3.system.entry.js → p-07a07c6b.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-15a1b8b5.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-15a1b8b5.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-6abf8f8f.entry.js → p-1f898c53.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6abf8f8f.entry.js.map → p-1f898c53.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/p-2fa4010a.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-2fa4010a.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-4798c2a5.system.entry.js → p-36aa8081.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-3a542ed0.system.entry.js +4 -0
- package/dist/verdocs-web-sdk/p-3a542ed0.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-c5b70927.system.entry.js → p-3c9a2290.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-48e2baa9.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-48e2baa9.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-d09a4bb9.entry.js → p-4934f908.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-6754dfcf.system.entry.js → p-4d8bf603.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-4fe507ee.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-810e09ca.entry.js → p-5678acd8.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-cfb275c5.entry.js → p-609527c7.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-1f1fc6d7.entry.js → p-82d0e009.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-90400330.entry.js +2 -0
- package/dist/verdocs-web-sdk/{p-d4f72da9.entry.js → p-98adcb3a.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-ed953cca.entry.js → p-996cc1f6.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-BdZ5Ghsa.system.js +1 -1
- package/dist/verdocs-web-sdk/p-ae4290c6.entry.js +3 -0
- package/dist/verdocs-web-sdk/p-ae4290c6.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-9756028f.entry.js → p-ae92881f.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-ae92881f.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-04d2fa80.system.entry.js → p-b1146326.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-1929a794.system.entry.js → p-b2aa0637.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-64034b55.system.entry.js → p-b35a1ea8.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-64034b55.system.entry.js.map → p-b35a1ea8.system.entry.js.map} +1 -1
- package/dist/verdocs-web-sdk/{p-1827477d.system.entry.js → p-b6390a11.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-b81c87ee.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-b81c87ee.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-d3d177d0.system.entry.js → p-ba39a8ce.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-495ed75e.system.entry.js → p-bd17bff7.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-e632e92c.entry.js → p-c2b70cb9.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-ca03555a.system.entry.js → p-c3660cce.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-421c231a.entry.js → p-cbfc895c.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-f85f8560.system.entry.js → p-d5cfbdac.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-d5cfbdac.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-842c345c.entry.js → p-e207c469.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-e679a32a.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-e679a32a.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-d3b798ae.system.entry.js → p-e991121e.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/p-ed5c3f2d.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-ed5c3f2d.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/{p-f97ca49e.entry.js → p-fff5d042.entry.js} +2 -2
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/components/p-BVhOFpVZ.js.map +0 -1
- package/dist/components/p-CT0DHyPw.js +0 -3
- package/dist/components/p-CT0DHyPw.js.map +0 -1
- package/dist/components/p-D_8TNtkM.js.map +0 -1
- package/dist/verdocs-web-sdk/p-0240a6e1.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-0240a6e1.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-12676649.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-12676649.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-1a6869c9.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-1a6869c9.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-1e8f1ce4.system.entry.js +0 -4
- package/dist/verdocs-web-sdk/p-1e8f1ce4.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-3f5ad836.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-3f5ad836.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-62b6402f.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-682c5a5c.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-9756028f.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-9c6cca6e.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-9c6cca6e.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-b464b598.entry.js +0 -3
- package/dist/verdocs-web-sdk/p-b464b598.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-c89d74b2.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-c89d74b2.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-f85f8560.system.entry.js.map +0 -1
- /package/dist/components/{p-BxOEoXie.js.map → p-BIc5CIpg.js.map} +0 -0
- /package/dist/components/{p-DjOTs59Z.js.map → p-BcQsqsDy.js.map} +0 -0
- /package/dist/components/{p-Dtndevf4.js.map → p-BfKv6ivN.js.map} +0 -0
- /package/dist/components/{p-D3qUITiS.js.map → p-BwUTiBud.js.map} +0 -0
- /package/dist/components/{p-DsEO0-XR.js.map → p-CGWVITS0.js.map} +0 -0
- /package/dist/components/{p-BvtSJusb.js.map → p-CGt7KiUu.js.map} +0 -0
- /package/dist/components/{p-u16vefxk.js.map → p-CQUV5gMT.js.map} +0 -0
- /package/dist/components/{p-Dmw-lE3L.js.map → p-CSIVZcVx.js.map} +0 -0
- /package/dist/components/{p-C-V6jrel.js.map → p-DClinO5r.js.map} +0 -0
- /package/dist/components/{p-DVGumEtx.js.map → p-DRgoGiAA.js.map} +0 -0
- /package/dist/components/{p-BT8wzCXz.js.map → p-DSK9z7EN.js.map} +0 -0
- /package/dist/components/{p-tub_01MP.js.map → p-DXbBz25U.js.map} +0 -0
- /package/dist/components/{p-DIOVejyL.js.map → p-DyhyfLyV.js.map} +0 -0
- /package/dist/components/{p-Yxa93LOl.js.map → p-db6IAGB0.js.map} +0 -0
- /package/dist/components/{p-CDMCVJys.js.map → p-qDQgyl7L.js.map} +0 -0
- /package/dist/components/{p-CFEw4Xbi.js.map → p-sPseFic3.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-2f96e7c9.system.entry.js.map → p-0625e073.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-40f5ecf3.system.entry.js.map → p-07a07c6b.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-4798c2a5.system.entry.js.map → p-36aa8081.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-c5b70927.system.entry.js.map → p-3c9a2290.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d09a4bb9.entry.js.map → p-4934f908.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-6754dfcf.system.entry.js.map → p-4d8bf603.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-62b6402f.entry.js.map → p-4fe507ee.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-810e09ca.entry.js.map → p-5678acd8.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-cfb275c5.entry.js.map → p-609527c7.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-1f1fc6d7.entry.js.map → p-82d0e009.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-682c5a5c.entry.js.map → p-90400330.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d4f72da9.entry.js.map → p-98adcb3a.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-ed953cca.entry.js.map → p-996cc1f6.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-04d2fa80.system.entry.js.map → p-b1146326.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-1929a794.system.entry.js.map → p-b2aa0637.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-1827477d.system.entry.js.map → p-b6390a11.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d3d177d0.system.entry.js.map → p-ba39a8ce.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-495ed75e.system.entry.js.map → p-bd17bff7.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-e632e92c.entry.js.map → p-c2b70cb9.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-ca03555a.system.entry.js.map → p-c3660cce.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-421c231a.entry.js.map → p-cbfc895c.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-842c345c.entry.js.map → p-e207c469.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-d3b798ae.system.entry.js.map → p-e991121e.system.entry.js.map} +0 -0
- /package/dist/verdocs-web-sdk/{p-f97ca49e.entry.js.map → p-fff5d042.entry.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as i,h as s,d as o,t as
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,c as i,h as s,d as o,t as h}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as a,getEnvelopeDocumentPageDisplayUri as n}from"@verdocs/js-sdk";import{t as d}from"./p-BCwFpXpV.js";import{d as r}from"./p-wUsR0Dpa.js";const c=()=>`verdocs-envelope-document-page{width:100%;position:relative}verdocs-envelope-document-page .verdocs-envelope-document-page-layer{position:absolute;top:0;left:0;right:0;bottom:0;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-envelope-document-page .verdocs-envelope-document-page-layer.img{width:100%}`;const l=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.pageRendered=i(this,"pageRendered");this.endpoint=a.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId=`verdocs-envelope-document-page-${Math.random().toString(36).substring(2,11)}`;this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}async componentWillLoad(){this.pageDisplayUri=await n(this.endpoint,this.documentId,this.pageNumber,this.type)}componentDidLoad(){this.resizeObserver=new ResizeObserver(d((e=>{for(const t of e){const e=t.contentRect.width;this.renderedWidth=e;this.renderedHeight=this.virtualHeight*(e/this.virtualWidth)}this.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)}disconnectedCallback(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect()}notifyRenderedSize(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})}render(){const e=`${this.renderedHeight}px`;return s(o,{key:"633b71e22df815319ad854618b74b035a6e43603",id:`${this.containerId}`,style:{height:e,flex:`0 0 ${e}`}},this.layers.map((t=>t.type==="div"?s("div",{class:"verdocs-envelope-document-page-layer",id:`${this.containerId}-${t.name}`,style:{height:e}}):this.pageDisplayUri?s("img",{class:"verdocs-envelope-document-page-layer img",id:`${this.containerId}-${t.name}`,src:this.pageDisplayUri,alt:`Page ${this.pageNumber}`,"aria-hidden":true,loading:"lazy",onLoad:e=>{this.naturalWidth=e.target.naturalWidth;this.naturalHeight=e.target.naturalHeight;this.aspectRatio=this.naturalWidth/this.naturalHeight;this.virtualHeight=this.virtualWidth/this.aspectRatio;this.renderedHeight=e.target.offsetWidth/this.aspectRatio}}):s("div",null))))}get container(){return this}static get style(){return c()}},[0,"verdocs-envelope-document-page",{endpoint:[16],envelopeId:[1,"envelope-id"],documentId:[1,"document-id"],pageNumber:[2,"page-number"],virtualWidth:[2,"virtual-width"],virtualHeight:[1026,"virtual-height"],layers:[16],type:[1],containerId:[32],renderedWidth:[32],renderedHeight:[32],naturalWidth:[32],naturalHeight:[32],aspectRatio:[32],skipFirstNotification:[32],pageDisplayUri:[32]}]);function p(){if(typeof customElements==="undefined"){return}const e=["verdocs-envelope-document-page","verdocs-flag"];e.forEach((e=>{switch(e){case"verdocs-envelope-document-page":if(!customElements.get(h(e))){customElements.define(h(e),l)}break;case"verdocs-flag":if(!customElements.get(h(e))){r()}break}}))}export{l as V,p as d};
|
|
2
|
+
//# sourceMappingURL=p-DyhyfLyV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as s,h as o,d as i,F as l,t as a}from"./p-yZBlG3YQ.js";import{i as d}from"./p-CGNX5HqF.js";import{VerdocsEndpoint as r,getTemplate as n,updateField as c,createField as p,integerSequence as m}from"@verdocs/js-sdk";import{g as h,h as v,i as f,j as g,d as u,k as x}from"./p-BCwFpXpV.js";import{D as w}from"./p-BDv5kBUR.js";import{V as b}from"./p-D97GxsI-.js";import{S as k}from"./p-C1sRVZWv.js";import{S as E}from"./p-C7hFgM52.js";import{d as q}from"./p-Bdf8pPWm.js";import{d as C}from"./p-REnrt0JM.js";import{d as Z}from"./p-CyDWJAOZ.js";import{d as V}from"./p-DT0LGcPi.js";import{d as M}from"./p-BT8wzCXz.js";import{d as y}from"./p-BasWFMeN.js";import{d as H}from"./p-DwPH0TQ4.js";import{d as j}from"./p-BwEGkh_6.js";import{d as S}from"./p-DXLcCG08.js";import{d as D}from"./p-B845hxhl.js";import{d as L}from"./p-5E7bNT3k.js";import{d as I}from"./p-Cfiprngx.js";import{d as Q}from"./p-pyA5cdVX.js";import{d as B}from"./p-DhO1wfh-.js";import{d as T}from"./p-wUsR0Dpa.js";import{d as F}from"./p-CioaaWeS.js";import{d as z}from"./p-B-_kYJtC.js";import{d as N}from"./p-D3qUITiS.js";import{d as P}from"./p-DQTI8vRX.js";import{d as R}from"./p-BXGNkmyr.js";import{d as X}from"./p-DVGumEtx.js";import{d as U}from"./p-D3ohABOv.js";import{d as W}from"./p-DYtSnUj9.js";import{d as Y}from"./p-Bxmki12o.js";import{d as $}from"./p-u16vefxk.js";const _=()=>`verdocs-template-fields{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .pages .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;-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-template-fields .pages .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-template-fields .pages .document-separator:first-child{margin-top:0}verdocs-template-fields #verdocs-template-fields-toolbar{width:100%;height:50px;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}@media all and (max-width: 1000px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;padding:0 10px 0 0}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}@media all and (max-width: 600px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-template-fields #verdocs-template-fields-toolbar .separator,verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}verdocs-template-fields.placing-attachment{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url("data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E") 16 16, pointer}`;const G='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';const O='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';const A='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';const J='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';const K='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';const ee='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';const te='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';const se='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13" /></svg>';const oe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';const ie=[{id:"signature",tooltip:"Signature",icon:K,class:"signature"},{id:"initial",tooltip:"Initials",icon:ee,class:"initial"},{id:"sep1",tooltip:"",icon:oe,class:"separator"},{id:"textbox",tooltip:"Text Box",icon:G,class:"textbox"},{id:"checkbox",tooltip:"Check Box",icon:O,class:"checkbox"},{id:"radio",tooltip:"Radio Button",icon:A,class:"radio"},{id:"dropdown",tooltip:"Dropdown",icon:te,class:"dropdown"},{id:"sep2",tooltip:"",icon:oe,class:"separator"},{id:"date",tooltip:"Date",icon:J,class:"date"},{id:"attachment",tooltip:"Attachment",icon:se,class:"attachment"}];const le=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.sdkError=s(this,"sdkError");this.templateUpdated=s(this,"templateUpdated");this.templateListenerId=null;this.endpoint=r.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.showMustSelectRole=false;this.selectedRoleName="";this.loading=true;this.template=null;this.pageHeights={};this.cachedPageInfo={}}onTemplateIdChanged(){this.listenToTemplate()}handleKeyDown(e){if(e.key==="Escape"){this.placing=null}}handleFieldSettingsChanged(){var e;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,template:this.template,event:"updated-field"})}handleFieldDeleted(){var e;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,template:this.template,event:"deleted-field"})}async componentWillLoad(){var e,t,s;try{this.endpoint.loadSession();if(!this.templateId){console.log(`[FIELDS] Missing required template ID ${this.templateId}`);return}if(!this.endpoint.session){console.log("[FIELDS] Unable to start builder session, must be authenticated");return}this.listenToTemplate()}catch(o){console.log("[FIELDS] Error with fields session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new k(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(s=o.response)===null||s===void 0?void 0:s.data))}}componentDidRender(){d.dynamicDrop(true);document.querySelectorAll(".verdocs-field").forEach((e=>{this.makeDraggable(e)}));const e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;const t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){t.remove();e.append(t)}}componentWillUpdate(){var e,t;const s=[...((e=this.template)===null||e===void 0?void 0:e.roles)||[]].sort(((e,t)=>{var s,o;return((s=e.sequence)!==null&&s!==void 0?s:0)-((o=t.sequence)!==null&&o!==void 0?o:0)}));if(!this.selectedRoleName||!s.find((e=>e&&e.name===this.selectedRoleName))){this.selectedRoleName=((t=s[0])===null||t===void 0?void 0:t.name)||"";console.log("[FIELDS] Selected new role",this.selectedRoleName)}}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();E.subscribe("templates",this.templateId,(()=>n(this.endpoint,this.templateId)),false,(e=>{var t;console.log("Template updated");this.template=e;this.loading=false;if(!this.selectedRoleName){const s=[...e.roles||[]].sort(((e,t)=>{var s,o;return((s=e.sequence)!==null&&s!==void 0?s:0)-((o=t.sequence)!==null&&o!==void 0?o:0)}));this.selectedRoleName=((t=s[0])===null||t===void 0?void 0:t.name)||""}}))}unlistenToTemplate(){if(this.templateListenerId){E.store.delListener(this.templateListenerId);this.templateListenerId=null}}handlePageRendered(e){var t,s;var o,i;const l=e.detail;console.log("[FIELDS] Page rendered",l.documentId,l.pageNumber,l.xScale,l.yScale);(t=(o=this.cachedPageInfo)[i=l.documentId])!==null&&t!==void 0?t:o[i]={};this.cachedPageInfo[l.documentId][l.pageNumber]=l;this.pageHeights[l.pageNumber]=l.naturalHeight;(((s=this.template)===null||s===void 0?void 0:s.fields)||[]).filter((e=>e&&e.page===l.pageNumber)).forEach((e=>{const t=h(e);const s=document.getElementById(t);if(s){s.setAttribute("templateid",this.templateId);s.setAttribute("fieldname",e.name);s.setAttribute("documentid",String(e.document_id));s.setAttribute("pagenumber",String(e.page));s.setAttribute("xScale",String(l.xScale));s.setAttribute("yScale",String(l.yScale));this.makeDraggable(s)}}))}makeDraggable(e){d(e).draggable({listeners:{move:this.handleMoveField.bind(this),end:this.handleMoveEnd.bind(this)}})}async handleMoveField(e){const t=+(e.target.getAttribute("posX")||0);const s=+(e.target.getAttribute("posY")||0);const o=+(e.target.getAttribute("xScale")||1);const i=+(e.target.getAttribute("yScale")||1);const l=e.dx/o+t;const a=e.dy/i+s;e.target.setAttribute("posX",l);e.target.setAttribute("posy",a);v(e.target,"translate",`${l}px, ${a}px`)}async handleMoveEnd(e){var t,s,o,i,l,a,d,r;const n=e.target.getAttribute("fieldname");const p=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).find((e=>e.name===n));if(!p){console.log("[FIELDS] Unable to find field",n,e.target);return}const m=e.target.getAttribute("pagenumber");const h=e.target.getAttribute("documentid");let{naturalWidth:v=612,naturalHeight:w=792,renderedHeight:q=792}=this.cachedPageInfo[h][m];const C=e.target.getBoundingClientRect();const Z=e.target.parentElement;const V=Z.getBoundingClientRect();const M=p.width||x(p.type);const y=p.height||u(p.type);const H=Math.max(C.left-V.left,0);let j=Math.max(q-(V.bottom-C.bottom),0);let S=parseInt(m);if(j>q){S=Math.min(S+1,((i=(o=((s=this.template)===null||s===void 0?void 0:s.documents)||[])===null||o===void 0?void 0:o[0])===null||i===void 0?void 0:i.pages)||1);j-=q;q=this.cachedPageInfo[h][S].renderedHeight;console.log("Next page",{newPageNumber:S,newY:j,renderedHeight:q})}else if(j<0){S=Math.max(S-1,1);q=this.cachedPageInfo[h][S].renderedHeight;j+=q;console.log("[FIELDS] Next page",{newPageNumber:S,newY:j,renderedHeight:q})}const{x:D,y:L}=this.viewCoordinatesToPageCoordinates(H,j,h,m,v-M,w-y);try{const t={x:D,y:L,page:S};const s=await c(this.endpoint,this.templateId,n,t);console.log("[FIELDS] Updated",s);const o=JSON.parse(JSON.stringify(this.template));const i=o.fields.findIndex((e=>e.name===n));if(i>-1){o.fields[i]=s}E.updateTemplate(this.templateId,o);e.target.removeAttribute("posX");e.target.removeAttribute("posY");f(e.target);const{xScale:a=1,yScale:d=1}=this.cachedPageInfo[h][m];g(e.target,s,a,d);(l=this.templateUpdated)===null||l===void 0?void 0:l.emit({endpoint:this.endpoint,template:o,event:"updated-field"})}catch(t){b("Error updating field, please try again later",{style:"error"});console.log("[FIELDS] Error updating field",t);(a=this.sdkError)===null||a===void 0?void 0:a.emit(new k(t.message,(d=t.response)===null||d===void 0?void 0:d.status,(r=t.response)===null||r===void 0?void 0:r.data));e.target.removeAttribute("posX");e.target.removeAttribute("posY");f(e.target)}}generateFieldName(e,t){var s;let o=1;let i;do{i=`${e}P${t}-${o}`;o++}while((((s=this.template)===null||s===void 0?void 0:s.fields)||[]).some((e=>e&&e.name===i)));return i}viewCoordinatesToPageCoordinates(e,t,s,o,i,l){const{xScale:a=1,yScale:d=1,renderedHeight:r=792}=this.cachedPageInfo[s][o];const n=Math.floor(Math.min(e/a,i));const c=Math.floor(Math.min(Math.max(r-t,0)/d,l));return{x:n,y:c}}async handleClickPage(e,t,s){var o;if(this.placing){const i=e.offsetX;const l=e.offsetY;const a=x(this.placing);const d=u(this.placing);const r=this.cachedPageInfo[t][s];const{naturalWidth:n=612,naturalHeight:c=792}=r;const m=this.viewCoordinatesToPageCoordinates(i,l,t,s,n-a,c-d);const h=Math.floor(m.x);const v=Math.floor(m.y);const f={name:this.generateFieldName(this.placing,s),role_name:this.selectedRoleName,template_id:this.templateId,document_id:r.documentId,type:this.placing,required:this.placing!=="radio"&&this.placing!=="attachment"&&this.placing!=="checkbox",page:s,validator:null,label:null,default:null,placeholder:null,group:null,settings:{},x:h,y:v,width:a,height:d,multiline:false,readonly:false,options:this.placing==="radio"?[{id:"option-1",label:"Option 1"}]:[]};const g=await p(this.endpoint,this.templateId,f);console.log("[FIELDS] Created field",g);const w=JSON.parse(JSON.stringify(this.template));w.fields.push(g);E.updateTemplate(this.templateId,w);(o=this.templateUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,template:w,event:"added-field"});this.placing=null}}render(){var e,t,s;console.log("Rendering");if(this.loading){return o(i,null,o("verdocs-loader",null))}if(!this.endpoint.session){return o(i,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}const a=[...((e=this.template)===null||e===void 0?void 0:e.roles)||[]].sort(((e,t)=>{var s,o;return((s=e.sequence)!==null&&s!==void 0?s:0)-((o=t.sequence)!==null&&o!==void 0?o:0)}));const d=a.map((e=>({value:e.name,label:e.full_name?`${e.name}: ${e.full_name}`:e.name})));return o(i,{class:this.placing?{[`placing-${this.placing}`]:true}:{},onSubmit:()=>{}},o("div",{id:"verdocs-template-fields-toolbar"},o("div",{class:"add-for"},"Add field:"),o("verdocs-select-input",{value:this.selectedRoleName,options:d,onInput:e=>this.selectedRoleName=e.target.value}),ie.map((e=>o("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,class:e.class,onClick:()=>{if(e.tooltip){if(this.selectedRoleName){this.placing=e.id}else{this.showMustSelectRole=true}}}})))),o("div",{class:"pages"},(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).map((e=>{const t=m(1,e.pages);return t.map((t=>{var s;const i=e.page_sizes[t];return o(l,null,((s=this.template)===null||s===void 0?void 0:s.documents.length)>1&&o("div",{class:"document-separator"},o("div",{innerHTML:w}),o("span",null,e.name)),o("verdocs-template-document-page",{templateId:this.templateId,documentId:e.id,pageNumber:t,virtualWidth:(i===null||i===void 0?void 0:i.width)||612,virtualHeight:(i===null||i===void 0?void 0:i.height)||792,disabled:true,editable:true,done:false,onClick:s=>this.handleClickPage(s,e.id,t),onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))}))}))),this.showMustSelectRole&&o("verdocs-ok-dialog",{heading:"Unable to add field",message:(((s=this.template)===null||s===void 0?void 0:s.roles)||[]).length>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:()=>this.showMustSelectRole=false}))}static get watchers(){return{templateId:[{onTemplateIdChanged:0}]}}static get style(){return _()}},[0,"verdocs-template-fields",{endpoint:[16],templateId:[1537,"template-id"],toolbarTargetId:[1,"toolbar-target-id"],placing:[32],showMustSelectRole:[32],selectedRoleName:[32],loading:[32],template:[32]},[[4,"keydown","handleKeyDown"],[0,"settingsChanged","handleFieldSettingsChanged"],[0,"deleted","handleFieldDeleted"]],{templateId:[{onTemplateIdChanged:0}]}]);function ae(){if(typeof customElements==="undefined"){return}const e=["verdocs-template-fields","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-dialog","verdocs-field-attachment","verdocs-field-checkbox","verdocs-field-date","verdocs-field-dropdown","verdocs-field-initial","verdocs-field-radio","verdocs-field-signature","verdocs-field-textarea","verdocs-field-textbox","verdocs-field-timestamp","verdocs-flag","verdocs-help-icon","verdocs-loader","verdocs-ok-dialog","verdocs-portal","verdocs-select-input","verdocs-template-document-page","verdocs-template-field-properties","verdocs-text-input","verdocs-toolbar-icon","verdocs-upload-dialog"];e.forEach((e=>{switch(e){case"verdocs-template-fields":if(!customElements.get(a(e))){customElements.define(a(e),le)}break;case"verdocs-button":if(!customElements.get(a(e))){q()}break;case"verdocs-checkbox":if(!customElements.get(a(e))){C()}break;case"verdocs-component-error":if(!customElements.get(a(e))){Z()}break;case"verdocs-dialog":if(!customElements.get(a(e))){V()}break;case"verdocs-field-attachment":if(!customElements.get(a(e))){M()}break;case"verdocs-field-checkbox":if(!customElements.get(a(e))){y()}break;case"verdocs-field-date":if(!customElements.get(a(e))){H()}break;case"verdocs-field-dropdown":if(!customElements.get(a(e))){j()}break;case"verdocs-field-initial":if(!customElements.get(a(e))){S()}break;case"verdocs-field-radio":if(!customElements.get(a(e))){D()}break;case"verdocs-field-signature":if(!customElements.get(a(e))){L()}break;case"verdocs-field-textarea":if(!customElements.get(a(e))){I()}break;case"verdocs-field-textbox":if(!customElements.get(a(e))){Q()}break;case"verdocs-field-timestamp":if(!customElements.get(a(e))){B()}break;case"verdocs-flag":if(!customElements.get(a(e))){T()}break;case"verdocs-help-icon":if(!customElements.get(a(e))){F()}break;case"verdocs-loader":if(!customElements.get(a(e))){z()}break;case"verdocs-ok-dialog":if(!customElements.get(a(e))){N()}break;case"verdocs-portal":if(!customElements.get(a(e))){P()}break;case"verdocs-select-input":if(!customElements.get(a(e))){R()}break;case"verdocs-template-document-page":if(!customElements.get(a(e))){X()}break;case"verdocs-template-field-properties":if(!customElements.get(a(e))){U()}break;case"verdocs-text-input":if(!customElements.get(a(e))){W()}break;case"verdocs-toolbar-icon":if(!customElements.get(a(e))){Y()}break;case"verdocs-upload-dialog":if(!customElements.get(a(e))){$()}break}}))}export{le as V,ae as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,c as s,h as o,d as i,F as l,t as a}from"./p-yZBlG3YQ.js";import{i as d}from"./p-CGNX5HqF.js";import{VerdocsEndpoint as r,getTemplate as n,updateField as c,createField as p,integerSequence as m}from"@verdocs/js-sdk";import{g as h,h as v,i as f,j as g,d as u,k as w}from"./p-BCwFpXpV.js";import{D as x}from"./p-BDv5kBUR.js";import{V as b}from"./p-D97GxsI-.js";import{S as k}from"./p-C1sRVZWv.js";import{S as E}from"./p-C7hFgM52.js";import{d as q}from"./p-Bdf8pPWm.js";import{d as C}from"./p-REnrt0JM.js";import{d as Z}from"./p-CyDWJAOZ.js";import{d as V}from"./p-DT0LGcPi.js";import{d as M}from"./p-DSK9z7EN.js";import{d as y}from"./p-BasWFMeN.js";import{d as H}from"./p-DwPH0TQ4.js";import{d as j}from"./p-BwEGkh_6.js";import{d as S}from"./p-DXLcCG08.js";import{d as D}from"./p-B845hxhl.js";import{d as L}from"./p-5E7bNT3k.js";import{d as I}from"./p-Cfiprngx.js";import{d as Q}from"./p-pyA5cdVX.js";import{d as B}from"./p-DhO1wfh-.js";import{d as T}from"./p-wUsR0Dpa.js";import{d as F}from"./p-CioaaWeS.js";import{d as z}from"./p-B-_kYJtC.js";import{d as N}from"./p-BwUTiBud.js";import{d as P}from"./p-DQTI8vRX.js";import{d as R}from"./p-BXGNkmyr.js";import{d as U}from"./p-DRgoGiAA.js";import{d as W}from"./p-D3ohABOv.js";import{d as X}from"./p-DYtSnUj9.js";import{d as A}from"./p-Bxmki12o.js";import{d as Y}from"./p-CQUV5gMT.js";const $=()=>`verdocs-template-fields{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);position:relative;display:block;min-height:600px}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294)}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .pages .document-separator{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:10px;padding:12px 20px;width:100%;-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-template-fields .pages .document-separator svg{-ms-flex-negative:0;flex-shrink:0}verdocs-template-fields .pages .document-separator:first-child{margin-top:0}verdocs-template-fields #verdocs-template-fields-toolbar{width:100%;height:50px;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;font-weight:700;padding:0 20px 0 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#f5f5fa;-ms-flex-pack:center;justify-content:center;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar>verdocs-select-input{margin:0}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields #verdocs-template-fields-toolbar .add-for{margin:0;font-weight:500;color:#f5f5fa}verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{margin:0 20px 0 0}@media all and (max-width: 1000px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;padding:0 10px 0 0}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}@media all and (max-width: 600px){verdocs-template-fields #verdocs-template-fields-toolbar{-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px}verdocs-template-fields #verdocs-template-fields-toolbar svg{-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-template-fields #verdocs-template-fields-toolbar .separator,verdocs-template-fields #verdocs-template-fields-toolbar .add-for,verdocs-template-fields #verdocs-template-fields-toolbar verdocs-select-input{display:none}}verdocs-template-fields.placing-attachment{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24' stroke-width='1.5' stroke='currentColor'%3E%3Cpath stroke='%23000000' stroke-linecap='round' stroke-linejoin='round' d='M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25' /%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url("data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath fill='%23000000' d='M9 1h6v2H9zm10.03 6.39 1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM13 14h-2V8h2v6z'%3E%3C/path%3E%3C/svg%3E") 16 16, pointer}`;const _='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';const G='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';const O='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';const J='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';const K='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';const ee='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';const te='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';const se='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13" /></svg>';const oe='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14.707 14.707"><g><rect x="6.275" y="0" fill="#ffffff7f" width="1" height="15"/></g></svg>';const ie=[{id:"signature",tooltip:"Signature",icon:K,class:"signature"},{id:"initial",tooltip:"Initials",icon:ee,class:"initial"},{id:"sep1",tooltip:"",icon:oe,class:"separator"},{id:"textbox",tooltip:"Text Box",icon:_,class:"textbox"},{id:"checkbox",tooltip:"Check Box",icon:G,class:"checkbox"},{id:"radio",tooltip:"Radio Button",icon:O,class:"radio"},{id:"dropdown",tooltip:"Dropdown",icon:te,class:"dropdown"},{id:"sep2",tooltip:"",icon:oe,class:"separator"},{id:"date",tooltip:"Date",icon:J,class:"date"},{id:"attachment",tooltip:"Attachment",icon:se,class:"attachment"}];const le=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.sdkError=s(this,"sdkError");this.templateUpdated=s(this,"templateUpdated");this.templateListenerId=null;this.endpoint=r.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.showMustSelectRole=false;this.selectedRoleName="";this.loading=true;this.template=null;this.pageHeights={};this.cachedPageInfo={}}onTemplateIdChanged(){this.listenToTemplate()}handleKeyDown(e){if(e.key==="Escape"){this.placing=null}}handleFieldSettingsChanged(){var e;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,template:this.template,event:"updated-field"})}handleFieldDeleted(){var e;(e=this.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,template:this.template,event:"deleted-field"})}async componentWillLoad(){var e,t,s;try{this.endpoint.loadSession();if(!this.templateId){console.log(`[FIELDS] Missing required template ID ${this.templateId}`);return}if(!this.endpoint.session){console.log("[FIELDS] Unable to start builder session, must be authenticated");return}this.listenToTemplate()}catch(o){console.log("[FIELDS] Error with fields session",o);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new k(o.message,(t=o.response)===null||t===void 0?void 0:t.status,(s=o.response)===null||s===void 0?void 0:s.data))}}componentDidRender(){d.dynamicDrop(true);document.querySelectorAll(".verdocs-field").forEach((e=>{this.makeDraggable(e)}));const e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;const t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){t.remove();e.append(t)}}componentWillUpdate(){var e,t;const s=[...((e=this.template)===null||e===void 0?void 0:e.roles)||[]].sort(((e,t)=>{var s,o;return((s=e.sequence)!==null&&s!==void 0?s:0)-((o=t.sequence)!==null&&o!==void 0?o:0)}));if(!this.selectedRoleName||!s.find((e=>e&&e.name===this.selectedRoleName))){this.selectedRoleName=((t=s[0])===null||t===void 0?void 0:t.name)||"";console.log("[FIELDS] Selected new role",this.selectedRoleName)}}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();E.subscribe("templates",this.templateId,(()=>n(this.endpoint,this.templateId)),false,(e=>{var t;console.log("Template updated");this.template=e;this.loading=false;if(!this.selectedRoleName){const s=[...e.roles||[]].sort(((e,t)=>{var s,o;return((s=e.sequence)!==null&&s!==void 0?s:0)-((o=t.sequence)!==null&&o!==void 0?o:0)}));this.selectedRoleName=((t=s[0])===null||t===void 0?void 0:t.name)||""}}))}unlistenToTemplate(){if(this.templateListenerId){E.store.delListener(this.templateListenerId);this.templateListenerId=null}}handlePageRendered(e){var t,s;var o,i;const l=e.detail;console.log("[FIELDS] Page rendered",l.documentId,l.pageNumber,l.xScale,l.yScale);(t=(o=this.cachedPageInfo)[i=l.documentId])!==null&&t!==void 0?t:o[i]={};this.cachedPageInfo[l.documentId][l.pageNumber]=l;this.pageHeights[l.pageNumber]=l.naturalHeight;(((s=this.template)===null||s===void 0?void 0:s.fields)||[]).filter((e=>e&&e.page===l.pageNumber)).forEach((e=>{const t=h(e);const s=document.getElementById(t);if(s){s.setAttribute("templateid",this.templateId);s.setAttribute("fieldname",e.name);s.setAttribute("documentid",String(e.document_id));s.setAttribute("pagenumber",String(e.page));s.setAttribute("xScale",String(l.xScale));s.setAttribute("yScale",String(l.yScale));this.makeDraggable(s)}}))}makeDraggable(e){d(e).draggable({listeners:{move:this.handleMoveField.bind(this),end:this.handleMoveEnd.bind(this)}})}async handleMoveField(e){const t=+(e.target.getAttribute("posX")||0);const s=+(e.target.getAttribute("posY")||0);const o=+(e.target.getAttribute("xScale")||1);const i=+(e.target.getAttribute("yScale")||1);const l=e.dx/o+t;const a=e.dy/i+s;e.target.setAttribute("posX",l);e.target.setAttribute("posy",a);v(e.target,"translate",`${l}px, ${a}px`)}async handleMoveEnd(e){var t,s,o,i,l,a,d,r;const n=e.target.getAttribute("fieldname");const p=(((t=this.template)===null||t===void 0?void 0:t.fields)||[]).find((e=>e.name===n));if(!p){console.log("[FIELDS] Unable to find field",n,e.target);return}const m=e.target.getAttribute("pagenumber");const h=e.target.getAttribute("documentid");let{naturalWidth:v=612,naturalHeight:x=792,renderedHeight:q=792}=this.cachedPageInfo[h][m];const C=e.target.getBoundingClientRect();const Z=e.target.parentElement;const V=Z.getBoundingClientRect();const M=p.width||w(p.type);const y=p.height||u(p.type);const H=Math.max(C.left-V.left,0);let j=Math.max(q-(V.bottom-C.bottom),0);let S=parseInt(m);if(j>q){S=Math.min(S+1,((i=(o=((s=this.template)===null||s===void 0?void 0:s.documents)||[])===null||o===void 0?void 0:o[0])===null||i===void 0?void 0:i.pages)||1);j-=q;q=this.cachedPageInfo[h][S].renderedHeight;console.log("Next page",{newPageNumber:S,newY:j,renderedHeight:q})}else if(j<0){S=Math.max(S-1,1);q=this.cachedPageInfo[h][S].renderedHeight;j+=q;console.log("[FIELDS] Next page",{newPageNumber:S,newY:j,renderedHeight:q})}const{x:D,y:L}=this.viewCoordinatesToPageCoordinates(H,j,h,m,v-M,x-y);try{const t={x:D,y:L,page:S};const s=await c(this.endpoint,this.templateId,n,t);console.log("[FIELDS] Updated",s);const o=JSON.parse(JSON.stringify(this.template));const i=o.fields.findIndex((e=>e.name===n));if(i>-1){o.fields[i]=s}E.updateTemplate(this.templateId,o);e.target.removeAttribute("posX");e.target.removeAttribute("posY");f(e.target);const{xScale:a=1,yScale:d=1}=this.cachedPageInfo[h][m];g(e.target,s,a,d);(l=this.templateUpdated)===null||l===void 0?void 0:l.emit({endpoint:this.endpoint,template:o,event:"updated-field"})}catch(t){b("Error updating field, please try again later",{style:"error"});console.log("[FIELDS] Error updating field",t);(a=this.sdkError)===null||a===void 0?void 0:a.emit(new k(t.message,(d=t.response)===null||d===void 0?void 0:d.status,(r=t.response)===null||r===void 0?void 0:r.data));e.target.removeAttribute("posX");e.target.removeAttribute("posY");f(e.target)}}generateFieldName(e,t){var s;let o=1;let i;do{i=`${e}P${t}-${o}`;o++}while((((s=this.template)===null||s===void 0?void 0:s.fields)||[]).some((e=>e&&e.name===i)));return i}viewCoordinatesToPageCoordinates(e,t,s,o,i,l){const{xScale:a=1,yScale:d=1,renderedHeight:r=792}=this.cachedPageInfo[s][o];const n=Math.floor(Math.min(e/a,i));const c=Math.floor(Math.min(Math.max(r-t,0)/d,l));return{x:n,y:c}}async handleClickPage(e,t,s){var o;if(this.placing){const i=e.offsetX;const l=e.offsetY;const a=w(this.placing);const d=u(this.placing);const r=this.cachedPageInfo[t][s];const{naturalWidth:n=612,naturalHeight:c=792}=r;const m=this.viewCoordinatesToPageCoordinates(i,l,t,s,n-a,c-d);const h=Math.floor(m.x);const v=Math.floor(m.y);const f={name:this.generateFieldName(this.placing,s),role_name:this.selectedRoleName,template_id:this.templateId,document_id:r.documentId,type:this.placing,required:this.placing!=="radio"&&this.placing!=="attachment"&&this.placing!=="checkbox",page:s,validator:null,label:null,default:null,placeholder:null,group:null,settings:{},x:h,y:v,width:a,height:d,multiline:false,readonly:false,options:this.placing==="radio"?[{id:"option-1",label:"Option 1"}]:[]};const g=await p(this.endpoint,this.templateId,f);console.log("[FIELDS] Created field",g);const x=JSON.parse(JSON.stringify(this.template));x.fields.push(g);E.updateTemplate(this.templateId,x);(o=this.templateUpdated)===null||o===void 0?void 0:o.emit({endpoint:this.endpoint,template:x,event:"added-field"});this.placing=null}}render(){var e,t,s;console.log("Rendering");if(this.loading){return o(i,null,o("verdocs-loader",null))}if(!this.endpoint.session){return o(i,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}const a=[...((e=this.template)===null||e===void 0?void 0:e.roles)||[]].sort(((e,t)=>{var s,o;return((s=e.sequence)!==null&&s!==void 0?s:0)-((o=t.sequence)!==null&&o!==void 0?o:0)}));const d=a.map((e=>({value:e.name,label:e.full_name?`${e.name}: ${e.full_name}`:e.name})));return o(i,{class:this.placing?{[`placing-${this.placing}`]:true}:{},onSubmit:()=>{}},o("div",{id:"verdocs-template-fields-toolbar"},o("div",{class:"add-for"},"Add field:"),o("verdocs-select-input",{value:this.selectedRoleName,options:d,onInput:e=>this.selectedRoleName=e.target.value}),ie.map((e=>o("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,class:e.class,onClick:()=>{if(e.tooltip){if(this.selectedRoleName){this.placing=e.id}else{this.showMustSelectRole=true}}}})))),o("div",{class:"pages"},(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).map((e=>{const t=m(1,e.pages);return t.map((t=>{var s;const i=e.page_sizes[t];return o(l,null,((s=this.template)===null||s===void 0?void 0:s.documents.length)>1&&o("div",{class:"document-separator"},o("div",{innerHTML:x}),o("span",null,e.name)),o("verdocs-template-document-page",{templateId:this.templateId,documentId:e.id,pageNumber:t,virtualWidth:(i===null||i===void 0?void 0:i.width)||612,virtualHeight:(i===null||i===void 0?void 0:i.height)||792,disabled:true,editable:true,done:false,onClick:s=>this.handleClickPage(s,e.id,t),onPageRendered:e=>this.handlePageRendered(e),layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]}))}))}))),this.showMustSelectRole&&o("verdocs-ok-dialog",{heading:"Unable to add field",message:(((s=this.template)===null||s===void 0?void 0:s.roles)||[]).length>0?"Please select a role before adding fields.":"Please add at least one role before adding fields.",onNext:()=>this.showMustSelectRole=false}))}static get watchers(){return{templateId:[{onTemplateIdChanged:0}]}}static get style(){return $()}},[0,"verdocs-template-fields",{endpoint:[16],templateId:[1537,"template-id"],toolbarTargetId:[1,"toolbar-target-id"],placing:[32],showMustSelectRole:[32],selectedRoleName:[32],loading:[32],template:[32]},[[4,"keydown","handleKeyDown"],[0,"settingsChanged","handleFieldSettingsChanged"],[0,"deleted","handleFieldDeleted"]],{templateId:[{onTemplateIdChanged:0}]}]);function ae(){if(typeof customElements==="undefined"){return}const e=["verdocs-template-fields","verdocs-button","verdocs-checkbox","verdocs-component-error","verdocs-dialog","verdocs-field-attachment","verdocs-field-checkbox","verdocs-field-date","verdocs-field-dropdown","verdocs-field-initial","verdocs-field-radio","verdocs-field-signature","verdocs-field-textarea","verdocs-field-textbox","verdocs-field-timestamp","verdocs-flag","verdocs-help-icon","verdocs-loader","verdocs-ok-dialog","verdocs-portal","verdocs-select-input","verdocs-template-document-page","verdocs-template-field-properties","verdocs-text-input","verdocs-toolbar-icon","verdocs-upload-dialog"];e.forEach((e=>{switch(e){case"verdocs-template-fields":if(!customElements.get(a(e))){customElements.define(a(e),le)}break;case"verdocs-button":if(!customElements.get(a(e))){q()}break;case"verdocs-checkbox":if(!customElements.get(a(e))){C()}break;case"verdocs-component-error":if(!customElements.get(a(e))){Z()}break;case"verdocs-dialog":if(!customElements.get(a(e))){V()}break;case"verdocs-field-attachment":if(!customElements.get(a(e))){M()}break;case"verdocs-field-checkbox":if(!customElements.get(a(e))){y()}break;case"verdocs-field-date":if(!customElements.get(a(e))){H()}break;case"verdocs-field-dropdown":if(!customElements.get(a(e))){j()}break;case"verdocs-field-initial":if(!customElements.get(a(e))){S()}break;case"verdocs-field-radio":if(!customElements.get(a(e))){D()}break;case"verdocs-field-signature":if(!customElements.get(a(e))){L()}break;case"verdocs-field-textarea":if(!customElements.get(a(e))){I()}break;case"verdocs-field-textbox":if(!customElements.get(a(e))){Q()}break;case"verdocs-field-timestamp":if(!customElements.get(a(e))){B()}break;case"verdocs-flag":if(!customElements.get(a(e))){T()}break;case"verdocs-help-icon":if(!customElements.get(a(e))){F()}break;case"verdocs-loader":if(!customElements.get(a(e))){z()}break;case"verdocs-ok-dialog":if(!customElements.get(a(e))){N()}break;case"verdocs-portal":if(!customElements.get(a(e))){P()}break;case"verdocs-select-input":if(!customElements.get(a(e))){R()}break;case"verdocs-template-document-page":if(!customElements.get(a(e))){U()}break;case"verdocs-template-field-properties":if(!customElements.get(a(e))){W()}break;case"verdocs-text-input":if(!customElements.get(a(e))){X()}break;case"verdocs-toolbar-icon":if(!customElements.get(a(e))){A()}break;case"verdocs-upload-dialog":if(!customElements.get(a(e))){Y()}break}}))}export{le as V,ae as d};
|
|
2
|
+
//# sourceMappingURL=p-db6IAGB0.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{p as e,H as t,c as n,h as i,d as r,t as o}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as s,getTemplate as a,updateTemplateRole as l,createTemplateRole as u,formatFullName as f}from"@verdocs/js-sdk";import{S as c}from"./p-C1sRVZWv.js";import{S as d}from"./p-C7hFgM52.js";import{d as h}from"./p-Bdf8pPWm.js";import{d as v}from"./p-CyDWJAOZ.js";import{d as m}from"./p-CioaaWeS.js";import{d as p}from"./p-B-_kYJtC.js";import{d as g}from"./p-BhtYCb5T.js";import{d as b}from"./p-BXGNkmyr.js";import{d as w}from"./p-
|
|
1
|
+
import{p as e,H as t,c as n,h as i,d as r,t as o}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as s,getTemplate as a,updateTemplateRole as l,createTemplateRole as u,formatFullName as f}from"@verdocs/js-sdk";import{S as c}from"./p-C1sRVZWv.js";import{S as d}from"./p-C7hFgM52.js";import{d as h}from"./p-Bdf8pPWm.js";import{d as v}from"./p-CyDWJAOZ.js";import{d as m}from"./p-CioaaWeS.js";import{d as p}from"./p-B-_kYJtC.js";import{d as g}from"./p-BhtYCb5T.js";import{d as b}from"./p-BXGNkmyr.js";import{d as w}from"./p-BfKv6ivN.js";import{d as x}from"./p-DYtSnUj9.js";
|
|
2
2
|
/**!
|
|
3
3
|
* Sortable 1.15.7
|
|
4
4
|
* @author RubaXa <trash@rubaxa.org>
|
|
5
5
|
* @author owenm <owen23355@gmail.com>
|
|
6
6
|
* @license MIT
|
|
7
7
|
*/function y(e,t,n){return(t=T(t))in e?Object.defineProperty(e,t,{value:n,enumerable:true,configurable:true,writable:true}):e[t]=n,e}function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var i in n)({}).hasOwnProperty.call(n,i)&&(e[i]=n[i])}return e},E.apply(null,arguments)}function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),true).forEach((function(t){y(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e,t){if(null==e)return{};var n,i,r=q(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function q(e,t){if(null==e)return{};var n={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;n[i]=e[i]}return n}function M(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function T(e){var t=M(e,"string");return"symbol"==typeof t?t:t+""}function I(e){"@babel/helpers - typeof";return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}var C="1.15.7";function R(e){if(typeof window!=="undefined"&&window.navigator){return!!navigator.userAgent.match(e)}}var L=R(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);var j=R(/Edge/i);var D=R(/firefox/i);var _=R(/safari/i)&&!R(/chrome/i)&&!R(/android/i);var z=R(/iP(ad|od|hone)/i);var A=R(/chrome/i)&&R(/android/i);var N={capture:false,passive:false};function B(e,t,n){e.addEventListener(t,n,!L&&N)}function H(e,t,n){e.removeEventListener(t,n,!L&&N)}function Z(e,t){if(!t)return;t[0]===">"&&(t=t.substring(1));if(e){try{if(e.matches){return e.matches(t)}else if(e.msMatchesSelector){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector){return e.webkitMatchesSelector(t)}}catch(e){return false}}return false}function P(e){return e.host&&e!==document&&e.host.nodeType&&e.host!==e?e.host:e.parentNode}function U(e,t,n,i){if(e){n=n||document;do{if(t!=null&&(t[0]===">"?e.parentNode===n&&Z(e,t):Z(e,t))||i&&e===n){return e}if(e===n)break}while(e=P(e))}return null}var W=/\s+/g;function $(e,t,n){if(e&&t){if(e.classList){e.classList[n?"add":"remove"](t)}else{var i=(" "+e.className+" ").replace(W," ").replace(" "+t+" "," ");e.className=(i+(n?" "+t:"")).replace(W," ")}}}function F(e,t,n){var i=e&&e.style;if(i){if(n===void 0){if(document.defaultView&&document.defaultView.getComputedStyle){n=document.defaultView.getComputedStyle(e,"")}else if(e.currentStyle){n=e.currentStyle}return t===void 0?n:n[t]}else{if(!(t in i)&&t.indexOf("webkit")===-1){t="-webkit-"+t}i[t]=n+(typeof n==="string"?"":"px")}}}function Y(e,t){var n="";if(typeof e==="string"){n=e}else{do{var i=F(e,"transform");if(i&&i!=="none"){n=i+" "+n}}while(!t&&(e=e.parentNode))}var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function V(e,t,n){if(e){var i=e.getElementsByTagName(t),r=0,o=i.length;if(n){for(;r<o;r++){n(i[r],r)}}return i}return[]}function G(){var e=document.scrollingElement;if(e){return e}else{return document.documentElement}}function J(e,t,n,i,r){if(!e.getBoundingClientRect&&e!==window)return;var o,s,a,l,u,f,c;if(e!==window&&e.parentNode&&e!==G()){o=e.getBoundingClientRect();s=o.top;a=o.left;l=o.bottom;u=o.right;f=o.height;c=o.width}else{s=0;a=0;l=window.innerHeight;u=window.innerWidth;f=window.innerHeight;c=window.innerWidth}if((t||n)&&e!==window){r=r||e.parentNode;if(!L){do{if(r&&r.getBoundingClientRect&&(F(r,"transform")!=="none"||n&&F(r,"position")!=="static")){var d=r.getBoundingClientRect();s-=d.top+parseInt(F(r,"border-top-width"));a-=d.left+parseInt(F(r,"border-left-width"));l=s+o.height;u=a+o.width;break}}while(r=r.parentNode)}}if(i&&e!==window){var h=Y(r||e),v=h&&h.a,m=h&&h.d;if(h){s/=m;a/=v;c/=v;f/=m;l=s+f;u=a+c}}return{top:s,left:a,bottom:l,right:u,width:c,height:f}}function X(e,t,n){var i=ie(e,true),r=J(e)[t];while(i){var o=J(i)[n],s=void 0;{s=r>=o}if(!s)return i;if(i===G())break;i=ie(i,false)}return false}function K(e,t,n,i){var r=0,o=0,s=e.children;while(o<s.length){if(s[o].style.display!=="none"&&s[o]!==mt.ghost&&(i||s[o]!==mt.dragged)&&U(s[o],n.draggable,e,false)){if(r===t){return s[o]}r++}o++}return null}function Q(e,t){var n=e.lastElementChild;while(n&&(n===mt.ghost||F(n,"display")==="none"||t&&!Z(n,t))){n=n.previousElementSibling}return n||null}function ee(e,t){var n=0;if(!e||!e.parentNode){return-1}while(e=e.previousElementSibling){if(e.nodeName.toUpperCase()!=="TEMPLATE"&&e!==mt.clone&&(!t||Z(e,t))){n++}}return n}function te(e){var t=0,n=0,i=G();if(e){do{var r=Y(e),o=r.a,s=r.d;t+=e.scrollLeft*o;n+=e.scrollTop*s}while(e!==i&&(e=e.parentNode))}return[t,n]}function ne(e,t){for(var n in e){if(!e.hasOwnProperty(n))continue;for(var i in t){if(t.hasOwnProperty(i)&&t[i]===e[n][i])return Number(n)}}return-1}function ie(e,t){if(!e||!e.getBoundingClientRect)return G();var n=e;var i=false;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=F(n);if(n.clientWidth<n.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return G();if(i||t)return n;i=true}}}while(n=n.parentNode);return G()}function re(e,t){if(e&&t){for(var n in t){if(t.hasOwnProperty(n)){e[n]=t[n]}}}return e}function oe(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}var se;function ae(e,t){return function(){if(!se){var n=arguments,i=this;if(n.length===1){e.call(i,n[0])}else{e.apply(i,n)}se=setTimeout((function(){se=void 0}),t)}}}function le(){clearTimeout(se);se=void 0}function ue(e,t,n){e.scrollLeft+=t;e.scrollTop+=n}function fe(e){var t=window.Polymer;var n=window.jQuery||window.Zepto;if(t&&t.dom){return t.dom(e).cloneNode(true)}else if(n){return n(e).clone(true)[0]}else{return e.cloneNode(true)}}function ce(e,t,n){var i={};Array.from(e.children).forEach((function(r){var o,s,a,l;if(!U(r,t.draggable,e,false)||r.animated||r===n)return;var u=J(r);i.left=Math.min((o=i.left)!==null&&o!==void 0?o:Infinity,u.left);i.top=Math.min((s=i.top)!==null&&s!==void 0?s:Infinity,u.top);i.right=Math.max((a=i.right)!==null&&a!==void 0?a:-Infinity,u.right);i.bottom=Math.max((l=i.bottom)!==null&&l!==void 0?l:-Infinity,u.bottom)}));i.width=i.right-i.left;i.height=i.bottom-i.top;i.x=i.left;i.y=i.top;return i}var de="Sortable"+(new Date).getTime();function he(){var e=[],t;return{captureAnimationState:function t(){e=[];if(!this.options.animation)return;var n=[].slice.call(this.el.children);n.forEach((function(t){if(F(t,"display")==="none"||t===mt.ghost)return;e.push({target:t,rect:J(t)});var n=k({},e[e.length-1].rect);if(t.thisAnimationDuration){var i=Y(t,true);if(i){n.top-=i.f;n.left-=i.e}}t.fromRect=n}))},addAnimationState:function t(n){e.push(n)},removeAnimationState:function t(n){e.splice(ne(e,{target:n}),1)},animateAll:function n(i){var r=this;if(!this.options.animation){clearTimeout(t);if(typeof i==="function")i();return}var o=false,s=0;e.forEach((function(e){var t=0,n=e.target,i=n.fromRect,a=J(n),l=n.prevFromRect,u=n.prevToRect,f=e.rect,c=Y(n,true);if(c){a.top-=c.f;a.left-=c.e}n.toRect=a;if(n.thisAnimationDuration){if(oe(l,a)&&!oe(i,a)&&(f.top-a.top)/(f.left-a.left)===(i.top-a.top)/(i.left-a.left)){t=me(f,l,u,r.options)}}if(!oe(a,i)){n.prevFromRect=i;n.prevToRect=a;if(!t){t=r.options.animation}r.animate(n,f,a,t)}if(t){o=true;s=Math.max(s,t);clearTimeout(n.animationResetTimer);n.animationResetTimer=setTimeout((function(){n.animationTime=0;n.prevFromRect=null;n.fromRect=null;n.prevToRect=null;n.thisAnimationDuration=null}),t);n.thisAnimationDuration=t}}));clearTimeout(t);if(!o){if(typeof i==="function")i()}else{t=setTimeout((function(){if(typeof i==="function")i()}),s)}e=[]},animate:function e(t,n,i,r){if(r){F(t,"transition","");F(t,"transform","");var o=Y(this.el),s=o&&o.a,a=o&&o.d,l=(n.left-i.left)/(s||1),u=(n.top-i.top)/(a||1);t.animatingX=!!l;t.animatingY=!!u;F(t,"transform","translate3d("+l+"px,"+u+"px,0)");this.forRepaintDummy=ve(t);F(t,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:""));F(t,"transform","translate3d(0,0,0)");typeof t.animated==="number"&&clearTimeout(t.animated);t.animated=setTimeout((function(){F(t,"transition","");F(t,"transform","");t.animated=false;t.animatingX=false;t.animatingY=false}),r)}}}}function ve(e){return e.offsetWidth}function me(e,t,n,i){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*i.animation}var pe=[];var ge={initializeByDefault:true};var be={mount:function e(t){for(var n in ge){if(ge.hasOwnProperty(n)&&!(n in t)){t[n]=ge[n]}}pe.forEach((function(e){if(e.pluginName===t.pluginName){throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}}));pe.push(t)},pluginEvent:function e(t,n,i){var r=this;this.eventCanceled=false;i.cancel=function(){r.eventCanceled=true};var o=t+"Global";pe.forEach((function(e){if(!n[e.pluginName])return;if(n[e.pluginName][o]){n[e.pluginName][o](k({sortable:n},i))}if(n.options[e.pluginName]&&n[e.pluginName][t]){n[e.pluginName][t](k({sortable:n},i))}}))},initializePlugins:function e(t,n,i,r){pe.forEach((function(e){var r=e.pluginName;if(!t.options[r]&&!e.initializeByDefault)return;var o=new e(t,n,t.options);o.sortable=t;o.options=t.options;t[r]=o;E(i,o.defaults)}));for(var o in t.options){if(!t.options.hasOwnProperty(o))continue;var s=this.modifyOption(t,o,t.options[o]);if(typeof s!=="undefined"){t.options[o]=s}}},getEventProperties:function e(t,n){var i={};pe.forEach((function(e){if(typeof e.eventProperties!=="function")return;E(i,e.eventProperties.call(n[e.pluginName],t))}));return i},modifyOption:function e(t,n,i){var r;pe.forEach((function(e){if(!t[e.pluginName])return;if(e.optionListeners&&typeof e.optionListeners[n]==="function"){r=e.optionListeners[n].call(t[e.pluginName],i)}}));return r}};function we(e){var t=e.sortable,n=e.rootEl,i=e.name,r=e.targetEl,o=e.cloneEl,s=e.toEl,a=e.fromEl,l=e.oldIndex,u=e.newIndex,f=e.oldDraggableIndex,c=e.newDraggableIndex,d=e.originalEvent,h=e.putSortable,v=e.extraEventProperties;t=t||n&&n[de];if(!t)return;var m,p=t.options,g="on"+i.charAt(0).toUpperCase()+i.substr(1);if(window.CustomEvent&&!L&&!j){m=new CustomEvent(i,{bubbles:true,cancelable:true})}else{m=document.createEvent("Event");m.initEvent(i,true,true)}m.to=s||n;m.from=a||n;m.item=r||n;m.clone=o;m.oldIndex=l;m.newIndex=u;m.oldDraggableIndex=f;m.newDraggableIndex=c;m.originalEvent=d;m.pullMode=h?h.lastPutMode:undefined;var b=k(k({},v),be.getEventProperties(i,t));for(var w in b){m[w]=b[w]}if(n){n.dispatchEvent(m)}if(p[g]){p[g].call(t,m)}}var xe=["evt"];var ye=function e(t,n){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{},r=i.evt,o=O(i,xe);be.pluginEvent.bind(mt)(t,n,k({dragEl:Se,parentEl:ke,ghostEl:Oe,rootEl:qe,nextEl:Me,lastDownEl:Te,cloneEl:Ie,cloneHidden:Ce,dragStarted:Fe,putSortable:ze,activeSortable:mt.active,originalEvent:r,oldIndex:Re,oldDraggableIndex:je,newIndex:Le,newDraggableIndex:De,hideGhostForTarget:ct,unhideGhostForTarget:dt,cloneNowHidden:function e(){Ce=true},cloneNowShown:function e(){Ce=false},dispatchSortableEvent:function e(t){Ee({sortable:n,name:t,originalEvent:r})}},o))};function Ee(e){we(k({putSortable:ze,cloneEl:Ie,targetEl:Se,rootEl:qe,oldIndex:Re,oldDraggableIndex:je,newIndex:Le,newDraggableIndex:De},e))}var Se,ke,Oe,qe,Me,Te,Ie,Ce,Re,Le,je,De,_e,ze,Ae=false,Ne=false,Be=[],He,Ze,Pe,Ue,We,$e,Fe,Ye,Ve,Ge=false,Je=false,Xe,Ke,Qe=[],et=false,tt=[];var nt=typeof document!=="undefined",it=z,rt=j||L?"cssFloat":"float",ot=nt&&!A&&!z&&"draggable"in document.createElement("div"),st=function(){if(!nt)return;if(L){return false}var e=document.createElement("x");e.style.cssText="pointer-events:auto";return e.style.pointerEvents==="auto"}(),at=function e(t,n){var i=F(t),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=K(t,0,n),s=K(t,1,n),a=o&&F(o),l=s&&F(s),u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+J(o).width,f=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+J(s).width;if(i.display==="flex"){return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal"}if(i.display==="grid"){return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal"}if(o&&a["float"]&&a["float"]!=="none"){var c=a["float"]==="left"?"left":"right";return s&&(l.clear==="both"||l.clear===c)?"vertical":"horizontal"}return o&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||u>=r&&i[rt]==="none"||s&&i[rt]==="none"&&u+f>r)?"vertical":"horizontal"},lt=function e(t,n,i){var r=i?t.left:t.top,o=i?t.right:t.bottom,s=i?t.width:t.height,a=i?n.left:n.top,l=i?n.right:n.bottom,u=i?n.width:n.height;return r===a||o===l||r+s/2===a+u/2},ut=function e(t,n){var i;Be.some((function(e){var r=e[de].options.emptyInsertThreshold;if(!r||Q(e))return;var o=J(e),s=t>=o.left-r&&t<=o.right+r,a=n>=o.top-r&&n<=o.bottom+r;if(s&&a){return i=e}}));return i},ft=function e(t){function n(e,t){return function(i,r,o,s){var a=i.options.group.name&&r.options.group.name&&i.options.group.name===r.options.group.name;if(e==null&&(t||a)){return true}else if(e==null||e===false){return false}else if(t&&e==="clone"){return e}else if(typeof e==="function"){return n(e(i,r,o,s),t)(i,r,o,s)}else{var l=(t?i:r).options.group.name;return e===true||typeof e==="string"&&e===l||e.join&&e.indexOf(l)>-1}}}var i={};var r=t.group;if(!r||I(r)!="object"){r={name:r}}i.name=r.name;i.checkPull=n(r.pull,true);i.checkPut=n(r.put);i.revertClone=r.revertClone;t.group=i},ct=function e(){if(!st&&Oe){F(Oe,"display","none")}},dt=function e(){if(!st&&Oe){F(Oe,"display","")}};if(nt&&!A){document.addEventListener("click",(function(e){if(Ne){e.preventDefault();e.stopPropagation&&e.stopPropagation();e.stopImmediatePropagation&&e.stopImmediatePropagation();Ne=false;return false}}),true)}var ht=function e(t){if(Se){t=t.touches?t.touches[0]:t;var n=ut(t.clientX,t.clientY);if(n){var i={};for(var r in t){if(t.hasOwnProperty(r)){i[r]=t[r]}}i.target=i.rootEl=n;i.preventDefault=void 0;i.stopPropagation=void 0;n[de]._onDragOver(i)}}};var vt=function e(t){if(Se){Se.parentNode[de]._isOutsideThisEl(t.target)}};function mt(e,t){if(!(e&&e.nodeType&&e.nodeType===1)){throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e))}this.el=e;this.options=t=E({},t);e[de]=this;var n={group:null,sort:true,disabled:false,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:false,invertedSwapThreshold:null,removeCloneOnHide:true,direction:function t(){return at(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:true,animation:0,easing:null,setData:function e(t,n){t.setData("Text",n.textContent)},dropBubble:false,dragoverBubble:false,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:false,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:false,fallbackClass:"sortable-fallback",fallbackOnBody:false,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:mt.supportPointer!==false&&"PointerEvent"in window&&(!_||z),emptyInsertThreshold:5};be.initializePlugins(this,e,n);for(var i in n){!(i in t)&&(t[i]=n[i])}ft(t);for(var r in this){if(r.charAt(0)==="_"&&typeof this[r]==="function"){this[r]=this[r].bind(this)}}this.nativeDraggable=t.forceFallback?false:ot;if(this.nativeDraggable){this.options.touchStartThreshold=1}if(t.supportPointer){B(e,"pointerdown",this._onTapStart)}else{B(e,"mousedown",this._onTapStart);B(e,"touchstart",this._onTapStart)}if(this.nativeDraggable){B(e,"dragover",this);B(e,"dragenter",this)}Be.push(this.el);t.store&&t.store.get&&this.sort(t.store.get(this)||[]);E(this,he())}mt.prototype={constructor:mt,_isOutsideThisEl:function e(t){if(!this.el.contains(t)&&t!==this.el){Ye=null}},_getDirection:function e(t,n){return typeof this.options.direction==="function"?this.options.direction.call(this,t,n,Se):this.options.direction},_onTapStart:function e(t){if(!t.cancelable)return;var n=this,i=this.el,r=this.options,o=r.preventOnFilter,s=t.type,a=t.touches&&t.touches[0]||t.pointerType&&t.pointerType==="touch"&&t,l=(a||t).target,u=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||l,f=r.filter;Ot(i);if(Se){return}if(/mousedown|pointerdown/.test(s)&&t.button!==0||r.disabled){return}if(u.isContentEditable){return}if(!this.nativeDraggable&&_&&l&&l.tagName.toUpperCase()==="SELECT"){return}l=U(l,r.draggable,i,false);if(l&&l.animated){return}if(Te===l){return}Re=ee(l);je=ee(l,r.draggable);if(typeof f==="function"){if(f.call(this,t,l,this)){Ee({sortable:n,rootEl:u,name:"filter",targetEl:l,toEl:i,fromEl:i});ye("filter",n,{evt:t});o&&t.preventDefault();return}}else if(f){f=f.split(",").some((function(e){e=U(u,e.trim(),i,false);if(e){Ee({sortable:n,rootEl:e,name:"filter",targetEl:l,fromEl:i,toEl:i});ye("filter",n,{evt:t});return true}}));if(f){o&&t.preventDefault();return}}if(r.handle&&!U(u,r.handle,i,false)){return}this._prepareDragStart(t,a,l)},_prepareDragStart:function e(t,n,i){var r=this,o=r.el,s=r.options,a=o.ownerDocument,l;if(i&&!Se&&i.parentNode===o){var u=J(i);qe=o;Se=i;ke=Se.parentNode;Me=Se.nextSibling;Te=i;_e=s.group;mt.dragged=Se;He={target:Se,clientX:(n||t).clientX,clientY:(n||t).clientY};We=He.clientX-u.left;$e=He.clientY-u.top;this._lastX=(n||t).clientX;this._lastY=(n||t).clientY;Se.style["will-change"]="all";l=function e(){ye("delayEnded",r,{evt:t});if(mt.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents();if(!D&&r.nativeDraggable){Se.draggable=true}r._triggerDragStart(t,n);Ee({sortable:r,name:"choose",originalEvent:t});$(Se,s.chosenClass,true)};s.ignore.split(",").forEach((function(e){V(Se,e.trim(),bt)}));B(a,"dragover",ht);B(a,"mousemove",ht);B(a,"touchmove",ht);if(s.supportPointer){B(a,"pointerup",r._onDrop);!this.nativeDraggable&&B(a,"pointercancel",r._onDrop)}else{B(a,"mouseup",r._onDrop);B(a,"touchend",r._onDrop);B(a,"touchcancel",r._onDrop)}if(D&&this.nativeDraggable){this.options.touchStartThreshold=4;Se.draggable=true}ye("delayStart",this,{evt:t});if(s.delay&&(!s.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(j||L))){if(mt.eventCanceled){this._onDrop();return}if(s.supportPointer){B(a,"pointerup",r._disableDelayedDrag);B(a,"pointercancel",r._disableDelayedDrag)}else{B(a,"mouseup",r._disableDelayedDrag);B(a,"touchend",r._disableDelayedDrag);B(a,"touchcancel",r._disableDelayedDrag)}B(a,"mousemove",r._delayedDragTouchMoveHandler);B(a,"touchmove",r._delayedDragTouchMoveHandler);s.supportPointer&&B(a,"pointermove",r._delayedDragTouchMoveHandler);r._dragStartTimer=setTimeout(l,s.delay)}else{l()}}},_delayedDragTouchMoveHandler:function e(t){var n=t.touches?t.touches[0]:t;if(Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))){this._disableDelayedDrag()}},_disableDelayedDrag:function e(){Se&&bt(Se);clearTimeout(this._dragStartTimer);this._disableDelayedDragEvents()},_disableDelayedDragEvents:function e(){var t=this.el.ownerDocument;H(t,"mouseup",this._disableDelayedDrag);H(t,"touchend",this._disableDelayedDrag);H(t,"touchcancel",this._disableDelayedDrag);H(t,"pointerup",this._disableDelayedDrag);H(t,"pointercancel",this._disableDelayedDrag);H(t,"mousemove",this._delayedDragTouchMoveHandler);H(t,"touchmove",this._delayedDragTouchMoveHandler);H(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function e(t,n){n=n||t.pointerType=="touch"&&t;if(!this.nativeDraggable||n){if(this.options.supportPointer){B(document,"pointermove",this._onTouchMove)}else if(n){B(document,"touchmove",this._onTouchMove)}else{B(document,"mousemove",this._onTouchMove)}}else{B(Se,"dragend",this);B(qe,"dragstart",this._onDragStart)}try{if(document.selection){qt((function(){document.selection.empty()}))}else{window.getSelection().removeAllRanges()}}catch(e){}},_dragStarted:function e(t,n){Ae=false;if(qe&&Se){ye("dragStarted",this,{evt:n});if(this.nativeDraggable){B(document,"dragover",vt)}var i=this.options;!t&&$(Se,i.dragClass,false);$(Se,i.ghostClass,true);mt.active=this;t&&this._appendGhost();Ee({sortable:this,name:"start",originalEvent:n})}else{this._nulling()}},_emulateDragOver:function e(){if(Ze){this._lastX=Ze.clientX;this._lastY=Ze.clientY;ct();var t=document.elementFromPoint(Ze.clientX,Ze.clientY);var n=t;while(t&&t.shadowRoot){t=t.shadowRoot.elementFromPoint(Ze.clientX,Ze.clientY);if(t===n)break;n=t}Se.parentNode[de]._isOutsideThisEl(t);if(n){do{if(n[de]){var i=void 0;i=n[de]._onDragOver({clientX:Ze.clientX,clientY:Ze.clientY,target:t,rootEl:n});if(i&&!this.options.dragoverBubble){break}}t=n}while(n=P(n))}dt()}},_onTouchMove:function e(t){if(He){var n=this.options,i=n.fallbackTolerance,r=n.fallbackOffset,o=t.touches?t.touches[0]:t,s=Oe&&Y(Oe,true),a=Oe&&s&&s.a,l=Oe&&s&&s.d,u=it&&Ke&&te(Ke),f=(o.clientX-He.clientX+r.x)/(a||1)+(u?u[0]-Qe[0]:0)/(a||1),c=(o.clientY-He.clientY+r.y)/(l||1)+(u?u[1]-Qe[1]:0)/(l||1);if(!mt.active&&!Ae){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i){return}this._onDragStart(t,true)}if(Oe){if(s){s.e+=f-(Pe||0);s.f+=c-(Ue||0)}else{s={a:1,b:0,c:0,d:1,e:f,f:c}}var d="matrix(".concat(s.a,",").concat(s.b,",").concat(s.c,",").concat(s.d,",").concat(s.e,",").concat(s.f,")");F(Oe,"webkitTransform",d);F(Oe,"mozTransform",d);F(Oe,"msTransform",d);F(Oe,"transform",d);Pe=f;Ue=c;Ze=o}t.cancelable&&t.preventDefault()}},_appendGhost:function e(){if(!Oe){var t=this.options.fallbackOnBody?document.body:qe,n=J(Se,true,it,true,t),i=this.options;if(it){Ke=t;while(F(Ke,"position")==="static"&&F(Ke,"transform")==="none"&&Ke!==document){Ke=Ke.parentNode}if(Ke!==document.body&&Ke!==document.documentElement){if(Ke===document)Ke=G();n.top+=Ke.scrollTop;n.left+=Ke.scrollLeft}else{Ke=G()}Qe=te(Ke)}Oe=Se.cloneNode(true);$(Oe,i.ghostClass,false);$(Oe,i.fallbackClass,true);$(Oe,i.dragClass,true);F(Oe,"transition","");F(Oe,"transform","");F(Oe,"box-sizing","border-box");F(Oe,"margin",0);F(Oe,"top",n.top);F(Oe,"left",n.left);F(Oe,"width",n.width);F(Oe,"height",n.height);F(Oe,"opacity","0.8");F(Oe,"position",it?"absolute":"fixed");F(Oe,"zIndex","100000");F(Oe,"pointerEvents","none");mt.ghost=Oe;t.appendChild(Oe);F(Oe,"transform-origin",We/parseInt(Oe.style.width)*100+"% "+$e/parseInt(Oe.style.height)*100+"%")}},_onDragStart:function e(t,n){var i=this;var r=t.dataTransfer;var o=i.options;ye("dragStart",this,{evt:t});if(mt.eventCanceled){this._onDrop();return}ye("setupClone",this);if(!mt.eventCanceled){Ie=fe(Se);Ie.removeAttribute("id");Ie.draggable=false;Ie.style["will-change"]="";this._hideClone();$(Ie,this.options.chosenClass,false);mt.clone=Ie}i.cloneId=qt((function(){ye("clone",i);if(mt.eventCanceled)return;if(!i.options.removeCloneOnHide){qe.insertBefore(Ie,Se)}i._hideClone();Ee({sortable:i,name:"clone"})}));!n&&$(Se,o.dragClass,true);if(n){Ne=true;i._loopId=setInterval(i._emulateDragOver,50)}else{H(document,"mouseup",i._onDrop);H(document,"touchend",i._onDrop);H(document,"touchcancel",i._onDrop);if(r){r.effectAllowed="move";o.setData&&o.setData.call(i,r,Se)}B(document,"drop",i);F(Se,"transform","translateZ(0)")}Ae=true;i._dragStartId=qt(i._dragStarted.bind(i,n,t));B(document,"selectstart",i);Fe=true;window.getSelection().removeAllRanges();if(_){F(document.body,"user-select","none")}},_onDragOver:function e(t){var n=this.el,i=t.target,r,o,s,a=this.options,l=a.group,u=mt.active,f=_e===l,c=a.sort,d=ze||u,h,v=this,m=false;if(et)return;function p(e,a){ye(e,v,k({evt:t,isOwner:f,axis:h?"vertical":"horizontal",revert:s,dragRect:r,targetRect:o,canSort:c,fromSortable:d,target:i,completed:b,onMove:function e(i,o){return gt(qe,n,Se,r,i,J(i),t,o)},changed:w},a))}function g(){p("dragOverAnimationCapture");v.captureAnimationState();if(v!==d){d.captureAnimationState()}}function b(e){p("dragOverCompleted",{insertion:e});if(e){if(f){u._hideClone()}else{u._showClone(v)}if(v!==d){$(Se,ze?ze.options.ghostClass:u.options.ghostClass,false);$(Se,a.ghostClass,true)}if(ze!==v&&v!==mt.active){ze=v}else if(v===mt.active&&ze){ze=null}if(d===v){v._ignoreWhileAnimating=i}v.animateAll((function(){p("dragOverAnimationComplete");v._ignoreWhileAnimating=null}));if(v!==d){d.animateAll();d._ignoreWhileAnimating=null}}if(i===Se&&!Se.animated||i===n&&!i.animated){Ye=null}if(!a.dragoverBubble&&!t.rootEl&&i!==document){Se.parentNode[de]._isOutsideThisEl(t.target);!e&&ht(t)}!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation();return m=true}function w(){Le=ee(Se);De=ee(Se,a.draggable);Ee({sortable:v,name:"change",toEl:n,newIndex:Le,newDraggableIndex:De,originalEvent:t})}if(t.preventDefault!==void 0){t.cancelable&&t.preventDefault()}i=U(i,a.draggable,n,true);p("dragOver");if(mt.eventCanceled)return m;if(Se.contains(t.target)||i.animated&&i.animatingX&&i.animatingY||v._ignoreWhileAnimating===i){return b(false)}Ne=false;if(u&&!a.disabled&&(f?c||(s=ke!==qe):ze===this||(this.lastPutMode=_e.checkPull(this,u,Se,t))&&l.checkPut(this,u,Se,t))){h=this._getDirection(t,i)==="vertical";r=J(Se);p("dragOverValid");if(mt.eventCanceled)return m;if(s){ke=qe;g();this._hideClone();p("revert");if(!mt.eventCanceled){if(Me){qe.insertBefore(Se,Me)}else{qe.appendChild(Se)}}return b(true)}var x=Q(n,a.draggable);if(!x||yt(t,h,this)&&!x.animated){if(x===Se){return b(false)}if(x&&n===t.target){i=x}if(i){o=J(i)}if(gt(qe,n,Se,r,i,o,t,!!i)!==false){g();if(x&&x.nextSibling){n.insertBefore(Se,x.nextSibling)}else{n.appendChild(Se)}ke=n;w();return b(true)}}else if(x&&xt(t,h,this)){var y=K(n,0,a,true);if(y===Se){return b(false)}i=y;o=J(i);if(gt(qe,n,Se,r,i,o,t,false)!==false){g();n.insertBefore(Se,y);ke=n;w();return b(true)}}else if(i.parentNode===n){o=J(i);var E=0,S,O=Se.parentNode!==n,q=!lt(Se.animated&&Se.toRect||r,i.animated&&i.toRect||o,h),M=h?"top":"left",T=X(i,"top","top")||X(Se,"top","top"),I=T?T.scrollTop:void 0;if(Ye!==i){S=o[M];Ge=false;Je=!q&&a.invertSwap||O}E=Et(t,i,o,h,q?1:a.swapThreshold,a.invertedSwapThreshold==null?a.swapThreshold:a.invertedSwapThreshold,Je,Ye===i);var C;if(E!==0){var R=ee(Se);do{R-=E;C=ke.children[R]}while(C&&(F(C,"display")==="none"||C===Oe))}if(E===0||C===i){return b(false)}Ye=i;Ve=E;var L=i.nextElementSibling,j=false;j=E===1;var D=gt(qe,n,Se,r,i,o,t,j);if(D!==false){if(D===1||D===-1){j=D===1}et=true;setTimeout(wt,30);g();if(j&&!L){n.appendChild(Se)}else{i.parentNode.insertBefore(Se,j?L:i)}if(T){ue(T,0,I-T.scrollTop)}ke=Se.parentNode;if(S!==undefined&&!Je){Xe=Math.abs(S-J(i)[M])}w();return b(true)}}if(n.contains(Se)){return b(false)}}return false},_ignoreWhileAnimating:null,_offMoveEvents:function e(){H(document,"mousemove",this._onTouchMove);H(document,"touchmove",this._onTouchMove);H(document,"pointermove",this._onTouchMove);H(document,"dragover",ht);H(document,"mousemove",ht);H(document,"touchmove",ht)},_offUpEvents:function e(){var t=this.el.ownerDocument;H(t,"mouseup",this._onDrop);H(t,"touchend",this._onDrop);H(t,"pointerup",this._onDrop);H(t,"pointercancel",this._onDrop);H(t,"touchcancel",this._onDrop);H(document,"selectstart",this)},_onDrop:function e(t){var n=this.el,i=this.options;Le=ee(Se);De=ee(Se,i.draggable);ye("drop",this,{evt:t});ke=Se&&Se.parentNode;Le=ee(Se);De=ee(Se,i.draggable);if(mt.eventCanceled){this._nulling();return}Ae=false;Je=false;Ge=false;clearInterval(this._loopId);clearTimeout(this._dragStartTimer);Mt(this.cloneId);Mt(this._dragStartId);if(this.nativeDraggable){H(document,"drop",this);H(n,"dragstart",this._onDragStart)}this._offMoveEvents();this._offUpEvents();if(_){F(document.body,"user-select","")}F(Se,"transform","");if(t){if(Fe){t.cancelable&&t.preventDefault();!i.dropBubble&&t.stopPropagation()}Oe&&Oe.parentNode&&Oe.parentNode.removeChild(Oe);if(qe===ke||ze&&ze.lastPutMode!=="clone"){Ie&&Ie.parentNode&&Ie.parentNode.removeChild(Ie)}if(Se){if(this.nativeDraggable){H(Se,"dragend",this)}bt(Se);Se.style["will-change"]="";if(Fe&&!Ae){$(Se,ze?ze.options.ghostClass:this.options.ghostClass,false)}$(Se,this.options.chosenClass,false);Ee({sortable:this,name:"unchoose",toEl:ke,newIndex:null,newDraggableIndex:null,originalEvent:t});if(qe!==ke){if(Le>=0){Ee({rootEl:ke,name:"add",toEl:ke,fromEl:qe,originalEvent:t});Ee({sortable:this,name:"remove",toEl:ke,originalEvent:t});Ee({rootEl:ke,name:"sort",toEl:ke,fromEl:qe,originalEvent:t});Ee({sortable:this,name:"sort",toEl:ke,originalEvent:t})}ze&&ze.save()}else{if(Le!==Re){if(Le>=0){Ee({sortable:this,name:"update",toEl:ke,originalEvent:t});Ee({sortable:this,name:"sort",toEl:ke,originalEvent:t})}}}if(mt.active){if(Le==null||Le===-1){Le=Re;De=je}Ee({sortable:this,name:"end",toEl:ke,originalEvent:t});this.save()}}}this._nulling()},_nulling:function e(){ye("nulling",this);qe=Se=ke=Oe=Me=Ie=Te=Ce=He=Ze=Fe=Le=De=Re=je=Ye=Ve=ze=_e=mt.dragged=mt.ghost=mt.clone=mt.active=null;var t=this.el;tt.forEach((function(e){if(t.contains(e)){e.checked=true}}));tt.length=Pe=Ue=0},handleEvent:function e(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":if(Se){this._onDragOver(t);pt(t)}break;case"selectstart":t.preventDefault();break}},toArray:function e(){var t=[],n,i=this.el.children,r=0,o=i.length,s=this.options;for(;r<o;r++){n=i[r];if(U(n,s.draggable,this.el,false)){t.push(n.getAttribute(s.dataIdAttr)||kt(n))}}return t},sort:function e(t,n){var i={},r=this.el;this.toArray().forEach((function(e,t){var n=r.children[t];if(U(n,this.options.draggable,r,false)){i[e]=n}}),this);n&&this.captureAnimationState();t.forEach((function(e){if(i[e]){r.removeChild(i[e]);r.appendChild(i[e])}}));n&&this.animateAll()},save:function e(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function e(t,n){return U(t,n||this.options.draggable,this.el,false)},option:function e(t,n){var i=this.options;if(n===void 0){return i[t]}else{var r=be.modifyOption(this,t,n);if(typeof r!=="undefined"){i[t]=r}else{i[t]=n}if(t==="group"){ft(i)}}},destroy:function e(){ye("destroy",this);var t=this.el;t[de]=null;H(t,"mousedown",this._onTapStart);H(t,"touchstart",this._onTapStart);H(t,"pointerdown",this._onTapStart);if(this.nativeDraggable){H(t,"dragover",this);H(t,"dragenter",this)}Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")}));this._onDrop();this._disableDelayedDragEvents();Be.splice(Be.indexOf(this.el),1);this.el=t=null},_hideClone:function e(){if(!Ce){ye("hideClone",this);if(mt.eventCanceled)return;F(Ie,"display","none");if(this.options.removeCloneOnHide&&Ie.parentNode){Ie.parentNode.removeChild(Ie)}Ce=true}},_showClone:function e(t){if(t.lastPutMode!=="clone"){this._hideClone();return}if(Ce){ye("showClone",this);if(mt.eventCanceled)return;if(Se.parentNode==qe&&!this.options.group.revertClone){qe.insertBefore(Ie,Se)}else if(Me){qe.insertBefore(Ie,Me)}else{qe.appendChild(Ie)}if(this.options.group.revertClone){this.animate(Se,Ie)}F(Ie,"display","");Ce=false}}};function pt(e){if(e.dataTransfer){e.dataTransfer.dropEffect="move"}e.cancelable&&e.preventDefault()}function gt(e,t,n,i,r,o,s,a){var l,u=e[de],f=u.options.onMove,c;if(window.CustomEvent&&!L&&!j){l=new CustomEvent("move",{bubbles:true,cancelable:true})}else{l=document.createEvent("Event");l.initEvent("move",true,true)}l.to=t;l.from=e;l.dragged=n;l.draggedRect=i;l.related=r||t;l.relatedRect=o||J(t);l.willInsertAfter=a;l.originalEvent=s;e.dispatchEvent(l);if(f){c=f.call(u,l,s)}return c}function bt(e){e.draggable=false}function wt(){et=false}function xt(e,t,n){var i=J(K(n.el,0,n.options,true));var r=ce(n.el,n.options,Oe);var o=10;return t?e.clientX<r.left-o||e.clientY<i.top&&e.clientX<i.right:e.clientY<r.top-o||e.clientY<i.bottom&&e.clientX<i.left}function yt(e,t,n){var i=J(Q(n.el,n.options.draggable));var r=ce(n.el,n.options,Oe);var o=10;return t?e.clientX>r.right+o||e.clientY>i.bottom&&e.clientX>i.left:e.clientY>r.bottom+o||e.clientX>i.right&&e.clientY>i.top}function Et(e,t,n,i,r,o,s,a){var l=i?e.clientY:e.clientX,u=i?n.height:n.width,f=i?n.top:n.left,c=i?n.bottom:n.right,d=false;if(!s){if(a&&Xe<u*r){if(!Ge&&(Ve===1?l>f+u*o/2:l<c-u*o/2)){Ge=true}if(!Ge){if(Ve===1?l<f+Xe:l>c-Xe){return-Ve}}else{d=true}}else{if(l>f+u*(1-r)/2&&l<c-u*(1-r)/2){return St(t)}}}d=d||s;if(d){if(l<f+u*o/2||l>c-u*o/2){return l>f+u/2?1:-1}}return 0}function St(e){if(ee(Se)<ee(e)){return 1}else{return-1}}function kt(e){var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,i=0;while(n--){i+=t.charCodeAt(n)}return i.toString(36)}function Ot(e){tt.length=0;var t=e.getElementsByTagName("input");var n=t.length;while(n--){var i=t[n];i.checked&&tt.push(i)}}function qt(e){return setTimeout(e,0)}function Mt(e){return clearTimeout(e)}if(nt){B(document,"touchmove",(function(e){if((mt.active||Ae)&&e.cancelable){e.preventDefault()}}))}mt.utils={on:B,off:H,css:F,find:V,is:function e(t,n){return!!U(t,n,t,false)},extend:re,throttle:ae,closest:U,toggleClass:$,clone:fe,index:ee,nextTick:qt,cancelNextTick:Mt,detectDirection:at,getChild:K,expando:de};mt.get=function(e){return e[de]};mt.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++){t[n]=arguments[n]}if(t[0].constructor===Array)t=t[0];t.forEach((function(e){if(!e.prototype||!e.prototype.constructor){throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e))}if(e.utils)mt.utils=k(k({},mt.utils),e.utils);be.mount(e)}))};mt.create=function(e,t){return new mt(e,t)};mt.version=C;var Tt=[],It,Ct,Rt=false,Lt,jt,Dt,_t;function zt(){function e(){this.defaults={scroll:true,forceAutoScrollFallback:false,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:true};for(var e in this){if(e.charAt(0)==="_"&&typeof this[e]==="function"){this[e]=this[e].bind(this)}}}e.prototype={dragStarted:function e(t){var n=t.originalEvent;if(this.sortable.nativeDraggable){B(document,"dragover",this._handleAutoScroll)}else{if(this.options.supportPointer){B(document,"pointermove",this._handleFallbackAutoScroll)}else if(n.touches){B(document,"touchmove",this._handleFallbackAutoScroll)}else{B(document,"mousemove",this._handleFallbackAutoScroll)}}},dragOverCompleted:function e(t){var n=t.originalEvent;if(!this.options.dragOverBubble&&!n.rootEl){this._handleAutoScroll(n)}},drop:function e(){if(this.sortable.nativeDraggable){H(document,"dragover",this._handleAutoScroll)}else{H(document,"pointermove",this._handleFallbackAutoScroll);H(document,"touchmove",this._handleFallbackAutoScroll);H(document,"mousemove",this._handleFallbackAutoScroll)}Nt();At();le()},nulling:function e(){Dt=Ct=It=Rt=_t=Lt=jt=null;Tt.length=0},_handleFallbackAutoScroll:function e(t){this._handleAutoScroll(t,true)},_handleAutoScroll:function e(t,n){var i=this;var r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,s=document.elementFromPoint(r,o);Dt=t;if(n||this.options.forceAutoScrollFallback||j||L||_){Bt(t,this.options,s,n);var a=ie(s,true);if(Rt&&(!_t||r!==Lt||o!==jt)){_t&&Nt();_t=setInterval((function(){var e=ie(document.elementFromPoint(r,o),true);if(e!==a){a=e;At()}Bt(t,i.options,e,n)}),10);Lt=r;jt=o}}else{if(!this.options.bubbleScroll||ie(s,true)===G()){At();return}Bt(t,this.options,ie(s,false),false)}}};return E(e,{pluginName:"scroll",initializeByDefault:true})}function At(){Tt.forEach((function(e){clearInterval(e.pid)}));Tt=[]}function Nt(){clearInterval(_t)}var Bt=ae((function(e,t,n,i){if(!t.scroll)return;var r=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,a=t.scrollSpeed,l=G();var u=false,f;if(Ct!==n){Ct=n;At();It=t.scroll;f=t.scrollFn;if(It===true){It=ie(n,true)}}var c=0;var d=It;do{var h=d,v=J(h),m=v.top,p=v.bottom,g=v.left,b=v.right,w=v.width,x=v.height,y=void 0,E=void 0,S=h.scrollWidth,k=h.scrollHeight,O=F(h),q=h.scrollLeft,M=h.scrollTop;if(h===l){y=w<S&&(O.overflowX==="auto"||O.overflowX==="scroll"||O.overflowX==="visible");E=x<k&&(O.overflowY==="auto"||O.overflowY==="scroll"||O.overflowY==="visible")}else{y=w<S&&(O.overflowX==="auto"||O.overflowX==="scroll");E=x<k&&(O.overflowY==="auto"||O.overflowY==="scroll")}var T=y&&(Math.abs(b-r)<=s&&q+w<S)-(Math.abs(g-r)<=s&&!!q);var I=E&&(Math.abs(p-o)<=s&&M+x<k)-(Math.abs(m-o)<=s&&!!M);if(!Tt[c]){for(var C=0;C<=c;C++){if(!Tt[C]){Tt[C]={}}}}if(Tt[c].vx!=T||Tt[c].vy!=I||Tt[c].el!==h){Tt[c].el=h;Tt[c].vx=T;Tt[c].vy=I;clearInterval(Tt[c].pid);if(T!=0||I!=0){u=true;Tt[c].pid=setInterval(function(){if(i&&this.layer===0){mt.active._onTouchMove(Dt)}var t=Tt[this.layer].vy?Tt[this.layer].vy*a:0;var n=Tt[this.layer].vx?Tt[this.layer].vx*a:0;if(typeof f==="function"){if(f.call(mt.dragged.parentNode[de],n,t,e,Dt,Tt[this.layer].el)!=="continue"){return}}ue(Tt[this.layer].el,n,t)}.bind({layer:c}),24)}}c++}while(t.bubbleScroll&&d!==l&&(d=ie(d,false)));Rt=u}),30);var Ht=function e(t){var n=t.originalEvent,i=t.putSortable,r=t.dragEl,o=t.activeSortable,s=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(!n)return;var u=i||o;a();var f=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n;var c=document.elementFromPoint(f.clientX,f.clientY);l();if(u&&!u.el.contains(c)){s("spill");this.onSpill({dragEl:r,putSortable:i})}};function Zt(){}Zt.prototype={startIndex:null,dragStart:function e(t){var n=t.oldDraggableIndex;this.startIndex=n},onSpill:function e(t){var n=t.dragEl,i=t.putSortable;this.sortable.captureAnimationState();if(i){i.captureAnimationState()}var r=K(this.sortable.el,this.startIndex,this.options);if(r){this.sortable.el.insertBefore(n,r)}else{this.sortable.el.appendChild(n)}this.sortable.animateAll();if(i){i.animateAll()}},drop:Ht};E(Zt,{pluginName:"revertOnSpill"});function Pt(){}Pt.prototype={onSpill:function e(t){var n=t.dragEl,i=t.putSortable;var r=i||this.sortable;r.captureAnimationState();n.parentNode&&n.parentNode.removeChild(n);r.animateAll()},drop:Ht};E(Pt,{pluginName:"removeOnSpill"});mt.mount(new zt);mt.mount(Pt,Zt);const Ut=()=>`verdocs-template-roles{display:block;max-width:600px;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-template-roles .roles{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:10px;margin-top:10px}verdocs-template-roles .roles .sequence{gap:10px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;font-weight:500;padding:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;border-bottom:1px dotted #e3e3e3}verdocs-template-roles .roles .sequence.add-sequence{color:#777777;line-height:34px}verdocs-template-roles .roles .sequence-label{font-size:18px;line-height:32px}verdocs-template-roles .roles .sequence-roles{gap:10px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .roles .role{height:32px;cursor:move;display:-ms-flexbox;display:flex;max-width:200px;position:relative;border-radius:32px;background-color:#eff7fb;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 14px 0 34px;border:1px solid #ccc;-ms-flex-direction:column;flex-direction:column}verdocs-template-roles .roles .role .role-name{font-size:14px;overflow:hidden;font-weight:400;line-height:30px;white-space:nowrap;text-overflow:ellipsis}verdocs-template-roles .roles .role .icons{position:absolute;left:1px;top:-3px;cursor:pointer;padding:5px;z-index:10}verdocs-template-roles .roles .role .icons .gear-button{display:none;-webkit-transform:scale(1.1);transform:scale(1.1);margin:4px 0 0 1px}verdocs-template-roles .roles .role .icons .type-icon{opacity:0.6;display:block;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-roles .roles .role .icons:hover .gear-button{display:block}verdocs-template-roles .roles .role .icons:hover .type-icon{display:none}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#46497d;margin:0 0 10px 0}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{opacity:0.3;padding:0 10px;cursor:pointer;background:none;height:32px;border:1px solid #cccccc;border-radius:32px}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:16px;height:16px;stroke:#666666;margin-bottom:2px;display:inline-block}verdocs-template-roles .sequence-roles{display:-ms-flexbox;display:flex;max-width:400px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}`;const Wt='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>';const $t=`<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>`;const Ft='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';const Yt=`<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>`;const Vt=`<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>`;const Gt=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.next=n(this,"next");this.exit=n(this,"exit");this.sdkError=n(this,"sdkError");this.rolesUpdated=n(this,"rolesUpdated");this.templateListenerId=null;this.endpoint=s.getDefault();this.templateId="";this.showingRoleDialog=null;this.sender=null;this.dragging=false;this.loading=true;this.template=null;this.sortableRefs=[]}disconnectedCallback(){this.unlistenToTemplate();this.cleanupSortables()}async listenToTemplate(){console.log("[ROLES] Loading template",this.templateId);this.unlistenToTemplate();d.subscribe("templates",this.templateId,(()=>a(this.endpoint,this.templateId)),false,(e=>{console.log("[ROLES] Template Updated",e);this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){d.store.delListener(this.templateListenerId);this.templateListenerId=null}}async componentWillLoad(){var e,t,n;try{this.endpoint.loadSession();if(!this.templateId){console.log(`[ROLES] Missing required template ID ${this.templateId}`);return}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return}this.listenToTemplate()}catch(i){console.log("[ROLES] Error with preview session",i);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new c(i.message,(t=i.response)===null||t===void 0?void 0:t.status,(n=i.response)===null||n===void 0?void 0:n.data))}}cleanupSortables(){this.sortableRefs.forEach((e=>e.destroy()));this.sortableRefs.length=0}componentDidRender(){this.cleanupSortables();const e=this.getSequenceNumbers();(e||[]).forEach((e=>{const t=document.getElementById(`verdocs-roles-sequence-${e}`);if(t){const e=new mt(t,{group:"roles",animation:150,dragoverBubble:true,filter:".no-drag",onEnd:this.handleMoveEnd.bind(this),onChoose:()=>this.dragging=true,onUnchoose:()=>this.dragging=false});this.sortableRefs.push(e)}}));const t=document.getElementById(`verdocs-roles-sequence-add-target`);if(t){console.log("[ROLES] Applying sortable to add-sequence slot");const e=new mt(t,{group:"roles",animation:150,dragoverBubble:true,filter:".no-drag",onEnd:this.handleMoveEnd.bind(this),onChoose:()=>this.dragging=true,onUnchoose:()=>this.dragging=false});this.sortableRefs.push(e)}}handleMoveEnd(e){const t=+e.from.dataset.sequence;const n=+e.to.dataset.sequence;const i=+e.oldIndex+1;const r=+e.newIndex+1;console.log(`Move from ${t}:${i} to ${n}:${r}`,e.item);const o={};const s=this.getSequenceNumbers();s.forEach((e=>{const t=this.getRolesAtSequence(e);o[String(e)]=JSON.parse(JSON.stringify(t))}));o[s[s.length-1]+1]=[];const a=o[t].splice(i-1,1)[0];o[n]||(o[n]=[]);o[n].splice(r-1,0,a);const u=[];Object.entries(o).forEach((([e,t])=>{t.forEach(((t,n)=>{if(!t){return}const i=+n+1;if(t.sequence!==+e||t.order!==i){t.sequence=+e;t.order=i;u.push(l(this.endpoint,this.templateId,t.name,{sequence:+e,order:i}).then((e=>console.log("[ROLES] Updated role",t.name,e))).catch((e=>console.log("[ROLES] Error updating role",e))))}}))}));return Promise.all(u).then((async()=>console.log("[ROLES] Done renumbering"))).catch((e=>console.log("[ROLES] Error updating roles",e)))}handleCancel(){var e;(e=this.exit)===null||e===void 0?void 0:e.emit()}handleSubmit(){var e;(e=this.next)===null||e===void 0?void 0:e.emit()}getSortedRoles(){var e;return(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).sort(((e,t)=>e.sequence===t.sequence?e.order-t.order:e.sequence-t.sequence))}getSequenceNumbers(){const e={};this.getSortedRoles().forEach((t=>{e[t.sequence]=true}));console.log("[ROLES] Sequences",e);return Object.keys(e).map((e=>+e)).sort(((e,t)=>e-t))}getRoleNames(){const e=this.getSortedRoles();return e.map((e=>e.name))}getRolesAtSequence(e){var t;return(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).filter((t=>t&&t.sequence===e))}async renumberTemplateRoles(){var e;const t={};const n=[];const i=this.getSequenceNumbers();(i||[]).forEach((e=>{(t[e]||[]).forEach(((t,i)=>{const r=+i+1;if(t.sequence!==+e||t.order!==r){console.log("[ROLES] Updating role",t.name,"from",t.sequence,t.order,"to",e,r);t.sequence=+e;t.order=r;n.push(l(this.endpoint,this.templateId,t.name,{sequence:+e,order:r}).then((e=>console.log("[ROLES] Updated role",t.name,e))).catch((e=>console.log("[ROLES] Error updating role",e))))}}))}));console.log(`[ROLES] Awaiting ${n.length} renumber requests`);await Promise.all(n).then((async()=>{const e=JSON.parse(JSON.stringify(this.template));e.roles=Object.keys(t).reduce(((e,n)=>e.concat(t[n])),[]);console.log("[ROLES] Done renumbering",e.roles.map((e=>({name:e.name,sequence:e.sequence,order:e.order}))));d.updateTemplate(this.templateId,e)}));(e=this.rolesUpdated)===null||e===void 0?void 0:e.emit({event:"updated",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})}getNextRoleName(){var e,t;let n="";let i=(((e=this.template)===null||e===void 0?void 0:e.roles)||[]).length;do{i++;n=`Recipient ${i}`}while(!n||(((t=this.template)===null||t===void 0?void 0:t.roles)||[]).some((e=>e&&e.name===n)));return n}callCreateRole(e,t,n){console.log("[ROLES] Will create role",{name:e,sequence:t,order:n});u(this.endpoint,this.templateId,{template_id:this.templateId,name:e,sequence:t,message:"",order:n,full_name:null,first_name:"",last_name:"",email:"",phone:"",type:"signer",delegator:false,name_locked:false}).then((async e=>{var t;console.log("[ROLES] Created role",e);console.log("Updating template in data store");await d.getTemplate(this.endpoint,this.templateId,true);(t=this.rolesUpdated)===null||t===void 0?void 0:t.emit({event:"added",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})})).catch((e=>{console.log("[ROLES] Error creating role",e)}))}handleAddRole(e,t){e.stopPropagation();const n=this.getRolesAtSequence(t).length+1;const i=this.getNextRoleName();this.callCreateRole(i,t,n)}handleAddStep(e,t){e.stopPropagation();const n=1;const i=this.getNextRoleName();this.callCreateRole(i,t,n)}render(){if(!this.endpoint.session){return i(r,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(this.loading||!this.template){return i(r,{class:"loading"},i("verdocs-loader",null))}const e=this.getRoleNames();const t=this.getSequenceNumbers();const n=t&&t.length>0?(t[t.length-1]||0)+1:1;console.log("[ROLES] Rendering",{roleNames:e,sequences:t,nextSequence:n});return i(r,{class:{dragging:this.dragging}},i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Roles and Workflow"),i("div",{class:"roles"},t.map(((e,t)=>i("div",{class:"sequence"},i("div",{class:"sequence-label no-drag"},t+1,"."),i("div",{class:"sequence-roles",id:`verdocs-roles-sequence-${e}`,"data-sequence":e},this.getRolesAtSequence(e).map((t=>{const n=!t.email||!t.first_name||!t.last_name;return n?i("div",{class:"role","data-rolename":t.name,"data-sequence":e,"data-order":t.order},i("div",{class:"role-name"},t.name),i("div",{class:"icons"},i("div",{class:"gear-button",innerHTML:Wt,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"}),i("span",{class:"type-icon",innerHTML:t.type==="signer"?Ft:t.type==="cc"?Vt:Yt}))):i("div",{class:"role","data-rolename":t.name,"data-sequence":e,"data-order":t.order},i("div",{class:"role-name"},f(t)),i("div",{class:"icons"},i("div",{class:"gear-button",innerHTML:Wt,onClick:()=>this.showingRoleDialog=t.name,"aria-role":"button"}),i("span",{class:"type-icon",innerHTML:t.type==="signer"?Ft:t.type==="cc"?Vt:Yt})))}))),i("button",{class:"add-role no-drag",onClick:t=>this.handleAddRole(t,e)},"+ Add Role")))),i("div",{class:"sequence add-sequence"},i("div",{class:"sequence-label no-drag"},t.length+1,"."),i("div",{class:"sequence-roles",id:`verdocs-roles-sequence-add-target`,"data-sequence":n}),i("button",{class:"add-role no-drag",onClick:e=>this.handleAddRole(e,n)},"+ Add Role"))),e.length<1&&i("div",{class:"empty"},"You must add at least one Role before proceeding.",i("br",null)," Click the ",i("span",{innerHTML:$t})," Add button above to get started."),i("div",{class:"buttons"},i("div",{class:"flex-fill"}),i("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:()=>this.handleCancel()}),i("verdocs-button",{label:"OK",size:"small",onClick:()=>this.handleSubmit(),disabled:e.length<1}))),this.showingRoleDialog&&i("verdocs-menu-panel",{onClose:()=>this.showingRoleDialog=null},i("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{var e;(e=document.getElementById("verdocs-menu-panel-overlay"))===null||e===void 0?void 0:e.remove();this.showingRoleDialog=null},onDelete:async()=>{var e;this.showingRoleDialog=null;await this.renumberTemplateRoles();(e=this.rolesUpdated)===null||e===void 0?void 0:e.emit({event:"deleted",endpoint:this.endpoint,templateId:this.templateId,roles:this.getSortedRoles()})}})))}get el(){return this}static get style(){return Ut()}},[0,"verdocs-template-roles",{endpoint:[16],templateId:[1,"template-id"],showingRoleDialog:[32],sender:[32],dragging:[32],loading:[32],template:[32]}]);function Jt(){if(typeof customElements==="undefined"){return}const e=["verdocs-template-roles","verdocs-button","verdocs-component-error","verdocs-help-icon","verdocs-loader","verdocs-menu-panel","verdocs-select-input","verdocs-template-role-properties","verdocs-text-input"];e.forEach((e=>{switch(e){case"verdocs-template-roles":if(!customElements.get(o(e))){customElements.define(o(e),Gt)}break;case"verdocs-button":if(!customElements.get(o(e))){h()}break;case"verdocs-component-error":if(!customElements.get(o(e))){v()}break;case"verdocs-help-icon":if(!customElements.get(o(e))){m()}break;case"verdocs-loader":if(!customElements.get(o(e))){p()}break;case"verdocs-menu-panel":if(!customElements.get(o(e))){g()}break;case"verdocs-select-input":if(!customElements.get(o(e))){b()}break;case"verdocs-template-role-properties":if(!customElements.get(o(e))){w()}break;case"verdocs-text-input":if(!customElements.get(o(e))){x()}break}}))}export{Gt as V,Jt as d};
|
|
8
|
-
//# sourceMappingURL=p-
|
|
8
|
+
//# sourceMappingURL=p-qDQgyl7L.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as s,h as a,d as o,t as i}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as l,getTemplate as n,createTemplateDocument as r,deleteTemplateDocument as c}from"@verdocs/js-sdk";import{b as d,P as p,J as m,c as h,F as f,d as v,T as u}from"./p-BDv5kBUR.js";import{S as x}from"./p-C1sRVZWv.js";import{S as g}from"./p-C7hFgM52.js";import{d as b}from"./p-Bdf8pPWm.js";import{d as w}from"./p-CyDWJAOZ.js";import{d as T}from"./p-DT0LGcPi.js";import{d as k}from"./p-CLxwSMOV.js";import{d as y}from"./p-B-_kYJtC.js";import{d as E}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as t,c as s,h as a,d as o,t as i}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as l,getTemplate as n,createTemplateDocument as r,deleteTemplateDocument as c}from"@verdocs/js-sdk";import{b as d,P as p,J as m,c as h,F as f,d as v,T as u}from"./p-BDv5kBUR.js";import{S as x}from"./p-C1sRVZWv.js";import{S as g}from"./p-C7hFgM52.js";import{d as b}from"./p-Bdf8pPWm.js";import{d as w}from"./p-CyDWJAOZ.js";import{d as T}from"./p-DT0LGcPi.js";import{d as k}from"./p-CLxwSMOV.js";import{d as y}from"./p-B-_kYJtC.js";import{d as E}from"./p-BwUTiBud.js";import{d as A}from"./p-2bW-AL6b.js";const C=()=>`verdocs-template-attachments{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-template-attachments h5{font-size:16px;font-weight:bold;margin:0 0 10px 0;color:#46497d}verdocs-template-attachments .attachments{margin:0 0 40px 0}verdocs-template-attachments .attachment{display:-ms-flexbox;display:flex;padding:5px 0;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#33364b}verdocs-template-attachments .attachment:hover .trash-icon{display:-ms-flexbox;display:flex}verdocs-template-attachments .attachment:hover .pages{display:none}verdocs-template-attachments svg{width:28px;height:28px;fill:#5c6575;margin:2px 0 0 0}verdocs-template-attachments .file-icon{-ms-flex:0;flex:0}verdocs-template-attachments .pages{width:24px;height:24px;-ms-flex:0 0 24px;flex:0 0 24px;padding-left:4px;position:relative;margin:-10px 0 0 0}verdocs-template-attachments .pages .pages-icon{top:0;left:0;width:24px;height:24px;position:absolute}verdocs-template-attachments .pages .count{top:11px;left:7px;z-index:1;width:18px;font-size:12px;font-weight:500;position:absolute;text-align:center;letter-spacing:-2px}verdocs-template-attachments .filename{-ms-flex:1;flex:1;display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;border-bottom:1px dotted #cccccc}verdocs-template-attachments .trash-icon{-ms-flex:0;flex:0;display:none}verdocs-template-attachments .trash-icon:hover{cursor:pointer}verdocs-template-attachments verdocs-file-chooser{margin:10px 0;border:2px dashed #979797}verdocs-template-attachments .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .progress-wrapper{padding:20px}verdocs-template-attachments .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-attachments .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-attachments ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-moz-placeholder{color:#aaaaaa}verdocs-template-attachments :-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-attachments ::placeholder{color:#aaaaaa}`;const j=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.exit=s(this,"exit");this.next=s(this,"next");this.templateUpdated=s(this,"templateUpdated");this.sdkError=s(this,"sdkError");this.templateListenerId=null;this.endpoint=l.getDefault();this.templateId="";this.uploading=false;this.progressLabel="Uploading...";this.progressPercent=0;this.showDeleteError=false;this.confirmDeleteDocument=null;this.loading=true;this.template=null}async componentWillLoad(){var e,t,s;try{this.endpoint.loadSession();if(!this.templateId){console.log(`[ROLES] Missing required template ID ${this.templateId}`);return}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return}this.listenToTemplate()}catch(a){console.log("[TEMPLATE ATTACHMENTS] Error loading template",a);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new x(a.message,(t=a.response)===null||t===void 0?void 0:t.status,(s=a.response)===null||s===void 0?void 0:s.data))}}disconnectedCallback(){this.unlistenToTemplate()}async listenToTemplate(){this.unlistenToTemplate();g.subscribe("templates",this.templateId,(()=>n(this.endpoint,this.templateId)),false,(e=>{this.template=e;this.loading=false}))}unlistenToTemplate(){if(this.templateListenerId){g.store.delListener(this.templateListenerId);this.templateListenerId=null}}handleCancel(e){e.stopPropagation();this.exit.emit()}handleUploadProgress(e){if(e>=99){this.progressPercent=100;this.progressLabel="Processing..."}else{this.progressPercent=e}}async handleUpload(e){var t,s,a,o;e.stopPropagation();const i=e.detail.file;if(!i){return}console.log("[ATTACHMENTS] Uploading...",i);this.uploading=true;this.progressLabel="Uploading...";try{const e=await r(this.endpoint,this.templateId,i,this.handleUploadProgress.bind(this));console.log("[ATTACHMENTS] Created attachment",e);this.template=await g.getTemplate(this.endpoint,this.templateId,true);console.log("[ATTACHMENTS] Updated template",this.template);(t=this.templateUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,template:this.template,event:"attachments"});this.uploading=false;this.progressLabel="";this.progressPercent=0}catch(e){console.log("[ATTACHMENTS] Error creating template",e);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new x(e.message,(a=e.response)===null||a===void 0?void 0:a.status,(o=e.response)===null||o===void 0?void 0:o.data));this.uploading=false}}handleNext(e){var t;e.stopPropagation();this.uploading=false;this.progressLabel="";this.progressPercent=0;(t=this.next)===null||t===void 0?void 0:t.emit({template:this.template})}async confirmDelete(){await c(this.endpoint,this.confirmDeleteDocument.id);this.template=await g.getTemplate(this.endpoint,this.templateId,true);console.log("[ATTACHMENTS] New template",this.template);this.confirmDeleteDocument=null}async handleDelete(e){var t;if((((t=this.template)===null||t===void 0?void 0:t.documents)||[]).length>1){this.confirmDeleteDocument=e}else{this.showDeleteError=true}}getFileIcon(e){switch(e.mime){case"application/pdf":return h;case"image/jpeg":return m;case"image/png":return p;case"application/msword":case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return d}return f}render(){var e,t;if(!this.endpoint.session){return a(o,null,a("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(this.loading){return a(o,{class:"loading"},a("verdocs-loader",null))}if(!this.endpoint.session||!this.template){return a(o,{class:"empty"})}return a(o,null,a("h5",null,"Existing Attachments"),a("div",{class:"attachments"},(((e=this.template)===null||e===void 0?void 0:e.documents)||[]).map((e=>a("div",{class:"attachment"},a("div",{class:"file-icon",innerHTML:this.getFileIcon(e)}),a("div",{class:"filename",title:e.name},e.name),a("div",{class:"pages"},a("div",{class:"count"},e.pages),a("div",{class:"pages-icon",innerHTML:v})),a("div",{class:"trash-icon",innerHTML:u,onClick:()=>this.handleDelete(e)}))))),a("h5",null,"Attach a New Document"),this.uploading?a("div",{class:"loader-wrapper"},a("verdocs-loader",null),this.progressLabel&&a("div",{class:"progress-wrapper"},a("verdocs-progress-bar",{showPercent:true,percent:this.progressPercent,label:this.progressLabel}))):a("verdocs-file-chooser",{onFileSelected:e=>this.handleUpload(e)}),a("div",{class:"buttons"},a("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e),disabled:this.uploading}),a("verdocs-button",{label:"Next",size:"small",onClick:e=>this.handleNext(e),disabled:!(((t=this.template)===null||t===void 0?void 0:t.documents)||[]).length||this.uploading})),this.showDeleteError&&a("verdocs-ok-dialog",{heading:"Unable to Delete Attachment",message:"Templates must contain at least one attachment.",onNext:()=>this.showDeleteError=false}),this.confirmDeleteDocument&&a("verdocs-ok-dialog",{heading:"Delete this Attachment?",message:"This operation cannot be undone. All fields placed<br />on the deleted attachment will also be removed.",onNext:()=>this.confirmDelete(),showCancel:true,onExit:()=>{this.confirmDeleteDocument=null}}))}static get style(){return C()}},[0,"verdocs-template-attachments",{endpoint:[16],templateId:[1,"template-id"],uploading:[32],progressLabel:[32],progressPercent:[32],showDeleteError:[32],confirmDeleteDocument:[32],loading:[32],template:[32]}]);function M(){if(typeof customElements==="undefined"){return}const e=["verdocs-template-attachments","verdocs-button","verdocs-component-error","verdocs-dialog","verdocs-file-chooser","verdocs-loader","verdocs-ok-dialog","verdocs-progress-bar"];e.forEach((e=>{switch(e){case"verdocs-template-attachments":if(!customElements.get(i(e))){customElements.define(i(e),j)}break;case"verdocs-button":if(!customElements.get(i(e))){b()}break;case"verdocs-component-error":if(!customElements.get(i(e))){w()}break;case"verdocs-dialog":if(!customElements.get(i(e))){T()}break;case"verdocs-file-chooser":if(!customElements.get(i(e))){k()}break;case"verdocs-loader":if(!customElements.get(i(e))){y()}break;case"verdocs-ok-dialog":if(!customElements.get(i(e))){E()}break;case"verdocs-progress-bar":if(!customElements.get(i(e))){A()}break}}))}export{j as V,M as d};
|
|
2
|
+
//# sourceMappingURL=p-sPseFic3.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as t,c as s,h as i,t as o}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as a,convertToE164 as r,createProfile as n,verifyEmail as l,authenticate as d,getMyUser as c,resendVerification as h,resetPassword as u}from"@verdocs/js-sdk";import{V as p}from"./p-D97GxsI-.js";import{S as f}from"./p-C1sRVZWv.js";import{d as m}from"./p-Bdf8pPWm.js";import{d as v}from"./p-CioaaWeS.js";import{d as b}from"./p-DYtSnUj9.js";const y=()=>`verdocs-auth{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{width:350px;display:-ms-flexbox;display:flex;padding:20px;max-width:90%;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;background:#ffffff}verdocs-auth .logo{width:128px;max-width:100%;margin:20px 0 30px}verdocs-auth h3{color:#092c4c;text-align:center;font-weight:400;font-size:18px;line-height:1.75;margin:0}verdocs-auth em{font-size:14px;margin:15px 0}verdocs-auth .buttons{gap:20px;margin:20px 0 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p{color:#092c4c;margin:1em 0;font-size:14px}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}verdocs-auth .already-have{color:#092c4c;margin:0.5em 0;font-size:14px;text-align:center}verdocs-auth .service-agreement{font-size:12px;color:#777}verdocs-auth .service-agreement a{color:#092c4c}`;const g=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.authenticated=s(this,"authenticated");this.sdkError=s(this,"sdkError");this.endpoint=a.getDefault();this.visible=true;this.logo="https://app.verdocs.com/assets/blue-logo.svg";this.displayMode="login";this.org_name="";this.first_name="";this.last_name="";this.email="";this.phone="";this.verificationCode="";this.newPassword="";this.password="";this.confirmpass="";this.submitting=false;this.resendDisabled=false;this.session=null;this.profile=null;this.resendDisabledTimer=null;this.tempAuthEndpoint=new a({baseURL:a.getDefault().getBaseURL(),persist:false});this.handleHashChange=()=>{this.applyHashDisplayMode()}}componentWillLoad(){this.endpoint.loadSession();this.applyHashDisplayMode();if(typeof window!=="undefined"){window.addEventListener("hashchange",this.handleHashChange)}a.getDefault().onSessionChanged(((e,t,s)=>{var i,o;this.session=t;this.profile=s;if(t){(i=this.authenticated)===null||i===void 0?void 0:i.emit({authenticated:true,session:t,profile:s})}else{(o=this.authenticated)===null||o===void 0?void 0:o.emit({authenticated:false,session:t,profile:s})}}))}disconnectedCallback(){if(typeof window!=="undefined"){window.removeEventListener("hashchange",this.handleHashChange)}}applyHashDisplayMode(){if(typeof window==="undefined"){return}const e=(window.location.hash||"").replace(/^#/,"").toLowerCase();if(e==="forgot"){this.displayMode="forgot"}}isPasswordComplex(e){const t=e=>/[A-Z]/.test(e);const s=e=>/[a-z]/.test(e);const i=e=>/[`!@#$%^&*()_\-+=\[\]{};':"\\|,.<>\/?~ ]/.test(e);let o=0,a=0,r=0;for(let n=0;n<e.length;n++){let l=e.charAt(n);if(t(l))o++;else if(s(l))a++;else if(i(l))r++}return e.length>=8&&a>0&&o>0&&r>0}handleSignup(){if(!this.isPasswordComplex(this.password)){p("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"});return}if(this.password!==this.confirmpass){p("Passwords do not match.",{style:"error"});return}this.submitting=true;this.tempAuthEndpoint.clearSession();const e=r(this.phone);n(this.tempAuthEndpoint,{email:this.email,password:this.password,first_name:this.first_name,last_name:this.last_name,org_name:this.org_name,phone:e}).then((e=>{console.log("[AUTH] Profile creation result",e);this.tempAuthEndpoint.setToken(e.access_token);this.password="";this.phone="";this.first_name="";this.last_name="";this.org_name="";this.displayMode="verify";this.submitting=false})).catch((e=>{var t,s,i,o,a,r;console.log("[AUTH] Signup error",e.response);this.submitting=false;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:false,profile:null,session:null});(s=this.sdkError)===null||s===void 0?void 0:s.emit(new f(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(o=e.response)===null||o===void 0?void 0:o.data));p("Signup failed: "+((r=(a=e.response)===null||a===void 0?void 0:a.data)===null||r===void 0?void 0:r.error)||"Unknown Error",{style:"error"})}))}async handleVerification(){this.submitting=true;try{this.submitting=false;const e=await l(this.tempAuthEndpoint,{email:this.email,token:this.verificationCode});p("Thank you for verifying your email address.",{style:"success"});this.completeLogin(e)}catch(e){this.submitting=false;console.log("Verification error",e);p("Verification error, please check the code and try again.")}}completeLogin(e){this.clearForms();this.tempAuthEndpoint.clearSession();this.endpoint.setToken(e.access_token)}async loginAndCheckVerification(){var e;if(this.submitting){return}this.submitting=true;this.tempAuthEndpoint.clearSession();try{this.submitting=false;const e=await d(this.tempAuthEndpoint,{username:this.email.trim(),password:this.password,grant_type:"password"});console.log("[AUTH] Authenticated, checking email verification");this.tempAuthEndpoint.setToken(e.access_token);const t=await c(this.tempAuthEndpoint);if(!t.email_verified){console.log("[AUTH] Logged in, pending email address verification");this.displayMode="verify"}else{console.log("[AUTH] Email address is verified, completing login");this.completeLogin(e)}}catch(t){this.submitting=false;console.log("[AUTH] Auth failure",((e=t.response)===null||e===void 0?void 0:e.data)||t);p("Login failed. Please check your credentials and try again.",{style:"error"})}}clearForms(){this.submitting=false;this.resendDisabled=false;this.email="";this.phone="";this.password="";this.newPassword="";this.confirmpass="";this.verificationCode="";this.first_name="";this.last_name="";this.org_name=""}handleLogout(){console.log("logging out");this.endpoint.clearSession();this.tempAuthEndpoint.clearSession();this.clearForms();this.displayMode="login"}handleResendVerification(){this.resendDisabled=true;this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=false;this.resendDisabledTimer=null}),3e4);h(this.tempAuthEndpoint).then((e=>{console.log("[AUTH] Verification request resent",e);p("Please check your email for a verification code.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend verification",e);p("Unable to resend code. Please try again later.",{style:"error"})}))}handleResendReset(){this.resendDisabled=true;this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=false;this.resendDisabledTimer=null}),3e4);u(this.tempAuthEndpoint,{email:this.email}).then((e=>{console.log("[AUTH] Resend-code request resent",e);p("Please check your email again for a verification code.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend reset request",e);p("Unable to resend code. Please try again later.",{style:"error"})}))}async handleResetGetCode(){this.submitting=true;this.confirmpass="";this.newPassword="";try{this.submitting=false;const e=await u(this.endpoint,{email:this.email});console.log("[AUTH] Reset result",e);p("Please check your email inbox for a password reset code.",{style:"success"});this.verificationCode="";this.confirmpass="";this.newPassword="";this.displayMode="reset"}catch(e){this.submitting=false;console.log("Reset request error",e);p("Request failed. Please check your email address and try again.")}}async handleResetPassword(){if(!this.isPasswordComplex(this.newPassword)){p("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"});return}if(this.newPassword!==this.confirmpass){p("Passwords do not match.",{style:"error"});return}this.submitting=true;try{this.submitting=false;const e=await u(this.endpoint,{email:this.email,code:this.verificationCode,new_password:this.newPassword});console.log("reset result",e);p("Your password has been reset. You may now use your new password to login.",{style:"success"});this.verificationCode="";this.confirmpass="";this.newPassword="";this.password="";this.displayMode="login"}catch(e){this.submitting=false;console.log("Verification error",e);p("Verification error, please check the code and try again.")}}async handleReset(){this.submitting=true;try{const e=await u(this.endpoint,{email:this.email});console.log("[AUTH] Reset sent",e);this.submitting=false;this.displayMode="login";p("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"})}catch(e){console.log("[AUTH] Unable to reset password",e);this.submitting=false;p("Unable to reset password. Please check your email address and try again.",{style:"error"})}}render(){if(!this.visible){return i("div",{style:{display:"none"}},"Authenticated")}if(this.session){return i("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:()=>this.handleLogout(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})}if(this.displayMode==="signup"){const e=this.submitting||!this.first_name||!this.last_name||!this.email||!this.password||!this.confirmpass||!this.org_name;return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Sign up for a free account"),i("div",{class:"already-have"},"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.submitting})),i("form",{onSubmit:()=>this.handleSignup()},i("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},i("verdocs-text-input",{label:"First Name",autocomplete:"first",required:true,value:this.first_name,onInput:e=>this.first_name=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:true,value:this.last_name,onInput:e=>this.last_name=e.target.value,disabled:this.submitting})),i("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:true,value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"new-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Confirm Password",type:"password",required:true,autocomplete:"off",value:this.confirmpass,onInput:e=>this.confirmpass=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Phone Number",type:"tel",required:true,autocomplete:"phone",value:this.phone,onInput:e=>this.phone=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:true,value:this.org_name,onInput:e=>this.org_name=e.target.value,disabled:this.submitting,style:{flex:"1"}}),i("div",{class:"service-agreement"},"By clicking the Create Account button, you agree to the"," ",i("a",{href:"https://verdocs.com/eula",target:"_blank"},"End User License Agreement"),". Learn about how we use and protect your data and how you can opt-out in our"," ",i("a",{href:"https://verdocs.com/privacy-policy",target:"_blank"},"Privacy Policy"),"."),i("div",{style:{marginTop:"30px"}}),i("verdocs-button",{label:"Next",disabled:e,onClick:e?()=>{}:()=>this.handleSignup(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}if(this.displayMode==="verify"){return i("div",{class:"form"},i("form",{onSubmit:()=>this.handleVerification()},i("p",null,"Please check your e-mail inbox for a verification code and enter it below."),i("verdocs-text-input",{label:"Verification Code",required:true,value:this.verificationCode,onInput:e=>this.verificationCode=e.target.value,disabled:this.submitting}),i("div",{class:"buttons"},i("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:()=>this.handleLogout()}),i("verdocs-button",{label:"Verify",disabled:this.submitting||!this.verificationCode||this.verificationCode.length!==6,onClick:()=>this.handleVerification()})),i("div",{class:"buttons"},i("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:()=>this.handleResendVerification()}))))}if(this.displayMode==="forgot"){return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Forgot your password?"),i("p",null,"Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."),i("form",{onSubmit:()=>this.handleResetGetCode()},i("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:true,value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),i("div",{style:{marginTop:"30px"}}),i("div",{class:"buttons"},i("verdocs-button",{size:"small",label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),i("verdocs-button",{size:"small",label:"Request Code",disabled:this.submitting,onClick:()=>this.handleResetGetCode()}))))}if(this.displayMode==="reset"){return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Forgot your password?"),i("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."),i("form",{onSubmit:()=>this.handleResetPassword()},i("verdocs-text-input",{label:"Verification Code",required:true,value:this.verificationCode,onInput:e=>this.verificationCode=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"off",value:this.newPassword,onInput:e=>this.newPassword=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Confirm Password",type:"password",required:true,autocomplete:"off",value:this.confirmpass,onInput:e=>this.confirmpass=e.target.value,disabled:this.submitting}),i("div",{style:{marginTop:"30px"}}),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),i("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:()=>this.handleResetPassword()})),i("div",{class:"buttons"},i("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:()=>this.handleResendReset()}))))}return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Log in to your account"),i("div",{class:"already-have"},"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.submitting})),i("form",{onSubmit:()=>this.loginAndCheckVerification()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="forgot",disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.submitting,onClick:()=>this.loginAndCheckVerification(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))}static get style(){return y()}},[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],displayMode:[1025,"display-mode"],org_name:[32],first_name:[32],last_name:[32],email:[32],phone:[32],verificationCode:[32],newPassword:[32],password:[32],confirmpass:[32],submitting:[32],resendDisabled:[32],session:[32],profile:[32]}]);function x(){if(typeof customElements==="undefined"){return}const e=["verdocs-auth","verdocs-button","verdocs-help-icon","verdocs-text-input"];e.forEach((e=>{switch(e){case"verdocs-auth":if(!customElements.get(o(e))){customElements.define(o(e),g)}break;case"verdocs-button":if(!customElements.get(o(e))){m()}break;case"verdocs-help-icon":if(!customElements.get(o(e))){v()}break;case"verdocs-text-input":if(!customElements.get(o(e))){b()}break}}))}const w=g;const k=x;export{w as VerdocsAuth,k as defineCustomElement};
|
|
1
|
+
import{p as e,H as t,c as s,h as i,t as o}from"./p-yZBlG3YQ.js";import{VerdocsEndpoint as a,convertToE164 as r,createProfile as n,verifyEmail as l,authenticate as d,getMyUser as c,resendVerification as h,resetPassword as u}from"@verdocs/js-sdk";import{V as p}from"./p-D97GxsI-.js";import{S as f}from"./p-C1sRVZWv.js";import{d as m}from"./p-Bdf8pPWm.js";import{d as v}from"./p-CioaaWeS.js";import{d as b}from"./p-DYtSnUj9.js";const y=()=>`verdocs-auth{font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center}verdocs-auth .form{width:350px;display:-ms-flexbox;display:flex;padding:20px;max-width:90%;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-pack:center;justify-content:center;background:#ffffff}verdocs-auth .logo{width:128px;max-width:100%;margin:20px 0 30px}verdocs-auth h3{color:#092c4c;text-align:center;font-weight:400;font-size:18px;line-height:1.75;margin:0}verdocs-auth em{font-size:14px;margin:15px 0}verdocs-auth .buttons{gap:20px;margin:20px 0 0 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-auth p{color:#092c4c;margin:1em 0;font-size:14px}verdocs-auth p+p{margin-top:0}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}verdocs-auth .already-have{color:#092c4c;margin:0.5em 0;font-size:14px;text-align:center}verdocs-auth .service-agreement{font-size:12px;color:#777}verdocs-auth .service-agreement a{color:#092c4c}`;const g=e(class e extends t{constructor(e){super();if(e!==false){this.__registerHost()}this.authenticated=s(this,"authenticated");this.sdkError=s(this,"sdkError");this.endpoint=a.getDefault();this.visible=true;this.logo="https://app.verdocs.com/assets/blue-logo.svg";this.displayMode="login";this.org_name="";this.first_name="";this.last_name="";this.email="";this.phone="";this.verificationCode="";this.newPassword="";this.password="";this.confirmpass="";this.submitting=false;this.resendDisabled=false;this.session=null;this.profile=null;this.resendDisabledTimer=null;this.tempAuthEndpoint=new a({baseURL:a.getDefault().getBaseURL(),persist:false});this.handleHashChange=()=>{this.applyHashDisplayMode()}}componentWillLoad(){this.endpoint.loadSession();this.applyHashDisplayMode();if(typeof window!=="undefined"){window.addEventListener("hashchange",this.handleHashChange)}a.getDefault().onSessionChanged(((e,t,s)=>{var i,o;this.session=t;this.profile=s;if(t){(i=this.authenticated)===null||i===void 0?void 0:i.emit({authenticated:true,session:t,profile:s})}else{(o=this.authenticated)===null||o===void 0?void 0:o.emit({authenticated:false,session:t,profile:s})}}))}disconnectedCallback(){if(typeof window!=="undefined"){window.removeEventListener("hashchange",this.handleHashChange)}}applyHashDisplayMode(){if(typeof window==="undefined"){return}const e=(window.location.hash||"").replace(/^#/,"").toLowerCase();if(e==="forgot"){this.displayMode="forgot"}}isPasswordComplex(e){const t=e=>/[A-Z]/.test(e);const s=e=>/[a-z]/.test(e);const i=e=>/[`!@#$%^&*()_\-+=\[\]{};':"\\|,.<>\/?~ ]/.test(e);let o=0,a=0,r=0;for(let n=0;n<e.length;n++){let l=e.charAt(n);if(t(l))o++;else if(s(l))a++;else if(i(l))r++}return e.length>=8&&a>0&&o>0&&r>0}handleSignup(){if(!this.isPasswordComplex(this.password)){p("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"});return}if(this.password!==this.confirmpass){p("Passwords do not match.",{style:"error"});return}this.submitting=true;this.tempAuthEndpoint.clearSession();const e=r(this.phone);const t=Intl.DateTimeFormat().resolvedOptions();n(this.tempAuthEndpoint,{email:this.email,password:this.password,first_name:this.first_name,last_name:this.last_name,org_name:this.org_name,phone:e,timezone:t.timeZone,locale:t.locale}).then((e=>{console.log("[AUTH] Profile creation result",e);this.tempAuthEndpoint.setToken(e.access_token);this.password="";this.phone="";this.first_name="";this.last_name="";this.org_name="";this.displayMode="verify";this.submitting=false})).catch((e=>{var t,s,i,o,a,r;console.log("[AUTH] Signup error",e.response);this.submitting=false;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:false,profile:null,session:null});(s=this.sdkError)===null||s===void 0?void 0:s.emit(new f(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(o=e.response)===null||o===void 0?void 0:o.data));p("Signup failed: "+((r=(a=e.response)===null||a===void 0?void 0:a.data)===null||r===void 0?void 0:r.error)||"Unknown Error",{style:"error"})}))}async handleVerification(){this.submitting=true;try{this.submitting=false;const e=await l(this.tempAuthEndpoint,{email:this.email,token:this.verificationCode});p("Thank you for verifying your email address.",{style:"success"});this.completeLogin(e)}catch(e){this.submitting=false;console.log("Verification error",e);p("Verification error, please check the code and try again.")}}completeLogin(e){this.clearForms();this.tempAuthEndpoint.clearSession();this.endpoint.setToken(e.access_token)}async loginAndCheckVerification(){var e;if(this.submitting){return}this.submitting=true;this.tempAuthEndpoint.clearSession();try{this.submitting=false;const e=await d(this.tempAuthEndpoint,{username:this.email.trim(),password:this.password,grant_type:"password"});console.log("[AUTH] Authenticated, checking email verification");this.tempAuthEndpoint.setToken(e.access_token);const t=await c(this.tempAuthEndpoint);if(!t.email_verified){console.log("[AUTH] Logged in, pending email address verification");this.displayMode="verify"}else{console.log("[AUTH] Email address is verified, completing login");this.completeLogin(e)}}catch(t){this.submitting=false;console.log("[AUTH] Auth failure",((e=t.response)===null||e===void 0?void 0:e.data)||t);p("Login failed. Please check your credentials and try again.",{style:"error"})}}clearForms(){this.submitting=false;this.resendDisabled=false;this.email="";this.phone="";this.password="";this.newPassword="";this.confirmpass="";this.verificationCode="";this.first_name="";this.last_name="";this.org_name=""}handleLogout(){console.log("logging out");this.endpoint.clearSession();this.tempAuthEndpoint.clearSession();this.clearForms();this.displayMode="login"}handleResendVerification(){this.resendDisabled=true;this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=false;this.resendDisabledTimer=null}),3e4);h(this.tempAuthEndpoint).then((e=>{console.log("[AUTH] Verification request resent",e);p("Please check your email for a verification code.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend verification",e);p("Unable to resend code. Please try again later.",{style:"error"})}))}handleResendReset(){this.resendDisabled=true;this.resendDisabledTimer=setTimeout((()=>{this.resendDisabled=false;this.resendDisabledTimer=null}),3e4);u(this.tempAuthEndpoint,{email:this.email}).then((e=>{console.log("[AUTH] Resend-code request resent",e);p("Please check your email again for a verification code.",{style:"info"})})).catch((e=>{console.log("[AUTH] Unable to resend reset request",e);p("Unable to resend code. Please try again later.",{style:"error"})}))}async handleResetGetCode(){this.submitting=true;this.confirmpass="";this.newPassword="";try{this.submitting=false;const e=await u(this.endpoint,{email:this.email});console.log("[AUTH] Reset result",e);p("Please check your email inbox for a password reset code.",{style:"success"});this.verificationCode="";this.confirmpass="";this.newPassword="";this.displayMode="reset"}catch(e){this.submitting=false;console.log("Reset request error",e);p("Request failed. Please check your email address and try again.")}}async handleResetPassword(){if(!this.isPasswordComplex(this.newPassword)){p("Password must be at least 8 characters long and contain at least one uppercase, one lowercase, and one special character.",{style:"error"});return}if(this.newPassword!==this.confirmpass){p("Passwords do not match.",{style:"error"});return}this.submitting=true;try{this.submitting=false;const e=await u(this.endpoint,{email:this.email,code:this.verificationCode,new_password:this.newPassword});console.log("reset result",e);p("Your password has been reset. You may now use your new password to login.",{style:"success"});this.verificationCode="";this.confirmpass="";this.newPassword="";this.password="";this.displayMode="login"}catch(e){this.submitting=false;console.log("Verification error",e);p("Verification error, please check the code and try again.")}}async handleReset(){this.submitting=true;try{const e=await u(this.endpoint,{email:this.email});console.log("[AUTH] Reset sent",e);this.submitting=false;this.displayMode="login";p("If your email address is registered, you will receive instructions on resetting your password shortly.",{style:"info"})}catch(e){console.log("[AUTH] Unable to reset password",e);this.submitting=false;p("Unable to reset password. Please check your email address and try again.",{style:"error"})}}render(){if(!this.visible){return i("div",{style:{display:"none"}},"Authenticated")}if(this.session){return i("verdocs-button",{label:"Sign Out",disabled:this.submitting,onClick:()=>this.handleLogout(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})}if(this.displayMode==="signup"){const e=this.submitting||!this.first_name||!this.last_name||!this.email||!this.password||!this.confirmpass||!this.org_name;return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Sign up for a free account"),i("div",{class:"already-have"},"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.submitting})),i("form",{onSubmit:()=>this.handleSignup()},i("div",{style:{display:"flex",flexDirection:"row",columnGap:"20px"}},i("verdocs-text-input",{label:"First Name",autocomplete:"first",required:true,value:this.first_name,onInput:e=>this.first_name=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Last Name",autocomplete:"last",required:true,value:this.last_name,onInput:e=>this.last_name=e.target.value,disabled:this.submitting})),i("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:true,value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"new-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Confirm Password",type:"password",required:true,autocomplete:"off",value:this.confirmpass,onInput:e=>this.confirmpass=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Phone Number",type:"tel",required:true,autocomplete:"phone",value:this.phone,onInput:e=>this.phone=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Organization Name",autocomplete:"org",required:true,value:this.org_name,onInput:e=>this.org_name=e.target.value,disabled:this.submitting,style:{flex:"1"}}),i("div",{class:"service-agreement"},"By clicking the Create Account button, you agree to the"," ",i("a",{href:"https://verdocs.com/eula",target:"_blank"},"End User License Agreement"),". Learn about how we use and protect your data and how you can opt-out in our"," ",i("a",{href:"https://verdocs.com/privacy-policy",target:"_blank"},"Privacy Policy"),"."),i("div",{style:{marginTop:"30px"}}),i("verdocs-button",{label:"Next",disabled:e,onClick:e?()=>{}:()=>this.handleSignup(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}if(this.displayMode==="verify"){return i("div",{class:"form"},i("form",{onSubmit:()=>this.handleVerification()},i("p",null,"Please check your e-mail inbox for a verification code and enter it below."),i("verdocs-text-input",{label:"Verification Code",required:true,value:this.verificationCode,onInput:e=>this.verificationCode=e.target.value,disabled:this.submitting}),i("div",{class:"buttons"},i("verdocs-button",{label:"Sign Out",variant:"outline",disabled:this.submitting,onClick:()=>this.handleLogout()}),i("verdocs-button",{label:"Verify",disabled:this.submitting||!this.verificationCode||this.verificationCode.length!==6,onClick:()=>this.handleVerification()})),i("div",{class:"buttons"},i("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:()=>this.handleResendVerification()}))))}if(this.displayMode==="forgot"){return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Forgot your password?"),i("p",null,"Enter your e-mail address below. If the e-mail address is valid, a password reset code will be sent to your inbox. Please allow up to 15 minutes to arrive, and check your spam folder if you do not receive the message."),i("form",{onSubmit:()=>this.handleResetGetCode()},i("verdocs-text-input",{label:"Email Address",autocomplete:"email",required:true,value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),i("div",{style:{marginTop:"30px"}}),i("div",{class:"buttons"},i("verdocs-button",{size:"small",label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),i("verdocs-button",{size:"small",label:"Request Code",disabled:this.submitting,onClick:()=>this.handleResetGetCode()}))))}if(this.displayMode==="reset"){return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Forgot your password?"),i("p",null,"Enter your e-mail address below, and reset instructions will be sent to your Inbox. Please allow up to 15 minutes to arrive. Check your spam folder if you do not receive the message."),i("form",{onSubmit:()=>this.handleResetPassword()},i("verdocs-text-input",{label:"Verification Code",required:true,value:this.verificationCode,onInput:e=>this.verificationCode=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",required:true,autocomplete:"off",value:this.newPassword,onInput:e=>this.newPassword=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Confirm Password",type:"password",required:true,autocomplete:"off",value:this.confirmpass,onInput:e=>this.confirmpass=e.target.value,disabled:this.submitting}),i("div",{style:{marginTop:"30px"}}),i("div",{class:"buttons"},i("verdocs-button",{label:"Cancel",variant:"outline",disabled:this.submitting,onClick:()=>this.displayMode="login"}),i("verdocs-button",{label:"Reset",disabled:this.submitting,onClick:()=>this.handleResetPassword()})),i("div",{class:"buttons"},i("verdocs-button",{variant:"text",label:"Resend Code",disabled:this.resendDisabled||this.submitting,onClick:()=>this.handleResendReset()}))))}return i("div",{class:"form"},i("a",{href:"https://verdocs.com/en/"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"})),i("h3",null,"Log in to your account"),i("div",{class:"already-have"},"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.submitting})),i("form",{onSubmit:()=>this.loginAndCheckVerification()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.email,onInput:e=>this.email=e.target.value,disabled:this.submitting}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:e=>this.password=e.target.value,disabled:this.submitting}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="forgot",disabled:this.submitting,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.submitting,onClick:()=>this.loginAndCheckVerification(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})))}static get style(){return y()}},[0,"verdocs-auth",{endpoint:[16],visible:[4],logo:[1],displayMode:[1025,"display-mode"],org_name:[32],first_name:[32],last_name:[32],email:[32],phone:[32],verificationCode:[32],newPassword:[32],password:[32],confirmpass:[32],submitting:[32],resendDisabled:[32],session:[32],profile:[32]}]);function x(){if(typeof customElements==="undefined"){return}const e=["verdocs-auth","verdocs-button","verdocs-help-icon","verdocs-text-input"];e.forEach((e=>{switch(e){case"verdocs-auth":if(!customElements.get(o(e))){customElements.define(o(e),g)}break;case"verdocs-button":if(!customElements.get(o(e))){m()}break;case"verdocs-help-icon":if(!customElements.get(o(e))){v()}break;case"verdocs-text-input":if(!customElements.get(o(e))){b()}break}}))}const w=g;const k=x;export{w as VerdocsAuth,k as defineCustomElement};
|
|
2
2
|
//# sourceMappingURL=verdocs-auth.js.map
|