import{r as i,c as e,h as t,H as a}from"./p-CjTHbolG.js";const o=()=>`verdocs-initial-dialog{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:rgba(0, 0, 0, 0.4980392157)}verdocs-initial-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);background:#f9f9f9}verdocs-initial-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-initial-dialog .content{font-size:14px;padding:20px}verdocs-initial-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-initial-dialog .buttons verdocs-button{margin-left:16px}verdocs-initial-dialog canvas{background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 rgba(0, 0, 0, 0.1215686275);box-shadow:0 0 6px 0 rgba(0, 0, 0, 0.1215686275)}verdocs-initial-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-initial-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-initial-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-initial-dialog .tabs .tab:hover{color:#55bc81}`;const s=class{constructor(t){i(this,t);this.next=e(this,"next");this.exit=e(this,"exit");this.initials="";this.fontLoaded=false;this.enteredInitials="";this.mode="type"}componentWillLoad(){this.enteredInitials=this.initials.toUpperCase();const i=new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)");i.load().then((i=>{document.fonts.add(i);this.fontLoaded=true}))}componentDidLoad(){this.redrawSignature()}componentDidUpdate(){this.redrawSignature()}redrawSignature(){if(!this.canvasElement){return}const i=this.canvasElement.width;const e=this.canvasElement.getContext("2d");e.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);let t=100;do{t-=2;e.font=`${t}px Dancing Script`}while(e.measureText(this.enteredInitials).width>i-32);e.textAlign="center";e.textBaseline="middle";e.font=`${t}px Dancing Script`;e.fillText(this.enteredInitials,this.canvasElement.width/2,this.canvasElement.height/2)}handleNameChange(i){this.enteredInitials=i.target.value}handleCancel(i){i.stopPropagation();i.preventDefault();this.exit.emit()}handleAdopt(i){i.stopPropagation();i.preventDefault();const e=this.canvasElement.toDataURL("image/png");this.next.emit(e)}render(){return t(a,{key:"0b6dd491d0af99d1abe6292f4a6d012a71cd62c7",onClick:i=>this.handleCancel(i)},t("div",{key:"3d2d6486887d049ba2c5f60197aa5f476b922fde",class:"dialog"},t("div",{key:"186ef3be7f6026cad0bfaa244cd98d8c7183c169",class:"heading"},"Create Your Initial"),t("div",{key:"c5e37a3ddbdcac2db94cd56d41db0ecdf58df624",class:"content"},t("verdocs-text-input",{key:"ed1c4cc75029610ba03931449e37b7fc3aa437ad",placeholder:"Initials...",label:"Initials",value:this.enteredInitials,onInput:i=>this.handleNameChange(i),onClick:i=>i.stopPropagation()}),t("div",{key:"1597920974326992c60180a83c63b9ae54280113",class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?t("canvas",{ref:i=>this.canvasElement=i}):t("div",{style:{display:"none"}}),t("div",{key:"d388ed076550e566c711e15a832bd954dd80ba17",class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),t("div",{key:"1bab8f70eaa8b7bb7eabfd5a64b837ada9879733",class:"buttons"},t("verdocs-button",{key:"37864544ac1d1b57c67e316cfe1bf524286d5aae",label:"CANCEL",size:"normal",variant:"outline",onClick:i=>this.handleCancel(i)}),t("verdocs-button",{key:"586ce5016c2b9b0eaee12c0bfe1757fbffad564f",label:"Adopt & Sign",size:"normal",onClick:i=>this.handleAdopt(i)})))))}};s.style=o();export{s as verdocs_initial_dialog};
//# sourceMappingURL=p-ed953cca.entry.js.map