@verdocs/web-sdk 4.2.86 → 4.2.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +2 -2
  2. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +8 -0
  3. package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -2
  5. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +4 -4
  6. package/dist/collection/components/envelopes/verdocs-envelope-document-page/verdocs-envelope-document-page.js +2 -2
  7. package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +8 -0
  8. package/dist/collection/components/templates/verdocs-template-document-page/verdocs-template-document-page.js +2 -2
  9. package/dist/components/verdocs-envelope-document-page2.js +2 -2
  10. package/dist/components/verdocs-envelope-sidebar.js +8 -0
  11. package/dist/components/verdocs-sign.js +2 -2
  12. package/dist/components/verdocs-template-document-page2.js +2 -2
  13. package/dist/esm/verdocs-envelope-document-page.entry.js +2 -2
  14. package/dist/esm/verdocs-envelope-sidebar.entry.js +8 -0
  15. package/dist/esm/verdocs-sign.entry.js +2 -2
  16. package/dist/esm/verdocs-template-document-page_2.entry.js +2 -2
  17. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  18. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  19. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  20. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  21. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +2 -2
  22. package/dist/verdocs-web-sdk/p-1cc7b032.entry.js +1 -0
  23. package/dist/verdocs-web-sdk/p-34325ad6.system.js +1 -1
  24. package/dist/verdocs-web-sdk/p-7f3d895b.entry.js +1 -0
  25. package/dist/verdocs-web-sdk/p-80820f5a.entry.js +1 -0
  26. package/dist/verdocs-web-sdk/{p-1e904edd.system.entry.js → p-916a38e8.system.entry.js} +1 -1
  27. package/dist/verdocs-web-sdk/{p-a8a5b757.system.entry.js → p-95aa88de.system.entry.js} +1 -1
  28. package/dist/verdocs-web-sdk/p-a801699f.system.entry.js +1 -0
  29. package/dist/verdocs-web-sdk/p-b2cf2cce.system.entry.js +1 -0
  30. package/dist/verdocs-web-sdk/p-ef79cbed.entry.js +1 -0
  31. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  32. package/package.json +2 -2
  33. package/dist/verdocs-web-sdk/p-00244d09.system.entry.js +0 -1
  34. package/dist/verdocs-web-sdk/p-033c864b.system.entry.js +0 -1
  35. package/dist/verdocs-web-sdk/p-78bdc332.entry.js +0 -1
  36. package/dist/verdocs-web-sdk/p-8b2c938c.entry.js +0 -1
  37. package/dist/verdocs-web-sdk/p-a2a62c38.entry.js +0 -1
  38. package/dist/verdocs-web-sdk/p-a2c07e00.entry.js +0 -1
@@ -34,7 +34,7 @@ const VerdocsEnvelopeDocumentPage = class {
34
34
  this.pageDisplayUri = 'https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png';
35
35
  }
36
36
  async componentWillLoad() {
37
- this.pageDisplayUri = await jsSdk.getEnvelopeDocumentPageDisplayUri(this.endpoint, this.envelopeId, this.documentId, this.pageNumber, this.type);
37
+ this.pageDisplayUri = await jsSdk.getEnvelopeDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber, this.type);
38
38
  }
