@verdocs/web-sdk 5.0.45 → 5.0.47

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 (145) hide show
  1. package/dist/cjs/Environment-241c5659.js +13 -0
  2. package/dist/cjs/Environment-241c5659.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +8 -10
  5. package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js.map +1 -1
  6. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-field-attachment_13.cjs.entry.js.map +1 -1
  8. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js +0 -1
  9. package/dist/cjs/verdocs-kba-dialog_2.cjs.entry.js.map +1 -1
  10. package/dist/cjs/verdocs-preview_7.cjs.entry.js +3 -2
  11. package/dist/cjs/verdocs-preview_7.cjs.entry.js.map +1 -1
  12. package/dist/cjs/verdocs-radio-button.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-radio-button.cjs.entry.js.map +1 -1
  14. package/dist/cjs/verdocs-sign.cjs.entry.js +6 -6
  15. package/dist/cjs/verdocs-sign.cjs.entry.js.map +1 -1
  16. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  17. package/dist/collection/components/controls/verdocs-radio-button/verdocs-radio-button.css +2 -2
  18. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js +0 -1
  19. package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js.map +1 -1
  20. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +5 -4
  21. package/dist/collection/components/embeds/verdocs-send/verdocs-send.js.map +1 -1
  22. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +9 -8
  23. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js.map +1 -1
  24. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js +7 -9
  25. package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.js.map +1 -1
  26. package/dist/collection/components/fields/verdocs-field-radio/verdocs-field-radio.css +2 -2
  27. package/dist/collection/utils/Environment.js +6 -0
  28. package/dist/collection/utils/Environment.js.map +1 -0
  29. package/dist/collection/utils/Unleash.js +1 -1
  30. package/dist/collection/utils/Unleash.js.map +1 -1
  31. package/dist/components/{p-ccbd93c3.js → p-01c8196b.js} +8 -10
  32. package/dist/components/p-01c8196b.js.map +1 -0
  33. package/dist/components/p-0aad02d5.js +10 -0
  34. package/dist/components/p-0aad02d5.js.map +1 -0
  35. package/dist/components/{p-81e52989.js → p-162ae711.js} +2 -2
  36. package/dist/components/{p-81e52989.js.map → p-162ae711.js.map} +1 -1
  37. package/dist/components/{p-a808fcb1.js → p-4fb8b22d.js} +6 -5
  38. package/dist/components/p-4fb8b22d.js.map +1 -0
  39. package/dist/components/{p-b4eee1ed.js → p-78b63448.js} +1 -2
  40. package/dist/components/p-78b63448.js.map +1 -0
  41. package/dist/components/{p-0a14020a.js → p-956fb355.js} +3 -3
  42. package/dist/components/{p-0a14020a.js.map → p-956fb355.js.map} +1 -1
  43. package/dist/components/{p-b9ec1278.js → p-968df95c.js} +3 -3
  44. package/dist/components/{p-b9ec1278.js.map → p-968df95c.js.map} +1 -1
  45. package/dist/components/{p-bfa07825.js → p-c83a272f.js} +2 -2
  46. package/dist/components/{p-bfa07825.js.map → p-c83a272f.js.map} +1 -1
  47. package/dist/components/verdocs-build.js +6 -6
  48. package/dist/components/verdocs-contact-picker.js +1 -1
  49. package/dist/components/verdocs-field-radio.js +1 -1
  50. package/dist/components/verdocs-kba-dialog.js +1 -1
  51. package/dist/components/verdocs-preview.js +1 -1
  52. package/dist/components/verdocs-radio-button.js +1 -1
  53. package/dist/components/verdocs-radio-button.js.map +1 -1
  54. package/dist/components/verdocs-send.js +1 -1
  55. package/dist/components/verdocs-sign.js +8 -7
  56. package/dist/components/verdocs-sign.js.map +1 -1
  57. package/dist/components/verdocs-template-document-page.js +1 -1
  58. package/dist/components/verdocs-template-fields.js +1 -1
  59. package/dist/esm/Environment-3a31549a.js +10 -0
  60. package/dist/esm/Environment-3a31549a.js.map +1 -0
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/verdocs-contact-picker_2.entry.js +7 -9
  63. package/dist/esm/verdocs-contact-picker_2.entry.js.map +1 -1
  64. package/dist/esm/verdocs-field-attachment_13.entry.js +1 -1
  65. package/dist/esm/verdocs-field-attachment_13.entry.js.map +1 -1
  66. package/dist/esm/verdocs-kba-dialog_2.entry.js +0 -1
  67. package/dist/esm/verdocs-kba-dialog_2.entry.js.map +1 -1
  68. package/dist/esm/verdocs-preview_7.entry.js +3 -2
  69. package/dist/esm/verdocs-preview_7.entry.js.map +1 -1
  70. package/dist/esm/verdocs-radio-button.entry.js +1 -1
  71. package/dist/esm/verdocs-radio-button.entry.js.map +1 -1
  72. package/dist/esm/verdocs-sign.entry.js +6 -6
  73. package/dist/esm/verdocs-sign.entry.js.map +1 -1
  74. package/dist/esm/verdocs-web-sdk.js +1 -1
  75. package/dist/esm-es5/Environment-3a31549a.js +2 -0
  76. package/dist/esm-es5/Environment-3a31549a.js.map +1 -0
  77. package/dist/esm-es5/loader.js +1 -1
  78. package/dist/esm-es5/loader.js.map +1 -1
  79. package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
  80. package/dist/esm-es5/verdocs-contact-picker_2.entry.js.map +1 -1
  81. package/dist/esm-es5/verdocs-field-attachment_13.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-field-attachment_13.entry.js.map +1 -1
  83. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js +1 -1
  84. package/dist/esm-es5/verdocs-kba-dialog_2.entry.js.map +1 -1
  85. package/dist/esm-es5/verdocs-preview_7.entry.js +2 -2
  86. package/dist/esm-es5/verdocs-preview_7.entry.js.map +1 -1
  87. package/dist/esm-es5/verdocs-radio-button.entry.js +1 -1
  88. package/dist/esm-es5/verdocs-radio-button.entry.js.map +1 -1
  89. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  90. package/dist/esm-es5/verdocs-sign.entry.js.map +1 -1
  91. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  92. package/dist/esm-es5/verdocs-web-sdk.js.map +1 -1
  93. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +2 -1
  94. package/dist/types/utils/Environment.d.ts +5 -0
  95. package/dist/verdocs-web-sdk/p-05a1dce1.system.entry.js +8 -0
  96. package/dist/verdocs-web-sdk/p-05a1dce1.system.entry.js.map +1 -0
  97. package/dist/verdocs-web-sdk/p-0aad02d5.js +2 -0
  98. package/dist/verdocs-web-sdk/p-0aad02d5.js.map +1 -0
  99. package/dist/verdocs-web-sdk/p-0c1898f6.system.js +1 -1
  100. package/dist/verdocs-web-sdk/p-0c1898f6.system.js.map +1 -1
  101. package/dist/verdocs-web-sdk/p-245bdf6f.system.entry.js +2 -0
  102. package/dist/verdocs-web-sdk/{p-46263e7a.system.entry.js.map → p-245bdf6f.system.entry.js.map} +1 -1
  103. package/dist/verdocs-web-sdk/{p-9a19e851.entry.js → p-35384b77.entry.js} +2 -2
  104. package/dist/verdocs-web-sdk/{p-9a19e851.entry.js.map → p-35384b77.entry.js.map} +1 -1
  105. package/dist/verdocs-web-sdk/{p-3fc80e05.entry.js → p-4c5b836b.entry.js} +2 -2
  106. package/dist/verdocs-web-sdk/{p-3fc80e05.entry.js.map → p-4c5b836b.entry.js.map} +1 -1
  107. package/dist/verdocs-web-sdk/{p-9ccbbb22.system.entry.js → p-4f16d741.system.entry.js} +2 -2
  108. package/dist/verdocs-web-sdk/{p-9ccbbb22.system.entry.js.map → p-4f16d741.system.entry.js.map} +1 -1
  109. package/dist/verdocs-web-sdk/{p-f6bf7e6a.system.entry.js → p-5239a35e.system.entry.js} +2 -2
  110. package/dist/verdocs-web-sdk/{p-f6bf7e6a.system.entry.js.map → p-5239a35e.system.entry.js.map} +1 -1
  111. package/dist/verdocs-web-sdk/p-6074b40b.system.js +2 -0
  112. package/dist/verdocs-web-sdk/p-6074b40b.system.js.map +1 -0
  113. package/dist/verdocs-web-sdk/p-8cdf8b44.entry.js +2 -0
  114. package/dist/verdocs-web-sdk/p-8cdf8b44.entry.js.map +1 -0
  115. package/dist/verdocs-web-sdk/p-8ed58724.entry.js +2 -0
  116. package/dist/verdocs-web-sdk/p-8ed58724.entry.js.map +1 -0
  117. package/dist/verdocs-web-sdk/p-c0331d52.system.entry.js +2 -0
  118. package/dist/verdocs-web-sdk/p-c0331d52.system.entry.js.map +1 -0
  119. package/dist/verdocs-web-sdk/p-d33c2b26.entry.js +8 -0
  120. package/dist/verdocs-web-sdk/p-d33c2b26.entry.js.map +1 -0
  121. package/dist/verdocs-web-sdk/p-dad790a1.system.entry.js +2 -0
  122. package/dist/verdocs-web-sdk/p-dad790a1.system.entry.js.map +1 -0
  123. package/dist/verdocs-web-sdk/p-dcf0049c.entry.js +2 -0
  124. package/dist/verdocs-web-sdk/{p-d47c58de.entry.js.map → p-dcf0049c.entry.js.map} +1 -1
  125. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  126. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js.map +1 -1
  127. package/package.json +6 -6
  128. package/dist/components/p-a808fcb1.js.map +0 -1
  129. package/dist/components/p-b4eee1ed.js.map +0 -1
  130. package/dist/components/p-ccbd93c3.js.map +0 -1
  131. package/dist/custom-elements.json +0 -2231
  132. package/dist/verdocs-web-sdk/p-1f8bd27c.system.entry.js +0 -2
  133. package/dist/verdocs-web-sdk/p-1f8bd27c.system.entry.js.map +0 -1
  134. package/dist/verdocs-web-sdk/p-46263e7a.system.entry.js +0 -2
  135. package/dist/verdocs-web-sdk/p-66ca774d.entry.js +0 -2
  136. package/dist/verdocs-web-sdk/p-66ca774d.entry.js.map +0 -1
  137. package/dist/verdocs-web-sdk/p-89c69404.system.entry.js +0 -8
  138. package/dist/verdocs-web-sdk/p-89c69404.system.entry.js.map +0 -1
  139. package/dist/verdocs-web-sdk/p-c7f2bac2.system.entry.js +0 -2
  140. package/dist/verdocs-web-sdk/p-c7f2bac2.system.entry.js.map +0 -1
  141. package/dist/verdocs-web-sdk/p-cb0b6e3e.entry.js +0 -2
  142. package/dist/verdocs-web-sdk/p-cb0b6e3e.entry.js.map +0 -1
  143. package/dist/verdocs-web-sdk/p-d47c58de.entry.js +0 -2
  144. package/dist/verdocs-web-sdk/p-e8268ed9.entry.js +0 -8
  145. package/dist/verdocs-web-sdk/p-e8268ed9.entry.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,n){function s(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function o(e){try{l(n.next(e))}catch(e){r(e)}}function a(e){try{l(n["throw"](e))}catch(e){r(e)}}function l(e){e.done?i(e.value):s(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},n,s,r,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(a){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,a[0]&&(i=0)),i)try{if(n=1,s&&(r=a[0]&2?s["return"]:a[0]?s["throw"]||((r=s["return"])&&r.call(s),0):s.next)&&!(r=r.call(s,a[1])).done)return r;if(s=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:i.label++;return{value:a[1],done:false};case 5:i.label++;s=a[1];a=[0];continue;case 7:a=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){i=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){i.label=a[1];break}if(a[0]===6&&i.label<r[1]){i.label=r[1];r=a;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(a);break}if(r[2])i.ops.pop();i.trys.pop();continue}a=t.call(e,i)}catch(e){a=[6,e];s=0}finally{n=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-60387e15.system.js","@verdocs/js-sdk","./p-f29eb00a.system.js","./p-6074b40b.system.js","./p-9b26e4e0.system.js","./p-c8a15cb7.system.js","./p-ebd42be0.system.js","./p-21b1acec.system.js","./p-d738b5db.system.js","./p-2c5350ec.system.js"],(function(e){"use strict";var t,i,n,s,r,o,a,l,c,d,u,h,f,v,p,g,x,m,b,w,y,k,S,_,N,I,G,z,P,T,E,j,D;return{setters:[function(e){t=e.r;i=e.c;n=e.h;s=e.H;r=e.F},function(e){o=e.VerdocsEndpoint;a=e.startSigningSession;l=e.envelopeRecipientAgree;c=e.envelopeRecipientDecline;d=e.updateEnvelopeField;u=e.createSignature;h=e.updateEnvelopeFieldSignature;f=e.createInitials;v=e.updateEnvelopeFieldInitials;p=e.isValidPhone;g=e.isValidEmail;x=e.sortFields;m=e.envelopeRecipientSubmit;b=e.getEnvelope;w=e.uploadEnvelopeFieldAttachment;y=e.deleteEnvelopeFieldAttachment;k=e.formatFullName;S=e.fullNameToInitials;_=e.authenticateSigner;N=e.integerSequence},function(e){I=e.a;G=e.u;z=e.r;P=e.g},function(e){T=e.D},function(e){E=e.V},function(e){j=e.S},function(e){D=e.S},function(){},function(){},function(){}],execute:function(){var U='@-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-sign{display:-ms-flexbox;display:flex;overflow:hidden;position:relative;min-height:600px;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-sign div{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-sign input{vertical-align:top}verdocs-sign>.document{-ms-flex:1;flex:1;width:100%;height:100%;-ms-flex-item-align:center;align-self:center;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;max-width:1200px;min-height:200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-sign>.document .inner{width:100%;max-width:1028px}verdocs-sign .cover{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:5000;position:absolute;padding-top:100px;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;background:rgba(0, 0, 0, 0.5)}verdocs-sign .agree{-ms-flex:0;flex:0;width:600px;display:-ms-flexbox;display:flex;max-width:90%;padding:30px 15px;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff}verdocs-sign .agree .header{-ms-flex:0 0 56px;flex:0 0 56px}verdocs-sign .agree li{margin:0.5em 0}verdocs-sign verdocs-ok-dialog .background-overlay{-ms-flex-align:start;align-items:flex-start;padding-top:100px}verdocs-sign .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}verdocs-sign .fatal-error{position:absolute;z-index:100;top:0;left:0;right:0;bottom:0;background-color:#4a4a4a;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-sign .fatal-error .placeholder{position:absolute;opacity:0.1;z-index:-1;top:0;left:0;right:0;bottom:0;width:612px;height:792px;-webkit-box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);box-shadow:0 0 10px 5px rgba(0, 0, 0, 0.0588235294);margin-top:15px}verdocs-sign .fatal-error .message{max-width:50%;width:50%;font-size:16px;background:white;border-radius:5px;-webkit-box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235);box-shadow:3px 3px 9px -1px rgba(0, 0, 0, 0.2470588235)}verdocs-sign .fatal-error .header{color:white;font-size:18px;font-weight:500;padding:5px 10px;margin:0 0 10px 0;background:#4c56cb}verdocs-sign .fatal-error p{margin:1rem;font-size:14px;font-weight:400;padding:0 10px}@media print{verdocs-sign .header{display:none}}#verdocs-sign-header{color:#fff;width:100%;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 46px;flex:0 0 46px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-sign-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 12px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-sign-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-sign-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;padding:0 10px 0 0;text-overflow:ellipsis}.spinner-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;background:rgba(0, 0, 0, 0.4980392157);-ms-flex-pack:center;justify-content:center}';var L=U;var A=[{id:"later",label:"Finish Later"},{id:"decline",label:"Decline to Sign"},{id:"print",label:"Print Without Signing"},{id:"download",label:"Download"}];var R=[{id:"print",label:"Print"},{id:"download",label:"Download"}];var V=e("verdocs_sign",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.envelopeLoaded=i(this,"envelopeLoaded",7);this.envelopeUpdated=i(this,"envelopeUpdated",7);this.endpoint=T;this.envelopeId=null;this.roleId=null;this.inviteCode=null;this.headerTargetId=null;this.recipient=null;this.hasSignature=false;this.nextButtonLabel="Start";this.nextSubmits=false;this.fatalErrorHeader="";this.fatalErrorMessage="";this.focusedField="";this.submitting=false;this.submitted=false;this.isDone=false;this.showDone=false;this.showLoadError=false;this.finishLater=false;this.showFinishLater=false;this.agreed=false;this.documentsSingularPlural="document";this.authStep=null;this.authDetails=null;this.authMethodStates={};this.kbaQuestions=[];this.showSpinner=false;this.kbaChoices=[];this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){if(!this.endpoint){console.log("[SIGN] Creating signing endpoint");this.endpoint=new o({sessionType:"signing"})}};e.prototype.componentDidLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,l,c,d,u,h,f;return __generator(this,(function(v){switch(v.label){case 0:if(!this.envelopeId){(e=this.sdkError)===null||e===void 0?void 0:e.emit(new j("[SIGN] Missing required envelopId",500,""));return[2]}if(!this.roleId){(t=this.sdkError)===null||t===void 0?void 0:t.emit(new j("[SIGN] Missing required roleId",500,""));return[2]}if(!this.inviteCode){(i=this.sdkError)===null||i===void 0?void 0:i.emit(new j("[SIGN] Missing required inviteCode",500,""));return[2]}v.label=1;case 1:v.trys.push([1,3,,4]);console.log("[SIGN] Processing invite code for ".concat(this.envelopeId," / ").concat(this.roleId));return[4,a(this.endpoint,this.envelopeId,this.roleId,this.inviteCode)];case 2:l=v.sent(),c=l.envelope,d=l.recipient,u=l.auth_step,h=l.auth_details;console.log("[SIGN] Loaded signing session",c,d);this.recipient=d;this.envelope=c;this.authStep=u;this.authDetails=h;this.agreed=d.agreed;this.submitted=d.status==="submitted";this.isDone=this.submitted;this.showDone=this.submitted;D.updateEnvelope(this.envelopeId,c);if(this.envelope.documents.length>0){this.documentsSingularPlural="document(s)"}this.authMethodStates=d.auth_method_states||{};if(Object.values(this.authMethodStates).includes("failed")){this.fatalErrorHeader="Recipient Verification Failed";this.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";this.isDone=true}if(this.envelope.status==="canceled"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="This envelope has been canceled. The sender has been notified."}else if(d.status==="declined"){this.fatalErrorHeader="Unable to Start Signing Session";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified."}else if(this.agreed){this.nextButtonLabel="Next"}this.checkRecipientFields();(n=this.envelopeLoaded)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope});return[3,4];case 3:f=v.sent();console.log("[SIGN] Error with signing session",f);(s=this.sdkError)===null||s===void 0?void 0:s.emit(new j(f.message,(r=f.response)===null||r===void 0?void 0:r.status,(o=f.response)===null||o===void 0?void 0:o.data));this.showLoadError=true;return[3,4];case 4:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-sign-header");if(e&&t){console.log("[SIGN] Moving header");t.remove();e.append(t)}};e.prototype.handleClickAgree=function(){var e=this;this.submitting=true;l(this.endpoint,this.envelopeId,this.roleId,true).then((function(){var t;e.nextButtonLabel="Next";e.recipient.agreed=true;e.submitting=false;e.agreed=true;(t=e.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:e.endpoint,envelope:e.envelope,event:"agreed"})})).catch((function(t){var i,n,s;console.log("[SIGN] Update failure",t);e.submitting=false;(i=e.sdkError)===null||i===void 0?void 0:i.emit(new j(t.message,(n=t.response)===null||n===void 0?void 0:n.status,(s=t.response)===null||s===void 0?void 0:s.data))}))};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,s,r,o,a,l;return __generator(this,(function(d){switch(d.label){case 0:o=e.detail.id;switch(o){case"later":return[3,1];case"claim":return[3,2];case"decline":return[3,3];case"print":return[3,5];case"download":return[3,6]}return[3,7];case 1:this.finishLater=true;this.showFinishLater=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"later"});return[3,7];case 2:E("This feature will be available in an upcoming release.");(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"claimed"});return[3,7];case 3:this.submitting=true;return[4,c(this.endpoint,this.envelopeId,this.roleId)];case 4:a=d.sent();console.log("[SIGN] Decline result",a);(n=this.envelopeUpdated)===null||n===void 0?void 0:n.emit({endpoint:this.endpoint,envelope:this.envelope,event:"declined"});this.submitting=false;this.fatalErrorHeader="Declined";this.fatalErrorMessage="You have declined to sign this envelope. The sender has been notified.";return[3,7];case 5:window.print();(s=this.envelopeUpdated)===null||s===void 0?void 0:s.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,7];case 6:{l=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(l){I(this.endpoint,this.envelope,l.id).catch((function(e){console.log("[SIGN] Error downloading PDF",e)}));(r=this.envelopeUpdated)===null||r===void 0?void 0:r.emit({endpoint:this.endpoint,envelope:this.envelope,event:"downloaded"})}}return[3,7];case 7:return[2]}}))}))};e.prototype.updateRecipientFieldValue=function(e,t){var i=this;console.log("[SIGN] updateRecipientFieldValue",e,t);this.getRecipientFields().forEach((function(n){if(n.name===e){n.value=t.value;n.settings=t.settings;G(n);i.checkRecipientFields()}}))};e.prototype.saveFieldChange=function(e,t){var i=this;console.log("[SIGN] saveFieldChange",e,t);d(this.endpoint,this.envelopeId,e,t).then((function(t){return i.updateRecipientFieldValue(e,t)})).catch((function(e){var t,n,s,r,o,a;if(((t=e.response)===null||t===void 0?void 0:t.status)===401&&((s=(n=e.response)===null||n===void 0?void 0:n.data)===null||s===void 0?void 0:s.error)==="jwt expired"){console.log("[SIGN] Signing session expired");i.fatalErrorHeader="Signing Session Expired";i.fatalErrorMessage="Please reload your browser to continue."}else{console.log("[SIGN] Server error",e)}(r=i.sdkError)===null||r===void 0?void 0:r.emit(new j(e.message,(o=e.response)===null||o===void 0?void 0:o.status,(a=e.response)===null||a===void 0?void 0:a.data))}))};e.prototype.handleFieldChange=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,s,r,o,a,l;var c=this;return __generator(this,(function(d){switch(d.label){case 0:i=t.target,n=i.value,s=i.checked;r=e.type;switch(r){case"textarea":return[3,1];case"textbox":return[3,1];case"checkbox":return[3,2];case"radio":return[3,3];case"dropdown":return[3,4];case"initial":return[3,5];case"signature":return[3,8];case"date":return[3,11];case"timestamp":return[3,12]}return[3,13];case 1:return[2,this.saveFieldChange(e.name,{prepared:false,value:n})];case 2:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}d.label=3;case 3:{return[2,this.saveFieldChange(e.name,{prepared:false,value:String(t.target.checked)})]}d.label=4;case 4:console.log("Saving dropdown",e.name,t.detail);return[2,this.saveFieldChange(e.name,{prepared:false,value:t.detail})];case 5:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 6:return[4,d.sent().blob()];case 7:o=d.sent();return[2,f(this.endpoint,"initial",o).then((function(t){return __awaiter(c,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:return[4,v(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.log("Error updating initials",e);c.showSpinner=false}))];case 8:if(!t.detail){return[2]}this.showSpinner=true;return[4,fetch(t.detail)];case 9:return[4,d.sent().blob()];case 10:a=d.sent();return[2,u(this.endpoint,"signature",a).then((function(t){return __awaiter(c,void 0,void 0,(function(){var i;return __generator(this,(function(n){switch(n.label){case 0:console.log("Signature update result",t);return[4,h(this.endpoint,this.envelopeId,e.name,t.id)];case 1:i=n.sent();this.updateRecipientFieldValue(e.name,i);this.showSpinner=false;return[2]}}))}))})).catch((function(e){console.warn("[SIGN] Error updating signature",e);c.showSpinner=false}))];case 11:l=t.detail.formattedDate;if(l){return[2,this.saveFieldChange(e.name,{prepared:false,value:l})]}return[3,14];case 12:console.log("[SIGN] Updating timestamp",{value:n,ts:t.target.getAttribute("timestamp")});return[3,14];case 13:console.log("[SIGN] Unhandled field update",{value:n,checked:s},e);return[3,14];case 14:return[2]}}))}))};e.prototype.isFieldFilled=function(e){var t=e.value,i=t===void 0?"":t;switch(e.type){case"textarea":case"textbox":switch(e.validator||""){case"email":return g(i);case"phone":return p(i);default:return(i||"").trim()!==""}case"signature":return i==="signed";case"initial":return i==="initialed";case"timestamp":return true;case"date":return!!i;case"attachment":return i==="attached";case"dropdown":return i!=="";case"checkbox":return i==="true";case"radio":if(!!e.group){return this.getRecipientFields().filter((function(t){return t.group===e.group})).some((function(e){return e.value==="true"}))}return e.value==="true";default:return false}};e.prototype.isFieldValid=function(e){return!e.required||this.isFieldFilled(e)};e.prototype.getSortedFillableFields=function(){var e=this.getRecipientFields().filter((function(e){return e.type!=="timestamp"}));x(e);return e};e.prototype.handleNext=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s,r,o,a,l,c;var d=this;return __generator(this,(function(u){switch(u.label){case 0:if(!this.nextSubmits)return[3,5];u.label=1;case 1:u.trys.push([1,3,,4]);(e=document.getElementById("air-datepicker-global-container"))===null||e===void 0?void 0:e.remove();this.submitting=true;return[4,m(this.endpoint,this.envelopeId,this.roleId)];case 2:t=u.sent();console.log("[SIGN] Submitted successfully",t);this.recipient.status="submitted";this.showDone=true;console.log("[SIGN] Reloading envelope");b(this.endpoint,this.envelopeId).then((function(e){d.envelope=e;d.submitting=false})).catch((function(e){console.log("[SIGN] Error reloading envelope",e);d.submitting=false}));return[3,4];case 3:i=u.sent();console.log("[SIGN] Error submitting",i);return[3,4];case 4:return[2];case 5:n=this.getSortedFillableFields().filter((function(e){return e.required&&!d.isFieldFilled(e)}));x(n);s=n.findIndex((function(e){return e.name===d.focusedField}));r=s+1;if(r>=n.length){r=0}o=n[r];a=0;if(a<n.length&&["signature","initial"].includes(o.type)&&["initialed","signed"].includes(o.value)){a++;r++;if(r>=n.length){r=0}o=n[r]}if(a>=n.length){o=null}if(o){l=P(o);c=document.getElementById(l);c===null||c===void 0?void 0:c.scrollIntoView({behavior:"smooth"});c===null||c===void 0?void 0:c.focusField();this.focusedField=o.name}return[2]}}))}))};e.prototype.getRecipientFields=function(){var e=this;return this.envelope.fields.filter((function(t){return t.role_name===e.recipient.role_name}))};e.prototype.checkRecipientFields=function(){var e=this;var t=this.getRecipientFields().filter((function(t){return!e.isFieldValid(t)}));if(t.length<1){this.nextButtonLabel="Finish";if(!this.nextSubmits){this.nextSubmits=true}}else{console.log("[SIGN] Invalid fields remaining",t.map((function(e){return e.name})));this.nextButtonLabel="Next";this.nextSubmits=false}};e.prototype.attachFieldAttributes=function(e,t,i){var n=this;if(i.getAttribute("attached")==="1"){return}i.setAttribute("attached","1");i.addEventListener("input",(function(e){if(e.target.type==="radio"||e.target.type==="checkbox"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}else{n.checkRecipientFields()}}));i.addEventListener("attached",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onAttached",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,w(this.endpoint,this.envelopeId,t.name,i.detail)];case 2:n=o.sent();this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=z("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);E("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("deleted",(function(i){return __awaiter(n,void 0,void 0,(function(){var n,s,r;return __generator(this,(function(o){switch(o.label){case 0:console.log("[SIGN] onDeleted",i.detail,i.target.value);this.showSpinner=true;o.label=1;case 1:o.trys.push([1,3,,4]);return[4,y(this.endpoint,this.envelopeId,t.name)];case 2:n=o.sent();console.log("[SIGN] Deleted attachment",n);this.updateRecipientFieldValue(t.name,n);this.checkRecipientFields();s=z("envelope",t,e,{disabled:false,editable:false,draggable:false,done:this.isDone});this.attachFieldAttributes(e,t,s);this.showSpinner=false;return[3,4];case 3:r=o.sent();console.log("Error uploading attachment",r);E("Unable to upload attachment, please try again later",{style:"error"});this.showSpinner=false;return[3,4];case 4:return[2]}}))}))}));i.addEventListener("focusout",(function(e){if(t.type!=="dropdown"&&t.type!=="attachment"){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}}));i.addEventListener("fieldChange",(function(e){n.handleFieldChange(t,e).finally((function(){return n.checkRecipientFields()}))}));i.setAttribute("templateid",this.envelope.template_id);i.setAttribute("fieldname",t.name);i.setAttribute("page",e.pageNumber);i.setAttribute("xScale",e.xScale);i.setAttribute("yScale",e.yScale);var s=k(this.recipient);i.setAttribute("initials",S(s));i.setAttribute("name",s)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;var n=this.getSortedFillableFields();console.log("[SIGN] Rendering fields for page",i.pageNumber,n);n.forEach((function(e,n){if(e.page!==i.pageNumber){return}var s=z("envelope",e,i,{disabled:false,editable:false,draggable:false,done:t.isDone},n);if(!s){return}if(Array.isArray(s)){s.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,s)}}));this.envelope.recipients.filter((function(e){return e.role_name!==t.recipient.role_name&&(e.status==="invited"||e.status==="opened"||e.status==="pending")})).forEach((function(){t.getRecipientFields().filter((function(e){return e.page===i.pageNumber})).forEach((function(e){var n=z("envelope",e,i,{disabled:true,editable:false,draggable:false,done:t.isDone});if(!n){return}if(Array.isArray(n)){n.map((function(n){return t.attachFieldAttributes(i,e,n)}))}else{t.attachFieldAttributes(i,e,n)}}))}));this.checkRecipientFields()};e.prototype.handleAuthenticateSigner=function(e){var t=this;console.log("[SIGN] Submitting authentication step",e);_(this.endpoint,e).then((function(e){console.log("[SIGN] Authentication successful",e);t.authStep=e.auth_step;t.authDetails=e.auth_details})).catch((function(e){var i,n,s,r,o;console.log("[SIGN] Error submitting authentication step",e);if((s=(n=(i=e.response)===null||i===void 0?void 0:i.data)===null||n===void 0?void 0:n.error)===null||s===void 0?void 0:s.includes("failed")){t.fatalErrorHeader="Recipient Verification Failed";t.fatalErrorMessage="We were unable to verify your identity. The sender has been notified.";t.isDone=true}else{E(((o=(r=e.response)===null||r===void 0?void 0:r.data)===null||o===void 0?void 0:o.error)||"Unable to verify your identity. Please try again.",{style:"error"})}}))};e.prototype.render=function(){var e=this;console.log("[SIGN] Rendering",{authStep:this.authStep});if(this.showLoadError){return n(s,null,n("verdocs-ok-dialog",{heading:"Unable to Start Signing",message:"Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.",buttonLabel:"OK",onNext:function(){window.location.reload()}}))}if(!this.envelope){return n(s,null,n("verdocs-loader",null))}if(this.fatalErrorMessage){return n(s,{class:{agreed:this.agreed}},n("div",{class:"fatal-error"},n("div",{class:"message"},n("div",{class:"header"},this.fatalErrorHeader),n("p",null,this.fatalErrorMessage))))}if(this.isDone){return n(s,{class:{agreed:this.agreed}},n("verdocs-view",{endpoint:this.endpoint,envelopeId:this.envelopeId,onSdkError:function(t){var i;return(i=e.sdkError)===null||i===void 0?void 0:i.emit(t.detail)}}),this.showDone&&n("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(t){t.preventDefault();t.stopPropagation();e.showDone=false;e.isDone=true}}),this.submitting&&n("div",{class:"loading-indicator"},n("verdocs-loader",null)))}if(!this.agreed){return n(s,{class:"agreed"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"agree"},n("verdocs-checkbox",{name:"agree",label:"By checking this box, you:",onInput:function(){return e.handleClickAgree()}}),n("ul",null,n("li",null,"Agree to use electronic records and signatures, and confirm you have read the"," ",n("a",{href:"https://verdocs.com/en/electronic-record-signature-disclosure/",target:"_blank"},"Electronic Record and Signatures Disclosure"),"."),n("li",null,"Agree to Verdocs'"," ",n("a",{href:"https://verdocs.com/en/eula",target:"_blank"},"End User License Agreement")," ","and confirm you have read Verdocs'"," ",n("a",{href:"https://verdocs.com/en/privacy-policy/",target:"_blank"},"Privacy Policy"),".")))))}if(this.authStep==="passcode"){return n(s,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"kba"},n("verdocs-kba-dialog",{mode:"text",step:1,steps:1,placeholder:"Enter your passcode...",helptitle:"Document is protected by a Passcode",helptext:"Please enter your Passcode to proceed. If you do not have one, please contact the sender.",label:"Passcode",onNext:function(t){return e.handleAuthenticateSigner({auth_method:"passcode",code:t.detail})}}))))}if(this.authStep==="kba"&&!this.authMethodStates.kba){return n(s,{class:"kba"},n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name))),n("div",{class:"document",style:{paddingTop:"15px"}},n("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"})),n("div",{class:"cover"},n("div",{class:"kba"},n("verdocs-kba-dialog",{mode:"identity",helptitle:"Document requires identity verification",helptext:"Please complete your contact details to proceed.",recipient:this.recipient,onNext:function(t){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(i){e=t.detail;this.handleAuthenticateSigner({auth_method:"kba",first_name:e.first_name,last_name:e.last_name,address:e.address,city:e.city,state:e.state,zip:e.zip,dob:e.dob});return[2]}))}))}}))))}return n(s,null,n("div",{id:"verdocs-sign-header"},n("div",{class:"inner"},n("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),n("div",{class:"title"},this.envelope.name),n("div",{style:{flex:"1"}}),!this.finishLater&&n("verdocs-button",{size:"xsmall",label:this.nextButtonLabel,disabled:!this.agreed,onClick:function(){return e.handleNext()}}),n("div",{style:{marginLeft:"10px"}}),n("verdocs-dropdown",{options:!this.isDone&&!this.finishLater?A:R,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),n("div",{class:"document",style:{paddingTop:"15px"}},(this.envelope.documents||[]).map((function(t){var i=N(1,t.pages);return n(r,null,i.map((function(i){var s;var r=((s=t.page_sizes)===null||s===void 0?void 0:s[i])||{width:612,height:792};return n("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,virtualWidth:r.width,virtualHeight:r.height,pageNumber:i,onPageRendered:function(t){return e.handlePageRendered(t)},type:"filled",layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showFinishLater&&n("verdocs-ok-dialog",{heading:"You've saved your document to finish later.",message:"To complete the ".concat(this.documentsSingularPlural,", use the link in the original email notification inviting you to review and finish the document."),onNext:function(){return e.showFinishLater=false}}),this.showDone&&n("verdocs-ok-dialog",{heading:"You're Done!",message:"You can access the ".concat(this.documentsSingularPlural," at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached."),onNext:function(){e.showDone=false;e.isDone=true}}),this.submitting||this.showSpinner&&n("verdocs-portal",null,n("div",{class:"spinner-overlay"},n("verdocs-spinner",null))))};return e}());V.style=L}}}));
