@pinerohit11/testwidget 0.1.45 → 0.1.46

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js CHANGED
@@ -1,7 +1,12 @@
1
+ "use strict";
2
+ var __create = Object.create;
1
3
  var __defProp = Object.defineProperty;
2
4
  var __defProps = Object.defineProperties;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
6
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
8
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
+ var __getProtoOf = Object.getPrototypeOf;
5
10
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
11
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
12
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
@@ -17,18 +22,54 @@ var __spreadValues = (a, b) => {
17
22
  return a;
18
23
  };
19
24
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
+ var __export = (target, all) => {
26
+ for (var name in all)
27
+ __defProp(target, name, { get: all[name], enumerable: true });
28
+ };
29
+ var __copyProps = (to, from, except, desc) => {
30
+ if (from && typeof from === "object" || typeof from === "function") {
31
+ for (let key of __getOwnPropNames(from))
32
+ if (!__hasOwnProp.call(to, key) && key !== except)
33
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
34
+ }
35
+ return to;
36
+ };
37
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
38
+ // If the importer is in node compatibility mode or this is not an ESM
39
+ // file that has been converted to a CommonJS file using a Babel-
40
+ // compatible transform (i.e. "__esModule" has not been set), then set
41
+ // "default" to the CommonJS "module.exports" for node compatibility.
42
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
43
+ mod
44
+ ));
45
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
46
+
47
+ // src/app/index.ts
48
+ var app_exports = {};
49
+ __export(app_exports, {
50
+ CompletedTransactions: () => CompletedTransactions,
51
+ GetPaymentDynamic: () => GetPaymentDynamic,
52
+ Payment: () => Payment,
53
+ RequestPayment: () => RequestPayment,
54
+ RequestPaymentAllInput: () => RequestPaymentAllInput,
55
+ RequestPaymentDynamic: () => RequestPaymentDynamic,
56
+ RequestPaymentonClick: () => RequestPaymentonClick,
57
+ RqstPaymntInputField: () => RqstPaymntInputField,
58
+ TockenizPay: () => TockenizPay
59
+ });
60
+ module.exports = __toCommonJS(app_exports);
20
61
 
21
62
  // src/app/components/RequestPayment/RequestPayment.tsx
22
- import React4, { useState, useEffect } from "react";
23
- import axios from "axios";
63
+ var import_react4 = __toESM(require("react"));
64
+ var import_axios = __toESM(require("axios"));
24
65
 
25
66
  // src/app/components/Loader/Loader.tsx
26
- import React2 from "react";
67
+ var import_react2 = __toESM(require("react"));
27
68
 
28
69
  // src/app/components/Loader/LoaderStyle.tsx