39
39
  componentDidLoad() {
40
40
  this.resizeObserver = new ResizeObserver(utils.throttle(entries => {
@@ -82,7 +82,7 @@ const VerdocsEnvelopeDocumentPage = class {
82
82
  }
83
83
  render() {
84
84
  const height = `${this.renderedHeight}px`;
85
- return (index.h(index.Host, { key: '665b5a6ff95da03cf616a320e073bc9cfa05b8b9', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (index.h("div", { class: "verdocs-envelope-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (index.h("img", { class: "verdocs-envelope-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
85
+ return (index.h(index.Host, { key: 'd7a83e836d91c879ca382799735596352a84afbe', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (index.h("div", { class: "verdocs-envelope-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (index.h("img", { class: "verdocs-envelope-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
86
86
  // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that
87
87
  // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).
88
88
  // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values
@@ -216,6 +216,14 @@ const VerdocsEnvelopeSidebar = class {
216
216
  entries.push({ icon: 'mail', message: `${fullName} has been invited via email.`, date: new Date(history.created_at) });
217
217
  }
218
218
  break;
219
+ case 'recipient:reminder':
220
+ if (history.event_detail === 'sms') {
221
+ entries.push({ icon: 'textsms', message: `${fullName} sent a reminder via SMS.`, date: new Date(history.created_at) });
222
+ }
223
+ else {
224
+ entries.push({ icon: 'mail', message: `${fullName} sent a reminder via email.`, date: new Date(history.created_at) });
225
+ }
226
+ break;
219
227
  case 'invitation:resent':
220
228
  entries.push({
221
229
  icon: 'mail',
@@ -88,7 +88,7 @@ const VerdocsSign = class {
88
88
  if (this.agreed) {
89
89
  this.nextButtonLabel = 'Next';
90
90
  }
91
- this.envelope = await jsSdk.getEnvelope(this.endpoint, this.envelopeId);
91
+ this.envelope = envelope;
92
92
  TemplateFieldStore.createTemplateFieldStoreFromEnvelope(this.envelope);
93
93
  this.sortedRecipients = [...this.envelope.recipients];
94
94
  this.sortedRecipients.sort((a, b) => {
@@ -42,7 +42,7 @@ const VerdocsTemplateDocumentPage = class {
42
42
  this.yScale = 1;
43
43
  }
44
44
  async componentWillLoad() {
45
- this.pageDisplayUri = await jsSdk.getTemplateDocumentPageDisplayUri(this.endpoint, this.templateId, this.documentId, this.pageNumber);
45
+ this.pageDisplayUri = await jsSdk.getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);
46
46
  this.fieldStore = TemplateFieldStore.getTemplateFieldStore(this.templateId);
47
47
  }
48
48
  componentDidLoad() {
@@ -102,7 +102,7 @@ const VerdocsTemplateDocumentPage = class {
102
102
  }
103
103
  render() {
104
104
  const height = `${this.renderedHeight}px`;
105
- return (index.h(index.Host, { key: '2dc68d82c5a20e8c2380f4a86f16ccb98c4d0efb', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (index.h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
105
+ return (index.h(index.Host, { key: 'e792fce0cb958bdd5783ae873b83c2a7918f1e5f', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (index.h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
106
106
  this.fieldStore
107
107
  .get('fields')
108
108
  .filter(field => field && field.page === this.pageNumber)
@@ -1,8 +1,8 @@
1
1
  import { Host, Fragment, h } from "@stencil/core";
2
- import { createInitials, createSignature, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit, formatFullName } from "@verdocs/js-sdk";
3
- import { updateEnvelopeFieldSignature, uploadEnvelopeFieldAttachment, VerdocsEndpoint, updateEnvelopeField } from "@verdocs/js-sdk";
2
+ import { fullNameToInitials, startSigningSession } from "@verdocs/js-sdk";
4
3
  import { integerSequence, isValidEmail, isValidPhone, updateEnvelopeFieldInitials } from "@verdocs/js-sdk";
5
- import { fullNameToInitials, getEnvelope, startSigningSession } from "@verdocs/js-sdk";
4
+ import { updateEnvelopeFieldSignature, uploadEnvelopeFieldAttachment, VerdocsEndpoint, updateEnvelopeField } from "@verdocs/js-sdk";
5
+ import { createInitials, createSignature, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit, formatFullName } from "@verdocs/js-sdk";
6
6
  import { getFieldId, renderDocumentField, saveAttachment, updateDocumentFieldValue } from "../../../utils/utils";
7
7
  import { createTemplateFieldStoreFromEnvelope } from "../../../utils/TemplateFieldStore";
8
8
  import { VerdocsToast } from "../../../utils/Toast";
@@ -92,7 +92,7 @@ export class VerdocsSign {
92
92
  if (this.agreed) {
93
93
  this.nextButtonLabel = 'Next';
94
94
  }
95
- this.envelope = await getEnvelope(this.endpoint, this.envelopeId);
95
+ this.envelope = envelope;
96
96
  createTemplateFieldStoreFromEnvelope(this.envelope);
97
97
  this.sortedRecipients = [...this.envelope.recipients];
98
98
  this.sortedRecipients.sort((a, b) => {
@@ -27,7 +27,7 @@ export class VerdocsEnvelopeDocumentPage {
27
27
  this.pageDisplayUri = 'https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png';
28
28
  }
29
29
  async componentWillLoad() {
30
- this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.envelopeId, this.documentId, this.pageNumber, this.type);
30
+ this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber, this.type);
31
31
  }
32
32
  componentDidLoad() {
33
33
  this.resizeObserver = new ResizeObserver(throttle(entries => {
@@ -75,7 +75,7 @@ export class VerdocsEnvelopeDocumentPage {
75
75
  }
76
76
  render() {
77
77
  const height = `${this.renderedHeight}px`;
78
- return (h(Host, { key: '665b5a6ff95da03cf616a320e073bc9cfa05b8b9', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-envelope-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (h("img", { class: "verdocs-envelope-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
78
+ return (h(Host, { key: 'd7a83e836d91c879ca382799735596352a84afbe', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-envelope-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (h("img", { class: "verdocs-envelope-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
79
79
  // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that
80
80
  // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).
81
81
  // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values
@@ -205,6 +205,14 @@ export class VerdocsEnvelopeSidebar {
205
205
  entries.push({ icon: 'mail', message: `${fullName} has been invited via email.`, date: new Date(history.created_at) });
206
206
  }
207
207
  break;
208
+ case 'recipient:reminder':
209
+ if (history.event_detail === 'sms') {
210
+ entries.push({ icon: 'textsms', message: `${fullName} sent a reminder via SMS.`, date: new Date(history.created_at) });
211
+ }
212
+ else {
213
+ entries.push({ icon: 'mail', message: `${fullName} sent a reminder via email.`, date: new Date(history.created_at) });
214
+ }
215
+ break;
208
216
  case 'invitation:resent':
209
217
  entries.push({
210
218
  icon: 'mail',
@@ -34,7 +34,7 @@ export class VerdocsTemplateDocumentPage {
34
34
  this.yScale = 1;
35
35
  }
36
36
  async componentWillLoad() {
37
- this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.templateId, this.documentId, this.pageNumber);
37
+ this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);
38
38
  this.fieldStore = getTemplateFieldStore(this.templateId);
39
39
  }
40
40
  componentDidLoad() {
@@ -94,7 +94,7 @@ export class VerdocsTemplateDocumentPage {
94
94
  }
95
95
  render() {
96
96
  const height = `${this.renderedHeight}px`;
97
- return (h(Host, { key: '2dc68d82c5a20e8c2380f4a86f16ccb98c4d0efb', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
97
+ return (h(Host, { key: 'e792fce0cb958bdd5783ae873b83c2a7918f1e5f', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
98
98
  this.fieldStore
99
99
  .get('fields')
100
100
  .filter(field => field && field.page === this.pageNumber)
@@ -28,7 +28,7 @@ const VerdocsEnvelopeDocumentPage = /*@__PURE__*/ proxyCustomElement(class Verdo
28
28
  this.pageDisplayUri = 'https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png';
29
29
  }
30
30
  async componentWillLoad() {
31
- this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.envelopeId, this.documentId, this.pageNumber, this.type);
31
+ this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber, this.type);
32
32
  }
33
33
  componentDidLoad() {
34
34
  this.resizeObserver = new ResizeObserver(throttle(entries => {
@@ -76,7 +76,7 @@ const VerdocsEnvelopeDocumentPage = /*@__PURE__*/ proxyCustomElement(class Verdo
76
76
  }
77
77
  render() {
78
78
  const height = `${this.renderedHeight}px`;
79
- return (h(Host, { key: '665b5a6ff95da03cf616a320e073bc9cfa05b8b9', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-envelope-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (h("img", { class: "verdocs-envelope-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
79
+ return (h(Host, { key: 'd7a83e836d91c879ca382799735596352a84afbe', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-envelope-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (h("img", { class: "verdocs-envelope-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
80
80
  // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that
81
81
  // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).
82
82
  // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values
@@ -216,6 +216,14 @@ const VerdocsEnvelopeSidebar$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsE
216
216
  entries.push({ icon: 'mail', message: `${fullName} has been invited via email.`, date: new Date(history.created_at) });
217
217
  }
218
218
  break;
219
+ case 'recipient:reminder':
220
+ if (history.event_detail === 'sms') {
221
+ entries.push({ icon: 'textsms', message: `${fullName} sent a reminder via SMS.`, date: new Date(history.created_at) });
222
+ }
223
+ else {
224
+ entries.push({ icon: 'mail', message: `${fullName} sent a reminder via email.`, date: new Date(history.created_at) });
225
+ }
226
+ break;
219
227
  case 'invitation:resent':
220
228
  entries.push({
221
229
  icon: 'mail',
@@ -1,5 +1,5 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
2
- import { VerdocsEndpoint, startSigningSession, getEnvelope, envelopeRecipientAgree, envelopeRecipientDecline, updateEnvelopeField, createSignature, updateEnvelopeFieldSignature, createInitials, updateEnvelopeFieldInitials, isValidPhone, isValidEmail, envelopeRecipientSubmit, uploadEnvelopeFieldAttachment, formatFullName, fullNameToInitials, integerSequence } from '@verdocs/js-sdk';
2
+ import { VerdocsEndpoint, startSigningSession, envelopeRecipientAgree, envelopeRecipientDecline, updateEnvelopeField, createSignature, updateEnvelopeFieldSignature, createInitials, updateEnvelopeFieldInitials, isValidPhone, isValidEmail, envelopeRecipientSubmit, uploadEnvelopeFieldAttachment, formatFullName, fullNameToInitials, integerSequence } from '@verdocs/js-sdk';
3
3
  import { a as saveAttachment, u as updateDocumentFieldValue, r as renderDocumentField, g as getFieldId } from './utils.js';
4
4
  import { c as createTemplateFieldStoreFromEnvelope } from './TemplateFieldStore.js';
5
5
  import { V as VerdocsToast } from './Toast.js';
@@ -88,7 +88,7 @@ const VerdocsSign$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsSign extends
88
88
  if (this.agreed) {
89
89
  this.nextButtonLabel = 'Next';
90
90
  }
91
- this.envelope = await getEnvelope(this.endpoint, this.envelopeId);
91
+ this.envelope = envelope;
92
92
  createTemplateFieldStoreFromEnvelope(this.envelope);
93
93
  this.sortedRecipients = [...this.envelope.recipients];
94
94
  this.sortedRecipients.sort((a, b) => {
@@ -55,7 +55,7 @@ const VerdocsTemplateDocumentPage = /*@__PURE__*/ proxyCustomElement(class Verdo
55
55
  this.yScale = 1;
56
56
  }
57
57
  async componentWillLoad() {
58
- this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.templateId, this.documentId, this.pageNumber);
58
+ this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);
59
59
  this.fieldStore = getTemplateFieldStore(this.templateId);
60
60
  }
61
61
  componentDidLoad() {
@@ -115,7 +115,7 @@ const VerdocsTemplateDocumentPage = /*@__PURE__*/ proxyCustomElement(class Verdo
115
115
  }
116
116
  render() {
117
117
  const height = `${this.renderedHeight}px`;
118
- return (h(Host, { key: '2dc68d82c5a20e8c2380f4a86f16ccb98c4d0efb', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
118
+ return (h(Host, { key: 'e792fce0cb958bdd5783ae873b83c2a7918f1e5f', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
119
119
  this.fieldStore
120
120
  .get('fields')
121
121
  .filter(field => field && field.page === this.pageNumber)
@@ -30,7 +30,7 @@ const VerdocsEnvelopeDocumentPage = class {
30
30
  this.pageDisplayUri = 'https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png';
31
31
  }
32
32
  async componentWillLoad() {
33
- this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.envelopeId, this.documentId, this.pageNumber, this.type);
33
+ this.pageDisplayUri = await getEnvelopeDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber, this.type);
34
34
  }
35
35
  componentDidLoad() {
36
36
  this.resizeObserver = new ResizeObserver(throttle(entries => {
@@ -78,7 +78,7 @@ const VerdocsEnvelopeDocumentPage = class {
78
78
  }
79
79
  render() {
80
80
  const height = `${this.renderedHeight}px`;
81
- return (h(Host, { key: '665b5a6ff95da03cf616a320e073bc9cfa05b8b9', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-envelope-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (h("img", { class: "verdocs-envelope-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
81
+ return (h(Host, { key: 'd7a83e836d91c879ca382799735596352a84afbe', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-envelope-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } })) : this.pageDisplayUri ? (h("img", { class: "verdocs-envelope-document-page-layer img", id: `${this.containerId}-${layer.name}`, src: this.pageDisplayUri, alt: `Page ${this.pageNumber}`, "aria-hidden": true, loading: "lazy", onLoad: (e) => {
82
82
  // Note that all we really care about is the aspect ratio. We track the natural Width and Height but they aren't really that
83
83
  // useful as individual values. The image will already have been scaled down to fit a DIV for display (100%, auto height).
84
84
  // Builder places fields offset into the rendered display area, not the original document's dimensions. So its X/Y values
@@ -212,6 +212,14 @@ const VerdocsEnvelopeSidebar = class {
212
212
  entries.push({ icon: 'mail', message: `${fullName} has been invited via email.`, date: new Date(history.created_at) });
213
213
  }
214
214
  break;
215
+ case 'recipient:reminder':
216
+ if (history.event_detail === 'sms') {
217
+ entries.push({ icon: 'textsms', message: `${fullName} sent a reminder via SMS.`, date: new Date(history.created_at) });
218
+ }
219
+ else {
220
+ entries.push({ icon: 'mail', message: `${fullName} sent a reminder via email.`, date: new Date(history.created_at) });
221
+ }
222
+ break;
215
223
  case 'invitation:resent':
216
224
  entries.push({
217
225
  icon: 'mail',
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment } from './index-d3ac9650.js';
2
- import { VerdocsEndpoint, startSigningSession, getEnvelope, envelopeRecipientAgree, envelopeRecipientDecline, updateEnvelopeField, createSignature, updateEnvelopeFieldSignature, createInitials, updateEnvelopeFieldInitials, isValidPhone, isValidEmail, envelopeRecipientSubmit, uploadEnvelopeFieldAttachment, formatFullName, fullNameToInitials, integerSequence } from '@verdocs/js-sdk';
2
+ import { VerdocsEndpoint, startSigningSession, envelopeRecipientAgree, envelopeRecipientDecline, updateEnvelopeField, createSignature, updateEnvelopeFieldSignature, createInitials, updateEnvelopeFieldInitials, isValidPhone, isValidEmail, envelopeRecipientSubmit, uploadEnvelopeFieldAttachment, formatFullName, fullNameToInitials, integerSequence } from '@verdocs/js-sdk';
3
3
  import { a as saveAttachment, u as updateDocumentFieldValue, r as renderDocumentField, g as getFieldId } from './utils-467fcc6a.js';
4
4
  import { a as createTemplateFieldStoreFromEnvelope } from './TemplateFieldStore-6113ab4b.js';
5
5
  import { V as VerdocsToast } from './Toast-c4843828.js';
@@ -84,7 +84,7 @@ const VerdocsSign = class {
84
84
  if (this.agreed) {
85
85
  this.nextButtonLabel = 'Next';
86
86
  }
87
- this.envelope = await getEnvelope(this.endpoint, this.envelopeId);
87
+ this.envelope = envelope;
88
88
  createTemplateFieldStoreFromEnvelope(this.envelope);
89
89
  this.sortedRecipients = [...this.envelope.recipients];
90
90
  this.sortedRecipients.sort((a, b) => {
@@ -38,7 +38,7 @@ const VerdocsTemplateDocumentPage = class {
38
38
  this.yScale = 1;
39
39
  }
40
40
  async componentWillLoad() {
41
- this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.templateId, this.documentId, this.pageNumber);
41
+ this.pageDisplayUri = await getTemplateDocumentPageDisplayUri(this.endpoint, this.documentId, this.pageNumber);
42
42
  this.fieldStore = getTemplateFieldStore(this.templateId);
43
43
  }
44
44
  componentDidLoad() {
@@ -98,7 +98,7 @@ const VerdocsTemplateDocumentPage = class {
98
98
  }
99
99
  render() {
100
100
  const height = `${this.renderedHeight}px`;
101
- return (h(Host, { key: '2dc68d82c5a20e8c2380f4a86f16ccb98c4d0efb', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
101
+ return (h(Host, { key: 'e792fce0cb958bdd5783ae873b83c2a7918f1e5f', id: `${this.containerId}`, style: { height, flex: `0 0 ${height}` } }, this.layers.map(layer => layer.type === 'div' ? (h("div", { class: "verdocs-template-document-page-layer", id: `${this.containerId}-${layer.name}`, style: { height } }, layer.name === 'controls' &&
102
102
  this.fieldStore
103
103
  .get('fields')
104
104
  .filter(field => field && field.page === this.pageNumber)
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,a)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-d3ac9650.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri}from"@verdocs/js-sdk";import{t as throttle}from"./utils-467fcc6a.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-e4a6eba5.js";import"./index-0329eed3.js";var verdocsEnvelopeDocumentPageCss="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}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%}";var VerdocsEnvelopeDocumentPageStyle0=verdocsEnvelopeDocumentPageCss;var VerdocsEnvelopeDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered",7);this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,getEnvelopeDocumentPageDisplayUri(this.endpoint,this.envelopeId,this.documentId,this.pageNumber,this.type)];case 1:e.pageDisplayUri=t.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(t){for(var i=0,n=t;i<n.length;i++){var r=n[i];var o=r.contentRect.width;e.renderedWidth=o;e.renderedHeight=e.virtualHeight*(o/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();console.log("[PAGE] Disconnected",this.containerId)};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};e.prototype.render=function(){var e=this;var t="".concat(this.renderedHeight,"px");return h(Host,{key:"665b5a6ff95da03cf616a320e073bc9cfa05b8b9",id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){return i.type==="div"?h("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}}):e.pageDisplayUri?h("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsEnvelopeDocumentPage.style=VerdocsEnvelopeDocumentPageStyle0;export{VerdocsEnvelopeDocumentPage as verdocs_envelope_document_page};
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function a(e){try{c(n["throw"](e))}catch(e){o(e)}}function c(e){e.done?i(e.value):r(e.value).then(s,a)}c((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,r,o,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return c([e,t])}}function c(a){if(n)throw new TypeError("Generator is already executing.");while(s&&(s=0,a[0]&&(i=0)),i)try{if(n=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;r=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(o=i.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){i.label=a[1];break}if(a[0]===6&&i.label<o[1]){i.label=o[1];o=a;break}if(o&&i.label<o[2]){i.label=o[2];i.ops.push(a);break}if(o[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];r=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-d3ac9650.js";import{VerdocsEndpoint,getEnvelopeDocumentPageDisplayUri}from"@verdocs/js-sdk";import{t as throttle}from"./utils-467fcc6a.js";import"./_commonjsHelpers-bdec4bbd.js";import"./Types-e4a6eba5.js";import"./index-0329eed3.js";var verdocsEnvelopeDocumentPageCss="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}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%}";var VerdocsEnvelopeDocumentPageStyle0=verdocsEnvelopeDocumentPageCss;var VerdocsEnvelopeDocumentPage=function(){function e(e){registerInstance(this,e);this.pageRendered=createEvent(this,"pageRendered",7);this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.documentId="";this.pageNumber=1;this.virtualWidth=612;this.virtualHeight=792;this.layers=[{name:"page",type:"canvas"}];this.type="original";this.containerId="verdocs-envelope-document-page-".concat(Math.random().toString(36).substring(2,11));this.renderedWidth=this.virtualWidth;this.renderedHeight=this.virtualHeight;this.naturalWidth=this.virtualWidth;this.naturalHeight=this.virtualHeight;this.aspectRatio=this.virtualWidth/this.virtualHeight;this.skipFirstNotification=true;this.pageDisplayUri="https://verdocs-public-assets.s3.amazonaws.com/page-loading-placeholder.png"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:e=this;return[4,getEnvelopeDocumentPageDisplayUri(this.endpoint,this.documentId,this.pageNumber,this.type)];case 1:e.pageDisplayUri=t.sent();return[2]}}))}))};e.prototype.componentDidLoad=function(){var e=this;this.resizeObserver=new ResizeObserver(throttle((function(t){for(var i=0,n=t;i<n.length;i++){var r=n[i];var o=r.contentRect.width;e.renderedWidth=o;e.renderedHeight=e.virtualHeight*(o/e.virtualWidth)}e.notifyRenderedSize()}),100));this.resizeObserver.observe(this.container)};e.prototype.disconnectedCallback=function(){var e;(e=this.resizeObserver)===null||e===void 0?void 0:e.disconnect();console.log("[PAGE] Disconnected",this.containerId)};e.prototype.notifyRenderedSize=function(){if(this.skipFirstNotification){this.skipFirstNotification=false;return}this.pageRendered.emit({containerId:this.containerId,documentId:this.documentId,pageNumber:this.pageNumber,virtualWidth:this.virtualWidth,virtualHeight:this.virtualHeight,renderedWidth:this.renderedWidth,renderedHeight:this.renderedHeight,naturalWidth:this.naturalWidth,naturalHeight:this.naturalHeight,aspectRatio:this.aspectRatio,xScale:this.renderedWidth/this.virtualWidth,yScale:this.renderedHeight/this.virtualHeight})};e.prototype.render=function(){var e=this;var t="".concat(this.renderedHeight,"px");return h(Host,{key:"d7a83e836d91c879ca382799735596352a84afbe",id:"".concat(this.containerId),style:{height:t,flex:"0 0 ".concat(t)}},this.layers.map((function(i){return i.type==="div"?h("div",{class:"verdocs-envelope-document-page-layer",id:"".concat(e.containerId,"-").concat(i.name),style:{height:t}}):e.pageDisplayUri?h("img",{class:"verdocs-envelope-document-page-layer img",id:"".concat(e.containerId,"-").concat(i.name),src:e.pageDisplayUri,alt:"Page ".concat(e.pageNumber),"aria-hidden":true,loading:"lazy",onLoad:function(t){e.naturalWidth=t.target.naturalWidth;e.naturalHeight=t.target.naturalHeight;e.aspectRatio=e.naturalWidth/e.naturalHeight;e.virtualHeight=e.virtualWidth/e.aspectRatio;e.renderedHeight=t.target.offsetWidth/e.aspectRatio}}):h("div",null)})))};Object.defineProperty(e.prototype,"container",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsEnvelopeDocumentPage.style=VerdocsEnvelopeDocumentPageStyle0;export{VerdocsEnvelopeDocumentPage as verdocs_envelope_document_page};
@@ -1 +1 @@
1
- var __awaiter=this&&this.__awaiter||function(e,i,t,n){function s(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?t(e.value):s(e.value).then(r,a)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){t.label=a[1];break}if(a[0]===6&&t.label<o[1]){t.label=o[1];o=a;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(a);break}if(o[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-d3ac9650.js";import{VerdocsEndpoint,resendInvitation,cancelEnvelope,formatFullName,userIsEnvelopeOwner,capitalize}from"@verdocs/js-sdk";import{g as getEnvelopeStore}from"./EnvelopeStore-822889cb.js";import{F as FORMAT_TIMESTAMP}from"./Types-e4a6eba5.js";import{V as VerdocsToast}from"./Toast-c4843828.js";import{S as SDKError}from"./errors-887f1e88.js";import{d as dateFns}from"./index-0329eed3.js";import"./index-04235019.js";import"./index-7588a071.js";var verdocsEnvelopeSidebarCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';var VerdocsEnvelopeSidebarStyle0=verdocsEnvelopeSidebarCss;var InformationCircle='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var Users='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var ClipboardDocuments='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var ActivityIcons={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.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>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var VerdocsEnvelopeSidebar=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.toggle=createEvent(this,"toggle",7);this.another=createEvent(this,"another",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false;this.showManageDialog=false;this.showRecipientDialog="";this.showCancelDialog=false;this.loading=true}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,s;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[SIDEBAR] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return[2]}n=this;return[4,getEnvelopeStore(this.endpoint,this.envelopeId,true)];case 1:n.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:s=o.sent();console.log("[SIDEBAR] Error loading envelope",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(s.message,(i=s.response)===null||i===void 0?void 0:i.status,(t=s.response)===null||t===void 0?void 0:t.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,i;(i=(e=this.store)===null||e===void 0?void 0:e.state)===null||i===void 0?void 0:i.recipients.sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.setTab=function(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen;(i=this.toggle)===null||i===void 0?void 0:i.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){var i,t;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.status)};e.prototype.handleRecipientAction=function(e,i){var t,n;console.log("[SIDEBAR] Recipient action",i,e);switch(i){case"reminder":resendInvitation(this.endpoint,this.envelopeId,e.role_name).then((function(){VerdocsToast("Reminder Sent",{style:"success"})})).catch((function(e){console.log("[SIDEBAR] Error resending invitation",e);VerdocsToast("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":VerdocsToast("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":VerdocsToast("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:(n=this.store)===null||n===void 0?void 0:n.state,event:i})};e.prototype.cancelEnvelope=function(){var e=this;this.loading=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(i){return __awaiter(e,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(s){switch(s.label){case 0:console.log("[SIDEBAR] Envelope canceled",i);VerdocsToast("Envelope canceled",{style:"success"});n=this;return[4,getEnvelopeStore(this.endpoint,this.envelopeId,true)];case 1:n.store=s.sent();this.sortEnvelopeRecipients();this.loading=false;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:(t=this.store)===null||t===void 0?void 0:t.state,event:"canceled"});return[2]}}))}))})).catch((function(i){console.log("[SIDEBAR] Error canceling envelope",i);e.loading=false;VerdocsToast("Error canceling envelope: "+i.message,{style:"error"})}))};e.prototype.prepareHistoryEntries=function(){var e=this;var i,t,n,s,o,r,a,l,d,c,v,h;var p=[];var u=((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.history_entries)||[];p.push({icon:"pencil",message:"Envelope created.",date:new Date((s=(n=this.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.created_at)});if(((r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.status)==="complete"){p.push({icon:"pencil",message:"Envelope completed.",date:new Date((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.updated_at)})}var f=u.some((function(e){return e.event==="owner:canceled"}));if(((c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.status)==="canceled"&&!f){p.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((h=(v=this.store)===null||v===void 0?void 0:v.state)===null||h===void 0?void 0:h.canceled_at)})}u.forEach((function(i){var t;var n=(t=e.store.state)===null||t===void 0?void 0:t.recipients.find((function(e){return e.role_name===i.role_name}));var s=formatFullName(n);switch(i.event.toLowerCase()){case"recipient:signed":p.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:declined":p.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":p.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(i.created_at)});break;case"sms":p.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(i.created_at)});break;case"in_person_link":p.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(i.created_at)});break;case"in_app":p.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(i.created_at)});break;default:p.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":p.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(i.created_at)});break;default:p.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(i.created_at)});break}break;case"recipient:prepared":p.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:claimed":if(i.event_detail==="guest"){p.push({icon:"account_circle",message:"".concat(s," claimed the Verdoc as a guest."),date:new Date(i.created_at)})}else if(i.event_detail==="profile"){p.push({icon:"verified_user",message:"".concat(s," claimed the Verdoc as a verified user."),date:new Date(i.created_at)})}break;case"recipient:agreed":p.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(i.created_at)});break;case"recipient:invited":if(i.event_detail==="sms"){p.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(i.created_at)})}else{p.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(i.created_at)})}break;case"invitation:resent":p.push({icon:"mail",message:"Invitation was resent to ".concat(s," ").concat(i.event_detail==="reminder"?" by reminder":"","."),date:new Date(i.created_at)});break;case"envelope:cc":p.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:delegated":p.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":p.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"owner:updated_recipient_info":p.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":p.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":p.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"canceled":case"owner:canceled":p.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":p.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i);break}}));p.sort((function(e,i){return i.date.getTime()-e.date.getTime()}));return p};e.prototype.render=function(){var e=this;var i,t,n,s,o,r,a,l,d,c,v,p,u,f,w,g,m,b,x,y,k;if(!this.store.state){return h(Host,null)}var z=userIsEnvelopeOwner(this.endpoint.profile,this.store.state);var M=this.prepareHistoryEntries();var E=((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.status)!=="pending"&&((s=(n=this.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.status)!=="in progress";return h(Host,{class:this.panelOpen?"open":""},h("div",{class:"side-buttons"},h("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:InformationCircle}),h("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:Users}),h("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:ClipboardDocuments})),this.activeTab===1&&h("div",{class:"content"},h("div",{class:"title"},"Details"),h("div",{class:"label"},"Envelope ID"),h("div",{class:"value"},(r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.id),h("div",{class:"label"},"Date Created"),h("div",{class:"value"},dateFns.format(new Date((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.created_at),FORMAT_TIMESTAMP)),h("div",{class:"label"},"Last Modified"),h("div",{class:"value"},dateFns.format(new Date((c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.updated_at),FORMAT_TIMESTAMP)),h("div",{class:"label"},"Status"),h("div",{class:"value"},capitalize((p=(v=this.store)===null||v===void 0?void 0:v.state)===null||p===void 0?void 0:p.status)),h("div",{class:"label"},"Verdoc Owner ID"),h("div",{class:"value"},(f=(u=this.store)===null||u===void 0?void 0:u.state)===null||f===void 0?void 0:f.profile_id),h("div",{class:"label"},"Verdoc Owner Name"),h("div",{class:"value"},formatFullName((g=(w=this.store)===null||w===void 0?void 0:w.state)===null||g===void 0?void 0:g.profile)),h("div",{class:"label"},"Verdoc Owner Email"),h("div",{class:"value"},(x=(b=(m=this.store)===null||m===void 0?void 0:m.state)===null||b===void 0?void 0:b.profile)===null||x===void 0?void 0:x.email)),this.activeTab===2&&h("div",{class:"content"},h("div",{class:"title"},"Recipients"),(k=(y=this.store)===null||y===void 0?void 0:y.state)===null||k===void 0?void 0:k.recipients.map((function(i,t){var n;var s=i.status!=="submitted"&&i.status!=="canceled"&&i.status!=="declined";var o=e.canResendRecipient(i);var r=formatFullName(i);return h("div",{class:"recipient-detail"},h("div",{class:"recipient-header"},h("div",{class:"recipient-number"},t+1),h("div",{class:"recipient-type"},i.role_name),h("div",{class:(n={"recipient-status":true},n[i.status]=true,n)},i.status),z&&!E&&h("verdocs-dropdown",{onOptionSelected:function(t){return e.handleRecipientAction(i,t.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!o},{id:"inperson",label:"Get In-Person Link",disabled:!s}]})),h("dic",{class:"recipient-content"},h("div",{class:"recipient-name"},r),h("div",{class:"recipient-name"},i.email),h("div",{class:"recipient-name"},i.phone)))})),z&&h("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:function(){return e.showCancelDialog=!E},disabled:E})),this.activeTab===3&&h("div",{class:"content"},h("div",{class:"title"},"History"),M.map((function(e){return h("div",{class:"history-entry"},h("div",{class:"activity-icon",innerHTML:ActivityIcons[e.icon]||e.icon}),h("div",{class:"activity-details"},h("div",{class:"activity-text"},e.message),h("div",{class:"activity-date"},dateFns.format(e.date,FORMAT_TIMESTAMP))))}))),this.showRecipientDialog&&h("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:function(){return e.showRecipientDialog=""}}),this.showManageDialog&&h("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:false,onAnother:function(){var i;e.showManageDialog=false;(i=e.another)===null||i===void 0?void 0:i.emit({envelope:e.store.state})},onNext:function(){return e.showManageDialog=false}}),this.showCancelDialog&&h("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:function(){e.showCancelDialog=false;e.cancelEnvelope()}}))};return e}();VerdocsEnvelopeSidebar.style=VerdocsEnvelopeSidebarStyle0;export{VerdocsEnvelopeSidebar as verdocs_envelope_sidebar};
1
+ var __awaiter=this&&this.__awaiter||function(e,i,t,n){function s(e){return e instanceof t?e:new t((function(i){i(e)}))}return new(t||(t=Promise))((function(t,o){function r(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n["throw"](e))}catch(e){o(e)}}function l(e){e.done?t(e.value):s(e.value).then(r,a)}l((n=n.apply(e,i||[])).next())}))};var __generator=this&&this.__generator||function(e,i){var t={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,s,o,r;return r={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function a(e){return function(i){return l([e,i])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(r&&(r=0,a[0]&&(t=0)),t)try{if(n=1,s&&(o=a[0]&2?s["return"]:a[0]?s["throw"]||((o=s["return"])&&o.call(s),0):s.next)&&!(o=o.call(s,a[1])).done)return o;if(s=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;s=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(o=t.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){t.label=a[1];break}if(a[0]===6&&t.label<o[1]){t.label=o[1];o=a;break}if(o&&t.label<o[2]){t.label=o[2];t.ops.push(a);break}if(o[2])t.ops.pop();t.trys.pop();continue}a=i.call(e,t)}catch(e){a=[6,e];s=0}finally{n=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-d3ac9650.js";import{VerdocsEndpoint,resendInvitation,cancelEnvelope,formatFullName,userIsEnvelopeOwner,capitalize}from"@verdocs/js-sdk";import{g as getEnvelopeStore}from"./EnvelopeStore-822889cb.js";import{F as FORMAT_TIMESTAMP}from"./Types-e4a6eba5.js";import{V as VerdocsToast}from"./Toast-c4843828.js";import{S as SDKError}from"./errors-887f1e88.js";import{d as dateFns}from"./index-0329eed3.js";import"./index-04235019.js";import"./index-7588a071.js";var verdocsEnvelopeSidebarCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-envelope-sidebar{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;max-width:100%;width:400px}@media screen and (max-width: 500px){verdocs-envelope-sidebar.open{-ms-flex:0 0 300px;flex:0 0 300px;width:300px}}verdocs-envelope-sidebar .side-buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .side-buttons button{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .side-buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .side-buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex;overflow-y:scroll}verdocs-envelope-sidebar verdocs-ok-dialog .content{color:black}verdocs-envelope-sidebar .title{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400}verdocs-envelope-sidebar .label{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff}verdocs-envelope-sidebar .manage-recipients-button{-ms-flex-item-align:center;align-self:center;white-space:nowrap;width:100%;margin:0 0 10px 0}verdocs-envelope-sidebar .manage-recipients-button .label{color:#ffffff;font-size:14px}verdocs-envelope-sidebar .manage-recipients-button button{width:100%}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize;font-size:14px;padding:3px 0}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}@media screen and (max-width: 500px){verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 60px;flex:1 1 60px;max-width:60px;min-width:60px}}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .recipient-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}';var VerdocsEnvelopeSidebarStyle0=verdocsEnvelopeSidebarCss;var InformationCircle='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>';var Users='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>';var ClipboardDocuments='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>';var ActivityIcons={visibility:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>',pencil:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>',mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',contact_mail:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>',done:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>',send:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>',gesture:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>',clear:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',check_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>',link:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>',cancel:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>',done_all:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>',create:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',perm_identity:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>',people:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>',contact_email:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>',textsms:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>',verified_user:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.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>',account_circle:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>'};var VerdocsEnvelopeSidebar=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError",7);this.envelopeUpdated=createEvent(this,"envelopeUpdated",7);this.toggle=createEvent(this,"toggle",7);this.another=createEvent(this,"another",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.envelopeId="";this.activeTab=1;this.panelOpen=false;this.showManageDialog=false;this.showRecipientDialog="";this.showCancelDialog=false;this.loading=true}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,i,t,n,s;return __generator(this,(function(o){switch(o.label){case 0:o.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.envelopeId){console.log("[SIDEBAR] Missing required envelope ID ".concat(this.envelopeId));return[2]}if(!this.endpoint.session){console.log("[SIDEBAR] Unable to start session, must be authenticated");return[2]}n=this;return[4,getEnvelopeStore(this.endpoint,this.envelopeId,true)];case 1:n.store=o.sent();this.sortEnvelopeRecipients();this.loading=false;return[3,3];case 2:s=o.sent();console.log("[SIDEBAR] Error loading envelope",s);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(s.message,(i=s.response)===null||i===void 0?void 0:i.status,(t=s.response)===null||t===void 0?void 0:t.data));return[3,3];case 3:return[2]}}))}))};e.prototype.sortEnvelopeRecipients=function(){var e,i;(i=(e=this.store)===null||e===void 0?void 0:e.state)===null||i===void 0?void 0:i.recipients.sort((function(e,i){return e.sequence===i.sequence?e.order-i.order:e.sequence-i.sequence}))};e.prototype.setTab=function(e){var i;this.panelOpen=e!==this.activeTab||!this.panelOpen;(i=this.toggle)===null||i===void 0?void 0:i.emit({open:this.panelOpen});this.activeTab=e};e.prototype.canResendRecipient=function(e){var i,t;return!["pending","declined","submitted","canceled"].includes(e.status)&&!["complete","declined","canceled"].includes((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.status)};e.prototype.handleRecipientAction=function(e,i){var t,n;console.log("[SIDEBAR] Recipient action",i,e);switch(i){case"reminder":resendInvitation(this.endpoint,this.envelopeId,e.role_name).then((function(){VerdocsToast("Reminder Sent",{style:"success"})})).catch((function(e){console.log("[SIDEBAR] Error resending invitation",e);VerdocsToast("Error resending invitation: "+e.message,{style:"error"})}));break;case"inperson":this.showRecipientDialog=e.role_name;break;case"modify":VerdocsToast("This feature will be enabled in a future release. Please try again later.",{style:"info"});break;case"details":VerdocsToast("This feature will be enabled in a future release. Please try again later.",{style:"info"});break}(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:(n=this.store)===null||n===void 0?void 0:n.state,event:i})};e.prototype.cancelEnvelope=function(){var e=this;this.loading=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(i){return __awaiter(e,void 0,void 0,(function(){var e,t,n;return __generator(this,(function(s){switch(s.label){case 0:console.log("[SIDEBAR] Envelope canceled",i);VerdocsToast("Envelope canceled",{style:"success"});n=this;return[4,getEnvelopeStore(this.endpoint,this.envelopeId,true)];case 1:n.store=s.sent();this.sortEnvelopeRecipients();this.loading=false;(e=this.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:this.endpoint,envelope:(t=this.store)===null||t===void 0?void 0:t.state,event:"canceled"});return[2]}}))}))})).catch((function(i){console.log("[SIDEBAR] Error canceling envelope",i);e.loading=false;VerdocsToast("Error canceling envelope: "+i.message,{style:"error"})}))};e.prototype.prepareHistoryEntries=function(){var e=this;var i,t,n,s,o,r,a,l,d,c,v,p;var h=[];var u=((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.history_entries)||[];h.push({icon:"pencil",message:"Envelope created.",date:new Date((s=(n=this.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.created_at)});if(((r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.status)==="complete"){h.push({icon:"pencil",message:"Envelope completed.",date:new Date((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.updated_at)})}var f=u.some((function(e){return e.event==="owner:canceled"}));if(((c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.status)==="canceled"&&!f){h.push({icon:"pencil",message:"Envelope Cancelled.",date:new Date((p=(v=this.store)===null||v===void 0?void 0:v.state)===null||p===void 0?void 0:p.canceled_at)})}u.forEach((function(i){var t;var n=(t=e.store.state)===null||t===void 0?void 0:t.recipients.find((function(e){return e.role_name===i.role_name}));var s=formatFullName(n);switch(i.event.toLowerCase()){case"recipient:signed":h.push({icon:"gesture",message:"Signed by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:declined":h.push({icon:"clear",message:"Declined by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:opened":switch(i.event_detail){case"email":case"mail":h.push({icon:"visibility",message:"Opened by ".concat(s,", via email."),date:new Date(i.created_at)});break;case"sms":h.push({icon:"visibility",message:"Opened by ".concat(s,", via SMS."),date:new Date(i.created_at)});break;case"in_person_link":h.push({icon:"visibility",message:"Opened by ".concat(s,", via In-person link."),date:new Date(i.created_at)});break;case"in_app":h.push({icon:"visibility",message:"Opened by ".concat(s,", via dashboard."),date:new Date(i.created_at)});break;default:h.push({icon:"visibility",message:"Opened by ".concat(s,"."),date:new Date(i.created_at)})}break;case"recipient:submitted":switch(i.event_detail){case"approver":h.push({icon:"check_circle",message:"Approved by ".concat(s,"."),date:new Date(i.created_at)});break;default:h.push({icon:"send",message:"Submitted by ".concat(s,"."),date:new Date(i.created_at)});break}break;case"recipient:prepared":h.push({icon:"send",message:"Prepared by ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:claimed":if(i.event_detail==="guest"){h.push({icon:"account_circle",message:"".concat(s," claimed the Verdoc as a guest."),date:new Date(i.created_at)})}else if(i.event_detail==="profile"){h.push({icon:"verified_user",message:"".concat(s," claimed the Verdoc as a verified user."),date:new Date(i.created_at)})}break;case"recipient:agreed":h.push({icon:"done",message:"".concat(s," agreed to use electronic records and signatures."),date:new Date(i.created_at)});break;case"recipient:invited":if(i.event_detail==="sms"){h.push({icon:"textsms",message:"".concat(s," has been invited via SMS."),date:new Date(i.created_at)})}else{h.push({icon:"mail",message:"".concat(s," has been invited via email."),date:new Date(i.created_at)})}break;case"recipient:reminder":if(i.event_detail==="sms"){h.push({icon:"textsms",message:"".concat(s," sent a reminder via SMS."),date:new Date(i.created_at)})}else{h.push({icon:"mail",message:"".concat(s," sent a reminder via email."),date:new Date(i.created_at)})}break;case"invitation:resent":h.push({icon:"mail",message:"Invitation was resent to ".concat(s," ").concat(i.event_detail==="reminder"?" by reminder":"","."),date:new Date(i.created_at)});break;case"envelope:cc":h.push({icon:"contact_mail",message:"A copy has been sent to ".concat(s,"."),date:new Date(i.created_at)});break;case"recipient:delegated":h.push({icon:"people",message:i.event_detail,date:new Date(i.created_at)});break;case"recipient:updated_info":h.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"owner:updated_recipient_info":h.push({icon:"perm_identity",message:i.event_detail,date:new Date(i.created_at)});break;case"created":h.push({icon:"create",message:"Envelope was created.",date:new Date(i.created_at)});break;case"completed":h.push({icon:"done_all",message:"Envelope was completed.",date:new Date(i.created_at)});break;case"canceled":case"owner:canceled":h.push({icon:"cancel",message:"Envelope was canceled by the creator.",date:new Date(i.created_at)});break;case"owner:get_in_person_link":h.push({icon:"link",message:"Owner accessed the In-person link for ".concat(n,"."),date:new Date(i.created_at)});break;default:console.log("[SIDEBAR] Unknown history type",i);break}}));h.sort((function(e,i){return i.date.getTime()-e.date.getTime()}));return h};e.prototype.render=function(){var e=this;var i,t,n,s,o,r,a,l,d,c,v,p,u,f,w,g,m,b,x,y,k;if(!this.store.state){return h(Host,null)}var z=userIsEnvelopeOwner(this.endpoint.profile,this.store.state);var M=this.prepareHistoryEntries();var E=((t=(i=this.store)===null||i===void 0?void 0:i.state)===null||t===void 0?void 0:t.status)!=="pending"&&((s=(n=this.store)===null||n===void 0?void 0:n.state)===null||s===void 0?void 0:s.status)!=="in progress";return h(Host,{class:this.panelOpen?"open":""},h("div",{class:"side-buttons"},h("button",{class:this.activeTab===1?"active":"",onClick:function(){return e.setTab(1)},innerHTML:InformationCircle}),h("button",{class:this.activeTab===2?"active":"",onClick:function(){return e.setTab(2)},innerHTML:Users}),h("button",{class:this.activeTab===3?"active":"",onClick:function(){return e.setTab(3)},innerHTML:ClipboardDocuments})),this.activeTab===1&&h("div",{class:"content"},h("div",{class:"title"},"Details"),h("div",{class:"label"},"Envelope ID"),h("div",{class:"value"},(r=(o=this.store)===null||o===void 0?void 0:o.state)===null||r===void 0?void 0:r.id),h("div",{class:"label"},"Date Created"),h("div",{class:"value"},dateFns.format(new Date((l=(a=this.store)===null||a===void 0?void 0:a.state)===null||l===void 0?void 0:l.created_at),FORMAT_TIMESTAMP)),h("div",{class:"label"},"Last Modified"),h("div",{class:"value"},dateFns.format(new Date((c=(d=this.store)===null||d===void 0?void 0:d.state)===null||c===void 0?void 0:c.updated_at),FORMAT_TIMESTAMP)),h("div",{class:"label"},"Status"),h("div",{class:"value"},capitalize((p=(v=this.store)===null||v===void 0?void 0:v.state)===null||p===void 0?void 0:p.status)),h("div",{class:"label"},"Verdoc Owner ID"),h("div",{class:"value"},(f=(u=this.store)===null||u===void 0?void 0:u.state)===null||f===void 0?void 0:f.profile_id),h("div",{class:"label"},"Verdoc Owner Name"),h("div",{class:"value"},formatFullName((g=(w=this.store)===null||w===void 0?void 0:w.state)===null||g===void 0?void 0:g.profile)),h("div",{class:"label"},"Verdoc Owner Email"),h("div",{class:"value"},(x=(b=(m=this.store)===null||m===void 0?void 0:m.state)===null||b===void 0?void 0:b.profile)===null||x===void 0?void 0:x.email)),this.activeTab===2&&h("div",{class:"content"},h("div",{class:"title"},"Recipients"),(k=(y=this.store)===null||y===void 0?void 0:y.state)===null||k===void 0?void 0:k.recipients.map((function(i,t){var n;var s=i.status!=="submitted"&&i.status!=="canceled"&&i.status!=="declined";var o=e.canResendRecipient(i);var r=formatFullName(i);return h("div",{class:"recipient-detail"},h("div",{class:"recipient-header"},h("div",{class:"recipient-number"},t+1),h("div",{class:"recipient-type"},i.role_name),h("div",{class:(n={"recipient-status":true},n[i.status]=true,n)},i.status),z&&!E&&h("verdocs-dropdown",{onOptionSelected:function(t){return e.handleRecipientAction(i,t.detail.id)},options:[{id:"reminder",label:"Send Reminder",disabled:!o},{id:"inperson",label:"Get In-Person Link",disabled:!s}]})),h("dic",{class:"recipient-content"},h("div",{class:"recipient-name"},r),h("div",{class:"recipient-name"},i.email),h("div",{class:"recipient-name"},i.phone)))})),z&&h("verdocs-button",{class:"manage-recipients-button",variant:"standard",label:"Cancel Verdoc",onClick:function(){return e.showCancelDialog=!E},disabled:E})),this.activeTab===3&&h("div",{class:"content"},h("div",{class:"title"},"History"),M.map((function(e){return h("div",{class:"history-entry"},h("div",{class:"activity-icon",innerHTML:ActivityIcons[e.icon]||e.icon}),h("div",{class:"activity-details"},h("div",{class:"activity-text"},e.message),h("div",{class:"activity-date"},dateFns.format(e.date,FORMAT_TIMESTAMP))))}))),this.showRecipientDialog&&h("verdocs-envelope-recipient-link",{envelopeId:this.envelopeId,roleName:this.showRecipientDialog,onNext:function(){return e.showRecipientDialog=""}}),this.showManageDialog&&h("verdocs-envelope-recipient-summary",{envelopeId:this.envelopeId,canView:false,onAnother:function(){var i;e.showManageDialog=false;(i=e.another)===null||i===void 0?void 0:i.emit({envelope:e.store.state})},onNext:function(){return e.showManageDialog=false}}),this.showCancelDialog&&h("verdocs-ok-dialog",{heading:"Cancel Envelope?",message:"Are you sure you want to cancel this Envelope? This action cannot be undone.",onNext:function(){e.showCancelDialog=false;e.cancelEnvelope()}}))};return e}();VerdocsEnvelopeSidebar.style=VerdocsEnvelopeSidebarStyle0;export{VerdocsEnvelopeSidebar as verdocs_envelope_sidebar};