var Moov;(()=>{"use strict";var e,t,o={},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var r=n[e]={exports:{}};return o[e](r,r.exports,i),r.exports}i.m=o,i.d=(e,t)=>{for(var o in t)i.o(t,o)&&!i.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,o)=>(i.f[o](e,t),t)),[])),i.u=e=>e+"."+{5:"7f8e66aa48388c7584af",248:"85facc6330cddab6a27e",288:"2d8d60380d9913d257cb",302:"c0b8bf2fceb0e15402cd",397:"f587c4398b3ec71e37f1",458:"6d3c214a481ed5b63302",476:"6550688b77c9ad176e3d",504:"429abc7c1e5b7f84f794",532:"adbdce01b18dfaa5f039",565:"83b0537d94588f6b6af6",580:"7ac13f0a4e8e6e3b193e",587:"94cbd85c8863ebd43fca",593:"cab2e0b94138f480760e",596:"72f8f3391f1785c70562"}[e]+".js",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="Moov:",i.l=(o,n,r,a)=>{if(e[o])e[o].push(n);else{var s,d;if(void 0!==r)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var l=c[u];if(l.getAttribute("src")==o||l.getAttribute("data-webpack")==t+r){s=l;break}}s||(d=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",t+r),s.src=o),e[o]=[n];var p=(t,n)=>{s.onerror=s.onload=null,clearTimeout(h);var i=e[o];if(delete e[o],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(n))),t)return t(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),d&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var o=t.getElementsByTagName("script");if(o.length)for(var n=o.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=o[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e})(),(()=>{var e={792:0};i.f.j=(t,o)=>{var n=i.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else{var r=new Promise(((o,i)=>n=e[t]=[o,i]));o.push(n[2]=r);var a=i.p+i.u(t),s=new Error;i.l(a,(o=>{if(i.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=o&&("load"===o.type?"missing":o.type),a=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+a+")",s.name="ChunkLoadError",s.type=r,s.request=a,n[1](s)}}),"chunk-"+t,t)}};var t=(t,o)=>{var n,r,[a,s,d]=o,c=0;if(a.some((t=>0!==e[t]))){for(n in s)i.o(s,n)&&(i.m[n]=s[n]);d&&d(i)}for(t&&t(o);c<a.length;c++)r=a[c],i.o(e,r)&&e[r]&&e[r][0](),e[r]=0},o=self.webpackChunkMoov=self.webpackChunkMoov||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var r={};(()=>{function e(e){return Promise.reject({error:e})}i.d(r,{default:()=>De});const t="Please provide an accountID",o="Please provide an account",n="Please provide a representative",a="Please provide a representativeID",s="Please provide a firstName and lastName for the representative",d="Please provide a bank account id.",c="Please provide a capability id.",u="Please provide a card id.",l="Please provide a walletID.";function p(o){return{link:({accountID:n,bankAccount:i,plaidToken:r,mxAuthorizationCode:a})=>{let s={};if(!n)return e(t);if(!i&&!r&&!a)return e("Please provide a bankAccount, plaidToken, or mxAuthorizationCode.");if(i){if(!i.accountNumber)return e("Please provide a bank account number.");if(!i.routingNumber)return e("Please provide a routingNumber.");if(9!==i.routingNumber.length)return e("Routing number must be 9 digits.");if(!i.holderName)return e("Please provide a holderName.");if(!i.holderType)return e("Please provide a holderType.");if(!i.bankAccountType||!["checking","savings"].includes(i.bankAccountType))return e("Please provide a bankAccountType of 'checking' or 'savings'.");s={account:i}}else r?s={plaid:{token:r}}:a&&(s={mx:{authorizationCode:a}});return o(`/accounts/${n}/bank-accounts`,{method:"POST",body:s,headers:i&&[["x-wait-for","payment-method"]]})},list:({accountID:n})=>n?o(`/accounts/${n}/bank-accounts`,{method:"GET"}):e(t),get:({accountID:n,bankAccountID:i})=>n?i?o(`/accounts/${n}/bank-accounts/${i}`,{method:"GET"}):e(d):e(t),delete:({accountID:n,bankAccountID:i})=>n?i?o(`/accounts/${n}/bank-accounts/${i}`,{method:"DELETE"}):e(d):e(t),startMicroDepositVerification:({accountID:n,bankAccountID:i})=>n?i?o(`/accounts/${n}/bank-accounts/${i}/micro-deposits`,{method:"POST"}):e(d):e(t),completeMicroDepositVerification:({accountID:n,bankAccountID:i,amounts:r})=>n?i?r?o(`/accounts/${n}/bank-accounts/${i}/micro-deposits`,{method:"PUT",body:{amounts:r}}):e("Please provide amounts."):e(d):e(t),startVerification:({accountID:n,bankAccountID:i})=>n?i?o(`/accounts/${n}/bank-accounts/${i}/verify`,{method:"POST"}):e(d):e(t),completeVerification:({accountID:n,bankAccountID:i,code:r})=>n?i?r?o(`/accounts/${n}/bank-accounts/${i}/verify`,{method:"PUT",body:{code:r}}):e("Please provide verification code."):e(d):e(t),getVerification:({accountID:n,bankAccountID:i})=>n?i?o(`/accounts/${n}/bank-accounts/${i}/verify`,{method:"GET"}):e(d):e(t)}}function h(o){return{list:({accountID:n})=>n?o(`/accounts/${n}/cards`,{method:"GET"}):e(t),get:({accountID:n,cardID:i})=>n?i?o(`/accounts/${n}/cards/${i}`,{method:"GET"}):e(u):e(t),disable:({accountID:n,cardID:i})=>n?i?o(`/accounts/${n}/cards/${i}`,{method:"DELETE"}):e(u):e(t),update:({accountID:n,cardID:i,card:r})=>n?i?o(`/accounts/${n}/cards/${i}`,{method:"PATCH",body:r}):e(u):e(t)}}function m(o){return{get:({accountID:n,representativeID:i})=>n?i?o(`/accounts/${n}/representatives/${i}`,{method:"GET"}):e(a):e(t),list:({accountID:n})=>n?o(`/accounts/${n}/representatives`,{method:"GET"}):e(t),create:({accountID:i,representative:r})=>i?r?r.name.firstName&&r.name.lastName?o(`/accounts/${i}/representatives`,{method:"POST",body:r}):e(s):e(n):e(t),update:({accountID:i,representative:r})=>i?r?r.representativeID?r.name.firstName&&r.name.lastName?o(`/accounts/${i}/representatives/${r.representativeID}`,{method:"PUT",body:r}):e(s):e(a):e(n):e(t),delete:({accountID:n,representativeID:i})=>n?i?o(`/accounts/${n}/representatives/${i}`,{method:"DELETE"}):e(a):e(t)}}function v(o){return{get:({accountID:n,paymentMethodID:i})=>n?i?o(`/accounts/${n}/payment-methods/${i}`,{method:"GET"}):e("Please provide a payment method id."):e(t),list:({accountID:n})=>n?o(`/accounts/${n}/payment-methods`,{method:"GET"}):e(t)}}function f(o){return{get:({accountID:n,capabilityID:i})=>n?i?o(`/accounts/${n}/capabilities/${i}`,{method:"GET"}):e(c):e(t),list:({accountID:n})=>n?o(`/accounts/${n}/capabilities`,{method:"GET"}):e(t),request:({accountID:n,capabilities:i})=>n?i&&Array.isArray(i)?o(`/accounts/${n}/capabilities`,{method:"POST",body:{capabilities:i}}):e("Please provide a capabilities list as an array of string."):e(t),unrequest:({accountID:n,capabilityID:i})=>n?i?o(`/accounts/${n}/capabilities/${i}`,{method:"DELETE"}):e(c):e(t)}}const w={count:50,skip:0};function b(o){return{get:({accountID:n,walletID:i})=>n?i?o(`/accounts/${n}/wallets/${i}`):e(l):e(t),list:({accountID:n})=>n?o(`/accounts/${n}/wallets`):e(t),getTransaction:({accountID:n,walletID:i,transactionID:r})=>n?i?r?o(`/accounts/${n}/wallets/${i}/transactions/${r}`):e("Please provide a transactionID."):e(l):e(t),listTransactions:({accountID:n,walletID:i,filter:r})=>{if(!n)return e(t);if(!i)return e(l);let a=r;a=a||w;const s=new URLSearchParams(a);return o(`/accounts/${n}/wallets/${i}/transactions?${s.toString()}`)}}}function y(o){return{upload:({accountID:n,file:i,filePurpose:r})=>{if(!n)return e(t);if(!i)return e("Please provide a file object.");if(!r)return e("Please provide a file purpose.");const a=new FormData;return a.append("file",i),a.append("filePurpose",r),o(`/accounts/${n}/files`,{method:"POST",file:!0,body:a})},list:({accountID:n})=>n?o(`/accounts/${n}/files`,{method:"GET"}):e(t),get:({accountID:n,fileID:i})=>n?i?o(`/accounts/${n}/files/${i}`,{method:"GET"}):e("Please provide a file id."):e(t)}}function k(o){return{get:({accountID:n})=>n?o(`/accounts/${n}/underwriting`,{method:"GET"}):e(t),update:({accountID:n,underwriting:i})=>n?i?o(`/accounts/${n}/underwriting`,{method:"PUT",body:i}):e("Please provide an account underwriting object."):e(t)}}const I=o=>({create:({accountID:n,applePaySessionConfig:i})=>n?i?o(`/accounts/${n}/apple-pay/sessions`,{method:"POST",body:{...i,domain:location.host}}):e("Please provide an applePaySessionConfig."):e(t)}),D=o=>({create:({accountID:n,applePayToken:i})=>n?i?o(`/accounts/${n}/apple-pay/tokens`,{method:"POST",body:i}):e("Please provide an applePayToken."):e(t)});function P(n){function i(){return n("/tos-token")}function r(i){let r,a;if(!i)return e(o);try{({accountID:r,...a}=i)}catch{return e(o)}return r?n(`/accounts/${r}`,{method:"PATCH",body:a}):e(t)}return{create:t=>t?n("/accounts",{method:"POST",body:t,headers:[["x-wait-for","connection"]]}):e(o),get:({accountID:t,foreignID:o})=>t||o?n(t?`/accounts/${t}`:`/accounts?foreignID=${o}`):e("Please provide an accountID or a foreignID"),update:i=>i?i.accountID?n(`/accounts/${i.accountID}`,{method:"PUT",body:i}):e(t):e(o),patch:r,getTermsOfServiceToken:i,acceptTermsOfService:({accountID:o})=>o?i().then((e=>e.error?e.error:r({accountID:o,termsOfService:{...e}}))):e(t),bankAccounts:{...p(n)},cards:{...h(n)},wallets:{...b(n)},representatives:{...m(n)},paymentMethods:{...v(n)},capabilities:{...f(n)},files:{...y(n)},underwriting:{...k(n)},applePay:{tokens:{...D(n)},sessions:{...I(n)}}}}const g=["prod","staging","local","mock"],M=e=>e.charAt(0).toUpperCase()+e.slice(1),E=e=>{const t=e.split(/[. ]/g).map((e=>(e=>{const t=e.replace(/([a-z])([A-Z])/g,"$1 $2").toLowerCase();return M(t)})(e))),o=t.join(" ").toLowerCase();return M(o)},L=(e,t="")=>{const o=[];return Object.entries(e).map((([e,n])=>{const i=`${t}.${"error"===e?"":e}`.replace(/^\.|\.$/g,""),r=E(i);if("string"==typeof n){const e=`${r.length?`${r}: `:""}${R(n)}`;o.push(e)}else o.push(...L(n,i))})),o},R=e=>`${M(e.trim().replace(/\.$/,""))}.`,$=e=>{const[t,o]=e.split(":");return o?`${E(t).trim()}: ${R(o)}`:R(t)},C=e=>(e=>e.map($))(e).join(" ").trim(),S=e=>C(L(e)),T=function(){let e="prod";try{e=window.location.hostname.includes("moov-staging")?"staging":"prod"}catch{}try{const t=localStorage.getItem("moovEnv")||e;e=g.includes(t)?t:e}catch{}return e}(),J=(e=>{let t="https://951e6386-a35f-48ea-b5fe-504b039564d6.mock.pstmn.io";switch(e){case"staging":t="https://api.moov-staging.io";break;case"local":t="http://local.moov.io/api";break;default:t="https://api.moov.io"}return t})(T),O=e=>{if(e.response)try{return"string"==typeof(t=e.response)?t:"object"==typeof t&&t?"error"in t?Array.isArray(t.error)?C(t.error):"string"==typeof t.error?t.error:S(t.error):Array.isArray(t)?C(t):S(t):"Unknown error"}catch{return"API request error"}var t;return"API request error"},A=e=>(t,o={})=>((e,t)=>((e,t={})=>{const o=new XMLHttpRequest,n=t.method||"GET";return new Promise((function(i,r){o.onreadystatechange=function(){4===o.readyState&&(o.status>=200&&o.status<300?i(o.response):r({statusCode:o.status,error:O(o)}))},o.open(n,e,!0),"mock"!==T&&(o.withCredentials=!0),t.headers&&t.headers.length>0&&t.headers.forEach((e=>{o.setRequestHeader(...e)})),t.file?o.send(t.body):t.body?(o.setRequestHeader("Content-Type","application/json"),o.send(JSON.stringify(t.body))):o.send()}))})(J+e,t).then((e=>{try{return JSON.parse(e)}catch{return e}})))(t,{...o,headers:[...o.headers?o.headers:[],["Authorization","Bearer "+e]]}),V={success:!1},z=e=>({lookupByRoutingNumber:(t,o=!1)=>9!==t?.length?Promise.reject({error:"Routing number must be 9 digits"}):e(`/institutions/ach/search?routingNumber=${t}`).then((e=>((e,t)=>e.achParticipants?.length>0&&!t?{success:!0,result:e.achParticipants}:1===e.achParticipants?.length?{success:!0,result:e.achParticipants[0]}:V)(e,o)))}),U=e=>({ping:()=>e("/ping").then((e=>({success:e.ok})))});function x(t){return{lookup:({email:o})=>o?t(`/enrichment/profile?email=${o}`):e("Please provide an email address."),avatar:({avatarID:o})=>o?t(`/avatars/${o}`):e("Please provide an avatarID."),listIndustries:()=>t("/industries"),lookupAddress:({search:o,...n})=>{if(!o)return e("Please provide an address");const i=Object.entries({search:o,...n}),r=new URLSearchParams(i);return t(`/enrichment/address?${r}`)}}}let j=null;const N=/^https:\/\/cdn\.plaid\.com\/link\/v2\/stable\/link-initialize\.js?(\?.*)?$/,_=()=>(null!==j||(j=((e,t,o="Script",n)=>new Promise(((i,r)=>{if("undefined"==typeof window)return void i(null);const a=n();if(a)i(a);else try{let a=((e,t)=>{const o=document.querySelectorAll(`script[src^="${e}"]`);for(let e=0;e<o.length;e++){const n=o[e];if(t.test(n.src))return n}return null})(e,t);if(a)return console.warn(`${o} already loaded`),void i(n());a=(e=>{const t=document.createElement("script");t.src=e;const o=document.head||document.body;if(!o)throw new Error("Expected document.body not to be null. A <body> element is required for injecting scripts.");return o.appendChild(t),t})(e),a.addEventListener("load",(()=>{const e=n();e?i(e):r(new Error(`${o} not available`))})),a.addEventListener("error",(()=>{r(new Error(`Failed to load ${o}`))}))}catch(e){r(e)}})))("https://cdn.plaid.com/link/v2/stable/link-initialize.js",N,"Plaid Link",(()=>window.Plaid))),j),q=e=>{function t({token:t,accountID:o,env:n="production",onSuccess:i,onEvent:r,onExit:a,onLoad:s,onProcessorTokenRequest:d,product:c=["auth"],...u}){if(!o)throw new Error("accountID is required");let l=!1;const p=new Promise(((p,h)=>{const m=window.Plaid.create({token:t,onLoad:function(){p(m),l=!0,s&&s()},onSuccess:function(t,n){const a=n.accounts[0].id;d?d(t,a).then((t=>function({accountID:t,processorToken:o}){return e(`/accounts/${t}/bank-accounts`,{method:"POST",body:{plaid:{token:o}}})}({processorToken:t,accountID:o}))).then((e=>i&&i(e))).catch((e=>r&&r("ERROR",e))):function({accountID:t,publicToken:o}){return e(`/accounts/${t}/bank-accounts`,{method:"POST",body:{plaidLink:{publicToken:o}}})}({publicToken:t,accountID:o}).then((e=>i&&i(e))).catch((e=>r&&r("ERROR",e)))},onExit:function(e,t){a&&a(e,t),null!==e&&console.error("Plaid error:",e)},onEvent:function(e,t){l||"ERROR"!==e||(h(t),l=!0),r&&r(e,t)},product:c,env:n,...u})}));return p}return{reinitialize:async function({receivedRedirectUri:e,...o}){let n,i,r=null;try{r=localStorage.getItem("moovPlaidToken")}catch{}if(!r)throw new Error("No token found");try{const e=JSON.parse(r);n=e.accountID,i=e.token}catch{throw new Error("Could not parse token data")}try{await _()}catch(e){throw new Error("Error loading Plaid Link SDK")}const a=window?window.location.href:"",s=await t({receivedRedirectUri:e||a,...o,accountID:n,token:i});return s.open(),s},initialize:async function({accountID:o,elementID:n,redirectURL:i,shadowRootElement:r,token:a,...s}){if(!o)throw new Error("accountID is required");try{await _()}catch(e){throw new Error("Error loading Plaid Link SDK")}let d=a;d||(d=await function({accountID:t,redirectURL:o}){return e(`/accounts/${t}/plaidtoken`,{method:"POST",body:{redirectURL:o}}).then((e=>e.linkToken))}({accountID:o,redirectURL:i}));try{localStorage.setItem("moovPlaidToken",JSON.stringify({token:d,accountID:o}))}catch{}const c=await t({...s,token:d,accountID:o});if(n){let e;e=r?r.getElementById(n):document.getElementById(n),e?e.addEventListener("click",(function(){c.open()})):console.error(`Element with id="${n}"" not found.`)}return c}}},H={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let B;const G=new Uint8Array(16),F=[];for(let e=0;e<256;++e)F.push((e+256).toString(16).slice(1));const K=function(e,t,o){if(H.randomUUID&&!t&&!e)return H.randomUUID();const n=(e=e||{}).random??e.rng?.()??function(){if(!B){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");B=crypto.getRandomValues.bind(crypto)}return B(G)}();if(n.length<16)throw new Error("Random bytes length must be >= 16");if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){if((o=o||0)<0||o+16>t.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[o+e]=n[e];return t}return function(e,t=0){return(F[e[t+0]]+F[e[t+1]]+F[e[t+2]]+F[e[t+3]]+"-"+F[e[t+4]]+F[e[t+5]]+"-"+F[e[t+6]]+F[e[t+7]]+"-"+F[e[t+8]]+F[e[t+9]]+"-"+F[e[t+10]]+F[e[t+11]]+F[e[t+12]]+F[e[t+13]]+F[e[t+14]]+F[e[t+15]]).toLowerCase()}(n)},X=function(e,t,o="_drop"){t.forEach((t=>{const n=`_${t}`,i=`_${t}GetSideEffect`,r=`_${t}SetSideEffect`;Object.defineProperty(e.prototype,n,{writable:!0,value:void 0}),Object.defineProperty(e.prototype,t,{get:function(){const e=this,t=e[i];return"function"==typeof t&&t.call(e),e[n]},set:function(e){const i=this,a=i[o];i[n]=e;const s=i[r];var d;"function"==typeof s&&s.call(i,e),(d=a)&&void 0!==d.render&&"function"==typeof d.render&&a.render({[t]:e})}})}))},Z=e=>e.replace(/-./g,(e=>e[1].toUpperCase()));class Q extends HTMLElement{static observedAttributes=["oauth-token","account-id","validation-event","merchant-account-id"];static componentProps=["oauthToken","accountID","validationEvent","inputStyle","onEnterKeyPress","onError","onValidated","onSuccess","imperativeRef","holderName","allowedCardBrands","billingAddress","merchantAccountID","cardOnFile"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-card-link-${K()}`),this.imperativeRef||(this.imperativeRef={current:null});const e={};Q.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.cardLink(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;let n=Z(e);"account-id"===e&&(n="accountID"),"merchant-account-id"===e&&(n="merchantAccountID"),n in this&&(this[n]=o)}submit(){this.imperativeRef.current?.submit?.()}validate(){this.imperativeRef.current?.validate?.()}fetchValidity(){return this.imperativeRef.current?.fetchValidity?.()}clear(){this.imperativeRef.current?.clear?.()}}X(Q,Q.componentProps);const W=Q;class Y extends HTMLElement{static observedAttributes=["token","account-id"];static componentProps=["token","accountID","open","onCancel","onError","onSuccess"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-file-upload-${K()}`);const e={};Y.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.fileUpload(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeToProperty(e){return"account-id"===e?"accountID":"facilitator-account-id"===e?"facilitatorAccountID":Z(e)}attributeChangedCallback(e,t,o){if(t===o)return;const n=this.attributeToProperty(e);n in this&&(this[n]=o)}}X(Y,Y.componentProps);const ee=Y;class te extends HTMLElement{static observedAttributes=["oauth-token","account-id","issued-card-id","background"];static componentProps=["oauthToken","accountID","issuedCardID","background"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-issued-card-${K()}`),this.imperativeRef||(this.imperativeRef={current:null});const e={};te.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.issuedCard(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;let n=Z(e);"account-id"===e&&(n="accountID"),"issued-card-id"===e&&(n="issuedCardID"),n in this&&(this[n]=o)}}X(te,te.componentProps);const oe=te;class ne extends HTMLElement{static observedAttributes=["facilitator-account-id","token","account-id","show-logo"];static componentProps=["accountData","capabilities","facilitatorAccountID","onCancel","onError","onResourceCreated","onPlaidRedirect","open","token","mode","plaid","accountID","paymentMethodTypes","microDeposits","allowedCardBrands","merchantAccountID","cardOnFile","showLogo"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-onboarding-${K()}`);const e={};ne.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.onboarding(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeToProperty(e){return"account-id"===e?"accountID":"facilitator-account-id"===e?"facilitatorAccountID":"merchant-account-id"===e?"merchantAccountID":Z(e)}attributeChangedCallback(e,t,o){if(t===o)return;const n=this.attributeToProperty(e);n in this&&(this[n]=o)}}X(ne,ne.componentProps);const ie=ne;class re extends HTMLElement{static observedAttributes=["facilitator-account-id","token","account-id"];static componentProps=["accountData","facilitatorAccountID","onCancel","onError","onResourceCreated","onPlaidRedirect","open","token","plaid","accountID","paymentMethodTypes","microDeposits","allowedCardBrands","merchantAccountID","cardOnFile"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-payment-methods-${K()}`);const e={};re.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.paymentMethods(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeToProperty(e){return"account-id"===e?"accountID":"facilitator-account-id"===e?"facilitatorAccountID":"merchant-account-id"===e?"merchantAccountID":Z(e)}attributeChangedCallback(e,t,o){if(t===o)return;const n=this.attributeToProperty(e);n in this&&(this[n]=o)}}X(re,re.componentProps);const ae=re;class se extends HTMLElement{static observedAttributes=["name","method","action"];static componentProps=["imperativeRef","name","method","action","requestHeaders","requestBody","onSuccess","onError","onCheckValidity","onReportValidity","onReadOnlyPropertyUpdate"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-form-${K()}`),this.imperativeRef||(this.imperativeRef={current:null}),this.onReadOnlyPropertyUpdate=this.handleReadOnlyPropertyUpdate.bind(this);const e={};se.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.form(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;const n=e.replace("-",""),i=se.componentProps.find((e=>e.toLowerCase()===n.toLowerCase()));i&&i in this&&(this[i]=o)}handleReadOnlyPropertyUpdate(e){this&&e&&Object.assign(this,e)}checkValidity(){this.imperativeRef.current?.checkValidity?.()}reportValidity(){this.imperativeRef.current?.reportValidity?.()}requestSubmit(){this.imperativeRef.current?.requestSubmit?.()}reset(){this.imperativeRef.current?.reset?.()}submit(){this.imperativeRef.current?.submit?.()}}X(se,se.componentProps);const de=se;class ce extends HTMLElement{static observedAttributes=["inputmode","name","form-name","formname","value","disabled","required","autocomplete","maxlength","minlength","pattern","placeholder","readonly","size"];static componentProps=["imperativeRef","defaultValue","value","inputmode","name","formName","disabled","required","autocomplete","maxLength","minLength","pattern","placeholder","readOnly","size","inputStyle","onInput","onChange","onFocus","onBlur","onInvalid","onEnterKeyPress","onCheckValidity","onReportValidity","onReadOnlyPropertyUpdate"];_drop;imperativeRef={current:{}};constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-text-input-${K()}`),this.imperativeRef||(this.imperativeRef={current:{}}),this.onReadOnlyPropertyUpdate=this.handleReadOnlyPropertyUpdate.bind(this);const e={};ce.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.textInput(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized).catch((e=>{}))};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;const n=e.replace("-",""),i=ce.componentProps.find((e=>e.toLowerCase()===n.toLowerCase()));i&&i in this&&(this[i]=o)}handleReadOnlyPropertyUpdate(e){this&&e&&Object.assign(this,e)}blur(){this.imperativeRef.current.blur?.()}click(){this.imperativeRef.current.click?.()}focus(){this.imperativeRef.current.focus?.()}select(){this.imperativeRef.current.select?.()}setValue(e){this.imperativeRef.current.setValue?.(e)}setCustomValidity(e){this.imperativeRef.current.setCustomValidity?.(e)}checkValidity(){this.imperativeRef.current.checkValidity?.()}reportValidity(){this.imperativeRef.current.reportValidity?.()}_valueSetSideEffect(e){this.setValue(e)}}X(ce,ce.componentProps);const ue=ce;class le extends HTMLElement{static observedAttributes=["name","form-name","formname","disabled","required","placeholder","readonly","size"];static componentProps=["imperativeRef","name","formName","disabled","required","placeholder","readOnly","size","inputStyle","allowedCardBrands","onInput","onChange","onFocus","onBlur","onInvalid","onEnterKeyPress","onCheckValidity","onReportValidity","onReadOnlyPropertyUpdate","onBrandChange"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-card-number-input-${K()}`),this.imperativeRef||(this.imperativeRef={current:null}),this.onReadOnlyPropertyUpdate=this.handleReadOnlyPropertyUpdate.bind(this);const e={};le.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.cardNumberInput(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;const n=e.replace("-",""),i=le.componentProps.find((e=>e.toLowerCase()===n.toLowerCase()));i&&i in this&&(this[i]=o)}handleReadOnlyPropertyUpdate(e){this&&e&&Object.assign(this,e)}blur(){this.imperativeRef.current?.blur?.()}click(){this.imperativeRef.current?.click?.()}focus(){this.imperativeRef.current?.focus?.()}select(){this.imperativeRef.current?.select?.()}setCustomValidity(e){this.imperativeRef.current?.setCustomValidity?.(e)}checkValidity(){this.imperativeRef.current?.checkValidity?.()}reportValidity(){this.imperativeRef.current?.reportValidity?.()}}X(le,le.componentProps);const pe=le;class he extends HTMLElement{static observedAttributes=["name","form-name","formname","disabled","required","placeholder","readonly","size"];static componentProps=["imperativeRef","name","formName","disabled","required","placeholder","readOnly","size","inputStyle","onInput","onChange","onFocus","onBlur","onInvalid","onEnterKeyPress","onCheckValidity","onReportValidity","onReadOnlyPropertyUpdate"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-card-security-code-input-${K()}`),this.imperativeRef||(this.imperativeRef={current:null}),this.onReadOnlyPropertyUpdate=this.handleReadOnlyPropertyUpdate.bind(this);const e={};he.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.cardSecurityCodeInput(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;const n=e.replace("-",""),i=he.componentProps.find((e=>e.toLowerCase()===n.toLowerCase()));i&&i in this&&(this[i]=o)}handleReadOnlyPropertyUpdate(e){this&&e&&Object.assign(this,e)}blur(){this.imperativeRef.current?.blur?.()}click(){this.imperativeRef.current?.click?.()}focus(){this.imperativeRef.current?.focus?.()}select(){this.imperativeRef.current?.select?.()}setCustomValidity(e){this.imperativeRef.current?.setCustomValidity?.(e)}checkValidity(){this.imperativeRef.current?.checkValidity?.()}reportValidity(){this.imperativeRef.current?.reportValidity?.()}}X(he,he.componentProps);const me=he;class ve extends HTMLElement{static observedAttributes=["name","form-name","formname","value","disabled","required","readonly","size"];static componentProps=["imperativeRef","defaultValue","value","name","formName","disabled","required","readOnly","size","inputStyle","onInput","onChange","onFocus","onBlur","onInvalid","onEnterKeyPress","onCheckValidity","onReportValidity","onReadOnlyPropertyUpdate"];_drop;imperativeRef={current:{}};constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-expiration-date-input-${K()}`),this.imperativeRef||(this.imperativeRef={current:{}}),this.onReadOnlyPropertyUpdate=this.handleReadOnlyPropertyUpdate.bind(this);const e={};ve.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.expirationDateInput(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized).catch((e=>{}))};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeChangedCallback(e,t,o){if(t===o)return;const n=e.replace("-",""),i=ve.componentProps.find((e=>e.toLowerCase()===n.toLowerCase()));i&&i in this&&(this[i]=o)}handleReadOnlyPropertyUpdate(e){this&&e&&Object.assign(this,e)}blur(){this.imperativeRef.current.blur?.()}click(){this.imperativeRef.current.click?.()}focus(){this.imperativeRef.current.focus?.()}select(){this.imperativeRef.current.select?.()}setValue(e){this.imperativeRef.current.setValue?.(e)}setCustomValidity(e){this.imperativeRef.current.setCustomValidity?.(e)}checkValidity(){this.imperativeRef.current.checkValidity?.()}reportValidity(){this.imperativeRef.current.reportValidity?.()}_valueSetSideEffect(e){this.setValue(e)}}X(ve,ve.componentProps);const fe=ve;class we extends HTMLElement{static observedAttributes=["token","custom-action-copy","text-color","link-color","background-color","font-size"];static componentProps=["token","customActionCopy","onTermsOfServiceTokenReady","onTermsOfServiceTokenError","textColor","linkColor","backgroundColor","fontSize"];_drop;constructor(){super()}handleMoovDropsInitialized=()=>{this.id||(this.id=`moov-terms-of-service-${K()}`);const e={};we.componentProps.forEach((t=>{t in this&&(e[t]=this[t])}));const t=window.drops.termsOfService(e,this.id);this._drop=t};handleMoovJsLoaded=()=>{document.removeEventListener("moov.moovJSLoaded",this.handleMoovJSLoaded),window.Moov&&!window.drops&&window.Moov("fake-token").drops().then(this.handleMoovDropsInitialized)};connectedCallback(){window.drops&&this.handleMoovDropsInitialized(),window.Moov&&!window.drops&&this.handleMoovJsLoaded(),window.Moov||window.drops||document.addEventListener("moov.moovJSLoaded",this.handleMoovJsLoaded)}attributeToProperty(e){return"account-id"===e?"accountID":"facilitator-account-id"===e?"facilitatorAccountID":Z(e)}attributeChangedCallback(e,t,o){if(t===o)return;const n=this.attributeToProperty(e);n in this&&(this[n]=o)}}X(we,we.componentProps);const be=we,ye=e=>async function(){return await i.e(504).then(i.bind(i,504)),window.drops&&(window.drops.moovAccessToken=e),window.drops};window&&window.customElements&&(window.customElements.get("moov-card-link")||(window.customElements.define("moov-card-link",W),window.customElements.define("moov-file-upload",ee),window.customElements.define("moov-issued-card",oe),window.customElements.define("moov-onboarding",ie),window.customElements.define("moov-payment-methods",ae),window.customElements.define("moov-form",de),window.customElements.define("moov-text-input",ue),window.customElements.define("moov-card-number-input",pe),window.customElements.define("moov-card-security-code-input",me),window.customElements.define("moov-expiration-date-input",fe),window.customElements.define("moov-terms-of-service",be)));const ke=new CustomEvent("moov.moovJSLoaded");setTimeout((()=>document.dispatchEvent(ke)),0);const Ie=e=>{if(!("fake-token"===(t=e)||(o=t)&&/^[\w-]+\.[\w-]+\.[\w-]+$/.test(o)))throw new Error("Please initialize Moov.js with a valid Moov access token.");var t,o;const n=A(e);return{ping:U(n).ping,enrichment:{...x(n)},institutions:{...z(n)},accounts:{...P(n)},setToken:e=>Ie(e),plaid:{...q(n)},drops:ye(e),version:"0.10.0"}},De=Ie})(),Moov=r.default})();