@hubsync/esign-web-sdk 6.5.2 → 6.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index-CQ5bTnED.js +6 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.cjs.js.map +1 -0
- package/dist/cjs/{verdocs-adopt-signature-dialog_9.cjs.entry.js → verdocs-adopt-signature-dialog_8.cjs.entry.js} +97 -52
- package/dist/cjs/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.cjs.js.map +1 -0
- package/dist/cjs/{verdocs-envelope-document-page_3.cjs.entry.js → verdocs-download-dialog_4.cjs.entry.js} +30 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.css +62 -33
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +98 -22
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js.map +1 -1
- package/dist/components/{p-CFZQhAqt.js → p-4olD14NA.js} +113 -43
- package/dist/components/p-4olD14NA.js.map +1 -0
- package/dist/components/verdocs-sign.js +1 -1
- package/dist/components/verdocs-view.js +1 -1
- package/dist/esm/index-BIRwgFLv.js +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +1 -0
- package/dist/esm/{verdocs-adopt-signature-dialog_9.entry.js → verdocs-adopt-signature-dialog_8.entry.js} +98 -52
- package/dist/esm/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js.map +1 -0
- package/dist/esm/{verdocs-envelope-document-page_3.entry.js → verdocs-download-dialog_4.entry.js} +30 -2
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/index-BIRwgFLv.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js +2 -0
- package/dist/esm-es5/verdocs-adopt-signature-dialog_8.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js +2 -0
- package/dist/esm-es5/verdocs-download-dialog_4.entry.js.map +1 -0
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +6 -0
- package/dist/verdocs-web-sdk/p-1b63fe0b.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-1b63fe0b.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-9d130fa2.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-9d130fa2.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-B8zpaHu-.system.js +1 -1
- package/dist/verdocs-web-sdk/p-DHIUuwfR.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-DixucIng.system.js.map +1 -0
- package/dist/verdocs-web-sdk/p-f24d6c61.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-f24d6c61.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/p-ffc07aab.system.entry.js +2 -0
- package/dist/verdocs-web-sdk/p-ffc07aab.system.entry.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.esm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-download-dialog.verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.esm.js.map +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-download-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.cjs.js.map +0 -1
- package/dist/cjs/verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.cjs.js.map +0 -1
- package/dist/components/p-CFZQhAqt.js.map +0 -1
- package/dist/esm/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-download-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +0 -1
- package/dist/esm/verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-download-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-adopt-signature-dialog_9.entry.js +0 -2
- package/dist/esm-es5/verdocs-adopt-signature-dialog_9.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.js.map +0 -1
- package/dist/esm-es5/verdocs-envelope-document-page_3.entry.js +0 -2
- package/dist/esm-es5/verdocs-envelope-document-page_3.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-1083d8e2.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-1083d8e2.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-2622d80c.system.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-2622d80c.system.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-51a509ef.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-51a509ef.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/p-BACQ3t2g.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-DHfIae9S.system.js.map +0 -1
- package/dist/verdocs-web-sdk/p-c284aac4.entry.js +0 -2
- package/dist/verdocs-web-sdk/p-c284aac4.entry.js.map +0 -1
- package/dist/verdocs-web-sdk/verdocs-adopt-signature-dialog.verdocs-delegate-dialog.verdocs-disclosure-dialog.verdocs-download-dialog.verdocs-kba-dialog.verdocs-otp-dialog.verdocs-passcode-dialog.verdocs-signing-progress.verdocs-view.entry.esm.js.map +0 -1
- package/dist/verdocs-web-sdk/verdocs-envelope-document-page.verdocs-question-dialog.verdocs-sign-footer.entry.esm.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var __extends=this&&this.__extends||function(){var e=function(t,i){e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]};return e(t,i)};return function(t,i){if(typeof i!=="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");e(t,i);function n(){this.constructor=t}t.prototype=i===null?Object.create(i):(n.prototype=i.prototype,new n)}}();var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var s in t)if(Object.prototype.hasOwnProperty.call(t,s))e[s]=t[s]}return e};return __assign.apply(this,arguments)};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{u(n.next(e))}catch(e){r(e)}}function a(e){try{u(n["throw"](e))}catch(e){r(e)}}function u(e){e.done?i(e.value):s(e.value).then(o,a)}u((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=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return o.next=a(0),o["throw"]=a(1),o["return"]=a(2),typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return u([e,t])}}function u(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}}};var __rest=this&&this.__rest||function(e,t){var i={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0)i[n]=e[n];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++){if(t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s]))i[n[s]]=e[n[s]]}return i};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,s=t.length,r;n<s;n++){if(r||!(n in t)){if(!r)r=Array.prototype.slice.call(t,0,n);r[n]=t[n]}}return e.concat(r||Array.prototype.slice.call(t))};import{r as registerInstance,c as createEvent,h,F as Fragment,H as Host,g as getElement}from"./index-BIRwgFLv.js";import{e as SignatureXIcon}from"./Icons-COC8ZzcY.js";import{D as DefaultEndpoint}from"./Environment-C_Xku1v2.js";import{DEFAULT_DISCLOSURES,verifySigner,VerdocsEndpoint,getEnvelope,getEnvelopesZip,getEnvelopeDocumentDownloadLink,cancelEnvelope,userCanCancelEnvelope,integerSequence}from"@verdocs/js-sdk";import{V as VerdocsToast}from"./Toast-CyvDgtoV.js";import{S as SDKError}from"./errors-C1sRVZWv.js";import{S as Store}from"./Datastore-bS8INhRF.js";var verdocsAdoptSignatureDialogCss='@-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-adopt-signature-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-adopt-signature-dialog verdocs-dialog{border-radius:4px}verdocs-adopt-signature-dialog .heading{color:#201f1e;font-weight:400;padding-bottom:0;border-bottom:none}verdocs-adopt-signature-dialog .content{display:-ms-flexbox;display:flex;padding:12px 24px 0;-ms-flex-direction:column;flex-direction:column}verdocs-adopt-signature-dialog verdocs-text-input .input-label{color:#242424;font-size:13px;font-weight:400}verdocs-adopt-signature-dialog verdocs-text-input .input-element{border:1px solid #e0e0e0}verdocs-adopt-signature-dialog verdocs-radio-button{-webkit-transform:scale(0.9);transform:scale(0.9)}verdocs-adopt-signature-dialog .canvas-container{position:relative;width:100%;margin:10px 0;border-radius:4px;background:#fafafa;border:1px solid #d1d1d1;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-adopt-signature-dialog .canvas-container.initials-container{max-width:50%}verdocs-adopt-signature-dialog .canvas-container canvas{width:100%;height:79px;border-radius:4px;background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;position:relative;z-index:2}verdocs-adopt-signature-dialog .canvas-container .signing-indicator{position:absolute;bottom:9px;left:9px;right:9px;height:28px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;gap:2px;z-index:1;pointer-events:none}verdocs-adopt-signature-dialog .canvas-container .signing-indicator .x-icon{width:25px;height:28px;display:-ms-flexbox;display:flex}verdocs-adopt-signature-dialog .canvas-container .signing-indicator .x-icon svg{width:100%;height:100%}verdocs-adopt-signature-dialog .canvas-container .signing-indicator .signing-line{-ms-flex:1;flex:1;border-bottom:1px dashed #d1d1d1;background-position:bottom;background-size:16px 1px;background-repeat:repeat-x;margin-bottom:0;height:1px;border:none;background-image:-webkit-gradient(linear, left top, right top, color-stop(50%, #d1d1d1), color-stop(50%, transparent));background-image:linear-gradient(to right, #d1d1d1 50%, transparent 50%)}verdocs-adopt-signature-dialog .disclaimer{padding:8px 0;font-size:11px;line-height:14px;text-align:justify;color:rgba(0, 0, 0, 0.54)}verdocs-adopt-signature-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:-20px -20px 0 -20px;border-bottom:1px solid #eeeeee}verdocs-adopt-signature-dialog .tabs .tab{-ms-flex:1;flex:1;gap:4px;display:-ms-flexbox;display:flex;cursor:pointer;font-size:12px;font-weight:500;padding:6px 10px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-adopt-signature-dialog .tabs .tab.active{background:#f9f5fe;border-bottom:2px solid #707ae5}verdocs-adopt-signature-dialog .tabs .tab:hover{color:#55bc81}verdocs-adopt-signature-dialog .tabs .tab .icon{width:16px;height:16px}verdocs-adopt-signature-dialog .type{display:none;-ms-flex-direction:column;flex-direction:column}verdocs-adopt-signature-dialog .type.active{display:-ms-flexbox;display:flex}verdocs-adopt-signature-dialog .draw{height:100px;display:none;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-adopt-signature-dialog .draw.active{display:-ms-flexbox;display:flex}verdocs-adopt-signature-dialog .draw .draw-instructions{font-size:13px;color:rgba(0, 0, 0, 0.6);margin-bottom:8px;text-align:center}verdocs-adopt-signature-dialog .draw canvas{cursor:crosshair;-ms-touch-action:none;touch-action:none}verdocs-adopt-signature-dialog .preview-header{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:center;align-items:center;margin-top:10px}verdocs-adopt-signature-dialog .preview-header .clear-button-text{background:none;border:none;color:var(--verdocs-primary-color, #1a73e8);cursor:pointer;font-size:13px;padding:0;font-weight:500}verdocs-adopt-signature-dialog .preview-header .clear-button-text:hover{text-decoration:underline}verdocs-adopt-signature-dialog .preview-header .clear-button-text:disabled{color:#9ca3af;text-decoration:none;cursor:not-allowed}verdocs-adopt-signature-dialog .upload{height:100px;display:none;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-adopt-signature-dialog .upload.active{display:-ms-flexbox;display:flex}verdocs-adopt-signature-dialog .upload .upload-instructions{font-size:13px;color:rgba(0, 0, 0, 0.6);margin-bottom:8px;text-align:center}verdocs-adopt-signature-dialog .upload .upload-actions{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;gap:12px;margin-top:8px}verdocs-adopt-signature-dialog .upload .upload-actions .upload-button{border:1px solid var(--verdocs-primary-color, #1a73e8);background-color:var(--verdocs-primary-color, #1a73e8);color:#ffffff;padding:8px 20px;font-size:13px;cursor:pointer;border-radius:var(--verdocs-button-radius, 4px);-webkit-transition:all 0.2s ease;transition:all 0.2s ease}verdocs-adopt-signature-dialog .upload .upload-actions .upload-button:hover{-webkit-filter:brightness(0.9);filter:brightness(0.9)}verdocs-adopt-signature-dialog .upload .upload-actions .clear-button{border:1px solid #d0d0d0;background-color:#ffffff;color:#333333;padding:8px 16px;font-size:13px;cursor:pointer;border-radius:4px;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}verdocs-adopt-signature-dialog .upload .upload-actions .clear-button:hover:not(:disabled){background-color:#f5f5f5;border-color:#b0b0b0}verdocs-adopt-signature-dialog .upload .upload-actions .clear-button:disabled{opacity:0.5;cursor:not-allowed}verdocs-adopt-signature-dialog .upload .upload-filename{font-size:12px;color:rgba(0, 0, 0, 0.6);text-align:center;margin-top:8px;font-style:italic}verdocs-adopt-signature-dialog{}verdocs-adopt-signature-dialog .buttons{gap:20px;display:-ms-flexbox;display:flex;margin-top:14px;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-adopt-signature-dialog .buttons button{-ms-flex:1;flex:1;border:0;height:38px;display:-ms-flexbox;display:flex;font-size:14px;font-weight:500;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:var(--verdocs-button-radius, 6px);-ms-flex-pack:center;justify-content:center;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}verdocs-adopt-signature-dialog .buttons button.cancel{background-color:transparent;border:1px solid #d1d5db;color:#374151}verdocs-adopt-signature-dialog .buttons button.cancel:hover{background-color:#f9fafb}verdocs-adopt-signature-dialog .buttons button.proceed{background-color:var(--verdocs-primary-color, #1a73e8);border:1px solid transparent;color:#ffffff}verdocs-adopt-signature-dialog .buttons button.proceed:hover{background-color:#1557b0}verdocs-adopt-signature-dialog .buttons button:disabled{background-color:#e5e7eb;color:#9ca3af;cursor:not-allowed}';var VerdocsAdoptSignatureDialog=function(){function e(e){var t=this;registerInstance(this,e);this.next=createEvent(this,"next");this.exit=createEvent(this,"exit");this.name="";this.fontLoaded=false;this.enteredName="";this.enteredInitials="";this.mode="type";this.isDrawing=false;this.hasDrawnSignature=false;this.hasDrawnInitials=false;this.currentSigStroke=[];this.allSigStrokes=[];this.lastSigPoint=null;this.currentInitialsStroke=[];this.allInitialsStrokes=[];this.lastInitialsPoint=null;this.handleSigPointerDown=function(e){e.preventDefault();if(!t.signatureElement||!t.sigDrawingContext){return}t.isDrawing=true;t.hasDrawnSignature=true;var i=t.getSigCanvasCoordinates(e);t.currentSigStroke=[i];t.lastSigPoint=i;t.sigDrawingContext.beginPath();t.sigDrawingContext.moveTo(i.x,i.y);t.signatureElement.setPointerCapture(e.pointerId)};this.handleSigPointerMove=function(e){e.preventDefault();if(!t.isDrawing||!t.sigDrawingContext||!t.lastSigPoint){return}var i=t.getSigCanvasCoordinates(e);t.currentSigStroke.push(i);var n={x:(t.lastSigPoint.x+i.x)/2,y:(t.lastSigPoint.y+i.y)/2};t.sigDrawingContext.quadraticCurveTo(t.lastSigPoint.x,t.lastSigPoint.y,n.x,n.y);t.sigDrawingContext.stroke();t.lastSigPoint=i};this.handleSigPointerUp=function(e){e.preventDefault();if(!t.isDrawing||!t.sigDrawingContext){return}if(t.lastSigPoint&&t.currentSigStroke.length>0){t.sigDrawingContext.lineTo(t.lastSigPoint.x,t.lastSigPoint.y);t.sigDrawingContext.stroke()}if(t.currentSigStroke.length>0){t.allSigStrokes.push(__spreadArray([],t.currentSigStroke,true))}t.isDrawing=false;t.currentSigStroke=[];t.lastSigPoint=null;if(t.signatureElement){t.signatureElement.releasePointerCapture(e.pointerId)}};this.handleSigPointerCancel=function(e){t.isDrawing=false;t.currentSigStroke=[];t.lastSigPoint=null;if(t.signatureElement){t.signatureElement.releasePointerCapture(e.pointerId)}};this.handleInitialsPointerDown=function(e){e.preventDefault();if(!t.initialsElement||!t.initialsDrawingContext){return}t.isDrawing=true;t.hasDrawnInitials=true;var i=t.getInitialsCanvasCoordinates(e);t.currentInitialsStroke=[i];t.lastInitialsPoint=i;t.initialsDrawingContext.beginPath();t.initialsDrawingContext.moveTo(i.x,i.y);t.initialsElement.setPointerCapture(e.pointerId)};this.handleInitialsPointerMove=function(e){e.preventDefault();if(!t.isDrawing||!t.initialsDrawingContext||!t.lastInitialsPoint){return}var i=t.getInitialsCanvasCoordinates(e);t.currentInitialsStroke.push(i);var n={x:(t.lastInitialsPoint.x+i.x)/2,y:(t.lastInitialsPoint.y+i.y)/2};t.initialsDrawingContext.quadraticCurveTo(t.lastInitialsPoint.x,t.lastInitialsPoint.y,n.x,n.y);t.initialsDrawingContext.stroke();t.lastInitialsPoint=i};this.handleInitialsPointerUp=function(e){e.preventDefault();if(!t.isDrawing||!t.initialsDrawingContext){return}if(t.lastInitialsPoint&&t.currentInitialsStroke.length>0){t.initialsDrawingContext.lineTo(t.lastInitialsPoint.x,t.lastInitialsPoint.y);t.initialsDrawingContext.stroke()}if(t.currentInitialsStroke.length>0){t.allInitialsStrokes.push(__spreadArray([],t.currentInitialsStroke,true))}t.isDrawing=false;t.currentInitialsStroke=[];t.lastInitialsPoint=null;if(t.initialsElement){t.initialsElement.releasePointerCapture(e.pointerId)}};this.handleInitialsPointerCancel=function(e){t.isDrawing=false;t.currentInitialsStroke=[];t.lastInitialsPoint=null;if(t.initialsElement){t.initialsElement.releasePointerCapture(e.pointerId)}}}e.prototype.componentWillLoad=function(){var e=this;this.enteredName=this.name;this.computeEnteredInitials(this.name);var t=new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)");t.load().then((function(t){document.fonts.add(t);e.fontLoaded=true}))};e.prototype.componentDidLoad=function(){this.drawSignatureText();this.drawInitialsText();this.setupSignatureCanvas();this.setupInitialsCanvas()};e.prototype.componentDidUpdate=function(){this.drawSignatureText();this.drawInitialsText();this.setupSignatureCanvas();this.setupInitialsCanvas();if(this.mode==="draw"&&this.allSigStrokes.length>0){this.redrawDrawnSignature()}if(this.mode==="draw"&&this.allInitialsStrokes.length>0){this.redrawDrawnInitials()}};e.prototype.drawSignatureText=function(){if(!this.signatureElement||this.mode!=="type"){return}var e=this.signatureElement.width;var t=this.signatureElement.height;var i=this.signatureElement.getContext("2d");i.clearRect(0,0,this.signatureElement.width,this.signatureElement.height);var n=100;var s=i.measureText(this.enteredName);do{n-=2;i.font="".concat(n,"px Dancing Script");s=i.measureText(this.enteredName)}while(s.width>e-24||s.actualBoundingBoxAscent+s.actualBoundingBoxDescent+24>t);i.textAlign="center";i.textBaseline="middle";i.font="".concat(n,"px Dancing Script");i.fillText(this.enteredName,this.signatureElement.width/2,this.signatureElement.height/2)};e.prototype.drawInitialsText=function(){if(!this.initialsElement||this.mode!=="type"){return}var e=this.initialsElement.width;var t=this.initialsElement.height;var i=this.initialsElement.getContext("2d");i.clearRect(0,0,this.initialsElement.width,this.initialsElement.height);var n=100;var s=i.measureText(this.enteredInitials);do{n-=2;i.font="".concat(n,"px Dancing Script");s=i.measureText(this.enteredInitials)}while(s.width>e-24||s.actualBoundingBoxAscent+s.actualBoundingBoxDescent+24>t);i.textAlign="center";i.textBaseline="middle";i.font="".concat(n,"px Dancing Script");i.fillText(this.enteredInitials,this.initialsElement.width/2,this.initialsElement.height/2)};e.prototype.redrawDrawnSignature=function(){if(!this.signatureElement||!this.sigDrawingContext||this.allSigStrokes.length===0){return}this.sigDrawingContext.clearRect(0,0,this.signatureElement.width,this.signatureElement.height);for(var e=0,t=this.allSigStrokes;e<t.length;e++){var i=t[e];if(i.length===0){continue}this.sigDrawingContext.beginPath();this.sigDrawingContext.moveTo(i[0].x,i[0].y);for(var n=1;n<i.length;n++){var s=i[n];var r=i[n-1];var o={x:(r.x+s.x)/2,y:(r.y+s.y)/2};this.sigDrawingContext.quadraticCurveTo(r.x,r.y,o.x,o.y)}if(i.length>1){var a=i[i.length-1];this.sigDrawingContext.lineTo(a.x,a.y)}this.sigDrawingContext.stroke()}};e.prototype.redrawDrawnInitials=function(){if(!this.initialsElement||!this.initialsDrawingContext||this.allInitialsStrokes.length===0){return}this.initialsDrawingContext.clearRect(0,0,this.initialsElement.width,this.initialsElement.height);for(var e=0,t=this.allInitialsStrokes;e<t.length;e++){var i=t[e];if(i.length===0){continue}this.initialsDrawingContext.beginPath();this.initialsDrawingContext.moveTo(i[0].x,i[0].y);for(var n=1;n<i.length;n++){var s=i[n];var r=i[n-1];var o={x:(r.x+s.x)/2,y:(r.y+s.y)/2};this.initialsDrawingContext.quadraticCurveTo(r.x,r.y,o.x,o.y)}if(i.length>1){var a=i[i.length-1];this.initialsDrawingContext.lineTo(a.x,a.y)}this.initialsDrawingContext.stroke()}};e.prototype.handleNameChange=function(e){this.enteredName=e.target.value;this.computeEnteredInitials(e.target.value)};e.prototype.computeEnteredInitials=function(e){var t=e.trim().split(" ").filter((function(e){return e.length>0}));this.enteredInitials=t.length>1?t.map((function(e){return e.charAt(0).toUpperCase()})).join(""):t[0].toUpperCase()};e.prototype.handleCancel=function(e){e.stopPropagation();e.preventDefault();this.exit.emit()};e.prototype.handleAdopt=function(e){e.stopPropagation();e.preventDefault();var t=this.signatureElement.toDataURL("image/png");var i=this.initialsElement.toDataURL("image/png");this.next.emit({signature:t,initials:i})};e.prototype.isAdoptButtonDisabled=function(){switch(this.mode){case"type":return!this.enteredName||this.enteredName.trim().length===0;case"draw":return!this.hasDrawnSignature&&!this.hasDrawnInitials||this.allSigStrokes.length===0||this.allInitialsStrokes.length===0;default:return true}};e.prototype.setupSignatureCanvas=function(){if(!this.signatureElement){return}if(this.mode==="draw"){var e=this.signatureElement.getContext("2d");if(e&&e!==this.sigDrawingContext){this.sigDrawingContext=e;this.sigDrawingContext.strokeStyle="#000000";this.sigDrawingContext.lineWidth=2;this.sigDrawingContext.lineCap="round";this.sigDrawingContext.lineJoin="round";if(this.allSigStrokes.length===0){this.sigDrawingContext.clearRect(0,0,this.signatureElement.width,this.signatureElement.height)}}}if(this.mode!=="draw"&&this.sigDrawingContext){this.sigDrawingContext=null;this.currentSigStroke=[];this.lastSigPoint=null}};e.prototype.setupInitialsCanvas=function(){if(!this.initialsElement){return}if(this.mode==="draw"){var e=this.initialsElement.getContext("2d");if(e&&e!==this.initialsDrawingContext){this.initialsDrawingContext=e;this.initialsDrawingContext.strokeStyle="#000000";this.initialsDrawingContext.lineWidth=2;this.initialsDrawingContext.lineCap="round";this.initialsDrawingContext.lineJoin="round";if(this.allInitialsStrokes.length===0){this.initialsDrawingContext.clearRect(0,0,this.initialsElement.width,this.initialsElement.height)}}}if(this.mode!=="draw"&&this.initialsDrawingContext){this.initialsDrawingContext=null;this.currentInitialsStroke=[];this.lastInitialsPoint=null}};e.prototype.clearSignatureCanvas=function(){if(!this.signatureElement||!this.sigDrawingContext){return}this.sigDrawingContext.clearRect(0,0,this.signatureElement.width,this.signatureElement.height);this.currentSigStroke=[];this.allSigStrokes=[];this.lastSigPoint=null;this.hasDrawnSignature=false};e.prototype.clearInitialsCanvas=function(){if(!this.initialsElement||!this.initialsDrawingContext){return}this.initialsDrawingContext.clearRect(0,0,this.initialsElement.width,this.initialsElement.height);this.currentInitialsStroke=[];this.allInitialsStrokes=[];this.lastInitialsPoint=null;this.hasDrawnInitials=false};e.prototype.handleClearDrawing=function(e,t){if(t===void 0){t="all"}e.stopPropagation();e.preventDefault();if(t==="all"||t==="signature")this.clearSignatureCanvas();if(t==="all"||t==="initials")this.clearInitialsCanvas()};e.prototype.getSigCanvasCoordinates=function(e){if(!this.signatureElement){return{x:0,y:0}}var t=this.signatureElement.getBoundingClientRect();var i=this.signatureElement.width/t.width;var n=this.signatureElement.height/t.height;return{x:(e.clientX-t.left)*i,y:(e.clientY-t.top)*n}};e.prototype.getInitialsCanvasCoordinates=function(e){if(!this.initialsElement){return{x:0,y:0}}var t=this.initialsElement.getBoundingClientRect();var i=this.initialsElement.width/t.width;var n=this.initialsElement.height/t.height;return{x:(e.clientX-t.left)*i,y:(e.clientY-t.top)*n}};e.prototype.render=function(){var e=this;return h("verdocs-dialog",{key:"521df609818a64ad15e29c7d0a0139646e981c07"},h("div",{key:"e60f199bb02ecefb4eb774498190fddbc36127e3",slot:"heading",class:"heading"},"Adopt Your Signature"),h("div",{key:"2e1e27ed625b36ccb9c80ef69dc2c9e443ad673e",slot:"content",class:"content"},h("div",{key:"51de52c36000a31b9b2aea949eee80264427ddf8",style:{fontWeight:"300",color:"#242424",fontSize:"13px"}},"Confirm your name, initials, and signature."),h("div",{key:"2df9477a854e24435b6e081cba65c5720241c8ca",class:{type:true,active:this.mode==="type"}},h("verdocs-text-input",{key:"a44ba76e886dc66642861234d594c0df7b33eac5",label:"Full Name",value:this.enteredName,onInput:function(t){return e.handleNameChange(t)},onClick:function(e){return e.stopPropagation()}})),h("div",{key:"333ff09585e064663691c8b56155c528fdb818ad",style:{fontWeight:"400",color:"#242424",fontSize:"13px"}},"Select a signature style"),h("div",{key:"67d544f79407870a2c1234475e4dc794e6315239",style:{display:"flex",flexDirection:"row",gap:"10px",marginBottom:"6px",alignItems:"center",fontSize:"13px"}},h("verdocs-radio-button",{key:"7f9c7d69e7c7147e2906c7f710344897bf2868e5",checked:this.mode==="type",value:"type",name:"mode",onClick:function(){return e.mode="type"}}),h("label",{key:"f24dc7c8e49bbc819cd909c73b733106c6019593"},"Typed with a keyboard")),h("div",{key:"038805f488e1c6906dd37bf7a800cb979f7ad921",style:{display:"flex",flexDirection:"row",gap:"10px",marginBottom:"6px",alignItems:"center",fontSize:"13px"}},h("verdocs-radio-button",{key:"60076a6947905f3c741dde49509ec16880e95d70",checked:this.mode==="draw",value:"draw",name:"mode",onClick:function(){return e.mode="draw"}}),h("label",{key:"34f6b58005d6fcffa66a179e7cb2f41d458404ea"},"Drawn with touch, mouse, or stylus")),h("div",{key:"e365015d205a671e86c614e83b4ec6fb2baefe7e",class:"preview-header"},h("div",{key:"bcd94a2ba783ee97dff12104af9e2ded33bf843a",style:{fontSize:"13px",fontWeight:"400"}},"Signature Preview"),this.mode==="draw"&&h("button",{key:"b424bd1a4f941832156a9273b85f1624d862eba3",class:"clear-button-text",onClick:function(t){return e.handleClearDrawing(t,"signature")},disabled:!this.hasDrawnSignature},"Clear")),h("div",{key:"96f4405552201d11b0a92cfda0d30cd603be61ef",class:"canvas-container signature-container"},h("div",{key:"45ce72ab6d0c987ef0a71c5de32ae0c87ce656b6",class:"signing-indicator"},h("div",{key:"b023f19afa9e12e6657707e9fc8660761a492905",class:"x-icon",innerHTML:SignatureXIcon}),h("div",{key:"eb151e0e724c8e6b96f4883d87553f5e1c302656",class:"signing-line"})),h("canvas",{key:"c85b504d61a8a0c2feca84ba52a227afa0d41982",ref:function(t){return e.signatureElement=t},height:"79",class:"signature-canvas",onPointerDown:this.handleSigPointerDown,onPointerMove:this.handleSigPointerMove,onPointerUp:this.handleSigPointerUp,onPointerCancel:this.handleSigPointerCancel,style:{touchAction:"none",cursor:"crosshair"}})),h("div",{key:"631996ac3454aec8b859e7f8cbcc4b370b4139c9",class:"preview-header"},h("div",{key:"fdb08fa9b81fc5c099e2909f70298327f16437b2",style:{fontSize:"13px",fontWeight:"400"}},"Initials Preview"),this.mode==="draw"&&h("button",{key:"d427c889863f75ef1d227db778dda4ae3c709cfb",class:"clear-button-text",onClick:function(t){return e.handleClearDrawing(t,"initials")},disabled:!this.hasDrawnInitials},"Clear")),h("div",{key:"40ab8a466c30cc0878fac40f9a4f334430d02251",class:"canvas-container initials-container"},h("div",{key:"fdbc73937e778ca0234bfaab029e9d8aff796336",class:"signing-indicator"},h("div",{key:"68a6043c7dfe9cb01d0d400aefb3aa92afb22d26",class:"x-icon",innerHTML:SignatureXIcon}),h("div",{key:"52aae9bddbe60148ce434ca848920c22e737a389",class:"signing-line"})),h("canvas",{key:"3a60047753307c60bb45dd10fca4949c5a57e403",ref:function(t){return e.initialsElement=t},height:"79",class:"initials-canvas",onPointerDown:this.handleInitialsPointerDown,onPointerMove:this.handleInitialsPointerMove,onPointerUp:this.handleInitialsPointerUp,onPointerCancel:this.handleInitialsPointerCancel,style:{touchAction:"none",cursor:"crosshair"}})),h("div",{key:"f57b5577881b1ae92812be6a4b14e8e946f78054",class:"disclaimer"},"By clicking «Adopt Signature», I agree that the signature and initials above will be the electronic representation of my signature and initials for all purposes when I use them to sign documents. Applying them to a document is legally equivalent to signing with a pen on paper.")),h("div",{key:"1f61879857d0dbd6886b72b5b50b2e288c747018",class:"footer",slot:"footer"},h("div",{key:"8c79bb1e41dad9b2700f9ac6f52cfa4217431b2e",class:"buttons"},h("button",{key:"ff9e56c83cc7b9d41041b9b8885c59c7a2ced94b",class:"cancel",onClick:function(t){return e.handleCancel(t)}},"Cancel"),h("button",{key:"54e0ca74f7f9aef6dbc534d8456835908ca1f05c",class:"proceed",onClick:function(t){return e.handleAdopt(t)},disabled:this.isAdoptButtonDisabled()},"Adopt & Sign"))))};return e}();VerdocsAdoptSignatureDialog.style=verdocsAdoptSignatureDialogCss;var verdocsDelegateDialogCss='@-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-delegate-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-delegate-dialog .heading .icon{}verdocs-delegate-dialog .heading .icon svg{fill:var(--verdocs-dialog-icon-color, #ffffff)}verdocs-delegate-dialog{}verdocs-delegate-dialog .verdocs-form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:16px;margin-bottom:24px}verdocs-delegate-dialog .verdocs-form-row{display:-ms-flexbox;display:flex;gap:16px;width:100%}verdocs-delegate-dialog .verdocs-form-row>*{-ms-flex:1;flex:1}verdocs-delegate-dialog .verdocs-form-label{font-size:13px;line-height:20px;font-weight:300;color:var(--verdocs-label-color, #616161);margin-bottom:2px;display:block}verdocs-delegate-dialog .verdocs-form-input{border:1px solid #d1d1d1;border-bottom-color:var(--verdocs-input-border-bottom-color, #d1d1d1);border-radius:4px;color:#707070;padding:8px 12px;font-size:14px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:inherit}verdocs-delegate-dialog .verdocs-form-input::-webkit-input-placeholder{color:#9ca3af}verdocs-delegate-dialog .verdocs-form-input::-moz-placeholder{color:#9ca3af}verdocs-delegate-dialog .verdocs-form-input:-ms-input-placeholder{color:#9ca3af}verdocs-delegate-dialog .verdocs-form-input::-ms-input-placeholder{color:#9ca3af}verdocs-delegate-dialog .verdocs-form-input::placeholder{color:#9ca3af}verdocs-delegate-dialog .verdocs-form-input:focus{outline:none;border-color:var(--verdocs-primary-color, #654dcb)}verdocs-delegate-dialog .buttons{gap:12px;display:-ms-flexbox;display:flex;margin-top:0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-delegate-dialog .buttons button{padding:8px 16px;height:40px;display:-ms-flexbox;display:flex;font-size:14px;font-weight:400;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:var(--verdocs-button-radius, 4px);-ms-flex-pack:center;justify-content:center;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}verdocs-delegate-dialog .buttons button.cancel{background-color:transparent;border:var(--verdocs-button-secondary-border, 1px solid #d1d5db);color:var(--verdocs-button-secondary-color, #374151)}verdocs-delegate-dialog .buttons button.proceed{background-color:var(--verdocs-primary-color, #55bc81);border:1px solid transparent;color:#ffffff}verdocs-delegate-dialog .buttons button.proceed:hover{background-color:var(--verdocs-primary-color-hover, #2b995b)}verdocs-delegate-dialog .buttons button:disabled{background-color:var(--verdocs-button-disabled-bg, #e5e7eb);color:var(--verdocs-button-disabled-color, #9ca3af);cursor:not-allowed}';var VerdocsDelegateDialog=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit");this.next=createEvent(this,"next");this.endpoint=DefaultEndpoint;this.envelope=null;this.first_name="";this.last_name="";this.email="";this.phone="";this.message=""}e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){if(e.target.class==="background-overlay"){e.preventDefault();this.handleCancel()}};e.prototype.handleDelegate=function(){this.next.emit({first_name:this.first_name,last_name:this.last_name,email:this.email,phone:this.phone,message:this.message})};e.prototype.render=function(){var e=this;return h("verdocs-dialog",{key:"ba13ecc155bb843c98a9d8768b16ec5c4c1d371d"},h("div",{key:"95ac7a62a85e1e6749da297a507c77d83b53cd3c",slot:"heading",class:"heading"},h("div",{key:"1c927f72ada6f137617321aa72fa513e4f6e94c0",class:"icon"},h("svg",{key:"4b36c1d368c193463d225e91f8c2f5321161a8ce",width:"22",height:"19",viewBox:"0 0 22 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("g",{key:"b2b798c555b0c822bd70037f8d7822e19ed751bd","clip-path":"url(#clip0_34208_4881)"},h("path",{key:"98b7b44cd4a0ba118fe39d1c16482921777a764e",d:"M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z"})),h("defs",{key:"787596228bcc714055e52cdb7577ae6d9b158c47"},h("clipPath",{key:"c30f1096fb73275c5e096098ef0e076f18ffa137",id:"clip0_34208_4881"},h("path",{key:"0a7a76bf76a4e5a2fa4ebd5b9b058dd98b2c218d",d:"M0.875 0.75H21.125V18.75H0.875V0.75Z",fill:"white"}))))),h("div",{key:"03555e4bc46cae9d8dfd3a2e2b94739d75f3932c",class:"title"},"Delegate Signing")),h("div",{key:"16e14e947e7cad24fe9d9c6cfbb9921804340db0",slot:"content",class:"content"},h("div",{key:"c6cf1303be070f4b9fdf2d66c3ddcd9f96dee03e",class:"verdocs-form"},h("div",{key:"3db901add742ee678c6a71de29b1feedd98eed88",class:"verdocs-form-row"},h("div",{key:"6e0a498c42a06e39b4210bde2e6804aff5f77c25",class:"field-group"},h("label",{key:"dde423e5cf3b4e8779ec8d3f07ccf3aceb79bba0",htmlFor:"verdocs-delegate-first",class:"verdocs-form-label"},"New Recipient*"),h("input",{key:"9fc5096acf857b2dcd3869d5624bf3e92a837ffe",type:"text",id:"verdocs-delegate-first",name:"verdocs-delegate-first",class:"verdocs-form-input",autocomplete:"blocked",placeholder:"First name",value:this.first_name,onInput:function(t){return e.first_name=t.target.value}})),h("div",{key:"518296ccd696fb4cc4f5e346d59b9311925389bb",class:"field-group"},h("label",{key:"31b2d88d23102213843e12f402c8790aa721f04f",htmlFor:"verdocs-delegate-last",class:"verdocs-form-label"}," "),h("input",{key:"541aba386a12c2633173835038f06c215f8884fa",type:"text",id:"verdocs-delegate-last",name:"verdocs-delegate-last",class:"verdocs-form-input",autocomplete:"blocked",placeholder:"Last name",value:this.last_name,onInput:function(t){return e.last_name=t.target.value}}))),h("div",{key:"f41b0bf11819e8c07c251565de14c1f8f6bfd4c5"},h("label",{key:"b44d558f6c0f7caeadfd51b3e86c30c38487e377",htmlFor:"verdocs-delegate-email",class:"verdocs-form-label"},"Email Address*"),h("input",{key:"ef443da2122be9f09bf0a4bf9664eebe4f9d31d4",type:"text",id:"verdocs-delegate-email",name:"verdocs-delegate-email",class:"verdocs-form-input",autocomplete:"blocked",placeholder:"New recipient email address",value:this.email,onInput:function(t){return e.email=t.target.value}})),h("div",{key:"2eba8ca2d67a72f0fbc0127f1b85a09ab35727cf"},h("label",{key:"5ea8a29edb1da249d4c80a6b9a51a5bb531a1415",htmlFor:"verdocs-delegate-phone",class:"verdocs-form-label"},"Phone Number*"),h("input",{key:"0e2fe53edb93638ac0fadf8c152a41a837772d3b",type:"text",id:"verdocs-delegate-phone",name:"verdocs-delegate-phone",class:"verdocs-form-input",autocomplete:"blocked",placeholder:"Optional phone number",value:this.phone,onInput:function(t){return e.phone=t.target.value}})),h("div",{key:"708c478736f2dabdca15b461ab708f61c4392bfc"},h("label",{key:"410be9a8f6a3089cd157cc4fce144db44a55c654",htmlFor:"verdocs-delegate-message",class:"verdocs-form-label"},"Message (optional)"),h("textarea",{key:"e048e656c46fe435b80dc2eeed6f1837292fadaf",id:"verdocs-delegate-message",name:"verdocs-delegate-message",class:"verdocs-form-input",rows:3,autocomplete:"blocked",placeholder:"Type message here...",onInput:function(t){return e.message=t.target.value}},this.message)))),h("div",{key:"6bdc7cf1b8b1a131d43c1b1e36e72b3df2eff495",class:"footer",slot:"footer"},h("div",{key:"10d7a92d94f45c75500ac4c9ecfd5a09bda17099",class:"buttons"},h("button",{key:"147a2bd25684b9c920c4b612cdd192f76bbae013",class:"cancel",onClick:function(){return e.handleCancel()}},"Cancel"),h("button",{key:"a76e39a7776aa3e277a5d337675d856019cbdce3",class:"proceed",onClick:function(){return e.handleDelegate()},disabled:!this.first_name||!this.last_name||!this.email},"Delegate"))))};return e}();VerdocsDelegateDialog.style=verdocsDelegateDialogCss;var verdocsDisclosureDialogCss="@-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-disclosure-dialog{}verdocs-disclosure-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;width:100%;-ms-flex-align:center;align-items:center}verdocs-disclosure-dialog .heading .close-button{cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:4px;border-radius:50%;color:var(--verdocs-close-button-color, #6b7280);-webkit-transition:all 0.2s ease;transition:all 0.2s ease}verdocs-disclosure-dialog .heading .close-button:hover{background-color:var(--verdocs-close-button-hover-bg, #f3f4f6);color:var(--verdocs-close-button-hover-color, #111827)}verdocs-disclosure-dialog .heading .close-button svg{fill:currentColor}verdocs-disclosure-dialog .content ul{list-style:none;padding:0;margin:0 0 16px 0}verdocs-disclosure-dialog .content ul li{position:relative;padding-left:34px;margin-bottom:12px;font-size:14px;line-height:20px}verdocs-disclosure-dialog .content ul li::before{content:\"\";position:absolute;left:0;top:-2px;width:24px;height:24px;background-color:var(--verdocs-bullet-color, #707070);-webkit-mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.53033 12.9697C4.23744 12.6768 3.76256 12.6768 3.46967 12.9697C3.17678 13.2626 3.17678 13.7374 3.46967 14.0303L7.96967 18.5303C8.26256 18.8232 8.73744 18.8232 9.03033 18.5303L20.0303 7.53033C20.3232 7.23744 20.3232 6.76256 20.0303 6.46967C19.7374 6.17678 19.2626 6.17678 18.9697 6.46967L8.5 16.9393L4.53033 12.9697Z' fill='%23707070'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.53033 12.9697C4.23744 12.6768 3.76256 12.6768 3.46967 12.9697C3.17678 13.2626 3.17678 13.7374 3.46967 14.0303L7.96967 18.5303C8.26256 18.8232 8.73744 18.8232 9.03033 18.5303L20.0303 7.53033C20.3232 7.23744 20.3232 6.76256 20.0303 6.46967C19.7374 6.17678 19.2626 6.17678 18.9697 6.46967L8.5 16.9393L4.53033 12.9697Z' fill='%23707070'/%3E%3C/svg%3E\");mask-size:contain;-webkit-mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-position:center;mask-position:center}verdocs-disclosure-dialog .accept{margin:0;color:var(--verdocs-dialog-content-color, #424242)}verdocs-disclosure-dialog .accept verdocs-checkbox{font-size:14px;line-height:20px}verdocs-disclosure-dialog .accept verdocs-checkbox label>input[type=checkbox]+*{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}verdocs-disclosure-dialog .accept verdocs-checkbox label>input[type=checkbox]+*::before{width:16px;height:16px;line-height:16px;margin-right:12px;-ms-flex-negative:0;flex-shrink:0;margin-top:2px}verdocs-disclosure-dialog a{color:var(--verdocs-link-color, #4c56cb)}verdocs-disclosure-dialog .buttons{gap:12px;display:-ms-flexbox;display:flex;margin-top:0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-disclosure-dialog .buttons button{padding:8px 16px;height:40px;display:-ms-flexbox;display:flex;font-size:14px;font-weight:400;cursor:pointer;-ms-flex-align:center;align-items:center;border-radius:var(--verdocs-button-radius, 4px);-ms-flex-pack:center;justify-content:center;-webkit-transition:all 0.2s ease;transition:all 0.2s ease}verdocs-disclosure-dialog .buttons button.decline{margin-right:auto;background-color:transparent;border:var(--verdocs-button-secondary-border, 1px solid #d1d5db);color:var(--verdocs-button-secondary-color, #374151)}verdocs-disclosure-dialog .buttons button.decline:hover{background-color:var(--verdocs-button-secondary-hover-bg, #f9fafb)}verdocs-disclosure-dialog .buttons button.delegate{background-color:transparent;border:var(--verdocs-button-secondary-border, 1px solid #d1d5db);color:var(--verdocs-button-secondary-color, #374151)}verdocs-disclosure-dialog .buttons button.proceed{background-color:var(--verdocs-primary-color, #55bc81);border:1px solid transparent;color:#ffffff}verdocs-disclosure-dialog .buttons button.proceed:hover{background-color:var(--verdocs-primary-color-hover, #2b995b)}verdocs-disclosure-dialog .buttons button:disabled{background-color:var(--verdocs-button-disabled-bg, #e5e7eb);color:var(--verdocs-button-disabled-color, #9ca3af);cursor:not-allowed}";var VerdocsDisclosureDialog=function(){function e(e){registerInstance(this,e);this.decline=createEvent(this,"decline");this.delegate=createEvent(this,"delegate");this.accept=createEvent(this,"accept");this.disclosures=DEFAULT_DISCLOSURES;this.delegator=false;this.accepted=false}e.prototype.render=function(){var e=this;return h("verdocs-dialog",{key:"6232bf838f2a1b663ed1968c7914f395c6d62858"},h("div",{key:"d0695a5caf7ec5257dd3a2d5da4e37c337b018a7",slot:"heading",class:"heading"},h("div",{key:"9c5243a7afe63ab2061e109a4147e9b324673b68",class:"title"},"e-Signature Disclosures"),h("div",{key:"39cf593e67252903cc708fe5ea3b6a52d3bebc96",class:"close-button"},h("svg",{key:"7f68ec316ac6f07a53b941082e8aa671052b7e0a",width:"24",height:"28",viewBox:"0 0 24 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{key:"3ec4f7b72bebd1f96586e8d84d1bbf71000cf698",d:"M4.39705 8.55379L4.46967 8.46967C4.73594 8.2034 5.1526 8.1792 5.44621 8.39705L5.53033 8.46967L12 14.939L18.4697 8.46967C18.7626 8.17678 19.2374 8.17678 19.5303 8.46967C19.8232 8.76256 19.8232 9.23744 19.5303 9.53033L13.061 16L19.5303 22.4697C19.7966 22.7359 19.8208 23.1526 19.6029 23.4462L19.5303 23.5303C19.2641 23.7966 18.8474 23.8208 18.5538 23.6029L18.4697 23.5303L12 17.061L5.53033 23.5303C5.23744 23.8232 4.76256 23.8232 4.46967 23.5303C4.17678 23.2374 4.17678 22.7626 4.46967 22.4697L10.939 16L4.46967 9.53033C4.2034 9.26406 4.1792 8.8474 4.39705 8.55379L4.46967 8.46967L4.39705 8.55379Z"})))),h("div",{key:"0b1d69f4b1cc37d0061d7e30da9a839c730716cf",slot:"content",class:"content"},h("div",{key:"6ece0fd03c97d8c89a0d91321651c51629b2cddd",innerHTML:this.disclosures}),h("div",{key:"6231a8dff94ada420cd20a67d4e87cd7b13f642a",class:"accept"},h("verdocs-checkbox",{key:"e975f89c43b32badd9138645d89422ddf9f5959f",label:"I accept the electronic signature disclosures and agree to proceed with digital signing.",checked:this.accepted,onInput:function(){return e.accepted=!e.accepted}}))),h("div",{key:"182231c07d93b70ec617def91c857abd2e47dd50",class:"footer",slot:"footer"},this.delegator?h("div",{class:"buttons"},h("button",{class:"decline",onClick:function(){return e.decline.emit()}},"Decline"),h("button",{class:"delegate",onClick:function(){return e.delegate.emit()}},"Delegate"),h("button",{class:"proceed",onClick:function(){return e.accept.emit()},disabled:!this.accepted},"Proceed")):h("div",{class:"buttons"},h("button",{class:"decline",onClick:function(){return e.decline.emit()}},"Decline"),h("button",{class:"proceed",onClick:function(){return e.accept.emit()},disabled:!this.accepted},"Proceed"))))};return e}();VerdocsDisclosureDialog.style=verdocsDisclosureDialogCss;var verdocsDownloadDialogCss='@-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-download-dialog{-webkit-box-sizing:border-box;box-sizing:border-box;font-family:"Inter", "Barlow", sans-serif}verdocs-download-dialog .content{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:20px;padding:10px 24px 20px 24px}verdocs-download-dialog .download-option{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;padding:15px;border:1px solid #e5e7eb;border-radius:6px;cursor:pointer;-webkit-transition:all 0.2s ease;transition:all 0.2s ease;gap:15px;background:white}verdocs-download-dialog .download-option.disabled{opacity:0.5;cursor:not-allowed}verdocs-download-dialog .download-option.disabled:hover{background-color:white;border-color:#e5e7eb}verdocs-download-dialog .download-option:hover{border-color:#654dcb;background-color:#f9fafb}verdocs-download-dialog .icon-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:40px;height:40px;background-color:#f3f4f6;border-radius:50%;color:#4b5563;-ms-flex-negative:0;flex-shrink:0}verdocs-download-dialog .icon-container svg{width:20px;height:20px}verdocs-download-dialog .text-container{-ms-flex:1;flex:1}verdocs-download-dialog .text-container .label{font-weight:500;color:#111827;margin-bottom:2px}verdocs-download-dialog .text-container .description{font-size:13px;color:#6b7280}verdocs-download-dialog .arrow{color:#9ca3af}';var DocumentIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 2H6C5.46957 2 4.96086 2.21071 4.58579 2.58579C4.21071 2.96086 4 3.46957 4 4V20C4 20.5304 4.21071 21.0391 4.58579 21.4142C4.96086 21.7893 5.46957 22 6 22H18C18.5304 22 19.0391 21.7893 19.4142 21.4142C19.7893 21.0391 20 20.5304 20 20V9L13 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M13 2V9H20" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var CertificateIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M12 15C15.866 15 19 11.866 19 8C19 4.13401 15.866 1 12 1C8.13401 1 5 4.13401 5 8C5 11.866 8.13401 15 12 15Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8.21 13.89L7 23L12 20L17 23L15.79 13.88" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var ZipIcon='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 16V22H14V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M6 16H18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M20 22H4" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M12 10L12 16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 12L12 16L16 12" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/><path d="M4 16V4H20V16" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var ChevronRight='<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 18L15 12L9 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>';var VerdocsDownloadDialog=function(){function e(e){registerInstance(this,e);this.next=createEvent(this,"next");this.exit=createEvent(this,"exit");this.hasCertificate=false}e.prototype.handleOptionClick=function(e){if((e==="certificate"||e==="zip")&&!this.hasCertificate){return}this.next.emit({action:e})};e.prototype.render=function(){var e=this;return h("verdocs-dialog",{key:"2a0b617baf1851d425b5e5c107e66e8632a85438",onExit:function(){return e.exit.emit()}},h("h3",{key:"bf0c005a0f143951dd6dc6104f3c4eca0c861a16",slot:"heading",style:{margin:"0",fontSize:"1.25rem",fontWeight:"600",padding:"16px 24px"}},"Download"),h("div",{key:"72e5c6c55caad04c695ca5f9fbc3326019a6d2ba",slot:"content",class:"content"},h("div",{key:"81b93ff3e8b76c86c671c1e82202e5b77fcef8d6",class:"download-option",onClick:function(){return e.handleOptionClick("document")}},h("div",{key:"10d5ec044dc55e60147686fcb6790d4c0866c00e",class:"icon-container",innerHTML:DocumentIcon}),h("div",{key:"8039d8a55d8ced51497bc6c6781cddb574ce4fe4",class:"text-container"},h("div",{key:"7c4754b826bebe7f49ada06791fb3a09aaaa7b4d",class:"label"},"Document"),h("div",{key:"e9fffffe2c58c16f87465376ccf42e7b6d21c0bd",class:"description"},"Download the signed document (PDF)")),h("div",{key:"4e4402ae52f9d6db4c474981ef982d3c77f17513",class:"arrow",innerHTML:ChevronRight})),h("div",{key:"09a5671de45d1b3a64ac197893fc4b95e3c5ed30",class:{"download-option":true,disabled:!this.hasCertificate},onClick:function(){return e.handleOptionClick("certificate")},title:!this.hasCertificate?"Certificate not yet available":""},h("div",{key:"08ad66037076f4f3cd3b8fad5b2ac68c92c8264c",class:"icon-container",innerHTML:CertificateIcon}),h("div",{key:"e022ad437bb7ca6bee1687600343d5ba84e46b84",class:"text-container"},h("div",{key:"16f38b5bdaaa3545ce84c2f301539a642fdcc98c",class:"label"},"Certificate"),h("div",{key:"c56a651a65a60316718fbb0fa36fd5b4da90274a",class:"description"},"Download the value and history certificate")),h("div",{key:"6afb8530f0b469f1d2d2dbc5d83a9b2bb2ca3a46",class:"arrow",innerHTML:ChevronRight})),h("div",{key:"7be2e96dedd64edf365176ca085fec6b542dca0a",class:{"download-option":true,disabled:!this.hasCertificate},onClick:function(){return e.handleOptionClick("zip")},title:!this.hasCertificate?"Certificate not yet available":""},h("div",{key:"e0eeb41a2076a53973d5d42d844442cd19a43ddf",class:"icon-container",innerHTML:ZipIcon}),h("div",{key:"69aaec2a202dd3c9a0da0e484cacb94b3e76d40b",class:"text-container"},h("div",{key:"78000e41866bb5449f2cc3906261c5286457be5e",class:"label"},"All Files"),h("div",{key:"38d7ddf82e2f9fdc65563be52dfd2cff77ed3f4a",class:"description"},"Download everything as a ZIP file")),h("div",{key:"599ea58ff31d975807365b1fc548b35d2e48e7a5",class:"arrow",innerHTML:ChevronRight}))),h("div",{key:"4852d9579317825b4af646e7236dc7d54a732c8a",slot:"footer",style:{display:"none"}}))};return e}();VerdocsDownloadDialog.style=verdocsDownloadDialogCss;function isString(e){return typeof e==="string"||e instanceof String}function isObject(e){var t;return typeof e==="object"&&e!=null&&(e==null||(t=e.constructor)==null?void 0:t.name)==="Object"}function pick(e,t){if(Array.isArray(t))return pick(e,(function(e,i){return t.includes(i)}));return Object.entries(e).reduce((function(e,i){var n=i[0],s=i[1];if(t(s,n))e[n]=s;return e}),{})}var DIRECTION={NONE:"NONE",LEFT:"LEFT",FORCE_LEFT:"FORCE_LEFT",RIGHT:"RIGHT",FORCE_RIGHT:"FORCE_RIGHT"};function forceDirection(e){switch(e){case DIRECTION.LEFT:return DIRECTION.FORCE_LEFT;case DIRECTION.RIGHT:return DIRECTION.FORCE_RIGHT;default:return e}}function escapeRegExp(e){return e.replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1")}function objectIncludes(e,t){if(t===e)return true;var i=Array.isArray(t),n=Array.isArray(e);var s;if(i&&n){if(t.length!=e.length)return false;for(s=0;s<t.length;s++)if(!objectIncludes(t[s],e[s]))return false;return true}if(i!=n)return false;if(t&&e&&typeof t==="object"&&typeof e==="object"){var r=t instanceof Date,o=e instanceof Date;if(r&&o)return t.getTime()==e.getTime();if(r!=o)return false;var a=t instanceof RegExp,u=e instanceof RegExp;if(a&&u)return t.toString()==e.toString();if(a!=u)return false;var c=Object.keys(t);for(s=0;s<c.length;s++)if(!Object.prototype.hasOwnProperty.call(e,c[s]))return false;for(s=0;s<c.length;s++)if(!objectIncludes(e[c[s]],t[c[s]]))return false;return true}else if(t&&e&&typeof t==="function"&&typeof e==="function"){return t.toString()===e.toString()}return false}var ActionDetails=function(){function e(e){Object.assign(this,e);while(this.value.slice(0,this.startChangePos)!==this.oldValue.slice(0,this.startChangePos)){--this.oldSelection.start}if(this.insertedCount){while(this.value.slice(this.cursorPos)!==this.oldValue.slice(this.oldSelection.end)){if(this.value.length-this.cursorPos<this.oldValue.length-this.oldSelection.end)++this.oldSelection.end;else++this.cursorPos}}}Object.defineProperty(e.prototype,"startChangePos",{get:function(){return Math.min(this.cursorPos,this.oldSelection.start)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"insertedCount",{get:function(){return this.cursorPos-this.startChangePos},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"inserted",{get:function(){return this.value.substr(this.startChangePos,this.insertedCount)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"removedCount",{get:function(){return Math.max(this.oldSelection.end-this.startChangePos||this.oldValue.length-this.value.length,0)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"removed",{get:function(){return this.oldValue.substr(this.startChangePos,this.removedCount)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"head",{get:function(){return this.value.substring(0,this.startChangePos)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"tail",{get:function(){return this.value.substring(this.startChangePos+this.insertedCount)},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"removeDirection",{get:function(){if(!this.removedCount||this.insertedCount)return DIRECTION.NONE;return(this.oldSelection.end===this.cursorPos||this.oldSelection.start===this.cursorPos)&&this.oldSelection.end===this.oldSelection.start?DIRECTION.RIGHT:DIRECTION.LEFT},enumerable:false,configurable:true});return e}();function IMask(e,t){return new IMask.InputMask(e,t)}function maskedClass(e){if(e==null)throw new Error("mask property should be defined");if(e instanceof RegExp)return IMask.MaskedRegExp;if(isString(e))return IMask.MaskedPattern;if(e===Date)return IMask.MaskedDate;if(e===Number)return IMask.MaskedNumber;if(Array.isArray(e)||e===Array)return IMask.MaskedDynamic;if(IMask.Masked&&e.prototype instanceof IMask.Masked)return e;if(IMask.Masked&&e instanceof IMask.Masked)return e.constructor;if(e instanceof Function)return IMask.MaskedFunction;console.warn("Mask not found for mask",e);return IMask.Masked}function normalizeOpts(e){if(!e)throw new Error("Options in not defined");if(IMask.Masked){if(e.prototype instanceof IMask.Masked)return{mask:e};var t=e instanceof IMask.Masked?{mask:e}:isObject(e)&&e.mask instanceof IMask.Masked?e:{},i=t.mask,n=i===void 0?undefined:i,s=__rest(t,["mask"]);if(n){var r=n.mask;return __assign(__assign(__assign({},pick(n,(function(e,t){return!t.startsWith("_")}))),{mask:n.constructor,_mask:r}),s)}}if(!isObject(e))return{mask:e};return __assign({},e)}function createMask(e){if(IMask.Masked&&e instanceof IMask.Masked)return e;var t=normalizeOpts(e);var i=maskedClass(t.mask);if(!i)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");if(t.mask===i)delete t.mask;if(t._mask){t.mask=t._mask;delete t._mask}return new i(t)}IMask.createMask=createMask;var MaskElement=function(){function e(){}Object.defineProperty(e.prototype,"selectionStart",{get:function(){var e;try{e=this._unsafeSelectionStart}catch(e){}return e!=null?e:this.value.length},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"selectionEnd",{get:function(){var e;try{e=this._unsafeSelectionEnd}catch(e){}return e!=null?e:this.value.length},enumerable:false,configurable:true});e.prototype.select=function(e,t){if(e==null||t==null||e===this.selectionStart&&t===this.selectionEnd)return;try{this._unsafeSelect(e,t)}catch(e){}};Object.defineProperty(e.prototype,"isActive",{get:function(){return false},enumerable:false,configurable:true});return e}();IMask.MaskElement=MaskElement;var KEY_Z=90;var KEY_Y=89;var HTMLMaskElement=function(e){__extends(t,e);function t(t){var i=e.call(this)||this;i.input=t;i._onKeydown=i._onKeydown.bind(i);i._onInput=i._onInput.bind(i);i._onBeforeinput=i._onBeforeinput.bind(i);i._onCompositionEnd=i._onCompositionEnd.bind(i);return i}Object.defineProperty(t.prototype,"rootElement",{get:function(){var e,t,i;return(e=(t=(i=this.input).getRootNode)==null?void 0:t.call(i))!=null?e:document},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isActive",{get:function(){return this.input===this.rootElement.activeElement},enumerable:false,configurable:true});t.prototype.bindEvents=function(e){this.input.addEventListener("keydown",this._onKeydown);this.input.addEventListener("input",this._onInput);this.input.addEventListener("beforeinput",this._onBeforeinput);this.input.addEventListener("compositionend",this._onCompositionEnd);this.input.addEventListener("drop",e.drop);this.input.addEventListener("click",e.click);this.input.addEventListener("focus",e.focus);this.input.addEventListener("blur",e.commit);this._handlers=e};t.prototype._onKeydown=function(e){if(this._handlers.redo&&(e.keyCode===KEY_Z&&e.shiftKey&&(e.metaKey||e.ctrlKey)||e.keyCode===KEY_Y&&e.ctrlKey)){e.preventDefault();return this._handlers.redo(e)}if(this._handlers.undo&&e.keyCode===KEY_Z&&(e.metaKey||e.ctrlKey)){e.preventDefault();return this._handlers.undo(e)}if(!e.isComposing)this._handlers.selectionChange(e)};t.prototype._onBeforeinput=function(e){if(e.inputType==="historyUndo"&&this._handlers.undo){e.preventDefault();return this._handlers.undo(e)}if(e.inputType==="historyRedo"&&this._handlers.redo){e.preventDefault();return this._handlers.redo(e)}};t.prototype._onCompositionEnd=function(e){this._handlers.input(e)};t.prototype._onInput=function(e){if(!e.isComposing)this._handlers.input(e)};t.prototype.unbindEvents=function(){this.input.removeEventListener("keydown",this._onKeydown);this.input.removeEventListener("input",this._onInput);this.input.removeEventListener("beforeinput",this._onBeforeinput);this.input.removeEventListener("compositionend",this._onCompositionEnd);this.input.removeEventListener("drop",this._handlers.drop);this.input.removeEventListener("click",this._handlers.click);this.input.removeEventListener("focus",this._handlers.focus);this.input.removeEventListener("blur",this._handlers.commit);this._handlers={}};return t}(MaskElement);IMask.HTMLMaskElement=HTMLMaskElement;var HTMLInputMaskElement=function(e){__extends(t,e);function t(t){var i=e.call(this,t)||this;i.input=t;return i}Object.defineProperty(t.prototype,"_unsafeSelectionStart",{get:function(){return this.input.selectionStart!=null?this.input.selectionStart:this.value.length},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"_unsafeSelectionEnd",{get:function(){return this.input.selectionEnd},enumerable:false,configurable:true});t.prototype._unsafeSelect=function(e,t){this.input.setSelectionRange(e,t)};Object.defineProperty(t.prototype,"value",{get:function(){return this.input.value},set:function(e){this.input.value=e},enumerable:false,configurable:true});return t}(HTMLMaskElement);IMask.HTMLMaskElement=HTMLMaskElement;var HTMLContenteditableMaskElement=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(t.prototype,"_unsafeSelectionStart",{get:function(){var e=this.rootElement;var t=e.getSelection&&e.getSelection();var i=t&&t.anchorOffset;var n=t&&t.focusOffset;if(n==null||i==null||i<n){return i}return n},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"_unsafeSelectionEnd",{get:function(){var e=this.rootElement;var t=e.getSelection&&e.getSelection();var i=t&&t.anchorOffset;var n=t&&t.focusOffset;if(n==null||i==null||i>n){return i}return n},enumerable:false,configurable:true});t.prototype._unsafeSelect=function(e,t){if(!this.rootElement.createRange)return;var i=this.rootElement.createRange();i.setStart(this.input.firstChild||this.input,e);i.setEnd(this.input.lastChild||this.input,t);var n=this.rootElement;var s=n.getSelection&&n.getSelection();if(s){s.removeAllRanges();s.addRange(i)}};Object.defineProperty(t.prototype,"value",{get:function(){return this.input.textContent||""},set:function(e){this.input.textContent=e},enumerable:false,configurable:true});return t}(HTMLMaskElement);IMask.HTMLContenteditableMaskElement=HTMLContenteditableMaskElement;var InputHistory=function(){function e(){this.states=[];this.currentIndex=0}Object.defineProperty(e.prototype,"currentState",{get:function(){return this.states[this.currentIndex]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isEmpty",{get:function(){return this.states.length===0},enumerable:false,configurable:true});e.prototype.push=function(t){if(this.currentIndex<this.states.length-1)this.states.length=this.currentIndex+1;this.states.push(t);if(this.states.length>e.MAX_LENGTH)this.states.shift();this.currentIndex=this.states.length-1};e.prototype.go=function(e){this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1);return this.currentState};e.prototype.undo=function(){return this.go(-1)};e.prototype.redo=function(){return this.go(1)};e.prototype.clear=function(){this.states.length=0;this.currentIndex=0};return e}();InputHistory.MAX_LENGTH=100;var InputMask=function(){function e(e,t){this.el=e instanceof MaskElement?e:e.isContentEditable&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"?new HTMLContenteditableMaskElement(e):new HTMLInputMaskElement(e);this.masked=createMask(t);this._listeners={};this._value="";this._unmaskedValue="";this._rawInputValue="";this.history=new InputHistory;this._saveSelection=this._saveSelection.bind(this);this._onInput=this._onInput.bind(this);this._onChange=this._onChange.bind(this);this._onDrop=this._onDrop.bind(this);this._onFocus=this._onFocus.bind(this);this._onClick=this._onClick.bind(this);this._onUndo=this._onUndo.bind(this);this._onRedo=this._onRedo.bind(this);this.alignCursor=this.alignCursor.bind(this);this.alignCursorFriendly=this.alignCursorFriendly.bind(this);this._bindEvents();this.updateValue();this._onChange()}e.prototype.maskEquals=function(e){var t;return e==null||((t=this.masked)==null?void 0:t.maskEquals(e))};Object.defineProperty(e.prototype,"mask",{get:function(){return this.masked.mask},set:function(e){if(this.maskEquals(e))return;if(!(e instanceof IMask.Masked)&&this.masked.constructor===maskedClass(e)){this.masked.updateOptions({mask:e});return}var t=e instanceof IMask.Masked?e:createMask({mask:e});t.unmaskedValue=this.masked.unmaskedValue;this.masked=t},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){if(this.value===e)return;this.masked.value=e;this.updateControl("auto")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"unmaskedValue",{get:function(){return this._unmaskedValue},set:function(e){if(this.unmaskedValue===e)return;this.masked.unmaskedValue=e;this.updateControl("auto")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"rawInputValue",{get:function(){return this._rawInputValue},set:function(e){if(this.rawInputValue===e)return;this.masked.rawInputValue=e;this.updateControl();this.alignCursor()},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"typedValue",{get:function(){return this.masked.typedValue},set:function(e){if(this.masked.typedValueEquals(e))return;this.masked.typedValue=e;this.updateControl("auto")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"displayValue",{get:function(){return this.masked.displayValue},enumerable:false,configurable:true});e.prototype._bindEvents=function(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})};e.prototype._unbindEvents=function(){if(this.el)this.el.unbindEvents()};e.prototype._fireEvent=function(e,t){var i=this._listeners[e];if(!i)return;i.forEach((function(e){return e(t)}))};Object.defineProperty(e.prototype,"selectionStart",{get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"cursorPos",{get:function(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd},set:function(e){if(!this.el||!this.el.isActive)return;this.el.select(e,e);this._saveSelection()},enumerable:false,configurable:true});e.prototype._saveSelection=function(){if(this.displayValue!==this.el.value){console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.")}this._selection={start:this.selectionStart,end:this.cursorPos}};e.prototype.updateValue=function(){this.masked.value=this.el.value;this._value=this.masked.value;this._unmaskedValue=this.masked.unmaskedValue;this._rawInputValue=this.masked.rawInputValue};e.prototype.updateControl=function(e){var t=this.masked.unmaskedValue;var i=this.masked.value;var n=this.masked.rawInputValue;var s=this.displayValue;var r=this.unmaskedValue!==t||this.value!==i||this._rawInputValue!==n;this._unmaskedValue=t;this._value=i;this._rawInputValue=n;if(this.el.value!==s)this.el.value=s;if(e==="auto")this.alignCursor();else if(e!=null)this.cursorPos=e;if(r)this._fireChangeEvents();if(!this._historyChanging&&(r||this.history.isEmpty))this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})};e.prototype.updateOptions=function(e){var t=e.mask,i=__rest(e,["mask"]);var n=!this.maskEquals(t);var s=this.masked.optionsIsChanged(i);if(n)this.mask=t;if(s)this.masked.updateOptions(i);if(n||s)this.updateControl()};e.prototype.updateCursor=function(e){if(e==null)return;this.cursorPos=e;this._delayUpdateCursor(e)};e.prototype._delayUpdateCursor=function(e){var t=this;this._abortUpdateCursor();this._changingCursorPos=e;this._cursorChanging=setTimeout((function(){if(!t.el)return;t.cursorPos=t._changingCursorPos;t._abortUpdateCursor()}),10)};e.prototype._fireChangeEvents=function(){this._fireEvent("accept",this._inputEvent);if(this.masked.isComplete)this._fireEvent("complete",this._inputEvent)};e.prototype._abortUpdateCursor=function(){if(this._cursorChanging){clearTimeout(this._cursorChanging);delete this._cursorChanging}};e.prototype.alignCursor=function(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,DIRECTION.LEFT))};e.prototype.alignCursorFriendly=function(){if(this.selectionStart!==this.cursorPos)return;this.alignCursor()};e.prototype.on=function(e,t){if(!this._listeners[e])this._listeners[e]=[];this._listeners[e].push(t);return this};e.prototype.off=function(e,t){if(!this._listeners[e])return this;if(!t){delete this._listeners[e];return this}var i=this._listeners[e].indexOf(t);if(i>=0)this._listeners[e].splice(i,1);return this};e.prototype._onInput=function(e){this._inputEvent=e;this._abortUpdateCursor();var t=new ActionDetails({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection});var i=this.masked.rawInputValue;var n=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:true,raw:true}).offset;var s=i===this.masked.rawInputValue?t.removeDirection:DIRECTION.NONE;var r=this.masked.nearestInputPos(t.startChangePos+n,s);if(s!==DIRECTION.NONE)r=this.masked.nearestInputPos(r,DIRECTION.NONE);this.updateControl(r);delete this._inputEvent};e.prototype._onChange=function(){if(this.displayValue!==this.el.value)this.updateValue();this.masked.doCommit();this.updateControl();this._saveSelection()};e.prototype._onDrop=function(e){e.preventDefault();e.stopPropagation()};e.prototype._onFocus=function(e){this.alignCursorFriendly()};e.prototype._onClick=function(e){this.alignCursorFriendly()};e.prototype._onUndo=function(){this._applyHistoryState(this.history.undo())};e.prototype._onRedo=function(){this._applyHistoryState(this.history.redo())};e.prototype._applyHistoryState=function(e){if(!e)return;this._historyChanging=true;this.unmaskedValue=e.unmaskedValue;this.el.select(e.selection.start,e.selection.end);this._saveSelection();this._historyChanging=false};e.prototype.destroy=function(){this._unbindEvents();this._listeners.length=0;delete this.el};return e}();IMask.InputMask=InputMask;var ChangeDetails=function(){function e(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:false},e)}e.normalize=function(t){return Array.isArray(t)?t:[t,new e]};e.prototype.aggregate=function(e){this.inserted+=e.inserted;this.rawInserted+=e.rawInserted;this.tailShift+=e.tailShift;this.skip=this.skip||e.skip;return this};Object.defineProperty(e.prototype,"offset",{get:function(){return this.tailShift+this.inserted.length},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"consumed",{get:function(){return Boolean(this.rawInserted)||this.skip},enumerable:false,configurable:true});e.prototype.equals=function(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip};return e}();IMask.ChangeDetails=ChangeDetails;var ContinuousTailDetails=function(){function e(e,t,i){if(e===void 0){e=""}if(t===void 0){t=0}this.value=e;this.from=t;this.stop=i}e.prototype.toString=function(){return this.value};e.prototype.extend=function(e){this.value+=String(e)};e.prototype.appendTo=function(e){return e.append(this.toString(),{tail:true}).aggregate(e._appendPlaceholder())};Object.defineProperty(e.prototype,"state",{get:function(){return{value:this.value,from:this.from,stop:this.stop}},set:function(e){Object.assign(this,e)},enumerable:false,configurable:true});e.prototype.unshift=function(e){if(!this.value.length||e!=null&&this.from>=e)return"";var t=this.value[0];this.value=this.value.slice(1);return t};e.prototype.shift=function(){if(!this.value.length)return"";var e=this.value[this.value.length-1];this.value=this.value.slice(0,-1);return e};return e}();var Masked=function(){function e(t){this._value="";this._update(__assign(__assign({},e.DEFAULTS),t));this._initialized=true}e.prototype.updateOptions=function(e){if(!this.optionsIsChanged(e))return;this.withValueRefresh(this._update.bind(this,e))};e.prototype._update=function(e){Object.assign(this,e)};Object.defineProperty(e.prototype,"state",{get:function(){return{_value:this.value,_rawInputValue:this.rawInputValue}},set:function(e){this._value=e._value},enumerable:false,configurable:true});e.prototype.reset=function(){this._value=""};Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this.resolve(e,{input:true})},enumerable:false,configurable:true});e.prototype.resolve=function(e,t){if(t===void 0){t={input:true}}this.reset();this.append(e,t,"");this.doCommit()};Object.defineProperty(e.prototype,"unmaskedValue",{get:function(){return this.value},set:function(e){this.resolve(e,{})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"typedValue",{get:function(){return this.parse?this.parse(this.value,this):this.unmaskedValue},set:function(e){if(this.format){this.value=this.format(e,this)}else{this.unmaskedValue=String(e)}},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"rawInputValue",{get:function(){return this.extractInput(0,this.displayValue.length,{raw:true})},set:function(e){this.resolve(e,{raw:true})},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"displayValue",{get:function(){return this.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isComplete",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFilled",{get:function(){return this.isComplete},enumerable:false,configurable:true});e.prototype.nearestInputPos=function(e,t){return e};e.prototype.totalInputPositions=function(e,t){if(e===void 0){e=0}if(t===void 0){t=this.displayValue.length}return Math.min(this.displayValue.length,t-e)};e.prototype.extractInput=function(e,t,i){if(e===void 0){e=0}if(t===void 0){t=this.displayValue.length}return this.displayValue.slice(e,t)};e.prototype.extractTail=function(e,t){if(e===void 0){e=0}if(t===void 0){t=this.displayValue.length}return new ContinuousTailDetails(this.extractInput(e,t),e)};e.prototype.appendTail=function(e){if(isString(e))e=new ContinuousTailDetails(String(e));return e.appendTo(this)};e.prototype._appendCharRaw=function(e,t){if(!e)return new ChangeDetails;this._value+=e;return new ChangeDetails({inserted:e,rawInserted:e})};e.prototype._appendChar=function(e,t,i){var n;if(t===void 0){t={}}var s=this.state;var r;n=this.doPrepareChar(e,t),e=n[0],r=n[1];if(e){r=r.aggregate(this._appendCharRaw(e,t));if(!r.rawInserted&&this.autofix==="pad"){var o=this.state;this.state=s;var a=this.pad(t);var u=this._appendCharRaw(e,t);a=a.aggregate(u);if(u.rawInserted||a.equals(r)){r=a}else{this.state=o}}}if(r.inserted){var c=void 0;var l=this.doValidate(t)!==false;if(l&&i!=null){var d=this.state;if(this.overwrite===true){c=i.state;for(var h=0;h<r.rawInserted.length;++h){i.unshift(this.displayValue.length-r.tailShift)}}var f=this.appendTail(i);l=f.rawInserted.length===i.toString().length;if(!(l&&f.inserted)&&this.overwrite==="shift"){this.state=d;c=i.state;for(var h=0;h<r.rawInserted.length;++h){i.shift()}f=this.appendTail(i);l=f.rawInserted.length===i.toString().length}if(l&&f.inserted)this.state=d}if(!l){r=new ChangeDetails;this.state=s;if(i&&c)i.state=c}}return r};e.prototype._appendPlaceholder=function(){return new ChangeDetails};e.prototype._appendEager=function(){return new ChangeDetails};e.prototype.append=function(e,t,i){var n;if(!isString(e))throw new Error("value should be string");var s=isString(i)?new ContinuousTailDetails(String(i)):i;if(t!=null&&t.tail)t._beforeTailState=this.state;var r;n=this.doPrepare(e,t),e=n[0],r=n[1];for(var o=0;o<e.length;++o){var a=this._appendChar(e[o],t,s);if(!a.rawInserted&&!this.doSkipInvalid(e[o],t,s))break;r.aggregate(a)}if((this.eager===true||this.eager==="append")&&t!=null&&t.input&&e){r.aggregate(this._appendEager())}if(s!=null){r.tailShift+=this.appendTail(s).tailShift}return r};e.prototype.remove=function(e,t){if(e===void 0){e=0}if(t===void 0){t=this.displayValue.length}this._value=this.displayValue.slice(0,e)+this.displayValue.slice(t);return new ChangeDetails};e.prototype.withValueRefresh=function(e){if(this._refreshing||!this._initialized)return e();this._refreshing=true;var t=this.rawInputValue;var i=this.value;var n=e();this.rawInputValue=t;if(this.value&&this.value!==i&&i.indexOf(this.value)===0){this.append(i.slice(this.displayValue.length),{},"");this.doCommit()}delete this._refreshing;return n};e.prototype.runIsolated=function(e){if(this._isolated||!this._initialized)return e(this);this._isolated=true;var t=this.state;var i=e(this);this.state=t;delete this._isolated;return i};e.prototype.doSkipInvalid=function(e,t,i){return Boolean(this.skipInvalid)};e.prototype.doPrepare=function(e,t){if(t===void 0){t={}}return ChangeDetails.normalize(this.prepare?this.prepare(e,this,t):e)};e.prototype.doPrepareChar=function(e,t){if(t===void 0){t={}}return ChangeDetails.normalize(this.prepareChar?this.prepareChar(e,this,t):e)};e.prototype.doValidate=function(e){return(!this.validate||this.validate(this.value,this,e))&&(!this.parent||this.parent.doValidate(e))};e.prototype.doCommit=function(){if(this.commit)this.commit(this.value,this)};e.prototype.splice=function(e,t,i,n,s){if(i===void 0){i=""}if(n===void 0){n=DIRECTION.NONE}if(s===void 0){s={input:true}}var r=e+t;var o=this.extractTail(r);var a=this.eager===true||this.eager==="remove";var u;if(a){n=forceDirection(n);u=this.extractInput(0,r,{raw:true})}var c=e;var l=new ChangeDetails;if(n!==DIRECTION.NONE){c=this.nearestInputPos(e,t>1&&e!==0&&!a?DIRECTION.NONE:n);l.tailShift=c-e}l.aggregate(this.remove(c));if(a&&n!==DIRECTION.NONE&&u===this.rawInputValue){if(n===DIRECTION.FORCE_LEFT){var d=void 0;while(u===this.rawInputValue&&(d=this.displayValue.length)){l.aggregate(new ChangeDetails({tailShift:-1})).aggregate(this.remove(d-1))}}else if(n===DIRECTION.FORCE_RIGHT){o.unshift()}}return l.aggregate(this.append(i,s,o))};e.prototype.maskEquals=function(e){return this.mask===e};e.prototype.optionsIsChanged=function(e){return!objectIncludes(this,e)};e.prototype.typedValueEquals=function(t){var i=this.typedValue;return t===i||e.EMPTY_VALUES.includes(t)&&e.EMPTY_VALUES.includes(i)||(this.format?this.format(t,this)===this.format(this.typedValue,this):false)};e.prototype.pad=function(e){return new ChangeDetails};return e}();Masked.DEFAULTS={skipInvalid:true};Masked.EMPTY_VALUES=[undefined,null,""];IMask.Masked=Masked;var ChunksTailDetails=function(){function e(e,t){if(e===void 0){e=[]}if(t===void 0){t=0}this.chunks=e;this.from=t}e.prototype.toString=function(){return this.chunks.map(String).join("")};e.prototype.extend=function(t){if(!String(t))return;t=isString(t)?new ContinuousTailDetails(String(t)):t;var i=this.chunks[this.chunks.length-1];var n=i&&(i.stop===t.stop||t.stop==null)&&t.from===i.from+i.toString().length;if(t instanceof ContinuousTailDetails){if(n){i.extend(t.toString())}else{this.chunks.push(t)}}else if(t instanceof e){if(t.stop==null){var s=void 0;while(t.chunks.length&&t.chunks[0].stop==null){s=t.chunks.shift();s.from+=t.from;this.extend(s)}}if(t.toString()){t.stop=t.blockIndex;this.chunks.push(t)}}};e.prototype.appendTo=function(t){if(!(t instanceof IMask.MaskedPattern)){var i=new ContinuousTailDetails(this.toString());return i.appendTo(t)}var n=new ChangeDetails;for(var s=0;s<this.chunks.length;++s){var r=this.chunks[s];var o=t._mapPosToBlock(t.displayValue.length);var a=r.stop;var u=void 0;if(a!=null&&(!o||o.index<=a)){if(r instanceof e||t._stops.indexOf(a)>=0){n.aggregate(t._appendPlaceholder(a))}u=r instanceof e&&t._blocks[a]}if(u){var c=u.appendTail(r);n.aggregate(c);var l=r.toString().slice(c.rawInserted.length);if(l)n.aggregate(t.append(l,{tail:true}))}else{n.aggregate(t.append(r.toString(),{tail:true}))}}return n};Object.defineProperty(e.prototype,"state",{get:function(){return{chunks:this.chunks.map((function(e){return e.state})),from:this.from,stop:this.stop,blockIndex:this.blockIndex}},set:function(t){var i=t.chunks,n=__rest(t,["chunks"]);Object.assign(this,n);this.chunks=i.map((function(t){var i="chunks"in t?new e:new ContinuousTailDetails;i.state=t;return i}))},enumerable:false,configurable:true});e.prototype.unshift=function(e){if(!this.chunks.length||e!=null&&this.from>=e)return"";var t=e!=null?e-this.from:e;var i=0;while(i<this.chunks.length){var n=this.chunks[i];var s=n.unshift(t);if(n.toString()){if(!s)break;++i}else{this.chunks.splice(i,1)}if(s)return s}return""};e.prototype.shift=function(){if(!this.chunks.length)return"";var e=this.chunks.length-1;while(0<=e){var t=this.chunks[e];var i=t.shift();if(t.toString()){if(!i)break;--e}else{this.chunks.splice(e,1)}if(i)return i}return""};return e}();var PatternCursor=function(){function e(e,t){this.masked=e;this._log=[];var i=e._mapPosToBlock(t)||(t<0?{index:0,offset:0}:{index:this.masked._blocks.length,offset:0}),n=i.offset,s=i.index;this.offset=n;this.index=s;this.ok=false}Object.defineProperty(e.prototype,"block",{get:function(){return this.masked._blocks[this.index]},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"pos",{get:function(){return this.masked._blockStartPos(this.index)+this.offset},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"state",{get:function(){return{index:this.index,offset:this.offset,ok:this.ok}},set:function(e){Object.assign(this,e)},enumerable:false,configurable:true});e.prototype.pushState=function(){this._log.push(this.state)};e.prototype.popState=function(){var e=this._log.pop();if(e)this.state=e;return e};e.prototype.bindBlock=function(){if(this.block)return;if(this.index<0){this.index=0;this.offset=0}if(this.index>=this.masked._blocks.length){this.index=this.masked._blocks.length-1;this.offset=this.block.displayValue.length}};e.prototype._pushLeft=function(e){this.pushState();for(this.bindBlock();0<=this.index;--this.index,this.offset=((t=this.block)==null?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=true}return this.ok=false};e.prototype._pushRight=function(e){this.pushState();for(this.bindBlock();this.index<this.masked._blocks.length;++this.index,this.offset=0){if(e())return this.ok=true}return this.ok=false};e.prototype.pushLeftBeforeFilled=function(){var e=this;return this._pushLeft((function(){if(e.block.isFixed||!e.block.value)return;e.offset=e.block.nearestInputPos(e.offset,DIRECTION.FORCE_LEFT);if(e.offset!==0)return true}))};e.prototype.pushLeftBeforeInput=function(){var e=this;return this._pushLeft((function(){if(e.block.isFixed)return;e.offset=e.block.nearestInputPos(e.offset,DIRECTION.LEFT);return true}))};e.prototype.pushLeftBeforeRequired=function(){var e=this;return this._pushLeft((function(){if(e.block.isFixed||e.block.isOptional&&!e.block.value)return;e.offset=e.block.nearestInputPos(e.offset,DIRECTION.LEFT);return true}))};e.prototype.pushRightBeforeFilled=function(){var e=this;return this._pushRight((function(){if(e.block.isFixed||!e.block.value)return;e.offset=e.block.nearestInputPos(e.offset,DIRECTION.FORCE_RIGHT);if(e.offset!==e.block.value.length)return true}))};e.prototype.pushRightBeforeInput=function(){var e=this;return this._pushRight((function(){if(e.block.isFixed)return;e.offset=e.block.nearestInputPos(e.offset,DIRECTION.NONE);return true}))};e.prototype.pushRightBeforeRequired=function(){var e=this;return this._pushRight((function(){if(e.block.isFixed||e.block.isOptional&&!e.block.value)return;e.offset=e.block.nearestInputPos(e.offset,DIRECTION.NONE);return true}))};return e}();var PatternFixedDefinition=function(){function e(e){Object.assign(this,e);this._value="";this.isFixed=true}Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"unmaskedValue",{get:function(){return this.isUnmasking?this.value:""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"rawInputValue",{get:function(){return this._isRawInput?this.value:""},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"displayValue",{get:function(){return this.value},enumerable:false,configurable:true});e.prototype.reset=function(){this._isRawInput=false;this._value=""};e.prototype.remove=function(e,t){if(e===void 0){e=0}if(t===void 0){t=this._value.length}this._value=this._value.slice(0,e)+this._value.slice(t);if(!this._value)this._isRawInput=false;return new ChangeDetails};e.prototype.nearestInputPos=function(e,t){if(t===void 0){t=DIRECTION.NONE}var i=0;var n=this._value.length;switch(t){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return i;case DIRECTION.NONE:case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:default:return n}};e.prototype.totalInputPositions=function(e,t){if(e===void 0){e=0}if(t===void 0){t=this._value.length}return this._isRawInput?t-e:0};e.prototype.extractInput=function(e,t,i){if(e===void 0){e=0}if(t===void 0){t=this._value.length}if(i===void 0){i={}}return i.raw&&this._isRawInput&&this._value.slice(e,t)||""};Object.defineProperty(e.prototype,"isComplete",{get:function(){return true},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isFilled",{get:function(){return Boolean(this._value)},enumerable:false,configurable:true});e.prototype._appendChar=function(e,t){if(t===void 0){t={}}if(this.isFilled)return new ChangeDetails;var i=this.eager===true||this.eager==="append";var n=this.char===e;var s=n&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!i)&&!t.tail;var r=new ChangeDetails({inserted:this.char,rawInserted:s?this.char:""});this._value=this.char;this._isRawInput=s&&(t.raw||t.input);return r};e.prototype._appendEager=function(){return this._appendChar(this.char,{tail:true})};e.prototype._appendPlaceholder=function(){var e=new ChangeDetails;if(this.isFilled)return e;this._value=e.inserted=this.char;return e};e.prototype.extractTail=function(){return new ContinuousTailDetails("")};e.prototype.appendTail=function(e){if(isString(e))e=new ContinuousTailDetails(String(e));return e.appendTo(this)};e.prototype.append=function(e,t,i){var n=this._appendChar(e[0],t);if(i!=null){n.tailShift+=this.appendTail(i).tailShift}return n};e.prototype.doCommit=function(){};Object.defineProperty(e.prototype,"state",{get:function(){return{_value:this._value,_rawInputValue:this.rawInputValue}},set:function(e){this._value=e._value;this._isRawInput=Boolean(e._rawInputValue)},enumerable:false,configurable:true});e.prototype.pad=function(e){return this._appendPlaceholder()};return e}();var PatternInputDefinition=function(){function e(e){var t=e.parent,i=e.isOptional,n=e.placeholderChar,s=e.displayChar,r=e.lazy,o=e.eager,a=__rest(e,["parent","isOptional","placeholderChar","displayChar","lazy","eager"]);this.masked=createMask(a);Object.assign(this,{parent:t,isOptional:i,placeholderChar:n,displayChar:s,lazy:r,eager:o})}e.prototype.reset=function(){this.isFilled=false;this.masked.reset()};e.prototype.remove=function(e,t){if(e===void 0){e=0}if(t===void 0){t=this.value.length}if(e===0&&t>=1){this.isFilled=false;return this.masked.remove(e,t)}return new ChangeDetails};Object.defineProperty(e.prototype,"value",{get:function(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"unmaskedValue",{get:function(){return this.masked.unmaskedValue},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"rawInputValue",{get:function(){return this.masked.rawInputValue},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"displayValue",{get:function(){return this.masked.value&&this.displayChar||this.value},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"isComplete",{get:function(){return Boolean(this.masked.value)||this.isOptional},enumerable:false,configurable:true});e.prototype._appendChar=function(e,t){if(t===void 0){t={}}if(this.isFilled)return new ChangeDetails;var i=this.masked.state;var n=this.masked._appendChar(e,this.currentMaskFlags(t));if(n.inserted&&this.doValidate(t)===false){n=new ChangeDetails;this.masked.state=i}if(!n.inserted&&!this.isOptional&&!this.lazy&&!t.input){n.inserted=this.placeholderChar}n.skip=!n.inserted&&!this.isOptional;this.isFilled=Boolean(n.inserted);return n};e.prototype.append=function(e,t,i){return this.masked.append(e,this.currentMaskFlags(t),i)};e.prototype._appendPlaceholder=function(){if(this.isFilled||this.isOptional)return new ChangeDetails;this.isFilled=true;return new ChangeDetails({inserted:this.placeholderChar})};e.prototype._appendEager=function(){return new ChangeDetails};e.prototype.extractTail=function(e,t){return this.masked.extractTail(e,t)};e.prototype.appendTail=function(e){return this.masked.appendTail(e)};e.prototype.extractInput=function(e,t,i){if(e===void 0){e=0}if(t===void 0){t=this.value.length}return this.masked.extractInput(e,t,i)};e.prototype.nearestInputPos=function(e,t){if(t===void 0){t=DIRECTION.NONE}var i=0;var n=this.value.length;var s=Math.min(Math.max(e,i),n);switch(t){case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:return this.isComplete?s:i;case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:return this.isComplete?s:n;case DIRECTION.NONE:default:return s}};e.prototype.totalInputPositions=function(e,t){if(e===void 0){e=0}if(t===void 0){t=this.value.length}return this.value.slice(e,t).length};e.prototype.doValidate=function(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))};e.prototype.doCommit=function(){this.masked.doCommit()};Object.defineProperty(e.prototype,"state",{get:function(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}},set:function(e){this.masked.state=e.masked;this.isFilled=e.isFilled},enumerable:false,configurable:true});e.prototype.currentMaskFlags=function(e){var t;return __assign(__assign({},e),{_beforeTailState:(e==null||(t=e._beforeTailState)==null?void 0:t.masked)||(e==null?void 0:e._beforeTailState)})};e.prototype.pad=function(e){return new ChangeDetails};return e}();PatternInputDefinition.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};var MaskedRegExp=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.updateOptions=function(t){e.prototype.updateOptions.call(this,t)};t.prototype._update=function(t){var i=t.mask;if(i)t.validate=function(e){return e.search(i)>=0};e.prototype._update.call(this,t)};return t}(Masked);IMask.MaskedRegExp=MaskedRegExp;var MaskedPattern=function(e){__extends(t,e);function t(i){return e.call(this,__assign(__assign(__assign({},t.DEFAULTS),i),{definitions:Object.assign({},PatternInputDefinition.DEFAULT_DEFINITIONS,i==null?void 0:i.definitions)}))||this}t.prototype.updateOptions=function(t){e.prototype.updateOptions.call(this,t)};t.prototype._update=function(t){t.definitions=Object.assign({},this.definitions,t.definitions);e.prototype._update.call(this,t);this._rebuildMask()};t.prototype._rebuildMask=function(){var e=this.definitions;this._blocks=[];this.exposeBlock=undefined;this._stops=[];this._maskedBlocks={};var i=this.mask;if(!i||!e)return;var n=false;var s=false;var r=function(r){if(o.blocks){var u=i.slice(r);var c=Object.keys(o.blocks).filter((function(e){return u.indexOf(e)===0}));c.sort((function(e,t){return t.length-e.length}));var l=c[0];if(l){var d=normalizeOpts(o.blocks[l]),h=d.expose,f=d.repeat,b=__rest(d,["expose","repeat"]);var v=__assign(__assign({lazy:o.lazy,eager:o.eager,placeholderChar:o.placeholderChar,displayChar:o.displayChar,overwrite:o.overwrite,autofix:o.autofix},b),{repeat:f,parent:o});var g=f!=null?new IMask.RepeatBlock(v):createMask(v);if(g){o._blocks.push(g);if(h)o.exposeBlock=g;if(!o._maskedBlocks[l])o._maskedBlocks[l]=[];o._maskedBlocks[l].push(o._blocks.length-1)}r+=l.length-1;return a=r,"continue"}}var p=i[r];var x=p in e;if(p===t.STOP_CHAR){o._stops.push(o._blocks.length);return a=r,"continue"}if(p==="{"||p==="}"){n=!n;return a=r,"continue"}if(p==="["||p==="]"){s=!s;return a=r,"continue"}if(p===t.ESCAPE_CHAR){++r;p=i[r];if(!p)return a=r,"break";x=false}var m=x?new PatternInputDefinition(__assign(__assign({isOptional:s,lazy:o.lazy,eager:o.eager,placeholderChar:o.placeholderChar,displayChar:o.displayChar},normalizeOpts(e[p])),{parent:o})):new PatternFixedDefinition({char:p,eager:o.eager,isUnmasking:n});o._blocks.push(m);a=r};var o=this,a;for(var u=0;u<i.length;++u){var c=r(u);u=a;if(c==="break")break}};Object.defineProperty(t.prototype,"state",{get:function(){return __assign(__assign({},e.prototype.state),{_blocks:this._blocks.map((function(e){return e.state}))})},set:function(t){if(!t){this.reset();return}var i=t._blocks,n=__rest(t,["_blocks"]);this._blocks.forEach((function(e,t){return e.state=i[t]}));e.prototype.state=n},enumerable:false,configurable:true});t.prototype.reset=function(){e.prototype.reset.call(this);this._blocks.forEach((function(e){return e.reset()}))};Object.defineProperty(t.prototype,"isComplete",{get:function(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every((function(e){return e.isComplete}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isFilled",{get:function(){return this._blocks.every((function(e){return e.isFilled}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isFixed",{get:function(){return this._blocks.every((function(e){return e.isFixed}))},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isOptional",{get:function(){return this._blocks.every((function(e){return e.isOptional}))},enumerable:false,configurable:true});t.prototype.doCommit=function(){this._blocks.forEach((function(e){return e.doCommit()}));e.prototype.doCommit.call(this)};Object.defineProperty(t.prototype,"unmaskedValue",{get:function(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((function(e,t){return e+=t.unmaskedValue}),"")},set:function(t){if(this.exposeBlock){var i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.unmaskedValue=t;this.appendTail(i);this.doCommit()}else e.prototype.unmaskedValue=t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"value",{get:function(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((function(e,t){return e+=t.value}),"")},set:function(t){if(this.exposeBlock){var i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.value=t;this.appendTail(i);this.doCommit()}else e.prototype.value=t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"typedValue",{get:function(){return this.exposeBlock?this.exposeBlock.typedValue:e.prototype.typedValue},set:function(t){if(this.exposeBlock){var i=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length);this.exposeBlock.typedValue=t;this.appendTail(i);this.doCommit()}else e.prototype.typedValue=t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"displayValue",{get:function(){return this._blocks.reduce((function(e,t){return e+=t.displayValue}),"")},enumerable:false,configurable:true});t.prototype.appendTail=function(t){return e.prototype.appendTail.call(this,t).aggregate(this._appendPlaceholder())};t.prototype._appendEager=function(){var e;var t=new ChangeDetails;var i=(e=this._mapPosToBlock(this.displayValue.length))==null?void 0:e.index;if(i==null)return t;if(this._blocks[i].isFilled)++i;for(var n=i;n<this._blocks.length;++n){var s=this._blocks[n]._appendEager();if(!s.inserted)break;t.aggregate(s)}return t};t.prototype._appendCharRaw=function(e,t){if(t===void 0){t={}}var i=this._mapPosToBlock(this.displayValue.length);var n=new ChangeDetails;if(!i)return n;for(var s=i.index,r=void 0;r=this._blocks[s];++s){var o;var a=r._appendChar(e,__assign(__assign({},t),{_beforeTailState:(o=t._beforeTailState)==null||(o=o._blocks)==null?void 0:o[s]}));n.aggregate(a);if(a.consumed)break}return n};t.prototype.extractTail=function(e,t){var i=this;if(e===void 0){e=0}if(t===void 0){t=this.displayValue.length}var n=new ChunksTailDetails;if(e===t)return n;this._forEachBlocksInRange(e,t,(function(e,t,s,r){var o=e.extractTail(s,r);o.stop=i._findStopBefore(t);o.from=i._blockStartPos(t);if(o instanceof ChunksTailDetails)o.blockIndex=t;n.extend(o)}));return n};t.prototype.extractInput=function(e,t,i){if(e===void 0){e=0}if(t===void 0){t=this.displayValue.length}if(i===void 0){i={}}if(e===t)return"";var n="";this._forEachBlocksInRange(e,t,(function(e,t,s,r){n+=e.extractInput(s,r,i)}));return n};t.prototype._findStopBefore=function(e){var t;for(var i=0;i<this._stops.length;++i){var n=this._stops[i];if(n<=e)t=n;else break}return t};t.prototype._appendPlaceholder=function(e){var t=new ChangeDetails;if(this.lazy&&e==null)return t;var i=this._mapPosToBlock(this.displayValue.length);if(!i)return t;var n=i.index;var s=e!=null?e:this._blocks.length;this._blocks.slice(n,s).forEach((function(i){if(!i.lazy||e!=null){var n;t.aggregate(i._appendPlaceholder((n=i._blocks)==null?void 0:n.length))}}));return t};t.prototype._mapPosToBlock=function(e){var t="";for(var i=0;i<this._blocks.length;++i){var n=this._blocks[i];var s=t.length;t+=n.displayValue;if(e<=t.length){return{index:i,offset:e-s}}}};t.prototype._blockStartPos=function(e){return this._blocks.slice(0,e).reduce((function(e,t){return e+=t.displayValue.length}),0)};t.prototype._forEachBlocksInRange=function(e,t,i){if(t===void 0){t=this.displayValue.length}var n=this._mapPosToBlock(e);if(n){var s=this._mapPosToBlock(t);var r=s&&n.index===s.index;var o=n.offset;var a=s&&r?s.offset:this._blocks[n.index].displayValue.length;i(this._blocks[n.index],n.index,o,a);if(s&&!r){for(var u=n.index+1;u<s.index;++u){i(this._blocks[u],u,0,this._blocks[u].displayValue.length)}i(this._blocks[s.index],s.index,0,s.offset)}}};t.prototype.remove=function(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}var n=e.prototype.remove.call(this,t,i);this._forEachBlocksInRange(t,i,(function(e,t,i,s){n.aggregate(e.remove(i,s))}));return n};t.prototype.nearestInputPos=function(e,t){if(t===void 0){t=DIRECTION.NONE}if(!this._blocks.length)return 0;var i=new PatternCursor(this,e);if(t===DIRECTION.NONE){if(i.pushRightBeforeInput())return i.pos;i.popState();if(i.pushLeftBeforeInput())return i.pos;return this.displayValue.length}if(t===DIRECTION.LEFT||t===DIRECTION.FORCE_LEFT){if(t===DIRECTION.LEFT){i.pushRightBeforeFilled();if(i.ok&&i.pos===e)return e;i.popState()}i.pushLeftBeforeInput();i.pushLeftBeforeRequired();i.pushLeftBeforeFilled();if(t===DIRECTION.LEFT){i.pushRightBeforeInput();i.pushRightBeforeRequired();if(i.ok&&i.pos<=e)return i.pos;i.popState();if(i.ok&&i.pos<=e)return i.pos;i.popState()}if(i.ok)return i.pos;if(t===DIRECTION.FORCE_LEFT)return 0;i.popState();if(i.ok)return i.pos;i.popState();if(i.ok)return i.pos;return 0}if(t===DIRECTION.RIGHT||t===DIRECTION.FORCE_RIGHT){i.pushRightBeforeInput();i.pushRightBeforeRequired();if(i.pushRightBeforeFilled())return i.pos;if(t===DIRECTION.FORCE_RIGHT)return this.displayValue.length;i.popState();if(i.ok)return i.pos;i.popState();if(i.ok)return i.pos;return this.nearestInputPos(e,DIRECTION.LEFT)}return e};t.prototype.totalInputPositions=function(e,t){if(e===void 0){e=0}if(t===void 0){t=this.displayValue.length}var i=0;this._forEachBlocksInRange(e,t,(function(e,t,n,s){i+=e.totalInputPositions(n,s)}));return i};t.prototype.maskedBlock=function(e){return this.maskedBlocks(e)[0]};t.prototype.maskedBlocks=function(e){var t=this;var i=this._maskedBlocks[e];if(!i)return[];return i.map((function(e){return t._blocks[e]}))};t.prototype.pad=function(e){var t=new ChangeDetails;this._forEachBlocksInRange(0,this.displayValue.length,(function(i){return t.aggregate(i.pad(e))}));return t};return t}(Masked);MaskedPattern.DEFAULTS=__assign(__assign({},Masked.DEFAULTS),{lazy:true,placeholderChar:"_"});MaskedPattern.STOP_CHAR="`";MaskedPattern.ESCAPE_CHAR="\\";MaskedPattern.InputDefinition=PatternInputDefinition;MaskedPattern.FixedDefinition=PatternFixedDefinition;IMask.MaskedPattern=MaskedPattern;var MaskedRange=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t.prototype,"_matchFrom",{get:function(){return this.maxLength-String(this.from).length},enumerable:false,configurable:true});t.prototype.updateOptions=function(t){e.prototype.updateOptions.call(this,t)};t.prototype._update=function(t){var i=t.to,n=i===void 0?this.to||0:i,s=t.from,r=s===void 0?this.from||0:s,o=t.maxLength,a=o===void 0?this.maxLength||0:o,u=t.autofix,c=u===void 0?this.autofix:u,l=__rest(t,["to","from","maxLength","autofix"]);this.to=n;this.from=r;this.maxLength=Math.max(String(n).length,a);this.autofix=c;var d=String(this.from).padStart(this.maxLength,"0");var h=String(this.to).padStart(this.maxLength,"0");var f=0;while(f<h.length&&h[f]===d[f])++f;l.mask=h.slice(0,f).replace(/0/g,"\\0")+"0".repeat(this.maxLength-f);e.prototype._update.call(this,l)};Object.defineProperty(t.prototype,"isComplete",{get:function(){return e.prototype.isComplete&&Boolean(this.value)},enumerable:false,configurable:true});t.prototype.boundaries=function(e){var t="";var i="";var n=e.match(/^(\D*)(\d*)(\D*)/)||[],s=n[1],r=n[2];if(r){t="0".repeat(s.length)+r;i="9".repeat(s.length)+r}t=t.padEnd(this.maxLength,"0");i=i.padEnd(this.maxLength,"9");return[t,i]};t.prototype.doPrepareChar=function(t,i){var n;if(i===void 0){i={}}var s;n=e.prototype.doPrepareChar.call(this,t.replace(/\D/g,""),i),t=n[0],s=n[1];if(!t)s.skip=!this.isComplete;return[t,s]};t.prototype._appendCharRaw=function(t,i){if(i===void 0){i={}}if(!this.autofix||this.value.length+1>this.maxLength)return e.prototype._appendCharRaw.call(this,t,i);var n=String(this.from).padStart(this.maxLength,"0");var s=String(this.to).padStart(this.maxLength,"0");var r=this.boundaries(this.value+t),o=r[0],a=r[1];if(Number(a)<this.from)return e.prototype._appendCharRaw.call(this,n[this.value.length],i);if(Number(o)>this.to){if(!i.tail&&this.autofix==="pad"&&this.value.length+1<this.maxLength){return e.prototype._appendCharRaw.call(this,n[this.value.length],i).aggregate(this._appendCharRaw(t,i))}return e.prototype._appendCharRaw.call(this,s[this.value.length],i)}return e.prototype._appendCharRaw.call(this,t,i)};t.prototype.doValidate=function(t){var i=this.value;var n=i.search(/[^0]/);if(n===-1&&i.length<=this._matchFrom)return true;var s=this.boundaries(i),r=s[0],o=s[1];return this.from<=Number(o)&&Number(r)<=this.to&&e.prototype.doValidate.call(this,t)};t.prototype.pad=function(t){var i=this;var n=new ChangeDetails;if(this.value.length===this.maxLength)return n;var s=this.value;var r=this.maxLength-this.value.length;if(r){this.reset();for(var o=0;o<r;++o){n.aggregate(e.prototype._appendCharRaw.call(this,"0",t))}s.split("").forEach((function(e){return i._appendCharRaw(e)}))}return n};return t}(MaskedPattern);IMask.MaskedRange=MaskedRange;var DefaultPattern="d{.}`m{.}`Y";var MaskedDate=function(e){__extends(t,e);function t(i){return e.call(this,t.extractPatternOptions(__assign(__assign({},t.DEFAULTS),i)))||this}t.extractPatternOptions=function(e){var t=e.mask,i=e.pattern,n=__rest(e,["mask","pattern"]);return __assign(__assign({},n),{mask:isString(t)?t:i})};t.prototype.updateOptions=function(t){e.prototype.updateOptions.call(this,t)};t.prototype._update=function(i){var n=__assign(__assign({},t.DEFAULTS),i),s=n.mask,r=n.pattern,o=n.blocks,a=__rest(n,["mask","pattern","blocks"]);var u=Object.assign({},t.GET_DEFAULT_BLOCKS());if(i.min)u.Y.from=i.min.getFullYear();if(i.max)u.Y.to=i.max.getFullYear();if(i.min&&i.max&&u.Y.from===u.Y.to){u.m.from=i.min.getMonth()+1;u.m.to=i.max.getMonth()+1;if(u.m.from===u.m.to){u.d.from=i.min.getDate();u.d.to=i.max.getDate()}}Object.assign(u,this.blocks,o);e.prototype._update.call(this,__assign(__assign({},a),{mask:isString(s)?s:r,blocks:u}))};t.prototype.doValidate=function(t){var i=this.date;return e.prototype.doValidate.call(this,t)&&(!this.isComplete||this.isDateExist(this.value)&&i!=null&&(this.min==null||this.min<=i)&&(this.max==null||i<=this.max))};t.prototype.isDateExist=function(e){return this.format(this.parse(e,this),this).indexOf(e)>=0};Object.defineProperty(t.prototype,"date",{get:function(){return this.typedValue},set:function(e){this.typedValue=e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"typedValue",{get:function(){return this.isComplete?e.prototype.typedValue:null},set:function(t){e.prototype.typedValue=t},enumerable:false,configurable:true});t.prototype.maskEquals=function(t){return t===Date||e.prototype.maskEquals.call(this,t)};t.prototype.optionsIsChanged=function(i){return e.prototype.optionsIsChanged.call(this,t.extractPatternOptions(i))};return t}(MaskedPattern);MaskedDate.GET_DEFAULT_BLOCKS=function(){return{d:{mask:MaskedRange,from:1,to:31,maxLength:2},m:{mask:MaskedRange,from:1,to:12,maxLength:2},Y:{mask:MaskedRange,from:1900,to:9999}}};MaskedDate.DEFAULTS=__assign(__assign({},MaskedPattern.DEFAULTS),{mask:Date,pattern:DefaultPattern,format:function(e,t){if(!e)return"";var i=String(e.getDate()).padStart(2,"0");var n=String(e.getMonth()+1).padStart(2,"0");var s=e.getFullYear();return[i,n,s].join(".")},parse:function(e,t){var i=e.split(".").map(Number),n=i[0],s=i[1],r=i[2];return new Date(r,s-1,n)}});IMask.MaskedDate=MaskedDate;var MaskedDynamic=function(e){__extends(t,e);function t(i){var n=e.call(this,__assign(__assign({},t.DEFAULTS),i))||this;n.currentMask=undefined;return n}t.prototype.updateOptions=function(t){e.prototype.updateOptions.call(this,t)};t.prototype._update=function(t){var i=this;e.prototype._update.call(this,t);if("mask"in t){this.exposeMask=undefined;this.compiledMasks=Array.isArray(t.mask)?t.mask.map((function(e){var t=normalizeOpts(e),n=t.expose,s=__rest(t,["expose"]);var r=createMask(__assign({overwrite:i._overwrite,eager:i._eager,skipInvalid:i._skipInvalid},s));if(n)i.exposeMask=r;return r})):[]}};t.prototype._appendCharRaw=function(e,t){if(t===void 0){t={}}var i=this._applyDispatch(e,t);if(this.currentMask){i.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t)))}return i};t.prototype._applyDispatch=function(e,t,i){if(e===void 0){e=""}if(t===void 0){t={}}if(i===void 0){i=""}var n=t.tail&&t._beforeTailState!=null?t._beforeTailState._value:this.value;var s=this.rawInputValue;var r=t.tail&&t._beforeTailState!=null?t._beforeTailState._rawInputValue:s;var o=s.slice(r.length);var a=this.currentMask;var u=new ChangeDetails;var c=a==null?void 0:a.state;this.currentMask=this.doDispatch(e,__assign({},t),i);if(this.currentMask){if(this.currentMask!==a){this.currentMask.reset();if(r){this.currentMask.append(r,{raw:true});u.tailShift=this.currentMask.value.length-n.length}if(o){u.tailShift+=this.currentMask.append(o,{raw:true,tail:true}).tailShift}}else if(c){this.currentMask.state=c}}return u};t.prototype._appendPlaceholder=function(){var e=this._applyDispatch();if(this.currentMask){e.aggregate(this.currentMask._appendPlaceholder())}return e};t.prototype._appendEager=function(){var e=this._applyDispatch();if(this.currentMask){e.aggregate(this.currentMask._appendEager())}return e};t.prototype.appendTail=function(t){var i=new ChangeDetails;if(t)i.aggregate(this._applyDispatch("",{},t));return i.aggregate(this.currentMask?this.currentMask.appendTail(t):e.prototype.appendTail.call(this,t))};t.prototype.currentMaskFlags=function(e){var t,i;return __assign(__assign({},e),{_beforeTailState:((t=e._beforeTailState)==null?void 0:t.currentMaskRef)===this.currentMask&&((i=e._beforeTailState)==null?void 0:i.currentMask)||e._beforeTailState})};t.prototype.doDispatch=function(e,t,i){if(t===void 0){t={}}if(i===void 0){i=""}return this.dispatch(e,this,t,i)};t.prototype.doValidate=function(t){return e.prototype.doValidate.call(this,t)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(t)))};t.prototype.doPrepare=function(t,i){var n;if(i===void 0){i={}}var s=e.prototype.doPrepare.call(this,t,i),r=s[0],o=s[1];if(this.currentMask){var a=void 0;n=e.prototype.doPrepare.call(this,r,this.currentMaskFlags(i)),r=n[0],a=n[1];o=o.aggregate(a)}return[r,o]};t.prototype.doPrepareChar=function(t,i){var n;if(i===void 0){i={}}var s=e.prototype.doPrepareChar.call(this,t,i),r=s[0],o=s[1];if(this.currentMask){var a=void 0;n=e.prototype.doPrepareChar.call(this,r,this.currentMaskFlags(i)),r=n[0],a=n[1];o=o.aggregate(a)}return[r,o]};t.prototype.reset=function(){var e;(e=this.currentMask)==null||e.reset();this.compiledMasks.forEach((function(e){return e.reset()}))};Object.defineProperty(t.prototype,"value",{get:function(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""},set:function(t){if(this.exposeMask){this.exposeMask.value=t;this.currentMask=this.exposeMask;this._applyDispatch()}else e.prototype.value=t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"unmaskedValue",{get:function(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""},set:function(t){if(this.exposeMask){this.exposeMask.unmaskedValue=t;this.currentMask=this.exposeMask;this._applyDispatch()}else e.prototype.unmaskedValue=t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"typedValue",{get:function(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""},set:function(e){if(this.exposeMask){this.exposeMask.typedValue=e;this.currentMask=this.exposeMask;this._applyDispatch();return}var t=String(e);if(this.currentMask){this.currentMask.typedValue=e;t=this.currentMask.unmaskedValue}this.unmaskedValue=t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"displayValue",{get:function(){return this.currentMask?this.currentMask.displayValue:""},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isComplete",{get:function(){var e;return Boolean((e=this.currentMask)==null?void 0:e.isComplete)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"isFilled",{get:function(){var e;return Boolean((e=this.currentMask)==null?void 0:e.isFilled)},enumerable:false,configurable:true});t.prototype.remove=function(e,t){var i=new ChangeDetails;if(this.currentMask){i.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch())}return i};Object.defineProperty(t.prototype,"state",{get:function(){var t;return __assign(__assign({},e.prototype.state),{_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map((function(e){return e.state})),currentMaskRef:this.currentMask,currentMask:(t=this.currentMask)==null?void 0:t.state})},set:function(t){var i=t.compiledMasks,n=t.currentMaskRef,s=t.currentMask,r=__rest(t,["compiledMasks","currentMaskRef","currentMask"]);if(i)this.compiledMasks.forEach((function(e,t){return e.state=i[t]}));if(n!=null){this.currentMask=n;this.currentMask.state=s}e.prototype.state=r},enumerable:false,configurable:true});t.prototype.extractInput=function(e,t,i){return this.currentMask?this.currentMask.extractInput(e,t,i):""};t.prototype.extractTail=function(t,i){return this.currentMask?this.currentMask.extractTail(t,i):e.prototype.extractTail.call(this,t,i)};t.prototype.doCommit=function(){if(this.currentMask)this.currentMask.doCommit();e.prototype.doCommit.call(this)};t.prototype.nearestInputPos=function(t,i){return this.currentMask?this.currentMask.nearestInputPos(t,i):e.prototype.nearestInputPos.call(this,t,i)};Object.defineProperty(t.prototype,"overwrite",{get:function(){return this.currentMask?this.currentMask.overwrite:this._overwrite},set:function(e){this._overwrite=e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"eager",{get:function(){return this.currentMask?this.currentMask.eager:this._eager},set:function(e){this._eager=e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"skipInvalid",{get:function(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid},set:function(e){this._skipInvalid=e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"autofix",{get:function(){return this.currentMask?this.currentMask.autofix:this._autofix},set:function(e){this._autofix=e},enumerable:false,configurable:true});t.prototype.maskEquals=function(t){return Array.isArray(t)?this.compiledMasks.every((function(e,i){if(!t[i])return;var n=t[i],s=n.mask,r=__rest(n,["mask"]);return objectIncludes(e,r)&&e.maskEquals(s)})):e.prototype.maskEquals.call(this,t)};t.prototype.typedValueEquals=function(e){var t;return Boolean((t=this.currentMask)==null?void 0:t.typedValueEquals(e))};return t}(Masked);MaskedDynamic.DEFAULTS=__assign(__assign({},Masked.DEFAULTS),{dispatch:function(e,t,i,n){if(!t.compiledMasks.length)return;var s=t.rawInputValue;var r=t.compiledMasks.map((function(r,o){var a=t.currentMask===r;var u=a?r.displayValue.length:r.nearestInputPos(r.displayValue.length,DIRECTION.FORCE_LEFT);if(r.rawInputValue!==s){r.reset();r.append(s,{raw:true})}else if(!a){r.remove(u)}r.append(e,t.currentMaskFlags(i));r.appendTail(n);return{index:o,weight:r.rawInputValue.length,totalInputPositions:r.totalInputPositions(0,Math.max(u,r.nearestInputPos(r.displayValue.length,DIRECTION.FORCE_LEFT)))}}));r.sort((function(e,t){return t.weight-e.weight||t.totalInputPositions-e.totalInputPositions}));return t.compiledMasks[r[0].index]}});IMask.MaskedDynamic=MaskedDynamic;var MaskedEnum=function(e){__extends(t,e);function t(i){return e.call(this,__assign(__assign({},t.DEFAULTS),i))||this}t.prototype.updateOptions=function(t){e.prototype.updateOptions.call(this,t)};t.prototype._update=function(t){var i=t.enum,n=__rest(t,["enum"]);if(i){var s=i.map((function(e){return e.length}));var r=Math.min.apply(Math,s);var o=Math.max.apply(Math,s)-r;n.mask="*".repeat(r);if(o)n.mask+="["+"*".repeat(o)+"]";this.enum=i}e.prototype._update.call(this,n)};t.prototype._appendCharRaw=function(t,i){var n=this;if(i===void 0){i={}}var s=Math.min(this.nearestInputPos(0,DIRECTION.FORCE_RIGHT),this.value.length);var r=this.enum.filter((function(e){return n.matchValue(e,n.unmaskedValue+t,s)}));if(r.length){if(r.length===1){this._forEachBlocksInRange(0,this.value.length,(function(e,t){var s=r[0][t];if(t>=n.value.length||s===e.value)return;e.reset();e._appendChar(s,i)}))}var o=e.prototype._appendCharRaw.call(this,r[0][this.value.length],i);if(r.length===1){r[0].slice(this.unmaskedValue.length).split("").forEach((function(t){return o.aggregate(e.prototype._appendCharRaw.call(n,t))}))}return o}return new ChangeDetails({skip:!this.isComplete})};t.prototype.extractTail=function(e,t){if(e===void 0){e=0}return new ContinuousTailDetails("",e)};t.prototype.remove=function(t,i){var n=this;if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}if(t===i)return new ChangeDetails;var s=Math.min(e.prototype.nearestInputPos.call(this,0,DIRECTION.FORCE_RIGHT),this.value.length);var r;for(r=t;r>=0;--r){var o=this.enum.filter((function(e){return n.matchValue(e,n.value.slice(s,r),s)}));if(o.length>1)break}var a=e.prototype.remove.call(this,r,i);a.tailShift+=r-t;return a};Object.defineProperty(t.prototype,"isComplete",{get:function(){return this.enum.indexOf(this.value)>=0},enumerable:false,configurable:true});return t}(MaskedPattern);MaskedEnum.DEFAULTS=__assign(__assign({},MaskedPattern.DEFAULTS),{matchValue:function(e,t,i){return e.indexOf(t,i)===i}});IMask.MaskedEnum=MaskedEnum;var MaskedFunction=function(e){__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}t.prototype.updateOptions=function(t){e.prototype.updateOptions.call(this,t)};t.prototype._update=function(t){e.prototype._update.call(this,__assign(__assign({},t),{validate:t.mask}))};return t}(Masked);IMask.MaskedFunction=MaskedFunction;var _MaskedNumber;var MaskedNumber=function(e){__extends(t,e);function t(i){return e.call(this,__assign(__assign({},t.DEFAULTS),i))||this}t.prototype.updateOptions=function(t){e.prototype.updateOptions.call(this,t)};t.prototype._update=function(t){e.prototype._update.call(this,t);this._updateRegExps()};t.prototype._updateRegExps=function(){var e="^"+(this.allowNegative?"[+|\\-]?":"");var t="\\d*";var i=(this.scale?"("+escapeRegExp(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+t+i);this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(escapeRegExp).join("")+"]","g");this._thousandsSeparatorRegExp=new RegExp(escapeRegExp(this.thousandsSeparator),"g")};t.prototype._removeThousandsSeparators=function(e){return e.replace(this._thousandsSeparatorRegExp,"")};t.prototype._insertThousandsSeparators=function(e){var t=e.split(this.radix);t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator);return t.join(this.radix)};t.prototype.doPrepareChar=function(t,i){if(i===void 0){i={}}var n=e.prototype.doPrepareChar.call(this,this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(i.input&&i.raw||!i.input&&!i.raw)?t.replace(this._mapToRadixRegExp,this.radix):t),i),s=n[0],r=n[1];if(t&&!s)r.skip=true;if(s&&!this.allowPositive&&!this.value&&s!=="-")r.aggregate(this._appendChar("-"));return[s,r]};t.prototype._separatorsCount=function(e,t){if(t===void 0){t=false}var i=0;for(var n=0;n<e;++n){if(this._value.indexOf(this.thousandsSeparator,n)===n){++i;if(t)e+=this.thousandsSeparator.length}}return i};t.prototype._separatorsCountFromSlice=function(e){if(e===void 0){e=this._value}return this._separatorsCount(this._removeThousandsSeparators(e).length,true)};t.prototype.extractInput=function(t,i,n){var s;if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}s=this._adjustRangeWithSeparators(t,i),t=s[0],i=s[1];return this._removeThousandsSeparators(e.prototype.extractInput.call(this,t,i,n))};t.prototype._appendCharRaw=function(e,i){if(i===void 0){i={}}var n=i.tail&&i._beforeTailState?i._beforeTailState._value:this._value;var s=this._separatorsCountFromSlice(n);this._value=this._removeThousandsSeparators(this.value);var r=this._value;this._value+=e;var o=this.number;var a=!isNaN(o);var u=false;if(a){var c=void 0;if(this.min!=null&&this.min<0&&this.number<this.min)c=this.min;if(this.max!=null&&this.max>0&&this.number>this.max)c=this.max;if(c!=null){if(this.autofix){this._value=this.format(c,this).replace(t.UNMASKED_RADIX,this.radix);u||(u=r===this._value&&!i.tail)}else{a=false}}a&&(a=Boolean(this._value.match(this._numberRegExp)))}var l;if(!a){this._value=r;l=new ChangeDetails}else{l=new ChangeDetails({inserted:this._value.slice(r.length),rawInserted:u?"":e,skip:u})}this._value=this._insertThousandsSeparators(this._value);var d=i.tail&&i._beforeTailState?i._beforeTailState._value:this._value;var h=this._separatorsCountFromSlice(d);l.tailShift+=(h-s)*this.thousandsSeparator.length;return l};t.prototype._findSeparatorAround=function(e){if(this.thousandsSeparator){var t=e-this.thousandsSeparator.length+1;var i=this.value.indexOf(this.thousandsSeparator,t);if(i<=e)return i}return-1};t.prototype._adjustRangeWithSeparators=function(e,t){var i=this._findSeparatorAround(e);if(i>=0)e=i;var n=this._findSeparatorAround(t);if(n>=0)t=n+this.thousandsSeparator.length;return[e,t]};t.prototype.remove=function(e,t){var i;if(e===void 0){e=0}if(t===void 0){t=this.displayValue.length}i=this._adjustRangeWithSeparators(e,t),e=i[0],t=i[1];var n=this.value.slice(0,e);var s=this.value.slice(t);var r=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+s));var o=this._separatorsCountFromSlice(n);return new ChangeDetails({tailShift:(o-r)*this.thousandsSeparator.length})};t.prototype.nearestInputPos=function(e,t){if(!this.thousandsSeparator)return e;switch(t){case DIRECTION.NONE:case DIRECTION.LEFT:case DIRECTION.FORCE_LEFT:{var i=this._findSeparatorAround(e-1);if(i>=0){var n=i+this.thousandsSeparator.length;if(e<n||this.value.length<=n||t===DIRECTION.FORCE_LEFT){return i}}break}case DIRECTION.RIGHT:case DIRECTION.FORCE_RIGHT:{var s=this._findSeparatorAround(e);if(s>=0){return s+this.thousandsSeparator.length}}}return e};t.prototype.doCommit=function(){if(this.value){var t=this.number;var i=t;if(this.min!=null)i=Math.max(i,this.min);if(this.max!=null)i=Math.min(i,this.max);if(i!==t)this.unmaskedValue=this.format(i,this);var n=this.value;if(this.normalizeZeros)n=this._normalizeZeros(n);if(this.padFractionalZeros&&this.scale>0)n=this._padFractionalZeros(n);this._value=n}e.prototype.doCommit.call(this)};t.prototype._normalizeZeros=function(e){var t=this._removeThousandsSeparators(e).split(this.radix);t[0]=t[0].replace(/^(\D*)(0*)(\d*)/,(function(e,t,i,n){return t+n}));if(e.length&&!/\d$/.test(t[0]))t[0]=t[0]+"0";if(t.length>1){t[1]=t[1].replace(/0*$/,"");if(!t[1].length)t.length=1}return this._insertThousandsSeparators(t.join(this.radix))};t.prototype._padFractionalZeros=function(e){if(!e)return e;var t=e.split(this.radix);if(t.length<2)t.push("");t[1]=t[1].padEnd(this.scale,"0");return t.join(this.radix)};t.prototype.doSkipInvalid=function(i,n,s){if(n===void 0){n={}}var r=this.scale===0&&i!==this.thousandsSeparator&&(i===this.radix||i===t.UNMASKED_RADIX||this.mapToRadix.includes(i));return e.prototype.doSkipInvalid.call(this,i,n,s)&&!r};Object.defineProperty(t.prototype,"unmaskedValue",{get:function(){return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix,t.UNMASKED_RADIX)},set:function(t){e.prototype.unmaskedValue=t},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"typedValue",{get:function(){return this.parse(this.unmaskedValue,this)},set:function(e){this.rawInputValue=this.format(e,this).replace(t.UNMASKED_RADIX,this.radix)},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"number",{get:function(){return this.typedValue},set:function(e){this.typedValue=e},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allowNegative",{get:function(){return this.min!=null&&this.min<0||this.max!=null&&this.max<0},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"allowPositive",{get:function(){return this.min!=null&&this.min>0||this.max!=null&&this.max>0},enumerable:false,configurable:true});t.prototype.typedValueEquals=function(i){return(e.prototype.typedValueEquals.call(this,i)||t.EMPTY_VALUES.includes(i)&&t.EMPTY_VALUES.includes(this.typedValue))&&!(i===0&&this.value==="")};return t}(Masked);_MaskedNumber=MaskedNumber;MaskedNumber.UNMASKED_RADIX=".";MaskedNumber.EMPTY_VALUES=__spreadArray(__spreadArray([],Masked.EMPTY_VALUES,true),[0],false);MaskedNumber.DEFAULTS=__assign(__assign({},Masked.DEFAULTS),{mask:Number,radix:",",thousandsSeparator:"",mapToRadix:[_MaskedNumber.UNMASKED_RADIX],min:Number.MIN_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,scale:2,normalizeZeros:true,padFractionalZeros:false,parse:Number,format:function(e){return e.toLocaleString("en-US",{useGrouping:false,maximumFractionDigits:20})}});IMask.MaskedNumber=MaskedNumber;var PIPE_TYPE={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function createPipe(e,t,i){if(t===void 0){t=PIPE_TYPE.MASKED}if(i===void 0){i=PIPE_TYPE.MASKED}var n=createMask(e);return function(e){return n.runIsolated((function(n){n[t]=e;return n[i]}))}}function pipe(e,t,i,n){return createPipe(t,i,n)(e)}IMask.PIPE_TYPE=PIPE_TYPE;IMask.createPipe=createPipe;IMask.pipe=pipe;var RepeatBlock=function(e){__extends(t,e);function t(t){return e.call(this,t)||this}Object.defineProperty(t.prototype,"repeatFrom",{get:function(){var e;return(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===Infinity?0:this.repeat)!=null?e:0},enumerable:false,configurable:true});Object.defineProperty(t.prototype,"repeatTo",{get:function(){var e;return(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)!=null?e:Infinity},enumerable:false,configurable:true});t.prototype.updateOptions=function(t){e.prototype.updateOptions.call(this,t)};t.prototype._update=function(t){var i,n,s;var r=normalizeOpts(t),o=r.repeat,a=__rest(r,["repeat"]);this._blockOpts=Object.assign({},this._blockOpts,a);var u=createMask(this._blockOpts);this.repeat=(i=(n=o!=null?o:u.repeat)!=null?n:this.repeat)!=null?i:Infinity;e.prototype._update.call(this,{mask:"m".repeat(Math.max(this.repeatTo===Infinity&&((s=this._blocks)==null?void 0:s.length)||0,this.repeatFrom)),blocks:{m:u},eager:u.eager,overwrite:u.overwrite,skipInvalid:u.skipInvalid,lazy:u.lazy,placeholderChar:u.placeholderChar,displayChar:u.displayChar})};t.prototype._allocateBlock=function(e){if(e<this._blocks.length)return this._blocks[e];if(this.repeatTo===Infinity||this._blocks.length<this.repeatTo){this._blocks.push(createMask(this._blockOpts));this.mask+="m";return this._blocks[this._blocks.length-1]}};t.prototype._appendCharRaw=function(e,t){if(t===void 0){t={}}var i=new ChangeDetails;for(var n=(o=(a=this._mapPosToBlock(this.displayValue.length))==null?void 0:a.index)!=null?o:Math.max(this._blocks.length-1,0),s=void 0,r=void 0;s=(u=this._blocks[n])!=null?u:r=!r&&this._allocateBlock(n);++n){var o,a,u,c;var l=s._appendChar(e,__assign(__assign({},t),{_beforeTailState:(c=t._beforeTailState)==null||(c=c._blocks)==null?void 0:c[n]}));if(l.skip&&r){this._blocks.pop();this.mask=this.mask.slice(1);break}i.aggregate(l);if(l.consumed)break}return i};t.prototype._trimEmptyTail=function(e,t){var i,n;if(e===void 0){e=0}var s=Math.max(((i=this._mapPosToBlock(e))==null?void 0:i.index)||0,this.repeatFrom,0);var r;if(t!=null)r=(n=this._mapPosToBlock(t))==null?void 0:n.index;if(r==null)r=this._blocks.length-1;var o=0;for(var a=r;s<=a;--a,++o){if(this._blocks[a].unmaskedValue)break}if(o){this._blocks.splice(r-o+1,o);this.mask=this.mask.slice(o)}};t.prototype.reset=function(){e.prototype.reset.call(this);this._trimEmptyTail()};t.prototype.remove=function(t,i){if(t===void 0){t=0}if(i===void 0){i=this.displayValue.length}var n=e.prototype.remove.call(this,t,i);this._trimEmptyTail(t,i);return n};t.prototype.totalInputPositions=function(t,i){if(t===void 0){t=0}if(i==null&&this.repeatTo===Infinity)return Infinity;return e.prototype.totalInputPositions.call(this,t,i)};Object.defineProperty(t.prototype,"state",{get:function(){return e.prototype.state},set:function(t){this._blocks.length=t._blocks.length;this.mask=this.mask.slice(0,this._blocks.length);e.prototype.state=t},enumerable:false,configurable:true});return t}(MaskedPattern);IMask.RepeatBlock=RepeatBlock;try{globalThis.IMask=IMask}catch(e){}var verdocsKbaDialogCss='@-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-kba-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .input{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:10px;-ms-flex-align:center;align-items:center;margin:16px 0 32px}verdocs-kba-dialog .input label{-ms-flex:0;flex:0;line-height:10px;font-weight:500;white-space:nowrap}verdocs-kba-dialog .input input{-ms-flex:1;flex:1;padding:5px 8px;border-radius:3px;border:1px solid #cccccc}verdocs-kba-dialog .field{gap:10px;display:-ms-flexbox;display:flex;max-width:100%;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;margin:0 0 4px 0}verdocs-kba-dialog .field verdocs-text-input{width:100%;margin-bottom:0}verdocs-kba-dialog .field verdocs-text-input .input-element{color:#5f5c5c;font-size:14px}verdocs-kba-dialog .field verdocs-select-input{width:100%;margin-bottom:0}verdocs-kba-dialog .field input.date-input{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:34px;padding:0 9px;outline:none}verdocs-kba-dialog .field .required{color:red;position:relative;top:-0.5em;font-size:80%}verdocs-kba-dialog .field label{-ms-flex:0 0 120px;flex:0 0 120px;font-size:12px;font-weight:500;line-height:10px;text-align:right;white-space:nowrap}verdocs-kba-dialog .field verdocs-date-input{width:40%;-ms-flex-positive:1;flex-grow:1}verdocs-kba-dialog .field verdocs-date-input input{width:100%;color:#5f5c5c;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .field.agree span{margin-top:8px;font-size:12px;line-height:14px;font-style:italic}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;font-size:14px;padding:0 5px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';var States={AL:"Alabama",AK:"Alaska",AS:"American Samoa",AZ:"Arizona",AR:"Arkansas",CA:"California",CO:"Colorado",CT:"Connecticut",DE:"Delaware",DC:"District Of Columbia",FM:"Federated States Of Micronesia",FL:"Florida",GA:"Georgia",GU:"Guam",HI:"Hawaii",ID:"Idaho",IL:"Illinois",IN:"Indiana",IA:"Iowa",KS:"Kansas",KY:"Kentucky",LA:"Louisiana",ME:"Maine",MH:"Marshall Islands",MD:"Maryland",MA:"Massachusetts",MI:"Michigan",MN:"Minnesota",MS:"Mississippi",MO:"Missouri",MT:"Montana",NE:"Nebraska",NV:"Nevada",NH:"New Hampshire",NJ:"New Jersey",NM:"New Mexico",NY:"New York",NC:"North Carolina",ND:"North Dakota",MP:"Northern Mariana Islands",OH:"Ohio",OK:"Oklahoma",OR:"Oregon",PW:"Palau",PA:"Pennsylvania",PR:"Puerto Rico",RI:"Rhode Island",SC:"South Carolina",SD:"South Dakota",TN:"Tennessee",TX:"Texas",UT:"Utah",VT:"Vermont",VI:"Virgin Islands",VA:"Virginia",WA:"Washington",WV:"West Virginia",WI:"Wisconsin",WY:"Wyoming"};var STATE_OPTIONS=Object.entries(States).map((function(e){var t=e[0],i=e[1];return{value:t,label:i}}));var QuestionIcon='<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>';var VerdocsKbaDialog=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit");this.pinEntered=createEvent(this,"pinEntered");this.next=createEvent(this,"next");this.step=1;this.steps=3;this.helptitle="Previous Addresses";this.helptext="Please select the address below that you have most recently lived at.";this.mode="choice";this.label="PIN";this.placeholder="Enter your PIN...";this.recipient=null;this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"];this.agreed=false;this.response="";this.updatedRecipient=null;this.dobContainerId="verdocs-date-input-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentWillLoad=function(){this.updatedRecipient=__assign({},this.recipient||{})};e.prototype.componentDidRender=function(){IMask(document.getElementById(this.dobContainerId),{mask:Date,min:new Date(1920,0,1),max:new Date(Date.now()-86400*18*365*1e3),lazy:false,pattern:"m/d/Y",format:function(e){var t=e.getDate();var i=e.getMonth()+1;var n=e.getFullYear();if(t<10)t="0"+t;if(i<10)i="0"+i;return[i,t,n].join("/")},parse:function(e){var t=e.split("/");return new Date(t[2],t[0]-1,t[1])}})};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleDismiss=function(e){if(e.target.class==="background-overlay"){e.preventDefault();this.handleCancel()}};e.prototype.handleDone=function(){this.next.emit(this.response);this.response=""};e.prototype.handleConfirmID=function(){console.log("Confirm ID",this.updatedRecipient);this.next.emit(this.updatedRecipient)};e.prototype.render=function(){var e=this;var t,i,n,s,r,o,a,u,c,l,d,f,b,v;if(this.mode==="choice"){return h("verdocs-dialog",null,h("div",{slot:"heading",class:"heading"},h("div",{class:"icon"},h("svg",{width:"22",height:"19",viewBox:"0 0 22 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("g",{"clip-path":"url(#clip0_34208_4881)"},h("path",{d:"M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z",fill:"white"})),h("defs",null,h("clipPath",{id:"clip0_34208_4881"},h("path",{d:"M0.875 0.75H21.125V18.75H0.875V0.75Z",fill:"white"}))))),h("div",{class:"title"},"Please Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null))),h("div",{slot:"content",class:"content"},!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"choices"},this.choices.map((function(t){return h("div",{class:"choice ".concat(t===e.response?"selected":""),onClick:function(){console.log("Selected",t);e.response=t}},t)})))),h("div",{class:"footer",slot:"footer"},h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:this.step<this.steps?"Next":"Submit",onClick:function(){return e.handleDone()},disabled:!this.response}))))}if(this.mode==="identity"){return h("verdocs-dialog",null,h("div",{slot:"heading",class:"heading"},h("div",{class:"icon"},h("svg",{width:"22",height:"19",viewBox:"0 0 22 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("g",{"clip-path":"url(#clip0_34208_4881)"},h("path",{d:"M3.125 0.75C1.88398 0.75 0.875 1.75898 0.875 3V16.5C0.875 17.741 1.88398 18.75 3.125 18.75H12.125C13.366 18.75 14.375 17.741 14.375 16.5V15.8215C14.2801 15.8602 14.1852 15.8918 14.0867 15.9164L11.9738 16.4437C11.8684 16.4684 11.7629 16.4859 11.6574 16.493C11.6258 16.4965 11.5941 16.5 11.5625 16.5H9.3125C9.09805 16.5 8.90469 16.3805 8.80977 16.1906L8.50039 15.5684C8.44062 15.4488 8.32109 15.375 8.19102 15.375C8.06094 15.375 7.93789 15.4488 7.88164 15.5684L7.57227 16.1906C7.47031 16.398 7.24883 16.5211 7.02031 16.5C6.7918 16.4789 6.59492 16.3207 6.53164 16.1027L5.9375 14.1445L5.59297 15.2977C5.37852 16.0113 4.72109 16.5 3.97578 16.5H3.6875C3.37812 16.5 3.125 16.2469 3.125 15.9375C3.125 15.6281 3.37812 15.375 3.6875 15.375H3.97578C4.22539 15.375 4.44336 15.2133 4.51367 14.9742L5.0375 13.234C5.15703 12.8367 5.52266 12.5625 5.9375 12.5625C6.35234 12.5625 6.71797 12.8367 6.8375 13.234L7.24531 14.591C7.50547 14.373 7.83594 14.25 8.1875 14.25C8.74648 14.25 9.25625 14.5664 9.50586 15.0656L9.66055 15.375H9.97344C9.86445 15.0656 9.84336 14.7281 9.92422 14.3977L10.4516 12.2848C10.55 11.8875 10.7539 11.5289 11.0422 11.2406L14.375 7.90781V6.375H9.875C9.25273 6.375 8.75 5.87227 8.75 5.25V0.75H3.125ZM9.875 0.75V5.25H14.375L9.875 0.75ZM20.2039 5.66133C19.6555 5.11289 18.766 5.11289 18.2141 5.66133L17.1805 6.69492L19.6766 9.19102L20.7102 8.15742C21.2586 7.60898 21.2586 6.71953 20.7102 6.16758L20.2039 5.66133ZM11.8402 12.0352C11.6961 12.1793 11.5941 12.3586 11.5449 12.559L11.0176 14.6719C10.9684 14.8652 11.0246 15.0656 11.1652 15.2063C11.3059 15.3469 11.5062 15.4031 11.6996 15.3539L13.8125 14.8266C14.0094 14.7773 14.1922 14.6754 14.3363 14.5312L18.8785 9.98555L16.3824 7.48945L11.8402 12.0352Z",fill:"white"})),h("defs",null,h("clipPath",{id:"clip0_34208_4881"},h("path",{d:"M0.875 0.75H21.125V18.75H0.875V0.75Z",fill:"white"}))))),h("div",{class:"title"},"Please Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null))),h("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),h("div",{slot:"content",class:"content"},h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-first"},"Your Name:",h("span",{class:"required"},"*")),h("verdocs-text-input",{placeholder:"First name...",value:(t=this.updatedRecipient)===null||t===void 0?void 0:t.first_name,onInput:function(t){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{first_name:t.target.value})},onClick:function(e){return e.stopPropagation()}}),h("verdocs-text-input",{placeholder:"Last name...",value:(i=this.updatedRecipient)===null||i===void 0?void 0:i.last_name,onInput:function(t){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{last_name:t.target.value})},onClick:function(e){return e.stopPropagation()}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-address"},"Address:",h("span",{class:"required"},"*")),h("verdocs-text-input",{placeholder:"Address...",value:(n=this.updatedRecipient)===null||n===void 0?void 0:n.address,onInput:function(t){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{address:t.target.value})},onClick:function(e){return e.stopPropagation()}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-city"},"City:"),h("verdocs-text-input",{placeholder:"City...",value:(s=this.updatedRecipient)===null||s===void 0?void 0:s.city,onInput:function(t){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{city:t.target.value})},onClick:function(e){return e.stopPropagation()}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-state"},"State:"),h("verdocs-select-input",{options:STATE_OPTIONS,value:(r=this.updatedRecipient)===null||r===void 0?void 0:r.state,onInput:function(t){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{state:t.target.value})}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-zip"},"Zip Code:",h("span",{class:"required"},"*")),h("verdocs-text-input",{required:true,placeholder:"Zip Code...",value:(o=this.updatedRecipient)===null||o===void 0?void 0:o.zip,onInput:function(t){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{zip:t.target.value})},onClick:function(e){return e.stopPropagation()}})),h("div",{class:"field"},h("label",{htmlFor:"verdocs-kba-ssn"},"SSN Last 4:",h("span",{class:"required"},"*")),h("verdocs-text-input",{placeholder:"Last 4 digits of your Social Security Number...",required:true,value:(a=this.updatedRecipient)===null||a===void 0?void 0:a.ssn_last_4,onInput:function(t){return e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{ssn_last_4:t.target.value})},onClick:function(e){return e.stopPropagation()}})),h("div",{class:"field"},h("label",{htmlFor:this.dobContainerId},"Date of Birth:",h("span",{class:"required"},"*")),h("input",{type:"text",class:"date-input",value:((u=this.updatedRecipient)===null||u===void 0?void 0:u.dob)||"",id:this.dobContainerId,placeholder:"DOB...",onInput:function(e){e.stopPropagation()},onBlur:function(t){e.updatedRecipient=__assign(__assign({},e.updatedRecipient),{dob:t.target.value})}})),h("div",{class:"field agree"},h("label",null),h("verdocs-checkbox",{id:"verdocs-kba-agree",name:"verdocs-kba-agree",checked:this.agreed,onInput:function(t){return e.agreed=t.target.checked}}),h("span",null,"I agree to provide my personal information in order to validate my identity."))),h("div",{class:"footer",slot:"footer"},h("div",{class:"buttons"},h("verdocs-button",{label:"Submit",onClick:function(){return e.handleConfirmID()},disabled:!this.agreed||!((c=this.updatedRecipient)===null||c===void 0?void 0:c.first_name)||!((l=this.updatedRecipient)===null||l===void 0?void 0:l.last_name)||!((d=this.updatedRecipient)===null||d===void 0?void 0:d.address)||!((f=this.updatedRecipient)===null||f===void 0?void 0:f.zip)||!((b=this.updatedRecipient)===null||b===void 0?void 0:b.ssn_last_4)||!((v=this.updatedRecipient)===null||v===void 0?void 0:v.dob)}))))}return h("verdocs-dialog",null,h("div",{class:"heading"},"Please Confirm Your Identity",this.steps>1?h("span",{class:"step"},"(",this.step,"/",this.steps,")"):h(Fragment,null)),h("div",{slot:"content",class:"content"},!!this.helptitle&&h("div",{class:"help-box"},h("div",{class:"help-icon",innerHTML:QuestionIcon}),h("div",{class:"help-details"},h("div",{class:"help-title"},this.helptitle),h("div",{class:"help-text"},this.helptext))),h("div",{class:"input"},h("label",{htmlFor:"verdocs-kba-input"},this.label),h("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder,value:this.response,onInput:function(t){return e.response=t.target.value}}))),h("div",{class:"footer",slot:"footer"},h("div",{class:"buttons"},h("verdocs-button",{label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{label:"Submit",onClick:function(){return e.handleDone()},disabled:!this.response}))))};return e}();VerdocsKbaDialog.style=verdocsKbaDialogCss;var verdocsOtpDialogCss='@-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-otp-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-otp-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;width:100%;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}verdocs-otp-dialog .heading .title{font-size:20px;font-weight:500}verdocs-otp-dialog .step{margin-left:6px;color:#666}verdocs-otp-dialog .help-box{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:0;-ms-flex-align:center;align-items:center;color:black;margin-bottom:20px}verdocs-otp-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:0;font-size:14px;gap:5px}verdocs-otp-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-otp-dialog .help-text{font-weight:400}verdocs-otp-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;width:100%}verdocs-otp-dialog .buttons verdocs-button{margin-left:16px}';var VerdocsOtpDialog=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit");this.next=createEvent(this,"next");this.resendTimeout=null;this.endpoint=DefaultEndpoint;this.method="email";this.resendDisabled=true;this.response=""}e.prototype.componentDidLoad=function(){var e=this;this.startResendTimeout();setTimeout((function(){verifySigner(e.endpoint,{auth_method:e.method,code:"",resend:true}).then((function(t){console.log("Resend result",t);e.response=""})).catch((function(e){return console.log("Error resending code",e)}))}),1e3)};e.prototype.disconnectedCallback=function(){if(this.resendTimeout){clearTimeout(this.resendTimeout);this.resendTimeout=null}};e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.startResendTimeout=function(){var e=this;this.resendDisabled=true;if(this.resendTimeout){clearTimeout(this.resendTimeout)}this.resendTimeout=setTimeout((function(){e.resendDisabled=false}),3e4)};e.prototype.handleResend=function(){var e=this;this.startResendTimeout();verifySigner(this.endpoint,{auth_method:this.method,code:"",resend:true}).then((function(t){console.log("Resend result",t);e.response="";VerdocsToast("A new code has been sent.")})).catch((function(e){return console.log("Error resending code",e)}))};e.prototype.handleSubmit=function(){var e=this;this.startResendTimeout();verifySigner(this.endpoint,{auth_method:this.method,code:this.response}).then((function(t){console.log("Verification completed",t);e.next.emit({response:t});VerdocsToast("Thank you. Your verification was successful.")})).catch((function(e){VerdocsToast("Invalid verification code. Please try again.");console.log("Invalid code",e)}));this.response=""};e.prototype.render=function(){var e=this;return h(Host,{key:"ecaf84eef3e53ae692338460607677962d097b31"},h("verdocs-dialog",{key:"b531cdfd919283405851b5a43913fe795f4cce8f",persistent:true,onExit:function(){return e.handleCancel()}},h("div",{key:"54da95ce96d0405b773515ef49ddaad9b9c72276",slot:"heading",class:"heading"},h("div",{key:"b735ddebd9698ec2efe31685e26ca2a8a49e3dc3",class:"title"},"Verification Required")),h("div",{key:"b6540648758adad3072502fc586a6b3fd64256d2",slot:"content",class:"content"},h("div",{key:"33cf0fc3081a88b611d69d87667e18d554f92679",class:"help-box"},h("div",{key:"3bc51163c47b716330dddd3784f64597c160e4fc",class:"help-details"},h("div",{key:"1ef149292dc778226d2d355e7584705026e77448",class:"help-text"},"Please check your messages for a one-time code. If you did not receive it, be sure to check your Spam/Junk folder."))),h("verdocs-text-input",{key:"949191230f513a5b5143e18e04ff30269bcc7510",id:"verdocs-otp-input",value:this.response,onClick:function(e){return e.stopPropagation()},placeholder:"Enter your one-time code...",onInput:function(t){return e.response=t.target.value}})),h("div",{key:"d6aff838436e27bce86c26042b3f3304facb57d6",slot:"footer",class:"buttons footer"},h("verdocs-button",{key:"5a9901a8008b175973d8267073c73d90fc1339d0",label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{key:"aecbb15e8f06b719e6f2ba1ca5540d67c21e9870",label:"Resend",onClick:function(){return e.handleResend()},disabled:this.resendDisabled}),h("verdocs-button",{key:"1b802998ad367aba240b8c09ff9b3dcd6bee04f6",label:"Submit",onClick:function(){return e.handleSubmit()},disabled:!this.response}))))};return e}();VerdocsOtpDialog.style=verdocsOtpDialogCss;var verdocsPasscodeDialogCss='@-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-passcode-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-passcode-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-passcode-dialog .heading{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-passcode-dialog .heading .title{font-size:20px;font-weight:500}verdocs-passcode-dialog .step{color:#666;margin-left:6px}verdocs-passcode-dialog .help-box{padding:0;color:black;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;margin-bottom:20px}verdocs-passcode-dialog .help-details{gap:5px;display:-ms-flexbox;display:flex;margin-left:0;font-size:14px;-ms-flex-direction:column;flex-direction:column}verdocs-passcode-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-passcode-dialog .help-text{font-weight:400}verdocs-passcode-dialog .buttons{width:100%;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-passcode-dialog .buttons verdocs-button{margin-left:16px}';var VerdocsPasscodeDialog=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit");this.next=createEvent(this,"next");this.endpoint=DefaultEndpoint;this.response=""}e.prototype.handleCancel=function(){this.exit.emit()};e.prototype.handleSubmit=function(){var e=this;verifySigner(this.endpoint,{auth_method:"passcode",code:this.response}).then((function(t){console.log("Verification completed",t);e.next.emit({response:t})})).catch((function(e){VerdocsToast("Invalid passcode. Please try again.");console.log("Invalid code",e)}));this.response=""};e.prototype.render=function(){var e=this;return h(Host,{key:"2245741387cb0a6de01b2d086eb8f1822d81b659"},h("verdocs-dialog",{key:"f5bd8c6b75538c72406a043a48472a9f99edf30e",persistent:true,onExit:function(){return e.handleCancel()}},h("div",{key:"780c980ffd4939ef131776604e8bd3d11f8f2f32",slot:"heading",class:"heading"},h("div",{key:"fe99075a74a8c836938e8839487a4712c4c59f6b",class:"title"},"Passcode Required")),h("div",{key:"5bd8e332fe6f00f68befc5bf144413d4b3940dba",slot:"content",class:"content"},h("div",{key:"19690eb0a5ef4728ab73d59eea6b669f992e27f3",class:"help-box"},h("div",{key:"1d4b2bc585f488f43de03cc127d0d99885c13f9c",class:"help-details"},h("div",{key:"f0a990be9fc50a65c9c687ae178f079488f180a3",class:"help-text"},"This document is protected by a passcode. Please enter it below to proceed. If you do not have one, please contact the sender."))),h("verdocs-text-input",{key:"b175dff7b70cd87be1895b8ab2671a8abb712c51",id:"verdocs-passcode-input",value:this.response,onClick:function(e){return e.stopPropagation()},placeholder:"Enter passcode...",onInput:function(t){return e.response=t.target.value}})),h("div",{key:"c0bd79bdf1018a8f017dc5035a0d2ce474e6d943",slot:"footer",class:"buttons footer"},h("verdocs-button",{key:"333ed06c31a3e915d91919994d5ac111dbc98a4e",label:"Cancel",variant:"outline",onClick:function(){return e.handleCancel()}}),h("verdocs-button",{key:"0e34c22fe738df2f7fdc6ae7a24ddc9a7f4a9c09",label:"Submit",onClick:function(){return e.handleSubmit()},disabled:!this.response}))))};return e}();VerdocsPasscodeDialog.style=verdocsPasscodeDialogCss;var verdocsSigningProgressCss='@-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-signing-progress{position:fixed;top:64px;left:20px;z-index:900;display:block;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}@media (max-width: 600px){verdocs-signing-progress{display:none}}verdocs-signing-progress .card{background:white;padding:16px;border-radius:8px;-webkit-box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);width:240px;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:12px}verdocs-signing-progress .header{font-size:14px;color:#111827;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:6px}verdocs-signing-progress .header .progress-line.optional{color:#6b7280}verdocs-signing-progress .header-completed{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;font-size:14px;font-weight:500;color:#111827}verdocs-signing-progress .description{font-size:12px;line-height:16px;color:#374151}verdocs-signing-progress .field-label{font-family:var(--verdocs-primary-font, var(--verdocs-primary-font, "Inter", "Barlow", sans-serif));font-size:0.75rem;line-height:1rem;font-weight:400;color:var(--verdocs-body-color, #242424)}verdocs-signing-progress .field-completed{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:8px;font-size:0.75rem;line-height:1rem;font-weight:400;color:var(--verdocs-body-color, #242424)}verdocs-signing-progress .field-completed .text{position:relative;top:-2px}verdocs-signing-progress .separator{height:1px;background-color:#e5e7eb;width:100%}verdocs-signing-progress .btn{width:100%;height:32px;border-radius:4px;font-weight:600;font-size:0.75rem;line-height:1rem;cursor:pointer;border:1px solid transparent;-webkit-transition:all 0.2s;transition:all 0.2s;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-signing-progress .btn:disabled{background-color:#f0f0f0;border:1px solid #e0e0e0;color:#bdbdbd;cursor:not-allowed;opacity:1}verdocs-signing-progress .btn.start,verdocs-signing-progress .btn.submit,verdocs-signing-progress .btn.next{background-color:var(--verdocs-primary-color, #55bc81);color:white}verdocs-signing-progress .btn.start:hover:not(:disabled),verdocs-signing-progress .btn.submit:hover:not(:disabled),verdocs-signing-progress .btn.next:hover:not(:disabled){background-color:var(--verdocs-primary-color-hover, #2b995b)}verdocs-signing-progress .btn.start:disabled,verdocs-signing-progress .btn.submit:disabled,verdocs-signing-progress .btn.next:disabled{background-color:#f0f0f0;border:1px solid #e0e0e0;color:#bdbdbd;cursor:not-allowed;opacity:1}verdocs-signing-progress .btn.prev,verdocs-signing-progress .btn.previous{background-color:#f3f4f6;color:#374151}verdocs-signing-progress .btn.prev:hover:not(:disabled),verdocs-signing-progress .btn.previous:hover:not(:disabled){background-color:#e5e7eb}verdocs-signing-progress .btn.prev:disabled,verdocs-signing-progress .btn.previous:disabled{background-color:#f0f0f0;border:1px solid #e0e0e0;color:#bdbdbd;cursor:not-allowed;opacity:1}verdocs-signing-progress .nav-buttons{display:-ms-flexbox;display:flex;gap:12px;width:100%}verdocs-signing-progress .nav-buttons .btn{-ms-flex:1;flex:1}';var VerdocsSigningProgress=function(){function e(e){registerInstance(this,e);this.started=createEvent(this,"started");this.next=createEvent(this,"next");this.previous=createEvent(this,"previous");this.exit=createEvent(this,"exit");this.current=0;this.total=0;this.mode="start";this.fieldLabel="";this.fieldCompleted=false;this.remainingFields=[];this.progress=null}e.prototype.renderSuccessIcon=function(){return h("svg",{width:"24",height:"24",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},h("path",{d:"M10 2C14.4183 2 18 5.58172 18 10C18 14.4183 14.4183 18 10 18C5.58172 18 2 14.4183 2 10C2 5.58172 5.58172 2 10 2ZM10 3C6.13401 3 3 6.13401 3 10C3 13.866 6.13401 17 10 17C13.866 17 17 13.866 17 10C17 6.13401 13.866 3 10 3ZM13.3584 7.64645C13.532 7.82001 13.5513 8.08944 13.4163 8.28431L13.3584 8.35355L9.35355 12.3584C9.17999 12.532 8.91056 12.5513 8.71569 12.4163L8.64645 12.3584L6.64645 10.3584C6.45118 10.1632 6.45118 9.84658 6.64645 9.65131C6.82001 9.47775 7.08944 9.45846 7.28431 9.59346L7.35355 9.65131L9 11.298L12.6513 7.64645C12.8466 7.45118 13.1632 7.45118 13.3584 7.64645Z",fill:"#107C10"}))};e.prototype.renderContent=function(){if(this.mode==="start"){return h("div",{class:"field-label"},this.fieldLabel)}if(this.fieldCompleted){return h("div",{class:"field-completed"},h("div",{class:"icon"},this.renderSuccessIcon()),h("span",{class:"text"},"Ready to submit."))}return h("div",{class:"field-label"},this.fieldLabel)};e.prototype.renderFooter=function(){var e=this;if(this.mode==="start"){return h("button",{class:"btn start",onClick:function(){return e.started.emit()}},"Start Signing")}return h("div",{class:"nav-buttons"},this.progress&&this.progress.required.remaining===0?h("button",{class:"btn submit",onClick:function(){return e.exit.emit()}},"Submit"):[h("button",{class:"btn previous",disabled:this.current<=1,onClick:function(){return e.previous.emit()}},"Previous"),h("button",{class:"btn next",disabled:this.current>=this.total,onClick:function(){return e.next.emit()}},"Next")])};e.prototype.renderCompleted=function(){var e=this;return h("div",{class:"card completed"},h("div",{class:"header-completed"},h("div",{class:"icon"},this.renderSuccessIcon()),"Ready to Submit"),h("div",{class:"description"},"You have entered all requested signatures. Select Submit to complete the signing process."),h("div",{class:"separator"}),h("button",{class:"btn submit",onClick:function(){return e.exit.emit()}},"Submit"))};e.prototype.render=function(){if(this.mode==="completed"){return this.renderCompleted()}return h("div",{class:"card"},h("div",{class:"header"},this.progress?[h("div",{class:"progress-line"},this.progress.required.remaining," of ",this.progress.required.total," required fields remaining"),this.progress.optional.total>0?h("div",{class:"progress-line optional"},this.progress.optional.remaining," of ",this.progress.optional.total," optional fields remaining"):null]:this.remainingFields&&this.remainingFields.length>0?"".concat(this.remainingFields.length," fields remaining"):"".concat(this.current," of ").concat(this.total," fields")),h("div",{class:"body"},this.renderContent()),h("div",{class:"separator"}),this.renderFooter())};return e}();VerdocsSigningProgress.style=verdocsSigningProgressCss;var verdocsViewCss='@-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-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:var(--verdocs-primary-font, "Inter", "Barlow", sans-serif)}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;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-view .document .inner{width:100%;max-width:1028px}verdocs-view .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-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;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)}@media all and (max-width: 500px){#verdocs-view-header{padding:0 10px}}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}@media all and (max-width: 500px){#verdocs-view-header .inner{padding:0 10px}}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}';var VerdocsView=function(){function e(e){registerInstance(this,e);this.sdkError=createEvent(this,"sdkError");this.envelopeUpdated=createEvent(this,"envelopeUpdated");this.another=createEvent(this,"another");this.view=createEvent(this,"view");this.next=createEvent(this,"next");this.envelopeListenerId=null;this.endpoint=null;this.envelopeId="";this.headerTargetId=null;this.canceling=false;this.showCancelDone=false;this.showLoadError=false;this.loading=true;this.envelope=null}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,s;return __generator(this,(function(r){switch(r.label){case 0:if(!this.endpoint){this.endpoint=VerdocsEndpoint.getDefault();this.endpoint.loadSession()}if(!this.envelopeId){console.error("[VIEW] Missing required envelopeId");return[2]}return[4,this.listenToEnvelope()];case 1:r.sent();if(!!this.envelope)return[3,5];r.label=2;case 2:r.trys.push([2,4,,5]);console.log("[VIEW] Loading envelope...");n=this;return[4,getEnvelope(this.endpoint,this.envelopeId)];case 3:n.envelope=r.sent();console.log("[VIEW] Loaded envelope",this.envelope);return[3,5];case 4:s=r.sent();this.showLoadError=true;(e=this.sdkError)===null||e===void 0?void 0:e.emit(new SDKError(s.message,(t=s.response)===null||t===void 0?void 0:t.status,(i=s.response)===null||i===void 0?void 0:i.data));return[3,5];case 5:return[2]}}))}))};e.prototype.componentDidRender=function(){var e=this.headerTargetId?document.getElementById(this.headerTargetId):null;var t=document.getElementById("verdocs-view-header");if(e&&t){console.log("[VIEW] Moving header");t.remove();e.append(t)}};e.prototype.disconnectedCallback=function(){this.unlistenToEnvelope()};e.prototype.listenToEnvelope=function(){return __awaiter(this,void 0,void 0,(function(){var e=this;return __generator(this,(function(t){console.log("[VIEW] Loading envelope",this.envelopeId);this.unlistenToEnvelope();Store.subscribe("envelopes",this.envelopeId,(function(){return getEnvelope(e.endpoint,e.envelopeId)}),true,(function(t){e.envelope=t;e.loading=false}));return[2]}))}))};e.prototype.unlistenToEnvelope=function(){if(this.envelopeListenerId){Store.store.delListener(this.envelopeListenerId);this.envelopeListenerId=null}};e.prototype.handlePageRendered=function(e){};e.prototype.handleOptionSelected=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,s,r,o,a,u,c,a;var l=this;return __generator(this,(function(d){switch(d.label){case 0:r=e.detail.id;switch(r){case"cancel":return[3,1];case"print":return[3,2];case"download-attachments":return[3,3];case"download-certificate":return[3,8];case"download-all":return[3,11]}return[3,12];case 1:if(confirm("Are you sure you wish to cancel this envelope? This action cannot be undone.")){this.canceling=true;cancelEnvelope(this.endpoint,this.envelopeId).then((function(e){l.canceling=false;console.log("[VIEW] Envelope canceled",e);return getEnvelope(l.endpoint,l.envelopeId)})).then((function(e){console.log("[VIEW] Loaded new envelope details",e);l.envelope=e})).catch((function(e){var t,i,n;l.canceling=false;console.log("[VIEW] Error canceling envelope",e);(t=l.sdkError)===null||t===void 0?void 0:t.emit(new SDKError(e.message,(i=e.response)===null||i===void 0?void 0:i.status,(n=e.response)===null||n===void 0?void 0:n.data))}));this.showCancelDone=true;(t=this.envelopeUpdated)===null||t===void 0?void 0:t.emit({endpoint:this.endpoint,envelope:this.envelope,event:"canceled"})}return[3,12];case 2:window.print();(i=this.envelopeUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,envelope:this.envelope,event:"printed"});return[3,12];case 3:d.trys.push([3,6,,7]);o=this.envelope.documents.find((function(e){return e.type==="attachment"}));if(!o)return[3,5];return[4,getEnvelopeDocumentDownloadLink(this.endpoint,o.id)];case 4:a=d.sent();window.open(a,"_blank");d.label=5;case 5:return[3,7];case 6:u=d.sent();console.log("Unable to download document",u);VerdocsToast(((s=(n=u.response)===null||n===void 0?void 0:n.data)===null||s===void 0?void 0:s.error)||"Unable to download document. Please try again later.",{style:"error"});return[3,7];case 7:return[3,12];case 8:c=this.envelope.documents.find((function(e){return e.type==="certificate"}));if(!c)return[3,10];return[4,getEnvelopeDocumentDownloadLink(this.endpoint,c.id)];case 9:a=d.sent();window.open(a,"_blank");d.label=10;case 10:return[3,12];case 11:getEnvelopesZip(this.endpoint,[this.envelope.id]).then((function(){var e;(e=l.envelopeUpdated)===null||e===void 0?void 0:e.emit({endpoint:l.endpoint,envelope:l.envelope,event:"downloaded"})})).catch((function(e){console.log("Error downloading Zip",e)}));return[3,12];case 12:return[2]}}))}))};e.prototype.render=function(){var e=this;var t;if(this.loading){return h(Host,null,h("verdocs-loader",null))}if(this.showLoadError){return h(Host,null,h("verdocs-ok-dialog",{heading:"Unable to View Envelope",message:"Sorry, that envelope is not valid.",buttonLabel:"OK",onNext:function(){e.showLoadError=false}}))}if(!this.envelope){return h(Host,null,h("img",{src:"https://public-assets.verdocs.com/loading-placeholder.png",style:{width:"612px",height:"792px",boxShadow:"0 0 10px 5px #0000000f",marginTop:"15px"},alt:"Placeholder page"}))}var i=[{id:"print",label:"Print"}];if(userCanCancelEnvelope(this.endpoint.profile,this.envelope)){i.push({id:"cancel",label:"Cancel"})}var n=userCanCancelEnvelope(this.endpoint.profile,this.envelope);var s=this.envelope.documents.length>0;var r=this.envelope.documents.filter((function(e){return e.type==="attachment"})).length;var o=this.envelope.documents.find((function(e){return e.type==="certificate"}))!==undefined;if(s||o){i.push({label:""});if(s){i.push({id:"download-attachments",label:r>1?"Download Documents":"Download Document"})}if(o){i.push({id:"download-certificate",label:"Download Certificate"})}if(s&&o){i.push({id:"download-all",label:"Download All Files"})}}return h(Host,null,h("div",{id:"verdocs-view-header"},h("div",{class:"inner"},h("img",{src:"https://verdocs.com/assets/white-logo.svg",alt:"Verdocs Logo",class:"logo"}),h("div",{class:"title"},this.envelope.name),h("div",{style:{flex:"1"}}),h("div",{style:{marginLeft:"10px"}}),h("verdocs-dropdown",{options:i,onOptionSelected:function(t){return e.handleOptionSelected(t)}}))),h("div",{class:"document",style:{paddingTop:this.headerTargetId?"70px":"15px"}},(((t=this.envelope)===null||t===void 0?void 0:t.documents)||[]).filter((function(e){return e.type!=="certificate"})).map((function(t){var i=integerSequence(1,t.pages);return h(Fragment,null,i.map((function(i){var n;var s=((n=t.page_sizes)===null||n===void 0?void 0:n[i])||{width:612,height:792};return h("verdocs-envelope-document-page",{envelopeId:e.envelopeId,documentId:t.id,endpoint:e.endpoint,type:"filled",virtualWidth:s.width,virtualHeight:s.height,pageNumber:i,onPageRendered:function(t){return e.handlePageRendered(t)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})})))}))),this.showCancelDone&&h("verdocs-ok-dialog",{heading:"Cancelled",message:"This envelope has been cancelled successfully.",onNext:function(){e.showCancelDone=false}}),this.canceling&&h("div",{class:"loading-indicator"},h("verdocs-loader",null)),!n&&h("verdocs-sign-footer",{endpoint:this.endpoint,envelopeId:this.envelopeId,isDone:true,onAskQuestion:function(){},onDecline:function(){},onFinishLater:function(){}}))};Object.defineProperty(e.prototype,"component",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsView.style=verdocsViewCss;export{VerdocsAdoptSignatureDialog as verdocs_adopt_signature_dialog,VerdocsDelegateDialog as verdocs_delegate_dialog,VerdocsDisclosureDialog as verdocs_disclosure_dialog,VerdocsDownloadDialog as verdocs_download_dialog,VerdocsKbaDialog as verdocs_kba_dialog,VerdocsOtpDialog as verdocs_otp_dialog,VerdocsPasscodeDialog as verdocs_passcode_dialog,VerdocsSigningProgress as verdocs_signing_progress,VerdocsView as verdocs_view};
|
|
2
|
-
//# sourceMappingURL=verdocs-adopt-signature-dialog_9.entry.js.map
|