@justifi/webcomponents 4.22.1 → 4.22.2
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/{Analytics-0d90fa0d.js → Analytics-99a3c7f8.js} +1 -1
- package/dist/cjs/{business-additional-questions-schema-19f08938.js → business-additional-questions-schema-d82355b0.js} +1 -1
- package/dist/cjs/{business-identity-schema-a8bb2276.js → business-identity-schema-3d241053.js} +1 -1
- package/dist/cjs/{check-pkg-version-fafb21ae.js → check-pkg-version-9bd49ad6.js} +1 -1
- package/dist/cjs/form-control-checkbox_9.cjs.entry.js +3 -3
- package/dist/cjs/justifi-additional-questions-form-step_10.cjs.entry.js +1 -1
- package/dist/cjs/justifi-bank-account-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-details.cjs.entry.js +3 -3
- package/dist/cjs/justifi-business-form.cjs.entry.js +6 -6
- package/dist/cjs/justifi-card-form.cjs.entry.js +2 -2
- package/dist/cjs/justifi-checkout.cjs.entry.js +3 -3
- package/dist/cjs/justifi-checkouts-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +3 -3
- package/dist/cjs/justifi-owner-form_3.cjs.entry.js +2 -2
- package/dist/cjs/justifi-payment-details.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-form.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-provisioning.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payout-details.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-season-interruption-insurance.cjs.entry.js +3 -3
- package/dist/cjs/justifi-terminals-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-tokenize-payment-method.cjs.entry.js +3 -3
- package/dist/cjs/{package-596f102c.js → package-e25f61a8.js} +1 -1
- package/dist/cjs/{schema-validations-184a4356.js → schema-validations-7a9afa7c.js} +0 -1
- package/dist/collection/components/business-forms/schemas/schema-validations.js +0 -1
- package/dist/docs.json +1 -1
- package/dist/esm/{Analytics-a46c0c00.js → Analytics-f4e959b2.js} +1 -1
- package/dist/esm/{business-additional-questions-schema-97f52255.js → business-additional-questions-schema-a5072d2b.js} +1 -1
- package/dist/esm/{business-identity-schema-434e16bc.js → business-identity-schema-b31178a1.js} +1 -1
- package/dist/esm/{check-pkg-version-ed46fa3b.js → check-pkg-version-5e658940.js} +1 -1
- package/dist/esm/form-control-checkbox_9.entry.js +3 -3
- package/dist/esm/justifi-additional-questions-form-step_10.entry.js +1 -1
- package/dist/esm/justifi-bank-account-form.entry.js +2 -2
- package/dist/esm/justifi-billing-form_2.entry.js +2 -2
- package/dist/esm/justifi-business-details.entry.js +3 -3
- package/dist/esm/justifi-business-form.entry.js +6 -6
- package/dist/esm/justifi-card-form.entry.js +2 -2
- package/dist/esm/justifi-checkout.entry.js +3 -3
- package/dist/esm/justifi-checkouts-list.entry.js +3 -3
- package/dist/esm/justifi-gross-payment-chart.entry.js +3 -3
- package/dist/esm/justifi-owner-form_3.entry.js +2 -2
- package/dist/esm/justifi-payment-details.entry.js +3 -3
- package/dist/esm/justifi-payment-form.entry.js +3 -3
- package/dist/esm/justifi-payment-provisioning.entry.js +3 -3
- package/dist/esm/justifi-payments-list.entry.js +3 -3
- package/dist/esm/justifi-payout-details.entry.js +3 -3
- package/dist/esm/justifi-payouts-list.entry.js +3 -3
- package/dist/esm/justifi-season-interruption-insurance.entry.js +3 -3
- package/dist/esm/justifi-terminals-list.entry.js +3 -3
- package/dist/esm/justifi-tokenize-payment-method.entry.js +3 -3
- package/dist/esm/{package-6c5cc174.js → package-95aca142.js} +1 -1
- package/dist/esm/{schema-validations-c1728516.js → schema-validations-cd8c5f69.js} +0 -1
- package/dist/module/package.js +1 -1
- package/dist/module/schema-validations.js +0 -1
- package/dist/webcomponents/{p-c4df0098.entry.js → p-09fb7dd6.entry.js} +1 -1
- package/dist/webcomponents/p-0c03a971.entry.js +1 -0
- package/dist/webcomponents/{p-088826fe.entry.js → p-0ec27543.entry.js} +1 -1
- package/dist/webcomponents/{p-e07d5e0f.entry.js → p-1251a3f5.entry.js} +1 -1
- package/dist/webcomponents/{p-fb2005de.js → p-22e38d5b.js} +1 -1
- package/dist/webcomponents/{p-8f26db63.entry.js → p-2a9f48f0.entry.js} +1 -1
- package/dist/webcomponents/{p-5f10b3e9.entry.js → p-2dc7751f.entry.js} +1 -1
- package/dist/webcomponents/p-3f82f724.entry.js +1 -0
- package/dist/webcomponents/{p-4422ca71.entry.js → p-44f7f729.entry.js} +1 -1
- package/dist/webcomponents/{p-69ea7334.entry.js → p-55f78fcc.entry.js} +1 -1
- package/dist/webcomponents/{p-32a782c8.entry.js → p-5fd72c29.entry.js} +1 -1
- package/dist/webcomponents/{p-3d3468a8.js → p-7285c687.js} +1 -1
- package/dist/webcomponents/{p-11ff46df.entry.js → p-7a8c13ba.entry.js} +1 -1
- package/dist/webcomponents/{p-18afa159.entry.js → p-83b01812.entry.js} +1 -1
- package/dist/webcomponents/p-88efdd31.js +1 -0
- package/dist/webcomponents/{p-eee24bb2.entry.js → p-8e2e24d8.entry.js} +1 -1
- package/dist/webcomponents/p-90b8acc6.js +1 -0
- package/dist/webcomponents/{p-4c0c88e4.entry.js → p-91711083.entry.js} +1 -1
- package/dist/webcomponents/{p-84987cd4.entry.js → p-92a766d8.entry.js} +1 -1
- package/dist/webcomponents/{p-7fea661a.js → p-9e7204b5.js} +1 -1
- package/dist/webcomponents/{p-c8b2f11d.entry.js → p-9ef4d294.entry.js} +1 -1
- package/dist/webcomponents/{p-3fbbdbba.entry.js → p-a91a2152.entry.js} +1 -1
- package/dist/webcomponents/{p-74822344.js → p-b459d0b0.js} +1 -1
- package/dist/webcomponents/{p-0eb0d813.entry.js → p-c458fc48.entry.js} +1 -1
- package/dist/webcomponents/{p-16fc16aa.entry.js → p-eed325b7.entry.js} +1 -1
- package/dist/webcomponents/{p-366c49b6.entry.js → p-f45197b9.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-1c44712a.entry.js +0 -1
- package/dist/webcomponents/p-907ba963.js +0 -1
- package/dist/webcomponents/p-c65b78cf.js +0 -1
- package/dist/webcomponents/p-d5cd727b.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,h as o,c as t,H as i}from"./p-fad19d75.js";import{c as r,F as n}from"./p-3c654c07.js";import{u as a,l as s,k as d,m as f,n as c,q as l}from"./p-c65b78cf.js";import{S as u}from"./p-6078a370.js";import{n as m}from"./p-e3c22aa9.js";import{S as h}from"./p-74da98da.js";import{p as b}from"./p-fb2005de.js";import{j as w}from"./p-a8f22d4d.js";import"./p-1815a43b.js";import"./p-5e7c60d8.js";import"./p-1ff8810b.js";const g=r({name:a.required("Enter full name"),address_line1:s.required("Enter street address"),address_line2:d.nullable(),address_city:f.required("Enter city"),address_state:c.required("Select state"),address_postal_code:l.required("Enter postal code")}),p=class{constructor(o){e(this,o),this.inputHandler=(e,o)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:o}))},this.legend=void 0,this.formController=void 0,this.billingInfo=void 0,this.errors={}}componentWillLoad(){this.formController=new n(g)}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate()}}render(){const e=this.formController.getInitialValues();return o(h,{key:"221838c3ba8255b62db0f2feee7b227b0d240627",exportparts:"label,input,input-invalid"},o("form",{key:"87377d7776c3fdf7ffa351f25522921b233dd16f"},o("fieldset",{key:"821487e408ec634dd23417604f02f1aa212dcb2a"},this.legend&&o("legend",{key:"c042f51480e23ad455a6d3fc420f494c33d93f2c"},this.legend),o("div",{key:"6a9f2c0fd10c7786b132f7208036cf878e3fe8c1",class:"row gy-3"},o("div",{key:"b375c19faeb23927e290c4a60b4347dc64868840",class:"col-12"},o("form-control-text",{key:"be3b78234607f996efe8971082ff457e63767e22",name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),o("div",{key:"95d3f3bb6ff7df39deb2967db11017e8f80ca5a9",class:"col-12"},o("form-control-text",{key:"9e719038219bf7b7651679b617b2131ab5336289",name:"address_line1",label:"Street Address",defaultValue:e.address_line1,errorText:this.errors.address_line1,inputHandler:this.inputHandler})),o("div",{key:"0945bca70a70abfdce40c8d52537eb06479aface",class:"col-12"},o("form-control-text",{key:"59b9b87c005609daf501b0d7d6a8d640297c75c4",name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:e.address_line2,errorText:this.errors.address_line2,inputHandler:this.inputHandler})),o("div",{key:"f3e9d8297e9e4009a0b16f331eeffb1316a92030",class:"col-12"},o("form-control-text",{key:"158a4d2e3e85700a5c80304e0316391090b52f74",name:"address_city",label:"City",defaultValue:e.address_city,errorText:this.errors.address_city,inputHandler:this.inputHandler})),o("div",{key:"67110a816d76d4c98062859733def72e88f1a3d9",class:"col-12"},o("form-control-select",{key:"d26b22251d6da9d8f7b8bb109126e804cdfbccb0",name:"address_state",label:"State",options:u,defaultValue:e.address_state,errorText:this.errors.address_state,inputHandler:this.inputHandler})),o("div",{key:"a248ef0a4860d9d634f46e96cc953c8ca0ee64f1",class:"col-12"},o("form-control-text",{key:"36f96a7e94088dd140ca9774903387ae2be3cad8",name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:m}))))))}};p.style=":host{display:block}justifi-billing-form{margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}";var v,y={exports:{}};v=y,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var o,t,i=0,r=!1,n=!1,a=7,s="[iFrameSizer]",d=s.length,f=null,c=window.requestAnimationFrame,l=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},m=null,h=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){x("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),b={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(o,t){N(t,e)})).end()}):k("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof e&&e.amd?e([],P):v.exports=P(),window.iFrameResize=window.iFrameResize||P()}function w(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function g(e,o,t){e.addEventListener(o,t,!1)}function p(e,o,t){e.removeEventListener(o,t,!1)}function y(e){return u[e]?u[e].log:r}function j(e,o){z("log",e,o,y(e))}function k(e,o){z("info",e,o,y(e))}function x(e,o){z("warn",e,o,!0)}function z(e,o,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return s+"["+function(e){var o="Host page: "+e;return window.top!==window.self&&(o=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),o}(e)+"]"}(o),t)}function F(e){function o(){t("Height"),t("Width"),W((function(){E(V),T(L),h("onResized",V)}),V,"init")}function t(e){var o=Number(u[L]["max"+e]),t=Number(u[L]["min"+e]),i=e.toLowerCase(),r=Number(V[i]);j(L,"Checking "+i+" is in range "+t+"-"+o),r<t&&(r=t,j(L,"Set "+i+" to min value")),r>o&&(r=o,j(L,"Set "+i+" to max value")),V[i]=""+r}function i(e){return N.slice(N.indexOf(":")+a+e)}function r(e,o){var t,i;t=function(){var t,i;H("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=V.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,o)},b[i=o]||(b[i]=setTimeout((function(){b[i]=null,t()}),32))}function n(e){var o=e.getBoundingClientRect();return O(L),{x:Math.floor(Number(o.left)+Number(f.x)),y:Math.floor(Number(o.top)+Number(f.y))}}function c(e){var o=e?n(V.iframe):{x:0,y:0},t={x:Number(V.width)+o.x,y:Number(V.height)+o.y};j(L,"Reposition requested from iFrame (offset x:"+o.x+" y:"+o.y+")"),window.top===window.self?(f=t,l(),j(L,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):x(L,"Unable to scroll to requested position, window.parentIFrame not found")}function l(){!1===h("onScroll",f)?R():T(L)}function m(e){var o={};if(0===Number(V.width)&&0===Number(V.height)){var t=i(9).split(":");o={x:t[1],y:t[0]}}else o={x:V.width,y:V.height};h(e,{iframe:V.iframe,screenX:Number(o.x),screenY:Number(o.y),type:V.type})}function h(e,o){return S(L,e,o)}var w,v,y,z,F,M,N=e.data,V={},L=null;"[iFrameResizerChild]Ready"===N?function(){for(var e in u)H("iFrame requested init",A(e),u[e].iframe,e)}():s===(""+N).slice(0,d)&&N.slice(d).split(":")[0]in u?(z=(y=N.slice(d).split(":"))[1]?parseInt(y[1],10):0,F=u[y[0]]&&u[y[0]].iframe,M=getComputedStyle(F),V={iframe:F,id:y[0],height:z+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(M)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(M),width:y[2],type:y[3]},u[L=V.id]&&(u[L].loaded=!0),(v=V.type in{true:1,false:1,undefined:1})&&j(L,"Ignoring init message from meta parent page"),!v&&function(e){var o=!0;return u[e]||(o=!1,x(V.type+" No settings for "+e+". Message was: "+N)),o}(L)&&(j(L,"Received: "+N),w=!0,null===V.iframe&&(x(L,"IFrame ("+V.id+") not found"),w=!1),w&&function(){var o,t=e.origin,i=u[L]&&u[L].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,o=!1;for(j(L,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){o=!0;break}return o}():(j(L,"Checking connection is from: "+(o=u[L]&&u[L].remoteHost)),t===o)))throw new Error("Unexpected message received from: "+t+" for "+V.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[L]&&u[L].firstRun&&u[L]&&(u[L].firstRun=!1),V.type){case"close":I(V.iframe);break;case"message":d=i(6),j(L,"onMessage passed: {iframe: "+V.iframe.id+", message: "+d+"}"),h("onMessage",{iframe:V.iframe,message:JSON.parse(d)}),j(L,"--");break;case"mouseenter":m("onMouseEnter");break;case"mouseleave":m("onMouseLeave");break;case"autoResize":u[L].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":r(u[L]&&u[L].iframe,L),function(){function e(e,i){function n(){u[t]?r(u[t].iframe,t):o()}["scroll","resize"].forEach((function(o){j(t,e+o+" listener for sendPageInfo"),i(window,o,n)}))}function o(){e("Remove ",p)}var t=L;e("Add ",g),u[t]&&(u[t].stopPageInfo=o)}();break;case"pageInfoStop":u[L]&&u[L].stopPageInfo&&(u[L].stopPageInfo(),delete u[L].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(s=document.getElementById(a)||document.getElementsByName(a)[0])?(e=n(s),j(L,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),f={x:e.x,y:e.y},l(),j(L,"--")):window.top===window.self?j(L,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):j(L,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":C(V);break;case"init":o(),h("onInit",V.iframe);break;default:0===Number(V.width)&&0===Number(V.height)?x("Unsupported message received ("+V.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):o()}var e,t,a,s,d}())):k(L,"Ignored: "+N)}function S(e,o,t){var i=null,r=null;if(u[e]){if("function"!=typeof(i=u[e][o]))throw new TypeError(o+" on iFrame["+e+"] is not a function");r=i(t)}return r}function M(e){delete u[e.id]}function I(e){var t=e.id;if(!1!==S(t,"onClose",t)){j(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){x(e)}S(t,"onClosed",t),j(t,"--"),M(e),o&&(o.disconnect(),o=null)}else j(t,"Close iframe cancelled by onClose event")}function O(o){null===f&&j(o,"Get page position: "+(f={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+f.y)}function T(e){null!==f&&(window.scrollTo(f.x,f.y),j(e,"Set page position: "+f.x+","+f.y),R())}function R(){f=null}function C(e){j(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),O(e.id),W((function(){E(e),H("reset","reset",e.iframe,e.id)}),e,"reset")}function E(e){function o(o){n||"0"!==e[o]||(n=!0,j(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function o(o){return"0px"===(u[e]&&u[e].iframe.style[o])}u[e]&&null!==u[e].iframe.offsetParent&&(o("height")||o("width"))&&H("Visibility change","resize",u[e].iframe,e)}(e)}))}function o(o){j("window","Mutation observed: "+o[0].target+" "+o[0].type),V(e,16)}var t,i=w();i&&(t=document.querySelector("body"),new i(o).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(o){e.id?(e.iframe.style[o]=e[o]+"px",j(e.id,"IFrame ("+i+") "+o+" set to "+e[o]+"px")):j("undefined","messageData id not set")}(t),o(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function W(e,o,t){t!==o.type&&c&&!window.jasmine?(j(o.id,"Requesting animation frame"),c(e)):e()}function H(e,o,t,i,r){var n,a=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(j(i,"["+e+"] Sending msg to iframe["+i+"] ("+o+") targetOrigin: "+(n=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(s+o,n)):x(i,"["+e+"] IFrame("+i+") not found"),r&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||a||(a=!0,x(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function A(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function N(t,n){function a(e){var o=e.split("Callback");if(2===o.length){var t="on"+o[0].charAt(0).toUpperCase()+o[0].slice(1);this[t]=this[e],delete this[e],x(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,d,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var o;return""===e&&(t.id=(o=n&&n.id||h.id+i++,null!==document.getElementById(o)&&(o+=i++),e=o),r=(n||{}).log,j(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?x(f,"Ignored iFrame, already setup."):(function(e){var o;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var o in h)Object.prototype.hasOwnProperty.call(h,o)&&(u[f][o]=Object.prototype.hasOwnProperty.call(e,o)?e[o]:h[o])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(o=u[f].remoteHost)||null!==o.match(/^(about:blank|javascript:|file:\/\/)/)?"*":o:"*")}(n),function(){switch(j(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var o=u[f][e];1/0!==o&&0!==o&&(t.style[e]="number"==typeof o?o+"px":o,j(f,"Set "+e+" = "+t.style[e]))}function o(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}o("Height"),o("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),s=A(f),(d=w())&&(o=function(e){if(!t.parentNode)return null;var o=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&I(t)}))}))}));return o.observe(t.parentNode,{childList:!0}),o}(d)),g(t,"load",(function(){H("iFrame.onload",s,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in l&&C({iframe:t,height:0,width:0,type:"init"})})),H("init",s,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:I.bind(null,u[f].iframe),removeListeners:M.bind(null,u[f].iframe),resize:H.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){H("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){H("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function V(e,o){null===m&&(m=setTimeout((function(){m=null,e()}),o))}function L(){"hidden"!==document.visibilityState&&(j("document","Trigger event: Visibility change"),V((function(){_("Tab Visible","resize")}),16))}function _(e,o){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&H(e,o,u[t].iframe,t)}))}function P(){function o(e,o){o&&(function(){if(!o.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==o.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+o.tagName+">")}(),N(o,e),t.push(o))}var t;return function(){var e,o=["moz","webkit","o","ms"];for(e=0;e<o.length&&!c;e+=1)c=window[o[e]+"RequestAnimationFrame"];c?c=c.bind(window):j("setup","RequestAnimationFrame not supported")}(),g(window,"message",F),g(window,"resize",(function(){j("window","Trigger event: resize"),V((function(){_("Window resize","resize")}),16)})),g(document,"visibilitychange",L),g(document,"-webkit-visibilitychange",L),function(i,r){switch(t=[],function(e){e&&e.enablePublicMethods&&x("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof r){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(r||"iframe"),o.bind(e,i));break;case"object":o(i,r);break;default:throw new TypeError("Unexpected data type ("+typeof r+")")}return t}}}();const j=y.exports,k={card:{ready:"justifi.card.ready",tokenize:"justifi.card.tokenize",validate:"justifi.card.validate",resize:"justifi.card.resize",styleOverrides:"justifi.card.styleOverrides"},bankAccount:{ready:"justifi.bankAccount.ready",tokenize:"justifi.bankAccount.tokenize",validate:"justifi.bankAccount.validate",resize:"justifi.bankAccount.resize",styleOverrides:"justifi.bankAccount.styleOverrides"}};class x{constructor(e,o){this.iframe=e,this.iframeOrigin=o}postMessage(e,o){const t=Object.assign({eventType:e},o);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,o){return new Promise((t=>{const i=o=>{o.data.eventType===e&&(window.removeEventListener("message",i),t(o.data.data))};window.addEventListener("message",i),this.postMessage(e,o)}))}}const z=class{constructor(o){e(this,o),this.paymentMethodFormReady=t(this,"paymentMethodFormReady",7),this.paymentMethodFormValidated=t(this,"paymentMethodFormValidated",7),this.paymentMethodFormTokenized=t(this,"paymentMethodFormTokenized",7),this.computedTheme=(()=>{const e=getComputedStyle(document.body);return{loadGoogleFont:e.getPropertyValue("--jfi-load-google-font"),layout:{fontFamily:e.getPropertyValue("--jfi-layout-font-family"),padding:e.getPropertyValue("--jfi-layout-padding"),formControlSpacingHorizontal:e.getPropertyValue("--jfi-layout-form-control-spacing-x"),formControlSpacingVertical:e.getPropertyValue("--jfi-layout-form-control-spacing-y")},formControl:{backgroundColor:e.getPropertyValue("--jfi-form-control-background-color"),borderColor:e.getPropertyValue("--jfi-form-control-border-color"),borderColorFocus:e.getPropertyValue("--jfi-form-control-border-color-focus"),borderColorError:e.getPropertyValue("--jfi-form-control-border-color-error"),borderWidth:e.getPropertyValue("--jfi-form-control-border-width"),borderBottomWidth:e.getPropertyValue("--jfi-form-control-border-bottom-width"),borderLeftWidth:e.getPropertyValue("--jfi-form-control-border-left-width"),borderRightWidth:e.getPropertyValue("--jfi-form-control-border-right-width"),borderTopWidth:e.getPropertyValue("--jfi-form-control-border-top-width"),borderRadius:e.getPropertyValue("--jfi-form-control-border-radius"),borderStyle:e.getPropertyValue("--jfi-form-control-border-style"),boxShadow:e.getPropertyValue("--jfi-form-control-box-shadow"),boxShadowError:e.getPropertyValue("--jfi-form-control-box-shadow-error"),boxShadowErrorFocus:e.getPropertyValue("--jfi-form-control-box-shadow-error-focus"),boxShadowFocus:e.getPropertyValue("--jfi-form-control-box-shadow-focus"),color:e.getPropertyValue("--jfi-form-control-color"),colorFocus:e.getPropertyValue("--jfi-form-control-color-focus"),fontSize:e.getPropertyValue("--jfi-form-control-font-size"),fontWeight:e.getPropertyValue("--jfi-form-control-font-weight"),lineHeight:e.getPropertyValue("--jfi-form-control-line-height"),margin:e.getPropertyValue("--jfi-form-control-margin"),padding:e.getPropertyValue("--jfi-form-control-padding")},formLabel:{color:e.getPropertyValue("--jfi-form-label-color"),fontFamily:e.getPropertyValue("--jfi-form-label-font-family"),fontSize:e.getPropertyValue("--jfi-form-label-font-size"),fontWeight:e.getPropertyValue("--jfi-form-label-font-weight"),margin:e.getPropertyValue("--jfi-form-label-margin")},errorMessage:{color:e.getPropertyValue("--jfi-error-message-color"),margin:e.getPropertyValue("--jfi-error-message-margin"),fontSize:e.getPropertyValue("--jfi-error-message-font-size")}}})(),this.dispatchMessageEvent=e=>{const{eventType:o,data:t}=e.data,i=k[this.paymentMethodFormType];o===i.ready?(this.paymentMethodFormReady.emit(t),this.sendStyleOverrides()):o===i.tokenize?this.paymentMethodFormTokenized.emit(t):o===i.validate&&this.paymentMethodFormValidated.emit(t)},this.postMessage=(e,o)=>{this.frameService.postMessage(e,o)},this.paymentMethodFormType=void 0,this.paymentMethodFormValidationMode=void 0,this.iframeOrigin=void 0,this.singleLine=void 0}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async resize(){this.postMessage(k[this.paymentMethodFormType].resize)}async tokenize(e,o,t){return this.frameService.postMessageWithResponseListener(k[this.paymentMethodFormType].tokenize,{clientId:e,paymentMethodMetadata:o,account:t,componentVersion:b.version})}async validate(){return this.frameService.postMessageWithResponseListener(k[this.paymentMethodFormType].validate)}sendStyleOverrides(){this.computedTheme&&this.postMessage(k[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.computedTheme})}getIframeSrc(){let e=[];return this.paymentMethodFormValidationMode&&e.push(`validationMode=${this.paymentMethodFormValidationMode}`),this.singleLine&&e.push(`singleLine=${this.singleLine}`),`${this.iframeOrigin}/${this.paymentMethodFormType}${w(e)}`}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}render(){return o(i,{key:"10987c92745fbff8bb85367db69b76e2bc786c88"},o("iframe",{key:"0622dd0201a04a3c918fd3d175d2a29f24609759",id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},onLoad:()=>{j({scrollbars:!1},this.iframeElement)}}))}};z.style=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}iframe{width:1px;min-width:100%}";export{p as justifi_billing_form,z as justifi_payment_method_form}
|
|
1
|
+
import{r as e,h as o,c as t,H as i}from"./p-fad19d75.js";import{c as r,F as n}from"./p-3c654c07.js";import{u as a,l as s,k as d,m as f,n as c,q as l}from"./p-88efdd31.js";import{S as u}from"./p-6078a370.js";import{n as m}from"./p-e3c22aa9.js";import{S as h}from"./p-74da98da.js";import{p as b}from"./p-22e38d5b.js";import{j as w}from"./p-a8f22d4d.js";import"./p-1815a43b.js";import"./p-5e7c60d8.js";import"./p-1ff8810b.js";const g=r({name:a.required("Enter full name"),address_line1:s.required("Enter street address"),address_line2:d.nullable(),address_city:f.required("Enter city"),address_state:c.required("Select state"),address_postal_code:l.required("Enter postal code")}),p=class{constructor(o){e(this,o),this.inputHandler=(e,o)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[e]:o}))},this.legend=void 0,this.formController=void 0,this.billingInfo=void 0,this.errors={}}componentWillLoad(){this.formController=new n(g)}componentDidLoad(){this.formController.values.subscribe((e=>this.billingInfo=Object.assign({},e))),this.formController.errors.subscribe((e=>{this.errors=Object.assign({},e)}))}async getValues(){return this.formController.values.getValue()}async fill(e){this.formController.setInitialValues(e)}async validate(){return{isValid:await this.formController.validate()}}render(){const e=this.formController.getInitialValues();return o(h,{key:"221838c3ba8255b62db0f2feee7b227b0d240627",exportparts:"label,input,input-invalid"},o("form",{key:"87377d7776c3fdf7ffa351f25522921b233dd16f"},o("fieldset",{key:"821487e408ec634dd23417604f02f1aa212dcb2a"},this.legend&&o("legend",{key:"c042f51480e23ad455a6d3fc420f494c33d93f2c"},this.legend),o("div",{key:"6a9f2c0fd10c7786b132f7208036cf878e3fe8c1",class:"row gy-3"},o("div",{key:"b375c19faeb23927e290c4a60b4347dc64868840",class:"col-12"},o("form-control-text",{key:"be3b78234607f996efe8971082ff457e63767e22",name:"name",label:"Full Name",defaultValue:e.name,errorText:this.errors.name,inputHandler:this.inputHandler})),o("div",{key:"95d3f3bb6ff7df39deb2967db11017e8f80ca5a9",class:"col-12"},o("form-control-text",{key:"9e719038219bf7b7651679b617b2131ab5336289",name:"address_line1",label:"Street Address",defaultValue:e.address_line1,errorText:this.errors.address_line1,inputHandler:this.inputHandler})),o("div",{key:"0945bca70a70abfdce40c8d52537eb06479aface",class:"col-12"},o("form-control-text",{key:"59b9b87c005609daf501b0d7d6a8d640297c75c4",name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:e.address_line2,errorText:this.errors.address_line2,inputHandler:this.inputHandler})),o("div",{key:"f3e9d8297e9e4009a0b16f331eeffb1316a92030",class:"col-12"},o("form-control-text",{key:"158a4d2e3e85700a5c80304e0316391090b52f74",name:"address_city",label:"City",defaultValue:e.address_city,errorText:this.errors.address_city,inputHandler:this.inputHandler})),o("div",{key:"67110a816d76d4c98062859733def72e88f1a3d9",class:"col-12"},o("form-control-select",{key:"d26b22251d6da9d8f7b8bb109126e804cdfbccb0",name:"address_state",label:"State",options:u,defaultValue:e.address_state,errorText:this.errors.address_state,inputHandler:this.inputHandler})),o("div",{key:"a248ef0a4860d9d634f46e96cc953c8ca0ee64f1",class:"col-12"},o("form-control-text",{key:"36f96a7e94088dd140ca9774903387ae2be3cad8",name:"address_postal_code",label:"ZIP",defaultValue:e.address_postal_code,errorText:this.errors.address_postal_code,inputHandler:this.inputHandler,maxLength:5,keyDownHandler:m}))))))}};p.style=":host{display:block}justifi-billing-form{margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}*::part(label){color:var(--jfi-form-label-color);font-family:var(--jfi-form-label-font-family);font-weight:var(--jfi-form-label-font-weight);font-size:var(--jfi-form-label-font-size);margin:var(--jfi-form-label-margin)}*::part(input){background-color:var(--jfi-form-control-background-color);border-color:var(--jfi-form-control-border-color);border-width:var(--jfi-form-control-border-width);border-bottom-width:var(--jfi-form-control-border-bottom-width);border-left-width:var(--jfi-form-control-border-left-width);border-right-width:var(--jfi-form-control-border-right-width);border-top-width:var(--jfi-form-control-border-top-width);border-radius:var(--jfi-form-control-border-radius);border-style:var(--jfi-form-control-border-style);box-shadow:var(--jfi-form-control-box-shadow);color:var(--jfi-form-control-color);font-size:var(--jfi-form-control-font-size);font-weight:var(--jfi-form-control-font-weight);line-height:var(--jfi-form-control-line-height);margin:var(--jfi-form-control-margin);padding:var(--jfi-form-control-padding)}*::part(input):focus{color:var(--jfi-form-control-color-focus);border-color:var(--jfi-form-control-border-color-focus);box-shadow:var(--jfi-form-control-box-shadow-focus)}*::part(input-invalid){border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error)}*::part(input-invalid):focus{border-color:var(--jfi-form-control-border-color-error);box-shadow:var(--jfi-form-control-box-shadow-error-focus)}";var v,y={exports:{}};v=y,console.info("\nIFRAME-RESIZER\n\nIframe-Resizer 5 is now available via the following two packages:\n\n * @iframe-resizer/parent\n * @iframe-resizer/child\n\nAdditionally their are also new versions of iframe-resizer for React, Vue, and jQuery.\n\nVersion 5 of iframe-resizer has been extensively rewritten to use modern browser APIs, which has enabled significantly better performance and greater accuracy in the detection of content resizing events.\n\nPlease see https://iframe-resizer.com/upgrade for more details.\n"),function(e){if("undefined"!=typeof window){var o,t,i=0,r=!1,n=!1,a=7,s="[iFrameSizer]",d=s.length,f=null,c=window.requestAnimationFrame,l=Object.freeze({max:1,scroll:1,bodyScroll:1,documentElementScroll:1}),u={},m=null,h=Object.freeze({autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,license:"1jqr0si6pnt",log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){x("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}}),b={};window.jQuery!==e&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(o,t){N(t,e)})).end()}):k("","Unable to bind to jQuery, it is not fully loaded.")),"function"==typeof e&&e.amd?e([],P):v.exports=P(),window.iFrameResize=window.iFrameResize||P()}function w(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function g(e,o,t){e.addEventListener(o,t,!1)}function p(e,o,t){e.removeEventListener(o,t,!1)}function y(e){return u[e]?u[e].log:r}function j(e,o){z("log",e,o,y(e))}function k(e,o){z("info",e,o,y(e))}function x(e,o){z("warn",e,o,!0)}function z(e,o,t,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return s+"["+function(e){var o="Host page: "+e;return window.top!==window.self&&(o=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),o}(e)+"]"}(o),t)}function F(e){function o(){t("Height"),t("Width"),W((function(){E(V),T(L),h("onResized",V)}),V,"init")}function t(e){var o=Number(u[L]["max"+e]),t=Number(u[L]["min"+e]),i=e.toLowerCase(),r=Number(V[i]);j(L,"Checking "+i+" is in range "+t+"-"+o),r<t&&(r=t,j(L,"Set "+i+" to min value")),r>o&&(r=o,j(L,"Set "+i+" to max value")),V[i]=""+r}function i(e){return N.slice(N.indexOf(":")+a+e)}function r(e,o){var t,i;t=function(){var t,i;H("Send Page Info","pageInfo:"+(t=document.body.getBoundingClientRect(),i=V.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-t.top,10),offsetLeft:parseInt(i.left-t.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,o)},b[i=o]||(b[i]=setTimeout((function(){b[i]=null,t()}),32))}function n(e){var o=e.getBoundingClientRect();return O(L),{x:Math.floor(Number(o.left)+Number(f.x)),y:Math.floor(Number(o.top)+Number(f.y))}}function c(e){var o=e?n(V.iframe):{x:0,y:0},t={x:Number(V.width)+o.x,y:Number(V.height)+o.y};j(L,"Reposition requested from iFrame (offset x:"+o.x+" y:"+o.y+")"),window.top===window.self?(f=t,l(),j(L,"--")):window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](t.x,t.y):x(L,"Unable to scroll to requested position, window.parentIFrame not found")}function l(){!1===h("onScroll",f)?R():T(L)}function m(e){var o={};if(0===Number(V.width)&&0===Number(V.height)){var t=i(9).split(":");o={x:t[1],y:t[0]}}else o={x:V.width,y:V.height};h(e,{iframe:V.iframe,screenX:Number(o.x),screenY:Number(o.y),type:V.type})}function h(e,o){return S(L,e,o)}var w,v,y,z,F,M,N=e.data,V={},L=null;"[iFrameResizerChild]Ready"===N?function(){for(var e in u)H("iFrame requested init",A(e),u[e].iframe,e)}():s===(""+N).slice(0,d)&&N.slice(d).split(":")[0]in u?(z=(y=N.slice(d).split(":"))[1]?parseInt(y[1],10):0,F=u[y[0]]&&u[y[0]].iframe,M=getComputedStyle(F),V={iframe:F,id:y[0],height:z+function(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}(M)+function(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}(M),width:y[2],type:y[3]},u[L=V.id]&&(u[L].loaded=!0),(v=V.type in{true:1,false:1,undefined:1})&&j(L,"Ignoring init message from meta parent page"),!v&&function(e){var o=!0;return u[e]||(o=!1,x(V.type+" No settings for "+e+". Message was: "+N)),o}(L)&&(j(L,"Received: "+N),w=!0,null===V.iframe&&(x(L,"IFrame ("+V.id+") not found"),w=!1),w&&function(){var o,t=e.origin,i=u[L]&&u[L].checkOrigin;if(i&&""+t!="null"&&!(i.constructor===Array?function(){var e=0,o=!1;for(j(L,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===t){o=!0;break}return o}():(j(L,"Checking connection is from: "+(o=u[L]&&u[L].remoteHost)),t===o)))throw new Error("Unexpected message received from: "+t+" for "+V.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(u[L]&&u[L].firstRun&&u[L]&&(u[L].firstRun=!1),V.type){case"close":I(V.iframe);break;case"message":d=i(6),j(L,"onMessage passed: {iframe: "+V.iframe.id+", message: "+d+"}"),h("onMessage",{iframe:V.iframe,message:JSON.parse(d)}),j(L,"--");break;case"mouseenter":m("onMouseEnter");break;case"mouseleave":m("onMouseLeave");break;case"autoResize":u[L].autoResize=JSON.parse(i(9));break;case"scrollTo":c(!1);break;case"scrollToOffset":c(!0);break;case"pageInfo":r(u[L]&&u[L].iframe,L),function(){function e(e,i){function n(){u[t]?r(u[t].iframe,t):o()}["scroll","resize"].forEach((function(o){j(t,e+o+" listener for sendPageInfo"),i(window,o,n)}))}function o(){e("Remove ",p)}var t=L;e("Add ",g),u[t]&&(u[t].stopPageInfo=o)}();break;case"pageInfoStop":u[L]&&u[L].stopPageInfo&&(u[L].stopPageInfo(),delete u[L].stopPageInfo);break;case"inPageLink":t=i(9).split("#")[1]||"",a=decodeURIComponent(t),(s=document.getElementById(a)||document.getElementsByName(a)[0])?(e=n(s),j(L,"Moving to in page link (#"+t+") at x: "+e.x+" y: "+e.y),f={x:e.x,y:e.y},l(),j(L,"--")):window.top===window.self?j(L,"In page link #"+t+" not found"):window.parentIFrame?window.parentIFrame.moveToAnchor(t):j(L,"In page link #"+t+" not found and window.parentIFrame not found");break;case"reset":C(V);break;case"init":o(),h("onInit",V.iframe);break;default:0===Number(V.width)&&0===Number(V.height)?x("Unsupported message received ("+V.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):o()}var e,t,a,s,d}())):k(L,"Ignored: "+N)}function S(e,o,t){var i=null,r=null;if(u[e]){if("function"!=typeof(i=u[e][o]))throw new TypeError(o+" on iFrame["+e+"] is not a function");r=i(t)}return r}function M(e){delete u[e.id]}function I(e){var t=e.id;if(!1!==S(t,"onClose",t)){j(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){x(e)}S(t,"onClosed",t),j(t,"--"),M(e),o&&(o.disconnect(),o=null)}else j(t,"Close iframe cancelled by onClose event")}function O(o){null===f&&j(o,"Get page position: "+(f={x:window.pageXOffset===e?document.documentElement.scrollLeft:window.pageXOffset,y:window.pageYOffset===e?document.documentElement.scrollTop:window.pageYOffset}).x+","+f.y)}function T(e){null!==f&&(window.scrollTo(f.x,f.y),j(e,"Set page position: "+f.x+","+f.y),R())}function R(){f=null}function C(e){j(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),O(e.id),W((function(){E(e),H("reset","reset",e.iframe,e.id)}),e,"reset")}function E(e){function o(o){n||"0"!==e[o]||(n=!0,j(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(u).forEach((function(e){!function(e){function o(o){return"0px"===(u[e]&&u[e].iframe.style[o])}u[e]&&null!==u[e].iframe.offsetParent&&(o("height")||o("width"))&&H("Visibility change","resize",u[e].iframe,e)}(e)}))}function o(o){j("window","Mutation observed: "+o[0].target+" "+o[0].type),V(e,16)}var t,i=w();i&&(t=document.querySelector("body"),new i(o).observe(t,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function t(t){!function(o){e.id?(e.iframe.style[o]=e[o]+"px",j(e.id,"IFrame ("+i+") "+o+" set to "+e[o]+"px")):j("undefined","messageData id not set")}(t),o(t)}var i=e.iframe.id;u[i]&&(u[i].sizeHeight&&t("height"),u[i].sizeWidth&&t("width"))}function W(e,o,t){t!==o.type&&c&&!window.jasmine?(j(o.id,"Requesting animation frame"),c(e)):e()}function H(e,o,t,i,r){var n,a=!1;u[i=i||t.id]&&(t&&"contentWindow"in t&&null!==t.contentWindow?(j(i,"["+e+"] Sending msg to iframe["+i+"] ("+o+") targetOrigin: "+(n=u[i]&&u[i].targetOrigin)),t.contentWindow.postMessage(s+o,n)):x(i,"["+e+"] IFrame("+i+") not found"),r&&u[i]&&u[i].warningTimeout&&(u[i].msgTimeout=setTimeout((function(){!u[i]||u[i].loaded||a||(a=!0,x(i,"IFrame has not responded within "+u[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),u[i].warningTimeout)))}function A(e){return e+":"+u[e].bodyMarginV1+":"+u[e].sizeWidth+":"+u[e].log+":"+u[e].interval+":"+u[e].enablePublicMethods+":"+u[e].autoResize+":"+u[e].bodyMargin+":"+u[e].heightCalculationMethod+":"+u[e].bodyBackground+":"+u[e].bodyPadding+":"+u[e].tolerance+":"+u[e].inPageLinks+":"+u[e].resizeFrom+":"+u[e].widthCalculationMethod+":"+u[e].mouseEvents}function N(t,n){function a(e){var o=e.split("Callback");if(2===o.length){var t="on"+o[0].charAt(0).toUpperCase()+o[0].slice(1);this[t]=this[e],delete this[e],x(f,"Deprecated: '"+e+"' has been renamed '"+t+"'. The old method will be removed in the next major version.")}}var s,d,f=function(e){if("string"!=typeof e)throw new TypeError("Invaild id for iFrame. Expected String");var o;return""===e&&(t.id=(o=n&&n.id||h.id+i++,null!==document.getElementById(o)&&(o+=i++),e=o),r=(n||{}).log,j(e,"Added missing iframe ID: "+e+" ("+t.src+")")),e}(t.id);f in u&&"iFrameResizer"in t?x(f,"Ignored iFrame, already setup."):(function(e){var o;e=e||{},u[f]=Object.create(null),u[f].iframe=t,u[f].firstRun=!0,u[f].remoteHost=t.src&&t.src.split("/").slice(0,3).join("/"),function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(e),Object.keys(e).forEach(a,e),function(e){for(var o in h)Object.prototype.hasOwnProperty.call(h,o)&&(u[f][o]=Object.prototype.hasOwnProperty.call(e,o)?e[o]:h[o])}(e),u[f]&&(u[f].targetOrigin=!0===u[f].checkOrigin?""===(o=u[f].remoteHost)||null!==o.match(/^(about:blank|javascript:|file:\/\/)/)?"*":o:"*")}(n),function(){switch(j(f,"IFrame scrolling "+(u[f]&&u[f].scrolling?"enabled":"disabled")+" for "+f),t.style.overflow=!1===(u[f]&&u[f].scrolling)?"hidden":"auto",u[f]&&u[f].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=u[f]?u[f].scrolling:"no"}}(),function(){function e(e){var o=u[f][e];1/0!==o&&0!==o&&(t.style[e]="number"==typeof o?o+"px":o,j(f,"Set "+e+" = "+t.style[e]))}function o(e){if(u[f]["min"+e]>u[f]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}o("Height"),o("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(u[f]&&u[f].bodyMargin)&&"0"!==(u[f]&&u[f].bodyMargin)||(u[f].bodyMarginV1=u[f].bodyMargin,u[f].bodyMargin=u[f].bodyMargin+"px"),s=A(f),(d=w())&&(o=function(e){if(!t.parentNode)return null;var o=new e((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&I(t)}))}))}));return o.observe(t.parentNode,{childList:!0}),o}(d)),g(t,"load",(function(){H("iFrame.onload",s,t,e,!0),(!u[f]||!u[f].firstRun)&&u[f]&&u[f].heightCalculationMethod in l&&C({iframe:t,height:0,width:0,type:"init"})})),H("init",s,t,e,!0),u[f]&&(u[f].iframe.iFrameResizer={close:I.bind(null,u[f].iframe),removeListeners:M.bind(null,u[f].iframe),resize:H.bind(null,"Window resize","resize",u[f].iframe),moveToAnchor:function(e){H("Move to anchor","moveToAnchor:"+e,u[f].iframe,f)},sendMessage:function(e){H("Send Message","message:"+(e=JSON.stringify(e)),u[f].iframe,f)}}))}function V(e,o){null===m&&(m=setTimeout((function(){m=null,e()}),o))}function L(){"hidden"!==document.visibilityState&&(j("document","Trigger event: Visibility change"),V((function(){_("Tab Visible","resize")}),16))}function _(e,o){Object.keys(u).forEach((function(t){(function(e){return u[e]&&"parent"===u[e].resizeFrom&&u[e].autoResize&&!u[e].firstRun})(t)&&H(e,o,u[t].iframe,t)}))}function P(){function o(e,o){o&&(function(){if(!o.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==o.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+o.tagName+">")}(),N(o,e),t.push(o))}var t;return function(){var e,o=["moz","webkit","o","ms"];for(e=0;e<o.length&&!c;e+=1)c=window[o[e]+"RequestAnimationFrame"];c?c=c.bind(window):j("setup","RequestAnimationFrame not supported")}(),g(window,"message",F),g(window,"resize",(function(){j("window","Trigger event: resize"),V((function(){_("Window resize","resize")}),16)})),g(document,"visibilitychange",L),g(document,"-webkit-visibilitychange",L),function(i,r){switch(t=[],function(e){e&&e.enablePublicMethods&&x("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof r){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(r||"iframe"),o.bind(e,i));break;case"object":o(i,r);break;default:throw new TypeError("Unexpected data type ("+typeof r+")")}return t}}}();const j=y.exports,k={card:{ready:"justifi.card.ready",tokenize:"justifi.card.tokenize",validate:"justifi.card.validate",resize:"justifi.card.resize",styleOverrides:"justifi.card.styleOverrides"},bankAccount:{ready:"justifi.bankAccount.ready",tokenize:"justifi.bankAccount.tokenize",validate:"justifi.bankAccount.validate",resize:"justifi.bankAccount.resize",styleOverrides:"justifi.bankAccount.styleOverrides"}};class x{constructor(e,o){this.iframe=e,this.iframeOrigin=o}postMessage(e,o){const t=Object.assign({eventType:e},o);this.iframe.contentWindow.postMessage(t,this.iframeOrigin)}addMessageListener(e){window.addEventListener("message",e)}removeMessageListener(e){window.removeEventListener("message",e)}postMessageWithResponseListener(e,o){return new Promise((t=>{const i=o=>{o.data.eventType===e&&(window.removeEventListener("message",i),t(o.data.data))};window.addEventListener("message",i),this.postMessage(e,o)}))}}const z=class{constructor(o){e(this,o),this.paymentMethodFormReady=t(this,"paymentMethodFormReady",7),this.paymentMethodFormValidated=t(this,"paymentMethodFormValidated",7),this.paymentMethodFormTokenized=t(this,"paymentMethodFormTokenized",7),this.computedTheme=(()=>{const e=getComputedStyle(document.body);return{loadGoogleFont:e.getPropertyValue("--jfi-load-google-font"),layout:{fontFamily:e.getPropertyValue("--jfi-layout-font-family"),padding:e.getPropertyValue("--jfi-layout-padding"),formControlSpacingHorizontal:e.getPropertyValue("--jfi-layout-form-control-spacing-x"),formControlSpacingVertical:e.getPropertyValue("--jfi-layout-form-control-spacing-y")},formControl:{backgroundColor:e.getPropertyValue("--jfi-form-control-background-color"),borderColor:e.getPropertyValue("--jfi-form-control-border-color"),borderColorFocus:e.getPropertyValue("--jfi-form-control-border-color-focus"),borderColorError:e.getPropertyValue("--jfi-form-control-border-color-error"),borderWidth:e.getPropertyValue("--jfi-form-control-border-width"),borderBottomWidth:e.getPropertyValue("--jfi-form-control-border-bottom-width"),borderLeftWidth:e.getPropertyValue("--jfi-form-control-border-left-width"),borderRightWidth:e.getPropertyValue("--jfi-form-control-border-right-width"),borderTopWidth:e.getPropertyValue("--jfi-form-control-border-top-width"),borderRadius:e.getPropertyValue("--jfi-form-control-border-radius"),borderStyle:e.getPropertyValue("--jfi-form-control-border-style"),boxShadow:e.getPropertyValue("--jfi-form-control-box-shadow"),boxShadowError:e.getPropertyValue("--jfi-form-control-box-shadow-error"),boxShadowErrorFocus:e.getPropertyValue("--jfi-form-control-box-shadow-error-focus"),boxShadowFocus:e.getPropertyValue("--jfi-form-control-box-shadow-focus"),color:e.getPropertyValue("--jfi-form-control-color"),colorFocus:e.getPropertyValue("--jfi-form-control-color-focus"),fontSize:e.getPropertyValue("--jfi-form-control-font-size"),fontWeight:e.getPropertyValue("--jfi-form-control-font-weight"),lineHeight:e.getPropertyValue("--jfi-form-control-line-height"),margin:e.getPropertyValue("--jfi-form-control-margin"),padding:e.getPropertyValue("--jfi-form-control-padding")},formLabel:{color:e.getPropertyValue("--jfi-form-label-color"),fontFamily:e.getPropertyValue("--jfi-form-label-font-family"),fontSize:e.getPropertyValue("--jfi-form-label-font-size"),fontWeight:e.getPropertyValue("--jfi-form-label-font-weight"),margin:e.getPropertyValue("--jfi-form-label-margin")},errorMessage:{color:e.getPropertyValue("--jfi-error-message-color"),margin:e.getPropertyValue("--jfi-error-message-margin"),fontSize:e.getPropertyValue("--jfi-error-message-font-size")}}})(),this.dispatchMessageEvent=e=>{const{eventType:o,data:t}=e.data,i=k[this.paymentMethodFormType];o===i.ready?(this.paymentMethodFormReady.emit(t),this.sendStyleOverrides()):o===i.tokenize?this.paymentMethodFormTokenized.emit(t):o===i.validate&&this.paymentMethodFormValidated.emit(t)},this.postMessage=(e,o)=>{this.frameService.postMessage(e,o)},this.paymentMethodFormType=void 0,this.paymentMethodFormValidationMode=void 0,this.iframeOrigin=void 0,this.singleLine=void 0}disconnectedCallback(){this.frameService.removeMessageListener(this.dispatchMessageEvent)}async resize(){this.postMessage(k[this.paymentMethodFormType].resize)}async tokenize(e,o,t){return this.frameService.postMessageWithResponseListener(k[this.paymentMethodFormType].tokenize,{clientId:e,paymentMethodMetadata:o,account:t,componentVersion:b.version})}async validate(){return this.frameService.postMessageWithResponseListener(k[this.paymentMethodFormType].validate)}sendStyleOverrides(){this.computedTheme&&this.postMessage(k[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.computedTheme})}getIframeSrc(){let e=[];return this.paymentMethodFormValidationMode&&e.push(`validationMode=${this.paymentMethodFormValidationMode}`),this.singleLine&&e.push(`singleLine=${this.singleLine}`),`${this.iframeOrigin}/${this.paymentMethodFormType}${w(e)}`}initializeFrameCommunicationService(){var e;this.frameService=new x(this.iframeElement,this.iframeOrigin),null===(e=this.frameService)||void 0===e||e.addMessageListener(this.dispatchMessageEvent)}render(){return o(i,{key:"10987c92745fbff8bb85367db69b76e2bc786c88"},o("iframe",{key:"0622dd0201a04a3c918fd3d175d2a29f24609759",id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:e=>{this.iframeElement=e,this.initializeFrameCommunicationService()},onLoad:()=>{j({scrollbars:!1},this.iframeElement)}}))}};z.style=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}iframe{width:1px;min-width:100%}";export{p as justifi_billing_form,z as justifi_payment_method_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,b as s}from"./p-3c654c07.js";import{S as t}from"./p-6078a370.js";import{b as a,a as r,r as n,s as i,c as l}from"./p-1815a43b.js";const c=e=>""===e?null:e,o=/^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/,d=/^(?!^\s+$)[a-zA-Z\s]*$/,u=/^\d+$/,m=/^(?!^\s+$)[a-zA-Z0-9\s,&.-]*$/,h=/P\.?\s?O\.?\s?Box|Postal\sBox/i;var b,v;!function(e){e.voidedCheck="voided_check",e.balanceSheet="balance_sheet",e.bankStatement="bank_statement",e.governmentId="government_id",e.profitAndLossStatement="profit_and_loss_statement",e.taxReturn="tax_return",e.other="other"}(b||(b={})),function(e){e.pending="pending",e.uploaded="uploaded",e.canceled="canceled",e.needed="needed"}(v||(v={}));class E{constructor(){this.voided_check=[],this.balance_sheet=[],this.bank_statement=[],this.government_id=[],this.profit_and_loss_statement=[],this.tax_return=[],this.other=[]}}class p{constructor(e,s){this.file=e.file,this.fileString=this.getFileString(),this.document_type=e.document_type,this.presigned_url=null,this.record_data={business_id:s,document_type:this.document_type,file_name:this.file.name,file_type:this.file.type}}getFileString(){let e=new FileReader;return e.onload=e=>{this.fileString=e.target.result},e.readAsDataURL(this.file),this.fileString}setPresignedUrl(e){this.presigned_url=e}}const S=e().email("Enter valid email").transform(c),N=e().matches(/^\d{10}$/,"Enter valid phone number").transform(c),g=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").matches(o,"Enter valid business name").transform(c),f=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").matches(o,"Enter valid doing business as").transform(c),y=e().matches(/^(?:http(s)?:\/\/)?(?:www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)$/,"Enter valid website url").transform(c),_=e().oneOf(a.map((e=>e.value)),"Select business classification").transform(c),$=e().min(2,"Industry must be at least 2 characters").max(50,"Industry must be less than 50 characters").matches(d,"Enter valid industry").transform(c),w=e().matches(u,"Enter valid tax id, SSN, or EIN").test("not-repeat","Enter valid tax id, SSN, or EIN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid tax id, SSN, or EIN",(e=>"123456789"!==e)).transform(c),A=e().test("not-future","Date of incorporation cannot be in the future",(e=>new Date(e)<=new Date)).transform(c),x=e().min(2,"Name must be at least 2 characters").max(100,"Name must be less than 100 characters").transform(c),I=e().min(2,"Title must be at least 2 characters").max(50,"Title must be less than 50 characters").matches(d,"Enter valid title").transform(c),P=s=>e().test("min","Enter a valid date",(e=>new Date(e)>=new Date("1902-01-01"))).test("age",`${s} must be at least 18 years old`,(e=>{const s=new Date(e),t=new Date;return t.setFullYear(t.getFullYear()-18),s<=t})).transform(c),D=e().matches(/^(?!000|666|9\d{2})\d{3}(?!00)\d{2}(?!0000)\d{4}$/,"Enter valid SSN").when("ssn_last4",{is:e=>!e||0===e.length,then:e=>e.required("Enter SSN"),otherwise:e=>e.nullable()}).test("not-repeat","Enter valid SSN",(e=>!/^(\d)\1+$/.test(e))).test("not-seq","Enter valid SSN",(e=>"123456789"!==e)).transform(c),z=e().min(5,"Address must be at least 5 characters").max(100,"Address must be less than 100 characters").matches(m,"Enter valid address line 1").test("not-po-box","A PO Box is not a valid address entry",(e=>!h.test(e))).transform(c),k=e().max(100,"Address must be less than 100 characters").matches(m,"Enter valid address line 2").test("not-po-box","A PO Box is not a valid address entry",(e=>!h.test(e))).transform(c),B=e().min(2,"City must be at least 2 characters").max(50,"City must be less than 50 characters").matches(d,"Enter valid city").transform(c),Z=e().oneOf(t.map((e=>e.value)),"Select state").transform(c),j=e().matches(/^[0-9]{5}$/,"Enter valid postal code").transform(c),q=e().matches(u,"Enter valid revenue").transform(c),C=e().matches(u,"Enter valid payment volume").transform(c),F=e().oneOf(r.map((e=>e.value)),"Select when service is received").transform(c),O=e().oneOf(n.map((e=>e.value)),"Select recurring payments").transform(c),R=e().when("business_recurring_payments",{is:e=>"Yes"===e,then:e=>e.required("Enter recurring payments percentage"),otherwise:e=>e.nullable()}).transform(c),T=e().oneOf(i.map((e=>e.value)),"Select seasonal business").transform(c),G=e().transform(c),H=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").matches(d,"Enter valid bank name").transform(c),J=e().min(2,"Name must be at least 2 characters").max(50,"Name must be less than 50 characters").matches(d,"Enter valid nickname").transform(c),K=e().oneOf(l.map((e=>e.value)),"Select account type").transform(c),L=e().min(8,"Account number must be at least 8 digits").max(17,"Account number must be less than 17 digits").matches(u,"Enter valid account number").test("not-repeat","Enter valid account number",(e=>!/^(\d)\1+$/.test(e))).transform(c),M=e().length(9,"Routing number must be 9 digits").matches(u,"Enter valid routing number").test("not-repeat","Enter valid routing number",(e=>!/^(\d)\1+$/.test(e))).test("valid","Enter valid routing number",(e=>(e=>{if(!e)return!1;const s=Array.from(String(e),Number);return 9===s.length&&0==(3*(s[0]+s[3]+s[6])+7*(s[1]+s[4]+s[7])+(s[2]+s[5]+s[8]))%10})(e))).transform(c),U=s(),Y=U,Q=U,V=U,W=(e,s)=>e.some((e=>e.document_type===b.voidedCheck))||s?U.nullable():U.required("Please select one or more files"),X=(e,s,t)=>{const a=parseInt(e);return s.some((e=>e.document_type===b.bankStatement))||t?U.nullable():a>=25e4&&!t?U.required("Please select one or more files"):void 0},ee=(e,s,t)=>{const a=parseInt(e);return s.some((e=>e.document_type===b.balanceSheet))||t?U.nullable():a>=1e6&&!t?U.required("Please select one or more files"):void 0},se=(e,s,t)=>{const a=parseInt(e);return s.some((e=>e.document_type===b.profitAndLossStatement))||t?U.nullable():a>=1e6&&!t?U.required("Please select one or more files"):void 0};export{J as A,K as B,L as C,M as D,W as E,Q as F,Y as G,V as H,ee as I,X as J,se as K,p as L,E as M,b as N,_ as a,g as b,A as c,f as d,S as e,C as f,F as g,O as h,$ as i,R as j,k,z as l,B as m,Z as n,G as o,N as p,j as q,q as r,T as s,w as t,x as u,I as v,y as w,P as x,D as y,H as z}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-fad19d75.js";import{m as o,P as r}from"./p-47dbe17d.js";import"./p-16d2932d.js";import"./p-56f6ce4c.js";import"./p-7fec2bcb.js";import{P as e}from"./p-9f56ad71.js";import{C as a,a as p}from"./p-14c91ffd.js";import{g as h,a as d}from"./p-8115b2f4.js";import{E as n}from"./p-a8b4f429.js";import{J as c}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-fad19d75.js";import{m as o,P as r}from"./p-47dbe17d.js";import"./p-16d2932d.js";import"./p-56f6ce4c.js";import"./p-7fec2bcb.js";import{P as e}from"./p-9f56ad71.js";import{C as a,a as p}from"./p-14c91ffd.js";import{g as h,a as d}from"./p-8115b2f4.js";import{E as n}from"./p-a8b4f429.js";import{J as c}from"./p-9e7204b5.js";import{c as m}from"./p-b459d0b0.js";import"./p-0e180654.js";import"./p-5a62fca2.js";import"./p-22e38d5b.js";const u=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.payoutId=void 0,this.authToken=void 0,this.getPayout=void 0,this.getPayoutCSV=void 0,this.errorMessage=null}componentWillLoad(){m(),this.analytics=new c(this),this.initializeServices()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeServices()}initializeServices(){this.payoutId&&this.authToken?(this.getPayout=(({id:t,authToken:s,service:i})=>async({onSuccess:o,onError:r})=>{var p;try{const n=await i.fetchPayout(t,s);n.error?r({error:h(n.error),code:d(null===(p=n.error)||void 0===p?void 0:p.code),severity:a.ERROR}):o(new e(n.data))}catch(t){r({error:h(t),code:d(null==t?void 0:t.code),severity:a.ERROR})}})({id:this.payoutId,authToken:this.authToken,service:new r}),this.getPayoutCSV=o({authToken:this.authToken,service:new r})):(this.errorMessage="Failed to load payout details. payoutId or authToken is not provided.",this.errorEvent.emit({message:this.errorMessage,errorCode:p.MISSING_PROPS,severity:a.ERROR}))}render(){return this.errorMessage?n(this.errorMessage):i("payout-details-core",{getPayout:this.getPayout,getPayoutCSV:this.getPayoutCSV,"onError-event":this.handleErrorEvent})}static get watchers(){return{payoutId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_payout_details}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as e,a as t}from"./p-3c654c07.js";import{l as n,k as s,m as a,n as r,q as o,u as i,v as l,e as c,p as d,x as m,y as p}from"./p-88efdd31.js";const u=i=>{const l=e({line1:n.required("Enter street address"),line2:s.nullable(),city:a.required("Enter city"),state:r.required("Select state"),postal_code:o.required("Enter postal code"),country:t().required("Select country")}),c=e({line1:n.nullable(),line2:s.nullable(),city:a.nullable(),state:r.nullable(),postal_code:o.nullable(),country:t().required("Select country")});return i?c:l},E=(n,s)=>{const a=e({name:i.required(`Enter ${n} name`),title:l.required(`Enter ${n} title`),email:c.required(`Enter ${n} email`),phone:d.required("Enter phone number"),dob_full:m(n).required("Enter date of birth"),ssn_last4:t().nullable(),identification_number:p,address:u(s)}),r=e({name:i.required(`Enter ${n} name`),title:l.nullable(),email:c.nullable(),phone:d.nullable(),dob_full:m(n).nullable(),ssn_last4:t().nullable(),identification_number:p.nullable(),address:u(s)});return s?r:a};export{u as a,E as i}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as t,h as e,H as i}from"./p-fad19d75.js";import{a,C as n}from"./p-14c91ffd.js";import{m as o,b as r}from"./p-5968ff8a.js";import{B as h}from"./p-f6f8dabc.js";import{c as d,F as c,e as u}from"./p-3c654c07.js";import{b as l,c as b,a as f}from"./p-a76ece26.js";import{z as p,A as m,u as v,B as y,C as g,D as k,E as _,F as w,G as j,H as T,I as C,J as S,K as O,L as x,M as I}from"./p-c65b78cf.js";import{c as A}from"./p-1815a43b.js";import{A as L}from"./p-0e180654.js";import"./p-16d2932d.js";import"./p-56f6ce4c.js";import"./p-7fec2bcb.js";import"./p-9f56ad71.js";import{c as F}from"./p-5a62fca2.js";import{n as B}from"./p-e3c22aa9.js";import{B as E}from"./p-5e7c60d8.js";import{S as D}from"./p-08b0fb31.js";import{B as H}from"./p-9c9c7dac.js";import"./p-8115b2f4.js";import"./p-6078a370.js";import"./p-1ff8810b.js";const P=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-additional-questions-form-step-core",{key:"6ca8443cbe837d993be4381a9d650caaaf51f2df",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};class W{constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}}const q=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.stepCompleted=t(this,"form-step-completed",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.bankAccount=Object.assign({},new W(s.data.bank_accounts.length>0?s.data.bank_accounts[0]:{})),this.formController.setInitialValues(Object.assign({},this.bankAccount))}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.formController.values.getValue(),e=Object.assign(Object.assign({},t),{business_id:this.businessId}),i=await this.api.post(this.bankAccountEndpoint,e);this.handleResponse(i,s)}catch(s){this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.bankAccount=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get bankAccountEndpoint(){return"entities/bank_accounts"}get formDisabled(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}):t(),this.submitted.emit({data:s,metadata:{completedStep:l.bankAccount}}),this.stepCompleted.emit({data:s,formStep:b.bankAccount})}async validateAndSubmit({onSuccess:s}){this.formDisabled?(this.stepCompleted.emit({data:null,formStep:b.bankAccount,metadata:"no data submitted"}),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.formController=new c((s=>{const t=d({bank_name:p.required("Enter bank name"),nickname:m.required("Enter nickname"),account_owner_name:v.required("Enter account owner name"),account_type:y.required("Select account type"),account_number:g.required("Enter account number"),routing_number:k.required("Enter routing number")}),e=d({bank_name:p.nullable(),nickname:m.nullable(),account_owner_name:v.nullable(),account_type:y.nullable(),account_number:g.nullable(),routing_number:k.nullable()});return s?e:t})(this.allowOptionalFields)),this.api=L({authToken:this.authToken,apiOrigin:F.proxyApiOrigin}),this.businessId&&this.authToken&&this.fetchData()}componentDidLoad(){this.formController.values.subscribe((s=>this.bankAccount=Object.assign({},s))),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){const s=this.formController.getInitialValues();return e("form",{key:"7ae39afd400c9bc2a86f75aeb2a529a36ecd849c"},e("fieldset",{key:"d01072ed3710acfbb7916de8ffb9fb80770750af"},e("div",{key:"75228827d492fcdbd603963a3574c1dca84530b4",class:"d-flex align-items-center gap-2"},e("legend",{key:"23600460d0b1486d3d4cd612bc9532ba30d5da0e",class:"mb-0"},"Bank Account Info"),e("form-control-tooltip",{key:"fed3ad0eef074985a25488a9c093b9eb0cbafabb",helpText:"The Direct Deposit Account is the business bank account where your funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),e("hr",{key:"f7405cf23ee0a90d46f2c394d09ae421fe9472ee",class:"mt-2"}),e("div",{key:"4cc1d09daed6a897778440f69bd0a9dbd99c1270",class:"row gy-3"},e("div",{key:"f7e0e160adaf0925b4ea5ada12137dcf3e5c5d35",class:"col-12"},e("form-control-text",{key:"d7cbdb427b9bf332dd9da5885ccfc73d0dd4b40b",name:"bank_name",label:"Bank Name",defaultValue:s.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"010c5dd53d8d31f9edc4f0e7ca225c0d2c8a1e09",class:"col-12"},e("form-control-text",{key:"f524266d5fcd4e3e35539c130f6dfe742d620593",name:"nickname",label:"Nickname",defaultValue:s.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"1875fc9bb5e0741e1c2aff205effa030aafcd0e2",class:"col-12"},e("form-control-text",{key:"343754af2350ca668f39270513fa44be416834ba",name:"account_owner_name",label:"Account Owner Name",defaultValue:s.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"9870781e41bd5879ec161569a7b60ecc049690cc",class:"col-12"},e("form-control-select",{key:"1ade0e3e0f470e3165d227b67c9dd4054d8443fc",name:"account_type",label:"Account Type",options:A,defaultValue:s.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"c5e531aaded367bd825913cb100dd3225d1c6f61",class:"col-12"},e("form-control-text",{key:"39cd3bca5b86a0ca175c26be3982bc0e98953439",name:"account_number",label:"Account Number",defaultValue:s.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:B,disabled:this.formDisabled,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),e("div",{key:"8c3306dde7149b49d1ad6ba426634674e318b4fd",class:"col-12"},e("form-control-text",{key:"970305b04e9517f56bcb8217cd938b8971ca34b4",name:"routing_number",label:"Routing Number",defaultValue:s.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:B,disabled:this.formDisabled,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))))}},V=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-business-core-info-form-step-core",{key:"8b034d8c728aef3683823a45083764a456d07545",businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},z=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.stepCompleted=t(this,"form-step-completed",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.fetchData=async()=>{this.renderState="loading",this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.business=Object.assign({},new E(s.data)),this.existingDocuments=s.data.documents,this.paymentVolume=s.data.additional_questions.business_payment_volume}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s}),this.renderState="error"}finally{this.initializeFormController(),this.formLoading.emit(!1),this.renderState="success"}},this.initializeFormController=()=>{this.formController=new c(((s,t,e)=>{const i=d({voided_check:_(t,e),government_id:w.nullable(),ss4:j.nullable(),other:T.nullable(),balance_sheet:C(s,t,e),bank_statement:S(s,t,e),profit_and_loss_statement:O(s,t,e)}),a=d({voided_check:_(t,e),government_id:w.nullable(),ss4:j.nullable(),other:T.nullable(),balance_sheet:C(s,t,e),bank_statement:S(s,t,e),profit_and_loss_statement:O(s,t,e)});return e?a:i})(this.paymentVolume,this.existingDocuments,this.allowOptionalFields)),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.createDocumentRecord=async s=>{this.formLoading.emit(!0);const t=s.record_data;try{const e=await this.api.post(this.documentEndpoint,t);return this.handleDocRecordResponse(s,e)}catch(s){return this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s}),!1}},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:a.POST_ERROR,message:t.error.message,severity:n.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await fetch(s.presigned_url,{method:"PUT",body:s.fileString});return this.handleUploadResponse(t)},this.handleUploadResponse=s=>s.error?(this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}),!1):(this.submitted.emit({data:s,metadata:{completedStep:l.documentUpload}}),this.stepCompleted.emit({data:s,formStep:b.documentUpload}),!0),this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new x({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.sendData=async s=>{try{const t=Object.values(this.documentData).flat();if(!t.length)return this.stepCompleted.emit({data:null,formStep:b.documentUpload,metadata:"no data submitted"}),s();const e=t.map((s=>this.createDocumentRecord(s)));if(!await Promise.all(e))return;const i=t.map((s=>this.uploadDocument(s)));if(!await Promise.all(i))return;await s()}finally{this.formLoading.emit(!1)}},this.formController=void 0,this.errors={},this.existingDocuments=[],this.paymentVolume=void 0,this.business=void 0,this.documentData=new I,this.renderState="loading",this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get documentEndpoint(){return"entities/document"}componentWillLoad(){this.api=L({authToken:this.authToken,apiOrigin:F.proxyApiOrigin}),this.businessId&&this.authToken&&this.fetchData()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get isLoading(){return"loading"===this.renderState}get isError(){return"error"===this.renderState}get documentsOnFile(){return this.isError?null:this.isLoading?e(D,{variant:"rounded",height:"50px"}):e("justifi-business-documents-on-file",{documents:this.existingDocuments})}get formInputs(){return this.isError?null:this.isLoading?e(D,{variant:"rounded",height:"350px"}):e("justifi-business-document-upload-input-group",{paymentVolume:this.paymentVolume,inputHandler:this.inputHandler,storeFiles:this.storeFiles,errors:this.errors})}render(){return e("form",{key:"5e0722b4d5ea462cf5ba6ed2de9d3a73b8bf910a"},e("fieldset",{key:"09f3589465a6ad53080743018a57b959bef68309"},e("div",{key:"b6c1aa4cf4754126b11902a8b35c19e3044ba4ed",class:"d-flex align-items-center gap-2"},e("legend",{key:"77b5d6847054afbfe6cc7e9e00762c226a582447",class:"mb-0"},"Document Uploads"),e("form-control-tooltip",{key:"9fb518fbad5039c77436377e26e420dc01a84ca2",helpText:"Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."})),e("hr",{key:"e95938b42ad6d52d612bb654e39af7ee3442b454",class:"mt-2"}),this.documentsOnFile,e("div",{key:"8ee1cda96d28486faa2371bb1b82c57a57220071",class:"d-flex flex-column"},this.formInputs)))}},M=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e(i,{key:"31bd33a08c9eb4a849db8898b3ec7e6fede7b843"},e("justifi-business-owners-form-step-core",{key:"9e4c88686e1a5ebfd81ab5f1aebd21f58c4e6be5",authToken:this.authToken,businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s}))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},N=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-business-representative-form-step-core",{key:"934b6204cfe78ffe17b3f975de3eedb64398168d",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},R=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.stepCompleted=t(this,"form-step-completed",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.termsPayload,e=await this.api.post(this.termsConditionsEndpoint,t);this.handleResponse(e,s)}catch(s){this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.acceptedTermsBefore=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=L({authToken:this.authToken,apiOrigin:F.proxyApiOrigin}),this.formController=new c((s=>{const t=d({accepted:u().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),e=d({accepted:u().nullable()});return s?e:t})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}):t(),this.submitted.emit({data:s,metadata:{completedStep:l.termsAndConditions}}),this.stepCompleted.emit({data:s,formStep:b.termsAndConditions})}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.submitted.emit({metadata:{completedStep:l.termsAndConditions}}),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){return e("form",{key:"e675f117eb90a0690e148a1164fffde5d4f01419"},e("fieldset",{key:"e1cb1fe38b7365cc282eb91689afb40d6b01136c"},e("legend",{key:"e57a4bc006983c3ee3805445d750ea330bedd477"},"Terms and Conditions"),e("hr",{key:"7b373693bd10d6493816b3dd9ae07d826bd7ff84"}),e("justifi-business-terms-conditions-text",{key:"984b3668240861df4947c60068c1be079a3eb7e1"}),e("br",{key:"15dfba53dd81d39be4ea216bf798f51881abf23d"}),e("div",{key:"b426c709c11435911efb4289b68fa8f86c2569f2",class:"row-gy-3"},e("div",{key:"307c51a7f78613807054a5d1480318fdb9316bff",class:"col-12"},e("form-control-checkbox",{key:"6069cb9929c7ea0f2c1b2cbc99dad61806c80429",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText})))))}},U=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-legal-address-form-step-core",{key:"06ac5acac2cc9c167a86448b0e12d885d21361fb",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Y=class{constructor(t){s(this,t),this.currentStep=void 0,this.totalSteps=void 0,this.formLoading=void 0,this.formDisabled=void 0,this.previousStepButtonOnClick=void 0,this.nextStepButtonOnClick=void 0}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return e("div",{key:"3df3796f2bb35819373564c0002e35d14c85e360",class:"d-flex gap-2"},e(H,{key:"3f8fd4e288b2eed6776c77b44dda816e8a0580cd",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),e(H,{key:"83c7d2405d6e4f88f721a95250aa847a6999a211",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,f.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),e(H,{key:"d87bcdc9bea52b11307e31bd1d99636be05d7156",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,f.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},$=class{constructor(i){s(this,i),this.formCompleted=t(this,"formCompleted",7),this.componentStepMapping={0:()=>e("justifi-business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields}),1:()=>e("justifi-legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields}),2:()=>e("justifi-additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>e("justifi-business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields}),4:()=>e("justifi-business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields}),5:()=>e("justifi-business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields}),6:()=>e("justifi-business-document-upload-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields}),7:()=>e("justifi-business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[7]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields,onSubmitted:()=>this.formCompleted.emit()})},this.businessId=void 0,this.authToken=void 0,this.refs=void 0,this.currentStep=void 0,this.allowOptionalFields=!1,this.handleFormLoading=void 0}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return e("div",{key:"8f02aa3223e38cda70319c127f60e5d2f3c5abe5",class:"col-12 mb-4"},this.currentStepComponent)}};export{P as justifi_additional_questions_form_step,q as justifi_business_bank_account_form_step,V as justifi_business_core_info_form_step,z as justifi_business_document_upload_form_step,M as justifi_business_owners_form_step,N as justifi_business_representative_form_step,R as justifi_business_terms_conditions_form_step,U as justifi_legal_address_form_step,Y as justifi_payment_provisioning_form_buttons,$ as justifi_payment_provisioning_form_steps}
|
|
1
|
+
import{r as s,c as t,h as e,H as i}from"./p-fad19d75.js";import{a,C as n}from"./p-14c91ffd.js";import{m as o,b as r}from"./p-5968ff8a.js";import{B as h}from"./p-f6f8dabc.js";import{c as d,F as c,e as u}from"./p-3c654c07.js";import{b as l,c as b,a as f}from"./p-a76ece26.js";import{z as p,A as m,u as v,B as y,C as g,D as k,E as _,F as w,G as j,H as T,I as C,J as S,K as O,L as x,M as I}from"./p-88efdd31.js";import{c as A}from"./p-1815a43b.js";import{A as L}from"./p-0e180654.js";import"./p-16d2932d.js";import"./p-56f6ce4c.js";import"./p-7fec2bcb.js";import"./p-9f56ad71.js";import{c as F}from"./p-5a62fca2.js";import{n as B}from"./p-e3c22aa9.js";import{B as E}from"./p-5e7c60d8.js";import{S as D}from"./p-08b0fb31.js";import{B as H}from"./p-9c9c7dac.js";import"./p-8115b2f4.js";import"./p-6078a370.js";import"./p-1ff8810b.js";const P=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-additional-questions-form-step-core",{key:"6ca8443cbe837d993be4381a9d650caaaf51f2df",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}};class W{constructor(s){this.id=s.id,this.account_owner_name=s.account_owner_name,this.full_name=s.full_name,this.account_type=s.account_type,this.acct_last_four=s.acct_last_four,this.account_number_last4=s.account_number_last4,this.routing_number=s.routing_number,this.bank_name=s.bank_name,this.country=s.country,this.currency=s.currency,this.nickname=s.nickname,this.metadata=s.metadata,this.business_id=s.business_id,this.platform_account_id=s.platform_account_id,this.created_at=s.created_at,this.updated_at=s.updated_at}}const q=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.stepCompleted=t(this,"form-step-completed",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.bankAccount=Object.assign({},new W(s.data.bank_accounts.length>0?s.data.bank_accounts[0]:{})),this.formController.setInitialValues(Object.assign({},this.bankAccount))}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.formController.values.getValue(),e=Object.assign(Object.assign({},t),{business_id:this.businessId}),i=await this.api.post(this.bankAccountEndpoint,e);this.handleResponse(i,s)}catch(s){this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.bankAccount=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get bankAccountEndpoint(){return"entities/bank_accounts"}get formDisabled(){var s;return!!(null===(s=this.bankAccount)||void 0===s?void 0:s.id)}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}):t(),this.submitted.emit({data:s,metadata:{completedStep:l.bankAccount}}),this.stepCompleted.emit({data:s,formStep:b.bankAccount})}async validateAndSubmit({onSuccess:s}){this.formDisabled?(this.stepCompleted.emit({data:null,formStep:b.bankAccount,metadata:"no data submitted"}),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentWillLoad(){this.formController=new c((s=>{const t=d({bank_name:p.required("Enter bank name"),nickname:m.required("Enter nickname"),account_owner_name:v.required("Enter account owner name"),account_type:y.required("Select account type"),account_number:g.required("Enter account number"),routing_number:k.required("Enter routing number")}),e=d({bank_name:p.nullable(),nickname:m.nullable(),account_owner_name:v.nullable(),account_type:y.nullable(),account_number:g.nullable(),routing_number:k.nullable()});return s?e:t})(this.allowOptionalFields)),this.api=L({authToken:this.authToken,apiOrigin:F.proxyApiOrigin}),this.businessId&&this.authToken&&this.fetchData()}componentDidLoad(){this.formController.values.subscribe((s=>this.bankAccount=Object.assign({},s))),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){const s=this.formController.getInitialValues();return e("form",{key:"7ae39afd400c9bc2a86f75aeb2a529a36ecd849c"},e("fieldset",{key:"d01072ed3710acfbb7916de8ffb9fb80770750af"},e("div",{key:"75228827d492fcdbd603963a3574c1dca84530b4",class:"d-flex align-items-center gap-2"},e("legend",{key:"23600460d0b1486d3d4cd612bc9532ba30d5da0e",class:"mb-0"},"Bank Account Info"),e("form-control-tooltip",{key:"fed3ad0eef074985a25488a9c093b9eb0cbafabb",helpText:"The Direct Deposit Account is the business bank account where your funds will be deposited. The name of this account must match the registered business name exactly. We are not able to accept personal accounts unless your business is a registered sole proprietorship."})),e("hr",{key:"f7405cf23ee0a90d46f2c394d09ae421fe9472ee",class:"mt-2"}),e("div",{key:"4cc1d09daed6a897778440f69bd0a9dbd99c1270",class:"row gy-3"},e("div",{key:"f7e0e160adaf0925b4ea5ada12137dcf3e5c5d35",class:"col-12"},e("form-control-text",{key:"d7cbdb427b9bf332dd9da5885ccfc73d0dd4b40b",name:"bank_name",label:"Bank Name",defaultValue:s.bank_name,errorText:this.errors.bank_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"010c5dd53d8d31f9edc4f0e7ca225c0d2c8a1e09",class:"col-12"},e("form-control-text",{key:"f524266d5fcd4e3e35539c130f6dfe742d620593",name:"nickname",label:"Nickname",defaultValue:s.nickname,errorText:this.errors.nickname,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"1875fc9bb5e0741e1c2aff205effa030aafcd0e2",class:"col-12"},e("form-control-text",{key:"343754af2350ca668f39270513fa44be416834ba",name:"account_owner_name",label:"Account Owner Name",defaultValue:s.account_owner_name,errorText:this.errors.account_owner_name,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"9870781e41bd5879ec161569a7b60ecc049690cc",class:"col-12"},e("form-control-select",{key:"1ade0e3e0f470e3165d227b67c9dd4054d8443fc",name:"account_type",label:"Account Type",options:A,defaultValue:s.account_type,errorText:this.errors.account_type,inputHandler:this.inputHandler,disabled:this.formDisabled})),e("div",{key:"c5e531aaded367bd825913cb100dd3225d1c6f61",class:"col-12"},e("form-control-text",{key:"39cd3bca5b86a0ca175c26be3982bc0e98953439",name:"account_number",label:"Account Number",defaultValue:s.account_number,maxLength:17,errorText:this.errors.account_number,inputHandler:this.inputHandler,keyDownHandler:B,disabled:this.formDisabled,helpText:"Please copy the account number as shown on your statement/check. Do not include spaces or dashes."})),e("div",{key:"8c3306dde7149b49d1ad6ba426634674e318b4fd",class:"col-12"},e("form-control-text",{key:"970305b04e9517f56bcb8217cd938b8971ca34b4",name:"routing_number",label:"Routing Number",defaultValue:s.routing_number,maxLength:9,errorText:this.errors.routing_number,inputHandler:this.inputHandler,keyDownHandler:B,disabled:this.formDisabled,helpText:"A valid routing number is nine digits. Please include any leading or trailing zeroes."})))))}},V=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-business-core-info-form-step-core",{key:"8b034d8c728aef3683823a45083764a456d07545",businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},z=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.stepCompleted=t(this,"form-step-completed",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.fetchData=async()=>{this.renderState="loading",this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.business=Object.assign({},new E(s.data)),this.existingDocuments=s.data.documents,this.paymentVolume=s.data.additional_questions.business_payment_volume}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s}),this.renderState="error"}finally{this.initializeFormController(),this.formLoading.emit(!1),this.renderState="success"}},this.initializeFormController=()=>{this.formController=new c(((s,t,e)=>{const i=d({voided_check:_(t,e),government_id:w.nullable(),ss4:j.nullable(),other:T.nullable(),balance_sheet:C(s,t,e),bank_statement:S(s,t,e),profit_and_loss_statement:O(s,t,e)}),a=d({voided_check:_(t,e),government_id:w.nullable(),ss4:j.nullable(),other:T.nullable(),balance_sheet:C(s,t,e),bank_statement:S(s,t,e),profit_and_loss_statement:O(s,t,e)});return e?a:i})(this.paymentVolume,this.existingDocuments,this.allowOptionalFields)),this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))},this.createDocumentRecord=async s=>{this.formLoading.emit(!0);const t=s.record_data;try{const e=await this.api.post(this.documentEndpoint,t);return this.handleDocRecordResponse(s,e)}catch(s){return this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s}),!1}},this.handleDocRecordResponse=(s,t)=>t.error?(this.errorEvent.emit({errorCode:a.POST_ERROR,message:t.error.message,severity:n.ERROR,data:t.error}),!1):(s.setPresignedUrl(t.data.presigned_url),!0),this.uploadDocument=async s=>{if(!s.presigned_url)throw new Error("Presigned URL is not set");const t=await fetch(s.presigned_url,{method:"PUT",body:s.fileString});return this.handleUploadResponse(t)},this.handleUploadResponse=s=>s.error?(this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}),!1):(this.submitted.emit({data:s,metadata:{completedStep:l.documentUpload}}),this.stepCompleted.emit({data:s,formStep:b.documentUpload}),!0),this.storeFiles=s=>{const t=Array.from(s.detail.fileList),e=s.detail.document_type,i=t.map((s=>new x({file:s,document_type:e},this.businessId)));this.documentData[e]=i},this.sendData=async s=>{try{const t=Object.values(this.documentData).flat();if(!t.length)return this.stepCompleted.emit({data:null,formStep:b.documentUpload,metadata:"no data submitted"}),s();const e=t.map((s=>this.createDocumentRecord(s)));if(!await Promise.all(e))return;const i=t.map((s=>this.uploadDocument(s)));if(!await Promise.all(i))return;await s()}finally{this.formLoading.emit(!1)}},this.formController=void 0,this.errors={},this.existingDocuments=[],this.paymentVolume=void 0,this.business=void 0,this.documentData=new I,this.renderState="loading",this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get documentEndpoint(){return"entities/document"}componentWillLoad(){this.api=L({authToken:this.authToken,apiOrigin:F.proxyApiOrigin}),this.businessId&&this.authToken&&this.fetchData()}async validateAndSubmit({onSuccess:s}){this.formController.validateAndSubmit((()=>this.sendData(s)))}get isLoading(){return"loading"===this.renderState}get isError(){return"error"===this.renderState}get documentsOnFile(){return this.isError?null:this.isLoading?e(D,{variant:"rounded",height:"50px"}):e("justifi-business-documents-on-file",{documents:this.existingDocuments})}get formInputs(){return this.isError?null:this.isLoading?e(D,{variant:"rounded",height:"350px"}):e("justifi-business-document-upload-input-group",{paymentVolume:this.paymentVolume,inputHandler:this.inputHandler,storeFiles:this.storeFiles,errors:this.errors})}render(){return e("form",{key:"5e0722b4d5ea462cf5ba6ed2de9d3a73b8bf910a"},e("fieldset",{key:"09f3589465a6ad53080743018a57b959bef68309"},e("div",{key:"b6c1aa4cf4754126b11902a8b35c19e3044ba4ed",class:"d-flex align-items-center gap-2"},e("legend",{key:"77b5d6847054afbfe6cc7e9e00762c226a582447",class:"mb-0"},"Document Uploads"),e("form-control-tooltip",{key:"9fb518fbad5039c77436377e26e420dc01a84ca2",helpText:"Various file formats such as PDF, DOC, DOCX, JPEG, and others are accepted. Multiple files can be uploaded for each document category."})),e("hr",{key:"e95938b42ad6d52d612bb654e39af7ee3442b454",class:"mt-2"}),this.documentsOnFile,e("div",{key:"8ee1cda96d28486faa2371bb1b82c57a57220071",class:"d-flex flex-column"},this.formInputs)))}},M=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e(i,{key:"31bd33a08c9eb4a849db8898b3ec7e6fede7b843"},e("justifi-business-owners-form-step-core",{key:"9e4c88686e1a5ebfd81ab5f1aebd21f58c4e6be5",authToken:this.authToken,businessId:this.businessId,getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s}))}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},N=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-business-representative-form-step-core",{key:"934b6204cfe78ffe17b3f975de3eedb64398168d",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},R=class{constructor(e){s(this,e),this.submitted=t(this,"submitted",7),this.stepCompleted=t(this,"form-step-completed",7),this.formLoading=t(this,"formLoading",7),this.errorEvent=t(this,"error-event",7),this.fetchData=async()=>{this.formLoading.emit(!0);try{const s=await this.api.get(this.businessEndpoint);this.acceptedTermsBefore=s.data.terms_conditions_accepted}catch(s){this.errorEvent.emit({errorCode:a.FETCH_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.sendData=async s=>{this.formLoading.emit(!0);try{const t=this.termsPayload,e=await this.api.post(this.termsConditionsEndpoint,t);this.handleResponse(e,s)}catch(s){this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.message,severity:n.ERROR,data:s})}finally{this.formLoading.emit(!1)}},this.inputHandler=(s,t)=>{this.formController.setValues(Object.assign(Object.assign({},this.formController.values.getValue()),{[s]:t}))},this.formController=void 0,this.errors={},this.acceptedTermsBefore=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}get businessEndpoint(){return`entities/business/${this.businessId}`}get termsConditionsEndpoint(){return"entities/terms_and_conditions"}get formHelperText(){return this.acceptedTermsBefore?"You have already accepted the terms and conditions.":null}get termsPayload(){return{business_id:this.businessId,accepted:this.formController.values.getValue().accepted,user_agent:window.navigator.userAgent}}async componentWillLoad(){this.api=L({authToken:this.authToken,apiOrigin:F.proxyApiOrigin}),this.formController=new c((s=>{const t=d({accepted:u().oneOf([!0],"You must agree to the terms and conditions to continue").required("You must agree to the terms and conditions to continue")}),e=d({accepted:u().nullable()});return s?e:t})(this.allowOptionalFields)),this.businessId&&this.authToken&&this.fetchData()}handleResponse(s,t){s.error?this.errorEvent.emit({errorCode:a.POST_ERROR,message:s.error.message,severity:n.ERROR,data:s.error}):t(),this.submitted.emit({data:s,metadata:{completedStep:l.termsAndConditions}}),this.stepCompleted.emit({data:s,formStep:b.termsAndConditions})}async validateAndSubmit({onSuccess:s}){this.acceptedTermsBefore?(this.submitted.emit({metadata:{completedStep:l.termsAndConditions}}),s()):this.formController.validateAndSubmit((()=>this.sendData(s)))}componentDidLoad(){this.formController.errors.subscribe((s=>{this.errors=Object.assign({},s)}))}render(){return e("form",{key:"e675f117eb90a0690e148a1164fffde5d4f01419"},e("fieldset",{key:"e1cb1fe38b7365cc282eb91689afb40d6b01136c"},e("legend",{key:"e57a4bc006983c3ee3805445d750ea330bedd477"},"Terms and Conditions"),e("hr",{key:"7b373693bd10d6493816b3dd9ae07d826bd7ff84"}),e("justifi-business-terms-conditions-text",{key:"984b3668240861df4947c60068c1be079a3eb7e1"}),e("br",{key:"15dfba53dd81d39be4ea216bf798f51881abf23d"}),e("div",{key:"b426c709c11435911efb4289b68fa8f86c2569f2",class:"row-gy-3"},e("div",{key:"307c51a7f78613807054a5d1480318fdb9316bff",class:"col-12"},e("form-control-checkbox",{key:"6069cb9929c7ea0f2c1b2cbc99dad61806c80429",name:"accepted",label:"I agree to the terms and conditions",inputHandler:this.inputHandler,errorText:this.errors.accepted,disabled:this.acceptedTermsBefore,helpText:this.formHelperText})))))}},U=class{constructor(e){s(this,e),this.errorEvent=t(this,"error-event",7),this.getBusiness=void 0,this.patchBusiness=void 0,this.authToken=void 0,this.businessId=void 0,this.allowOptionalFields=void 0}propChanged(){this.initializeApi()}async validateAndSubmit({onSuccess:s}){this.coreComponent.validateAndSubmit({onSuccess:s})}componentWillLoad(){this.initializeApi()}initializeApi(){this.authToken&&this.businessId?(this.getBusiness=o({authToken:this.authToken,businessId:this.businessId,service:new h}),this.patchBusiness=r({authToken:this.authToken,businessId:this.businessId,service:new h})):this.errorEvent.emit({message:"Missing required props",errorCode:a.MISSING_PROPS,severity:n.ERROR})}render(){return e("justifi-legal-address-form-step-core",{key:"06ac5acac2cc9c167a86448b0e12d885d21361fb",getBusiness:this.getBusiness,patchBusiness:this.patchBusiness,allowOptionalFields:this.allowOptionalFields,ref:s=>this.coreComponent=s})}static get watchers(){return{authToken:["propChanged"],businessId:["propChanged"]}}},Y=class{constructor(t){s(this,t),this.currentStep=void 0,this.totalSteps=void 0,this.formLoading=void 0,this.formDisabled=void 0,this.previousStepButtonOnClick=void 0,this.nextStepButtonOnClick=void 0}get showPreviousStepButton(){return this.currentStep>0}get showNextStepButton(){return this.currentStep<this.totalSteps}get showSubmitButton(){return this.currentStep===this.totalSteps}render(){return e("div",{key:"3df3796f2bb35819373564c0002e35d14c85e360",class:"d-flex gap-2"},e(H,{key:"3f8fd4e288b2eed6776c77b44dda816e8a0580cd",variant:"secondary",type:"button",onClick:()=>this.previousStepButtonOnClick(),disabled:this.formDisabled,hidden:!this.showPreviousStepButton},"Previous"),e(H,{key:"83c7d2405d6e4f88f721a95250aa847a6999a211",variant:"primary",type:"button",onClick:s=>this.nextStepButtonOnClick(s,f.nextStep),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showNextStepButton},"Next"),e(H,{key:"d87bcdc9bea52b11307e31bd1d99636be05d7156",variant:"primary",type:"submit",onClick:s=>this.nextStepButtonOnClick(s,f.submit),disabled:this.formDisabled,isLoading:this.formLoading,hidden:!this.showSubmitButton},"Submit"))}},$=class{constructor(i){s(this,i),this.formCompleted=t(this,"formCompleted",7),this.componentStepMapping={0:()=>e("justifi-business-core-info-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[0]=s,allowOptionalFields:this.allowOptionalFields}),1:()=>e("justifi-legal-address-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[1]=s,allowOptionalFields:this.allowOptionalFields}),2:()=>e("justifi-additional-questions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[2]=s,allowOptionalFields:this.allowOptionalFields}),3:()=>e("justifi-business-representative-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[3]=s,allowOptionalFields:this.allowOptionalFields}),4:()=>e("justifi-business-owners-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[4]=s,allowOptionalFields:this.allowOptionalFields}),5:()=>e("justifi-business-bank-account-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[5]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields}),6:()=>e("justifi-business-document-upload-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[6]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields}),7:()=>e("justifi-business-terms-conditions-form-step",{businessId:this.businessId,authToken:this.authToken,ref:s=>this.refs[7]=s,onFormLoading:this.handleFormLoading,allowOptionalFields:this.allowOptionalFields,onSubmitted:()=>this.formCompleted.emit()})},this.businessId=void 0,this.authToken=void 0,this.refs=void 0,this.currentStep=void 0,this.allowOptionalFields=!1,this.handleFormLoading=void 0}get currentStepComponent(){return this.componentStepMapping[this.currentStep]()}render(){return e("div",{key:"8f02aa3223e38cda70319c127f60e5d2f3c5abe5",class:"col-12 mb-4"},this.currentStepComponent)}};export{P as justifi_additional_questions_form_step,q as justifi_business_bank_account_form_step,V as justifi_business_core_info_form_step,z as justifi_business_document_upload_form_step,M as justifi_business_owners_form_step,N as justifi_business_representative_form_step,R as justifi_business_terms_conditions_form_step,U as justifi_legal_address_form_step,Y as justifi_payment_provisioning_form_buttons,$ as justifi_payment_provisioning_form_steps}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-fad19d75.js";import{P as e}from"./p-fc4de0d2.js";import"./p-16d2932d.js";import"./p-56f6ce4c.js";import{P as r}from"./p-7fec2bcb.js";import"./p-9f56ad71.js";import{C as o,a}from"./p-14c91ffd.js";import{g as n,a as p}from"./p-8115b2f4.js";import{E as h}from"./p-a8b4f429.js";import{J as d}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i}from"./p-fad19d75.js";import{P as e}from"./p-fc4de0d2.js";import"./p-16d2932d.js";import"./p-56f6ce4c.js";import{P as r}from"./p-7fec2bcb.js";import"./p-9f56ad71.js";import{C as o,a}from"./p-14c91ffd.js";import{g as n,a as p}from"./p-8115b2f4.js";import{E as h}from"./p-a8b4f429.js";import{J as d}from"./p-9e7204b5.js";import{c}from"./p-b459d0b0.js";import"./p-0e180654.js";import"./p-5a62fca2.js";import"./p-22e38d5b.js";const m=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.paymentService=new e,this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.paymentId=void 0,this.authToken=void 0,this.getPaymentDetails=void 0,this.errorMessage=null}componentWillLoad(){c(),this.analytics=new d(this),this.initializeGetPaymentDetails()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetPaymentDetails()}initializeGetPaymentDetails(){this.paymentId&&this.authToken?this.getPaymentDetails=(({id:t,authToken:s,service:i})=>async({onSuccess:e,onError:a})=>{var h;try{const d=await i.fetchPayment(t,s);d.error?a({error:n(d.error),code:p(null===(h=d.error)||void 0===h?void 0:h.code),severity:o.ERROR}):e({payment:new r(d.data)})}catch(t){const s=p(null==t?void 0:t.code);a({error:n(t),code:s,severity:o.ERROR})}})({id:this.paymentId,authToken:this.authToken,service:new e}):(this.errorMessage="Payment ID and Auth Token are required",this.errorEvent.emit({message:this.errorMessage,errorCode:a.MISSING_PROPS,severity:o.ERROR}))}render(){return this.errorMessage?h(this.errorMessage):i("payment-details-core",{getPaymentDetails:this.getPaymentDetails,"onError-event":this.handleErrorEvent})}static get watchers(){return{paymentId:["propChanged"],authToken:["propChanged"]}}};export{m as justifi_payment_details}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t}from"./p-
|
|
1
|
+
import{p as t}from"./p-22e38d5b.js";import{c as i}from"./p-5a62fca2.js";import{A as s}from"./p-0e180654.js";class e{async record(t){return s({apiOrigin:i.proxyApiOrigin}).post("analytics",t)}}class r{constructor(t){this.handleCustomEvent=async t=>{await this.service.record(t)},this.service=new e,this.componentInstance=t,this.setUpBasicData(),this.setupLifecycleTracking(),this.trackCustomEvents()}get resourceId(){return this.componentInstance.accountId||this.componentInstance.businessId||this.componentInstance.paymentId||this.componentInstance.payoutId||this.componentInstance.checkoutId}setUpBasicData(){this.basicData={component_name:this.componentInstance.tagName,component_version:t.version,client_user_agent:navigator.userAgent,client_platform:navigator.userAgent,client_origin:window.location.origin,resource_id:this.resourceId}}trackCustomEvents(){this.eventEmitters=["submitted","error-event"],this.eventEmitters.forEach((t=>{"function"==typeof this.componentInstance.addEventListener&&this.componentInstance.addEventListener(t,(i=>this.handleCustomEvent({event_type:t,data:Object.assign(Object.assign({},this.basicData),{error:i.detail})})))}))}setupLifecycleTracking(){const t=this.componentInstance.componentDidLoad;this.componentInstance.componentDidLoad=()=>{if(this.service.record({event_type:"init",data:this.basicData}),t)return t.apply(this.componentInstance)}}cleanup(){this.eventEmitters.forEach((t=>{this.componentInstance.removeEventListener(t,this.handleCustomEvent)}))}}export{r as J}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as r}from"./p-fad19d75.js";import{c as a}from"./p-5a62fca2.js";import{J as i}from"./p-
|
|
1
|
+
import{r as e,c as t,h as r}from"./p-fad19d75.js";import{c as a}from"./p-5a62fca2.js";import{J as i}from"./p-9e7204b5.js";import"./p-22e38d5b.js";import"./p-0e180654.js";const o=class{constructor(r){e(this,r),this.cardFormReady=t(this,"cardFormReady",7),this.ready=t(this,"ready",7),this.cardFormTokenized=t(this,"cardFormTokenize",7),this.cardFormValidated=t(this,"cardFormValidate",7),this.validationMode=void 0,this.iframeOrigin=a.iframeOrigin,this.singleLine=!1,this.internalStyleOverrides=void 0}readyHandler(e){console.warn("The 'cardFormReady' event is deprecated in the next major release and will be renamed to 'ready'"),this.cardFormReady.emit(e),this.ready.emit(e)}tokenizeHandler(e){console.warn("The 'cardFormTokenize' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.cardFormTokenized.emit(e)}validateHandler(e){console.warn("The 'cardFormValidate' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.cardFormValidated.emit(e)}componentWillLoad(){this.analytics=new i(this)}disconnectedCallback(){this.analytics.cleanup()}async tokenize(...e){if(!this.childRef)throw new Error("Cannot call tokenize");return this.childRef.tokenize(...e)}async validate(){if(!this.childRef)throw new Error("Cannot call validate");return this.childRef.validate()}async resize(){if(console.warn("The 'resize' method is deprecated and will be removed in the next major release. Please refer to the documentation for the migration process and alternative approach."),!this.childRef)throw new Error("Cannot call validate");return this.childRef.resize()}render(){return r("justifi-payment-method-form",{key:"e31d3c703e1a0c3778ddeb88d118ea3ef88d0adf",ref:e=>{e&&(this.childRef=e)},"iframe-origin":this.iframeOrigin,"payment-method-form-type":"card","single-line":this.singleLine,"payment-method-form-ready":this.cardFormReady,"payment-method-form-validate":this.cardFormValidated,"payment-method-form-tokenize":this.cardFormTokenized,"payment-method-form-validation-mode":this.validationMode||"onSubmit"})}};export{o as justifi_card_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as t,h as r}from"./p-fad19d75.js";import{c as o}from"./p-5a62fca2.js";import{A as e}from"./p-0e180654.js";import{C as i,a}from"./p-14c91ffd.js";import{g as n,a as h}from"./p-8115b2f4.js";import{E as c}from"./p-a8b4f429.js";import{J as p}from"./p-
|
|
1
|
+
import{r as s,c as t,h as r}from"./p-fad19d75.js";import{c as o}from"./p-5a62fca2.js";import{A as e}from"./p-0e180654.js";import{C as i,a}from"./p-14c91ffd.js";import{g as n,a as h}from"./p-8115b2f4.js";import{E as c}from"./p-a8b4f429.js";import{J as p}from"./p-9e7204b5.js";import{c as d}from"./p-b459d0b0.js";import"./p-22e38d5b.js";class m{async fetchGrossVolumeChartData(s,t){return e({authToken:t,apiOrigin:o.proxyApiOrigin}).get(`account/${s}/reports/gross_volume`)}}const u=class{constructor(r){s(this,r),this.errorEvent=t(this,"error-event",7),this.handleErrorEvent=s=>{this.errorMessage=s.detail.message,this.errorEvent.emit(s.detail)},this.accountId=void 0,this.authToken=void 0,this.getGrossPayment=void 0,this.errorMessage=null}componentWillLoad(){d(),this.analytics=new p(this),this.initializeGetGrossPayment()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetGrossPayment()}initializeGetGrossPayment(){this.accountId&&this.authToken?this.getGrossPayment=(({id:s,authToken:t,service:r})=>async({onSuccess:o,onError:e})=>{var a;try{const c=await r.fetchGrossVolumeChartData(s,t);c.error?e({error:n(c.error),code:h(null===(a=c.error)||void 0===a?void 0:a.code),severity:i.ERROR}):o(c.data)}catch(s){const t=h(null==s?void 0:s.code);e({error:n(s),code:t,severity:i.ERROR})}})({id:this.accountId,authToken:this.authToken,service:new m}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:a.MISSING_PROPS,message:this.errorMessage,severity:i.ERROR}))}render(){return this.errorMessage?c(this.errorMessage):r("gross-payment-chart-core",{getGrossPayment:this.getGrossPayment,"onError-event":this.handleErrorEvent})}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{u as justifi_gross_payment_chart}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t}from"./p-
|
|
1
|
+
import{p as t}from"./p-22e38d5b.js";const s=async()=>{const s=t.version,a=t.name,e=await(async t=>{const s=await fetch("https://registry.npmjs.org/"+t+"/latest");return(await s.json()).version})(a),o=e.replace(/-rc.*/,""),c=s.split("."),r=e.split(".");c[0]!==r[0]&&console.warn(`The package ${a} is out of date. The latest version is ${o}. Please update.`)};export{s as c}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e,c as t,h as a}from"./p-fad19d75.js";import{c as o}from"./p-5a62fca2.js";import{J as r}from"./p-
|
|
1
|
+
import{r as e,c as t,h as a}from"./p-fad19d75.js";import{c as o}from"./p-5a62fca2.js";import{J as r}from"./p-9e7204b5.js";import"./p-22e38d5b.js";import"./p-0e180654.js";const i=class{constructor(a){e(this,a),this.bankAccountFormReady=t(this,"bankAccountFormReady",7),this.ready=t(this,"ready",7),this.bankAccountFormTokenized=t(this,"bankAccountFormTokenize",7),this.bankAccountFormValidated=t(this,"bankAccountFormValidate",7),this.validationMode=void 0,this.iframeOrigin=o.iframeOrigin,this.internalStyleOverrides=void 0}readyHandler(e){console.warn("The 'bankAccountFormReady' event is deprecated in the next major release and will be renamed to 'ready'"),this.bankAccountFormReady.emit(e),this.ready.emit(e)}tokenizeHandler(e){console.warn("The 'bankAccountFormTokenized' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.bankAccountFormTokenized.emit(e)}validateHandler(e){console.warn("The 'bankAccountFormValidate' event is deprecated in the next major release. Please refer to the documentation for the migration process and alternative approach. This method will be removed in the future."),this.bankAccountFormValidated.emit(e)}componentWillLoad(){this.analytics=new r(this)}disconnectedCallback(){this.analytics.cleanup()}async tokenize(...e){if(!this.childRef)throw new Error("Cannot call tokenize");return this.childRef.tokenize(...e)}async validate(){if(!this.childRef)throw new Error("Cannot call validate");return this.childRef.validate()}async resize(){if(console.warn("The 'resize' method is deprecated and will be removed in the next major release. Please refer to the documentation for the migration process and alternative approach."),!this.childRef)throw new Error("Cannot call validate");return this.childRef.resize()}render(){return a("justifi-payment-method-form",{key:"e2fa64d199a6c550329c9797a6951335e7c12bc6",ref:e=>{e&&(this.childRef=e)},"iframe-origin":this.iframeOrigin,"payment-method-form-type":"bankAccount","payment-method-form-ready":this.bankAccountFormReady,"payment-method-form-validated":this.bankAccountFormValidated,"payment-method-form-tokenize":this.bankAccountFormTokenized,"payment-method-form-validation-mode":this.validationMode||"onSubmit"})}};export{i as justifi_bank_account_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,c as i,h as t,H as r}from"./p-fad19d75.js";import{E as e}from"./p-a8b4f429.js";import{B as o}from"./p-f6f8dabc.js";import{B as a}from"./p-5e7c60d8.js";import{C as n,a as
|
|
1
|
+
import{r as s,c as i,h as t,H as r}from"./p-fad19d75.js";import{E as e}from"./p-a8b4f429.js";import{B as o}from"./p-f6f8dabc.js";import{B as a}from"./p-5e7c60d8.js";import{C as n,a as d}from"./p-14c91ffd.js";import{g as p,a as c}from"./p-8115b2f4.js";import{J as h}from"./p-9e7204b5.js";import{c as m}from"./p-b459d0b0.js";import"./p-5a62fca2.js";import"./p-0e180654.js";import"./p-1ff8810b.js";import"./p-6078a370.js";import"./p-22e38d5b.js";const f=class{constructor(t){s(this,t),this.errorEvent=i(this,"error-event",7),this.businessId=void 0,this.authToken=void 0,this.errorMessage=void 0,this.getBusiness=void 0}componentWillLoad(){m(),this.analytics=new h(this),this.initializeGetBusiness()}disconnectedCallback(){this.analytics.cleanup()}initializeGetBusiness(){if(!this.businessId||!this.authToken)return this.errorMessage="Invalid business id or auth token",void this.errorEvent.emit({errorCode:d.MISSING_PROPS,message:this.errorMessage,severity:n.ERROR});this.getBusiness=(({id:s,authToken:i,service:t})=>async({onSuccess:r,onError:e})=>{var o;try{const d=await t.fetchBusiness(s,i);if(d.error)return e({error:p(d.error),code:c(null===(o=d.error)||void 0===o?void 0:o.code),severity:n.ERROR});r({business:new a(d.data)})}catch(s){const i=c(null==s?void 0:s.code);return e({error:s.message||s,code:i,severity:n.ERROR})}})({id:this.businessId,authToken:this.authToken,service:new o})}render(){return t(r,null,this.errorMessage?e(this.errorMessage):t("business-details-core",{getBusiness:this.getBusiness}))}};export{f as justifi_business_details}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as
|
|
1
|
+
import{r as t,c as i,h as a}from"./p-fad19d75.js";import{B as s}from"./p-9c9c7dac.js";import{S as e}from"./p-74da98da.js";import{C as o}from"./p-14c91ffd.js";import{c as d}from"./p-b459d0b0.js";import{J as r}from"./p-9e7204b5.js";import"./p-22e38d5b.js";import"./p-5a62fca2.js";import"./p-0e180654.js";const c=class{constructor(a){t(this,a),this.submitted=i(this,"submitted",7),this.errorEvent=i(this,"error-event",7),this.authToken=void 0,this.accountId=void 0,this.paymentMethodGroupId=void 0,this.isLoading=!0,this.submitButtonText=void 0,this.disableCreditCard=void 0,this.disableBankAccount=void 0}componentWillLoad(){d(),this.analytics=new r(this),this.isLoading=!1}async tokenizePaymentMethod(t){t&&t.preventDefault();const i=await this.paymentMethodOptionsRef.resolvePaymentMethod({isValid:!0});i.error?this.errorEvent.emit({errorCode:i.error.code,message:i.error.message,severity:o.ERROR}):i.token&&this.submitted.emit({token:i.token})}async fillBillingForm(t){this.paymentMethodOptionsRef.fillBillingForm(t)}render(){return a(e,{key:"d6b961d57ad40a36a55db9f4a338f2e4659737b8"},a("form",{key:"478202bc0e742f132df696e317a5d87b583a65c3"},a("fieldset",{key:"565295af010636d9746c5a3466ce6b3bf4fe5ba2"},a("div",{key:"95736fa3b125f6c389e80505842749d40eb50318",class:"row gy-3"},a("div",{key:"086f7078ab5301c59ea3a1003162ebf82907b594",class:"col-12"},a("justifi-payment-method-options",{key:"13d99aee101cd0dc9cdf52abf3e510a8ee490e82",ref:t=>this.paymentMethodOptionsRef=t,"show-card":!this.disableCreditCard,"show-ach":!this.disableBankAccount,"show-bnpl":!1,paymentMethodGroupId:this.paymentMethodGroupId,"show-saved-payment-methods":!1,authToken:this.authToken,"account-id":this.accountId})),a("div",{key:"348afe48dbcb996b268bf9e6416f25540f9b2930",class:"col-12"},a(s,{key:"00baa2bd2b99a9a8329b9abaace0afac36ae094a",variant:"primary",type:"submit",onClick:t=>this.tokenizePaymentMethod(t),isLoading:this.isLoading,"data-testid":"submit-button"},this.submitButtonText||"Submit"))))))}};c.style=":host{display:block}justifi-payment-method-form{display:block;margin-left:calc(var(--jfi-layout-padding) * -1);margin-right:calc(var(--jfi-layout-padding) * -1)}";export{c as justifi_tokenize_payment_method}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-fad19d75.js";export{s as setNonce}from"./p-fad19d75.js";import{g as a}from"./p-e1255160.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t(JSON.parse('[["p-d5cd727b",[[0,"justifi-payment-provisioning",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"allowOptionalFields":[4,"allow-optional-fields"],"formTitle":[1,"form-title"],"postProvisioning":[32],"getBusiness":[32]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}]]],["p-eb9ba917",[[1,"justifi-dispute-management"]]],["p-c4df0098",[[1,"justifi-business-form",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"hideErrors":[4,"hide-errors"],"formTitle":[1,"form-title"],"removeTitle":[4,"remove-title"],"isLoading":[32],"errorMessage":[32]}]]],["p-8f26db63",[[4,"justifi-checkout",{"iframeOrigin":[1,"iframe-origin"],"authToken":[1,"auth-token"],"checkoutId":[1,"checkout-id"],"disableCreditCard":[4,"disable-credit-card"],"disableBankAccount":[4,"disable-bank-account"],"disableBnpl":[4,"disable-bnpl"],"disablePaymentMethodGroup":[4,"disable-payment-method-group"],"getCheckout":[32],"complete":[32],"errorMessage":[32],"fillBillingForm":[64]},null,{"authToken":["propChanged"],"checkoutId":["propChanged"]}]]],["p-366c49b6",[[1,"justifi-tokenize-payment-method",{"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"paymentMethodGroupId":[1,"payment-method-group-id"],"isLoading":[4,"is-loading"],"submitButtonText":[1,"submit-button-text"],"disableCreditCard":[4,"disable-credit-card"],"disableBankAccount":[4,"disable-bank-account"],"tokenizePaymentMethod":[64],"fillBillingForm":[64]}]]],["p-e07d5e0f",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"apiOrigin":[1,"api-origin"],"getPayments":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-4422ca71",[[1,"justifi-terminals-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"apiOrigin":[1,"api-origin"],"columns":[1],"getTerminals":[32],"getSubAccounts":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-1c44712a",[[1,"justifi-checkouts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"apiOrigin":[1,"api-origin"],"columns":[1],"getCheckouts":[32],"getSubAccounts":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-5f10b3e9",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"email":[1],"clientId":[1,"client-id"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"submitButtonText":[1,"submit-button-text"],"submitButtonEnabled":[32],"isLoading":[32],"selectedPaymentMethodType":[32],"fillBillingForm":[64],"enableSubmitButton":[64],"disableSubmitButton":[64]}]]],["p-bfb990fc",[[0,"business-details-core",{"getBusiness":[16],"business":[32],"renderState":[32],"errorMessage":[32]}]]],["p-16fc16aa",[[1,"justifi-business-details",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"errorMessage":[32],"getBusiness":[32]}]]],["p-c717646f",[[0,"payouts-list-core",{"getPayouts":[16],"getPayoutCSV":[16],"payouts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getPayouts":["updateOnPropChange"]}]]],["p-088826fe",[[1,"justifi-payouts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getPayouts":[32],"getPayoutCSV":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-ccbff4fa",[[0,"form-control-help-text",{"helpText":[1,"help-text"],"name":[1]}]]],["p-869ae0c7",[[1,"justifi-refund-form",{"authToken":[1,"auth-token"],"paymentId":[1,"payment-id"],"amount":[2],"submitButtonText":[1,"submit-button-text"],"withButton":[4,"with-button"],"refundInfoText":[1,"refund-info-text"],"errors":[32],"isSubmitting":[32]}]]],["p-efb56234",[[0,"form-control-number",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-919e6e67",[[0,"payments-list-core",{"getPayments":[16],"payments":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getPayments":["updateOnPropChange"]}]]],["p-bba131f9",[[0,"terminals-list-core",{"getTerminals":[16],"getSubAccounts":[16],"columns":[1],"terminals":[32],"terminalsTable":[32],"subAccounts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getTerminals":["updateOnPropChange"],"getSubAccounts":["updateOnPropChange"],"columns":["updateOnPropChange"]}]]],["p-6caf6f09",[[0,"payment-details-core",{"getPaymentDetails":[16],"payment":[32],"loading":[32],"errorMessage":[32]},null,{"getPaymentDetails":["updateOnPropChange"]}]]],["p-84987cd4",[[1,"justifi-payment-details",{"paymentId":[1,"payment-id"],"authToken":[1,"auth-token"],"getPaymentDetails":[32],"errorMessage":[32]},null,{"paymentId":["propChanged"],"authToken":["propChanged"]}]]],["p-eee24bb2",[[1,"justifi-payout-details",{"payoutId":[1,"payout-id"],"authToken":[1,"auth-token"],"getPayout":[32],"getPayoutCSV":[32],"errorMessage":[32]},null,{"payoutId":["propChanged"],"authToken":["propChanged"]}]]],["p-0eb0d813",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenized","tokenizeHandler"],[0,"paymentMethodFormValidated","validateHandler"]]]]],["p-c8b2f11d",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenized","tokenizeHandler"],[0,"paymentMethodFormValidated","validateHandler"]]]]],["p-3fbbdbba",[[1,"justifi-gross-payment-chart",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getGrossPayment":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-32a782c8",[[1,"justifi-season-interruption-insurance",{"authToken":[1,"auth-token"],"checkoutId":[1,"checkout-id"],"primaryIdentityFirstName":[1,"primary-identity-first-name"],"primaryIdentityLastName":[1,"primary-identity-last-name"],"primaryIdentityState":[1,"primary-identity-state"],"primaryIdentityPostalCode":[1,"primary-identity-postal-code"],"primaryIdentityCountry":[1,"primary-identity-country"],"primaryIdentityEmailAddress":[1,"primary-identity-email-address"],"policyAttributesInsurableAmount":[2,"policy-attributes-insurable-amount"],"policyAttributesStartDate":[1,"policy-attributes-start-date"],"policyAttributesEndDate":[1,"policy-attributes-end-date"],"coveredIdentityFirstName":[1,"covered-identity-first-name"],"coveredIdentityLastName":[1,"covered-identity-last-name"],"getQuote":[32],"toggleCoverage":[32],"quote":[32],"validate":[64]}]]],["p-e69b2ff8",[[0,"form-control-error-text",{"errorText":[1,"error-text"],"name":[1]}]]],["p-8f212554",[[0,"form-control-select",{"name":[8],"label":[1],"options":[16],"inputHandler":[16],"defaultValue":[1,"default-value"],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"form-control-text",{"name":[8],"label":[1],"inputHandler":[16],"defaultValue":[1,"default-value"],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"maxLength":[2,"max-length"],"keyDownHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"form-control-tooltip",{"helpText":[1,"help-text"],"anchorIcon":[32],"tooltip":[32]},[[0,"showEvent","show"],[0,"hideEvent","hide"]]],[4,"custom-popper",{"placement":[1],"offset":[16],"strategy":[1],"trigger":[1],"anchorRef":[16],"isOpen":[32]}]]],["p-638c6285",[[0,"form-control-file",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"multiple":[4],"documentType":[1,"document-type"],"inputHandler":[16],"disabled":[4],"files":[32],"fileString":[32]}]]],["p-e6be8845",[[0,"form-control-date",{"name":[1],"label":[1],"inputHandler":[16],"defaultValue":[1,"default-value"],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"disabled":[4],"filterTimeZone":[4,"filter-time-zone"],"showTime":[4,"show-time"],"maxDate":[1,"max-date"]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-ffe27126",[[1,"justifi-payment-provisioning-core",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"allowOptionalFields":[4,"allow-optional-fields"],"formTitle":[1,"form-title"],"getBusiness":[16],"postProvisioning":[16],"loading":[32],"businessProvisioned":[32],"currentStep":[32],"errorMessage":[32]},[[0,"formLoading","handleFormLoading"]]]]],["p-e412a713",[[0,"justifi-dispute-management-core",{"showCounterDispute":[32]},[[0,"clickEvent","counterDisputeHandler"]]]]],["p-c30c8f39",[[1,"justifi-checkout-core",{"iframeOrigin":[1025,"iframe-origin"],"authToken":[1,"auth-token"],"getCheckout":[16],"complete":[16],"checkoutId":[1,"checkout-id"],"disableCreditCard":[4,"disable-credit-card"],"disableBankAccount":[4,"disable-bank-account"],"disableBnpl":[4,"disable-bnpl"],"disablePaymentMethodGroup":[4,"disable-payment-method-group"],"hasLoadedFonts":[32],"checkout":[32],"serverError":[32],"renderState":[32],"creatingNewPaymentMethod":[32],"insuranceToggled":[32],"fillBillingForm":[64]}]]],["p-1ab798f4",[[0,"checkouts-list-core",{"getCheckouts":[16],"getSubAccounts":[16],"columns":[1],"checkouts":[32],"checkoutsTable":[32],"subAccounts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getCheckouts":["updateOnPropChange"],"getSubAccounts":["updateOnPropChange"],"columns":["updateOnPropChange"]}]]],["p-4b14abbf",[[0,"payout-details-core",{"getPayout":[16],"getPayoutCSV":[16],"payout":[32],"loading":[32],"errorMessage":[32]},null,{"getPayout":["getPayoutWatcher"]}]]],["p-286a4e72",[[0,"gross-payment-chart-core",{"getGrossPayment":[16],"grossVolumeReport":[32],"loading":[32],"errorMessage":[32]},null,{"getGrossPayment":["propChanged"],"grossVolumeReport":["grossVolumeReportChanged"]}]]],["p-0de9e97b",[[0,"justifi-payment-method-selector",{"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["p-eeb70281",[[1,"justifi-season-interruption-insurance-core",{"checkoutId":[1,"checkout-id"],"getQuote":[16],"toggleCoverage":[16],"primaryIdentityFirstName":[1,"primary-identity-first-name"],"primaryIdentityLastName":[1,"primary-identity-last-name"],"primaryIdentityState":[1,"primary-identity-state"],"primaryIdentityPostalCode":[1,"primary-identity-postal-code"],"primaryIdentityCountry":[1,"primary-identity-country"],"primaryIdentityEmailAddress":[1,"primary-identity-email-address"],"policyAttributesInsurableAmount":[2,"policy-attributes-insurable-amount"],"policyAttributesStartDate":[1,"policy-attributes-start-date"],"policyAttributesEndDate":[1,"policy-attributes-end-date"],"coveredIdentityFirstName":[1,"covered-identity-first-name"],"coveredIdentityLastName":[1,"covered-identity-last-name"],"quote":[32],"isLoading":[32],"accepted":[32],"validate":[64]}]]],["p-e8797be0",[[0,"payments-list-filters",{"params":[16],"setParamsOnChange":[16],"clearParams":[16]}]]],["p-935188c8",[[0,"terminals-list-filters",{"params":[16],"setParamsOnChange":[16],"clearParams":[16]}]]],["p-56d84fb3",[[0,"checkouts-list-filters",{"params":[16],"setParamsOnChange":[16],"clearParams":[16]}]]],["p-ad443df5",[[0,"form-control-radio",{"label":[1],"name":[8],"value":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultChecked":[4,"default-checked"],"inputHandler":[16],"disabled":[4]},null,{"defaultChecked":["handleDefaultValueChange"]}]]],["p-d2eb61e6",[[1,"justifi-details",{"errorMessage":[1,"error-message"]}]]],["p-a3143d62",[[0,"justifi-identity-address-form",{"handleFormUpdate":[16],"errors":[8],"defaultValues":[8,"default-values"],"address":[32]},null,{"address":["handleAddressChange"]}],[0,"form-control-number-masked",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"mask":[1],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-72819173",[[0,"justifi-business-representative",{"formController":[16],"errors":[32],"representative":[32]}],[0,"justifi-additional-questions",{"formController":[16],"errors":[32],"additional_questions":[32]}],[0,"justifi-business-core-info",{"formController":[16],"errors":[32],"coreInfo":[32]}],[0,"justifi-legal-address-form",{"formController":[16],"errors":[32],"legal_address":[32]}],[0,"form-alert",{"text":[1],"hideAlert":[4,"hide-alert"]}]]],["p-c1bf9285",[[0,"justifi-business-representative-form-inputs",{"representativeDefaultValue":[8,"representative-default-value"],"errors":[8],"formController":[16]}]]],["p-927a147c",[[0,"form-control-monetary",{"label":[1],"name":[1],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"maskOptions":[8,"mask-options"],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-0f7b9555",[[0,"pagination-menu",{"paging":[16],"params":[16]}]]],["p-8ec550d7",[[4,"table-filters-menu",{"params":[8],"clearParams":[16],"anchorButton":[32],"menu":[32],"showClearButton":[32]},[[0,"showEvent","show"],[0,"hideEvent","hide"]],{"params":["watchParamsHandler"]}]]],["p-cd7e866c",[[0,"form-control-textarea",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"maxLength":[2,"max-length"],"inputHandler":[16],"keyDownHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-2c8c214f",[[0,"additional-questions-details",{"additionalQuestions":[16]}],[0,"generic-info-details",{"business":[16]}],[0,"legal-address-details",{"legalAddress":[16]}],[0,"owner-details",{"owners":[16]}],[0,"representative-details",{"representative":[16]}]]],["p-18afa159",[[1,"justifi-billing-form",{"legend":[1025],"formController":[32],"billingInfo":[32],"errors":[32],"getValues":[64],"fill":[64],"validate":[64]}],[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"resize":[64],"tokenize":[64],"validate":[64]}]]],["p-11ff46df",[[0,"justifi-owner-form",{"authToken":[1,"auth-token"],"ownerId":[1,"owner-id"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"removeOwner":[16],"newFormOpen":[4,"new-form-open"],"ownersLength":[2,"owners-length"],"getOwner":[32],"patchOwner":[32],"postOwner":[32],"validate":[64],"submit":[64],"validateAndSubmit":[64]}],[0,"owner-form-core",{"ownerId":[1,"owner-id"],"businessId":[1,"business-id"],"getOwner":[16],"patchOwner":[16],"postOwner":[16],"allowOptionalFields":[4,"allow-optional-fields"],"removeOwner":[16],"newFormOpen":[4,"new-form-open"],"ownersLength":[2,"owners-length"],"isLoading":[32],"formController":[32],"errors":[32],"owner":[32],"returnOwnerData":[64],"validate":[64],"submit":[64],"validateAndSubmit":[64]},null,{"isLoading":["loadingWatcher"]}],[0,"owner-form-inputs",{"ownerDefaultValue":[8,"owner-default-value"],"errors":[8],"formController":[16]}]]],["p-8480e3ab",[[0,"justifi-payment-method-options",{"showCard":[4,"show-card"],"showAch":[4,"show-ach"],"showBnpl":[4,"show-bnpl"],"showSavedPaymentMethods":[4,"show-saved-payment-methods"],"paymentMethodGroupId":[1,"payment-method-group-id"],"bnpl":[16],"insuranceToggled":[4,"insurance-toggled"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"iframeOrigin":[1025,"iframe-origin"],"savedPaymentMethods":[16],"paymentAmount":[2,"payment-amount"],"selectedPaymentMethodId":[32],"paymentMethodOptions":[32],"fillBillingForm":[64],"resolvePaymentMethod":[64]},[[0,"paymentMethodOptionSelected","paymentMethodOptionSelected"]],{"savedPaymentMethods":["paymentMethodsChanged"]}],[0,"justifi-new-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"paymentMethodOption":[16],"paymentMethodGroupId":[1,"payment-method-group-id"],"isSelected":[4,"is-selected"],"saveNewPaymentMethodChecked":[32],"fillBillingForm":[64],"resolvePaymentMethod":[64]},[[0,"checkboxChanged","handleCheckboxChanged"]]],[0,"justifi-saved-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"paymentMethodOption":[16],"isSelected":[4,"is-selected"],"resolvePaymentMethod":[64]}],[0,"justifi-sezzle-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"bnpl":[8],"clientId":[1,"client-id"],"accountId":[1,"account-id"],"paymentMethodOption":[16],"isSelected":[4,"is-selected"],"paymentAmount":[2,"payment-amount"],"installmentPlan":[32],"sezzleCheckout":[32],"sezzlePromise":[32],"resolvePaymentMethod":[64]}],[0,"justifi-save-new-payment-method",{"isChecked":[32]}]]],["p-69ea7334",[[0,"justifi-business-owners-form-step-core",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"ownersPayload":[32],"refs":[32],"newFormOpen":[32],"validateAndSubmit":[64]},[[0,"ownerSubmitted","handleOwnerSubmit"]],{"ownersPayload":["ownersWatcher"]}],[0,"justifi-business-representative-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"representative":[32],"validateAndSubmit":[64]}],[0,"justifi-additional-questions-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"additional_questions":[32],"recurringPayments":[32],"validateAndSubmit":[64]},null,{"additional_questions":["recurringPaymentsWatcher"]}],[0,"justifi-business-core-info-form-step-core",{"businessId":[1,"business-id"],"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"coreInfo":[32],"validateAndSubmit":[64]}],[0,"justifi-legal-address-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"legal_address":[32],"validateAndSubmit":[64]}],[0,"justifi-business-document-upload-input-group",{"paymentVolume":[1,"payment-volume"],"inputHandler":[16],"storeFiles":[16],"errors":[8]}],[0,"form-control-checkbox",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[4,"default-value"],"inputHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"justifi-business-documents-on-file",{"documents":[8]}],[0,"justifi-business-terms-conditions-text"]]],["p-4c0c88e4",[[0,"justifi-payment-provisioning-form-steps",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"refs":[16],"currentStep":[2,"current-step"],"allowOptionalFields":[4,"allow-optional-fields"],"handleFormLoading":[16]}],[0,"justifi-payment-provisioning-form-buttons",{"currentStep":[2,"current-step"],"totalSteps":[2,"total-steps"],"formLoading":[4,"form-loading"],"formDisabled":[4,"form-disabled"],"previousStepButtonOnClick":[16],"nextStepButtonOnClick":[16]}],[0,"justifi-business-owners-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-representative-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-additional-questions-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-core-info-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-document-upload-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"existingDocuments":[32],"paymentVolume":[32],"business":[32],"documentData":[32],"renderState":[32],"validateAndSubmit":[64]}],[0,"justifi-legal-address-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-bank-account-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"bankAccount":[32],"validateAndSubmit":[64]}],[0,"justifi-business-terms-conditions-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"acceptedTermsBefore":[32],"validateAndSubmit":[64]}]]],["p-269ba6fe",[[0,"justifi-counter-dispute",{"currentStep":[32],"refs":[32]}],[0,"justifi-dispute-notification"],[0,"justifi-shipping-details"],[0,"justifi-customer-details"],[0,"justifi-duplicate-charge"],[0,"justifi-additional-statement"],[0,"justifi-cancellation-policy"],[0,"justifi-electronic-evidence"],[0,"justifi-refund-policy"],[0,"justifi-product-or-service",{"productOrService":[32]}],[0,"justifi-dispute-reason"]]]]'),e))));
|
|
1
|
+
import{p as e,b as t}from"./p-fad19d75.js";export{s as setNonce}from"./p-fad19d75.js";import{g as a}from"./p-e1255160.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((async e=>(await a(),t(JSON.parse('[["p-0c03a971",[[0,"justifi-payment-provisioning",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"allowOptionalFields":[4,"allow-optional-fields"],"formTitle":[1,"form-title"],"postProvisioning":[32],"getBusiness":[32]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}]]],["p-eb9ba917",[[1,"justifi-dispute-management"]]],["p-09fb7dd6",[[1,"justifi-business-form",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"hideErrors":[4,"hide-errors"],"formTitle":[1,"form-title"],"removeTitle":[4,"remove-title"],"isLoading":[32],"errorMessage":[32]}]]],["p-2a9f48f0",[[4,"justifi-checkout",{"iframeOrigin":[1,"iframe-origin"],"authToken":[1,"auth-token"],"checkoutId":[1,"checkout-id"],"disableCreditCard":[4,"disable-credit-card"],"disableBankAccount":[4,"disable-bank-account"],"disableBnpl":[4,"disable-bnpl"],"disablePaymentMethodGroup":[4,"disable-payment-method-group"],"getCheckout":[32],"complete":[32],"errorMessage":[32],"fillBillingForm":[64]},null,{"authToken":["propChanged"],"checkoutId":["propChanged"]}]]],["p-f45197b9",[[1,"justifi-tokenize-payment-method",{"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"paymentMethodGroupId":[1,"payment-method-group-id"],"isLoading":[4,"is-loading"],"submitButtonText":[1,"submit-button-text"],"disableCreditCard":[4,"disable-credit-card"],"disableBankAccount":[4,"disable-bank-account"],"tokenizePaymentMethod":[64],"fillBillingForm":[64]}]]],["p-1251a3f5",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"apiOrigin":[1,"api-origin"],"getPayments":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-44f7f729",[[1,"justifi-terminals-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"apiOrigin":[1,"api-origin"],"columns":[1],"getTerminals":[32],"getSubAccounts":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-3f82f724",[[1,"justifi-checkouts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"apiOrigin":[1,"api-origin"],"columns":[1],"getCheckouts":[32],"getSubAccounts":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-2dc7751f",[[1,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"email":[1],"clientId":[1,"client-id"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"submitButtonText":[1,"submit-button-text"],"submitButtonEnabled":[32],"isLoading":[32],"selectedPaymentMethodType":[32],"fillBillingForm":[64],"enableSubmitButton":[64],"disableSubmitButton":[64]}]]],["p-bfb990fc",[[0,"business-details-core",{"getBusiness":[16],"business":[32],"renderState":[32],"errorMessage":[32]}]]],["p-eed325b7",[[1,"justifi-business-details",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"errorMessage":[32],"getBusiness":[32]}]]],["p-c717646f",[[0,"payouts-list-core",{"getPayouts":[16],"getPayoutCSV":[16],"payouts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getPayouts":["updateOnPropChange"]}]]],["p-0ec27543",[[1,"justifi-payouts-list",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getPayouts":[32],"getPayoutCSV":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-ccbff4fa",[[0,"form-control-help-text",{"helpText":[1,"help-text"],"name":[1]}]]],["p-869ae0c7",[[1,"justifi-refund-form",{"authToken":[1,"auth-token"],"paymentId":[1,"payment-id"],"amount":[2],"submitButtonText":[1,"submit-button-text"],"withButton":[4,"with-button"],"refundInfoText":[1,"refund-info-text"],"errors":[32],"isSubmitting":[32]}]]],["p-efb56234",[[0,"form-control-number",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-919e6e67",[[0,"payments-list-core",{"getPayments":[16],"payments":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getPayments":["updateOnPropChange"]}]]],["p-bba131f9",[[0,"terminals-list-core",{"getTerminals":[16],"getSubAccounts":[16],"columns":[1],"terminals":[32],"terminalsTable":[32],"subAccounts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getTerminals":["updateOnPropChange"],"getSubAccounts":["updateOnPropChange"],"columns":["updateOnPropChange"]}]]],["p-6caf6f09",[[0,"payment-details-core",{"getPaymentDetails":[16],"payment":[32],"loading":[32],"errorMessage":[32]},null,{"getPaymentDetails":["updateOnPropChange"]}]]],["p-92a766d8",[[1,"justifi-payment-details",{"paymentId":[1,"payment-id"],"authToken":[1,"auth-token"],"getPaymentDetails":[32],"errorMessage":[32]},null,{"paymentId":["propChanged"],"authToken":["propChanged"]}]]],["p-8e2e24d8",[[1,"justifi-payout-details",{"payoutId":[1,"payout-id"],"authToken":[1,"auth-token"],"getPayout":[32],"getPayoutCSV":[32],"errorMessage":[32]},null,{"payoutId":["propChanged"],"authToken":["propChanged"]}]]],["p-c458fc48",[[0,"justifi-bank-account-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenized","tokenizeHandler"],[0,"paymentMethodFormValidated","validateHandler"]]]]],["p-9ef4d294",[[0,"justifi-card-form",{"validationMode":[1025,"validation-mode"],"iframeOrigin":[1025,"iframe-origin"],"singleLine":[4,"single-line"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64],"resize":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenized","tokenizeHandler"],[0,"paymentMethodFormValidated","validateHandler"]]]]],["p-a91a2152",[[1,"justifi-gross-payment-chart",{"accountId":[1,"account-id"],"authToken":[1,"auth-token"],"getGrossPayment":[32],"errorMessage":[32]},null,{"accountId":["propChanged"],"authToken":["propChanged"]}]]],["p-5fd72c29",[[1,"justifi-season-interruption-insurance",{"authToken":[1,"auth-token"],"checkoutId":[1,"checkout-id"],"primaryIdentityFirstName":[1,"primary-identity-first-name"],"primaryIdentityLastName":[1,"primary-identity-last-name"],"primaryIdentityState":[1,"primary-identity-state"],"primaryIdentityPostalCode":[1,"primary-identity-postal-code"],"primaryIdentityCountry":[1,"primary-identity-country"],"primaryIdentityEmailAddress":[1,"primary-identity-email-address"],"policyAttributesInsurableAmount":[2,"policy-attributes-insurable-amount"],"policyAttributesStartDate":[1,"policy-attributes-start-date"],"policyAttributesEndDate":[1,"policy-attributes-end-date"],"coveredIdentityFirstName":[1,"covered-identity-first-name"],"coveredIdentityLastName":[1,"covered-identity-last-name"],"getQuote":[32],"toggleCoverage":[32],"quote":[32],"validate":[64]}]]],["p-e69b2ff8",[[0,"form-control-error-text",{"errorText":[1,"error-text"],"name":[1]}]]],["p-8f212554",[[0,"form-control-select",{"name":[8],"label":[1],"options":[16],"inputHandler":[16],"defaultValue":[1,"default-value"],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"form-control-text",{"name":[8],"label":[1],"inputHandler":[16],"defaultValue":[1,"default-value"],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"maxLength":[2,"max-length"],"keyDownHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"form-control-tooltip",{"helpText":[1,"help-text"],"anchorIcon":[32],"tooltip":[32]},[[0,"showEvent","show"],[0,"hideEvent","hide"]]],[4,"custom-popper",{"placement":[1],"offset":[16],"strategy":[1],"trigger":[1],"anchorRef":[16],"isOpen":[32]}]]],["p-638c6285",[[0,"form-control-file",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"multiple":[4],"documentType":[1,"document-type"],"inputHandler":[16],"disabled":[4],"files":[32],"fileString":[32]}]]],["p-e6be8845",[[0,"form-control-date",{"name":[1],"label":[1],"inputHandler":[16],"defaultValue":[1,"default-value"],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"disabled":[4],"filterTimeZone":[4,"filter-time-zone"],"showTime":[4,"show-time"],"maxDate":[1,"max-date"]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-ffe27126",[[1,"justifi-payment-provisioning-core",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"allowOptionalFields":[4,"allow-optional-fields"],"formTitle":[1,"form-title"],"getBusiness":[16],"postProvisioning":[16],"loading":[32],"businessProvisioned":[32],"currentStep":[32],"errorMessage":[32]},[[0,"formLoading","handleFormLoading"]]]]],["p-e412a713",[[0,"justifi-dispute-management-core",{"showCounterDispute":[32]},[[0,"clickEvent","counterDisputeHandler"]]]]],["p-c30c8f39",[[1,"justifi-checkout-core",{"iframeOrigin":[1025,"iframe-origin"],"authToken":[1,"auth-token"],"getCheckout":[16],"complete":[16],"checkoutId":[1,"checkout-id"],"disableCreditCard":[4,"disable-credit-card"],"disableBankAccount":[4,"disable-bank-account"],"disableBnpl":[4,"disable-bnpl"],"disablePaymentMethodGroup":[4,"disable-payment-method-group"],"hasLoadedFonts":[32],"checkout":[32],"serverError":[32],"renderState":[32],"creatingNewPaymentMethod":[32],"insuranceToggled":[32],"fillBillingForm":[64]}]]],["p-1ab798f4",[[0,"checkouts-list-core",{"getCheckouts":[16],"getSubAccounts":[16],"columns":[1],"checkouts":[32],"checkoutsTable":[32],"subAccounts":[32],"loading":[32],"errorMessage":[32],"paging":[32],"params":[32]},null,{"params":["updateOnPropChange"],"getCheckouts":["updateOnPropChange"],"getSubAccounts":["updateOnPropChange"],"columns":["updateOnPropChange"]}]]],["p-4b14abbf",[[0,"payout-details-core",{"getPayout":[16],"getPayoutCSV":[16],"payout":[32],"loading":[32],"errorMessage":[32]},null,{"getPayout":["getPayoutWatcher"]}]]],["p-286a4e72",[[0,"gross-payment-chart-core",{"getGrossPayment":[16],"grossVolumeReport":[32],"loading":[32],"errorMessage":[32]},null,{"getGrossPayment":["propChanged"],"grossVolumeReport":["grossVolumeReportChanged"]}]]],["p-0de9e97b",[[0,"justifi-payment-method-selector",{"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["p-eeb70281",[[1,"justifi-season-interruption-insurance-core",{"checkoutId":[1,"checkout-id"],"getQuote":[16],"toggleCoverage":[16],"primaryIdentityFirstName":[1,"primary-identity-first-name"],"primaryIdentityLastName":[1,"primary-identity-last-name"],"primaryIdentityState":[1,"primary-identity-state"],"primaryIdentityPostalCode":[1,"primary-identity-postal-code"],"primaryIdentityCountry":[1,"primary-identity-country"],"primaryIdentityEmailAddress":[1,"primary-identity-email-address"],"policyAttributesInsurableAmount":[2,"policy-attributes-insurable-amount"],"policyAttributesStartDate":[1,"policy-attributes-start-date"],"policyAttributesEndDate":[1,"policy-attributes-end-date"],"coveredIdentityFirstName":[1,"covered-identity-first-name"],"coveredIdentityLastName":[1,"covered-identity-last-name"],"quote":[32],"isLoading":[32],"accepted":[32],"validate":[64]}]]],["p-e8797be0",[[0,"payments-list-filters",{"params":[16],"setParamsOnChange":[16],"clearParams":[16]}]]],["p-935188c8",[[0,"terminals-list-filters",{"params":[16],"setParamsOnChange":[16],"clearParams":[16]}]]],["p-56d84fb3",[[0,"checkouts-list-filters",{"params":[16],"setParamsOnChange":[16],"clearParams":[16]}]]],["p-ad443df5",[[0,"form-control-radio",{"label":[1],"name":[8],"value":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultChecked":[4,"default-checked"],"inputHandler":[16],"disabled":[4]},null,{"defaultChecked":["handleDefaultValueChange"]}]]],["p-d2eb61e6",[[1,"justifi-details",{"errorMessage":[1,"error-message"]}]]],["p-a3143d62",[[0,"justifi-identity-address-form",{"handleFormUpdate":[16],"errors":[8],"defaultValues":[8,"default-values"],"address":[32]},null,{"address":["handleAddressChange"]}],[0,"form-control-number-masked",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"mask":[1],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-72819173",[[0,"justifi-business-representative",{"formController":[16],"errors":[32],"representative":[32]}],[0,"justifi-additional-questions",{"formController":[16],"errors":[32],"additional_questions":[32]}],[0,"justifi-business-core-info",{"formController":[16],"errors":[32],"coreInfo":[32]}],[0,"justifi-legal-address-form",{"formController":[16],"errors":[32],"legal_address":[32]}],[0,"form-alert",{"text":[1],"hideAlert":[4,"hide-alert"]}]]],["p-c1bf9285",[[0,"justifi-business-representative-form-inputs",{"representativeDefaultValue":[8,"representative-default-value"],"errors":[8],"formController":[16]}]]],["p-927a147c",[[0,"form-control-monetary",{"label":[1],"name":[1],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"inputHandler":[16],"maskOptions":[8,"mask-options"],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-0f7b9555",[[0,"pagination-menu",{"paging":[16],"params":[16]}]]],["p-8ec550d7",[[4,"table-filters-menu",{"params":[8],"clearParams":[16],"anchorButton":[32],"menu":[32],"showClearButton":[32]},[[0,"showEvent","show"],[0,"hideEvent","hide"]],{"params":["watchParamsHandler"]}]]],["p-cd7e866c",[[0,"form-control-textarea",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[1,"default-value"],"maxLength":[2,"max-length"],"inputHandler":[16],"keyDownHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}]]],["p-2c8c214f",[[0,"additional-questions-details",{"additionalQuestions":[16]}],[0,"generic-info-details",{"business":[16]}],[0,"legal-address-details",{"legalAddress":[16]}],[0,"owner-details",{"owners":[16]}],[0,"representative-details",{"representative":[16]}]]],["p-83b01812",[[1,"justifi-billing-form",{"legend":[1025],"formController":[32],"billingInfo":[32],"errors":[32],"getValues":[64],"fill":[64],"validate":[64]}],[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationMode":[1025,"payment-method-form-validation-mode"],"iframeOrigin":[1,"iframe-origin"],"singleLine":[4,"single-line"],"resize":[64],"tokenize":[64],"validate":[64]}]]],["p-7a8c13ba",[[0,"justifi-owner-form",{"authToken":[1,"auth-token"],"ownerId":[1,"owner-id"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"removeOwner":[16],"newFormOpen":[4,"new-form-open"],"ownersLength":[2,"owners-length"],"getOwner":[32],"patchOwner":[32],"postOwner":[32],"validate":[64],"submit":[64],"validateAndSubmit":[64]}],[0,"owner-form-core",{"ownerId":[1,"owner-id"],"businessId":[1,"business-id"],"getOwner":[16],"patchOwner":[16],"postOwner":[16],"allowOptionalFields":[4,"allow-optional-fields"],"removeOwner":[16],"newFormOpen":[4,"new-form-open"],"ownersLength":[2,"owners-length"],"isLoading":[32],"formController":[32],"errors":[32],"owner":[32],"returnOwnerData":[64],"validate":[64],"submit":[64],"validateAndSubmit":[64]},null,{"isLoading":["loadingWatcher"]}],[0,"owner-form-inputs",{"ownerDefaultValue":[8,"owner-default-value"],"errors":[8],"formController":[16]}]]],["p-8480e3ab",[[0,"justifi-payment-method-options",{"showCard":[4,"show-card"],"showAch":[4,"show-ach"],"showBnpl":[4,"show-bnpl"],"showSavedPaymentMethods":[4,"show-saved-payment-methods"],"paymentMethodGroupId":[1,"payment-method-group-id"],"bnpl":[16],"insuranceToggled":[4,"insurance-toggled"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"iframeOrigin":[1025,"iframe-origin"],"savedPaymentMethods":[16],"paymentAmount":[2,"payment-amount"],"selectedPaymentMethodId":[32],"paymentMethodOptions":[32],"fillBillingForm":[64],"resolvePaymentMethod":[64]},[[0,"paymentMethodOptionSelected","paymentMethodOptionSelected"]],{"savedPaymentMethods":["paymentMethodsChanged"]}],[0,"justifi-new-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"authToken":[1,"auth-token"],"accountId":[1,"account-id"],"paymentMethodOption":[16],"paymentMethodGroupId":[1,"payment-method-group-id"],"isSelected":[4,"is-selected"],"saveNewPaymentMethodChecked":[32],"fillBillingForm":[64],"resolvePaymentMethod":[64]},[[0,"checkboxChanged","handleCheckboxChanged"]]],[0,"justifi-saved-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"paymentMethodOption":[16],"isSelected":[4,"is-selected"],"resolvePaymentMethod":[64]}],[0,"justifi-sezzle-payment-method",{"iframeOrigin":[1025,"iframe-origin"],"bnpl":[8],"clientId":[1,"client-id"],"accountId":[1,"account-id"],"paymentMethodOption":[16],"isSelected":[4,"is-selected"],"paymentAmount":[2,"payment-amount"],"installmentPlan":[32],"sezzleCheckout":[32],"sezzlePromise":[32],"resolvePaymentMethod":[64]}],[0,"justifi-save-new-payment-method",{"isChecked":[32]}]]],["p-55f78fcc",[[0,"justifi-business-owners-form-step-core",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"ownersPayload":[32],"refs":[32],"newFormOpen":[32],"validateAndSubmit":[64]},[[0,"ownerSubmitted","handleOwnerSubmit"]],{"ownersPayload":["ownersWatcher"]}],[0,"justifi-business-representative-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"representative":[32],"validateAndSubmit":[64]}],[0,"justifi-additional-questions-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"additional_questions":[32],"recurringPayments":[32],"validateAndSubmit":[64]},null,{"additional_questions":["recurringPaymentsWatcher"]}],[0,"justifi-business-core-info-form-step-core",{"businessId":[1,"business-id"],"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"coreInfo":[32],"validateAndSubmit":[64]}],[0,"justifi-legal-address-form-step-core",{"getBusiness":[16],"patchBusiness":[16],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"legal_address":[32],"validateAndSubmit":[64]}],[0,"justifi-business-document-upload-input-group",{"paymentVolume":[1,"payment-volume"],"inputHandler":[16],"storeFiles":[16],"errors":[8]}],[0,"form-control-checkbox",{"label":[1],"name":[8],"helpText":[1,"help-text"],"errorText":[1,"error-text"],"defaultValue":[4,"default-value"],"inputHandler":[16],"disabled":[4]},null,{"defaultValue":["handleDefaultValueChange"]}],[0,"justifi-business-documents-on-file",{"documents":[8]}],[0,"justifi-business-terms-conditions-text"]]],["p-91711083",[[0,"justifi-payment-provisioning-form-steps",{"businessId":[1,"business-id"],"authToken":[1,"auth-token"],"refs":[16],"currentStep":[2,"current-step"],"allowOptionalFields":[4,"allow-optional-fields"],"handleFormLoading":[16]}],[0,"justifi-payment-provisioning-form-buttons",{"currentStep":[2,"current-step"],"totalSteps":[2,"total-steps"],"formLoading":[4,"form-loading"],"formDisabled":[4,"form-disabled"],"previousStepButtonOnClick":[16],"nextStepButtonOnClick":[16]}],[0,"justifi-business-owners-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-representative-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-additional-questions-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-core-info-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-document-upload-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"existingDocuments":[32],"paymentVolume":[32],"business":[32],"documentData":[32],"renderState":[32],"validateAndSubmit":[64]}],[0,"justifi-legal-address-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"getBusiness":[32],"patchBusiness":[32],"validateAndSubmit":[64]},null,{"authToken":["propChanged"],"businessId":["propChanged"]}],[0,"justifi-business-bank-account-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"bankAccount":[32],"validateAndSubmit":[64]}],[0,"justifi-business-terms-conditions-form-step",{"authToken":[1,"auth-token"],"businessId":[1,"business-id"],"allowOptionalFields":[4,"allow-optional-fields"],"formController":[32],"errors":[32],"acceptedTermsBefore":[32],"validateAndSubmit":[64]}]]],["p-269ba6fe",[[0,"justifi-counter-dispute",{"currentStep":[32],"refs":[32]}],[0,"justifi-dispute-notification"],[0,"justifi-shipping-details"],[0,"justifi-customer-details"],[0,"justifi-duplicate-charge"],[0,"justifi-additional-statement"],[0,"justifi-cancellation-policy"],[0,"justifi-electronic-evidence"],[0,"justifi-refund-policy"],[0,"justifi-product-or-service",{"productOrService":[32]}],[0,"justifi-dispute-reason"]]]]'),e))));
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as i}from"./p-fad19d75.js";import{C as o}from"./p-16d2932d.js";import"./p-56f6ce4c.js";import"./p-7fec2bcb.js";import"./p-9f56ad71.js";import{C as r,a as e}from"./p-14c91ffd.js";import{g as a,a as c}from"./p-8115b2f4.js";import{c as h}from"./p-74822344.js";import{c as n}from"./p-5a62fca2.js";import{J as p}from"./p-7fea661a.js";import{C as d}from"./p-2c2b57b3.js";import{m,S as f}from"./p-c5c6e61d.js";import{S as u}from"./p-74da98da.js";import{t as j}from"./p-6cc30da2.js";import{d as l}from"./p-02cf5e6f.js";import"./p-fb2005de.js";import"./p-0e180654.js";import"./p-a8f22d4d.js";const v=class{constructor(i){t(this,i),this.errorEvent=s(this,"error-event",7),this.handleErrorEvent=t=>{this.errorMessage=t.detail.message,this.errorEvent.emit(t.detail)},this.getCheckouts=void 0,this.getSubAccounts=void 0,this.errorMessage=null,this.accountId=void 0,this.authToken=void 0,this.apiOrigin=n.proxyApiOrigin,this.columns=l}componentWillLoad(){h(),this.analytics=new p(this),this.initializeGetData()}disconnectedCallback(){this.analytics.cleanup()}propChanged(){this.initializeGetData()}initializeGetData(){this.initializeGetCheckouts(),this.initializeGetSubAccounts()}initializeGetCheckouts(){this.accountId&&this.authToken?this.getCheckouts=(({accountId:t,authToken:s,service:i,apiOrigin:e})=>async({params:h,onSuccess:n,onError:p})=>{var d,m;try{const f=await i.fetchCheckouts(t,s,h,e);if(f.error)return p({error:a(f.error),code:c(null===(m=f.error)||void 0===m?void 0:m.code),severity:r.ERROR});{const t=Object.assign({},f.page_info);n({checkouts:(null===(d=f.data)||void 0===d?void 0:d.map((t=>new o(t))))||[],pagingInfo:t})}}catch(t){const s=c(null==t?void 0:t.code);return p({error:t.message||t,code:s,severity:r.ERROR})}})({accountId:this.accountId,authToken:this.authToken,service:new d,apiOrigin:this.apiOrigin}):(this.errorMessage="Account ID and Auth Token are required",this.errorEvent.emit({errorCode:e.MISSING_PROPS,message:this.errorMessage,severity:r.ERROR}))}initializeGetSubAccounts(){this.accountId&&this.authToken&&(this.getSubAccounts=m({accountId:this.accountId,authToken:this.authToken,service:new f,apiOrigin:this.apiOrigin}))}render(){return i(u,{key:"6e6faed5df0fcdc48018650867672c5d325d1934",exportparts:j},i("checkouts-list-core",{key:"92ceb10f7bd76864629ed0990a7f34fab76ce517",getCheckouts:this.getCheckouts,getSubAccounts:this.getSubAccounts,"onError-event":this.handleErrorEvent,columns:this.columns}))}static get watchers(){return{accountId:["propChanged"],authToken:["propChanged"]}}};export{v as justifi_checkouts_list}
|