29
- import React from "react";
70
+ var import_react = __toESM(require("react"));
30
71
  var LoaderStyle = (props) => {
31
- return /* @__PURE__ */ React.createElement("style", null, `
72
+ return /* @__PURE__ */ import_react.default.createElement("style", null, `
32
73
  .loader {
33
74
  position: fixed;
34
75
  /* Fixed position to cover the viewport */
@@ -147,17 +188,17 @@ var LoaderStyle_default = LoaderStyle;
147
188
 
148
189
  // src/app/components/Loader/Loader.tsx
149
190
  var Loader = (props) => {
150
- return /* @__PURE__ */ React2.createElement(React2.Fragment, null, /* @__PURE__ */ React2.createElement(LoaderStyle_default, null), (props == null ? void 0 : props.loading) && /* @__PURE__ */ React2.createElement("div", { className: "loader" }, /* @__PURE__ */ React2.createElement("div", { className: "lds-ellipsis" }, /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement("div", null), /* @__PURE__ */ React2.createElement("div", null))));
191
+ return /* @__PURE__ */ import_react2.default.createElement(import_react2.default.Fragment, null, /* @__PURE__ */ import_react2.default.createElement(LoaderStyle_default, null), (props == null ? void 0 : props.loading) && /* @__PURE__ */ import_react2.default.createElement("div", { className: "loader" }, /* @__PURE__ */ import_react2.default.createElement("div", { className: "lds-ellipsis" }, /* @__PURE__ */ import_react2.default.createElement("div", null), /* @__PURE__ */ import_react2.default.createElement("div", null), /* @__PURE__ */ import_react2.default.createElement("div", null), /* @__PURE__ */ import_react2.default.createElement("div", null))));
151
192
  };
152
193
  var Loader_default = Loader;
153
194
 
154
195
  // src/app/components/RequestPayment/RequestPayment.tsx
155
- import { Button, Form, Modal } from "react-bootstrap";
196
+ var import_react_bootstrap = require("react-bootstrap");
156
197
 
157
198
  // src/app/components/RequestPayment/RequestPaymentstyles.tsx
158
- import React3 from "react";
199
+ var import_react3 = __toESM(require("react"));
159
200
  var RequestPaymentstyles = (props) => {
160
- return /* @__PURE__ */ React3.createElement("style", null, `
201
+ return /* @__PURE__ */ import_react3.default.createElement("style", null, `
161
202
  .paymentBtn {
162
203
  background-color: black;
163
204
  border: none;
@@ -1011,10 +1052,10 @@ var ErrorText = {
1011
1052
  // src/app/components/RequestPayment/RequestPayment.tsx
1012
1053
  function RequestPayment(props) {
1013
1054
  const fractalpayClientKey = props.fractalpayClientKey;
1014
- const [show, setShow] = useState(false);
1015
- const [loading, setLoading] = useState(false);
1016
- const [errors, setErrors] = useState({});
1017
- const [requestDetails, setRequestDetails] = useState({
1055
+ const [show, setShow] = (0, import_react4.useState)(false);
1056
+ const [loading, setLoading] = (0, import_react4.useState)(false);
1057
+ const [errors, setErrors] = (0, import_react4.useState)({});
1058
+ const [requestDetails, setRequestDetails] = (0, import_react4.useState)({
1018
1059
  email: "",
1019
1060
  amount: "",
1020
1061
  phone_number: "",
@@ -1022,7 +1063,7 @@ function RequestPayment(props) {
1022
1063
  name: "",
1023
1064
  fractalpayPublicKey: fractalpayClientKey
1024
1065
  });
1025
- const [showConfirmationModal, setShowConfirmationModal] = useState(false);
1066
+ const [showConfirmationModal, setShowConfirmationModal] = (0, import_react4.useState)(false);
1026
1067
  const phoneNumberRegex = (value) => /^\(?\d{3}\)?[-.\s]?\d{3}[-.\s]?\d{4}$/.test(value);
1027
1068
  const amoutRegex = /[+-]?([0-9]*[.])?[0-9]+/;
1028
1069
  const positiveAmountRegex = /^[+]?\d+(\.\d+)?$/;
@@ -1075,7 +1116,7 @@ function RequestPayment(props) {
1075
1116
  name: requestDetails.name,
1076
1117
  email: requestDetails.email
1077
1118
  };
1078
- let response = await axios.post(`${baseUrl}create-widget-order`, formData);
1119
+ let response = await import_axios.default.post(`${baseUrl}create-widget-order`, formData);
1079
1120
  if ((response == null ? void 0 : response.status) === 200) {
1080
1121
  setShowConfirmationModal(true);
1081
1122
  setShow(false);
@@ -1153,7 +1194,7 @@ function RequestPayment(props) {
1153
1194
  setErrors(newErrors);
1154
1195
  return Object.keys(newErrors).length === 0;
1155
1196
  };
1156
- useEffect(() => {
1197
+ (0, import_react4.useEffect)(() => {
1157
1198
  if (props.amount) {
1158
1199
  setRequestDetails((prev) => __spreadProps(__spreadValues({}, prev), { amount: props.amount }));
1159
1200
  }
@@ -1163,8 +1204,8 @@ function RequestPayment(props) {
1163
1204
  e.preventDefault();
1164
1205
  }
1165
1206
  };
1166
- return /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React4.createElement(Loader_default, { loading }), /* @__PURE__ */ React4.createElement(React4.Fragment, null, /* @__PURE__ */ React4.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Request Payment"), /* @__PURE__ */ React4.createElement(
1167
- Modal,
1207
+ return /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ import_react4.default.createElement(Loader_default, { loading }), /* @__PURE__ */ import_react4.default.createElement(import_react4.default.Fragment, null, /* @__PURE__ */ import_react4.default.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Request Payment"), /* @__PURE__ */ import_react4.default.createElement(
1208
+ import_react_bootstrap.Modal,
1168
1209
  {
1169
1210
  show,
1170
1211
  onHide: handleClose,
@@ -1172,8 +1213,8 @@ function RequestPayment(props) {
1172
1213
  backdrop: "static",
1173
1214
  keyboard: false
1174
1215
  },
1175
- /* @__PURE__ */ React4.createElement(Modal.Header, { closeButton: true }, /* @__PURE__ */ React4.createElement(Modal.Title, null, "Request Payment")),
1176
- /* @__PURE__ */ React4.createElement(Modal.Body, { id: "Checkout" }, /* @__PURE__ */ React4.createElement(Form, null, /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "FULL NAME *"), /* @__PURE__ */ React4.createElement(
1216
+ /* @__PURE__ */ import_react4.default.createElement(import_react_bootstrap.Modal.Header, { closeButton: true }, /* @__PURE__ */ import_react4.default.createElement(import_react_bootstrap.Modal.Title, null, "Request Payment")),
1217
+ /* @__PURE__ */ import_react4.default.createElement(import_react_bootstrap.Modal.Body, { id: "Checkout" }, /* @__PURE__ */ import_react4.default.createElement(import_react_bootstrap.Form, null, /* @__PURE__ */ import_react4.default.createElement("div", { className: "mb-3" }, /* @__PURE__ */ import_react4.default.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "FULL NAME *"), /* @__PURE__ */ import_react4.default.createElement(
1177
1218
  "input",
1178
1219
  {
1179
1220
  className: "form-control",
@@ -1182,7 +1223,7 @@ function RequestPayment(props) {
1182
1223
  "data-token": "name",
1183
1224
  onChange: handleChange
1184
1225
  }
1185
- ), errors.name && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.name)), /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "requestPhoneNumber", className: "form-label" }, "Phone Number"), /* @__PURE__ */ React4.createElement(
1226
+ ), errors.name && /* @__PURE__ */ import_react4.default.createElement("small", { className: "text-danger" }, errors.name)), /* @__PURE__ */ import_react4.default.createElement("div", { className: "mb-3" }, /* @__PURE__ */ import_react4.default.createElement("label", { htmlFor: "requestPhoneNumber", className: "form-label" }, "Phone Number"), /* @__PURE__ */ import_react4.default.createElement(
1186
1227
  "input",
1187
1228
  {
1188
1229
  maxLength: 10,
@@ -1194,7 +1235,7 @@ function RequestPayment(props) {
1194
1235
  type: "text",
1195
1236
  "data-token": "phone_number"
1196
1237
  }
1197
- ), errors.phone_number && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.phone_number)), /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "EMAIL"), /* @__PURE__ */ React4.createElement(
1238
+ ), errors.phone_number && /* @__PURE__ */ import_react4.default.createElement("small", { className: "text-danger" }, errors.phone_number)), /* @__PURE__ */ import_react4.default.createElement("div", { className: "mb-3" }, /* @__PURE__ */ import_react4.default.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "EMAIL"), /* @__PURE__ */ import_react4.default.createElement(
1198
1239
  "input",
1199
1240
  {
1200
1241
  className: "form-control",
@@ -1203,7 +1244,7 @@ function RequestPayment(props) {
1203
1244
  onChange: handleChange,
1204
1245
  "data-token": "email"
1205
1246
  }
1206
- ), errors.email && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.email)), /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "AMOUNT *"), /* @__PURE__ */ React4.createElement("div", { className: "input-group" }, /* @__PURE__ */ React4.createElement("span", { className: "input-group-text" }, "$"), /* @__PURE__ */ React4.createElement(
1247
+ ), errors.email && /* @__PURE__ */ import_react4.default.createElement("small", { className: "text-danger" }, errors.email)), /* @__PURE__ */ import_react4.default.createElement("div", { className: "mb-3" }, /* @__PURE__ */ import_react4.default.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "AMOUNT *"), /* @__PURE__ */ import_react4.default.createElement("div", { className: "input-group" }, /* @__PURE__ */ import_react4.default.createElement("span", { className: "input-group-text" }, "$"), /* @__PURE__ */ import_react4.default.createElement(
1207
1248
  "input",
1208
1249
  {
1209
1250
  "data-token": "amount",
@@ -1219,7 +1260,7 @@ function RequestPayment(props) {
1219
1260
  e2.preventDefault();
1220
1261
  }, { passive: false })
1221
1262
  }
1222
- )), errors.amount && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.amount)), /* @__PURE__ */ React4.createElement("div", { className: "mb-3" }, /* @__PURE__ */ React4.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "ORDER ID"), /* @__PURE__ */ React4.createElement(
1263
+ )), errors.amount && /* @__PURE__ */ import_react4.default.createElement("small", { className: "text-danger" }, errors.amount)), /* @__PURE__ */ import_react4.default.createElement("div", { className: "mb-3" }, /* @__PURE__ */ import_react4.default.createElement("label", { htmlFor: "exampleFormControlInput2", className: "form-label" }, "ORDER ID"), /* @__PURE__ */ import_react4.default.createElement(
1223
1264
  "input",
1224
1265
  {
1225
1266
  className: "form-control",
@@ -1228,8 +1269,8 @@ function RequestPayment(props) {
1228
1269
  onChange: handleChange,
1229
1270
  "data-token": "order_id"
1230
1271
  }
1231
- ), errors.order_id && /* @__PURE__ */ React4.createElement("small", { className: "text-danger" }, errors.order_id)), /* @__PURE__ */ React4.createElement(
1232
- Button,
1272
+ ), errors.order_id && /* @__PURE__ */ import_react4.default.createElement("small", { className: "text-danger" }, errors.order_id)), /* @__PURE__ */ import_react4.default.createElement(
1273
+ import_react_bootstrap.Button,
1233
1274
  {
1234
1275
  type: "button",
1235
1276
  className: "PayButton",
@@ -1237,7 +1278,7 @@ function RequestPayment(props) {
1237
1278
  disabled: loading
1238
1279
  },
1239
1280
  loading ? "Loading..." : "Send Request"
1240
- )), /* @__PURE__ */ React4.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React4.createElement(
1281
+ )), /* @__PURE__ */ import_react4.default.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ import_react4.default.createElement(
1241
1282
  "svg",
1242
1283
  {
1243
1284
  xmlns: "http://www.w3.org/2000/svg",
@@ -1245,14 +1286,14 @@ function RequestPayment(props) {
1245
1286
  height: "20",
1246
1287
  viewBox: "0 0 26 26"
1247
1288
  },
1248
- /* @__PURE__ */ React4.createElement(
1289
+ /* @__PURE__ */ import_react4.default.createElement(
1249
1290
  "path",
1250
1291
  {
1251
1292
  fill: "currentColor",
1252
1293
  d: "M23.633 5.028a1.074 1.074 0 0 0-.777-.366c-2.295-.06-5.199-2.514-7.119-3.477C14.551.592 13.768.201 13.18.098a1.225 1.225 0 0 0-.36.001c-.588.103-1.371.494-2.556 1.087c-1.92.962-4.824 3.416-7.119 3.476a1.08 1.08 0 0 0-.778.366a1.167 1.167 0 0 0-.291.834c.493 10.023 4.088 16.226 10.396 19.831c.164.093.346.141.527.141s.363-.048.528-.141c6.308-3.605 9.902-9.808 10.396-19.831a1.161 1.161 0 0 0-.29-.834zM18.617 8.97l-5.323 7.855c-.191.282-.491.469-.788.469c-.298 0-.629-.163-.838-.372l-3.752-3.753a.656.656 0 0 1 0-.926l.927-.929a.658.658 0 0 1 .926 0l2.44 2.44l4.239-6.257a.657.657 0 0 1 .91-.173l1.085.736a.657.657 0 0 1 .174.91z"
1253
1294
  }
1254
1295
  )
1255
- ), "Secure payments powered by Fractal", /* @__PURE__ */ React4.createElement(
1296
+ ), "Secure payments powered by Fractal", /* @__PURE__ */ import_react4.default.createElement(
1256
1297
  "img",
1257
1298
  {
1258
1299
  src: "https://ui.fractalpay.com/favicon.ico",
@@ -1260,15 +1301,15 @@ function RequestPayment(props) {
1260
1301
  className: "powered-logo"
1261
1302
  }
1262
1303
  )))
1263
- ), /* @__PURE__ */ React4.createElement(
1264
- Modal,
1304
+ ), /* @__PURE__ */ import_react4.default.createElement(
1305
+ import_react_bootstrap.Modal,
1265
1306
  {
1266
1307
  className: "payment-suc",
1267
1308
  show: showConfirmationModal,
1268
1309
  onHide: handleCloseConfirmationModal
1269
1310
  },
1270
- /* @__PURE__ */ React4.createElement(Modal.Header, { closeButton: true }),
1271
- /* @__PURE__ */ React4.createElement(Modal.Body, null, /* @__PURE__ */ React4.createElement(
1311
+ /* @__PURE__ */ import_react4.default.createElement(import_react_bootstrap.Modal.Header, { closeButton: true }),
1312
+ /* @__PURE__ */ import_react4.default.createElement(import_react_bootstrap.Modal.Body, null, /* @__PURE__ */ import_react4.default.createElement(
1272
1313
  "svg",
1273
1314
  {
1274
1315
  width: "60",
@@ -1277,7 +1318,7 @@ function RequestPayment(props) {
1277
1318
  fill: "none",
1278
1319
  xmlns: "http://www.w3.org/2000/svg"
1279
1320
  },
1280
- /* @__PURE__ */ React4.createElement(
1321
+ /* @__PURE__ */ import_react4.default.createElement(
1281
1322
  "rect",
1282
1323
  {
1283
1324
  x: "0.5",
@@ -1288,14 +1329,14 @@ function RequestPayment(props) {
1288
1329
  stroke: "#31B379"
1289
1330
  }
1290
1331
  ),
1291
- /* @__PURE__ */ React4.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React4.createElement(
1332
+ /* @__PURE__ */ import_react4.default.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ import_react4.default.createElement(
1292
1333
  "path",
1293
1334
  {
1294
1335
  d: "M41.1778 22.248C40.7483 21.8184 40.0518 21.8184 39.6222 22.248L26.4435 35.4268L21.3778 30.3611C20.9483 29.9315 20.2518 29.9316 19.8222 30.3611C19.3926 30.7907 19.3926 31.4871 19.8222 31.9167L25.6657 37.7601C26.0951 38.1897 26.7921 38.1894 27.2213 37.7601L41.1778 23.8036C41.6074 23.3741 41.6074 22.6776 41.1778 22.248Z",
1295
1336
  fill: "#31B379"
1296
1337
  }
1297
1338
  )),
1298
- /* @__PURE__ */ React4.createElement("defs", null, /* @__PURE__ */ React4.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React4.createElement(
1339
+ /* @__PURE__ */ import_react4.default.createElement("defs", null, /* @__PURE__ */ import_react4.default.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ import_react4.default.createElement(
1299
1340
  "rect",
1300
1341
  {
1301
1342
  width: "22",
@@ -1304,28 +1345,28 @@ function RequestPayment(props) {
1304
1345
  transform: "translate(19.5 19.0039)"
1305
1346
  }
1306
1347
  )))
1307
- ), /* @__PURE__ */ React4.createElement("h2", null, "Payment link has been ", /* @__PURE__ */ React4.createElement("br", null), " sent successfully"))
1348
+ ), /* @__PURE__ */ import_react4.default.createElement("h2", null, "Payment link has been ", /* @__PURE__ */ import_react4.default.createElement("br", null), " sent successfully"))
1308
1349
  )));
1309
1350
  }
1310
1351
 
1311
1352
  // src/app/components/RequestPayment/RequestPaymentAllInput.tsx
1312
- import React5, { useState as useState2 } from "react";
1313
- import { Modal as Modal2 } from "react-bootstrap";
1314
- import { toast, ToastContainer } from "react-toastify";
1315
- import "react-toastify/dist/ReactToastify.css";
1353
+ var import_react5 = __toESM(require("react"));
1354
+ var import_react_bootstrap2 = require("react-bootstrap");
1355
+ var import_react_toastify = require("react-toastify");
1356
+ var import_ReactToastify = require("react-toastify/dist/ReactToastify.css");
1316
1357
  function RequestPaymentAllInput({ fractalpayClientKey }) {
1317
- const [isLoading, setIsLoading] = useState2(false);
1318
- const [show, setShow] = useState2(false);
1319
- const [phoneNumber, setPhoneNumber] = useState2("");
1320
- const [amount, setAmount] = useState2("");
1321
- const [orderId, setOrderId] = useState2("");
1322
- const [isValidNumber, setIsValidNumber] = useState2(true);
1323
- const [isValidAmount, setIsValidAmount] = useState2(true);
1324
- const [isValidOrderId, setIsValidOrderId] = useState2(true);
1325
- const [errorMessagephone, setErrorMessagephone] = useState2("");
1326
- const [errorMessageamount, setErrorMessageamount] = useState2("");
1327
- const [errorMessageorderid, setErrorMessageorderid] = useState2("");
1328
- const [submitClicked, setSubmitClicked] = useState2(false);
1358
+ const [isLoading, setIsLoading] = (0, import_react5.useState)(false);
1359
+ const [show, setShow] = (0, import_react5.useState)(false);
1360
+ const [phoneNumber, setPhoneNumber] = (0, import_react5.useState)("");
1361
+ const [amount, setAmount] = (0, import_react5.useState)("");
1362
+ const [orderId, setOrderId] = (0, import_react5.useState)("");
1363
+ const [isValidNumber, setIsValidNumber] = (0, import_react5.useState)(true);
1364
+ const [isValidAmount, setIsValidAmount] = (0, import_react5.useState)(true);
1365
+ const [isValidOrderId, setIsValidOrderId] = (0, import_react5.useState)(true);
1366
+ const [errorMessagephone, setErrorMessagephone] = (0, import_react5.useState)("");
1367
+ const [errorMessageamount, setErrorMessageamount] = (0, import_react5.useState)("");
1368
+ const [errorMessageorderid, setErrorMessageorderid] = (0, import_react5.useState)("");
1369
+ const [submitClicked, setSubmitClicked] = (0, import_react5.useState)(false);
1329
1370
  const handleClose = () => setShow(false);
1330
1371
  const handleShow = () => setShow(true);
1331
1372
  const sendRequestPayment = () => {
@@ -1387,7 +1428,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
1387
1428
  }).catch((error) => {
1388
1429
  setIsLoading(false);
1389
1430
  console.error("Error:", error);
1390
- toast.error(ErrorText.anerroroccured);
1431
+ import_react_toastify.toast.error(ErrorText.anerroroccured);
1391
1432
  });
1392
1433
  };
1393
1434
  const handlePhoneNumberChange = (e) => {
@@ -1427,7 +1468,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
1427
1468
  setIsValidOrderId(false);
1428
1469
  }
1429
1470
  };
1430
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React5.createElement("div", { className: " border-container" }, /* @__PURE__ */ React5.createElement("div", { className: "payment-column" }, /* @__PURE__ */ React5.createElement("label", null, "Enter Phone Number:"), /* @__PURE__ */ React5.createElement("div", { className: "input-container" }, /* @__PURE__ */ React5.createElement(
1471
+ return /* @__PURE__ */ import_react5.default.createElement(import_react5.default.Fragment, null, /* @__PURE__ */ import_react5.default.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ import_react5.default.createElement("div", { className: " border-container" }, /* @__PURE__ */ import_react5.default.createElement("div", { className: "payment-column" }, /* @__PURE__ */ import_react5.default.createElement("label", null, "Enter Phone Number:"), /* @__PURE__ */ import_react5.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react5.default.createElement(
1431
1472
  "input",
1432
1473
  {
1433
1474
  type: "text",
@@ -1437,7 +1478,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
1437
1478
  maxLength: 10,
1438
1479
  className: submitClicked && (!phoneNumber || !isValidNumber) ? "error" : ""
1439
1480
  }
1440
- ), errorMessagephone && /* @__PURE__ */ React5.createElement("div", { className: "error-message text-danger" }, errorMessagephone))), /* @__PURE__ */ React5.createElement("div", { className: "payment-column" }, /* @__PURE__ */ React5.createElement("label", null, "Enter Amount:"), /* @__PURE__ */ React5.createElement("div", { className: "input-container" }, /* @__PURE__ */ React5.createElement(
1481
+ ), errorMessagephone && /* @__PURE__ */ import_react5.default.createElement("div", { className: "error-message text-danger" }, errorMessagephone))), /* @__PURE__ */ import_react5.default.createElement("div", { className: "payment-column" }, /* @__PURE__ */ import_react5.default.createElement("label", null, "Enter Amount:"), /* @__PURE__ */ import_react5.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react5.default.createElement(
1441
1482
  "input",
1442
1483
  {
1443
1484
  type: "text",
@@ -1446,7 +1487,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
1446
1487
  placeholder: "Enter amount",
1447
1488
  className: submitClicked && (!amount || !isValidAmount) ? "error" : ""
1448
1489
  }
1449
- ), errorMessageamount && /* @__PURE__ */ React5.createElement("div", { className: "error-message text-danger" }, errorMessageamount))), /* @__PURE__ */ React5.createElement("div", { className: "payment-column" }, /* @__PURE__ */ React5.createElement("label", null, "Enter Order ID:"), /* @__PURE__ */ React5.createElement("div", { className: "input-container" }, /* @__PURE__ */ React5.createElement(
1490
+ ), errorMessageamount && /* @__PURE__ */ import_react5.default.createElement("div", { className: "error-message text-danger" }, errorMessageamount))), /* @__PURE__ */ import_react5.default.createElement("div", { className: "payment-column" }, /* @__PURE__ */ import_react5.default.createElement("label", null, "Enter Order ID:"), /* @__PURE__ */ import_react5.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react5.default.createElement(
1450
1491
  "input",
1451
1492
  {
1452
1493
  type: "text",
@@ -1455,7 +1496,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
1455
1496
  placeholder: "Enter order ID",
1456
1497
  className: submitClicked && (!orderId || !isValidOrderId) ? "error" : ""
1457
1498
  }
1458
- ), errorMessageorderid && /* @__PURE__ */ React5.createElement("div", { className: "error-message text-danger" }, errorMessageorderid))), /* @__PURE__ */ React5.createElement(
1499
+ ), errorMessageorderid && /* @__PURE__ */ import_react5.default.createElement("div", { className: "error-message text-danger" }, errorMessageorderid))), /* @__PURE__ */ import_react5.default.createElement(
1459
1500
  "button",
1460
1501
  {
1461
1502
  onClick: sendRequestPayment,
@@ -1463,7 +1504,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
1463
1504
  className: "paymentBtn"
1464
1505
  },
1465
1506
  isLoading ? "Loading..." : "Request Payment"
1466
- )), /* @__PURE__ */ React5.createElement(Modal2, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React5.createElement(Modal2.Header, { closeButton: true }), /* @__PURE__ */ React5.createElement(Modal2.Body, null, /* @__PURE__ */ React5.createElement(
1507
+ )), /* @__PURE__ */ import_react5.default.createElement(import_react_bootstrap2.Modal, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ import_react5.default.createElement(import_react_bootstrap2.Modal.Header, { closeButton: true }), /* @__PURE__ */ import_react5.default.createElement(import_react_bootstrap2.Modal.Body, null, /* @__PURE__ */ import_react5.default.createElement(
1467
1508
  "svg",
1468
1509
  {
1469
1510
  width: "60",
@@ -1472,7 +1513,7 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
1472
1513
  fill: "none",
1473
1514
  xmlns: "http://www.w3.org/2000/svg"
1474
1515
  },
1475
- /* @__PURE__ */ React5.createElement(
1516
+ /* @__PURE__ */ import_react5.default.createElement(
1476
1517
  "rect",
1477
1518
  {
1478
1519
  x: "0.5",
@@ -1483,14 +1524,14 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
1483
1524
  stroke: "#31B379"
1484
1525
  }
1485
1526
  ),
1486
- /* @__PURE__ */ React5.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React5.createElement(
1527
+ /* @__PURE__ */ import_react5.default.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ import_react5.default.createElement(
1487
1528
  "path",
1488
1529
  {
1489
1530
  d: "M41.1778 22.248C40.7483 21.8184 40.0518 21.8184 39.6222 22.248L26.4435 35.4268L21.3778 30.3611C20.9483 29.9315 20.2518 29.9316 19.8222 30.3611C19.3926 30.7907 19.3926 31.4871 19.8222 31.9167L25.6657 37.7601C26.0951 38.1897 26.7921 38.1894 27.2213 37.7601L41.1778 23.8036C41.6074 23.3741 41.6074 22.6776 41.1778 22.248Z",
1490
1531
  fill: "#31B379"
1491
1532
  }
1492
1533
  )),
1493
- /* @__PURE__ */ React5.createElement("defs", null, /* @__PURE__ */ React5.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React5.createElement(
1534
+ /* @__PURE__ */ import_react5.default.createElement("defs", null, /* @__PURE__ */ import_react5.default.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ import_react5.default.createElement(
1494
1535
  "rect",
1495
1536
  {
1496
1537
  width: "22",
@@ -1499,12 +1540,12 @@ function RequestPaymentAllInput({ fractalpayClientKey }) {
1499
1540
  transform: "translate(19.5 19.0039)"
1500
1541
  }
1501
1542
  )))
1502
- ), /* @__PURE__ */ React5.createElement("h1", null, "Success!"), /* @__PURE__ */ React5.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ React5.createElement(Modal2.Footer, null, /* @__PURE__ */ React5.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ React5.createElement(ToastContainer, null));
1543
+ ), /* @__PURE__ */ import_react5.default.createElement("h1", null, "Success!"), /* @__PURE__ */ import_react5.default.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ import_react5.default.createElement(import_react_bootstrap2.Modal.Footer, null, /* @__PURE__ */ import_react5.default.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ import_react5.default.createElement(import_react_toastify.ToastContainer, null));
1503
1544
  }
1504
1545
 
1505
1546
  // src/app/components/RequestPayment/RequestPaymentDynamic.tsx
1506
- import React6, { useState as useState3 } from "react";
1507
- import { Modal as Modal3 } from "react-bootstrap";
1547
+ var import_react6 = __toESM(require("react"));
1548
+ var import_react_bootstrap3 = require("react-bootstrap");
1508
1549
 
1509
1550
  // src/app/components/Api/createWidgetOrder.ts
1510
1551
  var createWidgetOrder = (formData) => {
@@ -1528,8 +1569,8 @@ var createWidgetOrder = (formData) => {
1528
1569
  // src/app/components/RequestPayment/RequestPaymentDynamic.tsx
1529
1570
  function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orderID }) {
1530
1571
  console.log("props", { fractalpayClientKey, amount, phone_number, orderID });
1531
- const [isLoading, setIsLoading] = useState3(false);
1532
- const [show, setShow] = useState3(false);
1572
+ const [isLoading, setIsLoading] = (0, import_react6.useState)(false);
1573
+ const [show, setShow] = (0, import_react6.useState)(false);
1533
1574
  const handleClose = () => setShow(false);
1534
1575
  const handleShow = () => setShow(true);
1535
1576
  const sendRequestPayment = () => {
@@ -1552,7 +1593,7 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
1552
1593
  console.error("Error:", error);
1553
1594
  });
1554
1595
  };
1555
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
1596
+ return /* @__PURE__ */ import_react6.default.createElement(import_react6.default.Fragment, null, /* @__PURE__ */ import_react6.default.createElement(
1556
1597
  "button",
1557
1598
  {
1558
1599
  onClick: sendRequestPayment,
@@ -1560,7 +1601,7 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
1560
1601
  className: "paymentBtn"
1561
1602
  },
1562
1603
  isLoading ? "Loading..." : "Request Payment"
1563
- ), /* @__PURE__ */ React6.createElement(Modal3, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React6.createElement(Modal3.Header, { closeButton: true }), /* @__PURE__ */ React6.createElement(Modal3.Body, null, /* @__PURE__ */ React6.createElement(
1604
+ ), /* @__PURE__ */ import_react6.default.createElement(import_react_bootstrap3.Modal, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ import_react6.default.createElement(import_react_bootstrap3.Modal.Header, { closeButton: true }), /* @__PURE__ */ import_react6.default.createElement(import_react_bootstrap3.Modal.Body, null, /* @__PURE__ */ import_react6.default.createElement(
1564
1605
  "svg",
1565
1606
  {
1566
1607
  width: "60",
@@ -1569,7 +1610,7 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
1569
1610
  fill: "none",
1570
1611
  xmlns: "http://www.w3.org/2000/svg"
1571
1612
  },
1572
- /* @__PURE__ */ React6.createElement(
1613
+ /* @__PURE__ */ import_react6.default.createElement(
1573
1614
  "rect",
1574
1615
  {
1575
1616
  x: "0.5",
@@ -1580,14 +1621,14 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
1580
1621
  stroke: "#31B379"
1581
1622
  }
1582
1623
  ),
1583
- /* @__PURE__ */ React6.createElement("g", { "clip-path": "url(#clip0_2659_5018)" }, /* @__PURE__ */ React6.createElement(
1624
+ /* @__PURE__ */ import_react6.default.createElement("g", { "clip-path": "url(#clip0_2659_5018)" }, /* @__PURE__ */ import_react6.default.createElement(
1584
1625
  "path",
1585
1626
  {
1586
1627
  d: "M41.1778 22.248C40.7483 21.8184 40.0518 21.8184 39.6222 22.248L26.4435 35.4268L21.3778 30.3611C20.9483 29.9315 20.2518 29.9316 19.8222 30.3611C19.3926 30.7907 19.3926 31.4871 19.8222 31.9167L25.6657 37.7601C26.0951 38.1897 26.7921 38.1894 27.2213 37.7601L41.1778 23.8036C41.6074 23.3741 41.6074 22.6776 41.1778 22.248Z",
1587
1628
  fill: "#31B379"
1588
1629
  }
1589
1630
  )),
1590
- /* @__PURE__ */ React6.createElement("defs", null, /* @__PURE__ */ React6.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React6.createElement(
1631
+ /* @__PURE__ */ import_react6.default.createElement("defs", null, /* @__PURE__ */ import_react6.default.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ import_react6.default.createElement(
1591
1632
  "rect",
1592
1633
  {
1593
1634
  width: "22",
@@ -1596,15 +1637,15 @@ function RequestPaymentDynamic({ fractalpayClientKey, amount, phone_number, orde
1596
1637
  transform: "translate(19.5 19.0039)"
1597
1638
  }
1598
1639
  )))
1599
- ), /* @__PURE__ */ React6.createElement("h1", null, "Success!"), /* @__PURE__ */ React6.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ React6.createElement(Modal3.Footer, null, /* @__PURE__ */ React6.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
1640
+ ), /* @__PURE__ */ import_react6.default.createElement("h1", null, "Success!"), /* @__PURE__ */ import_react6.default.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ import_react6.default.createElement(import_react_bootstrap3.Modal.Footer, null, /* @__PURE__ */ import_react6.default.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
1600
1641
  }
1601
1642
 
1602
1643
  // src/app/components/RequestPayment/RequestPaymentonClick.tsx
1603
- import React7, { useState as useState4 } from "react";
1604
- import { Modal as Modal4 } from "react-bootstrap";
1644
+ var import_react7 = __toESM(require("react"));
1645
+ var import_react_bootstrap4 = require("react-bootstrap");
1605
1646
  function RequestPaymentonClick(props) {
1606
- const [isLoading, setIsLoading] = useState4(false);
1607
- const [show, setShow] = useState4(false);
1647
+ const [isLoading, setIsLoading] = (0, import_react7.useState)(false);
1648
+ const [show, setShow] = (0, import_react7.useState)(false);
1608
1649
  const handleClose = () => setShow(false);
1609
1650
  const handleShow = () => setShow(true);
1610
1651
  const { fractalpayClientKey, amount, phone_number, orderID, onSuccess, onError } = props;
@@ -1638,7 +1679,7 @@ function RequestPaymentonClick(props) {
1638
1679
  console.error("Error:", error);
1639
1680
  });
1640
1681
  };
1641
- return /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ React7.createElement(
1682
+ return /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement(RequestPaymentstyles_default, null), /* @__PURE__ */ import_react7.default.createElement(
1642
1683
  "button",
1643
1684
  {
1644
1685
  onClick: sendRequestPayment,
@@ -1646,7 +1687,7 @@ function RequestPaymentonClick(props) {
1646
1687
  className: "paymentBtn"
1647
1688
  },
1648
1689
  isLoading ? "Loading..." : "Request Payment"
1649
- ), /* @__PURE__ */ React7.createElement(Modal4, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React7.createElement(Modal4.Header, { closeButton: true }), /* @__PURE__ */ React7.createElement(Modal4.Body, null, onSuccess && /* @__PURE__ */ React7.createElement(
1690
+ ), /* @__PURE__ */ import_react7.default.createElement(import_react_bootstrap4.Modal, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ import_react7.default.createElement(import_react_bootstrap4.Modal.Header, { closeButton: true }), /* @__PURE__ */ import_react7.default.createElement(import_react_bootstrap4.Modal.Body, null, onSuccess && /* @__PURE__ */ import_react7.default.createElement(
1650
1691
  "svg",
1651
1692
  {
1652
1693
  width: "60",
@@ -1655,7 +1696,7 @@ function RequestPaymentonClick(props) {
1655
1696
  fill: "none",
1656
1697
  xmlns: "http://www.w3.org/2000/svg"
1657
1698
  },
1658
- /* @__PURE__ */ React7.createElement(
1699
+ /* @__PURE__ */ import_react7.default.createElement(
1659
1700
  "rect",
1660
1701
  {
1661
1702
  x: "0.5",
@@ -1666,14 +1707,14 @@ function RequestPaymentonClick(props) {
1666
1707
  stroke: "#31B379"
1667
1708
  }
1668
1709
  ),
1669
- /* @__PURE__ */ React7.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React7.createElement(
1710
+ /* @__PURE__ */ import_react7.default.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ import_react7.default.createElement(
1670
1711
  "path",
1671
1712
  {
1672
1713
  d: "M41.1778 22.248C40.7483 21.8184 40.0518 21.8184 39.6222 22.248L26.4435 35.4268L21.3778 30.3611C20.9483 29.9315 20.2518 29.9316 19.8222 30.3611C19.3926 30.7907 19.3926 31.4871 19.8222 31.9167L25.6657 37.7601C26.0951 38.1897 26.7921 38.1894 27.2213 37.7601L41.1778 23.8036C41.6074 23.3741 41.6074 22.6776 41.1778 22.248Z",
1673
1714
  fill: "#31B379"
1674
1715
  }
1675
1716
  )),
1676
- /* @__PURE__ */ React7.createElement("defs", null, /* @__PURE__ */ React7.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React7.createElement(
1717
+ /* @__PURE__ */ import_react7.default.createElement("defs", null, /* @__PURE__ */ import_react7.default.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ import_react7.default.createElement(
1677
1718
  "rect",
1678
1719
  {
1679
1720
  width: "22",
@@ -1682,21 +1723,21 @@ function RequestPaymentonClick(props) {
1682
1723
  transform: "translate(19.5 19.0039)"
1683
1724
  }
1684
1725
  )))
1685
- ), onSuccess ? /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("h1", null, "Success!"), /* @__PURE__ */ React7.createElement("h4", null, onSuccess)) : /* @__PURE__ */ React7.createElement(React7.Fragment, null, /* @__PURE__ */ React7.createElement("h1", null, "Error!"), /* @__PURE__ */ React7.createElement("h4", null, onError))), /* @__PURE__ */ React7.createElement(Modal4.Footer, null, /* @__PURE__ */ React7.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
1726
+ ), onSuccess ? /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement("h1", null, "Success!"), /* @__PURE__ */ import_react7.default.createElement("h4", null, onSuccess)) : /* @__PURE__ */ import_react7.default.createElement(import_react7.default.Fragment, null, /* @__PURE__ */ import_react7.default.createElement("h1", null, "Error!"), /* @__PURE__ */ import_react7.default.createElement("h4", null, onError))), /* @__PURE__ */ import_react7.default.createElement(import_react_bootstrap4.Modal.Footer, null, /* @__PURE__ */ import_react7.default.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))));
1686
1727
  }
1687
1728
 
1688
1729
  // src/app/components/RequestPayment/RqstPaymntInputField.tsx
1689
- import React8, { useState as useState5 } from "react";
1690
- import { Modal as Modal5 } from "react-bootstrap";
1691
- import { toast as toast2, ToastContainer as ToastContainer2 } from "react-toastify";
1692
- import "react-toastify/dist/ReactToastify.css";
1730
+ var import_react8 = __toESM(require("react"));
1731
+ var import_react_bootstrap5 = require("react-bootstrap");
1732
+ var import_react_toastify2 = require("react-toastify");
1733
+ var import_ReactToastify2 = require("react-toastify/dist/ReactToastify.css");
1693
1734
  function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
1694
- const [isLoading, setIsLoading] = useState5(false);
1695
- const [show, setShow] = useState5(false);
1696
- const [phoneNumber, setPhoneNumber] = useState5("");
1697
- const [isValidNumber, setIsValidNumber] = useState5(true);
1698
- const [errorMessage, setErrorMessage] = useState5("");
1699
- const [submitClicked, setSubmitClicked] = useState5(false);
1735
+ const [isLoading, setIsLoading] = (0, import_react8.useState)(false);
1736
+ const [show, setShow] = (0, import_react8.useState)(false);
1737
+ const [phoneNumber, setPhoneNumber] = (0, import_react8.useState)("");
1738
+ const [isValidNumber, setIsValidNumber] = (0, import_react8.useState)(true);
1739
+ const [errorMessage, setErrorMessage] = (0, import_react8.useState)("");
1740
+ const [submitClicked, setSubmitClicked] = (0, import_react8.useState)(false);
1700
1741
  const handleClose = () => setShow(false);
1701
1742
  const handleShow = () => setShow(true);
1702
1743
  const sendRequestPayment = () => {
@@ -1741,7 +1782,7 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
1741
1782
  }).catch((error) => {
1742
1783
  setIsLoading(false);
1743
1784
  console.error("Error:", error);
1744
- toast2.error(ErrorText.anerroroccured);
1785
+ import_react_toastify2.toast.error(ErrorText.anerroroccured);
1745
1786
  });
1746
1787
  };
1747
1788
  const handlePhoneNumberChange = (e) => {
@@ -1759,7 +1800,7 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
1759
1800
  setErrorMessage(ErrorText.phonenumbervalid);
1760
1801
  }
1761
1802
  };
1762
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement("div", { className: "payment-container" }, /* @__PURE__ */ React8.createElement("div", { className: "input-wrapper" }, /* @__PURE__ */ React8.createElement("div", { className: "input-container" }, /* @__PURE__ */ React8.createElement(
1803
+ return /* @__PURE__ */ import_react8.default.createElement(import_react8.default.Fragment, null, /* @__PURE__ */ import_react8.default.createElement("div", { className: "payment-container" }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "input-wrapper" }, /* @__PURE__ */ import_react8.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react8.default.createElement(
1763
1804
  "input",
1764
1805
  {
1765
1806
  type: "text",
@@ -1769,7 +1810,7 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
1769
1810
  maxLength: 10,
1770
1811
  className: submitClicked && (!phoneNumber || !isValidNumber) ? "error" : ""
1771
1812
  }
1772
- ), errorMessage && /* @__PURE__ */ React8.createElement("div", { className: "error-message text-danger" }, errorMessage))), /* @__PURE__ */ React8.createElement("div", { className: "button-wrapper" }, /* @__PURE__ */ React8.createElement(
1813
+ ), errorMessage && /* @__PURE__ */ import_react8.default.createElement("div", { className: "error-message text-danger" }, errorMessage))), /* @__PURE__ */ import_react8.default.createElement("div", { className: "button-wrapper" }, /* @__PURE__ */ import_react8.default.createElement(
1773
1814
  "button",
1774
1815
  {
1775
1816
  onClick: sendRequestPayment,
@@ -1777,7 +1818,7 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
1777
1818
  className: "paymentBtn"
1778
1819
  },
1779
1820
  isLoading ? "Loading..." : "Request Payment"
1780
- ))), /* @__PURE__ */ React8.createElement(Modal5, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ React8.createElement(Modal5.Header, { closeButton: true }), /* @__PURE__ */ React8.createElement(Modal5.Body, null, /* @__PURE__ */ React8.createElement(
1821
+ ))), /* @__PURE__ */ import_react8.default.createElement(import_react_bootstrap5.Modal, { className: "payment-suc", show, onHide: handleClose }, /* @__PURE__ */ import_react8.default.createElement(import_react_bootstrap5.Modal.Header, { closeButton: true }), /* @__PURE__ */ import_react8.default.createElement(import_react_bootstrap5.Modal.Body, null, /* @__PURE__ */ import_react8.default.createElement(
1781
1822
  "svg",
1782
1823
  {
1783
1824
  width: "60",
@@ -1786,7 +1827,7 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
1786
1827
  fill: "none",
1787
1828
  xmlns: "http://www.w3.org/2000/svg"
1788
1829
  },
1789
- /* @__PURE__ */ React8.createElement(
1830
+ /* @__PURE__ */ import_react8.default.createElement(
1790
1831
  "rect",
1791
1832
  {
1792
1833
  x: "0.5",
@@ -1797,14 +1838,14 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
1797
1838
  stroke: "#31B379"
1798
1839
  }
1799
1840
  ),
1800
- /* @__PURE__ */ React8.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ React8.createElement(
1841
+ /* @__PURE__ */ import_react8.default.createElement("g", { clipPath: "url(#clip0_2659_5018)" }, /* @__PURE__ */ import_react8.default.createElement(
1801
1842
  "path",
1802
1843
  {
1803
1844
  d: "M41.1778 22.248C40.7483 21.8184 40.0518 21.8184 39.6222 22.248L26.4435 35.4268L21.3778 30.3611C20.9483 29.9315 20.2518 29.9316 19.8222 30.3611C19.3926 30.7907 19.3926 31.4871 19.8222 31.9167L25.6657 37.7601C26.0951 38.1897 26.7921 38.1894 27.2213 37.7601L41.1778 23.8036C41.6074 23.3741 41.6074 22.6776 41.1778 22.248Z",
1804
1845
  fill: "#31B379"
1805
1846
  }
1806
1847
  )),
1807
- /* @__PURE__ */ React8.createElement("defs", null, /* @__PURE__ */ React8.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ React8.createElement(
1848
+ /* @__PURE__ */ import_react8.default.createElement("defs", null, /* @__PURE__ */ import_react8.default.createElement("clipPath", { id: "clip0_2659_5018" }, /* @__PURE__ */ import_react8.default.createElement(
1808
1849
  "rect",
1809
1850
  {
1810
1851
  width: "22",
@@ -1813,20 +1854,20 @@ function RqstPaymntInputField({ fractalpayClientKey, amount, orderID }) {
1813
1854
  transform: "translate(19.5 19.0039)"
1814
1855
  }
1815
1856
  )))
1816
- ), /* @__PURE__ */ React8.createElement("h1", null, "Success!"), /* @__PURE__ */ React8.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ React8.createElement(Modal5.Footer, null, /* @__PURE__ */ React8.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ React8.createElement(ToastContainer2, null));
1857
+ ), /* @__PURE__ */ import_react8.default.createElement("h1", null, "Success!"), /* @__PURE__ */ import_react8.default.createElement("h4", null, "Payment link created successfully.")), /* @__PURE__ */ import_react8.default.createElement(import_react_bootstrap5.Modal.Footer, null, /* @__PURE__ */ import_react8.default.createElement("button", { className: "paymentBtn", onClick: handleClose }, "Ok"))), /* @__PURE__ */ import_react8.default.createElement(import_react_toastify2.ToastContainer, null));
1817
1858
  }
1818
1859
 
1819
1860
  // src/app/components/Payment/Payment.tsx
1820
- import React10, { useState as useState6 } from "react";
1821
- import axios2 from "axios";
1822
- import forge from "node-forge";
1823
- import { toast as toast3 } from "react-toastify";
1824
- import { Modal as Modal6 } from "react-bootstrap";
1861
+ var import_react10 = __toESM(require("react"));
1862
+ var import_axios2 = __toESM(require("axios"));
1863
+ var import_node_forge = __toESM(require("node-forge"));
1864
+ var import_react_toastify3 = require("react-toastify");
1865
+ var import_react_bootstrap6 = require("react-bootstrap");
1825
1866
 
1826
1867
  // src/app/components/Payment/Paymentstyles.tsx
1827
- import React9 from "react";
1868
+ var import_react9 = __toESM(require("react"));
1828
1869
  function Paymentstyles() {
1829
- return /* @__PURE__ */ React9.createElement("style", null, `
1870
+ return /* @__PURE__ */ import_react9.default.createElement("style", null, `
1830
1871
  .paymentBtn {
1831
1872
  background-color: black;
1832
1873
  border: none;
@@ -2752,7 +2793,7 @@ input {
2752
2793
  // src/app/components/Payment/Payment.tsx
2753
2794
  function Payment() {
2754
2795
  var _a;
2755
- const [state, setState] = useState6({
2796
+ const [state, setState] = (0, import_react10.useState)({
2756
2797
  show: false,
2757
2798
  publicKey: "",
2758
2799
  sessionKey: "",
@@ -2763,12 +2804,12 @@ function Payment() {
2763
2804
  zip: "",
2764
2805
  amount: ""
2765
2806
  });
2766
- const [isValid, setIsValid] = useState6(false);
2767
- const [isValidMonth, setIsValidMonth] = useState6(false);
2768
- const [data, setData] = useState6(null);
2807
+ const [isValid, setIsValid] = (0, import_react10.useState)(false);
2808
+ const [isValidMonth, setIsValidMonth] = (0, import_react10.useState)(false);
2809
+ const [data, setData] = (0, import_react10.useState)(null);
2769
2810
  const handlePaymentClick = async () => {
2770
2811
  try {
2771
- const response = await axios2.post(`${baseUrl}generate-session`, {});
2812
+ const response = await import_axios2.default.post(`${baseUrl}generate-session`, {});
2772
2813
  const data2 = response.data;
2773
2814
  if (data2 && (data2 == null ? void 0 : data2.result) === true) {
2774
2815
  setState((prev) => {
@@ -2786,12 +2827,12 @@ function Payment() {
2786
2827
  };
2787
2828
  const handleSubmitPay = async () => {
2788
2829
  const track2_data = `${state.cardNumber.replace(/\s+/g, "")}=${state.year}${state.month.length > 1 ? state.month : "0" + state.month} ${state.cvv}`;
2789
- const publicKey = forge.pki.publicKeyFromPem(state.publicKey);
2830
+ const publicKey = import_node_forge.default.pki.publicKeyFromPem(state.publicKey);
2790
2831
  const encrypted = publicKey.encrypt(track2_data, "RSA-OAEP", {
2791
- md: forge.md.sha1.create(),
2792
- mgf1: { md: forge.md.sha1.create() }
2832
+ md: import_node_forge.default.md.sha1.create(),
2833
+ mgf1: { md: import_node_forge.default.md.sha1.create() }
2793
2834
  });
2794
- const encryptedBase64 = forge.util.encode64(encrypted);
2835
+ const encryptedBase64 = import_node_forge.default.util.encode64(encrypted);
2795
2836
  console.log(encryptedBase64);
2796
2837
  const requestBody = {
2797
2838
  enc_track2_data: encryptedBase64,
@@ -2800,14 +2841,14 @@ function Payment() {
2800
2841
  };
2801
2842
  const apiUrl = "https://m1ao5pku8b.execute-api.us-east-2.amazonaws.com/prod/tokenizer/tokenize";
2802
2843
  try {
2803
- const response = await axios2.post(apiUrl, requestBody, {
2844
+ const response = await import_axios2.default.post(apiUrl, requestBody, {
2804
2845
  headers: {
2805
2846
  "x-app-session-key": state == null ? void 0 : state.sessionKey,
2806
2847
  "Content-Type": "application/json"
2807
2848
  }
2808
2849
  });
2809
2850
  if ((response == null ? void 0 : response.status) === 200) {
2810
- toast3.success("Payment Successful");
2851
+ import_react_toastify3.toast.success("Payment Successful");
2811
2852
  setState((prev) => __spreadProps(__spreadValues({}, prev), {
2812
2853
  show: false,
2813
2854
  publicKey: "",
@@ -2917,7 +2958,7 @@ function Payment() {
2917
2958
  }
2918
2959
  return "";
2919
2960
  }
2920
- return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(Paymentstyles, null), /* @__PURE__ */ React10.createElement("div", { className: "" }, /* @__PURE__ */ React10.createElement(
2961
+ return /* @__PURE__ */ import_react10.default.createElement(import_react10.default.Fragment, null, /* @__PURE__ */ import_react10.default.createElement(Paymentstyles, null), /* @__PURE__ */ import_react10.default.createElement("div", { className: "" }, /* @__PURE__ */ import_react10.default.createElement(
2921
2962
  "button",
2922
2963
  {
2923
2964
  className: "export-btn",
@@ -2925,8 +2966,8 @@ function Payment() {
2925
2966
  onClick: () => handlePaymentClick()
2926
2967
  },
2927
2968
  "Payment"
2928
- ), /* @__PURE__ */ React10.createElement(
2929
- Modal6,
2969
+ ), /* @__PURE__ */ import_react10.default.createElement(
2970
+ import_react_bootstrap6.Modal,
2930
2971
  {
2931
2972
  show: state.show,
2932
2973
  onHide: () => setState((prev) => __spreadProps(__spreadValues({}, prev), {
@@ -2934,8 +2975,8 @@ function Payment() {
2934
2975
  })),
2935
2976
  centered: true
2936
2977
  },
2937
- /* @__PURE__ */ React10.createElement(Modal6.Header, { closeButton: true }),
2938
- /* @__PURE__ */ React10.createElement(Modal6.Body, null, /* @__PURE__ */ React10.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ React10.createElement("div", { className: "row" }, /* @__PURE__ */ React10.createElement("div", { className: "" }, /* @__PURE__ */ React10.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ React10.createElement("div", { className: "header" }, /* @__PURE__ */ React10.createElement("h1", null, "Pay")), /* @__PURE__ */ React10.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ React10.createElement("div", { className: "form-group", style: { display: "none" } }, /* @__PURE__ */ React10.createElement("label", null, "Payment amount"), /* @__PURE__ */ React10.createElement("div", { className: "input-group" }, /* @__PURE__ */ React10.createElement("span", { className: "input-group-addon" }, "$"), /* @__PURE__ */ React10.createElement(
2978
+ /* @__PURE__ */ import_react10.default.createElement(import_react_bootstrap6.Modal.Header, { closeButton: true }),
2979
+ /* @__PURE__ */ import_react10.default.createElement(import_react_bootstrap6.Modal.Body, null, /* @__PURE__ */ import_react10.default.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "row" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "" }, /* @__PURE__ */ import_react10.default.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "header" }, /* @__PURE__ */ import_react10.default.createElement("h1", null, "Pay")), /* @__PURE__ */ import_react10.default.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "form-group", style: { display: "none" } }, /* @__PURE__ */ import_react10.default.createElement("label", null, "Payment amount"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "input-group" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "input-group-addon" }, "$"), /* @__PURE__ */ import_react10.default.createElement(
2939
2980
  "input",
2940
2981
  {
2941
2982
  type: "text",
@@ -2944,13 +2985,13 @@ function Payment() {
2944
2985
  className: "form-control",
2945
2986
  id: ""
2946
2987
  }
2947
- )), /* @__PURE__ */ React10.createElement(
2988
+ )), /* @__PURE__ */ import_react10.default.createElement(
2948
2989
  "span",
2949
2990
  {
2950
2991
  id: "amount-error",
2951
2992
  style: { color: "red", display: "none" }
2952
2993
  }
2953
- )), /* @__PURE__ */ React10.createElement("div", { className: "form-group" }, /* @__PURE__ */ React10.createElement("label", null, "Name on card"), /* @__PURE__ */ React10.createElement(
2994
+ )), /* @__PURE__ */ import_react10.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "Name on card"), /* @__PURE__ */ import_react10.default.createElement(
2954
2995
  "input",
2955
2996
  {
2956
2997
  id: "NameOnCard",
@@ -2959,13 +3000,13 @@ function Payment() {
2959
3000
  maxLength: 100,
2960
3001
  placeholder: "Name"
2961
3002
  }
2962
- ), /* @__PURE__ */ React10.createElement(
3003
+ ), /* @__PURE__ */ import_react10.default.createElement(
2963
3004
  "span",
2964
3005
  {
2965
3006
  id: "NameOnCard-error",
2966
3007
  style: { color: "red", display: "none" }
2967
3008
  }
2968
- )), /* @__PURE__ */ React10.createElement("div", { className: "form-group" }, /* @__PURE__ */ React10.createElement(
3009
+ )), /* @__PURE__ */ import_react10.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react10.default.createElement(
2969
3010
  "input",
2970
3011
  {
2971
3012
  "data-token": "card_number",
@@ -2976,7 +3017,7 @@ function Payment() {
2976
3017
  placeholder: "0000 0000 0000 0000",
2977
3018
  onChange: handleCardNumberChange
2978
3019
  }
2979
- ), state.error && /* @__PURE__ */ React10.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ React10.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React10.createElement(
3020
+ ), state.error && /* @__PURE__ */ import_react10.default.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ import_react10.default.createElement(
2980
3021
  "input",
2981
3022
  {
2982
3023
  "data-token": "exp_month",
@@ -2987,14 +3028,14 @@ function Payment() {
2987
3028
  maxLength: 2,
2988
3029
  onChange: (e) => handleMonthChange(e)
2989
3030
  }
2990
- ), isValidMonth && /* @__PURE__ */ React10.createElement(
3031
+ ), isValidMonth && /* @__PURE__ */ import_react10.default.createElement(
2991
3032
  "span",
2992
3033
  {
2993
3034
  id: "card_number-error",
2994
3035
  style: { color: "red", fontSize: "15px" }
2995
3036
  },
2996
3037
  (_a = ErrorText) == null ? void 0 : _a.montherror
2997
- )), /* @__PURE__ */ React10.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React10.createElement(
3038
+ )), /* @__PURE__ */ import_react10.default.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ import_react10.default.createElement(
2998
3039
  "input",
2999
3040
  {
3000
3041
  "data-token": "exp_year",
@@ -3005,7 +3046,7 @@ function Payment() {
3005
3046
  value: state.year,
3006
3047
  onChange: (e) => handleYearChange(e)
3007
3048
  }
3008
- ), state.yearError && /* @__PURE__ */ React10.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ React10.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ React10.createElement("div", { className: "input-container" }, /* @__PURE__ */ React10.createElement(
3049
+ ), state.yearError && /* @__PURE__ */ import_react10.default.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react10.default.createElement(
3009
3050
  "input",
3010
3051
  {
3011
3052
  "data-token": "cvv",
@@ -3016,7 +3057,7 @@ function Payment() {
3016
3057
  placeholder: "CVV",
3017
3058
  onChange: (e) => handleCVVChange(e)
3018
3059
  }
3019
- ), /* @__PURE__ */ React10.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ React10.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ React10.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ React10.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ React10.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ React10.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ React10.createElement("label", null, "Postal code"), /* @__PURE__ */ React10.createElement("div", { className: "input-container" }, /* @__PURE__ */ React10.createElement(
3060
+ ), /* @__PURE__ */ import_react10.default.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ import_react10.default.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ import_react10.default.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ import_react10.default.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ import_react10.default.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ import_react10.default.createElement("label", null, "Postal code"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react10.default.createElement(
3020
3061
  "input",
3021
3062
  {
3022
3063
  id: "ZIPCode",
@@ -3028,7 +3069,7 @@ function Payment() {
3028
3069
  value: state.zip,
3029
3070
  onChange: (e) => handleZIP(e)
3030
3071
  }
3031
- ), /* @__PURE__ */ React10.createElement(
3072
+ ), /* @__PURE__ */ import_react10.default.createElement(
3032
3073
  "a",
3033
3074
  {
3034
3075
  tabIndex: 0,
@@ -3038,15 +3079,15 @@ function Payment() {
3038
3079
  "data-placement": "left",
3039
3080
  "data-content": "Enter the ZIP/Postal code for your credit card billing address."
3040
3081
  },
3041
- /* @__PURE__ */ React10.createElement("i", { className: "fa fa-question-circle" })
3042
- ), /* @__PURE__ */ React10.createElement(
3082
+ /* @__PURE__ */ import_react10.default.createElement("i", { className: "fa fa-question-circle" })
3083
+ ), /* @__PURE__ */ import_react10.default.createElement(
3043
3084
  "span",
3044
3085
  {
3045
3086
  id: "ZIPCode-error",
3046
3087
  style: { color: "red", display: "none" }
3047
3088
  },
3048
3089
  ErrorText.fieldrequired
3049
- ))), /* @__PURE__ */ React10.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ React10.createElement("div", null, /* @__PURE__ */ React10.createElement("label", null, "Payment amount"), /* @__PURE__ */ React10.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ React10.createElement(
3090
+ ))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ import_react10.default.createElement("div", null, /* @__PURE__ */ import_react10.default.createElement("label", null, "Payment amount"), /* @__PURE__ */ import_react10.default.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ import_react10.default.createElement(
3050
3091
  "input",
3051
3092
  {
3052
3093
  id: "Amount",
@@ -3058,7 +3099,7 @@ function Payment() {
3058
3099
  onChange: (e) => handleAmount(e),
3059
3100
  onBlur: handleAmountBlur
3060
3101
  }
3061
- ))), /* @__PURE__ */ React10.createElement("div", { className: "card-row" }, /* @__PURE__ */ React10.createElement("span", { className: "visa" }), /* @__PURE__ */ React10.createElement("span", { className: "mastercard" }), /* @__PURE__ */ React10.createElement("span", { className: "amex" }), /* @__PURE__ */ React10.createElement("span", { className: "discover" }))), /* @__PURE__ */ React10.createElement(
3102
+ ))), /* @__PURE__ */ import_react10.default.createElement("div", { className: "card-row" }, /* @__PURE__ */ import_react10.default.createElement("span", { className: "visa" }), /* @__PURE__ */ import_react10.default.createElement("span", { className: "mastercard" }), /* @__PURE__ */ import_react10.default.createElement("span", { className: "amex" }), /* @__PURE__ */ import_react10.default.createElement("span", { className: "discover" }))), /* @__PURE__ */ import_react10.default.createElement(
3062
3103
  "button",
3063
3104
  {
3064
3105
  type: "button",
@@ -3067,7 +3108,7 @@ function Payment() {
3067
3108
  className: "btn btn-block btn-success submit-button"
3068
3109
  },
3069
3110
  "Pay"
3070
- )), /* @__PURE__ */ React10.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React10.createElement(
3111
+ )), /* @__PURE__ */ import_react10.default.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ import_react10.default.createElement(
3071
3112
  "svg",
3072
3113
  {
3073
3114
  xmlns: "http://www.w3.org/2000/svg",
@@ -3075,14 +3116,14 @@ function Payment() {
3075
3116
  height: "20",
3076
3117
  viewBox: "0 0 26 26"
3077
3118
  },
3078
- /* @__PURE__ */ React10.createElement(
3119
+ /* @__PURE__ */ import_react10.default.createElement(
3079
3120
  "path",
3080
3121
  {
3081
3122
  fill: "currentColor",
3082
3123
  d: "M23.633 5.028a1.074 1.074 0 0 0-.777-.366c-2.295-.06-5.199-2.514-7.119-3.477C14.551.592 13.768.201 13.18.098a1.225 1.225 0 0 0-.36.001c-.588.103-1.371.494-2.556 1.087c-1.92.962-4.824 3.416-7.119 3.476a1.08 1.08 0 0 0-.778.366a1.167 1.167 0 0 0-.291.834c.493 10.023 4.088 16.226 10.396 19.831c.164.093.346.141.527.141s.363-.048.528-.141c6.308-3.605 9.902-9.808 10.396-19.831a1.161 1.161 0 0 0-.29-.834zM18.617 8.97l-5.323 7.855c-.191.282-.491.469-.788.469c-.298 0-.629-.163-.838-.372l-3.752-3.753a.656.656 0 0 1 0-.926l.927-.929a.658.658 0 0 1 .926 0l2.44 2.44l4.239-6.257a.657.657 0 0 1 .91-.173l1.085.736a.657.657 0 0 1 .174.91z"
3083
3124
  }
3084
3125
  )
3085
- ), "Secure payments powered by Fractal", /* @__PURE__ */ React10.createElement(
3126
+ ), "Secure payments powered by Fractal", /* @__PURE__ */ import_react10.default.createElement(
3086
3127
  "img",
3087
3128
  {
3088
3129
  src: "https://ui.fractalpay.com/favicon.ico",
@@ -3094,29 +3135,23 @@ function Payment() {
3094
3135
  }
3095
3136
 
3096
3137
  // src/app/components/Transaction/CompletedTransactions.tsx
3097
- import axios3 from "axios";
3098
- import React12, { useEffect as useEffect3, useState as useState8 } from "react";
3099
- import { Col, Row, Table } from "react-bootstrap";
3100
- import {
3101
- DatatableWrapper,
3102
- Filter,
3103
- PaginationOptions,
3104
- TableBody,
3105
- TableHeader
3106
- } from "react-bs-datatable";
3107
- import DatePicker from "react-datepicker";
3108
- import "react-datepicker/dist/react-datepicker.css";
3109
- import { toast as toast4 } from "react-toastify";
3138
+ var import_axios3 = __toESM(require("axios"));
3139
+ var import_react12 = __toESM(require("react"));
3140
+ var import_react_bootstrap7 = require("react-bootstrap");
3141
+ var import_react_bs_datatable = require("react-bs-datatable");
3142
+ var import_react_datepicker = __toESM(require("react-datepicker"));
3143
+ var import_react_datepicker2 = require("react-datepicker/dist/react-datepicker.css");
3144
+ var import_react_toastify4 = require("react-toastify");
3110
3145
 
3111
3146
  // src/app/components/Pagination/Pagination.tsx
3112
- import React11, { useState as useState7, useEffect as useEffect2 } from "react";
3147
+ var import_react11 = __toESM(require("react"));
3113
3148
  var PaginationPgComp = ({ totalPages, onPageChange, current }) => {
3114
- const [currentPage, setCurrentPage] = useState7(current);
3115
- const [showPages, setShowPages] = useState7(false);
3116
- useEffect2(() => {
3149
+ const [currentPage, setCurrentPage] = (0, import_react11.useState)(current);
3150
+ const [showPages, setShowPages] = (0, import_react11.useState)(false);
3151
+ (0, import_react11.useEffect)(() => {
3117
3152
  setCurrentPage(current);
3118
3153
  }, [current]);
3119
- useEffect2(() => {
3154
+ (0, import_react11.useEffect)(() => {
3120
3155
  setTimeout(() => {
3121
3156
  setShowPages(true);
3122
3157
  }, 1e3);
@@ -3152,7 +3187,7 @@ var PaginationPgComp = ({ totalPages, onPageChange, current }) => {
3152
3187
  if (currentPage > 3) {
3153
3188
  pageNumbers.push(renderPageNumber(1));
3154
3189
  if (currentPage > 4) {
3155
- pageNumbers.push(/* @__PURE__ */ React11.createElement("li", { key: "start-break", className: "page-item disabled" }, /* @__PURE__ */ React11.createElement("span", { className: "page-link" }, "...")));
3190
+ pageNumbers.push(/* @__PURE__ */ import_react11.default.createElement("li", { key: "start-break", className: "page-item disabled" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "page-link" }, "...")));
3156
3191
  }
3157
3192
  }
3158
3193
  const startPage = Math.max(currentPage - 1, 1);
@@ -3162,17 +3197,17 @@ var PaginationPgComp = ({ totalPages, onPageChange, current }) => {
3162
3197
  }
3163
3198
  if (currentPage < totalPages - 2) {
3164
3199
  if (currentPage < totalPages - 3) {
3165
- pageNumbers.push(/* @__PURE__ */ React11.createElement("li", { key: "end-break", className: "page-item disabled" }, /* @__PURE__ */ React11.createElement("span", { className: "page-link" }, "...")));
3200
+ pageNumbers.push(/* @__PURE__ */ import_react11.default.createElement("li", { key: "end-break", className: "page-item disabled" }, /* @__PURE__ */ import_react11.default.createElement("span", { className: "page-link" }, "...")));
3166
3201
  }
3167
3202
  pageNumbers.push(renderPageNumber(totalPages));
3168
3203
  }
3169
3204
  }
3170
3205
  return pageNumbers;
3171
3206
  };
3172
- const renderPageNumber = (pageNumber) => /* @__PURE__ */ React11.createElement("li", { key: pageNumber, className: `page-item ${currentPage === pageNumber ? "active" : ""}` }, /* @__PURE__ */ React11.createElement("a", { className: "page-link cursor-pointer", onClick: (e) => handlePageClick(e, pageNumber) }, pageNumber));
3173
- return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement("nav", { className: "app-pagination py-2" }, /* @__PURE__ */ React11.createElement("ul", { className: "pagination justify-content-center" }, /* @__PURE__ */ React11.createElement("li", { className: `page-item ${currentPage === 1 ? "disabled" : ""}` }, /* @__PURE__ */ React11.createElement("a", { className: "page-link cursor-pointer", onClick: handlePrevious }, /* @__PURE__ */ React11.createElement("span", null, "\u2B9C"))), showPages && getPageNumbers(), /* @__PURE__ */ React11.createElement("li", { className: `page-item ${currentPage === totalPages ? "disabled" : ""}` }, /* @__PURE__ */ React11.createElement("a", { className: "page-link cursor-pointer", onClick: handleNext }, /* @__PURE__ */ React11.createElement("span", null, "\u2B9E"))))));
3207
+ const renderPageNumber = (pageNumber) => /* @__PURE__ */ import_react11.default.createElement("li", { key: pageNumber, className: `page-item ${currentPage === pageNumber ? "active" : ""}` }, /* @__PURE__ */ import_react11.default.createElement("a", { className: "page-link cursor-pointer", onClick: (e) => handlePageClick(e, pageNumber) }, pageNumber));
3208
+ return /* @__PURE__ */ import_react11.default.createElement(import_react11.default.Fragment, null, /* @__PURE__ */ import_react11.default.createElement("nav", { className: "app-pagination py-2" }, /* @__PURE__ */ import_react11.default.createElement("ul", { className: "pagination justify-content-center" }, /* @__PURE__ */ import_react11.default.createElement("li", { className: `page-item ${currentPage === 1 ? "disabled" : ""}` }, /* @__PURE__ */ import_react11.default.createElement("a", { className: "page-link cursor-pointer", onClick: handlePrevious }, /* @__PURE__ */ import_react11.default.createElement("span", null, "\u2B9C"))), showPages && getPageNumbers(), /* @__PURE__ */ import_react11.default.createElement("li", { className: `page-item ${currentPage === totalPages ? "disabled" : ""}` }, /* @__PURE__ */ import_react11.default.createElement("a", { className: "page-link cursor-pointer", onClick: handleNext }, /* @__PURE__ */ import_react11.default.createElement("span", null, "\u2B9E"))))));
3174
3209
  };
3175
- var PaginationPg = React11.memo(PaginationPgComp);
3210
+ var PaginationPg = import_react11.default.memo(PaginationPgComp);
3176
3211
 
3177
3212
  // src/app/components/Transaction/CompletedTransactions.tsx
3178
3213
  var STORY_HEADERS = [
@@ -3209,10 +3244,10 @@ var STORY_HEADERS = [
3209
3244
  }
3210
3245
  ];
3211
3246
  function CompletedTransactions(props) {
3212
- const [dataList, setDataList] = useState8([]);
3213
- const [startDate, setStartDate] = useState8(null);
3214
- const [endDate, setEndDate] = useState8(null);
3215
- const [state, setState] = useState8({
3247
+ const [dataList, setDataList] = (0, import_react12.useState)([]);
3248
+ const [startDate, setStartDate] = (0, import_react12.useState)(null);
3249
+ const [endDate, setEndDate] = (0, import_react12.useState)(null);
3250
+ const [state, setState] = (0, import_react12.useState)({
3216
3251
  page: 1,
3217
3252
  totalPage: 0,
3218
3253
  data: [],
@@ -3248,7 +3283,7 @@ function CompletedTransactions(props) {
3248
3283
  const fetchData = async (newPage, startDate2, endDate2) => {
3249
3284
  var _a, _b;
3250
3285
  try {
3251
- const response = await axios3.post(`${baseUrl}get-complete-request-payments`, {
3286
+ const response = await import_axios3.default.post(`${baseUrl}get-complete-request-payments`, {
3252
3287
  fractalpayPublicKey: props.fractalpayClientKey,
3253
3288
  page: newPage,
3254
3289
  dateStart: startDate2 ? formatDate(startDate2) : "",
@@ -3292,13 +3327,13 @@ function CompletedTransactions(props) {
3292
3327
  const handleExport = async () => {
3293
3328
  var _a;
3294
3329
  if (!startDate) {
3295
- toast4.error("Start date required");
3330
+ import_react_toastify4.toast.error("Start date required");
3296
3331
  } else if (!endDate) {
3297
- toast4.error("End date required");
3332
+ import_react_toastify4.toast.error("End date required");
3298
3333
  } else {
3299
3334
  setState((prev) => __spreadProps(__spreadValues({}, prev), { csvData: true }));
3300
3335
  try {
3301
- const response = await axios3.post(`${baseUrl}get-complete-request-payments`, {
3336
+ const response = await import_axios3.default.post(`${baseUrl}get-complete-request-payments`, {
3302
3337
  fractalpayPublicKey: props.fractalpayClientKey,
3303
3338
  dateStart: startDate ? formatDate(startDate) : "",
3304
3339
  dateEnd: endDate ? formatDate(endDate) : "",
@@ -3317,19 +3352,19 @@ function CompletedTransactions(props) {
3317
3352
  }
3318
3353
  }
3319
3354
  };
3320
- useEffect3(() => {
3355
+ (0, import_react12.useEffect)(() => {
3321
3356
  fetchData(state.page, startDate, endDate);
3322
3357
  }, [state.page]);
3323
3358
  const handlePageChange = (pageNumber) => {
3324
3359
  setState((prev) => __spreadProps(__spreadValues({}, prev), { page: pageNumber }));
3325
3360
  fetchData(pageNumber, startDate, endDate);
3326
3361
  };
3327
- return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement("style", null, `
3362
+ return /* @__PURE__ */ import_react12.default.createElement(import_react12.default.Fragment, null, /* @__PURE__ */ import_react12.default.createElement("style", null, `
3328
3363
  .react-datepicker-wrapper:first-child {
3329
3364
  margin-right: 10px;
3330
3365
  }
3331
- `), /* @__PURE__ */ React12.createElement("div", { className: "mb-5" }, /* @__PURE__ */ React12.createElement("div", null, /* @__PURE__ */ React12.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ React12.createElement("div", { style: { display: "flex", marginRight: "10px", marginTop: "25px" } }, /* @__PURE__ */ React12.createElement(
3332
- DatePicker,
3366
+ `), /* @__PURE__ */ import_react12.default.createElement("div", { className: "mb-5" }, /* @__PURE__ */ import_react12.default.createElement("div", null, /* @__PURE__ */ import_react12.default.createElement("div", { style: { display: "flex" } }, /* @__PURE__ */ import_react12.default.createElement("div", { style: { display: "flex", marginRight: "10px", marginTop: "25px" } }, /* @__PURE__ */ import_react12.default.createElement(
3367
+ import_react_datepicker.default,
3333
3368
  {
3334
3369
  selected: startDate,
3335
3370
  onChange: handleStartDateChange,
@@ -3339,8 +3374,8 @@ function CompletedTransactions(props) {
3339
3374
  placeholderText: "Start Date",
3340
3375
  required: true
3341
3376
  }
3342
- ), /* @__PURE__ */ React12.createElement(
3343
- DatePicker,
3377
+ ), /* @__PURE__ */ import_react12.default.createElement(
3378
+ import_react_datepicker.default,
3344
3379
  {
3345
3380
  selected: endDate,
3346
3381
  onChange: handleEndDateChange,
@@ -3350,8 +3385,8 @@ function CompletedTransactions(props) {
3350
3385
  minDate: startDate,
3351
3386
  placeholderText: "End Date"
3352
3387
  }
3353
- )), /* @__PURE__ */ React12.createElement("button", { className: "export-btn1", onClick: handleExport }, "Export")), /* @__PURE__ */ React12.createElement(
3354
- DatatableWrapper,
3388
+ )), /* @__PURE__ */ import_react12.default.createElement("button", { className: "export-btn1", onClick: handleExport }, "Export")), /* @__PURE__ */ import_react12.default.createElement(
3389
+ import_react_bs_datatable.DatatableWrapper,
3355
3390
  {
3356
3391
  body: dataList,
3357
3392
  headers: STORY_HEADERS,
@@ -3362,21 +3397,21 @@ function CompletedTransactions(props) {
3362
3397
  }
3363
3398
  }
3364
3399
  },
3365
- /* @__PURE__ */ React12.createElement(Row, { className: "mb-4 p-2" }, /* @__PURE__ */ React12.createElement(Col, { xs: 12, sm: 6, lg: 4, className: "d-flex flex-col justify-content-lg-start align-items-center justify-content-sm-start mb-2 mb-sm-0" }, /* @__PURE__ */ React12.createElement(PaginationOptions, null)), /* @__PURE__ */ React12.createElement(Col, { xs: 12, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }), /* @__PURE__ */ React12.createElement(Col, { xs: 12, sm: 6, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }, /* @__PURE__ */ React12.createElement(Filter, null))),
3366
- /* @__PURE__ */ React12.createElement(Row, null, /* @__PURE__ */ React12.createElement("div", { className: "responsive-tbl" }, /* @__PURE__ */ React12.createElement(Table, null, /* @__PURE__ */ React12.createElement(TableHeader, null), /* @__PURE__ */ React12.createElement(TableBody, null)))),
3367
- /* @__PURE__ */ React12.createElement(PaginationPg, { totalPages: state.totalPage, onPageChange: handlePageChange, current: state.page })
3400
+ /* @__PURE__ */ import_react12.default.createElement(import_react_bootstrap7.Row, { className: "mb-4 p-2" }, /* @__PURE__ */ import_react12.default.createElement(import_react_bootstrap7.Col, { xs: 12, sm: 6, lg: 4, className: "d-flex flex-col justify-content-lg-start align-items-center justify-content-sm-start mb-2 mb-sm-0" }, /* @__PURE__ */ import_react12.default.createElement(import_react_bs_datatable.PaginationOptions, null)), /* @__PURE__ */ import_react12.default.createElement(import_react_bootstrap7.Col, { xs: 12, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }), /* @__PURE__ */ import_react12.default.createElement(import_react_bootstrap7.Col, { xs: 12, sm: 6, lg: 4, className: "d-flex flex-col justify-content-end align-items-end" }, /* @__PURE__ */ import_react12.default.createElement(import_react_bs_datatable.Filter, null))),
3401
+ /* @__PURE__ */ import_react12.default.createElement(import_react_bootstrap7.Row, null, /* @__PURE__ */ import_react12.default.createElement("div", { className: "responsive-tbl" }, /* @__PURE__ */ import_react12.default.createElement(import_react_bootstrap7.Table, null, /* @__PURE__ */ import_react12.default.createElement(import_react_bs_datatable.TableHeader, null), /* @__PURE__ */ import_react12.default.createElement(import_react_bs_datatable.TableBody, null)))),
3402
+ /* @__PURE__ */ import_react12.default.createElement(PaginationPg, { totalPages: state.totalPage, onPageChange: handlePageChange, current: state.page })
3368
3403
  ))));
3369
3404
  }
3370
3405
 
3371
3406
  // src/app/components/Payment/TockenizPay.tsx
3372
- import React13, { useState as useState9 } from "react";
3373
- import { Modal as Modal7 } from "react-bootstrap";
3374
- import { toast as toast5, ToastContainer as ToastContainer3 } from "react-toastify";
3375
- import axios4 from "axios";
3376
- import forge2 from "node-forge";
3377
- import creditCardType from "credit-card-type";
3407
+ var import_react13 = __toESM(require("react"));
3408
+ var import_react_bootstrap8 = require("react-bootstrap");
3409
+ var import_react_toastify5 = require("react-toastify");
3410
+ var import_axios4 = __toESM(require("axios"));
3411
+ var import_node_forge2 = __toESM(require("node-forge"));
3412
+ var import_credit_card_type = __toESM(require("credit-card-type"));
3378
3413
  function TockenizPay() {
3379
- const [state, setState] = useState9({
3414
+ const [state, setState] = (0, import_react13.useState)({
3380
3415
  show: false,
3381
3416
  publicKey: "",
3382
3417
  sessionKey: "",
@@ -3387,13 +3422,13 @@ function TockenizPay() {
3387
3422
  zip: "",
3388
3423
  amount: ""
3389
3424
  });
3390
- const [cardTypeDetail, setCardTypeDetail] = useState9(null);
3391
- const [isValid, setIsValid] = useState9(false);
3392
- const [isValidMonth, setIsValidMonth] = useState9(false);
3393
- const [data, setData] = useState9(null);
3425
+ const [cardTypeDetail, setCardTypeDetail] = (0, import_react13.useState)(null);
3426
+ const [isValid, setIsValid] = (0, import_react13.useState)(false);
3427
+ const [isValidMonth, setIsValidMonth] = (0, import_react13.useState)(false);
3428
+ const [data, setData] = (0, import_react13.useState)(null);
3394
3429
  const handlePaymentClick = async () => {
3395
3430
  try {
3396
- const response = await axios4.post(`${baseUrl}/generate-session`, {});
3431
+ const response = await import_axios4.default.post(`${baseUrl}/generate-session`, {});
3397
3432
  const data2 = response.data;
3398
3433
  if (data2 && (data2 == null ? void 0 : data2.result) === true) {
3399
3434
  setState((prev) => {
@@ -3412,14 +3447,14 @@ function TockenizPay() {
3412
3447
  const handleSubmitPay = async () => {
3413
3448
  var _a, _b, _c, _d, _e;
3414
3449
  let track2_data = `${(_a = state == null ? void 0 : state.cardNumber) == null ? void 0 : _a.replaceAll(" ", "")}=${state.year}${((_b = state == null ? void 0 : state.month) == null ? void 0 : _b.length) > 1 ? state == null ? void 0 : state.month : "0" + (state == null ? void 0 : state.month)} ${state.cvv}`;
3415
- const publicKey = forge2.pki.publicKeyFromPem(state.publicKey);
3450
+ const publicKey = import_node_forge2.default.pki.publicKeyFromPem(state.publicKey);
3416
3451
  const encrypted = publicKey.encrypt(track2_data, "RSA-OAEP", {
3417
- md: forge2.md.sha1.create(),
3452
+ md: import_node_forge2.default.md.sha1.create(),
3418
3453
  mgf1: {
3419
- md: forge2.md.sha1.create()
3454
+ md: import_node_forge2.default.md.sha1.create()
3420
3455
  }
3421
3456
  });
3422
- const encryptedBase64 = forge2.util.encode64(encrypted);
3457
+ const encryptedBase64 = import_node_forge2.default.util.encode64(encrypted);
3423
3458
  console.log(encryptedBase64);
3424
3459
  const requestBody = {
3425
3460
  enc_track2_data: encryptedBase64,
@@ -3427,7 +3462,7 @@ function TockenizPay() {
3427
3462
  algorithm: "RSAES_OAEP_SHA_1"
3428
3463
  };
3429
3464
  try {
3430
- const response = await axios4.post(
3465
+ const response = await import_axios4.default.post(
3431
3466
  "https://m1ao5pku8b.execute-api.us-east-2.amazonaws.com/prod/tokenizer/tokenize",
3432
3467
  requestBody,
3433
3468
  {
@@ -3438,7 +3473,7 @@ function TockenizPay() {
3438
3473
  }
3439
3474
  );
3440
3475
  if ((response == null ? void 0 : response.status) === 200) {
3441
- toast5.success("Payment Successful");
3476
+ import_react_toastify5.toast.success("Payment Successful");
3442
3477
  setState((prev) => __spreadProps(__spreadValues({}, prev), {
3443
3478
  show: false,
3444
3479
  publicKey: "",
@@ -3453,7 +3488,7 @@ function TockenizPay() {
3453
3488
  }
3454
3489
  console.log("response", response);
3455
3490
  } catch (error) {
3456
- toast5.error((_e = (_d = (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.data) == null ? void 0 : _e.message);
3491
+ import_react_toastify5.toast.error((_e = (_d = (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.data) == null ? void 0 : _d.data) == null ? void 0 : _e.message);
3457
3492
  console.error("Error:", error);
3458
3493
  }
3459
3494
  };
@@ -3485,9 +3520,9 @@ function TockenizPay() {
3485
3520
  e.preventDefault();
3486
3521
  e.stopPropagation();
3487
3522
  const { value } = e.target;
3488
- let cardtyp = creditCardType(value)[0];
3523
+ let cardtyp = (0, import_credit_card_type.default)(value)[0];
3489
3524
  const formattedValue = formatCreditCardNumber(value, cardtyp == null ? void 0 : cardtyp.type);
3490
- setCardTypeDetail(creditCardType(value)[0]);
3525
+ setCardTypeDetail((0, import_credit_card_type.default)(value)[0]);
3491
3526
  console.log(formattedValue);
3492
3527
  if (value.match(/[a-zA-Z]/)) {
3493
3528
  setState((prev) => __spreadProps(__spreadValues({}, prev), {
@@ -3590,7 +3625,7 @@ function TockenizPay() {
3590
3625
  return "";
3591
3626
  }
3592
3627
  console.log("===================cardtype===============", cardTypeDetail);
3593
- return /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement(ToastContainer3, null), /* @__PURE__ */ React13.createElement(
3628
+ return /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement(import_react_toastify5.ToastContainer, null), /* @__PURE__ */ import_react13.default.createElement(
3594
3629
  "button",
3595
3630
  {
3596
3631
  className: "export-btn mt-4",
@@ -3598,8 +3633,8 @@ function TockenizPay() {
3598
3633
  onClick: () => handlePaymentClick()
3599
3634
  },
3600
3635
  "TokenizePay"
3601
- ), /* @__PURE__ */ React13.createElement(
3602
- Modal7,
3636
+ ), /* @__PURE__ */ import_react13.default.createElement(
3637
+ import_react_bootstrap8.Modal,
3603
3638
  {
3604
3639
  show: state.show,
3605
3640
  onHide: () => setState((prev) => __spreadProps(__spreadValues({}, prev), {
@@ -3607,8 +3642,8 @@ function TockenizPay() {
3607
3642
  })),
3608
3643
  centered: true
3609
3644
  },
3610
- /* @__PURE__ */ React13.createElement(Modal7.Header, { closeButton: true }),
3611
- /* @__PURE__ */ React13.createElement(Modal7.Body, null, /* @__PURE__ */ React13.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ React13.createElement("div", { className: "row" }, /* @__PURE__ */ React13.createElement("div", { className: "" }, /* @__PURE__ */ React13.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ React13.createElement("div", { className: "header" }, /* @__PURE__ */ React13.createElement("h1", null, "Pay")), /* @__PURE__ */ React13.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ React13.createElement("div", { className: "form-group" }, /* @__PURE__ */ React13.createElement("label", null, "Name on card"), /* @__PURE__ */ React13.createElement(
3645
+ /* @__PURE__ */ import_react13.default.createElement(import_react_bootstrap8.Modal.Header, { closeButton: true }),
3646
+ /* @__PURE__ */ import_react13.default.createElement(import_react_bootstrap8.Modal.Body, null, /* @__PURE__ */ import_react13.default.createElement("div", { className: "payment-popup" }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "row" }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "" }, /* @__PURE__ */ import_react13.default.createElement("div", { id: "Checkout", className: "inline" }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "header" }, /* @__PURE__ */ import_react13.default.createElement("h1", null, "Pay")), /* @__PURE__ */ import_react13.default.createElement("form", { id: "PaymentForm", className: "payment-form" }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react13.default.createElement("label", null, "Name on card"), /* @__PURE__ */ import_react13.default.createElement(
3612
3647
  "input",
3613
3648
  {
3614
3649
  id: "NameOnCard",
@@ -3617,13 +3652,13 @@ function TockenizPay() {
3617
3652
  maxLength: 100,
3618
3653
  placeholder: "Name"
3619
3654
  }
3620
- ), /* @__PURE__ */ React13.createElement(
3655
+ ), /* @__PURE__ */ import_react13.default.createElement(
3621
3656
  "span",
3622
3657
  {
3623
3658
  id: "NameOnCard-error",
3624
3659
  style: { color: "red", display: "none" }
3625
3660
  }
3626
- )), /* @__PURE__ */ React13.createElement("div", { className: "form-group" }, /* @__PURE__ */ React13.createElement(
3661
+ )), /* @__PURE__ */ import_react13.default.createElement("div", { className: "form-group" }, /* @__PURE__ */ import_react13.default.createElement(
3627
3662
  "input",
3628
3663
  {
3629
3664
  "data-token": "card_number",
@@ -3634,7 +3669,7 @@ function TockenizPay() {
3634
3669
  placeholder: "0000 0000 0000 0000",
3635
3670
  onChange: handleCardNumberChange
3636
3671
  }
3637
- ), state.error && /* @__PURE__ */ React13.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ React13.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React13.createElement(
3672
+ ), state.error && /* @__PURE__ */ import_react13.default.createElement("div", { style: { color: "red" } }, state.error)), /* @__PURE__ */ import_react13.default.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ import_react13.default.createElement(
3638
3673
  "input",
3639
3674
  {
3640
3675
  "data-token": "exp_month",
@@ -3645,14 +3680,14 @@ function TockenizPay() {
3645
3680
  maxLength: 2,
3646
3681
  onChange: (e) => handleMonthChange(e)
3647
3682
  }
3648
- ), isValidMonth && /* @__PURE__ */ React13.createElement(
3683
+ ), isValidMonth && /* @__PURE__ */ import_react13.default.createElement(
3649
3684
  "span",
3650
3685
  {
3651
3686
  id: "card_number-error",
3652
3687
  style: { color: "red", fontSize: "15px" }
3653
3688
  },
3654
3689
  "Please write month only 1 to 12"
3655
- )), /* @__PURE__ */ React13.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ React13.createElement(
3690
+ )), /* @__PURE__ */ import_react13.default.createElement("div", { className: "expiry-date-group form-group" }, /* @__PURE__ */ import_react13.default.createElement(
3656
3691
  "input",
3657
3692
  {
3658
3693
  "data-token": "exp_year",
@@ -3663,7 +3698,7 @@ function TockenizPay() {
3663
3698
  value: state.year,
3664
3699
  onChange: (e) => handleYearChange(e)
3665
3700
  }
3666
- ), state.yearError && /* @__PURE__ */ React13.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ React13.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ React13.createElement("div", { className: "input-container" }, /* @__PURE__ */ React13.createElement(
3701
+ ), state.yearError && /* @__PURE__ */ import_react13.default.createElement("span", { id: "exp_year-error", style: { color: "red" } }, state.yearError)), /* @__PURE__ */ import_react13.default.createElement("div", { className: "security-code-group form-group" }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react13.default.createElement(
3667
3702
  "input",
3668
3703
  {
3669
3704
  "data-token": "cvv",
@@ -3674,7 +3709,7 @@ function TockenizPay() {
3674
3709
  placeholder: "CVV",
3675
3710
  onChange: (e) => handleCVVChange(e)
3676
3711
  }
3677
- ), /* @__PURE__ */ React13.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ React13.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ React13.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ React13.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ React13.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ React13.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ React13.createElement("label", null, "Postal code"), /* @__PURE__ */ React13.createElement("div", { className: "input-container" }, /* @__PURE__ */ React13.createElement(
3712
+ ), /* @__PURE__ */ import_react13.default.createElement("i", { id: "cvc", className: "fa fa-question-circle" }), state.cvvError && /* @__PURE__ */ import_react13.default.createElement("span", { id: "cvv-error", style: { color: "red" } }, state.cvvError)), /* @__PURE__ */ import_react13.default.createElement("div", { className: "cvc-preview-container two-card hide" }, /* @__PURE__ */ import_react13.default.createElement("div", { className: "amex-cvc-preview" }), /* @__PURE__ */ import_react13.default.createElement("div", { className: "visa-mc-dis-cvc-preview" }))), /* @__PURE__ */ import_react13.default.createElement("div", { className: "zip-code-group form-group" }, /* @__PURE__ */ import_react13.default.createElement("label", null, "Postal code"), /* @__PURE__ */ import_react13.default.createElement("div", { className: "input-container" }, /* @__PURE__ */ import_react13.default.createElement(
3678
3713
  "input",
3679
3714
  {
3680
3715
  id: "ZIPCode",
@@ -3686,7 +3721,7 @@ function TockenizPay() {
3686
3721
  value: state.zip,
3687
3722
  onChange: (e) => handleZIP(e)
3688
3723
  }
3689
- ), /* @__PURE__ */ React13.createElement(
3724
+ ), /* @__PURE__ */ import_react13.default.createElement(
3690
3725
  "a",
3691
3726
  {
3692
3727
  tabIndex: 0,
@@ -3696,15 +3731,15 @@ function TockenizPay() {
3696
3731
  "data-placement": "left",
3697
3732
  "data-content": "Enter the ZIP/Postal code for your credit card billing address."
3698
3733
  },
3699
- /* @__PURE__ */ React13.createElement("i", { className: "fa fa-question-circle" })
3700
- ), /* @__PURE__ */ React13.createElement(
3734
+ /* @__PURE__ */ import_react13.default.createElement("i", { className: "fa fa-question-circle" })
3735
+ ), /* @__PURE__ */ import_react13.default.createElement(
3701
3736
  "span",
3702
3737
  {
3703
3738
  id: "ZIPCode-error",
3704
3739
  style: { color: "red", display: "none" }
3705
3740
  },
3706
3741
  "This field is required"
3707
- ))), /* @__PURE__ */ React13.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ React13.createElement("div", null, /* @__PURE__ */ React13.createElement("label", null, "Payment amount"), /* @__PURE__ */ React13.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ React13.createElement(
3742
+ ))), /* @__PURE__ */ import_react13.default.createElement("div", { className: "form-group top-amnt" }, /* @__PURE__ */ import_react13.default.createElement("div", null, /* @__PURE__ */ import_react13.default.createElement("label", null, "Payment amount"), /* @__PURE__ */ import_react13.default.createElement("div", { className: "amount-placeholder" }, /* @__PURE__ */ import_react13.default.createElement(
3708
3743
  "input",
3709
3744
  {
3710
3745
  id: "Amount",
@@ -3716,7 +3751,7 @@ function TockenizPay() {
3716
3751
  onChange: (e) => handleAmount(e),
3717
3752
  onBlur: handleAmountBlur
3718
3753
  }
3719
- ))), /* @__PURE__ */ React13.createElement("div", { className: "card-row" }, /* @__PURE__ */ React13.createElement("span", { className: "visa" }), /* @__PURE__ */ React13.createElement("span", { className: "mastercard" }), /* @__PURE__ */ React13.createElement("span", { className: "amex" }), /* @__PURE__ */ React13.createElement("span", { className: "discover" }))), /* @__PURE__ */ React13.createElement(
3754
+ ))), /* @__PURE__ */ import_react13.default.createElement("div", { className: "card-row" }, /* @__PURE__ */ import_react13.default.createElement("span", { className: "visa" }), /* @__PURE__ */ import_react13.default.createElement("span", { className: "mastercard" }), /* @__PURE__ */ import_react13.default.createElement("span", { className: "amex" }), /* @__PURE__ */ import_react13.default.createElement("span", { className: "discover" }))), /* @__PURE__ */ import_react13.default.createElement(
3720
3755
  "button",
3721
3756
  {
3722
3757
  type: "button",
@@ -3725,7 +3760,7 @@ function TockenizPay() {
3725
3760
  className: "btn btn-block btn-success submit-button"
3726
3761
  },
3727
3762
  "Submit"
3728
- )), /* @__PURE__ */ React13.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ React13.createElement(
3763
+ )), /* @__PURE__ */ import_react13.default.createElement("div", { className: "powerd-by-part" }, /* @__PURE__ */ import_react13.default.createElement(
3729
3764
  "svg",
3730
3765
  {
3731
3766
  xmlns: "http://www.w3.org/2000/svg",
@@ -3733,14 +3768,14 @@ function TockenizPay() {
3733
3768
  height: "20",
3734
3769
  viewBox: "0 0 26 26"
3735
3770
  },
3736
- /* @__PURE__ */ React13.createElement(
3771
+ /* @__PURE__ */ import_react13.default.createElement(
3737
3772
  "path",
3738
3773
  {
3739
3774
  fill: "currentColor",
3740
3775
  d: "M23.633 5.028a1.074 1.074 0 0 0-.777-.366c-2.295-.06-5.199-2.514-7.119-3.477C14.551.592 13.768.201 13.18.098a1.225 1.225 0 0 0-.36.001c-.588.103-1.371.494-2.556 1.087c-1.92.962-4.824 3.416-7.119 3.476a1.08 1.08 0 0 0-.778.366a1.167 1.167 0 0 0-.291.834c.493 10.023 4.088 16.226 10.396 19.831c.164.093.346.141.527.141s.363-.048.528-.141c6.308-3.605 9.902-9.808 10.396-19.831a1.161 1.161 0 0 0-.29-.834zM18.617 8.97l-5.323 7.855c-.191.282-.491.469-.788.469c-.298 0-.629-.163-.838-.372l-3.752-3.753a.656.656 0 0 1 0-.926l.927-.929a.658.658 0 0 1 .926 0l2.44 2.44l4.239-6.257a.657.657 0 0 1 .91-.173l1.085.736a.657.657 0 0 1 .174.91z"
3741
3776
  }
3742
3777
  )
3743
- ), "Secure payments powered by Fractal", /* @__PURE__ */ React13.createElement(
3778
+ ), "Secure payments powered by Fractal", /* @__PURE__ */ import_react13.default.createElement(
3744
3779
  "img",
3745
3780
  {
3746
3781
  src: "https://ui.fractalpay.com/favicon.ico",
@@ -3752,25 +3787,25 @@ function TockenizPay() {
3752
3787
  }
3753
3788
 
3754
3789
  // src/app/components/Payment/GetPaymentDynamic.tsx
3755
- import React15, { useEffect as useEffect4, useState as useState10 } from "react";
3756
- import { Modal as Modal8 } from "react-bootstrap";
3790
+ var import_react15 = __toESM(require("react"));
3791
+ var import_react_bootstrap9 = require("react-bootstrap");
3757
3792
 
3758
3793
  // src/app/components/Loader/MyLoadingAnimation.tsx
3759
- import React14 from "react";
3794
+ var import_react14 = __toESM(require("react"));
3760
3795
  function MyLoadingAnimation() {
3761
- return /* @__PURE__ */ React14.createElement(React14.Fragment, null, /* @__PURE__ */ React14.createElement(LoaderStyle_default, null), /* @__PURE__ */ React14.createElement("div", { className: "loading-animation" }, /* @__PURE__ */ React14.createElement("div", { className: "spinner" })));
3796
+ return /* @__PURE__ */ import_react14.default.createElement(import_react14.default.Fragment, null, /* @__PURE__ */ import_react14.default.createElement(LoaderStyle_default, null), /* @__PURE__ */ import_react14.default.createElement("div", { className: "loading-animation" }, /* @__PURE__ */ import_react14.default.createElement("div", { className: "spinner" })));
3762
3797
  }
3763
3798
 
3764
3799
  // src/app/components/Payment/GetPaymentDynamic.tsx
3765
3800
  function GetPaymentDynamic(props) {
3766
3801
  const { amount, fractalpayClientKey, orderID } = props;
3767
- const [loading, setLoading] = useState10(false);
3768
- const [show, setShow] = useState10(false);
3769
- const [iframeLoaded, setIframeLoaded] = useState10(false);
3770
- const [phoneNumber, setPhoneNumber] = useState10("");
3771
- const [errorMessage, setErrorMessage] = useState10("");
3772
- const [submitClicked, setSubmitClicked] = useState10(false);
3773
- const [isValidNumber, setIsValidNumber] = useState10(true);
3802
+ const [loading, setLoading] = (0, import_react15.useState)(false);
3803
+ const [show, setShow] = (0, import_react15.useState)(false);
3804
+ const [iframeLoaded, setIframeLoaded] = (0, import_react15.useState)(false);
3805
+ const [phoneNumber, setPhoneNumber] = (0, import_react15.useState)("");
3806
+ const [errorMessage, setErrorMessage] = (0, import_react15.useState)("");
3807
+ const [submitClicked, setSubmitClicked] = (0, import_react15.useState)(false);
3808
+ const [isValidNumber, setIsValidNumber] = (0, import_react15.useState)(true);
3774
3809
  const handleClose = () => {
3775
3810
  setIframeLoaded(false);
3776
3811
  setTimeout(() => {
@@ -3785,7 +3820,7 @@ function GetPaymentDynamic(props) {
3785
3820
  console.error("Fractalpay client key is missing or empty.");
3786
3821
  }
3787
3822
  };
3788
- useEffect4(() => {
3823
+ (0, import_react15.useEffect)(() => {
3789
3824
  if (!fractalpayClientKey) {
3790
3825
  console.error("Fractalpay client key is missing or empty.");
3791
3826
  }
@@ -3808,7 +3843,7 @@ function GetPaymentDynamic(props) {
3808
3843
  const handleLoad = () => {
3809
3844
  setLoading(false);
3810
3845
  };
3811
- useEffect4(() => {
3846
+ (0, import_react15.useEffect)(() => {
3812
3847
  const messageListener = (event) => {
3813
3848
  var _a, _b;
3814
3849
  const response = (_b = (_a = event == null ? void 0 : event.data) == null ? void 0 : _a.other) == null ? void 0 : _b.data;
@@ -3823,7 +3858,7 @@ function GetPaymentDynamic(props) {
3823
3858
  window.removeEventListener("message", messageListener);
3824
3859
  };
3825
3860
  }, []);
3826
- return /* @__PURE__ */ React15.createElement("div", null, /* @__PURE__ */ React15.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Pay"), /* @__PURE__ */ React15.createElement(Modal8, { show: show && iframeLoaded, id: "modal-pay", className: "modal-lg", onHide: handleClose }, /* @__PURE__ */ React15.createElement(Modal8.Header, { closeButton: true }), /* @__PURE__ */ React15.createElement(Modal8.Body, null, loading && /* @__PURE__ */ React15.createElement(MyLoadingAnimation, null), /* @__PURE__ */ React15.createElement(
3861
+ return /* @__PURE__ */ import_react15.default.createElement("div", null, /* @__PURE__ */ import_react15.default.createElement("button", { className: "paymentBtn", onClick: handleShow }, "Pay"), /* @__PURE__ */ import_react15.default.createElement(import_react_bootstrap9.Modal, { show: show && iframeLoaded, id: "modal-pay", className: "modal-lg", onHide: handleClose }, /* @__PURE__ */ import_react15.default.createElement(import_react_bootstrap9.Modal.Header, { closeButton: true }), /* @__PURE__ */ import_react15.default.createElement(import_react_bootstrap9.Modal.Body, null, loading && /* @__PURE__ */ import_react15.default.createElement(MyLoadingAnimation, null), /* @__PURE__ */ import_react15.default.createElement(
3827
3862
  "iframe",
3828
3863
  {
3829
3864
  src: `${baseUrl}widget-form/${amount}?fractalpay_public_key=${fractalpayClientKey}&order_id=${orderID}`,
@@ -3834,7 +3869,8 @@ function GetPaymentDynamic(props) {
3834
3869
  }
3835
3870
  ))));
3836
3871
  }
3837
- export {
3872
+ // Annotate the CommonJS export names for ESM import in node:
3873
+ 0 && (module.exports = {
3838
3874
  CompletedTransactions,
3839
3875
  GetPaymentDynamic,
3840
3876
  Payment,
@@ -3844,4 +3880,4 @@ export {
3844
3880
  RequestPaymentonClick,
3845
3881
  RqstPaymntInputField,
3846
3882
  TockenizPay
3847
- };
3883
+ });