2
+ //# sourceMappingURL=p-dad790a1.system.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["verdocsSignCss","VerdocsSignStyle0","inProgressMenuOptions","id","label","doneMenuOptions","VerdocsSign","exports","class_1","hostRef","this","endpoint","DefaultEndpoint","envelopeId","roleId","inviteCode","headerTargetId","recipient","hasSignature","nextButtonLabel","nextSubmits","fatalErrorHeader","fatalErrorMessage","focusedField","submitting","submitted","isDone","showDone","showLoadError","finishLater","showFinishLater","agreed","documentsSingularPlural","authStep","authDetails","authMethodStates","kbaQuestions","showSpinner","kbaChoices","loading","envelope","prototype","componentWillLoad","console","log","VerdocsEndpoint","sessionType","componentDidLoad","_a","sdkError","emit","SDKError","_b","_c","concat","startSigningSession","_h","_j","sent","auth_step","auth_details","status","Store","updateEnvelope","documents","length","auth_method_states","Object","values","includes","checkRecipientFields","_d","envelopeLoaded","e_1","_e","message","_f","response","_g","data","componentDidRender","headerTarget","document","getElementById","headerEl","remove","append","handleClickAgree","_this","envelopeRecipientAgree","then","envelopeUpdated","event","catch","e","handleOptionSelected","detail","VerdocsToast","envelopeRecipientDecline","declineResult","window","print","firstDoc","find","doc","type","saveAttachment","updateRecipientFieldValue","fieldName","updateResult","getRecipientFields","forEach","oldField","name","value","settings","updateDocumentFieldValue","saveFieldChange","fields","updateEnvelopeField","error","handleFieldChange","field","target","checked","prepared","String","fetch","_k","blob","initialsBlob","createInitials","newInitials","__awaiter","updateEnvelopeFieldInitials","signatureBlob","createSignature","newSignature","updateEnvelopeFieldSignature","warn","formattedDate","ts","getAttribute","isFieldFilled","validator","isValidEmail","isValidPhone","trim","group","filter","f","some","isFieldValid","required","getSortedFillableFields","recipientFields","sortFields","handleNext","envelopeRecipientSubmit","result","getEnvelope","e_2","emptyFields","focusedIndex","findIndex","nextFocusedIndex","nextRequiredField","skips","getFieldId","el","scrollIntoView","behavior","focusField","role_name","invalidFields","map","attachFieldAttributes","pageInfo","setAttribute","addEventListener","finally","uploadEnvelopeFieldAttachment","newEl","renderDocumentField","disabled","editable","draggable","done","e_3","style","deleteEnvelopeFieldAttachment","e_4","template_id","pageNumber","xScale","yScale","fullName","formatFullName","fullNameToInitials","handlePageRendered","tabIndex","page","Array","isArray","recipients","r","handleAuthenticateSigner","params","authenticateSigner","render","h","Host","heading","buttonLabel","onNext","location","reload","class","onSdkError","preventDefault","stopPropagation","src","alt","paddingTop","width","height","boxShadow","marginTop","onInput","href","mode","step","steps","placeholder","helptitle","helptext","auth_method","code","kba","recipDetails","first_name","last_name","address","city","state","zip","dob","flex","size","onClick","marginLeft","options","onOptionSelected","envelopeDocument","pageNumbers","integerSequence","pages","Fragment","pageSize","page_sizes","documentId","virtualWidth","virtualHeight","onPageRendered","layers"],"sources":["src/components/embeds/verdocs-sign/verdocs-sign.scss?tag=verdocs-sign","src/components/embeds/verdocs-sign/verdocs-sign.tsx"],"sourcesContent":["@import '../../../theme.scss';\n\nverdocs-sign {\n display: flex;\n overflow: hidden;\n position: relative;\n min-height: 600px;\n flex-direction: column;\n box-sizing: border-box;\n font-family: $verdocs-primary-font;\n\n div {\n display: block;\n box-sizing: border-box;\n }\n\n input {\n vertical-align: top;\n }\n\n //.intro {\n // width: 100%;\n // display: flex;\n // flex: 0 0 60px;\n // color: #111111;\n // font-size: 18px;\n // font-weight: 500;\n // line-height: 28px;\n // flex-direction: row;\n // background: #ffffff;\n //\n // .inner {\n // width: 100%;\n // display: flex;\n // margin: 0 auto;\n // padding: 0 20px;\n // max-width: 1200px;\n // flex-direction: row;\n // align-items: center;\n // }\n //}\n\n > .document {\n flex: 1;\n width: 100%;\n height: 100%;\n align-self: center;\n display: flex;\n padding: 15px;\n row-gap: 15px;\n max-width: 1200px;\n min-height: 200px;\n position: relative;\n overflow-y: scroll;\n align-items: center;\n box-sizing: border-box;\n flex-direction: column;\n //justify-content: center;\n\n .inner {\n width: 100%;\n max-width: 1028px;\n }\n }\n\n .cover {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 5000;\n position: absolute;\n padding-top: 100px;\n align-items: center;\n flex-direction: column;\n background: rgba(0, 0, 0, 0.5);\n }\n\n .agree {\n flex: 0;\n width: 600px;\n display: flex;\n max-width: 90%;\n padding: 30px 15px;\n flex-direction: column;\n background-color: #ffffff;\n\n .header {\n flex: 0 0 56px;\n }\n\n li {\n margin: 0.5em 0;\n }\n }\n\n verdocs-ok-dialog .background-overlay {\n align-items: flex-start;\n padding-top: 100px;\n }\n\n .loading-indicator {\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n display: flex;\n z-index: 10000;\n position: fixed;\n background-color: rgba(0, 0, 0, 0.7);\n }\n\n .fatal-error {\n position: absolute;\n z-index: 100;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #4a4a4a;\n display: flex;\n align-items: center;\n justify-content: center;\n\n .placeholder {\n position: absolute;\n opacity: 0.1;\n z-index: -1;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n width: 612px;\n height: 792px;\n box-shadow: 0 0 10px 5px #0000000f;\n margin-top: 15px;\n }\n\n .message {\n max-width: 50%;\n width: 50%;\n font-size: 16px;\n background: white;\n border-radius: 5px;\n box-shadow: 3px 3px 9px -1px #0000003f;\n }\n\n .header {\n color: white;\n font-size: 18px;\n font-weight: 500;\n padding: 5px 10px;\n margin: 0 0 10px 0;\n background: $verdocs-purple-shade;\n }\n\n p {\n margin: 1rem;\n font-size: 14px;\n font-weight: 400;\n padding: 0 10px;\n }\n }\n}\n\n@media print {\n verdocs-sign .header {\n display: none;\n }\n}\n\n#verdocs-sign-header {\n color: #fff;\n width: 100%;\n display: flex;\n z-index: 1000;\n flex: 0 0 46px;\n font-size: 12px;\n column-gap: 15px;\n align-items: center;\n flex-direction: row;\n transition: all 0.25s;\n background-color: $medium-bg;\n box-shadow:\n 0 4px 4px 0 rgb(0 0 0 / 24%),\n 0 0 4px 0 rgb(0 0 0 / 12%);\n\n .inner {\n width: 100%;\n display: flex;\n margin: 0 auto;\n padding: 0 12px;\n max-width: 1200px;\n align-items: center;\n flex-direction: row;\n }\n\n .logo {\n width: 80px;\n display: none;\n margin: -6px 0 0 0;\n }\n\n .title {\n font-size: 18px;\n font-weight: 500;\n overflow: hidden;\n white-space: nowrap;\n padding: 0 10px 0 0;\n text-overflow: ellipsis;\n }\n}\n\n.spinner-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n display: flex;\n align-items: center;\n background: #0000007f;\n justify-content: center;\n}\n","import {updateEnvelopeField, sortFields} from '@verdocs/js-sdk';\nimport {Event, EventEmitter, Host, Fragment, Component, Prop, State, h} from '@stencil/core';\nimport {getEnvelope, integerSequence, isValidEmail, isValidPhone, updateEnvelopeFieldInitials} from '@verdocs/js-sdk';\nimport {fullNameToInitials, startSigningSession, deleteEnvelopeFieldAttachment, formatFullName} from '@verdocs/js-sdk';\nimport {authenticateSigner, IEnvelope, IEnvelopeField, IRecipient, TAuthenticateRecipientRequest} from '@verdocs/js-sdk';\nimport {updateEnvelopeFieldSignature, uploadEnvelopeFieldAttachment, VerdocsEndpoint, TRecipientAuthMethod} from '@verdocs/js-sdk';\nimport {createInitials, createSignature, envelopeRecipientAgree, envelopeRecipientDecline, envelopeRecipientSubmit} from '@verdocs/js-sdk';\nimport {getFieldId, renderDocumentField, saveAttachment, updateDocumentFieldValue} from '../../../utils/utils';\nimport {DefaultEndpoint} from '../../../utils/Environment';\nimport {IDocumentPageInfo} from '../../../utils/Types';\nimport {VerdocsToast} from '../../../utils/Toast';\nimport {SDKError} from '../../../utils/errors';\nimport {Store} from '../../../utils/Datastore';\n\nconst inProgressMenuOptions = [\n {id: 'later', label: 'Finish Later'}, //\n // {id: 'claim', label: 'Claim the Document', disabled: true},\n {id: 'decline', label: 'Decline to Sign'},\n {id: 'print', label: 'Print Without Signing'},\n {id: 'download', label: 'Download'},\n];\n\nconst doneMenuOptions = [\n {id: 'print', label: 'Print'},\n {id: 'download', label: 'Download'},\n];\n\n/**\n * Display an envelope signing experience. This will display the envelope's attached\n * documents with signing fields overlaid on each page.\n *\n * The component will attempt to initiate a signing session and load the specified\n * envelope. If successful, the recipient's fields will be enabled and the user will\n * be able to sign the envelope's attached documents. If not, an `sdkError` will be\n * thrown and the component will be blank/empty. To provide the best user experience,\n * applications should capture and handle this error to provide the user with\n * instructions/options for next steps based on the application's design and workflow.\n *\n * Unlike other components, this will always create its own endpoint to manage the\n * session session. This endpoint will be included in event callbacks for the\n * convenience of host applications that may wish to make server calls using the\n * signer's credentials once signing is complete (e.g. to obtain copies of\n * the signed attachments.)\n */\n@Component({\n tag: 'verdocs-sign',\n styleUrl: 'verdocs-sign.scss',\n shadow: false,\n})\nexport class VerdocsSign {\n /**\n * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.\n */\n @Prop({mutable: true}) endpoint: VerdocsEndpoint = DefaultEndpoint;\n\n /**\n * The ID of the envelope to sign.\n */\n @Prop({reflect: true}) envelopeId: string | null = null;\n\n /**\n * The ID of the role that will be signing e.g. 'Recipient 1'\n */\n @Prop({reflect: true}) roleId: string | null = null;\n\n /**\n * The invite code for the signer.\n */\n @Prop({reflect: true}) inviteCode: string | null = null;\n\n /**\n * If set, (recommended), the host application should create a <DIV> element with a unique ID. When this\n * component renders, the header will be removed from its default location and placed in the target element.\n * This allows the parent application to more easily control its placement and scroll effects (e.g. \"fixed\").\n *\n * The movement of the header to the target container is not dynamic - it is performed only on the initial\n * render. Host applications should not conditionally render this container. If the header's visibility must\n * be externally controlled, use CSS display options to hide/show it instead.\n */\n @Prop() headerTargetId: string | null = null;\n\n /**\n * Event fired if an error occurs. The event details will contain information about the error. Most errors will\n * terminate the process, and the calling application should correct the condition and re-render the component.\n */\n @Event({composed: true}) sdkError: EventEmitter<SDKError>;\n\n /**\n * Event fired when the envelope is updated in any way.\n */\n @Event({composed: true}) envelopeLoaded: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope}>;\n\n /**\n * Event fired when the envelope is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.\n */\n @Event({composed: true}) envelopeUpdated: EventEmitter<{endpoint: VerdocsEndpoint; envelope: IEnvelope; event: string}>;\n\n // @State() roleNames: string[] = [];\n // @State() sortedRecipients: IRecipient[] = [];\n @State() recipient: IRecipient | null = null;\n @State() hasSignature = false;\n @State() nextButtonLabel = 'Start';\n @State() nextSubmits = false;\n @State() fatalErrorHeader = '';\n @State() fatalErrorMessage = '';\n @State() focusedField = '';\n @State() submitting = false;\n @State() submitted = false;\n @State() isDone = false;\n @State() showDone = false;\n @State() showLoadError = false;\n @State() finishLater = false;\n @State() showFinishLater = false;\n @State() agreed = false;\n @State() documentsSingularPlural = 'document';\n @State() authStep: string | null = null;\n @State() authDetails: any = null;\n @State() authMethodStates: Partial<Record<TRecipientAuthMethod, string>> = {};\n @State() kbaQuestions: any[] = [];\n @State() showSpinner = false;\n @State() kbaChoices = [];\n\n @State() loading = true;\n @State() envelope: IEnvelope | null = null;\n\n // recipientIndex: number = -1;\n\n componentWillLoad() {\n if (!this.endpoint) {\n console.log('[SIGN] Creating signing endpoint');\n this.endpoint = new VerdocsEndpoint({sessionType: 'signing'});\n }\n }\n\n async componentDidLoad() {\n if (!this.envelopeId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required envelopId', 500, ''));\n return;\n }\n\n if (!this.roleId) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required roleId', 500, ''));\n return;\n }\n\n if (!this.inviteCode) {\n this.sdkError?.emit(new SDKError('[SIGN] Missing required inviteCode', 500, ''));\n return;\n }\n\n try {\n console.log(`[SIGN] Processing invite code for ${this.envelopeId} / ${this.roleId}`);\n\n // NOTE: We don't listen to the store here because we are often an independent\n // session and might have a different \"view\" of the envelope.\n const {envelope, recipient, auth_step, auth_details} = await startSigningSession(this.endpoint, this.envelopeId, this.roleId, this.inviteCode);\n console.log(`[SIGN] Loaded signing session`, envelope, recipient);\n this.recipient = recipient;\n this.envelope = envelope;\n this.authStep = auth_step;\n this.authDetails = auth_details;\n this.agreed = recipient.agreed;\n this.submitted = recipient.status === 'submitted';\n this.isDone = this.submitted;\n this.showDone = this.submitted;\n\n Store.updateEnvelope(this.envelopeId, envelope);\n\n if (this.envelope.documents.length > 0) {\n this.documentsSingularPlural = 'document(s)';\n }\n\n this.authMethodStates = recipient.auth_method_states || ({} as Record<TRecipientAuthMethod, string>);\n if (Object.values(this.authMethodStates).includes('failed')) {\n this.fatalErrorHeader = 'Recipient Verification Failed';\n this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n this.isDone = true;\n }\n\n // TODO: Envelope \"complete\" | \"declined\" | \"canceled\"\n // TODO: Recipient \"canceled\"\n\n if (this.envelope.status === 'canceled') {\n this.fatalErrorHeader = 'Unable to Start Signing Session';\n this.fatalErrorMessage = 'This envelope has been canceled. The sender has been notified.';\n } else if (recipient.status === 'declined') {\n this.fatalErrorHeader = 'Unable to Start Signing Session';\n this.fatalErrorMessage = 'You have declined to sign this envelope. The sender has been notified.';\n } else if (this.agreed) {\n this.nextButtonLabel = 'Next';\n }\n\n this.checkRecipientFields();\n this.envelopeLoaded?.emit({endpoint: this.endpoint, envelope: this.envelope});\n } catch (e) {\n console.log('[SIGN] Error with signing session', e);\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n this.showLoadError = true;\n }\n }\n\n componentDidRender() {\n const headerTarget = this.headerTargetId ? document.getElementById(this.headerTargetId) : null;\n const headerEl = document.getElementById('verdocs-sign-header');\n if (headerTarget && headerEl) {\n console.log('[SIGN] Moving header');\n headerEl.remove();\n headerTarget.append(headerEl);\n }\n }\n\n handleClickAgree() {\n this.submitting = true;\n envelopeRecipientAgree(this.endpoint, this.envelopeId, this.roleId, true)\n .then(() => {\n this.nextButtonLabel = 'Next';\n this.recipient.agreed = true;\n this.submitting = false;\n this.agreed = true; // The server returns a recipient object but it's not \"deep\" so we track this locally\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'agreed'});\n })\n .catch(e => {\n console.log('[SIGN] Update failure', e);\n this.submitting = false;\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleOptionSelected(e: any) {\n switch (e.detail.id) {\n case 'later':\n this.finishLater = true;\n this.showFinishLater = true;\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'later'});\n break;\n\n case 'claim':\n VerdocsToast('This feature will be available in an upcoming release.');\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'claimed'});\n break;\n\n case 'decline':\n {\n this.submitting = true;\n const declineResult = await envelopeRecipientDecline(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Decline result', declineResult);\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'declined'});\n this.submitting = false;\n this.fatalErrorHeader = 'Declined';\n this.fatalErrorMessage = 'You have declined to sign this envelope. The sender has been notified.';\n }\n break;\n\n case 'print':\n window.print();\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'printed'});\n break;\n\n case 'download':\n {\n const firstDoc = this.envelope.documents.find(doc => doc.type === 'attachment');\n if (firstDoc) {\n saveAttachment(this.endpoint, this.envelope, firstDoc.id).catch(e => {\n console.log('[SIGN] Error downloading PDF', e);\n });\n this.envelopeUpdated?.emit({endpoint: this.endpoint, envelope: this.envelope, event: 'downloaded'});\n }\n }\n break;\n }\n }\n\n updateRecipientFieldValue(fieldName: string, updateResult: any) {\n console.log('[SIGN] updateRecipientFieldValue', fieldName, updateResult);\n this.getRecipientFields().forEach(oldField => {\n if (oldField.name === fieldName) {\n oldField.value = updateResult.value;\n // TODO: Keeping this while attachments still rely on it\n oldField.settings = updateResult.settings;\n updateDocumentFieldValue(oldField);\n this.checkRecipientFields();\n }\n });\n }\n\n saveFieldChange(fieldName: string, fields: Record<string, any>) {\n console.log('[SIGN] saveFieldChange', fieldName, fields);\n updateEnvelopeField(this.endpoint, this.envelopeId, fieldName, fields) //\n .then(updateResult => this.updateRecipientFieldValue(fieldName, updateResult))\n .catch(e => {\n if (e.response?.status === 401 && e.response?.data?.error === 'jwt expired') {\n console.log('[SIGN] Signing session expired');\n this.fatalErrorHeader = 'Signing Session Expired';\n this.fatalErrorMessage = 'Please reload your browser to continue.';\n } else {\n console.log('[SIGN] Server error', e);\n }\n\n this.sdkError?.emit(new SDKError(e.message, e.response?.status, e.response?.data));\n });\n }\n\n async handleFieldChange(field: IEnvelopeField, e: any) {\n const {value, checked} = e.target;\n\n switch (field.type as any) {\n // TODO: Remove legacy type when no longer needed\n case 'textarea':\n case 'textbox':\n return this.saveFieldChange(field.name, {prepared: false, value});\n\n case 'checkbox': {\n return this.saveFieldChange(field.name, {prepared: false, value: String(e.target.checked)});\n }\n\n case 'radio': {\n return this.saveFieldChange(field.name, {prepared: false, value: String(e.target.checked)});\n }\n\n case 'dropdown':\n // TODO: Set prepared to false server-side.\n console.log('Saving dropdown', field.name, e.detail);\n return this.saveFieldChange(field.name, {prepared: false, value: e.detail});\n\n case 'initial':\n // This can be caused by a focus-out event if the user clicks the field\n // after it's already filled in, then clicks something else like a textbox.\n // We don't visually indicate the focus, but it's still there.\n if (!e.detail) {\n return;\n }\n\n this.showSpinner = true;\n const initialsBlob = await (await fetch(e.detail)).blob();\n return createInitials(this.endpoint, 'initial', initialsBlob) //\n .then(async newInitials => {\n const updateResult = await updateEnvelopeFieldInitials(this.endpoint, this.envelopeId, field.name, newInitials.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.showSpinner = false;\n })\n .catch(e => {\n console.log('Error updating initials', e);\n this.showSpinner = false;\n });\n\n case 'signature':\n // This can be caused by a focus-out event if the user clicks the field\n // after it's already filled in, then clicks something else like a textbox.\n // We don't visually indicate the focus, but it's still there.\n if (!e.detail) {\n return;\n }\n\n this.showSpinner = true;\n const signatureBlob = await (await fetch(e.detail)).blob();\n return createSignature(this.endpoint, 'signature', signatureBlob) //\n .then(async newSignature => {\n console.log('Signature update result', newSignature);\n const updateResult = await updateEnvelopeFieldSignature(this.endpoint, this.envelopeId, field.name, newSignature.id);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.showSpinner = false;\n })\n .catch(e => {\n console.warn('[SIGN] Error updating signature', e);\n this.showSpinner = false;\n });\n\n case 'date':\n const {formattedDate} = e.detail;\n if (formattedDate) {\n return this.saveFieldChange(field.name, {prepared: false, value: formattedDate});\n }\n break;\n\n case 'timestamp':\n console.log('[SIGN] Updating timestamp', {value, ts: e.target.getAttribute('timestamp')});\n break;\n\n default:\n console.log('[SIGN] Unhandled field update', {value, checked}, field);\n break;\n }\n }\n\n isFieldFilled(field: IEnvelopeField) {\n const {value = ''} = field;\n switch (field.type as any) {\n case 'textarea':\n case 'textbox':\n switch (field.validator || '') {\n case 'email':\n return isValidEmail(value);\n case 'phone':\n return isValidPhone(value);\n default:\n return (value || '').trim() !== '';\n }\n\n case 'signature':\n return value === 'signed';\n\n case 'initial':\n return value === 'initialed';\n\n // Timestamp fields get automatically filled when the envelope is submitted.\n case 'timestamp':\n return true;\n\n case 'date':\n return !!value;\n\n case 'attachment':\n return value === 'attached';\n\n case 'dropdown':\n return value !== '';\n\n case 'checkbox':\n return value === 'true';\n\n case 'radio':\n if (!!field.group) {\n return this.getRecipientFields()\n .filter(f => f.group === field.group)\n .some(field => field.value === 'true');\n }\n\n return field.value === 'true';\n\n default:\n return false;\n }\n }\n\n isFieldValid(field: IEnvelopeField) {\n return !field.required || this.isFieldFilled(field);\n }\n\n getSortedFillableFields() {\n const recipientFields = this.getRecipientFields().filter(field => field.type !== 'timestamp');\n sortFields(recipientFields);\n return recipientFields;\n }\n\n async handleNext() {\n if (this.nextSubmits) {\n try {\n // Patches the date picker to be forcibly removed if still showing during submission\n document.getElementById('air-datepicker-global-container')?.remove();\n\n this.submitting = true;\n const result = await envelopeRecipientSubmit(this.endpoint, this.envelopeId, this.roleId);\n console.log('[SIGN] Submitted successfully', result);\n this.recipient.status = 'submitted';\n this.showDone = true;\n console.log('[SIGN] Reloading envelope');\n getEnvelope(this.endpoint, this.envelopeId)\n .then(envelope => {\n this.envelope = envelope;\n // The show-done dialog does this\n // this.isDone = true;\n this.submitting = false;\n })\n .catch(e => {\n // this.isDone = true;\n console.log('[SIGN] Error reloading envelope', e);\n this.submitting = false;\n });\n } catch (e) {\n console.log('[SIGN] Error submitting', e);\n }\n\n return;\n }\n\n // Find and focus the next incomplete field (that is fillable)\n const emptyFields = this.getSortedFillableFields().filter(field => field.required && !this.isFieldFilled(field));\n sortFields(emptyFields);\n\n const focusedIndex = emptyFields.findIndex(field => field.name === this.focusedField);\n let nextFocusedIndex = focusedIndex + 1;\n if (nextFocusedIndex >= emptyFields.length) {\n nextFocusedIndex = 0;\n }\n\n let nextRequiredField = emptyFields[nextFocusedIndex];\n // console.log('Next field', nextRequiredField, emptyFields);\n\n // Skip signature and initial fields that are already filled in. We have to count our \"skips\" just in case, to avoid infinite loops.\n let skips = 0;\n if (skips < emptyFields.length && ['signature', 'initial'].includes(nextRequiredField.type) && ['initialed', 'signed'].includes(nextRequiredField.value)) {\n skips++;\n nextFocusedIndex++;\n if (nextFocusedIndex >= emptyFields.length) {\n nextFocusedIndex = 0;\n }\n nextRequiredField = emptyFields[nextFocusedIndex];\n }\n\n if (skips >= emptyFields.length) {\n nextRequiredField = null;\n }\n\n if (nextRequiredField) {\n const id = getFieldId(nextRequiredField);\n const el = document.getElementById(id) as any;\n el?.scrollIntoView({behavior: 'smooth'});\n el?.focusField();\n this.focusedField = nextRequiredField.name;\n }\n }\n\n getRecipientFields() {\n return this.envelope.fields.filter(field => field.role_name === this.recipient.role_name);\n }\n\n // See if everything that \"needs to be\" filled in is, and all \"fillable fields\" are valid\n checkRecipientFields() {\n const invalidFields = this.getRecipientFields().filter(field => !this.isFieldValid(field));\n if (invalidFields.length < 1) {\n this.nextButtonLabel = 'Finish';\n if (!this.nextSubmits) {\n this.nextSubmits = true;\n }\n } else {\n console.log(\n '[SIGN] Invalid fields remaining',\n invalidFields.map(field => field.name),\n );\n this.nextButtonLabel = 'Next';\n this.nextSubmits = false;\n }\n }\n\n attachFieldAttributes(pageInfo, field, el) {\n // We can get called multiple times as rendering completes and it's hard to avoid that\n // because it's a ton of work for the callers to know it's been done already. But we\n // don't want to attach multiple event listeners or we get dupe event handling, like\n // calling the server twice on every field update. Since JS has no removeAllEventListeners()\n // option, using removeEventListener() isn't reliable the way Stencil binds local function\n // contexts, and cloneNode messes up the rest of the rendering, we just track it with a flag.\n if (el.getAttribute('attached') === '1') {\n return;\n }\n el.setAttribute('attached', '1');\n\n el.addEventListener('input', (e: any) => {\n // console.log('[SIGN] onfieldInput', e.detail, e.target.value);\n // These field types don't emit fieldChange. Should we standardize on that? We don't tap \"input\" for fields like\n // text boxes because we'd be updating the field on every keystroke. We do those on blur which fires fieldChange.\n if (e.target.type === 'radio' || e.target.type === 'checkbox') {\n // if (e.target.type === 'radio' || e.target.name.includes('date') || e.target.name.includes('checkbox')) {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n } else {\n this.checkRecipientFields();\n }\n });\n el.addEventListener('attached', async (e: any) => {\n console.log('[SIGN] onAttached', e.detail, e.target.value);\n this.showSpinner = true;\n try {\n const updateResult = await uploadEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name, e.detail);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.checkRecipientFields();\n\n const newEl = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone});\n this.attachFieldAttributes(pageInfo, field, newEl);\n\n this.showSpinner = false;\n } catch (e) {\n console.log('Error uploading attachment', e);\n VerdocsToast('Unable to upload attachment, please try again later', {style: 'error'});\n this.showSpinner = false;\n }\n });\n el.addEventListener('deleted', async (e: any) => {\n console.log('[SIGN] onDeleted', e.detail, e.target.value);\n this.showSpinner = true;\n try {\n const updateResult = await deleteEnvelopeFieldAttachment(this.endpoint, this.envelopeId, field.name);\n console.log('[SIGN] Deleted attachment', updateResult);\n this.updateRecipientFieldValue(field.name, updateResult);\n this.checkRecipientFields();\n\n const newEl = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone});\n this.attachFieldAttributes(pageInfo, field, newEl);\n\n this.showSpinner = false;\n } catch (e) {\n console.log('Error uploading attachment', e);\n VerdocsToast('Unable to upload attachment, please try again later', {style: 'error'});\n this.showSpinner = false;\n }\n });\n el.addEventListener('focusout', e => {\n // These field types trigger focusout as they're used, even without a value change\n if (field.type !== 'dropdown' && field.type !== 'attachment') {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n }\n });\n el.addEventListener('fieldChange', e => {\n this.handleFieldChange(field, e).finally(() => this.checkRecipientFields());\n });\n\n el.setAttribute('templateid', this.envelope.template_id);\n el.setAttribute('fieldname', field.name);\n el.setAttribute('page', pageInfo.pageNumber);\n el.setAttribute('xScale', pageInfo.xScale);\n el.setAttribute('yScale', pageInfo.yScale);\n\n const fullName = formatFullName(this.recipient);\n el.setAttribute('initials', fullNameToInitials(fullName));\n el.setAttribute('name', fullName);\n }\n\n handlePageRendered(e: any) {\n const pageInfo = e.detail as IDocumentPageInfo;\n\n // NOTE: We don't filter on pageNumber here because we need the position in the\n // entire list to set the tabIndex.\n const recipientFields = this.getSortedFillableFields();\n console.log('[SIGN] Rendering fields for page', pageInfo.pageNumber, recipientFields);\n\n // First render the fields for the signer\n recipientFields.forEach((field, tabIndex) => {\n if (field.page !== pageInfo.pageNumber) {\n return;\n }\n\n const el = renderDocumentField('envelope', field, pageInfo, {disabled: false, editable: false, draggable: false, done: this.isDone}, tabIndex);\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, el);\n }\n });\n\n // Now render the fields for other signers who have yet to act\n this.envelope.recipients\n .filter(r => r.role_name !== this.recipient.role_name && (r.status === 'invited' || r.status === 'opened' || r.status === 'pending'))\n .forEach(() => {\n this.getRecipientFields()\n .filter(field => field.page === pageInfo.pageNumber)\n .forEach(field => {\n const el = renderDocumentField('envelope', field, pageInfo, {disabled: true, editable: false, draggable: false, done: this.isDone});\n if (!el) {\n return;\n }\n\n if (Array.isArray(el)) {\n el.map(e => this.attachFieldAttributes(pageInfo, field, e));\n } else {\n this.attachFieldAttributes(pageInfo, field, el);\n }\n });\n });\n\n this.checkRecipientFields();\n }\n\n handleAuthenticateSigner(params: TAuthenticateRecipientRequest) {\n console.log('[SIGN] Submitting authentication step', params);\n authenticateSigner(this.endpoint, params)\n .then(r => {\n console.log('[SIGN] Authentication successful', r);\n this.authStep = r.auth_step;\n this.authDetails = r.auth_details;\n })\n .catch(e => {\n console.log('[SIGN] Error submitting authentication step', e);\n if (e.response?.data?.error?.includes('failed')) {\n this.fatalErrorHeader = 'Recipient Verification Failed';\n this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n this.isDone = true;\n } else {\n VerdocsToast(e.response?.data?.error || 'Unable to verify your identity. Please try again.', {style: 'error'});\n }\n });\n }\n\n render() {\n console.log('[SIGN] Rendering', {authStep: this.authStep});\n if (this.showLoadError) {\n return (\n <Host>\n <verdocs-ok-dialog\n heading=\"Unable to Start Signing\"\n message={`Sorry, your invite code is invalid or has expired. Please check your email for an updated invitation, or contact the sender.`}\n buttonLabel=\"OK\"\n onNext={() => {\n window.location.reload();\n }}\n />\n </Host>\n );\n }\n\n if (!this.envelope) {\n return (\n <Host>\n <verdocs-loader />\n </Host>\n );\n }\n\n if (this.fatalErrorMessage) {\n return (\n <Host class={{agreed: this.agreed}}>\n <div class=\"fatal-error\">\n <div class=\"message\">\n <div class=\"header\">{this.fatalErrorHeader}</div>\n <p>{this.fatalErrorMessage}</p>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.isDone) {\n return (\n <Host class={{agreed: this.agreed}}>\n <verdocs-view endpoint={this.endpoint} envelopeId={this.envelopeId} onSdkError={e => this.sdkError?.emit(e.detail)} />\n\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message={`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`}\n onNext={(e: any) => {\n e.preventDefault();\n e.stopPropagation();\n this.showDone = false;\n this.isDone = true;\n }}\n />\n )}\n\n {this.submitting && (\n <div class=\"loading-indicator\">\n <verdocs-loader />\n </div>\n )}\n </Host>\n );\n }\n\n if (!this.agreed) {\n return (\n <Host class=\"agreed\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"agree\">\n <verdocs-checkbox name=\"agree\" label=\"By checking this box, you:\" onInput={() => this.handleClickAgree()} />\n <ul>\n <li>\n Agree to use electronic records and signatures, and confirm you have read the{' '}\n <a href=\"https://verdocs.com/en/electronic-record-signature-disclosure/\" target=\"_blank\">\n Electronic Record and Signatures Disclosure\n </a>\n .\n </li>\n <li>\n Agree to Verdocs'{' '}\n <a href=\"https://verdocs.com/en/eula\" target=\"_blank\">\n End User License Agreement\n </a>{' '}\n and confirm you have read Verdocs'{' '}\n <a href=\"https://verdocs.com/en/privacy-policy/\" target=\"_blank\">\n Privacy Policy\n </a>\n .\n </li>\n </ul>\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.authStep === 'passcode') {\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n <verdocs-kba-dialog\n mode=\"text\"\n step={1}\n steps={1}\n placeholder=\"Enter your passcode...\"\n helptitle=\"Document is protected by a Passcode\"\n helptext=\"Please enter your Passcode to proceed. If you do not have one, please contact the sender.\"\n label=\"Passcode\"\n onNext={e => this.handleAuthenticateSigner({auth_method: 'passcode', code: e.detail as string})}\n />\n </div>\n </div>\n </Host>\n );\n }\n\n if (this.authStep === 'kba' && !this.authMethodStates.kba) {\n return (\n <Host class=\"kba\">\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n <img\n src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n alt=\"Placeholder page\"\n />\n </div>\n\n <div class=\"cover\">\n <div class=\"kba\">\n <verdocs-kba-dialog\n mode=\"identity\"\n helptitle=\"Document requires identity verification\"\n helptext=\"Please complete your contact details to proceed.\"\n recipient={this.recipient}\n onNext={async e => {\n const recipDetails = e.detail as IRecipient;\n this.handleAuthenticateSigner({\n auth_method: 'kba',\n first_name: recipDetails.first_name,\n last_name: recipDetails.last_name,\n address: recipDetails.address,\n city: recipDetails.city,\n state: recipDetails.state,\n zip: recipDetails.zip,\n dob: recipDetails.dob,\n });\n }}\n />\n </div>\n </div>\n </Host>\n );\n }\n\n // if (this.kbaStep === 'challenge') {\n // const questionNumber = this.kbaChoices.length;\n // const kbaQuestion = this.kbaQuestions[questionNumber];\n // return (\n // <Host class=\"kba\">\n // <div id=\"verdocs-sign-header\">\n // <div class=\"inner\">\n // <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n // <div class=\"title\">{this.envelope.name}</div>\n // </div>\n // </div>\n //\n // <div class=\"document\" style={{paddingTop: '15px'}}>\n // <img\n // src=\"https://public-assets.verdocs.com/loading-placeholder.png\"\n // style={{width: '612px', height: '792px', boxShadow: '0 0 10px 5px #0000000f', marginTop: '15px'}}\n // alt=\"Placeholder page\"\n // />\n // </div>\n //\n // <div class=\"cover\">\n // <div class=\"kba\">\n // {this.kbaChoices.length >= this.kbaQuestions.length ? (\n // <verdocs-spinner />\n // ) : (\n // <verdocs-kba-dialog\n // mode=\"choice\"\n // helptitle=\"Your identity requires additional verification\"\n // helptext={kbaQuestion?.prompt || 'Please select one of the options below.'}\n // choices={kbaQuestion?.answer || ['Skip Question']}\n // step={questionNumber + 1}\n // steps={this.kbaQuestions.length}\n // onNext={async (e: any) => {\n // const answer = e.detail as string;\n // this.kbaChoices = [...this.kbaChoices, answer];\n // if (this.kbaChoices.length >= this.kbaQuestions.length) {\n // const responses = this.kbaQuestions.map((q, i) => ({type: q.type, answer: this.kbaChoices[i]}));\n // console.log('Submitting KBA responses', this.kbaChoices, responses);\n // try {\n // const response = await submitKbaChallengeResponse(this.endpoint, this.envelopeId, this.roleId, responses);\n // console.log('KBA challenge response', response);\n // this.kbaStep = response.kba_step;\n // if (this.kbaStep === 'failed') {\n // this.fatalErrorHeader = 'Identity Verification Failed';\n // this.fatalErrorMessage = 'We were unable to verify your identity. The sender has been notified.';\n // this.isDone = true;\n // } else {\n // this.kbaQuestions = (response as any).questions?.question || [];\n // this.kbaChoices = [];\n // }\n // } catch (e) {\n // console.log('Error submitting KBA challenge', e);\n // this.kbaStep = '';\n // this.fatalErrorHeader = 'Unable to Verify Identity';\n // this.fatalErrorMessage = e.response?.data?.error || 'Please try again later.';\n // this.isDone = true;\n // }\n // }\n // }}\n // />\n // )}\n // </div>\n // </div>\n // </Host>\n // );\n // }\n\n return (\n <Host>\n <div id=\"verdocs-sign-header\">\n <div class=\"inner\">\n <img src=\"https://verdocs.com/assets/white-logo.svg\" alt=\"Verdocs Logo\" class=\"logo\" />\n <div class=\"title\">{this.envelope.name}</div>\n <div style={{flex: '1'}} />\n\n {!this.finishLater && <verdocs-button size=\"xsmall\" label={this.nextButtonLabel} disabled={!this.agreed} onClick={() => this.handleNext()} />}\n\n <div style={{marginLeft: '10px'}} />\n <verdocs-dropdown options={!this.isDone && !this.finishLater ? inProgressMenuOptions : doneMenuOptions} onOptionSelected={e => this.handleOptionSelected(e)} />\n </div>\n </div>\n\n <div class=\"document\" style={{paddingTop: '15px'}}>\n {(this.envelope.documents || []).map(envelopeDocument => {\n const pageNumbers = integerSequence(1, envelopeDocument.pages);\n\n return (\n <Fragment>\n {pageNumbers.map(pageNumber => {\n const pageSize = envelopeDocument.page_sizes?.[pageNumber] || {width: 612, height: 792};\n\n // In signing mode we show the original template page with all the recipient fields so we can show source formatting and\n // where everything went. This is also a visual indicator when optional fields weren't filled in by previous actors, or\n // future signers still need to act. Once we're \"done\" we flip to showing the envelope's documents which have the final\n // field vales (so far) stamped into them.\n // TODO: Confirm that a pure page-number match is good enough to find the matching template page. We need to make sure\n // we either don't reset our page numbers for additional attachments, or add match-on identifiers to work around that.\n // console.log('tp', templatePage, page);\n return (\n <verdocs-envelope-document-page\n envelopeId={this.envelopeId}\n documentId={envelopeDocument.id}\n endpoint={this.endpoint}\n virtualWidth={pageSize.width}\n virtualHeight={pageSize.height}\n pageNumber={pageNumber}\n onPageRendered={e => this.handlePageRendered(e)}\n type=\"filled\"\n layers={[\n {name: 'page', type: 'canvas'},\n {name: 'controls', type: 'div'},\n ]}\n />\n );\n })}\n </Fragment>\n );\n })}\n </div>\n\n {this.showFinishLater && (\n <verdocs-ok-dialog\n heading=\"You've saved your document to finish later.\"\n message={`To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`}\n onNext={() => (this.showFinishLater = false)}\n />\n )}\n\n {this.showDone && (\n <verdocs-ok-dialog\n heading=\"You're Done!\"\n message={`You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`}\n onNext={() => {\n this.showDone = false;\n this.isDone = true;\n }}\n />\n )}\n\n {this.submitting ||\n (this.showSpinner && (\n <verdocs-portal>\n <div class=\"spinner-overlay\">\n <verdocs-spinner />\n </div>\n </verdocs-portal>\n ))}\n </Host>\n );\n }\n}\n"],"mappings":"igFAAA,IAAMA,EAAiB,sgIACvB,IAAAC,EAAeD,ECaf,IAAME,EAAwB,CAC5B,CAACC,GAAI,QAASC,MAAO,gBAErB,CAACD,GAAI,UAAWC,MAAO,mBACvB,CAACD,GAAI,QAASC,MAAO,yBACrB,CAACD,GAAI,WAAYC,MAAO,aAG1B,IAAMC,EAAkB,CACtB,CAACF,GAAI,QAASC,MAAO,SACrB,CAACD,GAAI,WAAYC,MAAO,a,IAyBbE,EAAWC,EAAA,0BALxB,SAAAC,EAAAC,G,6IASyBC,KAAAC,SAA4BC,EAK5BF,KAAAG,WAA4B,KAK5BH,KAAAI,OAAwB,KAKxBJ,KAAAK,WAA4B,KAW3CL,KAAAM,eAAgC,KAoB/BN,KAAAO,UAA+B,KAC/BP,KAAAQ,aAAe,MACfR,KAAAS,gBAAkB,QAClBT,KAAAU,YAAc,MACdV,KAAAW,iBAAmB,GACnBX,KAAAY,kBAAoB,GACpBZ,KAAAa,aAAe,GACfb,KAAAc,WAAa,MACbd,KAAAe,UAAY,MACZf,KAAAgB,OAAS,MACThB,KAAAiB,SAAW,MACXjB,KAAAkB,cAAgB,MAChBlB,KAAAmB,YAAc,MACdnB,KAAAoB,gBAAkB,MAClBpB,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K,OAAAN,EAAKO,qBAAqBD,EAA1B,MAInIoH,EAAA,OAAKO,MAAM,WAAW5B,MAAO,CAACkC,WAAY,UACtCrN,KAAK8B,SAASwB,WAAa,IAAI+G,KAAI,SAAA8E,GACnC,IAAMC,EAAcC,EAAgB,EAAGF,EAAiBG,OAExD,OACE9C,EAAC+C,EAAQ,KACNH,EAAY/E,KAAI,SAAAkB,G,MACf,IAAMiE,IAAWlN,EAAA6M,EAAiBM,cAAU,MAAAnN,SAAA,SAAAA,EAAGiJ,KAAe,CAAC+B,MAAO,IAAKC,OAAQ,KASnF,OACEf,EAAA,kCACErM,WAAY2E,EAAK3E,WACjBuP,WAAYP,EAAiB1P,GAC7BQ,SAAU6E,EAAK7E,SACf0P,aAAcH,EAASlC,MACvBsC,cAAeJ,EAASjC,OACxBhC,WAAYA,EACZsE,eAAgB,SAAAzK,GAAK,OAAAN,EAAK+G,mBAAmBzG,EAAxB,EACrBW,KAAK,SACL+J,OAAQ,CACN,CAACvJ,KAAM,OAAQR,KAAM,UACrB,CAACQ,KAAM,WAAYR,KAAM,S,SAUxC/F,KAAKoB,iBACJoL,EAAA,qBACEE,QAAQ,8CACRzI,QAAS,mBAAArB,OAAmB5C,KAAKsB,wBAAuB,qGACxDsL,OAAQ,kBAAO9H,EAAK1D,gBAAkB,KAA9B,IAIXpB,KAAKiB,UACJuL,EAAA,qBACEE,QAAQ,eACRzI,QAAS,sBAAArB,OAAsB5C,KAAKsB,wBAAuB,gNAC3DsL,OAAQ,WACN9H,EAAK7D,SAAW,MAChB6D,EAAK9D,OAAS,I,IAKnBhB,KAAKc,YACHd,KAAK2B,aACJ6K,EAAA,sBACEA,EAAA,OAAKO,MAAM,mBACTP,EAAA,0B,WA38BQ,I","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import{r as e,c as t,h as n,F as o,H as s}from"./p-ddadabfb.js";import{VerdocsEndpoint as i,formatFullName as r,getActiveEntitlements as c,isValidEmail as a,randomString as l}from"@verdocs/js-sdk";import{B as u}from"./p-0aad02d5.js";import{h as f}from"./p-0c45b79c.js";import"./p-85aa8e05.js";import"./p-c7ee88c7.js";import"./p-12bab948.js";function d(e,t){return function n(){return e.apply(t,arguments)}}const{toString:h}=Object.prototype;const{getPrototypeOf:p}=Object;const m=(e=>t=>{const n=h.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null));const b=e=>{e=e.toLowerCase();return t=>m(t)===e};const g=e=>t=>typeof t===e;const{isArray:w}=Array;const y=g("undefined");function v(e){return e!==null&&!y(e)&&e.constructor!==null&&!y(e.constructor)&&O(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const x=b("ArrayBuffer");function k(e){let t;if(typeof ArrayBuffer!=="undefined"&&ArrayBuffer.isView){t=ArrayBuffer.isView(e)}else{t=e&&e.buffer&&x(e.buffer)}return t}const R=g("string");const O=g("function");const S=g("number");const E=e=>e!==null&&typeof e==="object";const T=e=>e===true||e===false;const A=e=>{if(m(e)!=="object"){return false}const t=p(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)};const C=b("Date");const j=b("File");const N=b("Blob");const F=b("FileList");const P=e=>E(e)&&O(e.pipe);const U=e=>{let t;return e&&(typeof FormData==="function"&&e instanceof FormData||O(e.append)&&((t=m(e))==="formdata"||t==="object"&&O(e.toString)&&e.toString()==="[object FormData]"))};const B=b("URLSearchParams");const[z,I,_,D]=["ReadableStream","Request","Response","Headers"].map(b);const L=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function q(e,t,{allOwnKeys:n=false}={}){if(e===null||typeof e==="undefined"){return}let o;let s;if(typeof e!=="object"){e=[e]}if(w(e)){for(o=0,s=e.length;o<s;o++){t.call(null,e[o],o,e)}}else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e);const i=s.length;let r;for(o=0;o<i;o++){r=s[o];t.call(null,e[r],r,e)}}}function M(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length;let s;while(o-- >0){s=n[o];if(t===s.toLowerCase()){return s}}return null}const H=(()=>{if(typeof globalThis!=="undefined")return globalThis;return typeof self!=="undefined"?self:typeof window!=="undefined"?window:global})();const $=e=>!y(e)&&e!==H;function K(){const{caseless:e}=$(this)&&this||{};const t={};const n=(n,o)=>{const s=e&&M(t,o)||o;if(A(t[s])&&A(n)){t[s]=K(t[s],n)}else if(A(n)){t[s]=K({},n)}else if(w(n)){t[s]=n.slice()}else{t[s]=n}};for(let e=0,t=arguments.length;e<t;e++){arguments[e]&&q(arguments[e],n)}return t}const J=(e,t,n,{allOwnKeys:o}={})=>{q(t,((t,o)=>{if(n&&O(t)){e[o]=d(t,n)}else{e[o]=t}}),{allOwnKeys:o});return e};const V=e=>{if(e.charCodeAt(0)===65279){e=e.slice(1)}return e};const W=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o);e.prototype.constructor=e;Object.defineProperty(e,"super",{value:t.prototype});n&&Object.assign(e.prototype,n)};const X=(e,t,n,o)=>{let s;let i;let r;const c={};t=t||{};if(e==null)return t;do{s=Object.getOwnPropertyNames(e);i=s.length;while(i-- >0){r=s[i];if((!o||o(r,e,t))&&!c[r]){t[r]=e[r];c[r]=true}}e=n!==false&&p(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t};const G=(e,t,n)=>{e=String(e);if(n===undefined||n>e.length){n=e.length}n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n};const Z=e=>{if(!e)return null;if(w(e))return e;let t=e.length;if(!S(t))return null;const n=new Array(t);while(t-- >0){n[t]=e[t]}return n};const Q=(e=>t=>e&&t instanceof e)(typeof Uint8Array!=="undefined"&&p(Uint8Array));const Y=(e,t)=>{const n=e&&e[Symbol.iterator];const o=n.call(e);let s;while((s=o.next())&&!s.done){const n=s.value;t.call(e,n[0],n[1])}};const ee=(e,t)=>{let n;const o=[];while((n=e.exec(t))!==null){o.push(n)}return o};const te=b("HTMLFormElement");const ne=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function e(t,n,o){return n.toUpperCase()+o}));const oe=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype);const se=b("RegExp");const ie=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e);const o={};q(n,((n,s)=>{let i;if((i=t(n,s,e))!==false){o[s]=i||n}}));Object.defineProperties(e,o)};const re=e=>{ie(e,((t,n)=>{if(O(e)&&["arguments","caller","callee"].indexOf(n)!==-1){return false}const o=e[n];if(!O(o))return;t.enumerable=false;if("writable"in t){t.writable=false;return}if(!t.set){t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}}}))};const ce=(e,t)=>{const n={};const o=e=>{e.forEach((e=>{n[e]=true}))};w(e)?o(e):o(String(e).split(t));return n};const ae=()=>{};const le=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ue(e){return!!(e&&O(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const fe=e=>{const t=new Array(10);const n=(e,o)=>{if(E(e)){if(t.indexOf(e)>=0){return}if(!("toJSON"in e)){t[o]=e;const s=w(e)?[]:{};q(e,((e,t)=>{const i=n(e,o+1);!y(i)&&(s[t]=i)}));t[o]=undefined;return s}}return e};return n(e,0)};const de=b("AsyncFunction");const he=e=>e&&(E(e)||O(e))&&O(e.then)&&O(e.catch);const pe=((e,t)=>{if(e){return setImmediate}return t?((e,t)=>{H.addEventListener("message",(({source:n,data:o})=>{if(n===H&&o===e){t.length&&t.shift()()}}),false);return n=>{t.push(n);H.postMessage(e,"*")}})(`axios@${Math.random()}`,[]):e=>setTimeout(e)})(typeof setImmediate==="function",O(H.postMessage));const me=typeof queueMicrotask!=="undefined"?queueMicrotask.bind(H):typeof process!=="undefined"&&process.nextTick||pe;const be={isArray:w,isArrayBuffer:x,isBuffer:v,isFormData:U,isArrayBufferView:k,isString:R,isNumber:S,isBoolean:T,isObject:E,isPlainObject:A,isReadableStream:z,isRequest:I,isResponse:_,isHeaders:D,isUndefined:y,isDate:C,isFile:j,isBlob:N,isRegExp:se,isFunction:O,isStream:P,isURLSearchParams:B,isTypedArray:Q,isFileList:F,forEach:q,merge:K,extend:J,trim:L,stripBOM:V,inherits:W,toFlatObject:X,kindOf:m,kindOfTest:b,endsWith:G,toArray:Z,forEachEntry:Y,matchAll:ee,isHTMLForm:te,hasOwnProperty:oe,hasOwnProp:oe,reduceDescriptors:ie,freezeMethods:re,toObjectSet:ce,toCamelCase:ne,noop:ae,toFiniteNumber:le,findKey:M,global:H,isContextDefined:$,isSpecCompliantForm:ue,toJSONObject:fe,isAsyncFn:de,isThenable:he,setImmediate:pe,asap:me};function ge(e,t,n,o,s){Error.call(this);if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}else{this.stack=(new Error).stack}this.message=e;this.name="AxiosError";t&&(this.code=t);n&&(this.config=n);o&&(this.request=o);if(s){this.response=s;this.status=s.status?s.status:null}}be.inherits(ge,Error,{toJSON:function e(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:be.toJSONObject(this.config),code:this.code,status:this.status}}});const we=ge.prototype;const ye={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ye[e]={value:e}}));Object.defineProperties(ge,ye);Object.defineProperty(we,"isAxiosError",{value:true});ge.from=(e,t,n,o,s,i)=>{const r=Object.create(we);be.toFlatObject(e,r,(function e(t){return t!==Error.prototype}),(e=>e!=="isAxiosError"));ge.call(r,e.message,t,n,o,s);r.cause=e;r.name=e.name;i&&Object.assign(r,i);return r};const ve=null;function xe(e){return be.isPlainObject(e)||be.isArray(e)}function ke(e){return be.endsWith(e,"[]")?e.slice(0,-2):e}function Re(e,t,n){if(!e)return t;return e.concat(t).map((function e(t,o){t=ke(t);return!n&&o?"["+t+"]":t})).join(n?".":"")}function Oe(e){return be.isArray(e)&&!e.some(xe)}const Se=be.toFlatObject(be,{},null,(function e(t){return/^is[A-Z]/.test(t)}));function Ee(e,t,n){if(!be.isObject(e)){throw new TypeError("target must be an object")}t=t||new FormData;n=be.toFlatObject(n,{metaTokens:true,dots:false,indexes:false},false,(function e(t,n){return!be.isUndefined(n[t])}));const o=n.metaTokens;const s=n.visitor||u;const i=n.dots;const r=n.indexes;const c=n.Blob||typeof Blob!=="undefined"&&Blob;const a=c&&be.isSpecCompliantForm(t);if(!be.isFunction(s)){throw new TypeError("visitor must be a function")}function l(e){if(e===null)return"";if(be.isDate(e)){return e.toISOString()}if(!a&&be.isBlob(e)){throw new ge("Blob is not supported. Use a Buffer instead.")}if(be.isArrayBuffer(e)||be.isTypedArray(e)){return a&&typeof Blob==="function"?new Blob([e]):Buffer.from(e)}return e}function u(e,n,s){let c=e;if(e&&!s&&typeof e==="object"){if(be.endsWith(n,"{}")){n=o?n:n.slice(0,-2);e=JSON.stringify(e)}else if(be.isArray(e)&&Oe(e)||(be.isFileList(e)||be.endsWith(n,"[]"))&&(c=be.toArray(e))){n=ke(n);c.forEach((function e(o,s){!(be.isUndefined(o)||o===null)&&t.append(r===true?Re([n],s,i):r===null?n:n+"[]",l(o))}));return false}}if(xe(e)){return true}t.append(Re(s,n,i),l(e));return false}const f=[];const d=Object.assign(Se,{defaultVisitor:u,convertValue:l,isVisitable:xe});function h(e,n){if(be.isUndefined(e))return;if(f.indexOf(e)!==-1){throw Error("Circular reference detected in "+n.join("."))}f.push(e);be.forEach(e,(function e(o,i){const r=!(be.isUndefined(o)||o===null)&&s.call(t,o,be.isString(i)?i.trim():i,n,d);if(r===true){h(o,n?n.concat(i):[i])}}));f.pop()}if(!be.isObject(e)){throw new TypeError("data must be an object")}h(e);return t}function Te(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function e(n){return t[n]}))}function Ae(e,t){this._pairs=[];e&&Ee(e,this,t)}const Ce=Ae.prototype;Ce.append=function e(t,n){this._pairs.push([t,n])};Ce.toString=function e(t){const n=t?function(e){return t.call(this,e,Te)}:Te;return this._pairs.map((function e(t){return n(t[0])+"="+n(t[1])}),"").join("&")};function je(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ne(e,t,n){if(!t){return e}const o=n&&n.encode||je;if(be.isFunction(n)){n={serialize:n}}const s=n&&n.serialize;let i;if(s){i=s(t,n)}else{i=be.isURLSearchParams(t)?t.toString():new Ae(t,n).toString(o)}if(i){const t=e.indexOf("#");if(t!==-1){e=e.slice(0,t)}e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Fe{constructor(){this.handlers=[]}use(e,t,n){this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:false,runWhen:n?n.runWhen:null});return this.handlers.length-1}eject(e){if(this.handlers[e]){this.handlers[e]=null}}clear(){if(this.handlers){this.handlers=[]}}forEach(e){be.forEach(this.handlers,(function t(n){if(n!==null){e(n)}}))}}const Pe=Fe;const Ue={silentJSONParsing:true,forcedJSONParsing:true,clarifyTimeoutError:false};const Be=typeof URLSearchParams!=="undefined"?URLSearchParams:Ae;const ze=typeof FormData!=="undefined"?FormData:null;const Ie=typeof Blob!=="undefined"?Blob:null;const _e={isBrowser:true,classes:{URLSearchParams:Be,FormData:ze,Blob:Ie},protocols:["http","https","file","blob","url","data"]};const De=typeof window!=="undefined"&&typeof document!=="undefined";const Le=typeof navigator==="object"&&navigator||undefined;const qe=De&&(!Le||["ReactNative","NativeScript","NS"].indexOf(Le.product)<0);const Me=(()=>typeof WorkerGlobalScope!=="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function")();const He=De&&window.location.href||"http://localhost";const $e=Object.freeze({__proto__:null,hasBrowserEnv:De,hasStandardBrowserWebWorkerEnv:Me,hasStandardBrowserEnv:qe,navigator:Le,origin:He});const Ke={...$e,..._e};function Je(e,t){return Ee(e,new Ke.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,o){if(Ke.isNode&&be.isBuffer(e)){this.append(t,e.toString("base64"));return false}return o.defaultVisitor.apply(this,arguments)}},t))}function Ve(e){return be.matchAll(/\w+|\[(\w*)]/g,e).map((e=>e[0]==="[]"?"":e[1]||e[0]))}function We(e){const t={};const n=Object.keys(e);let o;const s=n.length;let i;for(o=0;o<s;o++){i=n[o];t[i]=e[i]}return t}function Xe(e){function t(e,n,o,s){let i=e[s++];if(i==="__proto__")return true;const r=Number.isFinite(+i);const c=s>=e.length;i=!i&&be.isArray(o)?o.length:i;if(c){if(be.hasOwnProp(o,i)){o[i]=[o[i],n]}else{o[i]=n}return!r}if(!o[i]||!be.isObject(o[i])){o[i]=[]}const a=t(e,n,o[i],s);if(a&&be.isArray(o[i])){o[i]=We(o[i])}return!r}if(be.isFormData(e)&&be.isFunction(e.entries)){const n={};be.forEachEntry(e,((e,o)=>{t(Ve(e),o,n,0)}));return n}return null}function Ge(e,t,n){if(be.isString(e)){try{(t||JSON.parse)(e);return be.trim(e)}catch(e){if(e.name!=="SyntaxError"){throw e}}}return(n||JSON.stringify)(e)}const Ze={transitional:Ue,adapter:["xhr","http","fetch"],transformRequest:[function e(t,n){const o=n.getContentType()||"";const s=o.indexOf("application/json")>-1;const i=be.isObject(t);if(i&&be.isHTMLForm(t)){t=new FormData(t)}const r=be.isFormData(t);if(r){return s?JSON.stringify(Xe(t)):t}if(be.isArrayBuffer(t)||be.isBuffer(t)||be.isStream(t)||be.isFile(t)||be.isBlob(t)||be.isReadableStream(t)){return t}if(be.isArrayBufferView(t)){return t.buffer}if(be.isURLSearchParams(t)){n.setContentType("application/x-www-form-urlencoded;charset=utf-8",false);return t.toString()}let c;if(i){if(o.indexOf("application/x-www-form-urlencoded")>-1){return Je(t,this.formSerializer).toString()}if((c=be.isFileList(t))||o.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Ee(c?{"files[]":t}:t,e&&new e,this.formSerializer)}}if(i||s){n.setContentType("application/json",false);return Ge(t)}return t}],transformResponse:[function e(t){const n=this.transitional||Ze.transitional;const o=n&&n.forcedJSONParsing;const s=this.responseType==="json";if(be.isResponse(t)||be.isReadableStream(t)){return t}if(t&&be.isString(t)&&(o&&!this.responseType||s)){const e=n&&n.silentJSONParsing;const o=!e&&s;try{return JSON.parse(t)}catch(e){if(o){if(e.name==="SyntaxError"){throw ge.from(e,ge.ERR_BAD_RESPONSE,this,null,this.response)}throw e}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ke.classes.FormData,Blob:Ke.classes.Blob},validateStatus:function e(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":undefined}}};be.forEach(["delete","get","head","post","put","patch"],(e=>{Ze.headers[e]={}}));const Qe=Ze;const Ye=be.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const et=e=>{const t={};let n;let o;let s;e&&e.split("\n").forEach((function e(i){s=i.indexOf(":");n=i.substring(0,s).trim().toLowerCase();o=i.substring(s+1).trim();if(!n||t[n]&&Ye[n]){return}if(n==="set-cookie"){if(t[n]){t[n].push(o)}else{t[n]=[o]}}else{t[n]=t[n]?t[n]+", "+o:o}}));return t};const tt=Symbol("internals");function nt(e){return e&&String(e).trim().toLowerCase()}function ot(e){if(e===false||e==null){return e}return be.isArray(e)?e.map(ot):String(e)}function st(e){const t=Object.create(null);const n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;while(o=n.exec(e)){t[o[1]]=o[2]}return t}const it=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function rt(e,t,n,o,s){if(be.isFunction(o)){return o.call(this,t,n)}if(s){t=n}if(!be.isString(t))return;if(be.isString(o)){return t.indexOf(o)!==-1}if(be.isRegExp(o)){return o.test(t)}}function ct(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}function at(e,t){const n=be.toCamelCase(" "+t);["get","set","has"].forEach((o=>{Object.defineProperty(e,o+n,{value:function(e,n,s){return this[o].call(this,t,e,n,s)},configurable:true})}))}class lt{constructor(e){e&&this.set(e)}set(e,t,n){const o=this;function s(e,t,n){const s=nt(t);if(!s){throw new Error("header name must be a non-empty string")}const i=be.findKey(o,s);if(!i||o[i]===undefined||n===true||n===undefined&&o[i]!==false){o[i||t]=ot(e)}}const i=(e,t)=>be.forEach(e,((e,n)=>s(e,n,t)));if(be.isPlainObject(e)||e instanceof this.constructor){i(e,t)}else if(be.isString(e)&&(e=e.trim())&&!it(e)){i(et(e),t)}else if(be.isHeaders(e)){for(const[t,o]of e.entries()){s(o,t,n)}}else{e!=null&&s(t,e,n)}return this}get(e,t){e=nt(e);if(e){const n=be.findKey(this,e);if(n){const e=this[n];if(!t){return e}if(t===true){return st(e)}if(be.isFunction(t)){return t.call(this,e,n)}if(be.isRegExp(t)){return t.exec(e)}throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){e=nt(e);if(e){const n=be.findKey(this,e);return!!(n&&this[n]!==undefined&&(!t||rt(this,this[n],n,t)))}return false}delete(e,t){const n=this;let o=false;function s(e){e=nt(e);if(e){const s=be.findKey(n,e);if(s&&(!t||rt(n,n[s],s,t))){delete n[s];o=true}}}if(be.isArray(e)){e.forEach(s)}else{s(e)}return o}clear(e){const t=Object.keys(this);let n=t.length;let o=false;while(n--){const s=t[n];if(!e||rt(this,this[s],s,e,true)){delete this[s];o=true}}return o}normalize(e){const t=this;const n={};be.forEach(this,((o,s)=>{const i=be.findKey(n,s);if(i){t[i]=ot(o);delete t[s];return}const r=e?ct(s):String(s).trim();if(r!==s){delete t[s]}t[r]=ot(o);n[r]=true}));return this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);be.forEach(this,((n,o)=>{n!=null&&n!==false&&(t[o]=e&&be.isArray(n)?n.join(", "):n)}));return t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);t.forEach((e=>n.set(e)));return n}static accessor(e){const t=this[tt]=this[tt]={accessors:{}};const n=t.accessors;const o=this.prototype;function s(e){const t=nt(e);if(!n[t]){at(o,e);n[t]=true}}be.isArray(e)?e.forEach(s):s(e);return this}}lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);be.reduceDescriptors(lt.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}));be.freezeMethods(lt);const ut=lt;function ft(e,t){const n=this||Qe;const o=t||n;const s=ut.from(o.headers);let i=o.data;be.forEach(e,(function e(o){i=o.call(n,i,s.normalize(),t?t.status:undefined)}));s.normalize();return i}function dt(e){return!!(e&&e.__CANCEL__)}function ht(e,t,n){ge.call(this,e==null?"canceled":e,ge.ERR_CANCELED,t,n);this.name="CanceledError"}be.inherits(ht,ge,{__CANCEL__:true});function pt(e,t,n){const o=n.config.validateStatus;if(!n.status||!o||o(n.status)){e(n)}else{t(new ge("Request failed with status code "+n.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}}function mt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function bt(e,t){e=e||10;const n=new Array(e);const o=new Array(e);let s=0;let i=0;let r;t=t!==undefined?t:1e3;return function c(a){const l=Date.now();const u=o[i];if(!r){r=l}n[s]=a;o[s]=l;let f=i;let d=0;while(f!==s){d+=n[f++];f=f%e}s=(s+1)%e;if(s===i){i=(i+1)%e}if(l-r<t){return}const h=u&&l-u;return h?Math.round(d*1e3/h):undefined}}function gt(e,t){let n=0;let o=1e3/t;let s;let i;const r=(t,o=Date.now())=>{n=o;s=null;if(i){clearTimeout(i);i=null}e.apply(null,t)};const c=(...e)=>{const t=Date.now();const c=t-n;if(c>=o){r(e,t)}else{s=e;if(!i){i=setTimeout((()=>{i=null;r(s)}),o-c)}}};const a=()=>s&&r(s);return[c,a]}const wt=(e,t,n=3)=>{let o=0;const s=bt(50,250);return gt((n=>{const i=n.loaded;const r=n.lengthComputable?n.total:undefined;const c=i-o;const a=s(c);const l=i<=r;o=i;const u={loaded:i,total:r,progress:r?i/r:undefined,bytes:c,rate:a?a:undefined,estimated:a&&r&&l?(r-i)/a:undefined,event:n,lengthComputable:r!=null,[t?"download":"upload"]:true};e(u)}),n)};const yt=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]};const vt=e=>(...t)=>be.asap((()=>e(...t)));const xt=Ke.hasStandardBrowserEnv?((e,t)=>n=>{n=new URL(n,Ke.origin);return e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)})(new URL(Ke.origin),Ke.navigator&&/(msie|trident)/i.test(Ke.navigator.userAgent)):()=>true;const kt=Ke.hasStandardBrowserEnv?{write(e,t,n,o,s,i){const r=[e+"="+encodeURIComponent(t)];be.isNumber(n)&&r.push("expires="+new Date(n).toGMTString());be.isString(o)&&r.push("path="+o);be.isString(s)&&r.push("domain="+s);i===true&&r.push("secure");document.cookie=r.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Rt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Ot(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function St(e,t,n){let o=!Rt(t);if(e&&o||n==false){return Ot(e,t)}return t}const Et=e=>e instanceof ut?{...e}:e;function Tt(e,t){t=t||{};const n={};function o(e,t,n,o){if(be.isPlainObject(e)&&be.isPlainObject(t)){return be.merge.call({caseless:o},e,t)}else if(be.isPlainObject(t)){return be.merge({},t)}else if(be.isArray(t)){return t.slice()}return t}function s(e,t,n,s){if(!be.isUndefined(t)){return o(e,t,n,s)}else if(!be.isUndefined(e)){return o(undefined,e,n,s)}}function i(e,t){if(!be.isUndefined(t)){return o(undefined,t)}}function r(e,t){if(!be.isUndefined(t)){return o(undefined,t)}else if(!be.isUndefined(e)){return o(undefined,e)}}function c(n,s,i){if(i in t){return o(n,s)}else if(i in e){return o(undefined,n)}}const a={url:i,method:i,data:i,baseURL:r,transformRequest:r,transformResponse:r,paramsSerializer:r,timeout:r,timeoutMessage:r,withCredentials:r,withXSRFToken:r,adapter:r,responseType:r,xsrfCookieName:r,xsrfHeaderName:r,onUploadProgress:r,onDownloadProgress:r,decompress:r,maxContentLength:r,maxBodyLength:r,beforeRedirect:r,transport:r,httpAgent:r,httpsAgent:r,cancelToken:r,socketPath:r,responseEncoding:r,validateStatus:c,headers:(e,t,n)=>s(Et(e),Et(t),n,true)};be.forEach(Object.keys(Object.assign({},e,t)),(function o(i){const r=a[i]||s;const l=r(e[i],t[i],i);be.isUndefined(l)&&r!==c||(n[i]=l)}));return n}const At=e=>{const t=Tt({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:r,auth:c}=t;t.headers=r=ut.from(r);t.url=Ne(St(t.baseURL,t.url),e.params,e.paramsSerializer);if(c){r.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")))}let a;if(be.isFormData(n)){if(Ke.hasStandardBrowserEnv||Ke.hasStandardBrowserWebWorkerEnv){r.setContentType(undefined)}else if((a=r.getContentType())!==false){const[e,...t]=a?a.split(";").map((e=>e.trim())).filter(Boolean):[];r.setContentType([e||"multipart/form-data",...t].join("; "))}}if(Ke.hasStandardBrowserEnv){o&&be.isFunction(o)&&(o=o(t));if(o||o!==false&&xt(t.url)){const e=s&&i&&kt.read(i);if(e){r.set(s,e)}}}return t};const Ct=typeof XMLHttpRequest!=="undefined";const jt=Ct&&function(e){return new Promise((function t(n,o){const s=At(e);let i=s.data;const r=ut.from(s.headers).normalize();let{responseType:c,onUploadProgress:a,onDownloadProgress:l}=s;let u;let f,d;let h,p;function m(){h&&h();p&&p();s.cancelToken&&s.cancelToken.unsubscribe(u);s.signal&&s.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,true);b.timeout=s.timeout;function g(){if(!b){return}const t=ut.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders());const s=!c||c==="text"||c==="json"?b.responseText:b.response;const i={data:s,status:b.status,statusText:b.statusText,headers:t,config:e,request:b};pt((function e(t){n(t);m()}),(function e(t){o(t);m()}),i);b=null}if("onloadend"in b){b.onloadend=g}else{b.onreadystatechange=function e(){if(!b||b.readyState!==4){return}if(b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)){return}setTimeout(g)}}b.onabort=function t(){if(!b){return}o(new ge("Request aborted",ge.ECONNABORTED,e,b));b=null};b.onerror=function t(){o(new ge("Network Error",ge.ERR_NETWORK,e,b));b=null};b.ontimeout=function t(){let n=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const i=s.transitional||Ue;if(s.timeoutErrorMessage){n=s.timeoutErrorMessage}o(new ge(n,i.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,e,b));b=null};i===undefined&&r.setContentType(null);if("setRequestHeader"in b){be.forEach(r.toJSON(),(function e(t,n){b.setRequestHeader(n,t)}))}if(!be.isUndefined(s.withCredentials)){b.withCredentials=!!s.withCredentials}if(c&&c!=="json"){b.responseType=s.responseType}if(l){[d,p]=wt(l,true);b.addEventListener("progress",d)}if(a&&b.upload){[f,h]=wt(a);b.upload.addEventListener("progress",f);b.upload.addEventListener("loadend",h)}if(s.cancelToken||s.signal){u=t=>{if(!b){return}o(!t||t.type?new ht(null,e,b):t);b.abort();b=null};s.cancelToken&&s.cancelToken.subscribe(u);if(s.signal){s.signal.aborted?u():s.signal.addEventListener("abort",u)}}const w=mt(s.url);if(w&&Ke.protocols.indexOf(w)===-1){o(new ge("Unsupported protocol "+w+":",ge.ERR_BAD_REQUEST,e));return}b.send(i||null)}))};const Nt=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController;let o;const s=function(e){if(!o){o=true;r();const t=e instanceof Error?e:this.reason;n.abort(t instanceof ge?t:new ht(t instanceof Error?t.message:t))}};let i=t&&setTimeout((()=>{i=null;s(new ge(`timeout ${t} of ms exceeded`,ge.ETIMEDOUT))}),t);const r=()=>{if(e){i&&clearTimeout(i);i=null;e.forEach((e=>{e.unsubscribe?e.unsubscribe(s):e.removeEventListener("abort",s)}));e=null}};e.forEach((e=>e.addEventListener("abort",s)));const{signal:c}=n;c.unsubscribe=()=>be.asap(r);return c}};const Ft=Nt;const Pt=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let o=0;let s;while(o<n){s=o+t;yield e.slice(o,s);o=s}};const Ut=async function*(e,t){for await(const n of Bt(e)){yield*Pt(n,t)}};const Bt=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e){break}yield n}}finally{await t.cancel()}};const zt=(e,t,n,o)=>{const s=Ut(e,t);let i=0;let r;let c=e=>{if(!r){r=true;o&&o(e)}};return new ReadableStream({async pull(e){try{const{done:t,value:o}=await s.next();if(t){c();e.close();return}let r=o.byteLength;if(n){let e=i+=r;n(e)}e.enqueue(new Uint8Array(o))}catch(e){c(e);throw e}},cancel(e){c(e);return s.return()}},{highWaterMark:2})};const It=typeof fetch==="function"&&typeof Request==="function"&&typeof Response==="function";const _t=It&&typeof ReadableStream==="function";const Dt=It&&(typeof TextEncoder==="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer()));const Lt=(e,...t)=>{try{return!!e(...t)}catch(e){return false}};const qt=_t&&Lt((()=>{let e=false;const t=new Request(Ke.origin,{body:new ReadableStream,method:"POST",get duplex(){e=true;return"half"}}).headers.has("Content-Type");return e&&!t}));const Mt=64*1024;const Ht=_t&&Lt((()=>be.isReadableStream(new Response("").body)));const $t={stream:Ht&&(e=>e.body)};It&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach((t=>{!$t[t]&&($t[t]=be.isFunction(e[t])?e=>e[t]():(e,n)=>{throw new ge(`Response type '${t}' is not supported`,ge.ERR_NOT_SUPPORT,n)})}))})(new Response);const Kt=async e=>{if(e==null){return 0}if(be.isBlob(e)){return e.size}if(be.isSpecCompliantForm(e)){const t=new Request(Ke.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}if(be.isArrayBufferView(e)||be.isArrayBuffer(e)){return e.byteLength}if(be.isURLSearchParams(e)){e=e+""}if(be.isString(e)){return(await Dt(e)).byteLength}};const Jt=async(e,t)=>{const n=be.toFiniteNumber(e.getContentLength());return n==null?Kt(t):n};const Vt=It&&(async e=>{let{url:t,method:n,data:o,signal:s,cancelToken:i,timeout:r,onDownloadProgress:c,onUploadProgress:a,responseType:l,headers:u,withCredentials:f="same-origin",fetchOptions:d}=At(e);l=l?(l+"").toLowerCase():"text";let h=Ft([s,i&&i.toAbortSignal()],r);let p;const m=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let b;try{if(a&&qt&&n!=="get"&&n!=="head"&&(b=await Jt(u,o))!==0){let e=new Request(t,{method:"POST",body:o,duplex:"half"});let n;if(be.isFormData(o)&&(n=e.headers.get("content-type"))){u.setContentType(n)}if(e.body){const[t,n]=yt(b,wt(vt(a)));o=zt(e.body,Mt,t,n)}}if(!be.isString(f)){f=f?"include":"omit"}const s="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:o,duplex:"half",credentials:s?f:undefined});let i=await fetch(p);const r=Ht&&(l==="stream"||l==="response");if(Ht&&(c||r&&m)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=i[t]}));const t=be.toFiniteNumber(i.headers.get("content-length"));const[n,o]=c&&yt(t,wt(vt(c),true))||[];i=new Response(zt(i.body,Mt,n,(()=>{o&&o();m&&m()})),e)}l=l||"text";let g=await $t[be.findKey($t,l)||"text"](i,e);!r&&m&&m();return await new Promise(((t,n)=>{pt(t,n,{data:g,headers:ut.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})}))}catch(t){m&&m();if(t&&t.name==="TypeError"&&/fetch/i.test(t.message)){throw Object.assign(new ge("Network Error",ge.ERR_NETWORK,e,p),{cause:t.cause||t})}throw ge.from(t,t&&t.code,e,p)}});const Wt={http:ve,xhr:jt,fetch:Vt};be.forEach(Wt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const Xt=e=>`- ${e}`;const Gt=e=>be.isFunction(e)||e===null||e===false;const Zt={getAdapter:e=>{e=be.isArray(e)?e:[e];const{length:t}=e;let n;let o;const s={};for(let i=0;i<t;i++){n=e[i];let t;o=n;if(!Gt(n)){o=Wt[(t=String(n)).toLowerCase()];if(o===undefined){throw new ge(`Unknown adapter '${t}'`)}}if(o){break}s[t||"#"+i]=o}if(!o){const e=Object.entries(s).map((([e,t])=>`adapter ${e} `+(t===false?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(Xt).join("\n"):" "+Xt(e[0]):"as no adapter specified";throw new ge(`There is no suitable adapter to dispatch the request `+n,"ERR_NOT_SUPPORT")}return o},adapters:Wt};function Qt(e){if(e.cancelToken){e.cancelToken.throwIfRequested()}if(e.signal&&e.signal.aborted){throw new ht(null,e)}}function Yt(e){Qt(e);e.headers=ut.from(e.headers);e.data=ft.call(e,e.transformRequest);if(["post","put","patch"].indexOf(e.method)!==-1){e.headers.setContentType("application/x-www-form-urlencoded",false)}const t=Zt.getAdapter(e.adapter||Qe.adapter);return t(e).then((function t(n){Qt(e);n.data=ft.call(e,e.transformResponse,n);n.headers=ut.from(n.headers);return n}),(function t(n){if(!dt(n)){Qt(e);if(n&&n.response){n.response.data=ft.call(e,e.transformResponse,n.response);n.response.headers=ut.from(n.response.headers)}}return Promise.reject(n)}))}const en="1.8.1";const tn={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{tn[e]=function n(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}}));const nn={};tn.transitional=function e(t,n,o){function s(e,t){return"[Axios v"+en+"] Transitional option '"+e+"'"+t+(o?". "+o:"")}return(e,o,i)=>{if(t===false){throw new ge(s(o," has been removed"+(n?" in "+n:"")),ge.ERR_DEPRECATED)}if(n&&!nn[o]){nn[o]=true;console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))}return t?t(e,o,i):true}};tn.spelling=function e(t){return(e,n)=>{console.warn(`${n} is likely a misspelling of ${t}`);return true}};function on(e,t,n){if(typeof e!=="object"){throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE)}const o=Object.keys(e);let s=o.length;while(s-- >0){const i=o[s];const r=t[i];if(r){const t=e[i];const n=t===undefined||r(t,i,e);if(n!==true){throw new ge("option "+i+" must be "+n,ge.ERR_BAD_OPTION_VALUE)}continue}if(n!==true){throw new ge("Unknown option "+i,ge.ERR_BAD_OPTION)}}}const sn={assertOptions:on,validators:tn};const rn=sn.validators;class cn{constructor(e){this.defaults=e;this.interceptors={request:new Pe,response:new Pe}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{if(!e.stack){e.stack=n}else if(n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))){e.stack+="\n"+n}}catch(e){}}throw e}}_request(e,t){if(typeof e==="string"){t=t||{};t.url=e}else{t=e||{}}t=Tt(this.defaults,t);const{transitional:n,paramsSerializer:o,headers:s}=t;if(n!==undefined){sn.assertOptions(n,{silentJSONParsing:rn.transitional(rn.boolean),forcedJSONParsing:rn.transitional(rn.boolean),clarifyTimeoutError:rn.transitional(rn.boolean)},false)}if(o!=null){if(be.isFunction(o)){t.paramsSerializer={serialize:o}}else{sn.assertOptions(o,{encode:rn.function,serialize:rn.function},true)}}if(t.allowAbsoluteUrls!==undefined);else if(this.defaults.allowAbsoluteUrls!==undefined){t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls}else{t.allowAbsoluteUrls=true}sn.assertOptions(t,{baseUrl:rn.spelling("baseURL"),withXsrfToken:rn.spelling("withXSRFToken")},true);t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=s&&be.merge(s.common,s[t.method]);s&&be.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete s[e]}));t.headers=ut.concat(i,s);const r=[];let c=true;this.interceptors.request.forEach((function e(n){if(typeof n.runWhen==="function"&&n.runWhen(t)===false){return}c=c&&n.synchronous;r.unshift(n.fulfilled,n.rejected)}));const a=[];this.interceptors.response.forEach((function e(t){a.push(t.fulfilled,t.rejected)}));let l;let u=0;let f;if(!c){const e=[Yt.bind(this),undefined];e.unshift.apply(e,r);e.push.apply(e,a);f=e.length;l=Promise.resolve(t);while(u<f){l=l.then(e[u++],e[u++])}return l}f=r.length;let d=t;u=0;while(u<f){const e=r[u++];const t=r[u++];try{d=e(d)}catch(e){t.call(this,e);break}}try{l=Yt.call(this,d)}catch(e){return Promise.reject(e)}u=0;f=a.length;while(u<f){l=l.then(a[u++],a[u++])}return l}getUri(e){e=Tt(this.defaults,e);const t=St(e.baseURL,e.url,e.allowAbsoluteUrls);return Ne(t,e.params,e.paramsSerializer)}}be.forEach(["delete","get","head","options"],(function e(t){cn.prototype[t]=function(e,n){return this.request(Tt(n||{},{method:t,url:e,data:(n||{}).data}))}}));be.forEach(["post","put","patch"],(function e(t){function n(e){return function n(o,s,i){return this.request(Tt(i||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:o,data:s}))}}cn.prototype[t]=n();cn.prototype[t+"Form"]=n(true)}));const an=cn;class ln{constructor(e){if(typeof e!=="function"){throw new TypeError("executor must be a function.")}let t;this.promise=new Promise((function e(n){t=n}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;while(t-- >0){n._listeners[t](e)}n._listeners=null}));this.promise.then=e=>{let t;const o=new Promise((e=>{n.subscribe(e);t=e})).then(e);o.cancel=function e(){n.unsubscribe(t)};return o};e((function e(o,s,i){if(n.reason){return}n.reason=new ht(o,s,i);t(n.reason)}))}throwIfRequested(){if(this.reason){throw this.reason}}subscribe(e){if(this.reason){e(this.reason);return}if(this._listeners){this._listeners.push(e)}else{this._listeners=[e]}}unsubscribe(e){if(!this._listeners){return}const t=this._listeners.indexOf(e);if(t!==-1){this._listeners.splice(t,1)}}toAbortSignal(){const e=new AbortController;const t=t=>{e.abort(t)};this.subscribe(t);e.signal.unsubscribe=()=>this.unsubscribe(t);return e.signal}static source(){let e;const t=new ln((function t(n){e=n}));return{token:t,cancel:e}}}const un=ln;function fn(e){return function t(n){return e.apply(null,n)}}function dn(e){return be.isObject(e)&&e.isAxiosError===true}const hn={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(hn).forEach((([e,t])=>{hn[t]=e}));const pn=hn;function mn(e){const t=new an(e);const n=d(an.prototype.request,t);be.extend(n,an.prototype,t,{allOwnKeys:true});be.extend(n,t,null,{allOwnKeys:true});n.create=function t(n){return mn(Tt(e,n))};return n}const bn=mn(Qe);bn.Axios=an;bn.CanceledError=ht;bn.CancelToken=un;bn.isCancel=dt;bn.VERSION=en;bn.toFormData=Ee;bn.AxiosError=ge;bn.Cancel=bn.CanceledError;bn.all=function e(t){return Promise.all(t)};bn.spread=fn;bn.isAxiosError=dn;bn.mergeConfig=Tt;bn.AxiosHeaders=ut;bn.formToJSON=e=>Xe(be.isHTMLForm(e)?new FormData(e):e);bn.getAdapter=Zt.getAdapter;bn.HttpStatusCode=pn;bn.default=bn;const gn=bn;const wn=u.includes(window.location.origin)?"default:development.6348f953f52485d19daf03992f2123a36e9eae59c5ca7f8736dc2b67":"default:production.4808a77b2a149e1796391b480b4fb501d73aa1e11123f60e07809ced";const yn=()=>gn.get("https://unleash.verdocs.com/api/frontend",{headers:{Accept:"application/json",Authorization:wn}}).then((e=>e.data)).catch((e=>{console.log("Unleash: Unable to fetch feature flags",e);throw e}));const vn='@-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-contact-picker{display:block;border:1px solid #ebebeb;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form{gap:12px;width:300px;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#f5f5fa}verdocs-contact-picker form .row{gap:8px;display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-contact-picker form .names-row{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .names-row>input{font-size:14px;width:88px}verdocs-contact-picker form .pin-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .pin-code>input{-ms-flex:0 0 197px;flex:0 0 197px;font-size:14px}verdocs-contact-picker form .address{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .address>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form .zip-code{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .zip-code>input{-ms-flex:1;flex:1;font-size:14px}verdocs-contact-picker form label{display:-ms-flexbox;display:flex;-ms-flex:0 0 80px;flex:0 0 80px;font-size:13px;font-weight:500;color:#5c6575}verdocs-contact-picker form .row.message textarea{width:100%;padding:5px 7px;border-radius:4px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-contact-picker form input{-ms-flex:1;flex:1;padding:6px;font-size:14px;border-radius:3px;border:1px solid rgba(112, 122, 229, 0.3725490196)}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:6px;-moz-column-gap:6px;column-gap:6px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}#verdocs-contact-picker-suggestions .dropdown{max-height:225px;overflow-y:scroll;background:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}#verdocs-contact-picker-suggestions .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-contact-picker-suggestions .dropdown .suggestion svg{width:32px;height:32px}#verdocs-contact-picker-suggestions .dropdown .suggestion .avatar{width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px;margin-right:8px;border-radius:100%}#verdocs-contact-picker-suggestions .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#verdocs-contact-picker-suggestions .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}#verdocs-contact-picker-suggestions .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}#verdocs-contact-picker-suggestions .dropdown .suggestion:hover{background:#eee;cursor:pointer}';const xn=vn;const kn=`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-book-user"><path d="M15 13a3 3 0 1 0-6 0"/><path d="M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20"/><circle cx="12" cy="8" r="2"/></svg>`;const Rn=class{constructor(n){e(this,n);this.searchContacts=t(this,"searchContacts",7);this.exit=t(this,"exit",7);this.next=t(this,"next",7);this.endpoint=i.getDefault();this.templateRole=null;this.contactSuggestions=[];this.showSuggestions=false;this.showMessage=false;this.delegator=false;this.auth_methods=[];this.passcode="";this.firstNameFieldId=`verdocs-contact-picker-firstname-${Math.random().toString(36).substring(2,11)}`;this.lastNameFieldId=`verdocs-contact-picker-lastname-${Math.random().toString(36).substring(2,11)}`;this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`;this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`;this.featureFlags=null;this.activeEntitlements={}}componentWillLoad(){this.endpoint.loadSession();if(this.templateRole){const e=r(this.templateRole);const t=e.split(" ");const n=this.templateRole.first_name||t.shift()||"";const o=this.templateRole.last_name||t.join(" ")||"";this.first_name=n;this.last_name=o;this.email=this.templateRole.email||"";this.phone=this.templateRole.phone||"";this.delegator=this.templateRole.delegator||false;this.message=this.templateRole.message||"";this.showMessage=this.message!=="";this.auth_methods=this.templateRole.auth_methods||[];this.passcode=this.templateRole.passcode||""}c(this.endpoint).then((e=>{this.activeEntitlements=e;console.log("[CONTACT PICKER] Loaded entitlements",e)})).catch((e=>console.log("[CONTACT PICKER] Error loading entitlements, some features may be disabled.",e)));yn().then((e=>{this.featureFlags=e;console.log("[CONTACT PICKER] Loaded feature flags",e)})).catch((e=>{console.log("[CONTACT PICKER] Unable to fetch feature flags, some features may be disabled.",e)}))}handleFirstNameChange(e){var t;this.first_name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.first_name})}handleLastNameChange(e){var t;this.last_name=e.target.value;(t=this.searchContacts)===null||t===void 0?void 0:t.emit({query:this.last_name})}handleCancel(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.exit)===null||t===void 0?void 0:t.emit()}handleSubmit(e){var t;e.stopPropagation();this.showSuggestions=false;(t=this.next)===null||t===void 0?void 0:t.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator,auth_methods:this.auth_methods,passcode:this.passcode,address:this.address,zip:this.zip})}handleSelectSuggestion(e,t){e.stopPropagation();this.first_name=t.first_name;this.last_name=t.last_name;this.email=t.email;this.phone=t.phone;this.showSuggestions=false}render(){var e,t,s,i,c,l,u,d,h,p,m,b,g,w,y,v,x,k;const R=this.first_name&&this.last_name&&a(this.email);const O=!this.auth_methods.length||this.auth_methods.includes("passcode")&&!!this.passcode||this.auth_methods.includes("kba")&&!!this.first_name&&!!this.last_name||this.auth_methods.includes("email")&&!!this.email||this.auth_methods.includes("sms")&&!!this.phone;const S=R&&O;const E=((s=(t=(e=this.featureFlags)===null||e===void 0?void 0:e.toggles)===null||t===void 0?void 0:t.find((e=>e.name==="sms")))===null||s===void 0?void 0:s.enabled)===true;const T=[];if(((l=(c=(i=this.featureFlags)===null||i===void 0?void 0:i.toggles)===null||c===void 0?void 0:c.find((e=>e.name==="passcode-verification")))===null||l===void 0?void 0:l.enabled)===true){T.push({label:"Passcode",value:"passcode"})}if(((h=(d=(u=this.featureFlags)===null||u===void 0?void 0:u.toggles)===null||d===void 0?void 0:d.find((e=>e.name==="email-verification")))===null||h===void 0?void 0:h.enabled)===true){T.push({label:"Email",value:"email"})}if(E&&((b=(m=(p=this.featureFlags)===null||p===void 0?void 0:p.toggles)===null||m===void 0?void 0:m.find((e=>e.name==="sms-verification")))===null||b===void 0?void 0:b.enabled)===true&&!!this.activeEntitlements.sms_auth){T.push({label:"SMS (One-Time Code)",value:"sms"})}if(((y=(w=(g=this.featureFlags)===null||g===void 0?void 0:g.toggles)===null||w===void 0?void 0:w.find((e=>e.name==="kba-verification")))===null||y===void 0?void 0:y.enabled)===true&&!!this.activeEntitlements.kba_auth){T.push({label:"Knowledge-Based (KBA)",value:"kba"})}if(((k=(x=(v=this.featureFlags)===null||v===void 0?void 0:v.toggles)===null||x===void 0?void 0:x.find((e=>e.name==="id-verification")))===null||k===void 0?void 0:k.enabled)===true&&!!this.activeEntitlements.id_auth){T.push({label:"ID Check",value:"id"})}return n("form",{key:"cba230aed78c493105a007d965938ef36c0676c5",onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},n("div",{key:"436c7454a56df0f535f3aefdfff577a88dafa22c",class:"row"},n("label",{key:"b281d4c25f7b940d50700f808cdc9e7c3e235c63",htmlFor:this.firstNameFieldId},"Name:"),n("div",{key:"ef6316233086a5b6f7d5230e64134d3d4d370401",class:"names-row"},n("input",{key:"bb1114f98ee766c4da332c635e9aabfddb0ea0c5",id:this.firstNameFieldId,name:this.firstNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.first_name,placeholder:"First...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleFirstNameChange(e)}),n("input",{key:"8165b6a10ccec8cc699965a0e457c4984ba7e6d9",id:this.lastNameFieldId,name:this.lastNameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.last_name,placeholder:"Last...",onFocus:()=>{setTimeout((()=>{var e;this.showSuggestions=((e=this.contactSuggestions)===null||e===void 0?void 0:e.length)>0}),100)},onInput:e=>this.handleLastNameChange(e)})),this.showSuggestions&&n("verdocs-portal",{key:"50bb3ba19b9ebedaf5dc6b42ab9ee56b49baf316",anchor:this.firstNameFieldId,onClickAway:()=>this.showSuggestions=false,id:"verdocs-contact-picker-suggestions"},n("div",{key:"06d909db8340e219f56520cba088f39d024e23c9",class:"dropdown"},this.contactSuggestions.filter((e=>!this.first_name||e.first_name.toLowerCase().includes(this.first_name.toLowerCase()))).map((e=>{var t;return n("div",{key:(t=e.id)!==null&&t!==void 0?t:e.email,class:"suggestion",onClick:t=>this.handleSelectSuggestion(t,e)},e.picture?n("img",{alt:"Avatar",class:"avatar",src:e.picture}):n("div",{class:"avatar",innerHTML:kn}),n("div",{class:"details"},n("div",{class:"name"},r(e)),e.email&&n("div",{class:"destination"},e.email),e.phone&&n("div",{class:"destination"},e.phone)))}))))),n("div",{key:"0fd66b40717c81b65a301ced6b6bf4b6ff7b6626",class:"row"},n("label",{key:"70956784b72087d8c1868595ec40dfbdee34ca87",htmlFor:this.emailFieldId},"Email:"),n("input",{key:"35582c90e48b6f532fc75cc51525ca06162ebcc8",id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked","aria-autocomplete":"none",value:this.email,placeholder:"Invite/verify via email...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.email=e.target.value})),E&&n("div",{key:"626950e0213dbc8fab07af0ac7682db19638c73c",class:"row"},n("label",{key:"12cfdd054564af5cc3573785d884c87b7b50bae4",htmlFor:this.phoneFieldId},"Phone:"),n("input",{key:"8ecb757d6ee8acf6041c75f4fc0621ece470fcdf",id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked","aria-autocomplete":"none",value:this.phone,placeholder:"Invite/verify via SMS...",onFocus:()=>this.showSuggestions=false,onInput:e=>{this.phone=f(e.target.value)}})),n(o,{key:"2023b0c925497df85590f0294597c38bde90b1da"},T.length>0&&n("div",{key:"eb16a51636c12027f228714283bc3a045b04f364",class:"row"},n("label",{key:"c53d976fa49aa4ff32d6e176aed1a425a19befca"},"Recipient Verification:"),n("verdocs-multiselect",{key:"6b84fd7b99c4b4f9e21242d444ead7238d3b12ec",label:"",placeholder:"None",options:T,selectedOptions:this.auth_methods,onSelectionChanged:e=>{this.auth_methods=e.detail.selectedOptions}})),this.auth_methods.includes("passcode")&&n("div",{key:"6e5059ea257eef3f44090348d5b264a0d4fca331",class:"row pin-code"},n("label",{key:"3c38728d9833d750e097c96b1df655d2c624cbaf",htmlFor:this.phoneFieldId},"Passcode:"),n("input",{key:"c067ad0b5e64554869d382b30034ad06f3f2287c",id:"verdocs-passcode",name:"verdocs-passcode",type:"text","data-lpignore":"true",autocomplete:"blocked","aria-autocomplete":"none",value:this.passcode,placeholder:"4-8 digits recommended...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.passcode=e.target.value}))),n("div",{key:"aea4f4504c415602990370c74b8cbc4888cdb9c4",class:"row message"},n("label",{key:"293b04061121e45a161299a7c67742b35450f73e",htmlFor:"verdocs-contact-picker-message"},"Message:"),n("textarea",{key:"27b597556563377a843865cfa1205d28c5a35440",id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message","data-lpignore":"true",autocomplete:"blocked",placeholder:"Optional message to include in invitation...",onFocus:()=>this.showSuggestions=false,onInput:e=>this.message=e.target.value},this.message)),n("div",{key:"cd57ffae6c1fdb990b5cee5d2f93315b1e431ae2",class:"buttons"},n("div",{key:"229c636cd7d61eaeece868f1d64a787465913223",class:"flex-fill"}),n("verdocs-button",{key:"0014bda0bcef66e26df9cfad2e4ca09bad08419a",variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),n("verdocs-button",{key:"cc2456cc0e493b0449750e3950e28c6c3aa69fa2",label:"OK",size:"small",disabled:!S,onClick:!S?()=>{}:e=>this.handleSubmit(e)})))}};Rn.style=xn;const On='@-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-multiselect{width:100%;display:block;margin:0 0 10px 0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-multiselect .input-wrapper{width:100%;position:relative}verdocs-multiselect .input-wrapper .icon{top:6px;right:6px;width:18px;height:18px;z-index:10;position:absolute}verdocs-multiselect.open .input-wrapper .icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}verdocs-multiselect .trigger{gap:3px;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%;border-radius:4px;-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;padding:5px 32px 5px 7px;background:#ffffff;border:1px solid #707ae5}verdocs-multiselect .trigger::-webkit-input-placeholder{opacity:1;color:#aaaaaa}verdocs-multiselect .trigger::-moz-placeholder{opacity:1;color:#aaaaaa}verdocs-multiselect .trigger:-ms-input-placeholder{opacity:1;color:#aaaaaa}verdocs-multiselect .trigger::-ms-input-placeholder{opacity:1;color:#aaaaaa}verdocs-multiselect .trigger::placeholder{opacity:1;color:#aaaaaa}verdocs-multiselect .selected-option{color:white;font-size:12px;padding:2px 6px;border-radius:3px;display:inline-block;background:#46497d}verdocs-multiselect .input-label{display:block;font-weight:700;font-size:14px;margin:0 0 4px 0;color:#555570}#verdocs-multiselect-menu-items{width:200px;z-index:10000;position:absolute;border-radius:5px;font-family:"Inter", "Barlow", sans-serif;background:#ffffff;border:1px solid #654dcb}#verdocs-multiselect-menu-items .option{display:-ms-flexbox;display:flex;gap:4px;padding:5px 8px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-multiselect-menu-items label{font-size:13px}';const Sn=On;const En=`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="size-6"><path stroke-linecap="round" stroke-linejoin="round" d="m19.5 8.25-7.5 7.5-7.5-7.5" /></svg>`;const Tn=class{constructor(n){e(this,n);this.selectionChanged=t(this,"selectionChanged",7);this.label="";this.placeholder="Select...";this.selectedOptions=[];this.showPicker=false}handleToggleOption(e,t){var n;if(e.target.checked){this.selectedOptions=[...this.selectedOptions,t.value]}else{this.selectedOptions=this.selectedOptions.filter((e=>e!==t.value))}(n=this.selectionChanged)===null||n===void 0?void 0:n.emit({selectedOptions:this.selectedOptions})}render(){const e=`verdocs-dropdown-${l(8)}`;return n(s,{key:"7fa4d31d423894e8caa3dffd1fb46752b7b87ee5",class:this.showPicker?"open":"closed"},n("label",{key:"891a7d7ee2867d598f2f3ea6609148a47a9a7166"},this.label?n("div",{class:"input-label"},this.label+":"):n("div",null),n("div",{key:"c165f68315aec9d1aca6e9f2214ece090f496363",class:"input-wrapper"},n("button",{key:"2297bfb9c84abd5da4c73dfcbae15fe2f5f04c1c",id:e,class:"trigger",value:"",onClick:()=>this.showPicker=true},this.selectedOptions.length===0?n("span",{class:"placeholder"},this.placeholder):this.selectedOptions.map((e=>{var t;return n("span",{class:"selected-option"},((t=this.options.find((t=>t.value===e)))===null||t===void 0?void 0:t.label)||"Unknown")}))),n("div",{key:"e4929befc449d9be400305ee3e0aeb1c171583fd",class:"icon",innerHTML:En}),this.showPicker&&n("verdocs-portal",{key:"42016ae18aa4acd4c5aac8f2ea3a7d6126116aa6",anchor:e,voffset:2,onClickAway:()=>this.showPicker=false,id:"verdocs-multiselect-menu-items"},this.options.map(((e,t)=>n("div",{class:"option",onClick:()=>this.showPicker=false},n("verdocs-checkbox",{size:"small",id:`verdocs-multi-select-opt-${t}`,value:e.value,checked:this.selectedOptions.includes(e.value),onInput:t=>this.handleToggleOption(t,e)}),n("label",{htmlFor:`verdocs-multi-select-option-${t}`},e.label))))))))}};Tn.style=Sn;export{Rn as verdocs_contact_picker,Tn as verdocs_multiselect};
2
+ //# sourceMappingURL=p-dcf0049c.entry.js.map