PageSourceSearch

https://my.thecornerstonebank.net/en/js/bannoweb-ensenta-deposit-tJfK7sig.js

js thecornerstonebank.net collected 2026-10-01 16:20:41 UTC 48,917 bytes, 1 lines download raw bytes

1import{a as e,n as t}from"./standalone-app-Bj-IdwrG.js";import{n,r}from"./polymer-C_GypsRJ.js";import{E as i,_ as a,v as o,x as s}from"./institution-DyFDvNu6.js";import{t as c}from"./display-strings-MZHh2uw2.js";import{t as l}from"./page-B8YwBOEr.js";import{t as u}from"./date-URgChy6n.js";import{_r as d,i as f,o as p,tt as m,vr as h}from"./main-5Sl8yySz.js";import"./jha-progress-CjUOO3no.js";import"./jha-card-DC-UH8vN.js";import"./jha-card-header-D2XWRnD9.js";import"./jha-button-Dyau4S4K.js";import{t as g}from"./observable-models-D0t-na9H.js";import{t as _}from"./language-utils-DMDnwVwz.js";import"./jha-link-button-k4YCp-l3.js";import"./bannoweb-flex-wrapper-DLiUDxGK.js";import{d as v}from"./banno-styles-B3iGgKv1.js";import"./bannoweb-dialog-6PdYs8ag.js";import{t as y}from"./bannoweb-confirmation-dialog-6ZiCES-9.js";import"./jha-list-UCQUTbOQ.js";import"./jha-slider-pane-CG5LkspN.js";import"./bannoweb-page-container-G_uPsQAr.js";import{t as b}from"./format-currency-DWww8Snc.js";import"./bannoweb-currency-B8mbcVJL.js";import"./jha-form-floating-group-DqE4-9IH.js";import"./jha-form-currency-input-CKJz-yxs.js";import{t as x}from"./script-loader-DzaIbM5B.js";var S=`/en/js/mitekMobileWeb-D1b8ZUut.js`,C=`/en/js/MitekMobileWebAPI-P1p3DxvZ.js`,w=`/en/js/MitekAPIUtils-BAFWmuQR.js`,T=`/en/js/piexif-DPbLDPHe.js`,E=p.ensentaController,D={MONITOR:1,FLASHING:2,STILL:3,SAVED:4},O=_(n);window.BannowebEnsentaDesktopCaptureDialogElement=class extends O{static get is(){return`bannoweb-ensenta-desktop-capture-dialog`}static get properties(){return{imageData:{type:String,value:null},videoReady:{type:Boolean,value:!1},checkSide:String}}constructor(){super(),e(()=>import(`./icon-xmark-DBOKkGIi.js`).then(e=>e.t),[]),this.stream=null,this.video=null,this.canvas=null,this.paintState=D.MONITOR,this.animationFrame=0,this.stillCanvas=null,this.savedImage=null}connectedCallback(){super.connectedCallback(),this.video=this.shadowRoot.querySelector(`video`),this.canvas=this.shadowRoot.querySelector(`canvas`),E.getCameraStream().then(e=>{this.stream=e,this.video.srcObject=e,this.video.play(),this.video.addEventListener(`canplay`,e=>{this.videoReady=!0})}).catch(e=>{t.console.error(`error getting stream`,e)}),this.imageData&&(this.savedImage=new Image,this.savedImage.setAttribute(`width`,`480`),this.savedImage.setAttribute(`height`,`270`),this.savedImage.onload=()=>{this.paintState=D.SAVED},this.savedImage.src=this.imageData),this.paintCanvas()}disconnectedCallback(){super.disconnectedCallback(),window.cancelAnimationFrame(this.animationFrame),this.stream&&this.stream.getTracks().forEach(e=>{e.readyState==`live`&&e.stop()})}onCloseDialog(e){this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))}onClickCaptureOrContinue(e){this.imageData?(this.dispatchEvent(new CustomEvent(`image-captured`,{detail:this.imageData})),this.dispatchEvent(new CustomEvent(`update-check-image`,{bubbles:!0,composed:!0,detail:{captureResult:this.imageData,side:this.checkSide}})),this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))):(this.imageData=this.canvas.toDataURL(`image/jpeg`),this.stillCanvas=this.stillCanvas||document.createElement(`canvas`),this.stillCanvas.width=this.canvas.width,this.stillCanvas.height=this.canvas.height,this.stillCanvas.getContext(`2d`).drawImage(this.canvas,0,0),this.paintState=D.FLASHING,setTimeout(()=>{this.paintState=D.STILL},133))}onClickRetake(e){e.preventDefault(),e.stopImmediatePropagation(),this.imageData=null,this.paintState=D.MONITOR}paintCanvas(){let e=this.video.videoHeight,t=this.video.videoWidth;this.canvas.width=t,this.canvas.height=e;let n=this.canvas.getContext(`2d`);this.paintState===D.MONITOR?(n.drawImage(this.video,0,0,t,e),n.fillStyle=`#000000`,n.fillRect(0,0,t,85),n.fillRect(t-40,0,40,e),n.fillRect(0,e-85,t,85),n.fillRect(0,0,40,e)):this.paintState===D.FLASHING?(n.fillStyle=`#ffffff`,n.fillRect(0,0,t,e)):this.paintState===D.STILL?n.drawImage(this.stillCanvas,0,0,t,e):this.paintState===D.SAVED&&n.drawImage(this.savedImage,0,0,t,e),this.animationFrame=window.requestAnimationFrame(()=>this.paintCanvas())}getCaptureButtonLabel(e){return e?`Continue`:`Capture`}
1static get template(){return r`<style>:host{display:block}footer{text-align:center}footer jha-button{margin:32px 0}video,canvas{width:480px;height:270px}video{display:none}#capture{text-align:center;margin:40px}#header{text-align:right;width:100%}</style> <div id="header"> <jha-button sync="" slot="header-right" icon="" on-click="onCloseDialog" data-test-id="close-button" type="button"> <jh-icon-xmark aria-label="Close dialog" aria-hidden="false"></jh-icon-xmark> </jha-button> </div> <div id="capture"> <video></video> <canvas width="480" height="270"></canvas> </div> <footer> <template is="dom-if" if="[[imageData]]"> <jha-button type="button" sync outline on-click="onClickRetake" disabled="[[!videoReady]]"> Retake </jha-button> </template> <jha-button type="button" sync on-click="onClickCaptureOrContinue" disabled="[[!videoReady]]"> [[getCaptureButtonLabel(imageData)]] </jha-button> </footer>`}},customElements.define(window.BannowebEnsentaDesktopCaptureDialogElement.is,window.BannowebEnsentaDesktopCaptureDialogElement);var k=window.BannowebEnsentaDesktopCaptureDialogElement;window.BannowebEnsentaCheckCaptureButtonElement=class extends n{static get is(){return`bannoweb-ensenta-check-capture-button`}static get properties(){return{captureResult:{type:Object,value:null,observer:window.BannowebEnsentaCheckCaptureButtonElement.prototype.clearInputValue_},disabled:{type:Boolean,value:!0,reflectToAttribute:!0},mobile:{type:Boolean,value:()=>banno.web.browser?.ua?.includes(`Mobi`)},checkSide:String}}constructor(){super(),e(()=>import(`./icon-camera-fDGenHlE.js`),[]),this.boundOnCaptureResult=this.onCaptureResult.bind(this)}onCaptureResult(e){this.dispatchEvent(new CustomEvent(`update-check-image`,{bubbles:!0,composed:!0,detail:{captureResult:e,side:this.checkSide}})),this.captureResult=e}getImageUri(e){return e&&e.finalImage?`data:image/jpeg;base64,${e.finalImage}`:null}showImage_(e){return!!e}clearInputValue_(e){if(e)return;let t=this.shadowRoot.querySelector(`input`);t&&(t.value=null)}onClickImage(e){this.mobile?this.dispatchEvent(new CustomEvent(`image-click`,{detail:{captureResult:this.captureResult}})):this.openDesktopCapture()}onFileChanged(e){if(!e.target.files[0])return;let t={documentType:`Check`,imageData:e.target.files[0],callback:this.boundOnCaptureResult};MitekMobileWeb.processImageFile(t)}onClickDesktopCapture(e){this.openDesktopCapture()}openDesktopCapture(){let e=new k;e.addEventListener(`image-captured`,e=>{let t={documentType:`Check`,imageData:String(e.detail).replace(`data:image/jpeg;base64,`,``),callback:this.boundOnCaptureResult};MitekMobileWeb.processDataURL(t)}),e.checkSide=this.checkSide,e.imageData=this.captureResult?`data:image/jpeg;base64,${this.captureResult.finalImage}`:null,this.dispatchEvent(new f(e))}static get template(){return r`<style>img{width:100%;max-width:200px;max-height:82px}input{opacity:0;z-index:-1;width:.1px;height:.1px;position:absolute;overflow:hidden}:host([disabled]) label{cursor:default}:host([disabled])::slotted(*),:host([disabled]) .mitekCamera,:host([disabled]) label *{opacity:.25}button{@apply --button-reset;border-radius:4px;max-width:200px;height:82px;margin:0 auto}.mitekCamera,label{cursor:pointer;background:var(--secondary-content-background-color);color:var(--body-text-secondary-color);border-radius:4px;flex-direction:column;justify-content:center;align-items:center;max-width:200px;height:82px;margin:0 auto;font-size:12px;display:flex}jh-icon-camera{width:32px;height:32px;fill:var(--body-text-theme-color)}</style> <template is="dom-if" if="[[!showImage_(captureResult.finalImage)]]"> <template is="dom-if" if="[[mobile]]"> <label for="mitekCamera"> <jh-icon-camera></jh-icon-camera> <div> <slot></slot> </div> </label> <input id="mitekCamera" capture="camera" type="file" accept="image/*" on-change="onFileChanged" disabled="[[disabled]]"> </template> <template is="dom-if" if="[[!mobile]]"> <button type="button" on-click="onClickDesktopCapture" disabled="[[disabled]]"> <div class="mitekCamera"> <jh-icon-camera></jh-icon-camera> <div> <slot></slot> </div> </div> </button> </template> </template> <template is="dom-if" if="[[showImage_(captureResult.finalImage)]]"> <button class="image-button" type="button" on-click="onClickImage"> <img src="[[getImageUri(captureResult)]]"> </button> </template>`}},customElements.define(window.BannowebEnsentaCheckCaptureButtonElement.is,window.BannowebEnsentaCheckCaptureButtonElement),window.BannowebEnsentaCheckCaptureButtonElement,window.BannowebEnsentaCheckCapturedDialogElement=class extends a{static get is(){return`bannoweb-ensenta-check-captured-dialog`}static get properties(){return{captureResult:{type:Object,attribute:`capture-result`},side:{type:String}}}constructor(){super(),e(()=>import(`./icon-camera-fDGenHlE.js`),[]),this.boundOnCaptureResult=this.onCaptureResult.bind(this),this.captureResult=null,this.side=void 0}getHeader(e){return e===`front`?`Check front`:`Check back`}getImageUri(e){return e?`data:image/jpeg;base64,${e.finalImage}`:null}onCaptureResult(e){this.dispatchEvent(new CustomEvent(`update-check-image`,{bubbles:!0,composed:!0,detail:{captureResult:e,side:this.side}})),this.closeModal()}onFileChanged(e){let t={documentType:`Check`,imageData:e.target.files[0],callback:this.boundOnCaptureResult};MitekMobileWeb.processImageFile(t)}closeModal(){this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))}static get styles(){return[v,i`:host{display:block}article{text-align:center}.img-container{text-align:left;max-width:400px;margin:0 auto}img{max-width:400px;margin:24px 0}.header{font-weight:500}input{opacity:0;z-index:-1;width:.1px;height:.1px;position:absolute;overflow:hidden}label{background:var(--secondary-content-background-color);width:100px;height:38px;color:var(--default-button-text-color);padding:var(--jha-button-padding-vertical,0px) var(--jha-button-padding-horizontal,18px);font-size:var(--jha-button-text-size,14px);border-radius:var(--button-corner-radius);justify-content:center;align-items:center;margin:0 auto;display:flex}
1jh-icon-camera{fill:var(--default-button-text-color);margin-right:8px}`]}render(){return s`<bannoweb-dialog> <article class="list-item-padding"> <div class="img-container"> <div class="header">${this.side===void 0?o:this.getHeader(this.side)}</div> <img src="${this.getImageUri(this.captureResult)??o}"> </div> <label for="mitekCamera"> <jh-icon-camera></jh-icon-camera> ${`Retake`} </label> <input id="mitekCamera" capture="camera" type="file" accept="image/*" @change="${this.onFileChanged}"> </article> </bannoweb-dialog>`}},customElements.define(window.BannowebEnsentaCheckCapturedDialogElement.is,window.BannowebEnsentaCheckCapturedDialogElement);var A=window.BannowebEnsentaCheckCapturedDialogElement,j=_(n);window.BannowebEnsentaNoteDialogElement=class extends j{static get is(){return`bannoweb-ensenta-note-dialog`}static get properties(){return{depositNote:String}}constructor(){super(),e(()=>import(`./icon-xmark-DBOKkGIi.js`).then(e=>e.t),[]),e(()=>import(`./icon-document-wIRJ9smp.js`).then(e=>e.t),[])}onCloseDialog(e){this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))}formatValue_(e){e&&e.target.value&&(e.target.value=(e.target.value||``).replace(/[^0-9A-Za-z !@#$%*\^'+/\\\-.,:?=()]/g,``))}onSaveNote(e){this.dispatchEvent(new CustomEvent(`save-note`,{detail:{depositNote:this.depositNote}})),this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))}static get template(){return r`<style>:host{text-align:center;padding:20px 48px 32px;display:block}#header{text-align:right;width:100%}h1{margin:0;font-size:20px;font-weight:400}p{color:var(--body-text-secondary-color);font-size:14px}jh-icon-document{fill:var(--primary-content-background-color);background:var(--body-text-secondary-color);border-radius:50%;width:28px;height:28px;padding:8px}jha-button[wide]{margin-top:28px}@media (width<=480px){:host{background:var(--primary-content-background-color);position:fixed;top:0;bottom:0}}</style> <div id="header"> <jha-button sync="" slot="header-right" icon="" on-click="onCloseDialog" data-test-id="close-button" type="button"> <jh-icon-xmark aria-label="Close dialog" aria-hidden="false"></jh-icon-xmark> </jha-button> </div> <div> <jh-icon-document></jh-icon-document> <h1>Add a deposit note</h1> <p>Input is limited to 50 characters and the following special characters are allowed: !@#$*%^'/+-.,:?=()</p> </div> <jha-form-floating-group filled no-label> <input type="text" value="{{depositNote::input}}" placeholder="Note" on-input="formatValue_" on-change="formatValue_" maxlength="50"> </jha-form-floating-group> <jha-button wide type="button" sync on-click="onSaveNote"> Save </jha-button>`}},customElements.define(window.BannowebEnsentaNoteDialogElement.is,window.BannowebEnsentaNoteDialogElement);var M=window.BannowebEnsentaNoteDialogElement,N=p.ensentaController,P=_(n);window.BannowebEnsentaDepositFormElement=class extends P{static get is(){return`bannoweb-ensenta-deposit-form`}static get properties(){return{depositAccounts:{type:Array,value:()=>[],observer:window.BannowebEnsentaDepositFormElement.prototype.onDepositAccountsChange},limitMessages:{type:Array,value:()=>[]},endorsementMessage:String,focusedPane:{type:String,value:`form`},batchId:String,toAccount:Object,itemNumber:Number,amount:String,frontImage:{type:Object,observer:window.BannowebEnsentaDepositFormElement.prototype.shouldSubmitItem_},backImage:{type:Object,observer:window.BannowebEnsentaDepositFormElement.prototype.shouldSubmitItem_},oldFrontImage:String,oldBackImage:String,isEditing:{type:Boolean,value:!1,observer:window.BannowebEnsentaDepositFormElement.prototype.onEditing_},totalChecks:{type:Array,value:()=>[]},frontLoading:{type:Boolean,value:!1},backLoading:{type:Boolean,value:!1},frontError:{type:Boolean,value:!1},backError:{type:Boolean,value:!1},depositNote:{type:String,value:``}}}constructor(){super(),e(()=>import(`./icon-chevron-right-small-BraCudZ4.js`).then(e=>e.t),[]),e(()=>import(`./icon-document-wIRJ9smp.js`).then(e=>e.t),[]),e(()=>import(`./icon-camera-fDGenHlE.js`),[]),e(()=>import(`./icon-circle-exclamation-CPV1Eg_u.js`).then(e=>e.t),[]),e(()=>import(`./icon-checkmark-Apyd0pTN.js`).then(e=>e.t),[]),this.boundOnUpdateCheckImage=this.onUpdateCheckImage.bind(this),this.boundOnSaveNote=this.onSaveNote.bind(this)}onDepositAccountsChange(e,t){e&&e.length>0&&(this.toAccount=e[0])}showToAccounts(e){this.focusedPane=`to-accounts`}selectAccount(e){this.toAccount=e.model.item,this.focusedPane=`form`}disableAccount_(e,t){return e||!!t.length}showAddDepositNote(e,t,n){return!this.disableAccount_(t,n)}showDepositNote(e,t,n){return this.disableAccount_(t,n)&&!!e}disableCaptureButtons(e,t){return!(e&&parseFloat(t)>0)}getImageUri(e){return e?`data:image/jpeg;base64,${e.finalImage}`:null}getErrors(e){return MitekUtil.decodeCaptureErrorCodes((e||{}).errors||[])}hasErrors(e){return(this.getErrors(e)||[]).length>0}showErrorSection_(e,t,n){return e&&(this.hasErrors(t)||this.hasErrors(n))}disableConfirm(e,t,n){return!e||!t||!n}shouldSubmitItem_(e){!(this.frontImage&&this.backImage)||this.isEditing||this.submitItem()}onEditing_(e){this.isEditing&&(this.getBatchCheckImage(this.batchId,this.itemNumber,m.CheckSide.FRONT),this.getBatchCheckImage(this.batchId,this.itemNumber,m.CheckSide.BACK))}getBatchCheckImage(e,t,n){let r=n===m.CheckSide.FRONT;
1return r?this.frontLoading=!0:this.backLoading=!0,N.getBatchCheckImage(e,t,n).then(e=>{if(!e){r?this.frontError=!0:this.backError=!0;return}let t=new FileReader;t.onload=e=>{r?(this.oldFrontImage=t.result.split(`,`)[1],this.frontImage={finalImage:t.result.split(`,`)[1],Metrics:null,errors:[],fullColorImage:void 0,status:``}):(this.oldBackImage=t.result.split(`,`)[1],this.backImage={finalImage:t.result.split(`,`)[1],Metrics:null,errors:[],fullColorImage:void 0,status:``})},t.readAsDataURL(e)}).catch(e=>{r?this.frontError=!0:this.backError=!0}).finally(()=>{r?this.frontLoading=!1:this.backLoading=!1})}onTryAgain(e){this.getBatchCheckImage(this.batchId,this.itemNumber,e.target.id)}resetForm(){this.amount=``,this.frontImage=this.backImage=null}submitItem(){this.dispatchEvent(new CustomEvent(`submit-item`,{detail:{toAccount:this.toAccount,amount:this.amount,frontImage:this.frontImage,backImage:this.backImage,depositNote:this.depositNote}})),this.isEditing=!1,this.resetForm()}updateItem(e){let t={finalImage:null},n={finalImage:null};this.frontImage.finalImage!==this.oldFrontImage&&this.backImage.finalImage!==this.oldBackImage&&(t=this.frontImage,n=this.backImage),this.dispatchEvent(new CustomEvent(`update-item`,{detail:{itemNumber:this.itemNumber,amount:this.amount,frontImage:t,backImage:n}})),this.isEditing=!1,this.resetForm()}onClickDelete(e){this.resetForm(),this.dispatchEvent(new CustomEvent(`delete-check`,{detail:{itemNumber:this.itemNumber}}))}onUpdateCheckImage(e){this.isEditing&&this.frontImage&&this.backImage&&(this.frontImage=this.backImage=null),e.detail.side===m.CheckSide.FRONT?this.frontImage=e.detail.captureResult:this.backImage=e.detail.captureResult}onDepositBatch(){this.resetForm(),this.dispatchEvent(new CustomEvent(`deposit-batch`,{}))}onImageClick(e){let t=new A;t.side=e.target.id,t.captureResult=e.target.captureResult,t.addEventListener(`update-check-image`,this.boundOnUpdateCheckImage),this.dispatchEvent(new f(t))}onSaveNote(e){e.detail.depositNote&&e.detail.depositNote.trim()&&(this.depositNote=e.detail.depositNote)}onClickAddNote(e){let t=new M;t.depositNote=this.depositNote,t.addEventListener(`save-note`,this.boundOnSaveNote),this.dispatchEvent(new f(t))}formatAccountBalance(e){return b(e)}static get template(){return r`<style>:host{display:block}.image-errors{color:var(--body-text-secondary-color);margin-top:8px;font-size:12px}
1.image-errors jh-icon-circle-exclamation{fill:var(--body-text-theme-color);width:18px;height:18px;margin-right:4px}ul{margin-top:4px;padding-left:32px}li{padding:2px 0}.error-label{color:var(--body-text-secondary-color);align-items:center;display:flex}.account-button,.to-button{@apply --button-reset;@apply --list-item-padding;justify-content:space-between;align-items:center;display:flex}.account-button{align-items:flex-start;font-size:16px}.label{flex-grow:1;margin-right:16px;font-size:16px}.theme{color:var(--body-text-theme-color)}.secondary{color:var(--body-text-secondary-color)}.sub-title{margin:8px 0 4px;font-size:12px}.text-right{text-align:right}jh-icon-chevron-right-small{fill:var(--body-text-secondary-color)}#endorsement-message{align-items:center;padding-top:16px;font-size:12px;font-weight:500;display:flex}.limits-container{padding:8px 16px}.limit-message{color:var(--body-text-secondary-color);text-align:left;font-size:12px}bannoweb-ensenta-check-capture-button{flex:1}bannoweb-ensenta-check-capture-button:first-of-type{margin-right:8px}bannoweb-ensenta-check-capture-button:last-of-type{margin-left:8px}.capture-buttons{justify-content:center}.progress,.error-button{cursor:pointer;background:var(--secondary-content-background-color);color:var(--body-text-secondary-color);border-radius:4px;flex-direction:column;flex:1;justify-content:center;align-items:center;max-width:200px;height:82px;margin:0 auto;font-size:12px;display:flex}.list-item-padding{padding-left:var(--jha-list-item-horizontal-spacing)}.deposit-note-link{align-items:center;display:flex}.deposit-note-link jh-icon-document{fill:var(--body-text-theme-color);margin-right:4px}.deposit-note{padding-left:var(--jha-list-item-horizontal-spacing);padding-bottom:var(--jha-list-item-vertical-spacing);color:var(--body-text-secondary-color);display:flex}.deposit-note jh-icon-document{width:18px;height:18px;fill:var(--body-text-secondary-color);margin-right:4px}.confirm-footer{@apply --list-item-padding;text-align:center}.delete-button{margin:24px auto;display:block}.confirm-button{margin:24px auto 0;display:block}</style> <jha-slider> <jha-slider-content focused-pane="[[focusedPane]]"> <jha-slider-pane form one focus> <jha-list last-item-border> <jha-list-item no-padding> <button class="to-button" type="button" on-click="showToAccounts" disabled$="[[disableAccount_(isEditing, totalChecks)]]"> <div class="label">To</div> <div class="text-right"> <div class="theme">[[toAccount.accountName]]</div> <div class="secondary">[[formatAccountBalance(toAccount.availableBalance)]]</div> </div> <template is="dom-if" if="[[!disableAccount_(isEditing, totalChecks)]]"> <jh-icon-chevron-right-small></jh-icon-chevron-right-small> </template> </button> <template is="dom-if" if="[[showAddDepositNote(depositNote, isEditing, totalChecks)]]"> <div class="list-item-padding"> <jha-button type="link" link on-click="onClickAddNote" sync disabled$="[[disableAccount_(isEditing, totalChecks)]]"> <template is="dom-if" if="[[!depositNote]]"> + Add a deposit note </template> <template is="dom-if" if="[[depositNote]]"> <div class="deposit-note-link"> <jh-icon-document></jh-icon-document> [[depositNote]] </div> </template> </jha-button> </div> </template> <template is="dom-if" if="[[showDepositNote(depositNote, isEditing, totalChecks)]]"> <div class="deposit-note"> <jh-icon-document></jh-icon-document> [[depositNote]] </div> </template> </jha-list-item> <jha-list-item> <bannoweb-flex-wrapper> <div class="label"> Amount </div> <jha-form-currency-input label="Deposit amount" placeholder="0.00" no-label filled amount="{{amount}}" min="0"></jha-form-currency-input> </bannoweb-flex-wrapper> </jha-list-item> <jha-list-item> <template is="dom-if" if="[[isEditing]]"> <div> <div class="label">Images</div> <div class="secondary sub-title">Tap to view or retake an image.</div> </div> </template> <bannoweb-flex-wrapper class="capture-buttons"> <template is="dom-if" if="[[frontLoading]]"> <div class="progress"> <jha-progress></jha-progress> </div> </template> <template is="dom-if" if="[[!frontLoading]]"> <template is="dom-if" if="[[frontError]]"> <div class="error-button"> <div>Failed to get image.</div> <jha-button value="front" type="button" sync link on-click="onTryAgain">Try again</jha-button>
1 </div> </template> <template is="dom-if" if="[[!frontError]]"> <bannoweb-ensenta-check-capture-button id="front" check-side="front" capture-result="{{frontImage}}" on-image-click="onImageClick" on-update-check-image="onUpdateCheckImage" disabled="[[disableCaptureButtons(toAccount, amount)]]"> Front of check </bannoweb-ensenta-check-capture-button> </template> </template> <template is="dom-if" if="[[frontLoading]]"> <div class="progress"> <jha-progress></jha-progress> </div> </template> <template is="dom-if" if="[[!frontLoading]]"> <template is="dom-if" if="[[frontError]]"> <div class="error-button"> <div>Failed to get image.</div> <jha-button value="back" type="button" sync link on-click="onTryAgain">Try again</jha-button> </div> </template> <template is="dom-if" if="[[!frontError]]"> <bannoweb-ensenta-check-capture-button id="back" check-side="back" capture-result="{{backImage}}" on-image-click="onImageClick" on-update-check-image="onUpdateCheckImage" disabled="[[disableCaptureButtons(toAccount, amount)]]"> Back of check </bannoweb-ensenta-check-capture-button> </template> </template> </bannoweb-flex-wrapper> <template is="dom-if" if="[[showErrorSection_(isEditing, frontImage, backImage)]]"> <div class="image-errors">We had difficulty confirming the following:</div> </template> <template is="dom-if" if="[[hasErrors(frontImage)]]"> <div class="image-errors"> <div class="error-label"> <jh-icon-circle-exclamation></jh-icon-circle-exclamation> Check front </div> <ul> <template is="dom-repeat" items="[[getErrors(frontImage)]]"> <li>[[item]]</li> </template> </ul> </div> </template> <template is="dom-if" if="[[hasErrors(backImage)]]"> <div class="image-errors"> <div class="error-label"> <jh-icon-circle-exclamation></jh-icon-circle-exclamation> Check back </div> <ul> <template is="dom-repeat" items="[[getErrors(backImage)]]"> <li>[[item]]</li> </template> </ul> </div> </template> <template is="dom-if" if="[[!isEditing]]"> <div id="endorsement-message"> <div>[[endorsementMessage]]</div> </div> </template> </jha-list-item> <div class="limits-container"> <template is="dom-repeat" items="[[limitMessages]]"> <span class="limit-message">[[item]] </span> </template> </div> <template is="dom-if" if="[[isEditing]]"> <footer class="confirm-footer"> <jha-button class="confirm-button" type="button" on-click="updateItem" disabled="[[disableConfirm(amount, frontImage, backImage)]]" sync>Confirm</jha-button> <jha-button class="delete-button" type="link" link on-click="onClickDelete" sync>Delete check</jha-button> </footer> </template> </jha-list></jha-slider-pane> <jha-slider-pane to-accounts> <template is="dom-repeat" items="[[depositAccounts]]"> <jha-list-item> <button class="account-button" type="button" on-click="selectAccount"> <div> <div class="theme">[[item.accountName]]</div> <div class="secondary">[[item.maskedAccountNumber]]</div> </div> <div>[[formatAccountBalance(item.availableBalance)]]</div> </button> </jha-list-item> </template>  </jha-slider-pane> </jha-slider-content> </jha-slider>`}},customElements.define(window.BannowebEnsentaDepositFormElement.is,window.BannowebEnsentaDepositFormElement),window.BannowebEnsentaDepositFormElement,window.BannowebEnsentaDepositSubmittedElement=class extends a{static get is(){return`bannoweb-ensenta-deposit-submitted`}static get properties(){return{deposit:{type:Object},fundsAvailabilityText:{type:String,attribute:`funds-availability-text`}}}constructor(){super(),this.deposit=void 0,this.fundsAvailabilityText=``,e(()=>import(`./icon-circle-checkmark-bWzRjyxj.js`),[])}getNumberOfChecks_(e){return`${e} check${e>1?`s`:``}`}getDate_(){return u.getShortMonthDate(new Date)}static get styles(){return i`:host{margin:42px;display:block}jh-icon-circle-checkmark{width:120px;height:120px;
1fill:var(--body-text-completed-color)}.head{text-align:center;border-bottom:dashed 2px var(--divider-default-color);padding-bottom:28px}.body{border-bottom:dashed 2px var(--divider-default-color);padding:28px 0}.title{margin-bottom:16px;font-size:24px}.sub-title{color:var(--body-text-secondary-color);font-size:16px}.label{color:var(--body-text-secondary-color)}span.label{width:132px;display:inline-block}.disclaimer{color:var(--body-text-secondary-color);padding:16px 0;font-size:12px}.amount{margin-bottom:16px;font-size:28px;font-weight:300}.item{padding:8px 0}.confirm-footer{text-align:center}.done-button{margin:24px auto}`}render(){return s`<div class="head"> <jh-icon-circle-checkmark></jh-icon-circle-checkmark> <div class="title">${`Check submitted`}</div> <div class="sub-title">Confirmation #${this.deposit?.receiptNumber}</div> </div> <div class="body"> <div class="label"> ${this.deposit?.numberOfChecks===void 0?o:this.getNumberOfChecks_(this.deposit.numberOfChecks)} totaling </div> <bannoweb-currency class="amount" .amount="${this.deposit?.currentAmount}"></bannoweb-currency> <div class="item"> <span class="label">${`Account`}</span> <span>${this.deposit?.maskedAccountNumber}</span> </div> <div class="item"> <span class="label">Submission date</span> <span>${this.getDate_()}</span> </div> ${this.deposit?.note?s`<div class="item"> <span class="label">Deposit note</span> <span>${this.deposit.note}</span> </div>`:o} </div> <div class="disclaimer">${this.fundsAvailabilityText}</div> <footer class="confirm-footer"> <jha-link-button href="/ensenta-remote-deposits" class="done-button" wide> ${`Done`} </jha-link-button> </footer>`}},customElements.define(window.BannowebEnsentaDepositSubmittedElement.is,window.BannowebEnsentaDepositSubmittedElement),window.BannowebEnsentaDepositSubmittedElement;var F=_(n);window.BannowebEnsentaRejectedCheckElement=class extends F{static get is(){return`bannoweb-ensenta-rejected-check`}static get properties(){return{checkVerification:{type:Object,value:()=>{}},itemNumber:{type:Number},isConfirmable:{type:Boolean,value:!1}}}constructor(){super(),e(()=>import(`./icon-circle-xmark-CYluEXDt.js`).then(e=>e.t),[])}formatCheckAmount(e){return b(e)}onClickEdit(e){this.dispatchEvent(new CustomEvent(`edit-check`,{detail:{itemNumber:this.itemNumber}}))}onClickConfirm(e){this.dispatchEvent(new CustomEvent(`confirm-check`,{detail:{itemNumber:this.itemNumber}}))}onClickDelete(e){this.dispatchEvent(new CustomEvent(`delete-check`,{detail:{itemNumber:this.itemNumber}}))}getHeader_(e){return e?`This check requires action to continue`:`You must delete this check to continue`}static get template(){return r`<style>:host{text-align:center;display:block}h3{font-size:16px}h4{margin:16px 0;font-size:16px}.secondary{color:var(--body-text-secondary-color)}.mini-card{border:1px solid var(--divider-default-color);text-align:left;margin:var(--jha-list-item-vertical-spacing) var(--jha-list-item-horizontal-spacing);border-radius:var(--card-corner-radius);padding:16px}.mini-card-header{justify-content:space-between;align-items:center;display:flex}.mini-card-header div{align-items:center;display:flex}.mini-card-header jha-button{margin:0}jh-icon-circle-xmark{fill:var(--jha-color-warning);width:18px;height:18px;margin-right:8px}.rejection{color:var(--jha-color-warning)}.sub-title{margin:0 48px}.small{font-size:12px}.large{margin:12px 0;font-size:18px}ul{margin:4px 4px 4px 0;padding-left:32px}.footer-button{margin:32px 0}footer{justify-content:center;align-items:center}.delete-button{margin:24px auto;display:block}.confirm-button{margin:24px auto 0;display:block}</style> <h3>Check</h3> <h4>[[getHeader_(isConfirmable)]]</h4> <template is="dom-if" if="[[isConfirmable]]"> <div class="secondary sub-title"> Select <strong>Confirm</strong> if the check is ok as is. Select <strong>Edit</strong> to update the amount or images. Select <strong>Delete</strong> to remove this check. </div> </template> <template is="dom-if" if="[[!isConfirmable]]"> <div class="secondary sub-title"> If you can resolve the issue, try adding the check again. This check was rejected due to the following: </div> </template> <div class="mini-card"> <div class="mini-card-header secondary"> <div> <jh-icon-circle-xmark></jh-icon-circle-xmark> Check </div> <template is="dom-if" if="[[isConfirmable]]"> <jha-button type="link" link on-click="onClickEdit" sync> Edit </jha-button>
1 </template> </div> <div class="large">[[formatCheckAmount(checkVerification.amount)]]</div> <template is="dom-if" if="[[isConfirmable]]"> <div class="rejection">We had difficulty confirming the following:</div> </template> <template is="dom-if" if="[[!isConfirmable]]"> <div class="rejection small">Rejected due to the following:</div> </template> <ul> <template is="dom-repeat" items="[[checkVerification.riskFactors]]"> <li class="rejection small">[[item.description]]</li> </template> </ul> </div> <template is="dom-if" if="[[isConfirmable]]"> <footer> <jha-button class="confirm-button" type="button" on-click="onClickConfirm" sync> Confirm </jha-button> <div> <jha-button class="delete-button" type="link" link on-click="onClickDelete" sync> Delete check </jha-button> </div> </footer> </template> <template is="dom-if" if="[[!isConfirmable]]"> <jha-button class="footer-button" type="button" on-click="onClickDelete" sync> Delete check </jha-button> </template>`}},customElements.define(window.BannowebEnsentaRejectedCheckElement.is,window.BannowebEnsentaRejectedCheckElement),window.BannowebEnsentaRejectedCheckElement;var I=_(n);window.BannowebEnsentaDepositReviewElement=class extends I{static get is(){return`bannoweb-ensenta-deposit-review`}static get properties(){return{totalChecks:{type:Array,value:()=>[]},acceptedChecks:{type:Array,value:()=>[]},toAccount:{type:Object},depositNote:{type:String,value:``},fundsAvailabilityText:{type:String,value:``}}}constructor(){super(),e(()=>import(`./icon-document-wIRJ9smp.js`).then(e=>e.t),[]),e(()=>import(`./icon-checkmark-Apyd0pTN.js`).then(e=>e.t),[])}formatCheckAmount(e){return b(e)}formatChecksAmount(e){let t=(e||[]).filter(e=>e.accepted),n=0;return t.forEach(e=>{n+=parseFloat(e.amount)}),b(n)}onClickEdit(e){this.dispatchEvent(new CustomEvent(`edit-check`,{detail:{itemNumber:e.target.id}}))}onClickDeposit(e){this.dispatchEvent(new CustomEvent(`submit`))}onClickAddAnother(t){if((this.totalChecks||[]).filter(e=>e.accepted).length>=20){e(async()=>{let{default:e}=await import(`./bannoweb-ok-confirmation-dialog-CB2b-2ah.js`);return{default:e}},[]).then(({default:e})=>{let t=new e;t.description=`You already have the maximum number of checks added for deposit.`,t.header=`Can't add check`,t.showWarningIcon=!0,this.dispatchEvent(new f(t))});return}this.dispatchEvent(new CustomEvent(`add-another`))}setAcceptedChecks_(e){return(e||[]).filter(e=>e.accepted).map(e=>({amount:e.amount,accepted:e.accepted,itemNumber:e.itemNumber}))}static get template(){return r`<style>:host{display:block}.bold{font-size:16px;font-weight:500}jh-icon-checkmark{fill:var(--jha-color-success);width:18px;height:18px;margin-right:4px}.amount{color:var(--body-text-primary-color);font-size:18px}.availability{text-align:center;color:var(--body-text-secondary-color);font-size:12px}.label{color:var(--body-text-secondary-color);align-items:center;display:flex}.deposit-note{color:var(--body-text-secondary-color);padding-top:8px;display:flex}.deposit-note jh-icon-document{width:18px;height:18px;fill:var(--body-text-secondary-color);margin-right:4px}footer{text-align:center;padding:32px 0}</style> <jha-list> <jha-list-item> <div class="bold">To [[toAccount.accountName]]([[toAccount.maskedAccountNumber]])</div> <template is="dom-if" if="[[depositNote]]"> <div class="deposit-note"> <jh-icon-document></jh-icon-document> [[depositNote]] </div> </template> </jha-list-item> <template id="checksList" is="dom-repeat" items="[[setAcceptedChecks_(totalChecks)]]"> <jha-list-item> <bannoweb-flex-wrapper> <div> <div class="label"> <jh-icon-checkmark></jh-icon-checkmark> Check </div> <div class="amount">[[formatCheckAmount(item.amount)]]</div> </div> <jha-button id="[[item.itemNumber]]" type="button" sync link on-click="onClickEdit"> Edit </jha-button> </bannoweb-flex-wrapper> </jha-list-item> </template> <jha-list-item class="availability">[[fundsAvailabilityText]]</jha-list-item> </jha-list> <footer> <jha-button type="button" sync on-click="onClickDeposit"> Deposit [[formatChecksAmount(totalChecks)]] </jha-button> <div> <jha-button type="link" link on-click="onClickAddAnother" sync>
1 + Add another check </jha-button> </div> </footer>`}},customElements.define(window.BannowebEnsentaDepositReviewElement.is,window.BannowebEnsentaDepositReviewElement),window.BannowebEnsentaDepositReviewElement;var L=p.store.institution,R=p.ensentaController,z={LOADING:`loading`,NO_ELIGIBLE_ACCOUNTS:`no-eligible-accounts`,CREATE_DEPOSIT:`create-deposit`,EDITING:`editing`,ERROR:`error`,REJECTED_EDITABLE:`rejected-editable`,REJECTED_UNEDITABLE:`rejected-uneditable`,DEPOSIT_ACCEPTED:`deposit-accepted`,DEPOSIT_CONFIRMED:`deposit-confirmed`},B={BATCH_SUBMISSION_FAILURE:`Unable to submit`},V={OOPS:c.OOPS_OUR_BAD_TRY_AGAIN,BATCH_SUBMISSION_FAILURE:`We had an issue confirming your deposit. Please try again.`},H=h(g(_(n)),`fadeinup`);window.BannowebEnsentaDepositElement=class extends H{static get is(){return`bannoweb-ensenta-deposit`}static get properties(){return{institution:{type:Object,value:()=>L},ensentaAccounts:{type:Array,value:()=>[]},toAccount:{type:Object,value:()=>{}},depositNote:{type:String,value:``},limitMessages:{type:Array,value:()=>[]},endorsementMessage:{type:String},loadingMessage:{type:String,value:``},fundsAvailabilityText:{type:String,value:``},currentState:{type:String,value:z.LOADING,observer:window.BannowebEnsentaDepositElement.prototype.currentStateChanged_},previousState:String,batchId:{type:String,value:``},deposit:{type:Object,value:()=>{}},checkVerification:{type:Object,value:()=>{}},checkRequest:{type:Object,value:()=>{}},isEditing:{type:Boolean,value:!1},totalChecks:{type:Array,value:()=>[]}}}constructor(){super(),e(()=>import(`./icon-chevron-left-f3OZxuwt.js`).then(e=>e.t),[]),e(()=>import(`./icon-xmark-DBOKkGIi.js`).then(e=>e.t),[])}async routeEnter(t,n,r,i){return l.setTitleAndTrack(`Ensenta deposit`,d.getRouteUrlWithoutParams(i),r),banno.web.browser?.ua?.includes(`Mobi`)||R.getCameraStream().then(e=>{e.getTracks().forEach(e=>{e.readyState==`live`&&e.stop()})}).catch(t=>{let n=``;switch(t.name){case`NotAllowedError`:n=`Camera use restricted`;break;case`OverconstrainedError`:n=`Camera resolution not supported`;break;default:n=`Oops, something went wrong while trying to access your camera.`}e(async()=>{let{default:e}=await import(`./bannoweb-ok-confirmation-dialog-CB2b-2ah.js`);return{default:e}},[]).then(({default:e})=>{let t=new e;t.description=n,t.showWarningIcon=!0,t.addEventListener(`closeModal`,()=>{d.go(`/ensenta-remote-deposits`)}),this.dispatchEvent(new f(t))})}),super.routeEnter(t,n,r,i)}connectedCallback(){super.connectedCallback(),this.loadDepositAccounts()}currentStateChanged_(e,t){t!==z.LOADING&&(this.previousState=t)}loadDepositAccounts(){this.currentState=z.LOADING,R.loadDepositAccounts().then(e=>{let t=e;return this.ensentaAccounts=t.accounts,this.limitMessages=t.limitMessages,this.endorsementMessage=t.endorsementMessage,this.ensentaAccounts.length===0?this.currentState=z.NO_ELIGIBLE_ACCOUNTS:(window.mitekWorkerPath=S,Promise.all([x(C),x(w),x(T)]).then(()=>{this.currentState=z.CREATE_DEPOSIT}))}).catch(e=>{this.currentState=z.ERROR;let t={};try{t=JSON.parse(e.response)}catch{}let n=``;if(e?.statusCode===403)t.type.indexOf(`ensenta`)===0&&(n=t.message),this.displayErrorDialog_(n,``);else if(e?.statusCode===500&&t.type===`unexpectedError`)this.displayErrorDialog_(``,``);else{let e=new y;e.showWarningIcon=!0,e.cancelButtonText=`Cancel`,e.confirmButtonText=`Retry`,e.description=`Oops, something went wrong on our end. Please try again.`,e.addEventListener(window.BannowebConfirmationDialogElement.Event.CONFIRM,e=>{this.loadDepositAccounts(),this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))}),e.addEventListener(window.BannowebConfirmationDialogElement.Event.CANCEL,e=>{d.go(`/`)}),this.dispatchEvent(new f(e))}})}displayErrorDialog_(t,n){e(async()=>{let{default:e}=await import(`./bannoweb-ok-confirmation-dialog-CB2b-2ah.js`);return{default:e}},[]).then(({default:e})=>{let r=new e;r.description=t||V.OOPS,r.header=n,r.showWarningIcon=!0;let i=e=>{d.go(`/`),r.removeEventListener(`closedModal`,i)};r.addEventListener(`closedModal`,i),r.addEventListener(`closeModal`,i),this.dispatchEvent(new f(r))})}showBackBtn_(e,t){return e===z.CREATE_DEPOSIT&&!t||e===z.DEPOSIT_ACCEPTED}onClickBack(e){if(this.currentState===z.CREATE_DEPOSIT){let t=this.shadowRoot.querySelector(`bannoweb-ensenta-deposit-form`)||{};
1t.focusedPane===`to-accounts`?t.focusedPane=`form`:t.focusedPane===`form`&&(t.amount||t.frontImage||t.backImage)?this.onDeleteCheck(e):t.focusedPane===`form`&&(this.totalChecks||[]).filter(e=>e.accepted).length>0?this.currentState=z.DEPOSIT_ACCEPTED:history.back()}else history.back()}showCloseBtn_(e,t){return e===z.CREATE_DEPOSIT&&t}onStopEditing(e){this.isEditing=!1,this.currentState=this.previousState}onClickRetryAccounts(e){this.currentState=z.LOADING,setTimeout(()=>{this.loadDepositAccounts()},500)}isState(e,t){return e===t}onSubmitItem(e){this.isEditing=!1,this.loadingMessage=`Verifying check`,this.currentState=z.LOADING,e.detail.toAccount&&(this.toAccount=e.detail.toAccount),e.detail.depositNote&&(this.depositNote=e.detail.depositNote),this.ensureBatchIdCreated_(this.toAccount,e.detail.amount,e.detail.frontImage,e.detail.backImage,e.detail.depositNote)}async ensureBatchIdCreated_(e,t,n,r,i){if(this.batchId)this.submitItemForVerification(this.batchId,t,n,r);else try{let a=this.ensentaAccounts.find(t=>t.accountId===e.accountId).accountIndex,o=await R.startBatch(a,i);this.batchId=o.batchId,this.submitItemForVerification(this.batchId,t,n,r)}catch{this.displayErrorDialog_(V.OOPS,c.OOPS_OUR_BAD_HEADER)}}getItemNumber_(e){let t=(e[e.length-1]||{}).itemNumber;return t?++t:1}timeout(e){return new Promise(t=>setTimeout(t,e))}async waitForCheck(e){try{if(!(await R.getBatch(this.batchId)).processedItemNumbers.includes(e))return await this.timeout(100),this.waitForCheck(e)}catch{this.displayErrorDialog_(V.OOPS,c.OOPS_OUR_BAD_HEADER)}}async submitItemForVerification(e,t,n,r){try{let i=this.getItemNumber_(this.totalChecks);this.checkRequest={itemNumber:i,amount:t,checkFront:n,checkBack:r};let a=await R.addItemToBatch(e,i,t,n,r),o=a.riskFactors;this.checkVerification=a,this.push(`totalChecks`,{itemNumber:i,amount:t,accepted:!1}),this.fundsAvailabilityText=a.fundsAvailabilityText,a.riskFactors?this.processRiskFactors(o):this.getItemInBatch(e,i)}catch{this.displayErrorDialog_(V.OOPS,c.OOPS_OUR_BAD_HEADER)}}async getItemInBatch(e,t,n=``){try{await this.waitForCheck(t);let r=await R.getItemInBatch(e,t);this.checkVerification=r,this.fundsAvailabilityText=r.fundsAvailabilityText,this.processRiskFactors(r.riskFactors,n)}catch{this.displayErrorDialog_(V.OOPS,c.OOPS_OUR_BAD_HEADER)}}processRiskFactors(e,t=``){if(e&&e.some(e=>!e.rejected))this.currentState=z.REJECTED_EDITABLE;else if(e&&e.some(e=>e.rejected))this.currentState=z.REJECTED_UNEDITABLE;else{this.isEditing=!1,this.currentState=z.DEPOSIT_ACCEPTED;let e=(this.totalChecks||[]).findIndex(e=>e.itemNumber===this.checkRequest.itemNumber);e>-1&&(this.totalChecks[e].accepted=!0,t&&(this.totalChecks[e].amount=t),this.totalChecks=this.totalChecks.slice())}}onUpdateItem(e){this.isEditing=!1,this.loadingMessage=`Verifying check`,this.currentState=z.LOADING,this.updateItemForVerification(e.detail.itemNumber,e.detail.amount,e.detail.frontImage,e.detail.backImage)}async updateItemForVerification(e,t,n,r){try{this.checkRequest={itemNumber:e,amount:t,checkFront:n,checkBack:r};let i=await R.updateItemInBatch(this.batchId,e,t,n,r),a=i.riskFactors;this.checkVerification=i,this.fundsAvailabilityText=i.fundsAvailabilityText,this.processRiskFactors(a,i.amount)}catch{this.displayErrorDialog_(V.OOPS,c.OOPS_OUR_BAD_HEADER)}}onSubmitDeposit(e){this.loadingMessage=`Verifying check`,this.currentState=z.LOADING,this.submitDeposit()}onClickAddAnother(e){this.shadowRoot.querySelector(`bannoweb-ensenta-deposit-form`).resetForm(),this.currentState=z.CREATE_DEPOSIT}getTotalChecks_(...e){return this.totalChecks.slice()}getIsEditing_(e,...t){return e}async submitDeposit(){let e=(this.totalChecks||[]).filter(e=>e.accepted).map(e=>e.itemNumber);try{this.deposit=await R.submitBatch(this.batchId,e),this.currentState=z.DEPOSIT_CONFIRMED}catch(e){e.statusCode===400?this.displayErrorDialog_((JSON.parse(e.response)||{}).message,B.BATCH_SUBMISSION_FAILURE):this.displayErrorDialog_(V.BATCH_SUBMISSION_FAILURE,B.BATCH_SUBMISSION_FAILURE)}}onEditCheck(e){let t=e,n={};this.currentState=z.CREATE_DEPOSIT;let r=this.shadowRoot.querySelector(`bannoweb-ensenta-deposit-form`);r.resetForm(),n=(this.totalChecks||[]).find(e=>e.itemNumber===parseInt(t.detail.itemNumber,10)),r.batchId=this.batchId,r.itemNumber=n.itemNumber,r.amount=n.amount,r.isEditing=this.isEditing=!0}onConfirmCheck(e){this.isEditing=!1,this.currentState=z.DEPOSIT_ACCEPTED;let t=(this.totalChecks||[]).findIndex(e=>e.itemNumber===this.checkRequest.itemNumber);t>-1&&(this.totalChecks[t].accepted=!0,this.totalChecks[t].amount=this.checkRequest.amount,this.totalChecks=this.totalChecks.slice())}onDeleteCheck(e){let n=e,r=(this.totalChecks||[]).filter(e=>e.accepted),i={};if(r.length===1&&(i=(this.totalChecks||[]).find(e=>e.accepted)),r.length===1&&i&&n.detail.itemNumber===i.itemNumber||r.length<1||this.currentState===z.DEPOSIT_ACCEPTED){let e=new y;e.showWarningIcon=!0,e.cancelButtonText=`No`,e.confirmButtonText=`Yes, cancel`,e.header=`Cancel deposit`,e.description=`Are you sure you want to completely cancel this deposit? All deposit information will be lost.`,e.addEventListener(window.BannowebConfirmationDialogElement.Event.CONFIRM,e=>{this.batchId?R.deleteBatch(this.batchId).then(()=>{t.console.log(`deleted batch`,this.batchId),d.go(`/`)}).catch(e=>{t.console.error(`error deleting batch?`,e),d.go(`/`)}).finally(()=>{this.batchId=``,this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0}))}):(this.batchId=``,d.go(`/`),this.dispatchEvent(new CustomEvent(`closeModal`,{bubbles:!0,composed:!0})))}),this.dispatchEvent(new f(e))}else this.deleteItem(n.detail.itemNumber)}deleteItem(e){this.isEditing=!1,this.currentState=z.LOADING,R.deleteItem(this.batchId,e).then(()=>{t.console.log(`deleted item`,e);let n=(this.totalChecks||[]).findIndex(t=>t.itemNumber===e);this.totalChecks[n].accepted=!1,this.totalChecks=this.totalChecks.slice(),this.currentState=z.DEPOSIT_ACCEPTED}).catch(e=>{t.console.error(`error deleting item`,e),this.currentState=z.CREATE_DEPOSIT})}
1static get template(){return r`<style>:host{background-size:100%;flex:1 0 auto;display:block;position:relative}h1{@apply --card-header-title;}jha-card{max-width:600px}.progress-container{flex-direction:column;justify-content:center;align-items:center;width:100%;height:200px;display:inline-flex}.error{text-align:center;color:var(--body-text-secondary-color);padding:48px 0}@media (width<=470px){:host{z-index:99}jha-card{border-radius:0;flex-direction:column;width:auto;min-height:calc(100vh - 56px);margin:56px 0 0;display:flex;position:absolute;top:0;left:0;right:0;animation:none!important}jha-card-header{--jha-card-header-height:62px;z-index:100;background:var(--primary-content-background-color);position:fixed;top:0;left:0;right:0}}</style> <bannoweb-page-container heading="Deposit check"> <jha-card> <jha-card-header center-header slot="header"> <template is="dom-if" if="[[showBackBtn_(currentState, isEditing)]]"> <jha-button type="button" sync id="backBtn" icon on-click="onClickBack" slot="header-left"> <jh-icon-chevron-left aria-label="Back" aria-hidden="false"></jh-icon-chevron-left> </jha-button> </template> <h1>Deposit check</h1> <template is="dom-if" if="[[showCloseBtn_(currentState, isEditing)]]"> <jha-button sync="" slot="header-right" icon="" on-click="onStopEditing" data-test-id="close-button" type="button"> <jh-icon-xmark aria-label="Close dialog" aria-hidden="false"></jh-icon-xmark> </jha-button> </template> </jha-card-header> <template is="dom-if" if="[[isState(currentState, 'loading')]]"> <div class="progress-container"> <jha-progress></jha-progress> [[loadingMessage]] </div> </template> <template is="dom-if" if="[[isState(currentState, 'error')]]"> <div class="error"> Oops, something went wrong on our end. <br> <jha-button type="button" link sync on-click="onClickRetryAccounts"> Try again. </jha-button> </div> </template> <template is="dom-if" if="[[isState(currentState, 'no-eligible-accounts')]]"> Your account is not set up to deposit checks remotely. </template> <template is="dom-if" if="[[isState(currentState, 'create-deposit')]]"> <bannoweb-ensenta-deposit-form deposit-accounts="[[ensentaAccounts]]" to-account="{{toAccount}}" limit-messages="[[limitMessages]]" endorsement-message="[[endorsementMessage]]" total-checks="[[getTotalChecks_(totalChecks.length, currentState)]]" on-submit-item="onSubmitItem" on-update-item="onUpdateItem" is-editing="[[getIsEditing_(isEditing, totalChecks)]]" batch-id="[[batchId]]" on-delete-check="onDeleteCheck"></bannoweb-ensenta-deposit-form> </template> <template is="dom-if" if="[[isState(currentState, 'rejected-editable')]]"> <bannoweb-ensenta-rejected-check check-verification="[[checkVerification]]" item-number="[[checkRequest.itemNumber]]" on-edit-check="onEditCheck" on-confirm-check="onConfirmCheck" on-delete-check="onDeleteCheck" is-confirmable></bannoweb-ensenta-rejected-check> </template> <template is="dom-if" if="[[isState(currentState, 'rejected-uneditable')]]"> <bannoweb-ensenta-rejected-check check-verification="[[checkVerification]]" item-number="[[checkRequest.itemNumber]]" on-delete-check="onDeleteCheck"></bannoweb-ensenta-rejected-check> </template> <template is="dom-if" if="[[isState(currentState, 'deposit-accepted')]]"> <bannoweb-ensenta-deposit-review to-account="[[toAccount]]" deposit-note="[[depositNote]]" total-checks="[[getTotalChecks_(totalChecks.length, currentState)]]" on-edit-check="onEditCheck" on-submit="onSubmitDeposit" on-add-another="onClickAddAnother" funds-availability-text="[[fundsAvailabilityText]]"></bannoweb-ensenta-deposit-review> </template> <template is="dom-if" if="[[isState(currentState, 'deposit-confirmed')]]"> <bannoweb-ensenta-deposit-submitted deposit="[[deposit]]" funds-availability-text="[[fundsAvailabilityText]]"></bannoweb-ensenta-deposit-submitted> </template> </jha-card> </bannoweb-page-container>`}},customElements.define(window.BannowebEnsentaDepositElement.is,window.BannowebEnsentaDepositElement);var U=window.BannowebEnsentaDepositElement;export{U as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.