@justifi/webcomponents 0.3.2 → 0.4.0
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/CHANGELOG.md +5 -0
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +3 -1
- package/dist/cjs/justifi-payment-form.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payment-method-form.cjs.entry.js +7 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/select-input_2.cjs.entry.js +1 -3
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/bank-account-form/bank-account-form.js +3 -3
- package/dist/collection/components/billing-form/billing-form.js +24 -1
- package/dist/collection/components/billing-form/billing-form.stories.js +14 -0
- package/dist/collection/components/card-form/card-form.js +3 -3
- package/dist/collection/components/payment-form/payment-form.js +1 -1
- package/dist/collection/components/payment-method-form/payment-method-form.js +1 -1
- package/dist/collection/components/select-input/select-input.js +1 -3
- package/dist/components/billing-form.js +4 -1
- package/dist/components/justifi-bank-account-form.js +3 -3
- package/dist/components/justifi-card-form.js +3 -3
- package/dist/components/justifi-payment-form.js +1 -1
- package/dist/components/payment-method-form.js +8 -5
- package/dist/components/select-input2.js +1 -3
- package/dist/esm/justifi-billing-form_2.entry.js +3 -1
- package/dist/esm/justifi-payment-form.entry.js +1 -1
- package/dist/esm/justifi-payment-method-form.entry.js +7 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/select-input_2.entry.js +1 -3
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/billing-form/billing-form.d.ts +2 -0
- package/dist/types/components/billing-form/billing-form.stories.d.ts +7 -0
- package/dist/types/components.d.ts +2 -0
- package/dist/webcomponents/{p-250118e4.entry.js → p-2e5be95e.entry.js} +1 -1
- package/dist/webcomponents/{p-3536328b.entry.js → p-6a9c764f.entry.js} +1 -1
- package/dist/webcomponents/{p-19a76621.entry.js → p-92ca574f.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +8 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### 0.4.0
|
|
8
|
+
> 18 April 2023
|
|
9
|
+
|
|
10
|
+
- Allow `legend` to be passed and conditionally rendered for `BillingForm`
|
|
11
|
+
|
|
7
12
|
#### 0.3.2
|
|
8
13
|
> 12 April 2023
|
|
9
14
|
|
|
@@ -2109,6 +2109,8 @@ const billingFormCss = ":host{display:block}label{display:block}input{margin-bot
|
|
|
2109
2109
|
const BillingForm = class {
|
|
2110
2110
|
constructor(hostRef) {
|
|
2111
2111
|
index.registerInstance(this, hostRef);
|
|
2112
|
+
this.legendBlock = (index.h("legend", null, this.legend));
|
|
2113
|
+
this.legend = undefined;
|
|
2112
2114
|
this.billingFields = {
|
|
2113
2115
|
address_line1: '',
|
|
2114
2116
|
address_line2: '',
|
|
@@ -2148,7 +2150,7 @@ const BillingForm = class {
|
|
|
2148
2150
|
return this.billingFields;
|
|
2149
2151
|
}
|
|
2150
2152
|
render() {
|
|
2151
|
-
return (index.h(index.Host, null, index.h("fieldset", null, index.h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 }), index.h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 }), index.h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city }), index.h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state }), index.h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))));
|
|
2153
|
+
return (index.h(index.Host, null, index.h("fieldset", null, this.legend && this.legendBlock, index.h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 }), index.h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 }), index.h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city }), index.h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state }), index.h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))));
|
|
2152
2154
|
}
|
|
2153
2155
|
};
|
|
2154
2156
|
BillingForm.style = billingFormCss;
|
|
@@ -49,7 +49,7 @@ const PaymentForm = class {
|
|
|
49
49
|
if (el) {
|
|
50
50
|
this.paymentMethodFormRef = el;
|
|
51
51
|
}
|
|
52
|
-
} }), index.h("justifi-billing-form", { ref: el => {
|
|
52
|
+
} }), index.h("justifi-billing-form", { legend: "Billing Info", ref: el => {
|
|
53
53
|
if (el) {
|
|
54
54
|
this.billingFormRef = el;
|
|
55
55
|
}
|
|
@@ -22,7 +22,7 @@ const MessageEventType = {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
const name = "@justifi/webcomponents";
|
|
25
|
-
const version = "0.
|
|
25
|
+
const version = "0.4.0";
|
|
26
26
|
const description = "JustiFi Web Components";
|
|
27
27
|
const main = "dist/index.cjs.js";
|
|
28
28
|
const module$1 = "dist/index.js";
|
|
@@ -47,8 +47,8 @@ const scripts = {
|
|
|
47
47
|
build: "stencil build --docs",
|
|
48
48
|
start: "concurrently -c \"bgBlue.bold,bgMagenta.bold,bgGreen.bold\" \"yarn run start-stencil\" \"yarn run storybook\"",
|
|
49
49
|
"start-stencil": "stencil build --watch --serve --no-open",
|
|
50
|
-
test: "stencil test --spec
|
|
51
|
-
"test:watch": "stencil test --spec --
|
|
50
|
+
test: "stencil test --spec",
|
|
51
|
+
"test:watch": "stencil test --spec --watchAll",
|
|
52
52
|
generate: "stencil generate",
|
|
53
53
|
storybook: "storybook dev -p 6006 --quiet",
|
|
54
54
|
"build-storybook": "storybook build"
|
|
@@ -73,7 +73,10 @@ const devDependencies = {
|
|
|
73
73
|
"@storybook/html-webpack5": "^7.0.4",
|
|
74
74
|
"@storybook/jest": "^0.1.0",
|
|
75
75
|
"@storybook/testing-library": "^0.1.0",
|
|
76
|
-
"@types/jest": "
|
|
76
|
+
"@types/jest": "27.0.3",
|
|
77
|
+
"@types/node": "^18.15.11",
|
|
78
|
+
"@types/react": "^18.0.37",
|
|
79
|
+
"@types/react-dom": "^18.0.11",
|
|
77
80
|
"auto-changelog": "^2.4.0",
|
|
78
81
|
concurrently: "^7.6.0",
|
|
79
82
|
jest: "^27.4.5",
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -14,7 +14,7 @@ const patchEsm = () => {
|
|
|
14
14
|
const defineCustomElements = (win, options) => {
|
|
15
15
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
16
|
return patchEsm().then(() => {
|
|
17
|
-
return index.bootstrapLazy([["justifi-payment-form.cjs",[[0,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationStrategy":[
|
|
17
|
+
return index.bootstrapLazy([["justifi-payment-form.cjs",[[0,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form.cjs",[[0,"justifi-card-form",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list.cjs",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2.cjs",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2.cjs",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form.cjs",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationStrategy":[1025,"payment-method-form-validation-strategy"],"paymentMethodStyleOverrides":[16],"iframeOrigin":[1,"iframe-origin"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
|
|
18
18
|
});
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -24,9 +24,7 @@ const SelectInput = class {
|
|
|
24
24
|
}
|
|
25
25
|
;
|
|
26
26
|
render() {
|
|
27
|
-
return (index.h(index.Host, null, index.h("label", null, this.label), index.h("select", { name: this.name, onInput: (event) => this.onInput(event) }, this.options.map((option) => {
|
|
28
|
-
return (index.h("option", { value: option.value }, option.label));
|
|
29
|
-
})), this.error && index.h("div", { style: { color: 'red' } }, this.error)));
|
|
27
|
+
return (index.h(index.Host, null, index.h("label", null, this.label), index.h("select", { name: this.name, onInput: (event) => this.onInput(event) }, this.options.map((option) => index.h("option", { value: option.value }, option.label))), this.error && index.h("div", { style: { color: 'red' } }, this.error)));
|
|
30
28
|
}
|
|
31
29
|
};
|
|
32
30
|
SelectInput.style = selectInputCss;
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["justifi-payment-form.cjs",[[0,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationStrategy":[
|
|
18
|
+
return index.bootstrapLazy([["justifi-payment-form.cjs",[[0,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form.cjs",[[0,"justifi-bank-account-form",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form.cjs",[[0,"justifi-card-form",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list.cjs",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2.cjs",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2.cjs",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form.cjs",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationStrategy":[1025,"payment-method-form-validation-strategy"],"paymentMethodStyleOverrides":[16],"iframeOrigin":[1,"iframe-origin"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
|
|
19
19
|
});
|
|
@@ -48,7 +48,7 @@ export class BankAccountForm {
|
|
|
48
48
|
return {
|
|
49
49
|
"validationStrategy": {
|
|
50
50
|
"type": "string",
|
|
51
|
-
"mutable":
|
|
51
|
+
"mutable": true,
|
|
52
52
|
"complexType": {
|
|
53
53
|
"original": "'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all'",
|
|
54
54
|
"resolved": "\"all\" | \"onBlur\" | \"onChange\" | \"onSubmit\" | \"onTouched\"",
|
|
@@ -65,7 +65,7 @@ export class BankAccountForm {
|
|
|
65
65
|
},
|
|
66
66
|
"styleOverrides": {
|
|
67
67
|
"type": "string",
|
|
68
|
-
"mutable":
|
|
68
|
+
"mutable": true,
|
|
69
69
|
"complexType": {
|
|
70
70
|
"original": "string",
|
|
71
71
|
"resolved": "string",
|
|
@@ -82,7 +82,7 @@ export class BankAccountForm {
|
|
|
82
82
|
},
|
|
83
83
|
"iframeOrigin": {
|
|
84
84
|
"type": "string",
|
|
85
|
-
"mutable":
|
|
85
|
+
"mutable": true,
|
|
86
86
|
"complexType": {
|
|
87
87
|
"original": "string",
|
|
88
88
|
"resolved": "string",
|
|
@@ -3,6 +3,8 @@ import BillingFormSchema from './billing-form-schema';
|
|
|
3
3
|
import StateOptions from './state-options';
|
|
4
4
|
export class BillingForm {
|
|
5
5
|
constructor() {
|
|
6
|
+
this.legendBlock = (h("legend", null, this.legend));
|
|
7
|
+
this.legend = undefined;
|
|
6
8
|
this.billingFields = {
|
|
7
9
|
address_line1: '',
|
|
8
10
|
address_line2: '',
|
|
@@ -42,7 +44,7 @@ export class BillingForm {
|
|
|
42
44
|
return this.billingFields;
|
|
43
45
|
}
|
|
44
46
|
render() {
|
|
45
|
-
return (h(Host, null, h("fieldset", null, h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 }), h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 }), h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city }), h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state }), h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))));
|
|
47
|
+
return (h(Host, null, h("fieldset", null, this.legend && this.legendBlock, h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 }), h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 }), h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city }), h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state }), h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))));
|
|
46
48
|
}
|
|
47
49
|
static get is() { return "justifi-billing-form"; }
|
|
48
50
|
static get encapsulation() { return "shadow"; }
|
|
@@ -56,6 +58,27 @@ export class BillingForm {
|
|
|
56
58
|
"$": ["billing-form.css"]
|
|
57
59
|
};
|
|
58
60
|
}
|
|
61
|
+
static get properties() {
|
|
62
|
+
return {
|
|
63
|
+
"legend": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"mutable": false,
|
|
66
|
+
"complexType": {
|
|
67
|
+
"original": "string",
|
|
68
|
+
"resolved": "string",
|
|
69
|
+
"references": {}
|
|
70
|
+
},
|
|
71
|
+
"required": false,
|
|
72
|
+
"optional": true,
|
|
73
|
+
"docs": {
|
|
74
|
+
"tags": [],
|
|
75
|
+
"text": ""
|
|
76
|
+
},
|
|
77
|
+
"attribute": "legend",
|
|
78
|
+
"reflect": false
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
59
82
|
static get states() {
|
|
60
83
|
return {
|
|
61
84
|
"billingFields": {},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/BillingForm',
|
|
3
|
+
component: 'justifi-billing-form',
|
|
4
|
+
parameters: {},
|
|
5
|
+
};
|
|
6
|
+
const Template = ({ styleOverrides }) => {
|
|
7
|
+
const parsedStyleOverrides = styleOverrides ? JSON.stringify(styleOverrides) : null;
|
|
8
|
+
return (`
|
|
9
|
+
<div>
|
|
10
|
+
<justifi-billing-form data-testid="billing-form-iframe" style-overrides='${parsedStyleOverrides || ''}' />
|
|
11
|
+
</div>
|
|
12
|
+
`);
|
|
13
|
+
};
|
|
14
|
+
export const Basic = Template.bind({});
|
|
@@ -48,7 +48,7 @@ export class CardForm {
|
|
|
48
48
|
return {
|
|
49
49
|
"validationStrategy": {
|
|
50
50
|
"type": "string",
|
|
51
|
-
"mutable":
|
|
51
|
+
"mutable": true,
|
|
52
52
|
"complexType": {
|
|
53
53
|
"original": "'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all'",
|
|
54
54
|
"resolved": "\"all\" | \"onBlur\" | \"onChange\" | \"onSubmit\" | \"onTouched\"",
|
|
@@ -65,7 +65,7 @@ export class CardForm {
|
|
|
65
65
|
},
|
|
66
66
|
"styleOverrides": {
|
|
67
67
|
"type": "string",
|
|
68
|
-
"mutable":
|
|
68
|
+
"mutable": true,
|
|
69
69
|
"complexType": {
|
|
70
70
|
"original": "string",
|
|
71
71
|
"resolved": "string",
|
|
@@ -82,7 +82,7 @@ export class CardForm {
|
|
|
82
82
|
},
|
|
83
83
|
"iframeOrigin": {
|
|
84
84
|
"type": "string",
|
|
85
|
-
"mutable":
|
|
85
|
+
"mutable": true,
|
|
86
86
|
"complexType": {
|
|
87
87
|
"original": "string",
|
|
88
88
|
"resolved": "string",
|
|
@@ -111,7 +111,7 @@ export class PaymentMethodForm {
|
|
|
111
111
|
},
|
|
112
112
|
"paymentMethodFormValidationStrategy": {
|
|
113
113
|
"type": "string",
|
|
114
|
-
"mutable":
|
|
114
|
+
"mutable": true,
|
|
115
115
|
"complexType": {
|
|
116
116
|
"original": "'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all'",
|
|
117
117
|
"resolved": "\"all\" | \"onBlur\" | \"onChange\" | \"onSubmit\" | \"onTouched\"",
|
|
@@ -15,9 +15,7 @@ export class SelectInput {
|
|
|
15
15
|
}
|
|
16
16
|
;
|
|
17
17
|
render() {
|
|
18
|
-
return (h(Host, null, h("label", null, this.label), h("select", { name: this.name, onInput: (event) => this.onInput(event) }, this.options.map((option) => {
|
|
19
|
-
return (h("option", { value: option.value }, option.label));
|
|
20
|
-
})), this.error && h("div", { style: { color: 'red' } }, this.error)));
|
|
18
|
+
return (h(Host, null, h("label", null, this.label), h("select", { name: this.name, onInput: (event) => this.onInput(event) }, this.options.map((option) => h("option", { value: option.value }, option.label))), this.error && h("div", { style: { color: 'red' } }, this.error)));
|
|
21
19
|
}
|
|
22
20
|
static get is() { return "select-input"; }
|
|
23
21
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2109,6 +2109,8 @@ const BillingForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
2109
2109
|
super();
|
|
2110
2110
|
this.__registerHost();
|
|
2111
2111
|
this.__attachShadow();
|
|
2112
|
+
this.legendBlock = (h("legend", null, this.legend));
|
|
2113
|
+
this.legend = undefined;
|
|
2112
2114
|
this.billingFields = {
|
|
2113
2115
|
address_line1: '',
|
|
2114
2116
|
address_line2: '',
|
|
@@ -2148,10 +2150,11 @@ const BillingForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
2148
2150
|
return this.billingFields;
|
|
2149
2151
|
}
|
|
2150
2152
|
render() {
|
|
2151
|
-
return (h(Host, null, h("fieldset", null, h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 }), h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 }), h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city }), h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state }), h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))));
|
|
2153
|
+
return (h(Host, null, h("fieldset", null, this.legend && this.legendBlock, h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 }), h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 }), h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city }), h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state }), h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))));
|
|
2152
2154
|
}
|
|
2153
2155
|
static get style() { return billingFormCss; }
|
|
2154
2156
|
}, [1, "justifi-billing-form", {
|
|
2157
|
+
"legend": [1],
|
|
2155
2158
|
"billingFields": [32],
|
|
2156
2159
|
"billingFieldsErrors": [32],
|
|
2157
2160
|
"fill": [64],
|
|
@@ -54,9 +54,9 @@ const BankAccountForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
54
54
|
"styleOverrides": ["parseStyleOverrides"]
|
|
55
55
|
}; }
|
|
56
56
|
}, [0, "justifi-bank-account-form", {
|
|
57
|
-
"validationStrategy": [
|
|
58
|
-
"styleOverrides": [
|
|
59
|
-
"iframeOrigin": [
|
|
57
|
+
"validationStrategy": [1025, "validation-strategy"],
|
|
58
|
+
"styleOverrides": [1025, "style-overrides"],
|
|
59
|
+
"iframeOrigin": [1025, "iframe-origin"],
|
|
60
60
|
"internalStyleOverrides": [32],
|
|
61
61
|
"tokenize": [64],
|
|
62
62
|
"validate": [64]
|
|
@@ -54,9 +54,9 @@ const CardForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
54
54
|
"styleOverrides": ["parseStyleOverrides"]
|
|
55
55
|
}; }
|
|
56
56
|
}, [0, "justifi-card-form", {
|
|
57
|
-
"validationStrategy": [
|
|
58
|
-
"styleOverrides": [
|
|
59
|
-
"iframeOrigin": [
|
|
57
|
+
"validationStrategy": [1025, "validation-strategy"],
|
|
58
|
+
"styleOverrides": [1025, "style-overrides"],
|
|
59
|
+
"iframeOrigin": [1025, "iframe-origin"],
|
|
60
60
|
"internalStyleOverrides": [32],
|
|
61
61
|
"tokenize": [64],
|
|
62
62
|
"validate": [64]
|
|
@@ -51,7 +51,7 @@ const PaymentForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
51
51
|
if (el) {
|
|
52
52
|
this.paymentMethodFormRef = el;
|
|
53
53
|
}
|
|
54
|
-
} }), h("justifi-billing-form", { ref: el => {
|
|
54
|
+
} }), h("justifi-billing-form", { legend: "Billing Info", ref: el => {
|
|
55
55
|
if (el) {
|
|
56
56
|
this.billingFormRef = el;
|
|
57
57
|
}
|
|
@@ -18,7 +18,7 @@ const MessageEventType = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const name = "@justifi/webcomponents";
|
|
21
|
-
const version = "0.
|
|
21
|
+
const version = "0.4.0";
|
|
22
22
|
const description = "JustiFi Web Components";
|
|
23
23
|
const main = "dist/index.cjs.js";
|
|
24
24
|
const module = "dist/index.js";
|
|
@@ -43,8 +43,8 @@ const scripts = {
|
|
|
43
43
|
build: "stencil build --docs",
|
|
44
44
|
start: "concurrently -c \"bgBlue.bold,bgMagenta.bold,bgGreen.bold\" \"yarn run start-stencil\" \"yarn run storybook\"",
|
|
45
45
|
"start-stencil": "stencil build --watch --serve --no-open",
|
|
46
|
-
test: "stencil test --spec
|
|
47
|
-
"test:watch": "stencil test --spec --
|
|
46
|
+
test: "stencil test --spec",
|
|
47
|
+
"test:watch": "stencil test --spec --watchAll",
|
|
48
48
|
generate: "stencil generate",
|
|
49
49
|
storybook: "storybook dev -p 6006 --quiet",
|
|
50
50
|
"build-storybook": "storybook build"
|
|
@@ -69,7 +69,10 @@ const devDependencies = {
|
|
|
69
69
|
"@storybook/html-webpack5": "^7.0.4",
|
|
70
70
|
"@storybook/jest": "^0.1.0",
|
|
71
71
|
"@storybook/testing-library": "^0.1.0",
|
|
72
|
-
"@types/jest": "
|
|
72
|
+
"@types/jest": "27.0.3",
|
|
73
|
+
"@types/node": "^18.15.11",
|
|
74
|
+
"@types/react": "^18.0.37",
|
|
75
|
+
"@types/react-dom": "^18.0.11",
|
|
73
76
|
"auto-changelog": "^2.4.0",
|
|
74
77
|
concurrently: "^7.6.0",
|
|
75
78
|
jest: "^27.4.5",
|
|
@@ -191,7 +194,7 @@ const PaymentMethodForm = /*@__PURE__*/ proxyCustomElement(class extends HTMLEle
|
|
|
191
194
|
static get style() { return paymentMethodFormCss; }
|
|
192
195
|
}, [0, "justifi-payment-method-form", {
|
|
193
196
|
"paymentMethodFormType": [1, "payment-method-form-type"],
|
|
194
|
-
"paymentMethodFormValidationStrategy": [
|
|
197
|
+
"paymentMethodFormValidationStrategy": [1025, "payment-method-form-validation-strategy"],
|
|
195
198
|
"paymentMethodStyleOverrides": [16],
|
|
196
199
|
"iframeOrigin": [1, "iframe-origin"],
|
|
197
200
|
"height": [32],
|
|
@@ -22,9 +22,7 @@ const SelectInput = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
22
22
|
}
|
|
23
23
|
;
|
|
24
24
|
render() {
|
|
25
|
-
return (h(Host, null, h("label", null, this.label), h("select", { name: this.name, onInput: (event) => this.onInput(event) }, this.options.map((option) => {
|
|
26
|
-
return (h("option", { value: option.value }, option.label));
|
|
27
|
-
})), this.error && h("div", { style: { color: 'red' } }, this.error)));
|
|
25
|
+
return (h(Host, null, h("label", null, this.label), h("select", { name: this.name, onInput: (event) => this.onInput(event) }, this.options.map((option) => h("option", { value: option.value }, option.label))), this.error && h("div", { style: { color: 'red' } }, this.error)));
|
|
28
26
|
}
|
|
29
27
|
static get style() { return selectInputCss; }
|
|
30
28
|
}, [1, "select-input", {
|
|
@@ -2105,6 +2105,8 @@ const billingFormCss = ":host{display:block}label{display:block}input{margin-bot
|
|
|
2105
2105
|
const BillingForm = class {
|
|
2106
2106
|
constructor(hostRef) {
|
|
2107
2107
|
registerInstance(this, hostRef);
|
|
2108
|
+
this.legendBlock = (h("legend", null, this.legend));
|
|
2109
|
+
this.legend = undefined;
|
|
2108
2110
|
this.billingFields = {
|
|
2109
2111
|
address_line1: '',
|
|
2110
2112
|
address_line2: '',
|
|
@@ -2144,7 +2146,7 @@ const BillingForm = class {
|
|
|
2144
2146
|
return this.billingFields;
|
|
2145
2147
|
}
|
|
2146
2148
|
render() {
|
|
2147
|
-
return (h(Host, null, h("fieldset", null, h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 }), h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 }), h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city }), h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state }), h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))));
|
|
2149
|
+
return (h(Host, null, h("fieldset", null, this.legend && this.legendBlock, h("text-input", { name: "address_line1", label: "Street Address", defaultValue: this.billingFields.address_line1, error: this.billingFieldsErrors.address_line1 }), h("text-input", { name: "address_line2", label: "Apartment, Suite, etc. (optional)", defaultValue: this.billingFields.address_line2, error: this.billingFieldsErrors.address_line2 }), h("text-input", { name: "address_city", label: "City", defaultValue: this.billingFields.address_city, error: this.billingFieldsErrors.address_city }), h("select-input", { name: "address_state", label: "State", options: StateOptions, defaultValue: this.billingFields.address_state, error: this.billingFieldsErrors.address_state }), h("text-input", { name: "address_postal_code", label: "ZIP", defaultValue: this.billingFields.address_postal_code, error: this.billingFieldsErrors.address_postal_code }))));
|
|
2148
2150
|
}
|
|
2149
2151
|
};
|
|
2150
2152
|
BillingForm.style = billingFormCss;
|
|
@@ -18,7 +18,7 @@ const MessageEventType = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const name = "@justifi/webcomponents";
|
|
21
|
-
const version = "0.
|
|
21
|
+
const version = "0.4.0";
|
|
22
22
|
const description = "JustiFi Web Components";
|
|
23
23
|
const main = "dist/index.cjs.js";
|
|
24
24
|
const module = "dist/index.js";
|
|
@@ -43,8 +43,8 @@ const scripts = {
|
|
|
43
43
|
build: "stencil build --docs",
|
|
44
44
|
start: "concurrently -c \"bgBlue.bold,bgMagenta.bold,bgGreen.bold\" \"yarn run start-stencil\" \"yarn run storybook\"",
|
|
45
45
|
"start-stencil": "stencil build --watch --serve --no-open",
|
|
46
|
-
test: "stencil test --spec
|
|
47
|
-
"test:watch": "stencil test --spec --
|
|
46
|
+
test: "stencil test --spec",
|
|
47
|
+
"test:watch": "stencil test --spec --watchAll",
|
|
48
48
|
generate: "stencil generate",
|
|
49
49
|
storybook: "storybook dev -p 6006 --quiet",
|
|
50
50
|
"build-storybook": "storybook build"
|
|
@@ -69,7 +69,10 @@ const devDependencies = {
|
|
|
69
69
|
"@storybook/html-webpack5": "^7.0.4",
|
|
70
70
|
"@storybook/jest": "^0.1.0",
|
|
71
71
|
"@storybook/testing-library": "^0.1.0",
|
|
72
|
-
"@types/jest": "
|
|
72
|
+
"@types/jest": "27.0.3",
|
|
73
|
+
"@types/node": "^18.15.11",
|
|
74
|
+
"@types/react": "^18.0.37",
|
|
75
|
+
"@types/react-dom": "^18.0.11",
|
|
73
76
|
"auto-changelog": "^2.4.0",
|
|
74
77
|
concurrently: "^7.6.0",
|
|
75
78
|
jest: "^27.4.5",
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["justifi-payment-form",[[0,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form",[[0,"justifi-bank-account-form",{"validationStrategy":[
|
|
13
|
+
return bootstrapLazy([["justifi-payment-form",[[0,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form",[[0,"justifi-bank-account-form",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form",[[0,"justifi-card-form",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationStrategy":[1025,"payment-method-form-validation-strategy"],"paymentMethodStyleOverrides":[16],"iframeOrigin":[1,"iframe-origin"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -20,9 +20,7 @@ const SelectInput = class {
|
|
|
20
20
|
}
|
|
21
21
|
;
|
|
22
22
|
render() {
|
|
23
|
-
return (h(Host, null, h("label", null, this.label), h("select", { name: this.name, onInput: (event) => this.onInput(event) }, this.options.map((option) => {
|
|
24
|
-
return (h("option", { value: option.value }, option.label));
|
|
25
|
-
})), this.error && h("div", { style: { color: 'red' } }, this.error)));
|
|
23
|
+
return (h(Host, null, h("label", null, this.label), h("select", { name: this.name, onInput: (event) => this.onInput(event) }, this.options.map((option) => h("option", { value: option.value }, option.label))), this.error && h("div", { style: { color: 'red' } }, this.error)));
|
|
26
24
|
}
|
|
27
25
|
};
|
|
28
26
|
SelectInput.style = selectInputCss;
|
|
@@ -13,5 +13,5 @@ const patchBrowser = () => {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
patchBrowser().then(options => {
|
|
16
|
-
return bootstrapLazy([["justifi-payment-form",[[0,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form",[[0,"justifi-bank-account-form",{"validationStrategy":[
|
|
16
|
+
return bootstrapLazy([["justifi-payment-form",[[0,"justifi-payment-form",{"bankAccount":[4,"bank-account"],"card":[4],"iframeOrigin":[1,"iframe-origin"],"selectedPaymentMethodType":[32],"allowedPaymentMethodTypes":[32],"fillBillingForm":[64],"submit":[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["justifi-bank-account-form",[[0,"justifi-bank-account-form",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-card-form",[[0,"justifi-card-form",{"validationStrategy":[1025,"validation-strategy"],"styleOverrides":[1025,"style-overrides"],"iframeOrigin":[1025,"iframe-origin"],"internalStyleOverrides":[32],"tokenize":[64],"validate":[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["justifi-payments-list",[[1,"justifi-payments-list",{"accountId":[1,"account-id"],"auth":[16],"payments":[32]}]]],["select-input_2",[[1,"select-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"options":[16],"internalValue":[32]}],[1,"text-input",{"name":[1],"label":[1],"defaultValue":[1,"default-value"],"error":[1],"internalValue":[32]}]]],["justifi-billing-form_2",[[1,"justifi-billing-form",{"legend":[1],"billingFields":[32],"billingFieldsErrors":[32],"fill":[64],"validate":[64],"getValues":[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{"paymentMethodTypes":[16],"selectedPaymentMethodType":[1,"selected-payment-method-type"]}]]],["justifi-payment-method-form",[[0,"justifi-payment-method-form",{"paymentMethodFormType":[1,"payment-method-form-type"],"paymentMethodFormValidationStrategy":[1025,"payment-method-form-validation-strategy"],"paymentMethodStyleOverrides":[16],"iframeOrigin":[1,"iframe-origin"],"height":[32],"tokenize":[64],"validate":[64]}]]]], options);
|
|
17
17
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BillingFormFields } from './billing-form-schema';
|
|
2
2
|
export declare class BillingForm {
|
|
3
|
+
legend?: string;
|
|
3
4
|
billingFields: BillingFormFields;
|
|
4
5
|
billingFieldsErrors: any;
|
|
5
6
|
setFormValue(event: any): void;
|
|
@@ -8,5 +9,6 @@ export declare class BillingForm {
|
|
|
8
9
|
isValid: boolean;
|
|
9
10
|
}>;
|
|
10
11
|
getValues(): Promise<BillingFormFields>;
|
|
12
|
+
legendBlock: any;
|
|
11
13
|
render(): any;
|
|
12
14
|
}
|
|
@@ -20,6 +20,7 @@ export namespace Components {
|
|
|
20
20
|
interface JustifiBillingForm {
|
|
21
21
|
"fill": (fields: BillingFormFields) => Promise<void>;
|
|
22
22
|
"getValues": () => Promise<BillingFormFields>;
|
|
23
|
+
"legend"?: string;
|
|
23
24
|
"validate": () => Promise<{ isValid: boolean; }>;
|
|
24
25
|
}
|
|
25
26
|
interface JustifiCardForm {
|
|
@@ -167,6 +168,7 @@ declare namespace LocalJSX {
|
|
|
167
168
|
"validationStrategy"?: 'onChange' | 'onBlur' | 'onSubmit' | 'onTouched' | 'all';
|
|
168
169
|
}
|
|
169
170
|
interface JustifiBillingForm {
|
|
171
|
+
"legend"?: string;
|
|
170
172
|
}
|
|
171
173
|
interface JustifiCardForm {
|
|
172
174
|
"iframeOrigin"?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as e,H as n,c as r}from"./p-9f34a2c1.js";function a(t){this._maxSize=t,this.clear()}a.prototype.clear=function(){this._size=0,this._values=Object.create(null)},a.prototype.get=function(t){return this._values[t]},a.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var s=/[^.^\]^[]+|(?=\[\]|\.\.)/g,i=/^\d+$/,u=/^\d/,l=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,h=new a(512),f=new a(512),c=new a(512),d={Cache:a,split:b,normalizePath:p,setter:function(t){var e=p(t);return f.get(t)||f.set(t,(function(t,n){for(var r=0,a=e.length,s=t;r<a-1;){var i=e[r];if("__proto__"===i||"constructor"===i||"prototype"===i)return t;s=s[e[r++]]}s[e[r]]=n}))},getter:function(t,e){var n=p(t);return c.get(t)||c.set(t,(function(t){for(var r=0,a=n.length;r<a;){if(null==t&&e)return;t=t[n[r++]]}return t}))},join:function(t){return t.reduce((function(t,e){return t+(v(e)||i.test(e)?"["+e+"]":(t?".":"")+e)}),"")},forEach:function(t,e,n){!function(t,e,n){var r,a,s,i,u=t.length;for(a=0;a<u;a++)(r=t[a])&&(m(r)&&(r='"'+r+'"'),s=!(i=v(r))&&/^\d+$/.test(r),e.call(n,r,i,s,a,t))}(Array.isArray(t)?t:b(t),e,n)}};function p(t){return h.get(t)||h.set(t,b(t).map((function(t){return t.replace(o,"$2")})))}function b(t){return t.match(s)||[""]}function v(t){return"string"==typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function m(t){return!v(t)&&(function(t){return t.match(u)&&!t.match(i)}(t)||function(t){return l.test(t)}(t))}const x=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,F=t=>t.match(x)||[];var y=t=>F(t).reduce(((t,e)=>`${t}${t?e[0].toUpperCase()+e.slice(1).toLowerCase():e.toLowerCase()}`),""),g=t=>((t,e)=>F(t).join(e).toLowerCase())(t,"_"),$=function(t){return w(function(t){for(var e=new Set,n=0,r=t.length;n<r;n++){var a=t[n];e.add(a[0]),e.add(a[1])}return Array.from(e)}(t),t)};function w(t,e){var n=t.length,r=new Array(n),a={},s=n,i=function(t){for(var e=new Map,n=0,r=t.length;n<r;n++){var a=t[n];e.has(a[0])||e.set(a[0],new Set),e.has(a[1])||e.set(a[1],new Set),e.get(a[0]).add(a[1])}return e}(e),u=function(t){for(var e=new Map,n=0,r=t.length;n<r;n++)e.set(t[n],n);return e}(t);for(e.forEach((function(t){if(!u.has(t[0])||!u.has(t[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));s--;)a[s]||l(t[s],s,new Set);return r;function l(t,e,s){if(s.has(t)){var o;try{o=", node was:"+JSON.stringify(t)}catch(t){o=""}throw new Error("Cyclic dependency"+o)}if(!u.has(t))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(t));if(!a[e]){a[e]=!0;var h=i.get(t)||new Set;if(e=(h=Array.from(h)).length){s.add(t);do{var f=h[--e];l(f,u.get(f),s)}while(e);s.delete(t)}r[--n]=t}}}$.array=w;const O=Object.prototype.toString,A=Error.prototype.toString,E=RegExp.prototype.toString,j="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",D=/^Symbol\((.*)\)(.*)$/;function _(t,e=!1){if(null==t||!0===t||!1===t)return""+t;const n=typeof t;if("number"===n)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===n)return e?`"${t}"`:t;if("function"===n)return"[Function "+(t.name||"anonymous")+"]";if("symbol"===n)return j.call(t).replace(D,"Symbol($1)");const r=O.call(t).slice(8,-1);return"Date"===r?isNaN(t.getTime())?""+t:t.toISOString(t):"Error"===r||t instanceof Error?"["+A.call(t)+"]":"RegExp"===r?E.call(t):null}function k(t,e){let n=_(t,e);return null!==n?n:JSON.stringify(t,(function(t,n){let r=_(this[t],e);return null!==r?r:n}),2)}function S(t){return null==t?[]:[].concat(t)}let V=/\$\{\s*(\w+)\s*\}/g;class C extends Error{static formatError(t,e){const n=e.label||e.path||"this";return n!==e.path&&(e=Object.assign({},e,{path:n})),"string"==typeof t?t.replace(V,((t,n)=>k(e[n]))):"function"==typeof t?t(e):t}static isError(t){return t&&"ValidationError"===t.name}constructor(t,e,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=e,this.path=n,this.type=r,this.errors=[],this.inner=[],S(t).forEach((t=>{C.isError(t)?(this.errors.push(...t.errors),this.inner=this.inner.concat(t.inner.length?t.inner:t)):this.errors.push(t)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,C)}}let M={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:n,originalValue:r})=>{const a=null!=r&&r!==n?` (cast from the value \`${k(r,!0)}\`).`:".";return"mixed"!==e?`${t} must be a \`${e}\` type, but the final value was: \`${k(n,!0)}\``+a:`${t} must match the configured type. The validated value was: \`${k(n,!0)}\``+a}},T={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},N={noUnknown:"${path} field has unspecified keys: ${unknown}"};Object.assign(Object.create(null),{mixed:M,string:T,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:{min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},object:N,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"}});const z=t=>t&&t.__isYupSchema__;class I{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:a}=e,s="function"==typeof n?n:(...t)=>t.every((t=>t===n));return new I(t,((t,e)=>{var n;let i=s(...t)?r:a;return null!=(n=null==i?void 0:i(e))?n:e}))}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let n=this.refs.map((t=>t.getValue(null==e?void 0:e.value,null==e?void 0:e.parent,null==e?void 0:e.context))),r=this.fn(n,t,e);if(void 0===r||r===t)return t;if(!z(r))throw new TypeError("conditions must return a schema object");return r.resolve(e)}}class P{constructor(t,e={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue,this.path=this.key.slice((this.isContext?"$":this.isValue?".":"").length),this.getter=this.path&&d.getter(this.path,!0),this.map=e.map}getValue(t,e,n){let r=this.isContext?n:this.isValue?t:e;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(t,e){return this.getValue(t,null==e?void 0:e.parent,null==e?void 0:e.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}P.prototype.__isYupRef=!0;const Z=t=>null==t;function R(t){function e({value:e,path:n="",options:r,originalValue:a,schema:s},i,u){const{name:l,test:o,params:h,message:f,skipAbsent:c}=t;let{parent:d,context:p,abortEarly:b=s.spec.abortEarly}=r;function v(t){return P.isRef(t)?t.getValue(e,d,p):t}function m(t={}){const r=Object.assign({value:e,originalValue:a,label:s.spec.label,path:t.path||n,spec:s.spec},h,t.params);for(const t of Object.keys(r))r[t]=v(r[t]);const i=new C(C.formatError(t.message||f,r),e,r.path,t.type||l);return i.params=r,i}const x=b?i:u;let F={path:n,parent:d,type:l,from:r.from,createError:m,resolve:v,options:r,originalValue:a,schema:s};const y=t=>{C.isError(t)?x(t):t?u(null):x(m())},g=t=>{C.isError(t)?x(t):i(t)},$=c&&Z(e);if(!r.sync){try{Promise.resolve(!!$||o.call(F,e,F)).then(y,g)}catch(t){g(t)}return}let w;try{var O;if(w=!!$||o.call(F,e,F),"function"==typeof(null==(O=w)?void 0:O.then))throw new Error(`Validation test of type: "${F.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(t){return void g(t)}y(w)}return e.OPTIONS=t,e}function q(t,e,n,r=n){let a,s,i;return e?(d.forEach(e,((u,l,o)=>{let h=l?u.slice(1,u.length-1):u,f="tuple"===(t=t.resolve({context:r,parent:a,value:n})).type,c=o?parseInt(h,10):0;if(t.innerType||f){if(f&&!o)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${i}" must contain an index to the tuple element, e.g. "${i}[0]"`);if(n&&c>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${u}, in the path: ${e}. because there is no value at that index. `);a=n,n=n&&n[c],t=f?t.spec.types[c]:t.innerType}if(!o){if(!t.fields||!t.fields[h])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${i} which is a type: "${t.type}")`);a=n,n=n&&n[h],t=t.fields[h]}s=h,i=l?"["+u+"]":"."+u})),{schema:t,parent:a,parentPath:s}):{parent:a,parentPath:e,schema:t}}class U extends Set{describe(){const t=[];for(const e of this.values())t.push(P.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const n of this.values())e.push(t(n));return e}clone(){return new U(this.values())}merge(t,e){const n=this.clone();return t.forEach((t=>n.add(t))),e.forEach((t=>n.delete(t))),n}}function L(t,e=new Map){if(z(t)||!t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let n;if(t instanceof Date)n=new Date(t.getTime()),e.set(t,n);else if(t instanceof RegExp)n=new RegExp(t),e.set(t,n);else if(Array.isArray(t)){n=new Array(t.length),e.set(t,n);for(let r=0;r<t.length;r++)n[r]=L(t[r],e)}else if(t instanceof Map){n=new Map,e.set(t,n);for(const[r,a]of t.entries())n.set(r,L(a,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const r of t)n.add(L(r,e))}else{if(!(t instanceof Object))throw Error(`Unable to clone ${t}`);n={},e.set(t,n);for(const[r,a]of Object.entries(t))n[r]=L(a,e)}return n}class H{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new U,this._blacklist=new U,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(M.notType)})),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,optional:!0,coerce:!0},null==t?void 0:t.spec),this.withMutation((t=>{t.nonNullable()}))}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const e=Object.create(Object.getPrototypeOf(this));return e.type=this.type,e._typeCheck=this._typeCheck,e._whitelist=this._whitelist.clone(),e._blacklist=this._blacklist.clone(),e.internalTests=Object.assign({},this.internalTests),e.exclusiveTests=Object.assign({},this.exclusiveTests),e.deps=[...this.deps],e.conditions=[...this.conditions],e.tests=[...this.tests],e.transforms=[...this.transforms],e.spec=L(Object.assign({},this.spec,t)),e}label(t){let e=this.clone();return e.spec.label=t,e}meta(...t){if(0===t.length)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},t[0]),e}withMutation(t){let e=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=e,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let e=this,n=t.clone();const r=Object.assign({},e.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},e.internalTests,n.internalTests),n._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),n.tests=e.tests,n.exclusiveTests=e.exclusiveTests,n.withMutation((e=>{t.tests.forEach((t=>{e.test(t.OPTIONS)}))})),n.transforms=[...e.transforms,...n.transforms],n}isType(t){return null==t?!(!this.spec.nullable||null!==t)||!(!this.spec.optional||void 0!==t):this._typeCheck(t)}resolve(t){let e=this;if(e.conditions.length){let n=e.conditions;e=e.clone(),e.conditions=[],e=n.reduce(((e,n)=>n.resolve(e,t)),e),e=e.resolve(t)}return e}resolveOptions(t){var e,n,r;return Object.assign({},t,{from:t.from||[],strict:null!=(e=t.strict)?e:this.spec.strict,abortEarly:null!=(n=t.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=t.recursive)?r:this.spec.recursive})}cast(t,e={}){let n=this.resolve(Object.assign({value:t},e)),r="ignore-optionality"===e.assert,a=n._cast(t,e);if(!1!==e.assert&&!n.isType(a)){if(r&&Z(a))return a;let s=k(t),i=k(a);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(i!==s?`result of cast: ${i}`:""))}return a}_cast(t,e){let n=void 0===t?t:this.transforms.reduce(((e,n)=>n.call(this,e,t,this)),t);return void 0===n&&(n=this.getDefault()),n}_validate(t,e={},n,r){let{path:a,originalValue:s=t,strict:i=this.spec.strict}=e,u=t;i||(u=this._cast(u,Object.assign({assert:!1},e)));let l=[];for(let t of Object.values(this.internalTests))t&&l.push(t);this.runTests({path:a,value:u,originalValue:s,options:e,tests:l},n,(t=>{if(t.length)return r(t,u);this.runTests({path:a,value:u,originalValue:s,options:e,tests:this.tests},n,r)}))}runTests(t,e,n){let r=!1,{tests:a,value:s,originalValue:i,path:u,options:l}=t,o=t=>{r||(r=!0,e(t,s))},h=t=>{r||(r=!0,n(t,s))},f=a.length,c=[];if(!f)return h([]);let d={value:s,originalValue:i,path:u,options:l,schema:this};for(let t=0;t<a.length;t++)(0,a[t])(d,o,(function(t){t&&(c=c.concat(t)),--f<=0&&h(c)}))}asNestedTest({key:t,index:e,parent:n,parentPath:r,originalParent:a,options:s}){const i=null!=t?t:e;if(null==i)throw TypeError("Must include `key` or `index` for nested validations");const u="number"==typeof i;let l=n[i];const o=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:a[i],key:void 0,[u?"index":"key"]:i,path:u||i.includes(".")?`${r||""}[${l?i:`"${i}"`}]`:(r?`${r}.`:"")+t});return(t,e,n)=>this.resolve(o)._validate(l,o,e,n)}validate(t,e){let n=this.resolve(Object.assign({},e,{value:t}));return new Promise(((r,a)=>n._validate(t,e,((t,e)=>{C.isError(t)&&(t.value=e),a(t)}),((t,e)=>{t.length?a(new C(t,e)):r(e)}))))}validateSync(t,e){let n;return this.resolve(Object.assign({},e,{value:t}))._validate(t,Object.assign({},e,{sync:!0}),((t,e)=>{throw C.isError(t)&&(t.value=e),t}),((e,r)=>{if(e.length)throw new C(e,t);n=r})),n}isValid(t,e){return this.validate(t,e).then((()=>!0),(t=>{if(C.isError(t))return!1;throw t}))}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(t){if(C.isError(t))return!1;throw t}}_getDefault(){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this):L(t)}getDefault(t){return this.resolve(t||{})._getDefault()}default(t){return 0===arguments.length?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,e){const n=this.clone({nullable:t});return n.internalTests.nullable=R({message:e,name:"nullable",test(t){return null!==t||this.schema.spec.nullable}}),n}optionality(t,e){const n=this.clone({optional:t});return n.internalTests.optionality=R({message:e,name:"optionality",test(t){return void 0!==t||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(t=M.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=M.notNull){return this.nullability(!1,t)}required(t=M.required){return this.clone().withMutation((e=>e.nonNullable(t).defined(t)))}notRequired(){return this.clone().withMutation((t=>t.nullable().optional()))}transform(t){let e=this.clone();return e.transforms.push(t),e}test(...t){let e;if(e=1===t.length?"function"==typeof t[0]?{test:t[0]}:t[0]:2===t.length?{name:t[0],test:t[1]}:{name:t[0],message:t[1],test:t[2]},void 0===e.message&&(e.message=M.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=R(e),a=e.exclusive||e.name&&!0===n.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(n.exclusiveTests[e.name]=!!e.exclusive),n.tests=n.tests.filter((t=>{if(t.OPTIONS.name===e.name){if(a)return!1;if(t.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),n.tests.push(r),n}when(t,e){Array.isArray(t)||"string"==typeof t||(e=t,t=".");let n=this.clone(),r=S(t).map((t=>new P(t)));return r.forEach((t=>{t.isSibling&&n.deps.push(t.key)})),n.conditions.push("function"==typeof e?new I(r,e):I.fromOptions(r,e)),n}typeError(t){let e=this.clone();return e.internalTests.typeError=R({message:t,name:"typeError",test(t){return!(!Z(t)&&!this.schema._typeCheck(t))||this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=M.oneOf){let n=this.clone();return t.forEach((t=>{n._whitelist.add(t),n._blacklist.delete(t)})),n.internalTests.whiteList=R({message:e,name:"oneOf",skipAbsent:!0,test(t){let e=this.schema._whitelist,n=e.resolveAll(this.resolve);return!!n.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:n}})}}),n}notOneOf(t,e=M.notOneOf){let n=this.clone();return t.forEach((t=>{n._blacklist.add(t),n._whitelist.delete(t)})),n.internalTests.blacklist=R({message:e,name:"notOneOf",test(t){let e=this.schema._blacklist,n=e.resolveAll(this.resolve);return!n.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:n}})}}),n}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:n,meta:r,optional:a,nullable:s}=e.spec;return{meta:r,label:n,optional:a,nullable:s,default:e.getDefault(t),type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map((t=>({name:t.OPTIONS.name,params:t.OPTIONS.params}))).filter(((t,e,n)=>n.findIndex((e=>e.name===t.name))===e))}}}H.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])H.prototype[`${t}At`]=function(e,n,r={}){const{parent:a,parentPath:s,schema:i}=q(this,e,n,r.context);return i[t](a&&a[s],Object.assign({},r,{parent:a,path:e}))};for(const t of["equals","is"])H.prototype[t]=H.prototype.oneOf;for(const t of["not","nope"])H.prototype[t]=H.prototype.notOneOf;let W=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,K=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Y=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,J=t=>Z(t)||t===t.trim(),G={}.toString();function B(){return new X}class X extends H{constructor(){super({type:"string",check:t=>(t instanceof String&&(t=t.valueOf()),"string"==typeof t)}),this.withMutation((()=>{this.transform(((t,e,n)=>{if(!n.spec.coerce||n.isType(t))return t;if(Array.isArray(t))return t;const r=null!=t&&t.toString?t.toString():t;return r===G?t:r}))}))}required(t){return super.required(t).withMutation((e=>e.test({message:t||M.required,name:"required",skipAbsent:!0,test:t=>!!t.length})))}notRequired(){return super.notRequired().withMutation((t=>(t.tests=t.tests.filter((t=>"required"!==t.OPTIONS.name)),t)))}length(t,e=T.length){return this.test({message:e,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(e){return e.length===this.resolve(t)}})}min(t,e=T.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(e){return e.length>=this.resolve(t)}})}max(t,e=T.max){return this.test({name:"max",exclusive:!0,message:e,params:{max:t},skipAbsent:!0,test(e){return e.length<=this.resolve(t)}})}matches(t,e){let n,r,a=!1;return e&&("object"==typeof e?({excludeEmptyString:a=!1,message:n,name:r}=e):n=e),this.test({name:r||"matches",message:n||T.matches,params:{regex:t},skipAbsent:!0,test:e=>""===e&&a||-1!==e.search(t)})}email(t=T.email){return this.matches(W,{name:"email",message:t,excludeEmptyString:!0})}url(t=T.url){return this.matches(K,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=T.uuid){return this.matches(Y,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform((t=>null===t?"":t))}trim(t=T.trim){return this.transform((t=>null!=t?t.trim():t)).test({message:t,name:"trim",test:J})}lowercase(t=T.lowercase){return this.transform((t=>Z(t)?t:t.toLowerCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Z(t)||t===t.toLowerCase()})}uppercase(t=T.uppercase){return this.transform((t=>Z(t)?t:t.toUpperCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Z(t)||t===t.toUpperCase()})}}function Q(t,e){let n=1/0;return t.some(((t,r)=>{var a;if(null!=(a=e.path)&&a.includes(t))return n=r,!0})),n}function tt(t){return(e,n)=>Q(t,e)-Q(t,n)}B.prototype=X.prototype;const et=(t,e,n)=>{if("string"!=typeof t)return t;let r=t;try{r=JSON.parse(t)}catch(t){}return n.isType(r)?r:t};function nt(t){if("fields"in t){const e={};for(const[n,r]of Object.entries(t.fields))e[n]=nt(r);return t.setFields(e)}if("array"===t.type){const e=t.optional();return e.innerType&&(e.innerType=nt(e.innerType)),e}return"tuple"===t.type?t.optional().clone({types:t.spec.types.map(nt)}):"optional"in t?t.optional():t}let rt=t=>"[object Object]"===Object.prototype.toString.call(t);const at=tt([]);function st(t){return new it(t)}class it extends H{constructor(t){super({type:"object",check:t=>rt(t)||"function"==typeof t}),this.fields=Object.create(null),this._sortErrors=at,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{t&&this.shape(t)}))}_cast(t,e={}){var n;let r=super._cast(t,e);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let a=this.fields,s=null!=(n=e.stripUnknown)?n:this.spec.noUnknown,i=[].concat(this._nodes,Object.keys(r).filter((t=>!this._nodes.includes(t)))),u={},l=Object.assign({},e,{parent:u,__validating:e.__validating||!1}),o=!1;for(const t of i){let n=a[t],i=t in r;if(n){let a,s=r[t];l.path=(e.path?`${e.path}.`:"")+t,n=n.resolve({value:s,context:e.context,parent:u});let i=n instanceof H?n.spec:void 0,h=null==i?void 0:i.strict;if(null!=i&&i.strip){o=o||t in r;continue}a=e.__validating&&h?r[t]:n.cast(r[t],l),void 0!==a&&(u[t]=a)}else i&&!s&&(u[t]=r[t]);i===t in u&&u[t]===r[t]||(o=!0)}return o?u:r}_validate(t,e={},n,r){let{from:a=[],originalValue:s=t,recursive:i=this.spec.recursive}=e;e.from=[{schema:this,value:s},...a],e.__validating=!0,e.originalValue=s,super._validate(t,e,n,((t,a)=>{if(!i||!rt(a))return void r(t,a);s=s||a;let u=[];for(let t of this._nodes){let n=this.fields[t];n&&!P.isRef(n)&&u.push(n.asNestedTest({options:e,key:t,parent:a,parentPath:e.path,originalParent:s}))}this.runTests({tests:u,value:a,originalValue:s,options:e},n,(e=>{r(e.sort(this._sortErrors).concat(t),a)}))}))}clone(t){const e=super.clone(t);return e.fields=Object.assign({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}concat(t){let e=super.concat(t),n=e.fields;for(let[t,e]of Object.entries(this.fields)){const r=n[t];n[t]=void 0===r?e:r}return e.withMutation((t=>t.setFields(n,this._excludedEdges)))}_getDefault(){if("default"in this.spec)return super._getDefault();if(!this._nodes.length)return;let t={};return this._nodes.forEach((e=>{const n=this.fields[e];t[e]=n&&"getDefault"in n?n.getDefault():void 0})),t}setFields(t,e){let n=this.clone();return n.fields=t,n._nodes=function(t,e=[]){let n=[],r=new Set,a=new Set(e.map((([t,e])=>`${t}-${e}`)));function s(t,e){let s=d.split(t)[0];r.add(s),a.has(`${e}-${s}`)||n.push([e,s])}for(const e of Object.keys(t)){let n=t[e];r.add(e),P.isRef(n)&&n.isSibling?s(n.path,e):z(n)&&"deps"in n&&n.deps.forEach((t=>s(t,e)))}return $.array(Array.from(r),n).reverse()}(t,e),n._sortErrors=tt(Object.keys(t)),e&&(n._excludedEdges=e),n}shape(t,e=[]){return this.clone().withMutation((n=>{let r=n._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),r=[...n._excludedEdges,...e]),n.setFields(Object.assign(n.fields,t),r)}))}partial(){const t={};for(const[e,n]of Object.entries(this.fields))t[e]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return nt(this)}pick(t){const e={};for(const n of t)this.fields[n]&&(e[n]=this.fields[n]);return this.setFields(e)}omit(t){const e=Object.assign({},this.fields);for(const n of t)delete e[n];return this.setFields(e)}from(t,e,n){let r=d.getter(t,!0);return this.transform((a=>{if(!a)return a;let s=a;return((t,e)=>{const n=[...d.normalizePath(e)];if(1===n.length)return n[0]in t;let r=n.pop(),a=d.getter(d.join(n),!0)(t);return!(!a||!(r in a))})(a,t)&&(s=Object.assign({},a),n||delete s[t],s[e]=r(a)),s}))}json(){return this.transform(et)}noUnknown(t=!0,e=N.noUnknown){"boolean"!=typeof t&&(e=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:e,test(e){if(null==e)return!0;const n=function(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter((t=>-1===n.indexOf(t)))}(this.schema,e);return!t||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,e=N.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform((e=>{if(!e)return e;const n={};for(const r of Object.keys(e))n[t(r)]=e[r];return n}))}camelCase(){return this.transformKeys(y)}snakeCase(){return this.transformKeys(g)}constantCase(){return this.transformKeys((t=>g(t).toUpperCase()))}describe(t){let e=super.describe(t);e.fields={};for(const[r,a]of Object.entries(this.fields)){var n;let s=t;null!=(n=s)&&n.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),e.fields[r]=a.describe(s)}return e}}st.prototype=it.prototype;const ut=st({address_line1:B().required("Enter street address"),address_line2:B(),address_city:B().required("Enter city"),address_state:B().required("Choose state"),address_postal_code:B().required("Enter ZIP").matches(/^\d{5}/,"Enter a valid ZIP").min(5,"Enter a valid ZIP")}),lt=[{label:"Choose state",value:""},{label:"Alabama",value:"AL"},{label:"Alaska",value:"AK"},{label:"American Samoa",value:"AS"},{label:"Arizona",value:"AZ"},{label:"Arkansas",value:"AR"},{label:"California",value:"CA"},{label:"Colorado",value:"CO"},{label:"Connecticut",value:"CT"},{label:"Delaware",value:"DE"},{label:"District Of Columbia",value:"DC"},{label:"Federated States Of Micronesia",value:"FM"},{label:"Florida",value:"FL"},{label:"Georgia",value:"GA"},{label:"Guam",value:"GU"},{label:"Hawaii",value:"HI"},{label:"Idaho",value:"ID"},{label:"Illinois",value:"IL"},{label:"Indiana",value:"IN"},{label:"Iowa",value:"IA"},{label:"Kansas",value:"KS"},{label:"Kentucky",value:"KY"},{label:"Louisiana",value:"LA"},{label:"Maine",value:"ME"},{label:"Marshall Islands",value:"MH"},{label:"Maryland",value:"MD"},{label:"Massachusetts",value:"MA"},{label:"Michigan",value:"MI"},{label:"Minnesota",value:"MN"},{label:"Mississippi",value:"MS"},{label:"Missouri",value:"MO"},{label:"Montana",value:"MT"},{label:"Nebraska",value:"NE"},{label:"Nevada",value:"NV"},{label:"New Hampshire",value:"NH"},{label:"New Jersey",value:"NJ"},{label:"New Mexico",value:"NM"},{label:"New York",value:"NY"},{label:"North Carolina",value:"NC"},{label:"North Dakota",value:"ND"},{label:"Northern Mariana Islands",value:"MP"},{label:"Ohio",value:"OH"},{label:"Oklahoma",value:"OK"},{label:"Oregon",value:"OR"},{label:"Palau",value:"PW"},{label:"Pennsylvania",value:"PA"},{label:"Puerto Rico",value:"PR"},{label:"Rhode Island",value:"RI"},{label:"South Carolina",value:"SC"},{label:"South Dakota",value:"SD"},{label:"Tennessee",value:"TN"},{label:"Texas",value:"TX"},{label:"Utah",value:"UT"},{label:"Vermont",value:"VT"},{label:"Virgin Islands",value:"VI"},{label:"Virginia",value:"VA"},{label:"Washington",value:"WA"},{label:"West Virginia",value:"WV"},{label:"Wisconsin",value:"WI"},{label:"Wyoming",value:"WY"}],ot=class{constructor(e){t(this,e),this.billingFields={address_line1:"",address_line2:"",address_city:"",address_state:"",address_postal_code:""},this.billingFieldsErrors={}}setFormValue(t){const e=t.detail,n=Object.assign({},this.billingFields);e.name&&(n[e.name]=e.value,this.billingFields=n)}async fill(t){this.billingFields=Object.assign({},t)}async validate(){const t={};let e=!0;try{await ut.validate(this.billingFields,{abortEarly:!1})}catch(n){e=!1,n.inner.map((e=>{t[e.path]=e.message}))}return this.billingFieldsErrors=t,{isValid:e}}async getValues(){return this.billingFields}render(){return e(n,null,e("fieldset",null,e("text-input",{name:"address_line1",label:"Street Address",defaultValue:this.billingFields.address_line1,error:this.billingFieldsErrors.address_line1}),e("text-input",{name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:this.billingFields.address_line2,error:this.billingFieldsErrors.address_line2}),e("text-input",{name:"address_city",label:"City",defaultValue:this.billingFields.address_city,error:this.billingFieldsErrors.address_city}),e("select-input",{name:"address_state",label:"State",options:lt,defaultValue:this.billingFields.address_state,error:this.billingFieldsErrors.address_state}),e("text-input",{name:"address_postal_code",label:"ZIP",defaultValue:this.billingFields.address_postal_code,error:this.billingFieldsErrors.address_postal_code})))}};ot.style=":host{display:block}label{display:block}input{margin-bottom:8px}";const ht={bankAccount:"Bank Account",card:"Card"},ft=class{constructor(e){t(this,e),this.paymentMethodSelected=r(this,"paymentMethodSelected",7),this.paymentMethodTypes=[],this.selectedPaymentMethodType=void 0}onChangeHandler(t){this.paymentMethodSelected.emit(t.target.value)}render(){return e("div",null,this.paymentMethodTypes.map((t=>e("div",null,e("input",{id:t,type:"radio",name:"paymentMethodType",value:t,onChange:t=>this.onChangeHandler(t),checked:this.selectedPaymentMethodType===t}),e("label",{htmlFor:t},ht[t])))))}};export{ot as justifi_billing_form,ft as justifi_payment_method_selector}
|
|
1
|
+
import{r as t,h as e,H as n,c as r}from"./p-9f34a2c1.js";function a(t){this._maxSize=t,this.clear()}a.prototype.clear=function(){this._size=0,this._values=Object.create(null)},a.prototype.get=function(t){return this._values[t]},a.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var s=/[^.^\]^[]+|(?=\[\]|\.\.)/g,i=/^\d+$/,u=/^\d/,l=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,h=new a(512),f=new a(512),c=new a(512),d={Cache:a,split:b,normalizePath:p,setter:function(t){var e=p(t);return f.get(t)||f.set(t,(function(t,n){for(var r=0,a=e.length,s=t;r<a-1;){var i=e[r];if("__proto__"===i||"constructor"===i||"prototype"===i)return t;s=s[e[r++]]}s[e[r]]=n}))},getter:function(t,e){var n=p(t);return c.get(t)||c.set(t,(function(t){for(var r=0,a=n.length;r<a;){if(null==t&&e)return;t=t[n[r++]]}return t}))},join:function(t){return t.reduce((function(t,e){return t+(v(e)||i.test(e)?"["+e+"]":(t?".":"")+e)}),"")},forEach:function(t,e,n){!function(t,e,n){var r,a,s,i,u=t.length;for(a=0;a<u;a++)(r=t[a])&&(m(r)&&(r='"'+r+'"'),s=!(i=v(r))&&/^\d+$/.test(r),e.call(n,r,i,s,a,t))}(Array.isArray(t)?t:b(t),e,n)}};function p(t){return h.get(t)||h.set(t,b(t).map((function(t){return t.replace(o,"$2")})))}function b(t){return t.match(s)||[""]}function v(t){return"string"==typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function m(t){return!v(t)&&(function(t){return t.match(u)&&!t.match(i)}(t)||function(t){return l.test(t)}(t))}const x=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,F=t=>t.match(x)||[];var y=t=>F(t).reduce(((t,e)=>`${t}${t?e[0].toUpperCase()+e.slice(1).toLowerCase():e.toLowerCase()}`),""),g=t=>((t,e)=>F(t).join(e).toLowerCase())(t,"_"),$=function(t){return w(function(t){for(var e=new Set,n=0,r=t.length;n<r;n++){var a=t[n];e.add(a[0]),e.add(a[1])}return Array.from(e)}(t),t)};function w(t,e){var n=t.length,r=new Array(n),a={},s=n,i=function(t){for(var e=new Map,n=0,r=t.length;n<r;n++){var a=t[n];e.has(a[0])||e.set(a[0],new Set),e.has(a[1])||e.set(a[1],new Set),e.get(a[0]).add(a[1])}return e}(e),u=function(t){for(var e=new Map,n=0,r=t.length;n<r;n++)e.set(t[n],n);return e}(t);for(e.forEach((function(t){if(!u.has(t[0])||!u.has(t[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")}));s--;)a[s]||l(t[s],s,new Set);return r;function l(t,e,s){if(s.has(t)){var o;try{o=", node was:"+JSON.stringify(t)}catch(t){o=""}throw new Error("Cyclic dependency"+o)}if(!u.has(t))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(t));if(!a[e]){a[e]=!0;var h=i.get(t)||new Set;if(e=(h=Array.from(h)).length){s.add(t);do{var f=h[--e];l(f,u.get(f),s)}while(e);s.delete(t)}r[--n]=t}}}$.array=w;const O=Object.prototype.toString,A=Error.prototype.toString,E=RegExp.prototype.toString,j="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",D=/^Symbol\((.*)\)(.*)$/;function _(t,e=!1){if(null==t||!0===t||!1===t)return""+t;const n=typeof t;if("number"===n)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===n)return e?`"${t}"`:t;if("function"===n)return"[Function "+(t.name||"anonymous")+"]";if("symbol"===n)return j.call(t).replace(D,"Symbol($1)");const r=O.call(t).slice(8,-1);return"Date"===r?isNaN(t.getTime())?""+t:t.toISOString(t):"Error"===r||t instanceof Error?"["+A.call(t)+"]":"RegExp"===r?E.call(t):null}function k(t,e){let n=_(t,e);return null!==n?n:JSON.stringify(t,(function(t,n){let r=_(this[t],e);return null!==r?r:n}),2)}function S(t){return null==t?[]:[].concat(t)}let V=/\$\{\s*(\w+)\s*\}/g;class C extends Error{static formatError(t,e){const n=e.label||e.path||"this";return n!==e.path&&(e=Object.assign({},e,{path:n})),"string"==typeof t?t.replace(V,((t,n)=>k(e[n]))):"function"==typeof t?t(e):t}static isError(t){return t&&"ValidationError"===t.name}constructor(t,e,n,r){super(),this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this.name="ValidationError",this.value=e,this.path=n,this.type=r,this.errors=[],this.inner=[],S(t).forEach((t=>{C.isError(t)?(this.errors.push(...t.errors),this.inner=this.inner.concat(t.inner.length?t.inner:t)):this.errors.push(t)})),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],Error.captureStackTrace&&Error.captureStackTrace(this,C)}}let M={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:t,type:e,value:n,originalValue:r})=>{const a=null!=r&&r!==n?` (cast from the value \`${k(r,!0)}\`).`:".";return"mixed"!==e?`${t} must be a \`${e}\` type, but the final value was: \`${k(n,!0)}\``+a:`${t} must match the configured type. The validated value was: \`${k(n,!0)}\``+a}},T={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},N={noUnknown:"${path} field has unspecified keys: ${unknown}"};Object.assign(Object.create(null),{mixed:M,string:T,number:{min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},date:{min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},object:N,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:{isValue:"${path} field must be ${value}"}});const z=t=>t&&t.__isYupSchema__;class I{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:r,otherwise:a}=e,s="function"==typeof n?n:(...t)=>t.every((t=>t===n));return new I(t,((t,e)=>{var n;let i=s(...t)?r:a;return null!=(n=null==i?void 0:i(e))?n:e}))}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let n=this.refs.map((t=>t.getValue(null==e?void 0:e.value,null==e?void 0:e.parent,null==e?void 0:e.context))),r=this.fn(n,t,e);if(void 0===r||r===t)return t;if(!z(r))throw new TypeError("conditions must return a schema object");return r.resolve(e)}}class P{constructor(t,e={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,"string"!=typeof t)throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),""===t)throw new TypeError("ref must be a non-empty string");this.isContext="$"===this.key[0],this.isValue="."===this.key[0],this.isSibling=!this.isContext&&!this.isValue,this.path=this.key.slice((this.isContext?"$":this.isValue?".":"").length),this.getter=this.path&&d.getter(this.path,!0),this.map=e.map}getValue(t,e,n){let r=this.isContext?n:this.isValue?t:e;return this.getter&&(r=this.getter(r||{})),this.map&&(r=this.map(r)),r}cast(t,e){return this.getValue(t,null==e?void 0:e.parent,null==e?void 0:e.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}P.prototype.__isYupRef=!0;const Z=t=>null==t;function R(t){function e({value:e,path:n="",options:r,originalValue:a,schema:s},i,u){const{name:l,test:o,params:h,message:f,skipAbsent:c}=t;let{parent:d,context:p,abortEarly:b=s.spec.abortEarly}=r;function v(t){return P.isRef(t)?t.getValue(e,d,p):t}function m(t={}){const r=Object.assign({value:e,originalValue:a,label:s.spec.label,path:t.path||n,spec:s.spec},h,t.params);for(const t of Object.keys(r))r[t]=v(r[t]);const i=new C(C.formatError(t.message||f,r),e,r.path,t.type||l);return i.params=r,i}const x=b?i:u;let F={path:n,parent:d,type:l,from:r.from,createError:m,resolve:v,options:r,originalValue:a,schema:s};const y=t=>{C.isError(t)?x(t):t?u(null):x(m())},g=t=>{C.isError(t)?x(t):i(t)},$=c&&Z(e);if(!r.sync){try{Promise.resolve(!!$||o.call(F,e,F)).then(y,g)}catch(t){g(t)}return}let w;try{var O;if(w=!!$||o.call(F,e,F),"function"==typeof(null==(O=w)?void 0:O.then))throw new Error(`Validation test of type: "${F.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`)}catch(t){return void g(t)}y(w)}return e.OPTIONS=t,e}function q(t,e,n,r=n){let a,s,i;return e?(d.forEach(e,((u,l,o)=>{let h=l?u.slice(1,u.length-1):u,f="tuple"===(t=t.resolve({context:r,parent:a,value:n})).type,c=o?parseInt(h,10):0;if(t.innerType||f){if(f&&!o)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${i}" must contain an index to the tuple element, e.g. "${i}[0]"`);if(n&&c>=n.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${u}, in the path: ${e}. because there is no value at that index. `);a=n,n=n&&n[c],t=f?t.spec.types[c]:t.innerType}if(!o){if(!t.fields||!t.fields[h])throw new Error(`The schema does not contain the path: ${e}. (failed at: ${i} which is a type: "${t.type}")`);a=n,n=n&&n[h],t=t.fields[h]}s=h,i=l?"["+u+"]":"."+u})),{schema:t,parent:a,parentPath:s}):{parent:a,parentPath:e,schema:t}}class U extends Set{describe(){const t=[];for(const e of this.values())t.push(P.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const n of this.values())e.push(t(n));return e}clone(){return new U(this.values())}merge(t,e){const n=this.clone();return t.forEach((t=>n.add(t))),e.forEach((t=>n.delete(t))),n}}function L(t,e=new Map){if(z(t)||!t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let n;if(t instanceof Date)n=new Date(t.getTime()),e.set(t,n);else if(t instanceof RegExp)n=new RegExp(t),e.set(t,n);else if(Array.isArray(t)){n=new Array(t.length),e.set(t,n);for(let r=0;r<t.length;r++)n[r]=L(t[r],e)}else if(t instanceof Map){n=new Map,e.set(t,n);for(const[r,a]of t.entries())n.set(r,L(a,e))}else if(t instanceof Set){n=new Set,e.set(t,n);for(const r of t)n.add(L(r,e))}else{if(!(t instanceof Object))throw Error(`Unable to clone ${t}`);n={},e.set(t,n);for(const[r,a]of Object.entries(t))n[r]=L(a,e)}return n}class H{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new U,this._blacklist=new U,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(M.notType)})),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,nullable:!1,optional:!0,coerce:!0},null==t?void 0:t.spec),this.withMutation((t=>{t.nonNullable()}))}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const e=Object.create(Object.getPrototypeOf(this));return e.type=this.type,e._typeCheck=this._typeCheck,e._whitelist=this._whitelist.clone(),e._blacklist=this._blacklist.clone(),e.internalTests=Object.assign({},this.internalTests),e.exclusiveTests=Object.assign({},this.exclusiveTests),e.deps=[...this.deps],e.conditions=[...this.conditions],e.tests=[...this.tests],e.transforms=[...this.transforms],e.spec=L(Object.assign({},this.spec,t)),e}label(t){let e=this.clone();return e.spec.label=t,e}meta(...t){if(0===t.length)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},t[0]),e}withMutation(t){let e=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=e,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&"mixed"!==this.type)throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let e=this,n=t.clone();const r=Object.assign({},e.spec,n.spec);return n.spec=r,n.internalTests=Object.assign({},e.internalTests,n.internalTests),n._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),n.tests=e.tests,n.exclusiveTests=e.exclusiveTests,n.withMutation((e=>{t.tests.forEach((t=>{e.test(t.OPTIONS)}))})),n.transforms=[...e.transforms,...n.transforms],n}isType(t){return null==t?!(!this.spec.nullable||null!==t)||!(!this.spec.optional||void 0!==t):this._typeCheck(t)}resolve(t){let e=this;if(e.conditions.length){let n=e.conditions;e=e.clone(),e.conditions=[],e=n.reduce(((e,n)=>n.resolve(e,t)),e),e=e.resolve(t)}return e}resolveOptions(t){var e,n,r;return Object.assign({},t,{from:t.from||[],strict:null!=(e=t.strict)?e:this.spec.strict,abortEarly:null!=(n=t.abortEarly)?n:this.spec.abortEarly,recursive:null!=(r=t.recursive)?r:this.spec.recursive})}cast(t,e={}){let n=this.resolve(Object.assign({value:t},e)),r="ignore-optionality"===e.assert,a=n._cast(t,e);if(!1!==e.assert&&!n.isType(a)){if(r&&Z(a))return a;let s=k(t),i=k(a);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". \n\nattempted value: ${s} \n`+(i!==s?`result of cast: ${i}`:""))}return a}_cast(t,e){let n=void 0===t?t:this.transforms.reduce(((e,n)=>n.call(this,e,t,this)),t);return void 0===n&&(n=this.getDefault()),n}_validate(t,e={},n,r){let{path:a,originalValue:s=t,strict:i=this.spec.strict}=e,u=t;i||(u=this._cast(u,Object.assign({assert:!1},e)));let l=[];for(let t of Object.values(this.internalTests))t&&l.push(t);this.runTests({path:a,value:u,originalValue:s,options:e,tests:l},n,(t=>{if(t.length)return r(t,u);this.runTests({path:a,value:u,originalValue:s,options:e,tests:this.tests},n,r)}))}runTests(t,e,n){let r=!1,{tests:a,value:s,originalValue:i,path:u,options:l}=t,o=t=>{r||(r=!0,e(t,s))},h=t=>{r||(r=!0,n(t,s))},f=a.length,c=[];if(!f)return h([]);let d={value:s,originalValue:i,path:u,options:l,schema:this};for(let t=0;t<a.length;t++)(0,a[t])(d,o,(function(t){t&&(c=c.concat(t)),--f<=0&&h(c)}))}asNestedTest({key:t,index:e,parent:n,parentPath:r,originalParent:a,options:s}){const i=null!=t?t:e;if(null==i)throw TypeError("Must include `key` or `index` for nested validations");const u="number"==typeof i;let l=n[i];const o=Object.assign({},s,{strict:!0,parent:n,value:l,originalValue:a[i],key:void 0,[u?"index":"key"]:i,path:u||i.includes(".")?`${r||""}[${l?i:`"${i}"`}]`:(r?`${r}.`:"")+t});return(t,e,n)=>this.resolve(o)._validate(l,o,e,n)}validate(t,e){let n=this.resolve(Object.assign({},e,{value:t}));return new Promise(((r,a)=>n._validate(t,e,((t,e)=>{C.isError(t)&&(t.value=e),a(t)}),((t,e)=>{t.length?a(new C(t,e)):r(e)}))))}validateSync(t,e){let n;return this.resolve(Object.assign({},e,{value:t}))._validate(t,Object.assign({},e,{sync:!0}),((t,e)=>{throw C.isError(t)&&(t.value=e),t}),((e,r)=>{if(e.length)throw new C(e,t);n=r})),n}isValid(t,e){return this.validate(t,e).then((()=>!0),(t=>{if(C.isError(t))return!1;throw t}))}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(t){if(C.isError(t))return!1;throw t}}_getDefault(){let t=this.spec.default;return null==t?t:"function"==typeof t?t.call(this):L(t)}getDefault(t){return this.resolve(t||{})._getDefault()}default(t){return 0===arguments.length?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,e){const n=this.clone({nullable:t});return n.internalTests.nullable=R({message:e,name:"nullable",test(t){return null!==t||this.schema.spec.nullable}}),n}optionality(t,e){const n=this.clone({optional:t});return n.internalTests.optionality=R({message:e,name:"optionality",test(t){return void 0!==t||this.schema.spec.optional}}),n}optional(){return this.optionality(!0)}defined(t=M.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=M.notNull){return this.nullability(!1,t)}required(t=M.required){return this.clone().withMutation((e=>e.nonNullable(t).defined(t)))}notRequired(){return this.clone().withMutation((t=>t.nullable().optional()))}transform(t){let e=this.clone();return e.transforms.push(t),e}test(...t){let e;if(e=1===t.length?"function"==typeof t[0]?{test:t[0]}:t[0]:2===t.length?{name:t[0],test:t[1]}:{name:t[0],message:t[1],test:t[2]},void 0===e.message&&(e.message=M.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");let n=this.clone(),r=R(e),a=e.exclusive||e.name&&!0===n.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(n.exclusiveTests[e.name]=!!e.exclusive),n.tests=n.tests.filter((t=>{if(t.OPTIONS.name===e.name){if(a)return!1;if(t.OPTIONS.test===r.OPTIONS.test)return!1}return!0})),n.tests.push(r),n}when(t,e){Array.isArray(t)||"string"==typeof t||(e=t,t=".");let n=this.clone(),r=S(t).map((t=>new P(t)));return r.forEach((t=>{t.isSibling&&n.deps.push(t.key)})),n.conditions.push("function"==typeof e?new I(r,e):I.fromOptions(r,e)),n}typeError(t){let e=this.clone();return e.internalTests.typeError=R({message:t,name:"typeError",test(t){return!(!Z(t)&&!this.schema._typeCheck(t))||this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=M.oneOf){let n=this.clone();return t.forEach((t=>{n._whitelist.add(t),n._blacklist.delete(t)})),n.internalTests.whiteList=R({message:e,name:"oneOf",skipAbsent:!0,test(t){let e=this.schema._whitelist,n=e.resolveAll(this.resolve);return!!n.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:n}})}}),n}notOneOf(t,e=M.notOneOf){let n=this.clone();return t.forEach((t=>{n._blacklist.add(t),n._whitelist.delete(t)})),n.internalTests.blacklist=R({message:e,name:"notOneOf",test(t){let e=this.schema._blacklist,n=e.resolveAll(this.resolve);return!n.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:n}})}}),n}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:n,meta:r,optional:a,nullable:s}=e.spec;return{meta:r,label:n,optional:a,nullable:s,default:e.getDefault(t),type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map((t=>({name:t.OPTIONS.name,params:t.OPTIONS.params}))).filter(((t,e,n)=>n.findIndex((e=>e.name===t.name))===e))}}}H.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])H.prototype[`${t}At`]=function(e,n,r={}){const{parent:a,parentPath:s,schema:i}=q(this,e,n,r.context);return i[t](a&&a[s],Object.assign({},r,{parent:a,path:e}))};for(const t of["equals","is"])H.prototype[t]=H.prototype.oneOf;for(const t of["not","nope"])H.prototype[t]=H.prototype.notOneOf;let W=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,K=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Y=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,J=t=>Z(t)||t===t.trim(),G={}.toString();function B(){return new X}class X extends H{constructor(){super({type:"string",check:t=>(t instanceof String&&(t=t.valueOf()),"string"==typeof t)}),this.withMutation((()=>{this.transform(((t,e,n)=>{if(!n.spec.coerce||n.isType(t))return t;if(Array.isArray(t))return t;const r=null!=t&&t.toString?t.toString():t;return r===G?t:r}))}))}required(t){return super.required(t).withMutation((e=>e.test({message:t||M.required,name:"required",skipAbsent:!0,test:t=>!!t.length})))}notRequired(){return super.notRequired().withMutation((t=>(t.tests=t.tests.filter((t=>"required"!==t.OPTIONS.name)),t)))}length(t,e=T.length){return this.test({message:e,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(e){return e.length===this.resolve(t)}})}min(t,e=T.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(e){return e.length>=this.resolve(t)}})}max(t,e=T.max){return this.test({name:"max",exclusive:!0,message:e,params:{max:t},skipAbsent:!0,test(e){return e.length<=this.resolve(t)}})}matches(t,e){let n,r,a=!1;return e&&("object"==typeof e?({excludeEmptyString:a=!1,message:n,name:r}=e):n=e),this.test({name:r||"matches",message:n||T.matches,params:{regex:t},skipAbsent:!0,test:e=>""===e&&a||-1!==e.search(t)})}email(t=T.email){return this.matches(W,{name:"email",message:t,excludeEmptyString:!0})}url(t=T.url){return this.matches(K,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=T.uuid){return this.matches(Y,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform((t=>null===t?"":t))}trim(t=T.trim){return this.transform((t=>null!=t?t.trim():t)).test({message:t,name:"trim",test:J})}lowercase(t=T.lowercase){return this.transform((t=>Z(t)?t:t.toLowerCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Z(t)||t===t.toLowerCase()})}uppercase(t=T.uppercase){return this.transform((t=>Z(t)?t:t.toUpperCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>Z(t)||t===t.toUpperCase()})}}function Q(t,e){let n=1/0;return t.some(((t,r)=>{var a;if(null!=(a=e.path)&&a.includes(t))return n=r,!0})),n}function tt(t){return(e,n)=>Q(t,e)-Q(t,n)}B.prototype=X.prototype;const et=(t,e,n)=>{if("string"!=typeof t)return t;let r=t;try{r=JSON.parse(t)}catch(t){}return n.isType(r)?r:t};function nt(t){if("fields"in t){const e={};for(const[n,r]of Object.entries(t.fields))e[n]=nt(r);return t.setFields(e)}if("array"===t.type){const e=t.optional();return e.innerType&&(e.innerType=nt(e.innerType)),e}return"tuple"===t.type?t.optional().clone({types:t.spec.types.map(nt)}):"optional"in t?t.optional():t}let rt=t=>"[object Object]"===Object.prototype.toString.call(t);const at=tt([]);function st(t){return new it(t)}class it extends H{constructor(t){super({type:"object",check:t=>rt(t)||"function"==typeof t}),this.fields=Object.create(null),this._sortErrors=at,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{t&&this.shape(t)}))}_cast(t,e={}){var n;let r=super._cast(t,e);if(void 0===r)return this.getDefault();if(!this._typeCheck(r))return r;let a=this.fields,s=null!=(n=e.stripUnknown)?n:this.spec.noUnknown,i=[].concat(this._nodes,Object.keys(r).filter((t=>!this._nodes.includes(t)))),u={},l=Object.assign({},e,{parent:u,__validating:e.__validating||!1}),o=!1;for(const t of i){let n=a[t],i=t in r;if(n){let a,s=r[t];l.path=(e.path?`${e.path}.`:"")+t,n=n.resolve({value:s,context:e.context,parent:u});let i=n instanceof H?n.spec:void 0,h=null==i?void 0:i.strict;if(null!=i&&i.strip){o=o||t in r;continue}a=e.__validating&&h?r[t]:n.cast(r[t],l),void 0!==a&&(u[t]=a)}else i&&!s&&(u[t]=r[t]);i===t in u&&u[t]===r[t]||(o=!0)}return o?u:r}_validate(t,e={},n,r){let{from:a=[],originalValue:s=t,recursive:i=this.spec.recursive}=e;e.from=[{schema:this,value:s},...a],e.__validating=!0,e.originalValue=s,super._validate(t,e,n,((t,a)=>{if(!i||!rt(a))return void r(t,a);s=s||a;let u=[];for(let t of this._nodes){let n=this.fields[t];n&&!P.isRef(n)&&u.push(n.asNestedTest({options:e,key:t,parent:a,parentPath:e.path,originalParent:s}))}this.runTests({tests:u,value:a,originalValue:s,options:e},n,(e=>{r(e.sort(this._sortErrors).concat(t),a)}))}))}clone(t){const e=super.clone(t);return e.fields=Object.assign({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}concat(t){let e=super.concat(t),n=e.fields;for(let[t,e]of Object.entries(this.fields)){const r=n[t];n[t]=void 0===r?e:r}return e.withMutation((t=>t.setFields(n,this._excludedEdges)))}_getDefault(){if("default"in this.spec)return super._getDefault();if(!this._nodes.length)return;let t={};return this._nodes.forEach((e=>{const n=this.fields[e];t[e]=n&&"getDefault"in n?n.getDefault():void 0})),t}setFields(t,e){let n=this.clone();return n.fields=t,n._nodes=function(t,e=[]){let n=[],r=new Set,a=new Set(e.map((([t,e])=>`${t}-${e}`)));function s(t,e){let s=d.split(t)[0];r.add(s),a.has(`${e}-${s}`)||n.push([e,s])}for(const e of Object.keys(t)){let n=t[e];r.add(e),P.isRef(n)&&n.isSibling?s(n.path,e):z(n)&&"deps"in n&&n.deps.forEach((t=>s(t,e)))}return $.array(Array.from(r),n).reverse()}(t,e),n._sortErrors=tt(Object.keys(t)),e&&(n._excludedEdges=e),n}shape(t,e=[]){return this.clone().withMutation((n=>{let r=n._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),r=[...n._excludedEdges,...e]),n.setFields(Object.assign(n.fields,t),r)}))}partial(){const t={};for(const[e,n]of Object.entries(this.fields))t[e]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return nt(this)}pick(t){const e={};for(const n of t)this.fields[n]&&(e[n]=this.fields[n]);return this.setFields(e)}omit(t){const e=Object.assign({},this.fields);for(const n of t)delete e[n];return this.setFields(e)}from(t,e,n){let r=d.getter(t,!0);return this.transform((a=>{if(!a)return a;let s=a;return((t,e)=>{const n=[...d.normalizePath(e)];if(1===n.length)return n[0]in t;let r=n.pop(),a=d.getter(d.join(n),!0)(t);return!(!a||!(r in a))})(a,t)&&(s=Object.assign({},a),n||delete s[t],s[e]=r(a)),s}))}json(){return this.transform(et)}noUnknown(t=!0,e=N.noUnknown){"boolean"!=typeof t&&(e=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:e,test(e){if(null==e)return!0;const n=function(t,e){let n=Object.keys(t.fields);return Object.keys(e).filter((t=>-1===n.indexOf(t)))}(this.schema,e);return!t||0===n.length||this.createError({params:{unknown:n.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,e=N.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform((e=>{if(!e)return e;const n={};for(const r of Object.keys(e))n[t(r)]=e[r];return n}))}camelCase(){return this.transformKeys(y)}snakeCase(){return this.transformKeys(g)}constantCase(){return this.transformKeys((t=>g(t).toUpperCase()))}describe(t){let e=super.describe(t);e.fields={};for(const[r,a]of Object.entries(this.fields)){var n;let s=t;null!=(n=s)&&n.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),e.fields[r]=a.describe(s)}return e}}st.prototype=it.prototype;const ut=st({address_line1:B().required("Enter street address"),address_line2:B(),address_city:B().required("Enter city"),address_state:B().required("Choose state"),address_postal_code:B().required("Enter ZIP").matches(/^\d{5}/,"Enter a valid ZIP").min(5,"Enter a valid ZIP")}),lt=[{label:"Choose state",value:""},{label:"Alabama",value:"AL"},{label:"Alaska",value:"AK"},{label:"American Samoa",value:"AS"},{label:"Arizona",value:"AZ"},{label:"Arkansas",value:"AR"},{label:"California",value:"CA"},{label:"Colorado",value:"CO"},{label:"Connecticut",value:"CT"},{label:"Delaware",value:"DE"},{label:"District Of Columbia",value:"DC"},{label:"Federated States Of Micronesia",value:"FM"},{label:"Florida",value:"FL"},{label:"Georgia",value:"GA"},{label:"Guam",value:"GU"},{label:"Hawaii",value:"HI"},{label:"Idaho",value:"ID"},{label:"Illinois",value:"IL"},{label:"Indiana",value:"IN"},{label:"Iowa",value:"IA"},{label:"Kansas",value:"KS"},{label:"Kentucky",value:"KY"},{label:"Louisiana",value:"LA"},{label:"Maine",value:"ME"},{label:"Marshall Islands",value:"MH"},{label:"Maryland",value:"MD"},{label:"Massachusetts",value:"MA"},{label:"Michigan",value:"MI"},{label:"Minnesota",value:"MN"},{label:"Mississippi",value:"MS"},{label:"Missouri",value:"MO"},{label:"Montana",value:"MT"},{label:"Nebraska",value:"NE"},{label:"Nevada",value:"NV"},{label:"New Hampshire",value:"NH"},{label:"New Jersey",value:"NJ"},{label:"New Mexico",value:"NM"},{label:"New York",value:"NY"},{label:"North Carolina",value:"NC"},{label:"North Dakota",value:"ND"},{label:"Northern Mariana Islands",value:"MP"},{label:"Ohio",value:"OH"},{label:"Oklahoma",value:"OK"},{label:"Oregon",value:"OR"},{label:"Palau",value:"PW"},{label:"Pennsylvania",value:"PA"},{label:"Puerto Rico",value:"PR"},{label:"Rhode Island",value:"RI"},{label:"South Carolina",value:"SC"},{label:"South Dakota",value:"SD"},{label:"Tennessee",value:"TN"},{label:"Texas",value:"TX"},{label:"Utah",value:"UT"},{label:"Vermont",value:"VT"},{label:"Virgin Islands",value:"VI"},{label:"Virginia",value:"VA"},{label:"Washington",value:"WA"},{label:"West Virginia",value:"WV"},{label:"Wisconsin",value:"WI"},{label:"Wyoming",value:"WY"}],ot=class{constructor(n){t(this,n),this.legendBlock=e("legend",null,this.legend),this.legend=void 0,this.billingFields={address_line1:"",address_line2:"",address_city:"",address_state:"",address_postal_code:""},this.billingFieldsErrors={}}setFormValue(t){const e=t.detail,n=Object.assign({},this.billingFields);e.name&&(n[e.name]=e.value,this.billingFields=n)}async fill(t){this.billingFields=Object.assign({},t)}async validate(){const t={};let e=!0;try{await ut.validate(this.billingFields,{abortEarly:!1})}catch(n){e=!1,n.inner.map((e=>{t[e.path]=e.message}))}return this.billingFieldsErrors=t,{isValid:e}}async getValues(){return this.billingFields}render(){return e(n,null,e("fieldset",null,this.legend&&this.legendBlock,e("text-input",{name:"address_line1",label:"Street Address",defaultValue:this.billingFields.address_line1,error:this.billingFieldsErrors.address_line1}),e("text-input",{name:"address_line2",label:"Apartment, Suite, etc. (optional)",defaultValue:this.billingFields.address_line2,error:this.billingFieldsErrors.address_line2}),e("text-input",{name:"address_city",label:"City",defaultValue:this.billingFields.address_city,error:this.billingFieldsErrors.address_city}),e("select-input",{name:"address_state",label:"State",options:lt,defaultValue:this.billingFields.address_state,error:this.billingFieldsErrors.address_state}),e("text-input",{name:"address_postal_code",label:"ZIP",defaultValue:this.billingFields.address_postal_code,error:this.billingFieldsErrors.address_postal_code})))}};ot.style=":host{display:block}label{display:block}input{margin-bottom:8px}";const ht={bankAccount:"Bank Account",card:"Card"},ft=class{constructor(e){t(this,e),this.paymentMethodSelected=r(this,"paymentMethodSelected",7),this.paymentMethodTypes=[],this.selectedPaymentMethodType=void 0}onChangeHandler(t){this.paymentMethodSelected.emit(t.target.value)}render(){return e("div",null,this.paymentMethodTypes.map((t=>e("div",null,e("input",{id:t,type:"radio",name:"paymentMethodType",value:t,onChange:t=>this.onChangeHandler(t),checked:this.selectedPaymentMethodType===t}),e("label",{htmlFor:t},ht[t])))))}};export{ot as justifi_billing_form,ft as justifi_payment_method_selector}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,H as s}from"./p-9f34a2c1.js";const a={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"}},r=class{constructor(i){t(this,i),this.paymentMethodFormReady=e(this,"paymentMethodFormReady",7),this.paymentMethodFormTokenize=e(this,"paymentMethodFormTokenize",7),this.paymentMethodFormType=void 0,this.paymentMethodFormValidationStrategy=void 0,this.paymentMethodStyleOverrides=void 0,this.iframeOrigin=void 0,this.height=55}connectedCallback(){window.addEventListener("message",this.dispatchMessageEvent.bind(this))}disconnectedCallback(){window.removeEventListener("message",this.dispatchMessageEvent.bind(this))}componentShouldUpdate(){this.sendStyleOverrides()}sendStyleOverrides(){this.paymentMethodStyleOverrides&&this.postMessage(a[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.paymentMethodStyleOverrides})}dispatchMessageEvent(t){const e=t.data,i=e.eventType,s=e.data;i===a[this.paymentMethodFormType].ready&&this.paymentMethodFormReady.emit(s),i===a[this.paymentMethodFormType].resize&&(this.height=s.height)}postMessage(t,e){this.iframeElement&&this.iframeElement.contentWindow.postMessage(Object.assign({eventType:t},e),"*")}async postMessageWithResponseListener(t,e){return new Promise((i=>{const s=e=>{e.data.eventType===t&&(window.removeEventListener("message",s),i(e.data.data))};window.addEventListener("message",s),this.postMessage(t,e)}))}async tokenize(t,e,i){return this.postMessageWithResponseListener(a[this.paymentMethodFormType].tokenize,{clientId:t,componentVersion:"0.
|
|
1
|
+
import{r as t,c as e,h as i,H as s}from"./p-9f34a2c1.js";const a={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"}},r=class{constructor(i){t(this,i),this.paymentMethodFormReady=e(this,"paymentMethodFormReady",7),this.paymentMethodFormTokenize=e(this,"paymentMethodFormTokenize",7),this.paymentMethodFormType=void 0,this.paymentMethodFormValidationStrategy=void 0,this.paymentMethodStyleOverrides=void 0,this.iframeOrigin=void 0,this.height=55}connectedCallback(){window.addEventListener("message",this.dispatchMessageEvent.bind(this))}disconnectedCallback(){window.removeEventListener("message",this.dispatchMessageEvent.bind(this))}componentShouldUpdate(){this.sendStyleOverrides()}sendStyleOverrides(){this.paymentMethodStyleOverrides&&this.postMessage(a[this.paymentMethodFormType].styleOverrides,{styleOverrides:this.paymentMethodStyleOverrides})}dispatchMessageEvent(t){const e=t.data,i=e.eventType,s=e.data;i===a[this.paymentMethodFormType].ready&&this.paymentMethodFormReady.emit(s),i===a[this.paymentMethodFormType].resize&&(this.height=s.height)}postMessage(t,e){this.iframeElement&&this.iframeElement.contentWindow.postMessage(Object.assign({eventType:t},e),"*")}async postMessageWithResponseListener(t,e){return new Promise((i=>{const s=e=>{e.data.eventType===t&&(window.removeEventListener("message",s),i(e.data.data))};window.addEventListener("message",s),this.postMessage(t,e)}))}async tokenize(t,e,i){return this.postMessageWithResponseListener(a[this.paymentMethodFormType].tokenize,{clientId:t,componentVersion:"0.4.0",paymentMethodMetadata:e,account:i})}async validate(){return this.postMessageWithResponseListener(a[this.paymentMethodFormType].validate)}getIframeSrc(){let t=`${this.iframeOrigin||"https://js.justifi.ai/v2"}/${this.paymentMethodFormType}`;return this.paymentMethodFormValidationStrategy&&(t+=`?validationStrategy=${this.paymentMethodFormValidationStrategy}`),t}render(){return i(s,null,i("iframe",{id:`justifi-payment-method-form-${this.paymentMethodFormType}`,src:this.getIframeSrc(),ref:t=>this.iframeElement=t,height:this.height}))}static get watchers(){return{paymentMethodStyleOverrides:["sendStyleOverrides"]}}};r.style=":host{display:block}justifi-payment-method-form iframe{border:none;width:100%}";export{r as justifi_payment_method_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,H as s}from"./p-9f34a2c1.js";import{P as e}from"./p-21e020a8.js";const h=class{constructor(i){t(this,i),this.bankAccount=void 0,this.card=void 0,this.iframeOrigin=void 0,this.selectedPaymentMethodType=void 0,this.allowedPaymentMethodTypes=[]}connectedCallback(){this.card&&this.allowedPaymentMethodTypes.push(e.card),this.bankAccount&&this.allowedPaymentMethodTypes.push(e.bankAccount),this.allowedPaymentMethodTypes.length||this.allowedPaymentMethodTypes.push(e.card),this.selectedPaymentMethodType=this.allowedPaymentMethodTypes[0]}paymentMethodSelectedHandler(t){this.selectedPaymentMethodType=t.detail}async fillBillingForm(t){this.billingFormRef.fill(t)}async submit(t){if(!this.paymentMethodFormRef||!this.billingFormRef)return;const i=await this.billingFormRef.validate(),s=await this.paymentMethodFormRef.validate();if(!i.isValid||!s.isValid)return;const e=await this.billingFormRef.getValues(),h=Object.assign(Object.assign({},t.paymentMethodData),e);return this.paymentMethodFormRef.tokenize(t.clientId,h,t.accountId)}render(){return i(s,null,i("form",null,this.allowedPaymentMethodTypes.length>1&&i("justifi-payment-method-selector",{paymentMethodTypes:this.allowedPaymentMethodTypes,selectedPaymentMethodType:this.selectedPaymentMethodType}),i("justifi-payment-method-form",{"payment-method-form-type":this.selectedPaymentMethodType,"iframe-origin":this.iframeOrigin,ref:t=>{t&&(this.paymentMethodFormRef=t)}}),i("justifi-billing-form",{ref:t=>{t&&(this.billingFormRef=t)}})))}};export{h as justifi_payment_form}
|
|
1
|
+
import{r as t,h as i,H as s}from"./p-9f34a2c1.js";import{P as e}from"./p-21e020a8.js";const h=class{constructor(i){t(this,i),this.bankAccount=void 0,this.card=void 0,this.iframeOrigin=void 0,this.selectedPaymentMethodType=void 0,this.allowedPaymentMethodTypes=[]}connectedCallback(){this.card&&this.allowedPaymentMethodTypes.push(e.card),this.bankAccount&&this.allowedPaymentMethodTypes.push(e.bankAccount),this.allowedPaymentMethodTypes.length||this.allowedPaymentMethodTypes.push(e.card),this.selectedPaymentMethodType=this.allowedPaymentMethodTypes[0]}paymentMethodSelectedHandler(t){this.selectedPaymentMethodType=t.detail}async fillBillingForm(t){this.billingFormRef.fill(t)}async submit(t){if(!this.paymentMethodFormRef||!this.billingFormRef)return;const i=await this.billingFormRef.validate(),s=await this.paymentMethodFormRef.validate();if(!i.isValid||!s.isValid)return;const e=await this.billingFormRef.getValues(),h=Object.assign(Object.assign({},t.paymentMethodData),e);return this.paymentMethodFormRef.tokenize(t.clientId,h,t.accountId)}render(){return i(s,null,i("form",null,this.allowedPaymentMethodTypes.length>1&&i("justifi-payment-method-selector",{paymentMethodTypes:this.allowedPaymentMethodTypes,selectedPaymentMethodType:this.selectedPaymentMethodType}),i("justifi-payment-method-form",{"payment-method-form-type":this.selectedPaymentMethodType,"iframe-origin":this.iframeOrigin,ref:t=>{t&&(this.paymentMethodFormRef=t)}}),i("justifi-billing-form",{legend:"Billing Info",ref:t=>{t&&(this.billingFormRef=t)}})))}};export{h as justifi_payment_form}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as t}from"./p-9f34a2c1.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-
|
|
1
|
+
import{p as e,b as t}from"./p-9f34a2c1.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-92ca574f",[[0,"justifi-payment-form",{bankAccount:[4,"bank-account"],card:[4],iframeOrigin:[1,"iframe-origin"],selectedPaymentMethodType:[32],allowedPaymentMethodTypes:[32],fillBillingForm:[64],submit:[64]},[[0,"paymentMethodSelected","paymentMethodSelectedHandler"]]]]],["p-6633de1b",[[0,"justifi-bank-account-form",{validationStrategy:[1025,"validation-strategy"],styleOverrides:[1025,"style-overrides"],iframeOrigin:[1025,"iframe-origin"],internalStyleOverrides:[32],tokenize:[64],validate:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-68e47ee5",[[0,"justifi-card-form",{validationStrategy:[1025,"validation-strategy"],styleOverrides:[1025,"style-overrides"],iframeOrigin:[1025,"iframe-origin"],internalStyleOverrides:[32],tokenize:[64],validate:[64]},[[0,"paymentMethodFormReady","readyHandler"],[0,"paymentMethodFormTokenize","tokenizeHandler"],[0,"paymentMethodFormValidate","validateHandler"]]]]],["p-6c3a226e",[[1,"justifi-payments-list",{accountId:[1,"account-id"],auth:[16],payments:[32]}]]],["p-763a2b4f",[[1,"select-input",{name:[1],label:[1],defaultValue:[1,"default-value"],error:[1],options:[16],internalValue:[32]}],[1,"text-input",{name:[1],label:[1],defaultValue:[1,"default-value"],error:[1],internalValue:[32]}]]],["p-2e5be95e",[[1,"justifi-billing-form",{legend:[1],billingFields:[32],billingFieldsErrors:[32],fill:[64],validate:[64],getValues:[64]},[[0,"fieldReceivedInput","setFormValue"]]],[0,"justifi-payment-method-selector",{paymentMethodTypes:[16],selectedPaymentMethodType:[1,"selected-payment-method-type"]}]]],["p-6a9c764f",[[0,"justifi-payment-method-form",{paymentMethodFormType:[1,"payment-method-form-type"],paymentMethodFormValidationStrategy:[1025,"payment-method-form-validation-strategy"],paymentMethodStyleOverrides:[16],iframeOrigin:[1,"iframe-origin"],height:[32],tokenize:[64],validate:[64]}]]]],e)));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@justifi/webcomponents",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "JustiFi Web Components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"build": "stencil build --docs",
|
|
27
27
|
"start": "concurrently -c \"bgBlue.bold,bgMagenta.bold,bgGreen.bold\" \"yarn run start-stencil\" \"yarn run storybook\"",
|
|
28
28
|
"start-stencil": "stencil build --watch --serve --no-open",
|
|
29
|
-
"test": "stencil test --spec
|
|
30
|
-
"test:watch": "stencil test --spec --
|
|
29
|
+
"test": "stencil test --spec",
|
|
30
|
+
"test:watch": "stencil test --spec --watchAll",
|
|
31
31
|
"generate": "stencil generate",
|
|
32
32
|
"storybook": "storybook dev -p 6006 --quiet",
|
|
33
33
|
"build-storybook": "storybook build"
|
|
@@ -52,7 +52,10 @@
|
|
|
52
52
|
"@storybook/html-webpack5": "^7.0.4",
|
|
53
53
|
"@storybook/jest": "^0.1.0",
|
|
54
54
|
"@storybook/testing-library": "^0.1.0",
|
|
55
|
-
"@types/jest": "
|
|
55
|
+
"@types/jest": "27.0.3",
|
|
56
|
+
"@types/node": "^18.15.11",
|
|
57
|
+
"@types/react": "^18.0.37",
|
|
58
|
+
"@types/react-dom": "^18.0.11",
|
|
56
59
|
"auto-changelog": "^2.4.0",
|
|
57
60
|
"concurrently": "^7.6.0",
|
|
58
61
|
"jest": "^27.4.5",
|
|
@@ -64,4 +67,4 @@
|
|
|
64
67
|
"storybook": "^7.0.4"
|
|
65
68
|
},
|
|
66
69
|
"license": "MIT"
|
|
67
|
-
}
|
|
70
|
+
}
|