adp-web-components 0.0.24 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/dead-stock-lookup.cjs.entry.js +1 -1
- package/dist/cjs/distributor-lookup.cjs.entry.js +1 -1
- package/dist/cjs/dynamic-claim_6.cjs.entry.js +5 -5
- package/dist/cjs/form-input.cjs.entry.js +1 -1
- package/dist/cjs/general-inquiry-form.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/manufacturer-lookup.cjs.entry.js +1 -1
- package/dist/cjs/shift-components.cjs.js +1 -1
- package/dist/cjs/vehicle-lookup.cjs.entry.js +16 -9
- package/dist/collection/collection-manifest.json +4 -4
- package/dist/collection/components/form-input/form-input.js +1 -1
- package/dist/collection/components/general-inquiry-form/general-inquiry-form.js +1 -1
- package/dist/collection/components/part-lookup/dead-stock-lookup.js +1 -1
- package/dist/collection/components/part-lookup/distributor-lookup.js +1 -1
- package/dist/collection/components/part-lookup/manufacturer-lookup.js +1 -1
- package/dist/collection/components/vehicle-accessories/vehicle-accessories.js +3 -3
- package/dist/collection/components/vehicle-lookup/vehicle-lookup.js +34 -46
- package/dist/collection/components/vehicle-specification/vehicle-specification.js +1 -1
- package/dist/collection/components/warranty-details/warranty-details.js +1 -1
- package/dist/components/dead-stock-lookup.js +1 -1
- package/dist/components/distributor-lookup.js +1 -1
- package/dist/components/form-input.js +1 -1
- package/dist/components/general-inquiry-form.js +1 -1
- package/dist/components/manufacturer-lookup.js +1 -1
- package/dist/components/{p-23551e81.js → p-044025a6.js} +1 -1
- package/dist/components/{p-e46b126e.js → p-442f4eff.js} +1 -1
- package/dist/components/{p-c8eef708.js → p-84427fef.js} +1 -1
- package/dist/components/{p-3bf0339d.js → p-b90fd51c.js} +1 -1
- package/dist/components/vehicle-accessories.js +1 -1
- package/dist/components/vehicle-lookup.js +1 -1
- package/dist/components/vehicle-specification.js +1 -1
- package/dist/components/warranty-details.js +1 -1
- package/dist/esm/dead-stock-lookup.entry.js +1 -1
- package/dist/esm/distributor-lookup.entry.js +1 -1
- package/dist/esm/dynamic-claim_6.entry.js +5 -5
- package/dist/esm/form-input.entry.js +1 -1
- package/dist/esm/general-inquiry-form.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/manufacturer-lookup.entry.js +1 -1
- package/dist/esm/shift-components.js +1 -1
- package/dist/esm/vehicle-lookup.entry.js +16 -9
- package/dist/shift-components/{p-217fe893.entry.js → p-0cce310b.entry.js} +1 -1
- package/dist/shift-components/p-2f7785d3.entry.js +5 -0
- package/dist/shift-components/{p-3f3b41b4.entry.js → p-48efd004.entry.js} +1 -1
- package/dist/shift-components/{p-1a727cfd.entry.js → p-73fa9b86.entry.js} +1 -1
- package/dist/shift-components/{p-4c3f2850.entry.js → p-9f58a33b.entry.js} +1 -1
- package/dist/shift-components/{p-b114d9fc.entry.js → p-cb379a17.entry.js} +1 -1
- package/dist/shift-components/{p-15e82b1a.entry.js → p-fad254c9.entry.js} +1 -1
- package/dist/shift-components/shift-components.esm.js +1 -1
- package/dist/types/components/vehicle-lookup/vehicle-lookup.d.ts +11 -2
- package/dist/types/components.d.ts +5 -15
- package/package.json +1 -1
- package/dist/shift-components/p-9427d4ab.entry.js +0 -5
|
@@ -7,7 +7,7 @@ import cn from "../../global/lib/cn";
|
|
|
7
7
|
import validateVin from "../../global/lib/validate-vin";
|
|
8
8
|
export class VehicleLookup {
|
|
9
9
|
constructor() {
|
|
10
|
-
this.
|
|
10
|
+
this.activeElement = '';
|
|
11
11
|
this.baseUrl = '';
|
|
12
12
|
this.isDev = false;
|
|
13
13
|
this.queryString = '';
|
|
@@ -25,8 +25,15 @@ export class VehicleLookup {
|
|
|
25
25
|
const vehicleHistory = this.el.getElementsByTagName('service-history')[0];
|
|
26
26
|
const vehicleThickness = this.el.getElementsByTagName('paint-thickness')[0];
|
|
27
27
|
const vehicleClaim = this.el.getElementsByTagName('dynamic-claim')[0];
|
|
28
|
-
this.componentsList =
|
|
29
|
-
|
|
28
|
+
this.componentsList = {
|
|
29
|
+
'vehicle-specification': vehicleSpecification,
|
|
30
|
+
'vehicle-accessories': vehicleAccessories,
|
|
31
|
+
'warranty-details': vehicleDetails,
|
|
32
|
+
'service-history': vehicleHistory,
|
|
33
|
+
'paint-thickness': vehicleThickness,
|
|
34
|
+
'dynamic-claim': vehicleClaim,
|
|
35
|
+
};
|
|
36
|
+
Object.values(this.componentsList).forEach(element => {
|
|
30
37
|
if (!element)
|
|
31
38
|
return;
|
|
32
39
|
if (this.loadingStateChanged)
|
|
@@ -41,7 +48,7 @@ export class VehicleLookup {
|
|
|
41
48
|
this.blazorRef.invokeMethodAsync(this.blazorErrorStateListener, newState);
|
|
42
49
|
}
|
|
43
50
|
async handleLoadingListenerPropChange(newProp) {
|
|
44
|
-
this.componentsList.forEach(element => {
|
|
51
|
+
Object.values(this.componentsList).forEach(element => {
|
|
45
52
|
if (!element)
|
|
46
53
|
return;
|
|
47
54
|
element.loadingStateChange = newProp;
|
|
@@ -49,7 +56,7 @@ export class VehicleLookup {
|
|
|
49
56
|
}
|
|
50
57
|
async handleBlazorLoadingRefChange(loadingInvokeRef) {
|
|
51
58
|
if (this.blazorRef) {
|
|
52
|
-
this.componentsList.forEach(element => {
|
|
59
|
+
Object.values(this.componentsList).forEach(element => {
|
|
53
60
|
if (!element)
|
|
54
61
|
return;
|
|
55
62
|
element.loadingStateChange = newState => this.blazorRef.invokeMethodAsync(loadingInvokeRef, newState);
|
|
@@ -59,7 +66,7 @@ export class VehicleLookup {
|
|
|
59
66
|
async setBlazorRef(newBlazorRef) {
|
|
60
67
|
this.blazorRef = newBlazorRef;
|
|
61
68
|
if (this.blazorOnLoadingStateChange) {
|
|
62
|
-
this.componentsList.forEach(element => {
|
|
69
|
+
Object.values(this.componentsList).forEach(element => {
|
|
63
70
|
if (!element)
|
|
64
71
|
return;
|
|
65
72
|
element.loadingStateChange = newState => this.blazorRef.invokeMethodAsync(this.blazorOnLoadingStateChange, newState);
|
|
@@ -67,7 +74,7 @@ export class VehicleLookup {
|
|
|
67
74
|
}
|
|
68
75
|
}
|
|
69
76
|
async fetchVin(vin, headers = {}) {
|
|
70
|
-
const activeElement = this.componentsList[this.
|
|
77
|
+
const activeElement = this.componentsList[this.activeElement] || null;
|
|
71
78
|
this.wrapperErrorState = '';
|
|
72
79
|
if (!activeElement)
|
|
73
80
|
return;
|
|
@@ -81,13 +88,13 @@ export class VehicleLookup {
|
|
|
81
88
|
return { componentsList: this.componentsList };
|
|
82
89
|
}
|
|
83
90
|
handleLoadData(newResponse, activeElement) {
|
|
84
|
-
this.componentsList.forEach(element => {
|
|
91
|
+
Object.values(this.componentsList).forEach(element => {
|
|
85
92
|
if (element !== null && element !== activeElement && newResponse)
|
|
86
93
|
element.setData(newResponse);
|
|
87
94
|
});
|
|
88
95
|
}
|
|
89
96
|
render() {
|
|
90
|
-
return (h(Host, { key: '
|
|
97
|
+
return (h(Host, { key: '915de37781baebae7789ef128265b621552ea367' }, h("div", { key: '28c7621a5614d64a760e338afec183f80e3e4292', class: cn('w-full', { hidden: this.activeElement !== 'vehicle-specification' }) }, h("vehicle-specification", { key: '3e02c7a30048634186044f763653a1d93ae2392d', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: '55672a129b9fb6e9d2d1b44ae79bc0e8f829f2c9', class: cn('w-full', { hidden: this.activeElement !== 'vehicle-accessories' }) }, h("vehicle-accessories", { key: 'e9d16fc4f81221a890d8853da14f2b80ce774c13', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: '88fa2420a94db307dd8900972b137dbfbc6be79d', class: cn('w-full', { hidden: this.activeElement !== 'warranty-details' }) }, h("warranty-details", { key: 'bb6cdb852a4deed8819b471c65047a623f5e6d6b', "show-ssc": "true", "show-warranty": "true", isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString }, h("slot", { key: '7a00495c356c566c1643ee4246c7887924529ddf' }))), h("div", { key: '74acc9254ac994fd708858e9089b58f58da20952', class: cn('w-full', { hidden: this.activeElement !== 'service-history' }) }, h("service-history", { key: '6959bdd34fadac6a36d61f4b2ac1c5c3f8bd9a34', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: '71748aefc8a90526c5ec78ee353bd011fbe069b1', class: cn('w-full', { hidden: this.activeElement !== 'paint-thickness' }) }, h("paint-thickness", { key: '71da10b78a94011bedca1d5bbf7e351968d53e52', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString })), h("div", { key: 'b786c15b52fb6f663848c6c4cdc27e163f579652', class: cn('w-full', { hidden: this.activeElement !== 'dynamic-claim' }) }, h("dynamic-claim", { key: '8dc4bf0c1dc249a42a3ee1ae50d82e9d3357bf8e', isDev: this.isDev, "base-url": this.baseUrl, "query-string": this.queryString }))));
|
|
91
98
|
}
|
|
92
99
|
static get is() { return "vehicle-lookup"; }
|
|
93
100
|
static get originalStyleUrls() {
|
|
@@ -102,13 +109,19 @@ export class VehicleLookup {
|
|
|
102
109
|
}
|
|
103
110
|
static get properties() {
|
|
104
111
|
return {
|
|
105
|
-
"
|
|
112
|
+
"activeElement": {
|
|
106
113
|
"type": "string",
|
|
107
114
|
"mutable": false,
|
|
108
115
|
"complexType": {
|
|
109
|
-
"original": "
|
|
110
|
-
"resolved": "
|
|
111
|
-
"references": {
|
|
116
|
+
"original": "ActiveElement",
|
|
117
|
+
"resolved": "\"\" | \"dynamic-claim\" | \"paint-thickness\" | \"service-history\" | \"vehicle-accessories\" | \"vehicle-specification\" | \"warranty-details\"",
|
|
118
|
+
"references": {
|
|
119
|
+
"ActiveElement": {
|
|
120
|
+
"location": "local",
|
|
121
|
+
"path": "/home/vsts/work/1/s/src/components/vehicle-lookup/vehicle-lookup.tsx",
|
|
122
|
+
"id": "src/components/vehicle-lookup/vehicle-lookup.tsx::ActiveElement"
|
|
123
|
+
}
|
|
124
|
+
}
|
|
112
125
|
},
|
|
113
126
|
"required": false,
|
|
114
127
|
"optional": true,
|
|
@@ -116,9 +129,9 @@ export class VehicleLookup {
|
|
|
116
129
|
"tags": [],
|
|
117
130
|
"text": ""
|
|
118
131
|
},
|
|
119
|
-
"attribute": "active-
|
|
132
|
+
"attribute": "active-element",
|
|
120
133
|
"reflect": false,
|
|
121
|
-
"defaultValue": "'
|
|
134
|
+
"defaultValue": "''"
|
|
122
135
|
},
|
|
123
136
|
"baseUrl": {
|
|
124
137
|
"type": "string",
|
|
@@ -303,45 +316,20 @@ export class VehicleLookup {
|
|
|
303
316
|
},
|
|
304
317
|
"getPageContext": {
|
|
305
318
|
"complexType": {
|
|
306
|
-
"signature": "() => Promise<{ componentsList:
|
|
319
|
+
"signature": "() => Promise<{ componentsList: ComponentMap; }>",
|
|
307
320
|
"parameters": [],
|
|
308
321
|
"references": {
|
|
309
322
|
"Promise": {
|
|
310
323
|
"location": "global",
|
|
311
324
|
"id": "global::Promise"
|
|
312
325
|
},
|
|
313
|
-
"
|
|
314
|
-
"location": "
|
|
315
|
-
"path": "components/vehicle-
|
|
316
|
-
"id": "src/components/vehicle-
|
|
317
|
-
},
|
|
318
|
-
"VehicleAccessories": {
|
|
319
|
-
"location": "import",
|
|
320
|
-
"path": "components/vehicle-accessories/vehicle-accessories",
|
|
321
|
-
"id": "src/components/vehicle-accessories/vehicle-accessories.tsx::VehicleAccessories"
|
|
322
|
-
},
|
|
323
|
-
"WarrantyDetails": {
|
|
324
|
-
"location": "import",
|
|
325
|
-
"path": "components/warranty-details/warranty-details",
|
|
326
|
-
"id": "src/components/warranty-details/warranty-details.tsx::WarrantyDetails"
|
|
327
|
-
},
|
|
328
|
-
"ServiceHistory": {
|
|
329
|
-
"location": "import",
|
|
330
|
-
"path": "components/service-history/service-history",
|
|
331
|
-
"id": "src/components/service-history/service-history.tsx::ServiceHistory"
|
|
332
|
-
},
|
|
333
|
-
"PaintThickness": {
|
|
334
|
-
"location": "import",
|
|
335
|
-
"path": "components/paint-thickness/paint-thickness",
|
|
336
|
-
"id": "src/components/paint-thickness/paint-thickness.tsx::PaintThickness"
|
|
337
|
-
},
|
|
338
|
-
"DynamicClaim": {
|
|
339
|
-
"location": "import",
|
|
340
|
-
"path": "components/dynamic-claim/dynamic-claim",
|
|
341
|
-
"id": "src/components/dynamic-claim/dynamic-claim.tsx::DynamicClaim"
|
|
326
|
+
"ComponentMap": {
|
|
327
|
+
"location": "local",
|
|
328
|
+
"path": "/home/vsts/work/1/s/src/components/vehicle-lookup/vehicle-lookup.tsx",
|
|
329
|
+
"id": "src/components/vehicle-lookup/vehicle-lookup.tsx::ComponentMap"
|
|
342
330
|
}
|
|
343
331
|
},
|
|
344
|
-
"return": "Promise<{ componentsList:
|
|
332
|
+
"return": "Promise<{ componentsList: ComponentMap; }>"
|
|
345
333
|
},
|
|
346
334
|
"docs": {
|
|
347
335
|
"text": "",
|
|
@@ -71,7 +71,7 @@ export class VehicleSpecification {
|
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
73
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: 'd3ab6e7dbf681de049f7aca3ba75ff70be5ee4e3' }, h("div", { key: 'f4db262a4b26bcb8e3f1f2362ff1695a4bf7d1b1', class: "min-h-[100px] relative transition-all duration-300 overflow-hidden" }, h("div", { key: 'cbe247fb071e9568bf243f123477f740ebf29c13' }, h(Loading, { key: 'e429ac356ca4dce57cd577b4a6e8d1c3e50b0f43', isLoading: this.state.includes('loading') }), h("div", { key: 'acdcc92f7357768fab0e54f7ece3f5b648c62613', class: cn('transition-all duration-700', { 'scale-0': this.state.includes('loading') || this.state === 'idle', 'opacity-0': this.state.includes('loading') }) }, h("div", { key: '258b28037672bd5c47712e007df135f6067d052c', class: cn('text-center pt-[4px] text-[20px]', { 'text-red-600': !!this.errorMessage }) }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin), ['error', 'error-loading'].includes(this.state) && (h("div", { key: '8ef03632b0d92ec856d29def355acee4f4a1e02a', class: "py-4" }, h("div", { key: 'a2ca78486377bd0be6f5d08ac8652a1da88d3330', class: " px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto" }, this.errorMessage))), ['data', 'data-loading'].includes(this.state) && (h("div", { key: 'c99a0b60829d7cd13326a698573e129a50d5268b', class: "flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]" }, h("div", { key: '549334e7180a5e894e2d46c7f4558cc9d4f32ac9', class: "w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]" }, "Vehicle Specifications"), h("div", { key: '4aa0f17cd6a6c70a4a0be4117b55de3ff813ae6a', class: "h-0 overflow-auto flex-1" }, !((_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.vehicleSpecification) && h("div", { key: '5261fcc2bb22773483083928f2f574e35a24b2e4', class: "h-[80px] flex items-center justify-center text-[18px]" }, "No data is available."), !!((_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.vehicleSpecification) && (h("table", { key: '0af0e908c374d61ba67c85aadd21e2ec271ee496', class: "w-full overflow-auto relative border-collapse" }, h("thead", { key: 'cfff109c40df4000f6eab1a31f955a4de7c2e880', class: "top-0 font-bold sticky bg-white" }, h("tr", { key: '170f8d37806a12e798080c8374bfb46b6f5f47ce' }, ['Model', 'Variant', 'Katashiki', 'Model Year', 'SFX'].map(title => (h("th", { key: title, class: "px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]" }, title))))), h("tbody", { key: '378b78de1a33cdbb5fe03cb551e21111e1312138' }, h("tr", { key: '4b4a1755a18fc2f43223ff865868325be95057a8' }, h("td", { key: '613302f44873887ac22032e8f2dd9020519fdb90', class: "px-[10px] py-[20px] text-center whitespace-nowrap" }, ((_e = (_d = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.vehicleVariantInfo) === null || _e === void 0 ? void 0 : _e.modelCode) || '...', " ", h("br", { key: 'c553288fd9ca7bbfa5b51dd1a96fc282a5861699', class: "my-2" }), ((_g = (_f = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _f === void 0 ? void 0 : _f.vehicleSpecification) === null || _g === void 0 ? void 0 : _g.modelDesc) || '...'), h("td", { key: '7c877d8c2484f91febdd140f587e1382e7add7a5', class: "px-[10px] py-[20px] text-center whitespace-nowrap" }, ((_j = (_h = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _h === void 0 ? void 0 : _h.identifiers) === null || _j === void 0 ? void 0 : _j.variant) || '...', " ", h("br", { key: '697f61020749ecc8e15b6d9bb21d9e206c06cf1a' }), ((_l = (_k = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _k === void 0 ? void 0 : _k.vehicleSpecification) === null || _l === void 0 ? void 0 : _l.variantDesc) || '...'), ['identifiers.katashiki', 'vehicleVariantInfo.modelYear', 'vehicleVariantInfo.sfx'].map(infoPath => {
|
|
75
75
|
var _a;
|
|
76
76
|
const [place, field] = infoPath.split('.');
|
|
77
77
|
const cellValue = (_a = this === null || this === void 0 ? void 0 : this.vehicleInformation) === null || _a === void 0 ? void 0 : _a[place][field].toString();
|
|
@@ -177,7 +177,7 @@ export class WarrantyDetails {
|
|
|
177
177
|
}
|
|
178
178
|
render() {
|
|
179
179
|
var _a, _b, _c, _d, _e;
|
|
180
|
-
return (h(Host, { key: '
|
|
180
|
+
return (h(Host, { key: 'a8a0f9e697b84de68c14f152c91d92c3440434c8' }, h("div", { key: 'd945fb814740a7bb90a56e2b06d449f7c5773ce6', class: "min-h-[100px] warranty" }, h("div", { key: '0dd325cc036ee6fd4b78ae5ccb32891a7d89bf55' }, h(Loading, { key: '33ac29df8941e2efae8aafab425347f24aff91b7', isLoading: this.state.includes('loading') }), h("div", { key: '4ed642aee8795e88b5aec7143004ded257772449', class: "transition duration-700", style: { transform: this.state.includes('loading') || this.state === 'idle' ? 'scale(0)' : 'scale(1)', opacity: this.state.includes('loading') ? '0' : '1' } }, (this.showSsc || this.showWarranty) && (h("div", { key: 'b4348768ef951ceb89c9e73fb603278bf091ef56', style: { color: !!this.errorMessage ? 'red' : 'black' }, class: "warranty-vin" }, (_a = this.vehicleInformation) === null || _a === void 0 ? void 0 : _a.vin)), ['error', 'error-loading'].includes(this.state) && (h("div", { key: '4ab797c1a42de0a0b8cfdf8c3c956d314344a991', class: "py-4" }, h(StatusCard, { key: '35031e278a4503260d00d4ffb5e560267346b96f', desc: this.errorMessage, className: "mx-auto reject-card max-w-500" }), ' ')), this.showWarranty && ['data', 'data-loading'].includes(this.state) && (h(CardsContainer, { key: '61f89d582dd91e09c65a6dee6a9593bb7d154f81', isAuthorized: (_b = this.vehicleInformation) === null || _b === void 0 ? void 0 : _b.isAuthorized, unInvoicedByBrokerName: this.unInvoicedByBrokerName, warranty: (_c = this.vehicleInformation) === null || _c === void 0 ? void 0 : _c.warranty })), h("div", { key: '54ae9de6ebe04b4d605607993e46813047175ff1', style: Object.assign({}, (this.showRecaptcha ? { height: 'auto', padding: '16px 16px 0px 16px' } : { height: '0px' })), class: "recaptcha-container" }, h("slot", { key: 'd07c7123b5c0d27c71deeff5c608d87556b64108' })), ['data', 'data-loading'].includes(this.state) && this.recaptchaRes && (h("div", { key: 'ebb7c599bd6f52cf3d10141ffe448614f232ae83', class: cn('recaptcha-response', !this.recaptchaRes.hasSSC ? 'success-card' : 'reject-card ') }, this.recaptchaRes.message)), this.checkingUnauthorizedSSC && (h("div", { key: '1acb2e50f4e8fb36144175af760323f702e63c11', class: "loading-spinner", style: { marginTop: '20px', flexDirection: 'column' } }, h("div", { key: '2a847351b5924a695cadcb1fc22bb64100c514f1' }, h("strong", { key: '7be0d0d1903c1c5921cf5c248483ce23b900ead1' }, "Checking TMC")), h("img", { key: '3c6a87227027ee5ed5679519b411888ab56771e4', class: "spin", src: Loader }))), this.showSsc && ['data', 'data-loading'].includes(this.state) && ((_d = this.vehicleInformation) === null || _d === void 0 ? void 0 : _d.ssc) !== null && !!((_e = this.vehicleInformation) === null || _e === void 0 ? void 0 : _e.ssc.length) && (h(SSCTable, { key: '5386788e64c56099d5356ef59084b5cb284bc490', ssc: this.vehicleInformation.ssc })))))));
|
|
181
181
|
}
|
|
182
182
|
static get is() { return "warranty-details"; }
|
|
183
183
|
static get encapsulation() { return "shadow"; }
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as t,H as e,h as i,c as o}from"./p-be0a5ab5.js";import{g as a}from"./p-4f08bcb8.js";import{L as r}from"./p-8385e385.js";import{c as n}from"./p-98d9e7ab.js";let s={};const d="46px",l=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const o="string"==typeof t,r=o?t:null==t?void 0:t.partNumber;this.externalPartNumber=r;try{if(!r||0===r.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const n=o?await a(this,{scopedTimeoutRef:i,partNumber:r,mockData:s},e):t;if(this.networkTimeoutRef===i){if(!n)throw Error("Wrong response format");this.handleSettingData(n)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}toggleAccordion(t){const e=t.target.parentElement,i=e.getElementsByClassName("icon")[0];if("true"===e.getAttribute("aria-expanded"))e.style.height=d,i.style.transform="rotate(0deg)",e.setAttribute("aria-expanded","false");else{const t=46+e.getElementsByClassName("content")[0].getClientRects()[0].height;e.style.height=t+"px",i.style.transform="rotate(180deg)",e.setAttribute("aria-expanded","true")}}render(){var t,e;return i(o,{key:"5afafb701488fe12ae7510942bb0abfee53f1d81"},i("div",{key:"c35e2b2b6dc469803dcacfe72c64f242eb71fc66",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},i("div",{key:"c887e169746b873d1faabc2dc7fcb6ac9b36088b"},i(r,{key:"6895759b25d925520984a6a911646d154aeb6f1e",isLoading:this.state.includes("loading")}),i("div",{key:"53b1e3bbdd9d76d7f3adb31db67fc35578c5db31",class:n("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&i("div",{key:"70e777c2e43cb5f702d14604e5daa3d24fe4b793",class:"py-[16px]"},i("div",{key:"9b082979188f3ceebe6287e4618b81482025265d",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&i("div",{key:"858736a530a1eeb27be15bb6ce74d90eac69854a"},i("div",{key:"34446c3dee2e3bb9e98eb095efb88f31eb068695",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"eb5644f27f839b85aba52bf1cb4e369030c95bcf",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Dead stock"),null===(e=null===(t=this.partInformation)||void 0===t?void 0:t.deadStock)||void 0===e?void 0:e.map((t=>i("div",{key:t.companyIntegrationID,class:"py-[10px] px-[20px]"},i("div",{"aria-expanded":"false",style:{height:d},class:"border shadow transition-all duration-500 overflow-hidden rounded-md mb-[10px] border-[#d6d8dc]"},i("button",{onClick:this.toggleAccordion,style:{height:d},class:"w-full flex px-[10px] justify-between items-center text-slate-800"},i("strong",null,t.companyName),i("span",{class:"icon text-slate-800 transition-transform duration-500"},i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",class:"size-[22px]"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z"})))),i("div",{class:"content"},i("table",{class:"w-full overflow-auto relative border-collapse"},i("thead",null,i("tr",null,i("th",{class:"py-[20px] px-[10px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Branch"),i("th",{class:"py-[20px] px-[10px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Available Qty"))),i("tbody",null,null==t?void 0:t.branchDeadStock.map((t=>i("tr",{class:"transition-colors border-b border-[#d6d8dc] last:border-none duration-100 hover:bg-slate-100",key:t.companyBranchIntegrationID},i("td",{class:n("py-[20px] px-[10px] text-left whitespace-nowrap")},t.companyBranchName),i("td",{class:n("py-[20px] px-[10px] text-left whitespace-nowrap")},i("strong",null,t.quantity))))))))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mb-\\[10px\\]{margin-bottom:10px}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.size-\\[22px\\]{height:22px;width:22px}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.scale-0,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[20px\\]{padding-left:20px;padding-right:20px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-left{text-align:left}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}'}},[1,"dead-stock-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function p(){"undefined"!=typeof customElements&&["dead-stock-lookup"].forEach((t=>{"dead-stock-lookup"===t&&(customElements.get(t)||customElements.define(t,l))}))}p();const c=l,h=p;export{c as DeadStockLookup,h as defineCustomElement}
|
|
5
|
+
import{p as t,H as e,h as i,c as o}from"./p-be0a5ab5.js";import{g as a}from"./p-4f08bcb8.js";import{L as r}from"./p-8385e385.js";import{c as n}from"./p-98d9e7ab.js";let s={};const d="46px",l=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const o="string"==typeof t,r=o?t:null==t?void 0:t.partNumber;this.externalPartNumber=r;try{if(!r||0===r.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const n=o?await a(this,{scopedTimeoutRef:i,partNumber:r,mockData:s},e):t;if(this.networkTimeoutRef===i){if(!n)throw Error("Wrong response format");this.handleSettingData(n)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}toggleAccordion(t){const e=t.target.parentElement,i=e.getElementsByClassName("icon")[0];if("true"===e.getAttribute("aria-expanded"))e.style.height=d,i.style.transform="rotate(0deg)",e.setAttribute("aria-expanded","false");else{const t=46+e.getElementsByClassName("content")[0].getClientRects()[0].height;e.style.height=t+"px",i.style.transform="rotate(180deg)",e.setAttribute("aria-expanded","true")}}render(){var t,e;return i(o,{key:"03372a6f91fd6291de7e6fc51ab5012bc5ab2b98"},i("div",{key:"e926503adba0274834ab8b06ce370faace79447b",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},i("div",{key:"f3883fc0b09366baf94ed65f8b13590ac1adb975"},i(r,{key:"d01c5df2db30920852b35a6e6d6cb06cde76f395",isLoading:this.state.includes("loading")}),i("div",{key:"de52273e824e9499aa77b3763871d010184232b8",class:n("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&i("div",{key:"4995acd3f10a212d93838e2d5e89693829fbb10a",class:"py-[16px]"},i("div",{key:"38064e79243ba14260cbaea211b6d82cbd299f5e",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&i("div",{key:"156cbe984af29e94d697eac435226a8d69c05545"},i("div",{key:"573d44fd10f287903f04de74c78302cc0ffe90f1",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"93f6aa85947fb2fa924478fa5167a0e894188958",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Dead stock"),null===(e=null===(t=this.partInformation)||void 0===t?void 0:t.deadStock)||void 0===e?void 0:e.map((t=>i("div",{key:t.companyIntegrationID,class:"py-[10px] px-[20px]"},i("div",{"aria-expanded":"false",style:{height:d},class:"border shadow transition-all duration-500 overflow-hidden rounded-md mb-[10px] border-[#d6d8dc]"},i("button",{onClick:this.toggleAccordion,style:{height:d},class:"w-full flex px-[10px] justify-between items-center text-slate-800"},i("strong",null,t.companyName),i("span",{class:"icon text-slate-800 transition-transform duration-500"},i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",class:"size-[22px]"},i("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M11.78 9.78a.75.75 0 0 1-1.06 0L8 7.06 5.28 9.78a.75.75 0 0 1-1.06-1.06l3.25-3.25a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06Z"})))),i("div",{class:"content"},i("table",{class:"w-full overflow-auto relative border-collapse"},i("thead",null,i("tr",null,i("th",{class:"py-[20px] px-[10px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Branch"),i("th",{class:"py-[20px] px-[10px] text-left whitespace-nowrap border-b border-[#d6d8dc]"},"Available Qty"))),i("tbody",null,null==t?void 0:t.branchDeadStock.map((t=>i("tr",{class:"transition-colors border-b border-[#d6d8dc] last:border-none duration-100 hover:bg-slate-100",key:t.companyBranchIntegrationID},i("td",{class:n("py-[20px] px-[10px] text-left whitespace-nowrap")},t.companyBranchName),i("td",{class:n("py-[20px] px-[10px] text-left whitespace-nowrap")},i("strong",null,t.quantity))))))))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.mx-auto{margin-left:auto;margin-right:auto}.mb-\\[10px\\]{margin-bottom:10px}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.size-\\[22px\\]{height:22px;width:22px}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0}.scale-0,.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[20px\\]{padding-left:20px;padding-right:20px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-left{text-align:left}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-slate-800{--tw-text-opacity:1;color:rgb(30 41 59/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-duration:.15s;transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-500{transition-duration:.5s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}'}},[1,"dead-stock-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function p(){"undefined"!=typeof customElements&&["dead-stock-lookup"].forEach((t=>{"dead-stock-lookup"===t&&(customElements.get(t)||customElements.define(t,l))}))}p();const c=l,h=p;export{c as DeadStockLookup,h as defineCustomElement}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as t,H as e,h as i,c as o}from"./p-be0a5ab5.js";import{L as a}from"./p-8385e385.js";import{c as r}from"./p-98d9e7ab.js";import{g as n}from"./p-4f08bcb8.js";let s={};const l=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const o="string"==typeof t,a=o?t:null==t?void 0:t.partNumber;this.externalPartNumber=a;try{if(!a||0===a.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const r=o?await n(this,{scopedTimeoutRef:i,partNumber:a,mockData:s},e):t;if(this.networkTimeoutRef===i){if(!r)throw Error("Wrong response format");this.handleSettingData(r)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}render(){var t,e,n;const s=this.partInformation?[{label:"Description",value:this.partInformation.stockParts[0].partDescription},{label:"Product Group",value:this.partInformation.stockParts[0].group},{label:"Russian Description",value:this.partInformation.stockParts[0].localDescription},{label:"Dealer Purchase price",value:null===(t=this.partInformation.stockParts[0].fob)||void 0===t?void 0:t.toFixed(2)},{label:"Recommended Retail price",value:null===(e=this.partInformation.stockParts[0].price)||void 0===e?void 0:e.toFixed(2)},{label:"Superseded From",value:this.partInformation.stockParts[0].supersededFrom},{label:"Superseded To",value:this.partInformation.stockParts[0].supersededTo}]:[],l=!!this.partInformation&&!this.partInformation.stockParts.some((({quantityLookUpResult:t})=>"LookupIsSkipped"===t||"QuantityNotWithinLookupThreshold"===t));return i(o,{key:"e05f93874b4cedfa2f69dfa697d20ca21c8f7cc0"},i("div",{key:"a2539c2cbbbe8bc0c6b45f52f0ea3d8f5de7e09e",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},i("div",{key:"70a6b9253739734197390119b684ebcade740e9a"},i(a,{key:"9d9e20c2779c9d47bbcb7c87366e8b4db6391d43",isLoading:this.state.includes("loading")}),i("div",{key:"21f13e3e63b4960e24980aa9861b36b23ccad027",class:r("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&i("div",{key:"eae4fdd025a57030610d71cff8974bce0cca4052",class:"py-[16px]"},i("div",{key:"bd8943eb18d4f81a3364547d7e12d2f5b734b995",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&i("div",{key:"c90dbf72dc4816c279c18033fe6a18e14c9dc7d4"},i("div",{key:"6b5224d28aa1dbf83a47988318e17e05384e8464",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"35085925eeec929b29a06d40184900fff81f35f0",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Info"),i("div",{key:"f99d11e5601dd0f1e47539d68af38157fa0b8efc",class:"py-[10px] px-[30px] flex flex-col gap-[15px]"},i("div",{key:"23f858225400320b8e0ae16e623648e5a8a7e14d",class:"grid grid-cols-3 gap-[50px]"},s.map((({label:t,value:e})=>i("div",{key:t,class:"flex flex-col flex-1"},i("strong",{class:"py-[10px] px-0 border-b-[gray] border-b"},t),i("div",{class:"py-[10px] px-0"},e))))))),l&&i("div",{key:"feb825ab2ab147347055afdf121d556baa6ca8e0",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"0b1e73aaa2d6abcb920c43953f3fecc3049a6edd",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Distributor Stock"),i("div",{key:"d4469781009709c7cabc05a684aa7f686d068bf8",class:"flex flex-col gap-[15px]"},i("table",{key:"8a3a89f60a6e05d7582aeaa8f7898687b89f17d9",class:"w-full overflow-auto relative border-collapse"},i("thead",{key:"53f85ae8be54d6124227c6bf293ac605e54e5414",class:"top-0 font-bold sticky bg-white"},i("tr",{key:"1482ec6719eaec462f619d8475b4adceb6188221"},["Location","Availability"].map((t=>i("th",{key:t,class:"px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]"},t))))),i("tbody",{key:"c5630abe668ccd93d1980585c6fb64de43205907"},null===(n=this.partInformation)||void 0===n?void 0:n.stockParts.map((t=>i("tr",{class:"transition-colors duration-100 border-b border-[#d6d8dc] last:border-none hover:bg-slate-100",key:t.locationID},i("td",{class:r("px-[10px] py-[20px] text-center whitespace-nowrap")},t.locationName),i("td",{class:r("px-[10px] py-[20px] text-center whitespace-nowrap")},i("div",{class:r("text-[red]",{"text-[green]":"Available"===t.quantityLookUpResult,"text-[orange]":"PartiallyAvailable"===t.quantityLookUpResult})},i("strong",null,"Available"===t.quantityLookUpResult?"Available":"PartiallyAvailable"===t.quantityLookUpResult?"Partially Available":"Not Available")))))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.grid{display:grid}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-\\[green\\]{--tw-text-opacity:1;color:rgb(0 128 0/var(--tw-text-opacity,1))}.text-\\[orange\\]{--tw-text-opacity:1;color:rgb(255 165 0/var(--tw-text-opacity,1))}.text-\\[red\\]{--tw-text-opacity:1;color:rgb(255 0 0/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}'}},[1,"distributor-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function d(){"undefined"!=typeof customElements&&["distributor-lookup"].forEach((t=>{"distributor-lookup"===t&&(customElements.get(t)||customElements.define(t,l))}))}d();const c=l,p=d;export{c as DistributorLookup,p as defineCustomElement}
|
|
5
|
+
import{p as t,H as e,h as i,c as o}from"./p-be0a5ab5.js";import{L as a}from"./p-8385e385.js";import{c as r}from"./p-98d9e7ab.js";import{g as n}from"./p-4f08bcb8.js";let s={};const l=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.baseUrl="",this.isDev=!1,this.queryString="",this.loadingStateChange=void 0,this.loadedResponse=void 0,this.state="idle",this.externalPartNumber=null,this.errorMessage=null,this.partInformation=void 0}handleSettingData(t){this.partInformation=t}async setData(t,e={}){let i;clearTimeout(this.networkTimeoutRef),this.abortController&&this.abortController.abort(),this.abortController=new AbortController;const o="string"==typeof t,a=o?t:null==t?void 0:t.partNumber;this.externalPartNumber=a;try{if(!a||0===a.trim().length)return void(this.state="idle");this.state="data"===this.state||"error"===this.state?this.state+"-loading":"loading",await new Promise((t=>{i=setTimeout(t,700),this.networkTimeoutRef=i}));const r=o?await n(this,{scopedTimeoutRef:i,partNumber:a,mockData:s},e):t;if(this.networkTimeoutRef===i){if(!r)throw Error("Wrong response format");this.handleSettingData(r)}this.errorMessage=null,this.state="data"}catch(t){if(t&&"AbortError"===(null==t?void 0:t.name))return;this.state="error",this.partInformation=null,this.errorMessage=t.message}}async fetchData(t=this.externalPartNumber,e={}){await this.setData(t,e)}async loadingListener(){this.loadingStateChange&&this.loadingStateChange(this.state.includes("loading"))}async setMockData(t){s=t}render(){var t,e,n;const s=this.partInformation?[{label:"Description",value:this.partInformation.stockParts[0].partDescription},{label:"Product Group",value:this.partInformation.stockParts[0].group},{label:"Russian Description",value:this.partInformation.stockParts[0].localDescription},{label:"Dealer Purchase price",value:null===(t=this.partInformation.stockParts[0].fob)||void 0===t?void 0:t.toFixed(2)},{label:"Recommended Retail price",value:null===(e=this.partInformation.stockParts[0].price)||void 0===e?void 0:e.toFixed(2)},{label:"Superseded From",value:this.partInformation.stockParts[0].supersededFrom},{label:"Superseded To",value:this.partInformation.stockParts[0].supersededTo}]:[],l=!!this.partInformation&&!this.partInformation.stockParts.some((({quantityLookUpResult:t})=>"LookupIsSkipped"===t||"QuantityNotWithinLookupThreshold"===t));return i(o,{key:"696fa6062f40ef47c6612dcf8e7fa8a786717822"},i("div",{key:"3542794214a33abda0a529581d945308bfc62698",class:"min-h-[100px] relative transition-all duration-300 overflow-hidden"},i("div",{key:"b47c2b342210eca70a5742a18a06ff8e56664633"},i(a,{key:"dc4c575f5a5f1fa97e28e43472e608ca9c85ad96",isLoading:this.state.includes("loading")}),i("div",{key:"6b9936b6f2f6065f4525a7ef95305fc80ed5478e",class:r("transition-all duration-700",{"scale-0":this.state.includes("loading")||"idle"===this.state,"opacity-0":this.state.includes("loading")})},["error","error-loading"].includes(this.state)&&i("div",{key:"eb7d12339e55a29f9063b66aea53480d7fd97061",class:"py-[16px]"},i("div",{key:"153603d3c6d177613ff6067cb2dbcad9cfca39d2",class:" px-[16px] py-[8px] border reject-card text-[20px] rounded-[8px] w-fit mx-auto"},this.errorMessage)),["data","data-loading"].includes(this.state)&&i("div",{key:"dbf7067e90975ea2652dac9d5f342fb8a5556bc8"},i("div",{key:"b3ba440facbd8d4759ec0ed73a11675d09d33376",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"0e3966605fb12a85b24b40e9216ee545fb3d17dd",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Info"),i("div",{key:"ae5c17574d07e14eff3e0abd97364b19c7d8e5ed",class:"py-[10px] px-[30px] flex flex-col gap-[15px]"},i("div",{key:"55651a3db59faf0a1478a7ab914591e2966a9361",class:"grid grid-cols-3 gap-[50px]"},s.map((({label:t,value:e})=>i("div",{key:t,class:"flex flex-col flex-1"},i("strong",{class:"py-[10px] px-0 border-b-[gray] border-b"},t),i("div",{class:"py-[10px] px-0"},e))))))),l&&i("div",{key:"4e591cca97bb68547f52b04e9b86fb7fa83b2681",class:"flex mt-[12px] max-h-[70dvh] overflow-hidden rounded-[4px] flex-col border border-[#d6d8dc]"},i("div",{key:"247879f485600ddadedade576a69bae7621abe99",class:"w-full h-[40px] flex shrink-0 justify-center text-[18px] items-center text-[#383c43] text-center bg-[#e1e3e5]"},"Distributor Stock"),i("div",{key:"e3bf8543a16aae3e338f5098f5950d3701c08021",class:"flex flex-col gap-[15px]"},i("table",{key:"6864beae22e6ee0b97d2e821acab3426c9f35d44",class:"w-full overflow-auto relative border-collapse"},i("thead",{key:"db1c61d021530e6505d0a325f0144f583b179eed",class:"top-0 font-bold sticky bg-white"},i("tr",{key:"ef1b06da002265222c4a2d683624248eb26a895c"},["Location","Availability"].map((t=>i("th",{key:t,class:"px-[10px] py-[20px] text-center whitespace-nowrap border-b border-[#d6d8dc]"},t))))),i("tbody",{key:"463be59f0f9cabf4fb0eb1db1ba54cdd7c1c45dc"},null===(n=this.partInformation)||void 0===n?void 0:n.stockParts.map((t=>i("tr",{class:"transition-colors duration-100 border-b border-[#d6d8dc] last:border-none hover:bg-slate-100",key:t.locationID},i("td",{class:r("px-[10px] py-[20px] text-center whitespace-nowrap")},t.locationName),i("td",{class:r("px-[10px] py-[20px] text-center whitespace-nowrap")},i("div",{class:r("text-[red]",{"text-[green]":"Available"===t.quantityLookUpResult,"text-[orange]":"PartiallyAvailable"===t.quantityLookUpResult})},i("strong",null,"Available"===t.quantityLookUpResult?"Available":"PartiallyAvailable"===t.quantityLookUpResult?"Partially Available":"Not Available")))))))))))))))}get el(){return this}static get watchers(){return{state:["loadingListener"]}}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.relative{position:relative}.sticky{position:sticky}.top-0{top:0}.mx-auto{margin-left:auto;margin-right:auto}.mt-\\[12px\\]{margin-top:12px}.flex{display:flex}.table{display:table}.grid{display:grid}.h-\\[40px\\]{height:40px}.max-h-\\[70dvh\\]{max-height:70dvh}.min-h-\\[100px\\]{min-height:100px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.scale-0{--tw-scale-x:0;--tw-scale-y:0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-\\[15px\\]{gap:15px}.gap-\\[50px\\]{gap:50px}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.whitespace-nowrap{white-space:nowrap}.rounded-\\[4px\\]{border-radius:4px}.rounded-\\[8px\\]{border-radius:8px}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-\\[\\#d6d8dc\\]{--tw-border-opacity:1;border-color:rgb(214 216 220/var(--tw-border-opacity,1))}.border-b-\\[gray\\]{--tw-border-opacity:1;border-bottom-color:rgb(128 128 128/var(--tw-border-opacity,1))}.bg-\\[\\#e1e3e5\\]{--tw-bg-opacity:1;background-color:rgb(225 227 229/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.px-0{padding-left:0;padding-right:0}.px-\\[10px\\]{padding-left:10px;padding-right:10px}.px-\\[16px\\]{padding-left:16px;padding-right:16px}.px-\\[30px\\]{padding-left:30px;padding-right:30px}.py-\\[10px\\]{padding-bottom:10px;padding-top:10px}.py-\\[16px\\]{padding-bottom:16px;padding-top:16px}.py-\\[20px\\]{padding-bottom:20px;padding-top:20px}.py-\\[8px\\]{padding-bottom:8px;padding-top:8px}.text-center{text-align:center}.text-\\[18px\\]{font-size:18px}.text-\\[20px\\]{font-size:20px}.font-bold{font-weight:700}.text-\\[\\#383c43\\]{--tw-text-opacity:1;color:rgb(56 60 67/var(--tw-text-opacity,1))}.text-\\[green\\]{--tw-text-opacity:1;color:rgb(0 128 0/var(--tw-text-opacity,1))}.text-\\[orange\\]{--tw-text-opacity:1;color:rgb(255 165 0/var(--tw-text-opacity,1))}.text-\\[red\\]{--tw-text-opacity:1;color:rgb(255 0 0/var(--tw-text-opacity,1))}.opacity-0{opacity:0}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-100{transition-duration:.1s}.duration-300{transition-duration:.3s}.duration-700{transition-duration:.7s}.reject-card{background-color:#f7d7d8;border-color:#f2aeb5;color:#58151c}.last\\:border-none:last-child{border-style:none}.hover\\:bg-slate-100:hover{--tw-bg-opacity:1;background-color:rgb(241 245 249/var(--tw-bg-opacity,1))}.pointer-events-none{pointer-events:none}.absolute{position:absolute}.z-50{z-index:50}.size-\\[40px\\]{height:40px;width:40px}.size-full{height:100%;width:100%}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin-2s{animation:spin 2s linear infinite}'}},[1,"distributor-lookup",{baseUrl:[1,"base-url"],isDev:[4,"is-dev"],queryString:[1,"query-string"],loadingStateChange:[16],loadedResponse:[16],state:[32],externalPartNumber:[32],errorMessage:[32],partInformation:[32],setData:[64],fetchData:[64],setMockData:[64]},void 0,{state:["loadingListener"]}]);function d(){"undefined"!=typeof customElements&&["distributor-lookup"].forEach((t=>{"distributor-lookup"===t&&(customElements.get(t)||customElements.define(t,l))}))}d();const p=l,c=d;export{p as DistributorLookup,c as defineCustomElement}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built by ShiftSoftware
|
|
3
3
|
* Copyright (c)
|
|
4
4
|
*/
|
|
5
|
-
import{p as t,H as e,h as r,c as i}from"./p-be0a5ab5.js";import{d as n}from"./p-3bf0339d.js";function s(t){this._maxSize=t,this.clear()}s.prototype.clear=function(){this._size=0,this._values=Object.create(null)},s.prototype.get=function(t){return this._values[t]},s.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var a=/[^.^\]^[]+|(?=\[\]|\.\.)/g,o=/^\d+$/,u=/^\d/,l=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,h=/^\s*(['"]?)(.*?)(\1)\s*$/,f=new s(512),c=new s(512),d=new s(512),p={Cache:s,split:b,normalizePath:m,setter:function(t){var e=m(t);return c.get(t)||c.set(t,(function(t,r){for(var i=0,n=e.length,s=t;i<n-1;){var a=e[i];if("__proto__"===a||"constructor"===a||"prototype"===a)return t;s=s[e[i++]]}s[e[i]]=r}))},getter:function(t,e){var r=m(t);return d.get(t)||d.set(t,(function(t){for(var i=0,n=r.length;i<n;){if(null==t&&e)return;t=t[r[i++]]}return t}))},join:function(t){return t.reduce((function(t,e){return t+(x(e)||o.test(e)?"["+e+"]":(t?".":"")+e)}),"")},forEach:function(t,e,r){!function(t,e,r){var i,n,s,a=t.length;for(n=0;n<a;n++)(i=t[n])&&(v(i)&&(i='"'+i+'"'),s=x(i),e.call(r,i,s,!s&&/^\d+$/.test(i),n,t))}(Array.isArray(t)?t:b(t),e,r)}};function m(t){return f.get(t)||f.set(t,b(t).map((function(t){return t.replace(h,"$2")})))}function b(t){return t.match(a)||[""]}function x(t){return"string"==typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function v(t){return!x(t)&&(function(t){return t.match(u)&&!t.match(o)}(t)||function(t){return l.test(t)}(t))}const w=/[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,g=t=>t.match(w)||[];var y=t=>g(t).reduce(((t,e)=>`${t}${t?e[0].toUpperCase()+e.slice(1).toLowerCase():e.toLowerCase()}`),""),F=t=>((t,e)=>g(t).join(e).toLowerCase())(t,"_"),$={exports:{}};function O(t,e){var r=t.length,i=Array(r),n={},s=r,a=function(t){for(var e=new Map,r=0,i=t.length;r<i;r++){var n=t[r];e.has(n[0])||e.set(n[0],new Set),e.has(n[1])||e.set(n[1],new Set),e.get(n[0]).add(n[1])}return e}(e),o=function(t){for(var e=new Map,r=0,i=t.length;r<i;r++)e.set(t[r],r);return e}(t);for(e.forEach((function(t){if(!o.has(t[0])||!o.has(t[1]))throw Error("Unknown node. There is an unknown node in the supplied edges.")}));s--;)n[s]||u(t[s],s,new Set);return i;function u(t,e,s){if(s.has(t)){var l;try{l=", node was:"+JSON.stringify(t)}catch(t){l=""}throw Error("Cyclic dependency"+l)}if(!o.has(t))throw Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(t));if(!n[e]){n[e]=!0;var h=a.get(t)||new Set;if(e=(h=Array.from(h)).length){s.add(t);do{var f=h[--e];u(f,o.get(f),s)}while(e);s.delete(t)}i[--r]=t}}}$.exports=function(t){return O(function(t){for(var e=new Set,r=0,i=t.length;r<i;r++){var n=t[r];e.add(n[0]),e.add(n[1])}return Array.from(e)}(t),t)},$.exports.array=O;const E=$.exports,k=Object.prototype.toString,j=Error.prototype.toString,A=RegExp.prototype.toString,D="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",S=/^Symbol\((.*)\)(.*)$/;function z(t,e=!1){if(null==t||!0===t||!1===t)return""+t;const r=typeof t;if("number"===r)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===r)return e?`"${t}"`:t;if("function"===r)return"[Function "+(t.name||"anonymous")+"]";if("symbol"===r)return D.call(t).replace(S,"Symbol($1)");const i=k.call(t).slice(8,-1);return"Date"===i?isNaN(t.getTime())?""+t:t.toISOString(t):"Error"===i||t instanceof Error?"["+j.call(t)+"]":"RegExp"===i?A.call(t):null}function T(t,e){let r=z(t,e);return null!==r?r:JSON.stringify(t,(function(t,r){let i=z(this[t],e);return null!==i?i:r}),2)}function _(t){return null==t?[]:[].concat(t)}let C,N,V,Z=/\$\{\s*(\w+)\s*\}/g;C=Symbol.toStringTag;class q{constructor(t,e,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[C]="Error",this.name="ValidationError",this.value=e,this.path=r,this.type=i,this.errors=[],this.inner=[],_(t).forEach((t=>{M.isError(t)?(this.errors.push(...t.errors),this.inner.push(...t.inner.length?t.inner:[t])):this.errors.push(t)})),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0]}}N=Symbol.hasInstance,V=Symbol.toStringTag;class M extends Error{static formatError(t,e){return e=Object.assign({},e,{path:e.label||e.path||"this",originalPath:e.path}),"string"==typeof t?t.replace(Z,((t,r)=>T(e[r]))):"function"==typeof t?t(e):t}static isError(t){return t&&"ValidationError"===t.name}constructor(t,e,r,i,n){const s=new q(t,e,r,i);if(n)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[V]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,M)}static[N](t){return q[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let U={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:r,originalValue:i})=>{const n=null!=i&&i!==r?` (cast from the value \`${T(i,!0)}\`).`:".";return"mixed"!==e?`${t} must be a \`${e}\` type, but the final value was: \`${T(r,!0)}\``+n:t+" must match the configured type. "+`The validated value was: \`${T(r,!0)}\``+n}},P={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",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},R={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},I={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},L={notType:t=>{const{path:e,value:r,spec:i}=t,n=i.types.length;if(Array.isArray(r)){if(r.length<n)return`${e} tuple value has too few items, expected a length of ${n} but got ${r.length} for value: \`${T(r,!0)}\``;if(r.length>n)return`${e} tuple value has too many items, expected a length of ${n} but got ${r.length} for value: \`${T(r,!0)}\``}return M.formatError(U.notType,t)}};Object.assign(Object.create(null),{mixed:U,string:P,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:R,object:I,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}"},tuple:L});const J=t=>t&&t.__isYupSchema__;class Y{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:n}=e,s="function"==typeof r?r:(...t)=>t.every((t=>t===r));return new Y(t,((t,e)=>{var r;let a=s(...t)?i:n;return null!=(r=null==a?void 0:a(e))?r:e}))}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let r=this.refs.map((t=>t.getValue(null==e?void 0:e.value,null==e?void 0:e.parent,null==e?void 0:e.context))),i=this.fn(r,t,e);if(void 0===i||i===t)return t;if(!J(i))throw new TypeError("conditions must return a schema object");return i.resolve(e)}}class H{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&&p.getter(this.path,!0),this.map=e.map}getValue(t,e,r){let i=this.isContext?r:this.isValue?t:e;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}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}}H.prototype.__isYupRef=!0;const K=t=>null==t;function B(t){function e({value:e,path:r="",options:i,originalValue:n,schema:s},a,o){const{name:u,test:l,params:h,message:f,skipAbsent:c}=t;let{parent:d,context:p,abortEarly:m=s.spec.abortEarly,disableStackTrace:b=s.spec.disableStackTrace}=i;function x(t){return H.isRef(t)?t.getValue(e,d,p):t}function v(t={}){const i=Object.assign({value:e,originalValue:n,label:s.spec.label,path:t.path||r,spec:s.spec,disableStackTrace:t.disableStackTrace||b},h,t.params);for(const t of Object.keys(i))i[t]=x(i[t]);const a=new M(M.formatError(t.message||f,i),e,i.path,t.type||u,i.disableStackTrace);return a.params=i,a}const w=m?a:o;let g={path:r,parent:d,type:u,from:i.from,createError:v,resolve:x,options:i,originalValue:n,schema:s};const y=t=>{M.isError(t)?w(t):t?o(null):w(v())},F=t=>{M.isError(t)?w(t):a(t)};if(c&&K(e))return y(!0);let $;try{var O;if($=l.call(g,e,g),"function"==typeof(null==(O=$)?void 0:O.then)){if(i.sync)throw Error(`Validation test of type: "${g.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve($).then(y,F)}}catch(t){return void F(t)}y($)}return e.OPTIONS=t,e}function G(t,e,r,i=r){let n,s,a;return e?(p.forEach(e,((o,u,l)=>{let h=u?o.slice(1,o.length-1):o,f="tuple"===(t=t.resolve({context:i,parent:n,value:r})).type,c=l?parseInt(h,10):0;if(t.innerType||f){if(f&&!l)throw Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(r&&c>=r.length)throw Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${e}. because there is no value at that index. `);n=r,r=r&&r[c],t=f?t.spec.types[c]:t.innerType}if(!l){if(!t.fields||!t.fields[h])throw Error(`The schema does not contain the path: ${e}. (failed at: ${a} which is a type: "${t.type}")`);n=r,r=r&&r[h],t=t.fields[h]}s=h,a=u?"["+o+"]":"."+o})),{schema:t,parent:n,parentPath:s}):{parent:n,parentPath:e,schema:t}}class Q extends Set{describe(){const t=[];for(const e of this.values())t.push(H.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const r of this.values())e.push(t(r));return e}clone(){return new Q(this.values())}merge(t,e){const r=this.clone();return t.forEach((t=>r.add(t))),e.forEach((t=>r.delete(t))),r}}function W(t,e=new Map){if(J(t)||!t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=Array(t.length),e.set(t,r);for(let i=0;i<t.length;i++)r[i]=W(t[i],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(const[i,n]of t.entries())r.set(i,W(n,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(const i of t)r.add(W(i,e))}else{if(!(t instanceof Object))throw Error("Unable to clone "+t);r={},e.set(t,r);for(const[i,n]of Object.entries(t))r[i]=W(n,e)}return r}class X{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 Q,this._blacklist=new Q,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(U.notType)})),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,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=W(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 r=t(this);return this._mutate=e,r}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,r=t.clone();const i=Object.assign({},e.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},e.internalTests,r.internalTests),r._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),r.tests=e.tests,r.exclusiveTests=e.exclusiveTests,r.withMutation((e=>{t.tests.forEach((t=>{e.test(t.OPTIONS)}))})),r.transforms=[...e.transforms,...r.transforms],r}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 r=e.conditions;e=e.clone(),e.conditions=[],e=r.reduce(((e,r)=>r.resolve(e,t)),e),e=e.resolve(t)}return e}resolveOptions(t){var e,r,i,n;return Object.assign({},t,{from:t.from||[],strict:null!=(e=t.strict)?e:this.spec.strict,abortEarly:null!=(r=t.abortEarly)?r:this.spec.abortEarly,recursive:null!=(i=t.recursive)?i:this.spec.recursive,disableStackTrace:null!=(n=t.disableStackTrace)?n:this.spec.disableStackTrace})}cast(t,e={}){let r=this.resolve(Object.assign({value:t},e)),i="ignore-optionality"===e.assert,n=r._cast(t,e);if(!1!==e.assert&&!r.isType(n)){if(i&&K(n))return n;let s=T(t),a=T(n);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". \n\nattempted value: ${s} \n`+(a!==s?"result of cast: "+a:""))}return n}_cast(t,e){let r=void 0===t?t:this.transforms.reduce(((e,r)=>r.call(this,e,t,this)),t);return void 0===r&&(r=this.getDefault(e)),r}_validate(t,e={},r,i){let{path:n,originalValue:s=t,strict:a=this.spec.strict}=e,o=t;a||(o=this._cast(o,Object.assign({assert:!1},e)));let u=[];for(let t of Object.values(this.internalTests))t&&u.push(t);this.runTests({path:n,value:o,originalValue:s,options:e,tests:u},r,(t=>{if(t.length)return i(t,o);this.runTests({path:n,value:o,originalValue:s,options:e,tests:this.tests},r,i)}))}runTests(t,e,r){let i=!1,{tests:n,value:s,originalValue:a,path:o,options:u}=t,l=t=>{i||(i=!0,e(t,s))},h=t=>{i||(i=!0,r(t,s))},f=n.length,c=[];if(!f)return h([]);let d={value:s,originalValue:a,path:o,options:u,schema:this};for(let t=0;t<n.length;t++)(0,n[t])(d,l,(function(t){t&&(Array.isArray(t)?c.push(...t):c.push(t)),--f<=0&&h(c)}))}asNestedTest({key:t,index:e,parent:r,parentPath:i,originalParent:n,options:s}){const a=null!=t?t:e;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let u=r[a];const l=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:n[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${i||""}[${o?a:`"${a}"`}]`:(i?i+".":"")+t});return(t,e,r)=>this.resolve(l)._validate(u,l,e,r)}validate(t,e){var r;let i=this.resolve(Object.assign({},e,{value:t})),n=null!=(r=null==e?void 0:e.disableStackTrace)?r:i.spec.disableStackTrace;return new Promise(((r,s)=>i._validate(t,e,((t,e)=>{M.isError(t)&&(t.value=e),s(t)}),((t,e)=>{t.length?s(new M(t,e,void 0,void 0,n)):r(e)}))))}validateSync(t,e){var r;let i,n=this.resolve(Object.assign({},e,{value:t})),s=null!=(r=null==e?void 0:e.disableStackTrace)?r:n.spec.disableStackTrace;return n._validate(t,Object.assign({},e,{sync:!0}),((t,e)=>{throw M.isError(t)&&(t.value=e),t}),((e,r)=>{if(e.length)throw new M(e,t,void 0,void 0,s);i=r})),i}isValid(t,e){return this.validate(t,e).then((()=>!0),(t=>{if(M.isError(t))return!1;throw t}))}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(t){if(M.isError(t))return!1;throw t}}_getDefault(t){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this,t):W(e)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return 0===arguments.length?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,e){const r=this.clone({nullable:t});return r.internalTests.nullable=B({message:e,name:"nullable",test(t){return null!==t||this.schema.spec.nullable}}),r}optionality(t,e){const r=this.clone({optional:t});return r.internalTests.optionality=B({message:e,name:"optionality",test(t){return void 0!==t||this.schema.spec.optional}}),r}optional(){return this.optionality(!0)}defined(t=U.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=U.notNull){return this.nullability(!1,t)}required(t=U.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=U.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");let r=this.clone(),i=B(e),n=e.exclusive||e.name&&!0===r.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(r.exclusiveTests[e.name]=!!e.exclusive),r.tests=r.tests.filter((t=>{if(t.OPTIONS.name===e.name){if(n)return!1;if(t.OPTIONS.test===i.OPTIONS.test)return!1}return!0})),r.tests.push(i),r}when(t,e){Array.isArray(t)||"string"==typeof t||(e=t,t=".");let r=this.clone(),i=_(t).map((t=>new H(t)));return i.forEach((t=>{t.isSibling&&r.deps.push(t.key)})),r.conditions.push("function"==typeof e?new Y(i,e):Y.fromOptions(i,e)),r}typeError(t){let e=this.clone();return e.internalTests.typeError=B({message:t,name:"typeError",skipAbsent:!0,test(t){return!!this.schema._typeCheck(t)||this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=U.oneOf){let r=this.clone();return t.forEach((t=>{r._whitelist.add(t),r._blacklist.delete(t)})),r.internalTests.whiteList=B({message:e,name:"oneOf",skipAbsent:!0,test(t){let e=this.schema._whitelist,r=e.resolveAll(this.resolve);return!!r.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:r}})}}),r}notOneOf(t,e=U.notOneOf){let r=this.clone();return t.forEach((t=>{r._blacklist.add(t),r._whitelist.delete(t)})),r.internalTests.blacklist=B({message:e,name:"notOneOf",test(t){let e=this.schema._blacklist,r=e.resolveAll(this.resolve);return!r.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:r}})}}),r}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:n,nullable:s}=e.spec;return{meta:i,label:r,optional:n,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,r)=>r.findIndex((e=>e.name===t.name))===e))}}}X.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])X.prototype[t+"At"]=function(e,r,i={}){const{parent:n,parentPath:s,schema:a}=G(this,e,r,i.context);return a[t](n&&n[s],Object.assign({},i,{parent:n,path:e}))};for(const t of["equals","is"])X.prototype[t]=X.prototype.oneOf;for(const t of["not","nope"])X.prototype[t]=X.prototype.notOneOf;const tt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function et(t){var e,r;const i=tt.exec(t);return i?{year:rt(i[1]),month:rt(i[2],1)-1,day:rt(i[3],1),hour:rt(i[4]),minute:rt(i[5]),second:rt(i[6]),millisecond:i[7]?rt(i[7].substring(0,3)):0,precision:null!=(e=null==(r=i[7])?void 0:r.length)?e:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:rt(i[10]),minuteOffset:rt(i[11])}:null}function rt(t,e=0){return Number(t)||e}let it=/^[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])?)*$/,nt=/^((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,st=/^(?:[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,at=RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),ot=t=>K(t)||t===t.trim(),ut=""+{};function lt(){return new ht}class ht extends X{constructor(){super({type:"string",check:t=>(t instanceof String&&(t=t.valueOf()),"string"==typeof t)}),this.withMutation((()=>{this.transform(((t,e,r)=>{if(!r.spec.coerce||r.isType(t))return t;if(Array.isArray(t))return t;const i=null!=t&&t.toString?""+t:t;return i===ut?t:i}))}))}required(t){return super.required(t).withMutation((e=>e.test({message:t||U.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=P.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=P.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=P.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 r,i,n=!1;return e&&("object"==typeof e?({excludeEmptyString:n=!1,message:r,name:i}=e):r=e),this.test({name:i||"matches",message:r||P.matches,params:{regex:t},skipAbsent:!0,test:e=>""===e&&n||-1!==e.search(t)})}email(t=P.email){return this.matches(it,{name:"email",message:t,excludeEmptyString:!0})}url(t=P.url){return this.matches(nt,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=P.uuid){return this.matches(st,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let e,r,i="";return t&&("object"==typeof t?({message:i="",allowOffset:e=!1,precision:r}=t):i=t),this.matches(at,{name:"datetime",message:i||P.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||P.datetime_offset,params:{allowOffset:e},skipAbsent:!0,test:t=>{if(!t||e)return!0;const r=et(t);return!!r&&!!r.z}}).test({name:"datetime_precision",message:i||P.datetime_precision,params:{precision:r},skipAbsent:!0,test:t=>{if(!t||null==r)return!0;const e=et(t);return!!e&&e.precision===r}})}ensure(){return this.default("").transform((t=>null===t?"":t))}trim(t=P.trim){return this.transform((t=>null!=t?t.trim():t)).test({message:t,name:"trim",test:ot})}lowercase(t=P.lowercase){return this.transform((t=>K(t)?t:t.toLowerCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>K(t)||t===t.toLowerCase()})}uppercase(t=P.uppercase){return this.transform((t=>K(t)?t:t.toUpperCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>K(t)||t===t.toUpperCase()})}}lt.prototype=ht.prototype;let ft=new Date("");class ct extends X{constructor(){super({type:"date",check:t=>(t=>"[object Date]"===Object.prototype.toString.call(t))(t)&&!isNaN(t.getTime())}),this.withMutation((()=>{this.transform(((t,e,r)=>!r.spec.coerce||r.isType(t)||null===t?t:(t=function(t){const e=et(t);if(!e)return Date.parse?Date.parse(t):NaN;if(void 0===e.z&&void 0===e.plusMinus)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let r=0;return"Z"!==e.z&&void 0!==e.plusMinus&&(r=60*e.hourOffset+e.minuteOffset,"+"===e.plusMinus&&(r=0-r)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+r,e.second,e.millisecond)}(t),isNaN(t)?ct.INVALID_DATE:new Date(t))))}))}prepareParam(t,e){let r;if(H.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${e}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,e=R.min){let r=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(t){return t>=this.resolve(r)}})}max(t,e=R.max){let r=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(t){return t<=this.resolve(r)}})}}function dt(t,e){let r=1/0;return t.some(((t,i)=>{var n;if(null!=(n=e.path)&&n.includes(t))return r=i,!0})),r}function pt(t){return(e,r)=>dt(t,e)-dt(t,r)}ct.INVALID_DATE=ft;const mt=(t,e,r)=>{if("string"!=typeof t)return t;let i=t;try{i=JSON.parse(t)}catch(t){}return r.isType(i)?i:t};function bt(t){if("fields"in t){const e={};for(const[r,i]of Object.entries(t.fields))e[r]=bt(i);return t.setFields(e)}if("array"===t.type){const e=t.optional();return e.innerType&&(e.innerType=bt(e.innerType)),e}return"tuple"===t.type?t.optional().clone({types:t.spec.types.map(bt)}):"optional"in t?t.optional():t}let xt=t=>"[object Object]"===Object.prototype.toString.call(t);function vt(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter((t=>-1===r.indexOf(t)))}const wt=pt([]);function gt(t){return new yt(t)}class yt extends X{constructor(t){super({type:"object",check:t=>xt(t)||"function"==typeof t}),this.fields=Object.create(null),this._sortErrors=wt,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{t&&this.shape(t)}))}_cast(t,e={}){var r;let i=super._cast(t,e);if(void 0===i)return this.getDefault(e);if(!this._typeCheck(i))return i;let n=this.fields,s=null!=(r=e.stripUnknown)?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter((t=>!this._nodes.includes(t)))),o={},u=Object.assign({},e,{parent:o,__validating:e.__validating||!1}),l=!1;for(const t of a){let r=n[t],a=t in i;if(r){let n,s=i[t];u.path=(e.path?e.path+".":"")+t,r=r.resolve({value:s,context:e.context,parent:o});let a=r instanceof X?r.spec:void 0,h=null==a?void 0:a.strict;if(null!=a&&a.strip){l=l||t in i;continue}n=e.__validating&&h?i[t]:r.cast(i[t],u),void 0!==n&&(o[t]=n)}else a&&!s&&(o[t]=i[t]);a===t in o&&o[t]===i[t]||(l=!0)}return l?o:i}_validate(t,e={},r,i){let{from:n=[],originalValue:s=t,recursive:a=this.spec.recursive}=e;e.from=[{schema:this,value:s},...n],e.__validating=!0,e.originalValue=s,super._validate(t,e,r,((t,n)=>{if(!a||!xt(n))return void i(t,n);s=s||n;let o=[];for(let t of this._nodes){let r=this.fields[t];r&&!H.isRef(r)&&o.push(r.asNestedTest({options:e,key:t,parent:n,parentPath:e.path,originalParent:s}))}this.runTests({tests:o,value:n,originalValue:s,options:e},r,(e=>{i(e.sort(this._sortErrors).concat(t),n)}))}))}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),r=e.fields;for(let[t,e]of Object.entries(this.fields)){const i=r[t];r[t]=void 0===i?e:i}return e.withMutation((e=>e.setFields(r,[...this._excludedEdges,...t._excludedEdges])))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let e={};return this._nodes.forEach((r=>{var i;const n=this.fields[r];let s=t;null!=(i=s)&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),e[r]=n&&"getDefault"in n?n.getDefault(s):void 0})),e}setFields(t,e){let r=this.clone();return r.fields=t,r._nodes=function(t,e=[]){let r=[],i=new Set,n=new Set(e.map((([t,e])=>`${t}-${e}`)));function s(t,e){let s=p.split(t)[0];i.add(s),n.has(`${e}-${s}`)||r.push([e,s])}for(const e of Object.keys(t)){let r=t[e];i.add(e),H.isRef(r)&&r.isSibling?s(r.path,e):J(r)&&"deps"in r&&r.deps.forEach((t=>s(t,e)))}return E.array(Array.from(i),r).reverse()}(t,e),r._sortErrors=pt(Object.keys(t)),e&&(r._excludedEdges=e),r}shape(t,e=[]){return this.clone().withMutation((r=>{let i=r._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),i=[...r._excludedEdges,...e]),r.setFields(Object.assign(r.fields,t),i)}))}partial(){const t={};for(const[e,r]of Object.entries(this.fields))t[e]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return bt(this)}pick(t){const e={};for(const r of t)this.fields[r]&&(e[r]=this.fields[r]);return this.setFields(e,this._excludedEdges.filter((([e,r])=>t.includes(e)&&t.includes(r))))}omit(t){const e=[];for(const r of Object.keys(this.fields))t.includes(r)||e.push(r);return this.pick(e)}from(t,e,r){let i=p.getter(t,!0);return this.transform((n=>{if(!n)return n;let s=n;return((t,e)=>{const r=[...p.normalizePath(e)];if(1===r.length)return r[0]in t;let i=r.pop(),n=p.getter(p.join(r),!0)(t);return!(!n||!(i in n))})(n,t)&&(s=Object.assign({},n),r||delete s[t],s[e]=i(n)),s}))}json(){return this.transform(mt)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||I.exact,test(t){if(null==t)return!0;const e=vt(this.schema,t);return 0===e.length||this.createError({params:{properties:e.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,e=I.noUnknown){"boolean"!=typeof t&&(e=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:e,test(e){if(null==e)return!0;const r=vt(this.schema,e);return!t||0===r.length||this.createError({params:{unknown:r.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,e=I.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform((e=>{if(!e)return e;const r={};for(const i of Object.keys(e))r[t(i)]=e[i];return r}))}camelCase(){return this.transformKeys(y)}snakeCase(){return this.transformKeys(F)}constantCase(){return this.transformKeys((t=>F(t).toUpperCase()))}describe(t){const e=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[n,s]of Object.entries(e.fields)){var i;let e=t;null!=(i=e)&&i.value&&(e=Object.assign({},e,{parent:e.value,value:e.value[n]})),r.fields[n]=s.describe(e)}return r}}gt.prototype=yt.prototype;class Ft{constructor(t,e,r){this.isSubmitted=!1,this.validationType="onSubmit",this.subscribedFields={},this.formErrors={},this.getFormErrors=()=>this.formErrors,this.getValues=()=>{const t=this.context.el.shadowRoot.querySelector("form"),e=new FormData(t);return Object.fromEntries(e.entries())},this.focusFirstInput=t=>{if(t.length){const e=t.map((t=>this.context.el.shadowRoot.querySelector(`input[name="${t.name}"]`))).filter((t=>t)).sort(((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING?1:0));e[0]&&e[0].focus()}},this.onSubmit=t=>{t.preventDefault(),(async()=>{try{this.isSubmitted=!0,this.context.isLoading=!0,this.signal({isError:!1});const t=this.getValues(),e=await this.schemaObject.validate(t,{abortEarly:!1,strict:!0});await this.context.formSubmit(e)}catch(t){if("ValidationError"===t.name){this.formErrors={};const e=[];t.inner.forEach((t=>{t.path&&(this.formErrors[t.path]=t.message,e.find((e=>e.name===t.path))||e.push({isError:!0,name:t.path,errorMessage:t.message}))})),this.signal(e),this.focusFirstInput(e)}else console.error("Unexpected Error:",t)}finally{this.context.isLoading=!1}})()},this.newController=(t,e)=>("text"===e&&(this.subscribedFields[t]={name:t,isError:!1,disabled:!1,errorMessage:"",onInput:e=>{this.onChanges(t,e.target.value)}}),this.subscribedFields[t]),this.signal=t=>{Array.isArray(t)?t.forEach((t=>{this.subscribedFields[t.name]&&Object.assign(this.subscribedFields[t.name],t)})):Object.values(this.subscribedFields).forEach((e=>Object.assign(e,t)))},this.onChanges=async(t,e)=>{if(!this.isSubmitted&&"always"!==this.validationType)return;const r=this.subscribedFields[t].isError;try{this.schemaObject.fields[t].validateSync(e),this.signal([{name:t,isError:!1}]),!1!==r&&(this.context.renderControl={})}catch(e){e.message&&(this.signal([{name:t,isError:!0,errorMessage:e.message}]),this.context.renderControl={})}},this.context=t,this.schemaObject=e,this.formController={onSubmit:this.onSubmit},(null==r?void 0:r.validationType)&&(this.validationType=r.validationType)}}const $t=gt({name:lt().required("r").min(4,"kd").max(7,"kk"),name2:lt().required()}),Ot=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.form=new Ft(this,$t),this.nameController=this.form.newController("name","text"),this.name2Controller=this.form.newController("name2","text"),this.isLoading=void 0,this.renderControl={}}async formSubmit(t){console.log(t)}render(){const{formController:t}=this.form;return r(i,{key:"d9b4b093c809a56b5ee8cd07b691006bcb1fec1b"},r("form",Object.assign({key:"d2b869ff5a69287a5134d9a886b0f47619acd548"},t),r("form-input",Object.assign({key:"3be3ab63fa20ba896200a325251d9ebc934e524f"},this.nameController,{label:"Name",name:"name"})),r("form-input",Object.assign({key:"845fad4ee5c0f7b0295068a5019b24285f619ce6"},this.name2Controller,{label:"Name2",name:"name2"})),r("button",{key:"2502a1e8daeeab52567eac7103f68aeefeb5c862",type:"submit"},"sd")))}get el(){return this}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}'}},[1,"general-inquiry-form",{isLoading:[32],renderControl:[32]}]);function Et(){"undefined"!=typeof customElements&&["general-inquiry-form","form-input"].forEach((t=>{switch(t){case"general-inquiry-form":customElements.get(t)||customElements.define(t,Ot);break;case"form-input":customElements.get(t)||n()}}))}Et();const kt=Ot,jt=Et;export{kt as GeneralInquiryForm,jt as defineCustomElement}
|
|
5
|
+
import{p as t,H as e,h as r,c as i}from"./p-be0a5ab5.js";import{d as n}from"./p-b90fd51c.js";function s(t){this._maxSize=t,this.clear()}s.prototype.clear=function(){this._size=0,this._values=Object.create(null)},s.prototype.get=function(t){return this._values[t]},s.prototype.set=function(t,e){return this._size>=this._maxSize&&this.clear(),t in this._values||this._size++,this._values[t]=e};var a=/[^.^\]^[]+|(?=\[\]|\.\.)/g,o=/^\d+$/,u=/^\d/,l=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,h=/^\s*(['"]?)(.*?)(\1)\s*$/,f=new s(512),c=new s(512),d=new s(512),p={Cache:s,split:b,normalizePath:m,setter:function(t){var e=m(t);return c.get(t)||c.set(t,(function(t,r){for(var i=0,n=e.length,s=t;i<n-1;){var a=e[i];if("__proto__"===a||"constructor"===a||"prototype"===a)return t;s=s[e[i++]]}s[e[i]]=r}))},getter:function(t,e){var r=m(t);return d.get(t)||d.set(t,(function(t){for(var i=0,n=r.length;i<n;){if(null==t&&e)return;t=t[r[i++]]}return t}))},join:function(t){return t.reduce((function(t,e){return t+(x(e)||o.test(e)?"["+e+"]":(t?".":"")+e)}),"")},forEach:function(t,e,r){!function(t,e,r){var i,n,s,a=t.length;for(n=0;n<a;n++)(i=t[n])&&(v(i)&&(i='"'+i+'"'),s=x(i),e.call(r,i,s,!s&&/^\d+$/.test(i),n,t))}(Array.isArray(t)?t:b(t),e,r)}};function m(t){return f.get(t)||f.set(t,b(t).map((function(t){return t.replace(h,"$2")})))}function b(t){return t.match(a)||[""]}function x(t){return"string"==typeof t&&t&&-1!==["'",'"'].indexOf(t.charAt(0))}function v(t){return!x(t)&&(function(t){return t.match(u)&&!t.match(o)}(t)||function(t){return l.test(t)}(t))}const w=/[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,g=t=>t.match(w)||[];var y=t=>g(t).reduce(((t,e)=>`${t}${t?e[0].toUpperCase()+e.slice(1).toLowerCase():e.toLowerCase()}`),""),F=t=>((t,e)=>g(t).join(e).toLowerCase())(t,"_"),$={exports:{}};function O(t,e){var r=t.length,i=Array(r),n={},s=r,a=function(t){for(var e=new Map,r=0,i=t.length;r<i;r++){var n=t[r];e.has(n[0])||e.set(n[0],new Set),e.has(n[1])||e.set(n[1],new Set),e.get(n[0]).add(n[1])}return e}(e),o=function(t){for(var e=new Map,r=0,i=t.length;r<i;r++)e.set(t[r],r);return e}(t);for(e.forEach((function(t){if(!o.has(t[0])||!o.has(t[1]))throw Error("Unknown node. There is an unknown node in the supplied edges.")}));s--;)n[s]||u(t[s],s,new Set);return i;function u(t,e,s){if(s.has(t)){var l;try{l=", node was:"+JSON.stringify(t)}catch(t){l=""}throw Error("Cyclic dependency"+l)}if(!o.has(t))throw Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(t));if(!n[e]){n[e]=!0;var h=a.get(t)||new Set;if(e=(h=Array.from(h)).length){s.add(t);do{var f=h[--e];u(f,o.get(f),s)}while(e);s.delete(t)}i[--r]=t}}}$.exports=function(t){return O(function(t){for(var e=new Set,r=0,i=t.length;r<i;r++){var n=t[r];e.add(n[0]),e.add(n[1])}return Array.from(e)}(t),t)},$.exports.array=O;const E=$.exports,k=Object.prototype.toString,j=Error.prototype.toString,A=RegExp.prototype.toString,D="undefined"!=typeof Symbol?Symbol.prototype.toString:()=>"",S=/^Symbol\((.*)\)(.*)$/;function z(t,e=!1){if(null==t||!0===t||!1===t)return""+t;const r=typeof t;if("number"===r)return function(t){return t!=+t?"NaN":0===t&&1/t<0?"-0":""+t}(t);if("string"===r)return e?`"${t}"`:t;if("function"===r)return"[Function "+(t.name||"anonymous")+"]";if("symbol"===r)return D.call(t).replace(S,"Symbol($1)");const i=k.call(t).slice(8,-1);return"Date"===i?isNaN(t.getTime())?""+t:t.toISOString(t):"Error"===i||t instanceof Error?"["+j.call(t)+"]":"RegExp"===i?A.call(t):null}function T(t,e){let r=z(t,e);return null!==r?r:JSON.stringify(t,(function(t,r){let i=z(this[t],e);return null!==i?i:r}),2)}function _(t){return null==t?[]:[].concat(t)}let C,N,V,Z=/\$\{\s*(\w+)\s*\}/g;C=Symbol.toStringTag;class q{constructor(t,e,r,i){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[C]="Error",this.name="ValidationError",this.value=e,this.path=r,this.type=i,this.errors=[],this.inner=[],_(t).forEach((t=>{M.isError(t)?(this.errors.push(...t.errors),this.inner.push(...t.inner.length?t.inner:[t])):this.errors.push(t)})),this.message=this.errors.length>1?this.errors.length+" errors occurred":this.errors[0]}}N=Symbol.hasInstance,V=Symbol.toStringTag;class M extends Error{static formatError(t,e){return e=Object.assign({},e,{path:e.label||e.path||"this",originalPath:e.path}),"string"==typeof t?t.replace(Z,((t,r)=>T(e[r]))):"function"==typeof t?t(e):t}static isError(t){return t&&"ValidationError"===t.name}constructor(t,e,r,i,n){const s=new q(t,e,r,i);if(n)return s;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[V]="Error",this.name=s.name,this.message=s.message,this.type=s.type,this.value=s.value,this.path=s.path,this.errors=s.errors,this.inner=s.inner,Error.captureStackTrace&&Error.captureStackTrace(this,M)}static[N](t){return q[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let U={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:r,originalValue:i})=>{const n=null!=i&&i!==r?` (cast from the value \`${T(i,!0)}\`).`:".";return"mixed"!==e?`${t} must be a \`${e}\` type, but the final value was: \`${T(r,!0)}\``+n:t+" must match the configured type. "+`The validated value was: \`${T(r,!0)}\``+n}},P={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",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},R={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},I={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"},L={notType:t=>{const{path:e,value:r,spec:i}=t,n=i.types.length;if(Array.isArray(r)){if(r.length<n)return`${e} tuple value has too few items, expected a length of ${n} but got ${r.length} for value: \`${T(r,!0)}\``;if(r.length>n)return`${e} tuple value has too many items, expected a length of ${n} but got ${r.length} for value: \`${T(r,!0)}\``}return M.formatError(U.notType,t)}};Object.assign(Object.create(null),{mixed:U,string:P,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:R,object:I,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}"},tuple:L});const J=t=>t&&t.__isYupSchema__;class Y{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:r,then:i,otherwise:n}=e,s="function"==typeof r?r:(...t)=>t.every((t=>t===r));return new Y(t,((t,e)=>{var r;let a=s(...t)?i:n;return null!=(r=null==a?void 0:a(e))?r:e}))}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let r=this.refs.map((t=>t.getValue(null==e?void 0:e.value,null==e?void 0:e.parent,null==e?void 0:e.context))),i=this.fn(r,t,e);if(void 0===i||i===t)return t;if(!J(i))throw new TypeError("conditions must return a schema object");return i.resolve(e)}}class H{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&&p.getter(this.path,!0),this.map=e.map}getValue(t,e,r){let i=this.isContext?r:this.isValue?t:e;return this.getter&&(i=this.getter(i||{})),this.map&&(i=this.map(i)),i}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}}H.prototype.__isYupRef=!0;const K=t=>null==t;function B(t){function e({value:e,path:r="",options:i,originalValue:n,schema:s},a,o){const{name:u,test:l,params:h,message:f,skipAbsent:c}=t;let{parent:d,context:p,abortEarly:m=s.spec.abortEarly,disableStackTrace:b=s.spec.disableStackTrace}=i;function x(t){return H.isRef(t)?t.getValue(e,d,p):t}function v(t={}){const i=Object.assign({value:e,originalValue:n,label:s.spec.label,path:t.path||r,spec:s.spec,disableStackTrace:t.disableStackTrace||b},h,t.params);for(const t of Object.keys(i))i[t]=x(i[t]);const a=new M(M.formatError(t.message||f,i),e,i.path,t.type||u,i.disableStackTrace);return a.params=i,a}const w=m?a:o;let g={path:r,parent:d,type:u,from:i.from,createError:v,resolve:x,options:i,originalValue:n,schema:s};const y=t=>{M.isError(t)?w(t):t?o(null):w(v())},F=t=>{M.isError(t)?w(t):a(t)};if(c&&K(e))return y(!0);let $;try{var O;if($=l.call(g,e,g),"function"==typeof(null==(O=$)?void 0:O.then)){if(i.sync)throw Error(`Validation test of type: "${g.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve($).then(y,F)}}catch(t){return void F(t)}y($)}return e.OPTIONS=t,e}function G(t,e,r,i=r){let n,s,a;return e?(p.forEach(e,((o,u,l)=>{let h=u?o.slice(1,o.length-1):o,f="tuple"===(t=t.resolve({context:i,parent:n,value:r})).type,c=l?parseInt(h,10):0;if(t.innerType||f){if(f&&!l)throw Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${a}" must contain an index to the tuple element, e.g. "${a}[0]"`);if(r&&c>=r.length)throw Error(`Yup.reach cannot resolve an array item at index: ${o}, in the path: ${e}. because there is no value at that index. `);n=r,r=r&&r[c],t=f?t.spec.types[c]:t.innerType}if(!l){if(!t.fields||!t.fields[h])throw Error(`The schema does not contain the path: ${e}. (failed at: ${a} which is a type: "${t.type}")`);n=r,r=r&&r[h],t=t.fields[h]}s=h,a=u?"["+o+"]":"."+o})),{schema:t,parent:n,parentPath:s}):{parent:n,parentPath:e,schema:t}}class Q extends Set{describe(){const t=[];for(const e of this.values())t.push(H.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const r of this.values())e.push(t(r));return e}clone(){return new Q(this.values())}merge(t,e){const r=this.clone();return t.forEach((t=>r.add(t))),e.forEach((t=>r.delete(t))),r}}function W(t,e=new Map){if(J(t)||!t||"object"!=typeof t)return t;if(e.has(t))return e.get(t);let r;if(t instanceof Date)r=new Date(t.getTime()),e.set(t,r);else if(t instanceof RegExp)r=RegExp(t),e.set(t,r);else if(Array.isArray(t)){r=Array(t.length),e.set(t,r);for(let i=0;i<t.length;i++)r[i]=W(t[i],e)}else if(t instanceof Map){r=new Map,e.set(t,r);for(const[i,n]of t.entries())r.set(i,W(n,e))}else if(t instanceof Set){r=new Set,e.set(t,r);for(const i of t)r.add(W(i,e))}else{if(!(t instanceof Object))throw Error("Unable to clone "+t);r={},e.set(t,r);for(const[i,n]of Object.entries(t))r[i]=W(n,e)}return r}class X{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 Q,this._blacklist=new Q,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation((()=>{this.typeError(U.notType)})),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,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=W(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 r=t(this);return this._mutate=e,r}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,r=t.clone();const i=Object.assign({},e.spec,r.spec);return r.spec=i,r.internalTests=Object.assign({},e.internalTests,r.internalTests),r._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),r._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),r.tests=e.tests,r.exclusiveTests=e.exclusiveTests,r.withMutation((e=>{t.tests.forEach((t=>{e.test(t.OPTIONS)}))})),r.transforms=[...e.transforms,...r.transforms],r}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 r=e.conditions;e=e.clone(),e.conditions=[],e=r.reduce(((e,r)=>r.resolve(e,t)),e),e=e.resolve(t)}return e}resolveOptions(t){var e,r,i,n;return Object.assign({},t,{from:t.from||[],strict:null!=(e=t.strict)?e:this.spec.strict,abortEarly:null!=(r=t.abortEarly)?r:this.spec.abortEarly,recursive:null!=(i=t.recursive)?i:this.spec.recursive,disableStackTrace:null!=(n=t.disableStackTrace)?n:this.spec.disableStackTrace})}cast(t,e={}){let r=this.resolve(Object.assign({value:t},e)),i="ignore-optionality"===e.assert,n=r._cast(t,e);if(!1!==e.assert&&!r.isType(n)){if(i&&K(n))return n;let s=T(t),a=T(n);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${r.type}". \n\nattempted value: ${s} \n`+(a!==s?"result of cast: "+a:""))}return n}_cast(t,e){let r=void 0===t?t:this.transforms.reduce(((e,r)=>r.call(this,e,t,this)),t);return void 0===r&&(r=this.getDefault(e)),r}_validate(t,e={},r,i){let{path:n,originalValue:s=t,strict:a=this.spec.strict}=e,o=t;a||(o=this._cast(o,Object.assign({assert:!1},e)));let u=[];for(let t of Object.values(this.internalTests))t&&u.push(t);this.runTests({path:n,value:o,originalValue:s,options:e,tests:u},r,(t=>{if(t.length)return i(t,o);this.runTests({path:n,value:o,originalValue:s,options:e,tests:this.tests},r,i)}))}runTests(t,e,r){let i=!1,{tests:n,value:s,originalValue:a,path:o,options:u}=t,l=t=>{i||(i=!0,e(t,s))},h=t=>{i||(i=!0,r(t,s))},f=n.length,c=[];if(!f)return h([]);let d={value:s,originalValue:a,path:o,options:u,schema:this};for(let t=0;t<n.length;t++)(0,n[t])(d,l,(function(t){t&&(Array.isArray(t)?c.push(...t):c.push(t)),--f<=0&&h(c)}))}asNestedTest({key:t,index:e,parent:r,parentPath:i,originalParent:n,options:s}){const a=null!=t?t:e;if(null==a)throw TypeError("Must include `key` or `index` for nested validations");const o="number"==typeof a;let u=r[a];const l=Object.assign({},s,{strict:!0,parent:r,value:u,originalValue:n[a],key:void 0,[o?"index":"key"]:a,path:o||a.includes(".")?`${i||""}[${o?a:`"${a}"`}]`:(i?i+".":"")+t});return(t,e,r)=>this.resolve(l)._validate(u,l,e,r)}validate(t,e){var r;let i=this.resolve(Object.assign({},e,{value:t})),n=null!=(r=null==e?void 0:e.disableStackTrace)?r:i.spec.disableStackTrace;return new Promise(((r,s)=>i._validate(t,e,((t,e)=>{M.isError(t)&&(t.value=e),s(t)}),((t,e)=>{t.length?s(new M(t,e,void 0,void 0,n)):r(e)}))))}validateSync(t,e){var r;let i,n=this.resolve(Object.assign({},e,{value:t})),s=null!=(r=null==e?void 0:e.disableStackTrace)?r:n.spec.disableStackTrace;return n._validate(t,Object.assign({},e,{sync:!0}),((t,e)=>{throw M.isError(t)&&(t.value=e),t}),((e,r)=>{if(e.length)throw new M(e,t,void 0,void 0,s);i=r})),i}isValid(t,e){return this.validate(t,e).then((()=>!0),(t=>{if(M.isError(t))return!1;throw t}))}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(t){if(M.isError(t))return!1;throw t}}_getDefault(t){let e=this.spec.default;return null==e?e:"function"==typeof e?e.call(this,t):W(e)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return 0===arguments.length?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,e){const r=this.clone({nullable:t});return r.internalTests.nullable=B({message:e,name:"nullable",test(t){return null!==t||this.schema.spec.nullable}}),r}optionality(t,e){const r=this.clone({optional:t});return r.internalTests.optionality=B({message:e,name:"optionality",test(t){return void 0!==t||this.schema.spec.optional}}),r}optional(){return this.optionality(!0)}defined(t=U.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=U.notNull){return this.nullability(!1,t)}required(t=U.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=U.default),"function"!=typeof e.test)throw new TypeError("`test` is a required parameters");let r=this.clone(),i=B(e),n=e.exclusive||e.name&&!0===r.exclusiveTests[e.name];if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(r.exclusiveTests[e.name]=!!e.exclusive),r.tests=r.tests.filter((t=>{if(t.OPTIONS.name===e.name){if(n)return!1;if(t.OPTIONS.test===i.OPTIONS.test)return!1}return!0})),r.tests.push(i),r}when(t,e){Array.isArray(t)||"string"==typeof t||(e=t,t=".");let r=this.clone(),i=_(t).map((t=>new H(t)));return i.forEach((t=>{t.isSibling&&r.deps.push(t.key)})),r.conditions.push("function"==typeof e?new Y(i,e):Y.fromOptions(i,e)),r}typeError(t){let e=this.clone();return e.internalTests.typeError=B({message:t,name:"typeError",skipAbsent:!0,test(t){return!!this.schema._typeCheck(t)||this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=U.oneOf){let r=this.clone();return t.forEach((t=>{r._whitelist.add(t),r._blacklist.delete(t)})),r.internalTests.whiteList=B({message:e,name:"oneOf",skipAbsent:!0,test(t){let e=this.schema._whitelist,r=e.resolveAll(this.resolve);return!!r.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:r}})}}),r}notOneOf(t,e=U.notOneOf){let r=this.clone();return t.forEach((t=>{r._blacklist.add(t),r._whitelist.delete(t)})),r.internalTests.blacklist=B({message:e,name:"notOneOf",test(t){let e=this.schema._blacklist,r=e.resolveAll(this.resolve);return!r.includes(t)||this.createError({params:{values:Array.from(e).join(", "),resolved:r}})}}),r}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:r,meta:i,optional:n,nullable:s}=e.spec;return{meta:i,label:r,optional:n,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,r)=>r.findIndex((e=>e.name===t.name))===e))}}}X.prototype.__isYupSchema__=!0;for(const t of["validate","validateSync"])X.prototype[t+"At"]=function(e,r,i={}){const{parent:n,parentPath:s,schema:a}=G(this,e,r,i.context);return a[t](n&&n[s],Object.assign({},i,{parent:n,path:e}))};for(const t of["equals","is"])X.prototype[t]=X.prototype.oneOf;for(const t of["not","nope"])X.prototype[t]=X.prototype.notOneOf;const tt=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function et(t){var e,r;const i=tt.exec(t);return i?{year:rt(i[1]),month:rt(i[2],1)-1,day:rt(i[3],1),hour:rt(i[4]),minute:rt(i[5]),second:rt(i[6]),millisecond:i[7]?rt(i[7].substring(0,3)):0,precision:null!=(e=null==(r=i[7])?void 0:r.length)?e:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:rt(i[10]),minuteOffset:rt(i[11])}:null}function rt(t,e=0){return Number(t)||e}let it=/^[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])?)*$/,nt=/^((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,st=/^(?:[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,at=RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"),ot=t=>K(t)||t===t.trim(),ut=""+{};function lt(){return new ht}class ht extends X{constructor(){super({type:"string",check:t=>(t instanceof String&&(t=t.valueOf()),"string"==typeof t)}),this.withMutation((()=>{this.transform(((t,e,r)=>{if(!r.spec.coerce||r.isType(t))return t;if(Array.isArray(t))return t;const i=null!=t&&t.toString?""+t:t;return i===ut?t:i}))}))}required(t){return super.required(t).withMutation((e=>e.test({message:t||U.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=P.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=P.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=P.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 r,i,n=!1;return e&&("object"==typeof e?({excludeEmptyString:n=!1,message:r,name:i}=e):r=e),this.test({name:i||"matches",message:r||P.matches,params:{regex:t},skipAbsent:!0,test:e=>""===e&&n||-1!==e.search(t)})}email(t=P.email){return this.matches(it,{name:"email",message:t,excludeEmptyString:!0})}url(t=P.url){return this.matches(nt,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=P.uuid){return this.matches(st,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let e,r,i="";return t&&("object"==typeof t?({message:i="",allowOffset:e=!1,precision:r}=t):i=t),this.matches(at,{name:"datetime",message:i||P.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:i||P.datetime_offset,params:{allowOffset:e},skipAbsent:!0,test:t=>{if(!t||e)return!0;const r=et(t);return!!r&&!!r.z}}).test({name:"datetime_precision",message:i||P.datetime_precision,params:{precision:r},skipAbsent:!0,test:t=>{if(!t||null==r)return!0;const e=et(t);return!!e&&e.precision===r}})}ensure(){return this.default("").transform((t=>null===t?"":t))}trim(t=P.trim){return this.transform((t=>null!=t?t.trim():t)).test({message:t,name:"trim",test:ot})}lowercase(t=P.lowercase){return this.transform((t=>K(t)?t:t.toLowerCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>K(t)||t===t.toLowerCase()})}uppercase(t=P.uppercase){return this.transform((t=>K(t)?t:t.toUpperCase())).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:t=>K(t)||t===t.toUpperCase()})}}lt.prototype=ht.prototype;let ft=new Date("");class ct extends X{constructor(){super({type:"date",check:t=>(t=>"[object Date]"===Object.prototype.toString.call(t))(t)&&!isNaN(t.getTime())}),this.withMutation((()=>{this.transform(((t,e,r)=>!r.spec.coerce||r.isType(t)||null===t?t:(t=function(t){const e=et(t);if(!e)return Date.parse?Date.parse(t):NaN;if(void 0===e.z&&void 0===e.plusMinus)return new Date(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond).valueOf();let r=0;return"Z"!==e.z&&void 0!==e.plusMinus&&(r=60*e.hourOffset+e.minuteOffset,"+"===e.plusMinus&&(r=0-r)),Date.UTC(e.year,e.month,e.day,e.hour,e.minute+r,e.second,e.millisecond)}(t),isNaN(t)?ct.INVALID_DATE:new Date(t))))}))}prepareParam(t,e){let r;if(H.isRef(t))r=t;else{let i=this.cast(t);if(!this._typeCheck(i))throw new TypeError(`\`${e}\` must be a Date or a value that can be \`cast()\` to a Date`);r=i}return r}min(t,e=R.min){let r=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(t){return t>=this.resolve(r)}})}max(t,e=R.max){let r=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(t){return t<=this.resolve(r)}})}}function dt(t,e){let r=1/0;return t.some(((t,i)=>{var n;if(null!=(n=e.path)&&n.includes(t))return r=i,!0})),r}function pt(t){return(e,r)=>dt(t,e)-dt(t,r)}ct.INVALID_DATE=ft;const mt=(t,e,r)=>{if("string"!=typeof t)return t;let i=t;try{i=JSON.parse(t)}catch(t){}return r.isType(i)?i:t};function bt(t){if("fields"in t){const e={};for(const[r,i]of Object.entries(t.fields))e[r]=bt(i);return t.setFields(e)}if("array"===t.type){const e=t.optional();return e.innerType&&(e.innerType=bt(e.innerType)),e}return"tuple"===t.type?t.optional().clone({types:t.spec.types.map(bt)}):"optional"in t?t.optional():t}let xt=t=>"[object Object]"===Object.prototype.toString.call(t);function vt(t,e){let r=Object.keys(t.fields);return Object.keys(e).filter((t=>-1===r.indexOf(t)))}const wt=pt([]);function gt(t){return new yt(t)}class yt extends X{constructor(t){super({type:"object",check:t=>xt(t)||"function"==typeof t}),this.fields=Object.create(null),this._sortErrors=wt,this._nodes=[],this._excludedEdges=[],this.withMutation((()=>{t&&this.shape(t)}))}_cast(t,e={}){var r;let i=super._cast(t,e);if(void 0===i)return this.getDefault(e);if(!this._typeCheck(i))return i;let n=this.fields,s=null!=(r=e.stripUnknown)?r:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(i).filter((t=>!this._nodes.includes(t)))),o={},u=Object.assign({},e,{parent:o,__validating:e.__validating||!1}),l=!1;for(const t of a){let r=n[t],a=t in i;if(r){let n,s=i[t];u.path=(e.path?e.path+".":"")+t,r=r.resolve({value:s,context:e.context,parent:o});let a=r instanceof X?r.spec:void 0,h=null==a?void 0:a.strict;if(null!=a&&a.strip){l=l||t in i;continue}n=e.__validating&&h?i[t]:r.cast(i[t],u),void 0!==n&&(o[t]=n)}else a&&!s&&(o[t]=i[t]);a===t in o&&o[t]===i[t]||(l=!0)}return l?o:i}_validate(t,e={},r,i){let{from:n=[],originalValue:s=t,recursive:a=this.spec.recursive}=e;e.from=[{schema:this,value:s},...n],e.__validating=!0,e.originalValue=s,super._validate(t,e,r,((t,n)=>{if(!a||!xt(n))return void i(t,n);s=s||n;let o=[];for(let t of this._nodes){let r=this.fields[t];r&&!H.isRef(r)&&o.push(r.asNestedTest({options:e,key:t,parent:n,parentPath:e.path,originalParent:s}))}this.runTests({tests:o,value:n,originalValue:s,options:e},r,(e=>{i(e.sort(this._sortErrors).concat(t),n)}))}))}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),r=e.fields;for(let[t,e]of Object.entries(this.fields)){const i=r[t];r[t]=void 0===i?e:i}return e.withMutation((e=>e.setFields(r,[...this._excludedEdges,...t._excludedEdges])))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let e={};return this._nodes.forEach((r=>{var i;const n=this.fields[r];let s=t;null!=(i=s)&&i.value&&(s=Object.assign({},s,{parent:s.value,value:s.value[r]})),e[r]=n&&"getDefault"in n?n.getDefault(s):void 0})),e}setFields(t,e){let r=this.clone();return r.fields=t,r._nodes=function(t,e=[]){let r=[],i=new Set,n=new Set(e.map((([t,e])=>`${t}-${e}`)));function s(t,e){let s=p.split(t)[0];i.add(s),n.has(`${e}-${s}`)||r.push([e,s])}for(const e of Object.keys(t)){let r=t[e];i.add(e),H.isRef(r)&&r.isSibling?s(r.path,e):J(r)&&"deps"in r&&r.deps.forEach((t=>s(t,e)))}return E.array(Array.from(i),r).reverse()}(t,e),r._sortErrors=pt(Object.keys(t)),e&&(r._excludedEdges=e),r}shape(t,e=[]){return this.clone().withMutation((r=>{let i=r._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),i=[...r._excludedEdges,...e]),r.setFields(Object.assign(r.fields,t),i)}))}partial(){const t={};for(const[e,r]of Object.entries(this.fields))t[e]="optional"in r&&r.optional instanceof Function?r.optional():r;return this.setFields(t)}deepPartial(){return bt(this)}pick(t){const e={};for(const r of t)this.fields[r]&&(e[r]=this.fields[r]);return this.setFields(e,this._excludedEdges.filter((([e,r])=>t.includes(e)&&t.includes(r))))}omit(t){const e=[];for(const r of Object.keys(this.fields))t.includes(r)||e.push(r);return this.pick(e)}from(t,e,r){let i=p.getter(t,!0);return this.transform((n=>{if(!n)return n;let s=n;return((t,e)=>{const r=[...p.normalizePath(e)];if(1===r.length)return r[0]in t;let i=r.pop(),n=p.getter(p.join(r),!0)(t);return!(!n||!(i in n))})(n,t)&&(s=Object.assign({},n),r||delete s[t],s[e]=i(n)),s}))}json(){return this.transform(mt)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||I.exact,test(t){if(null==t)return!0;const e=vt(this.schema,t);return 0===e.length||this.createError({params:{properties:e.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,e=I.noUnknown){"boolean"!=typeof t&&(e=t,t=!0);let r=this.test({name:"noUnknown",exclusive:!0,message:e,test(e){if(null==e)return!0;const r=vt(this.schema,e);return!t||0===r.length||this.createError({params:{unknown:r.join(", ")}})}});return r.spec.noUnknown=t,r}unknown(t=!0,e=I.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform((e=>{if(!e)return e;const r={};for(const i of Object.keys(e))r[t(i)]=e[i];return r}))}camelCase(){return this.transformKeys(y)}snakeCase(){return this.transformKeys(F)}constantCase(){return this.transformKeys((t=>F(t).toUpperCase()))}describe(t){const e=(t?this.resolve(t):this).clone(),r=super.describe(t);r.fields={};for(const[n,s]of Object.entries(e.fields)){var i;let e=t;null!=(i=e)&&i.value&&(e=Object.assign({},e,{parent:e.value,value:e.value[n]})),r.fields[n]=s.describe(e)}return r}}gt.prototype=yt.prototype;class Ft{constructor(t,e,r){this.isSubmitted=!1,this.validationType="onSubmit",this.subscribedFields={},this.formErrors={},this.getFormErrors=()=>this.formErrors,this.getValues=()=>{const t=this.context.el.shadowRoot.querySelector("form"),e=new FormData(t);return Object.fromEntries(e.entries())},this.focusFirstInput=t=>{if(t.length){const e=t.map((t=>this.context.el.shadowRoot.querySelector(`input[name="${t.name}"]`))).filter((t=>t)).sort(((t,e)=>t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_FOLLOWING?-1:t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING?1:0));e[0]&&e[0].focus()}},this.onSubmit=t=>{t.preventDefault(),(async()=>{try{this.isSubmitted=!0,this.context.isLoading=!0,this.signal({isError:!1});const t=this.getValues(),e=await this.schemaObject.validate(t,{abortEarly:!1,strict:!0});await this.context.formSubmit(e)}catch(t){if("ValidationError"===t.name){this.formErrors={};const e=[];t.inner.forEach((t=>{t.path&&(this.formErrors[t.path]=t.message,e.find((e=>e.name===t.path))||e.push({isError:!0,name:t.path,errorMessage:t.message}))})),this.signal(e),this.focusFirstInput(e)}else console.error("Unexpected Error:",t)}finally{this.context.isLoading=!1}})()},this.newController=(t,e)=>("text"===e&&(this.subscribedFields[t]={name:t,isError:!1,disabled:!1,errorMessage:"",onInput:e=>{this.onChanges(t,e.target.value)}}),this.subscribedFields[t]),this.signal=t=>{Array.isArray(t)?t.forEach((t=>{this.subscribedFields[t.name]&&Object.assign(this.subscribedFields[t.name],t)})):Object.values(this.subscribedFields).forEach((e=>Object.assign(e,t)))},this.onChanges=async(t,e)=>{if(!this.isSubmitted&&"always"!==this.validationType)return;const r=this.subscribedFields[t].isError;try{this.schemaObject.fields[t].validateSync(e),this.signal([{name:t,isError:!1}]),!1!==r&&(this.context.renderControl={})}catch(e){e.message&&(this.signal([{name:t,isError:!0,errorMessage:e.message}]),this.context.renderControl={})}},this.context=t,this.schemaObject=e,this.formController={onSubmit:this.onSubmit},(null==r?void 0:r.validationType)&&(this.validationType=r.validationType)}}const $t=gt({name:lt().required("r").min(4,"kd").max(7,"kk"),name2:lt().required()}),Ot=t(class extends e{constructor(){super(),this.__registerHost(),this.__attachShadow(),this.form=new Ft(this,$t),this.nameController=this.form.newController("name","text"),this.name2Controller=this.form.newController("name2","text"),this.isLoading=void 0,this.renderControl={}}async formSubmit(t){console.log(t)}render(){const{formController:t}=this.form;return r(i,{key:"47600eab650c2c967e3b39a37f212cead08b90af"},r("form",Object.assign({key:"79fedfe357eed67267c43f7ae6a865e41f4d0fa0"},t),r("form-input",Object.assign({key:"b001b26a0dc65b7158af45011394269b80dfd694"},this.nameController,{label:"Name",name:"name"})),r("form-input",Object.assign({key:"3f7472ecbd8d4f6c0f89a7432a2e49dfc825f6d4"},this.name2Controller,{label:"Name2",name:"name2"})),r("button",{key:"08d3b507d6739e307b72346643e8c7b191c7a5bb",type:"submit"},"sd")))}get el(){return this}static get style(){return'*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:""}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host{all:initial!important;display:block}*{font-family:Arial}.static{position:static}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}'}},[1,"general-inquiry-form",{isLoading:[32],renderControl:[32]}]);function Et(){"undefined"!=typeof customElements&&["general-inquiry-form","form-input"].forEach((t=>{switch(t){case"general-inquiry-form":customElements.get(t)||customElements.define(t,Ot);break;case"form-input":customElements.get(t)||n()}}))}Et();const kt=Ot,jt=Et;export{kt as GeneralInquiryForm,jt as defineCustomElement}
|