@fractalpay/fractalpay-next-dev 0.0.300 → 0.0.301

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -39,7 +39,7 @@ var require_package = __commonJS({
39
39
  "package.json"(exports, module) {
40
40
  module.exports = {
41
41
  name: "@fractalpay/fractalpay-next-dev",
42
- version: "0.0.300",
42
+ version: "0.0.301",
43
43
  private: false,
44
44
  type: "module",
45
45
  scripts: {
@@ -97,7 +97,12 @@ var require_package = __commonJS({
97
97
  },
98
98
  author: "Mukul",
99
99
  license: "MIT",
100
- keywords: ["nextjs", "next", "typescript", "tailwindcss"],
100
+ keywords: [
101
+ "nextjs",
102
+ "next",
103
+ "typescript",
104
+ "tailwindcss"
105
+ ],
101
106
  publishConfig: {
102
107
  access: "public"
103
108
  }
@@ -254,8 +259,8 @@ var Loader_default = Loader;
254
259
  var { name } = require_package();
255
260
  var S3Url = "https://fractal-userdata-upload.s3.us-east-1.amazonaws.com/";
256
261
  if (name === "@fractalpay/fractalpay-next-dev") {
257
- baseUrl = "http://localhost:8082/";
258
- masterBaseUrl = "http://localhost:8081/";
262
+ masterBaseUrl = "https://api.dev.fractalpay.com/";
263
+ baseUrl = "https://widget.dev.fractalpay.com/";
259
264
  fractalGatewayUrl = "https://api-dev.merchant-trends.com/";
260
265
  datacapUrl = "https://token-cert.dcap.com/v1/client";
261
266
  threedsSecurePublicKey = "pk_test_51RH5Wc2SlJvyNZ80hpUDy88r4rVdpijfKbNaWaUyQEE6rOrPmG2JQyAj7G5amBD5z5daC56WaeT4jfNhrrPcGOEP00UyKu6AOw";
@@ -2867,25 +2872,25 @@ import Swal from "sweetalert2";
2867
2872
  import { useEffect as useEffect3 } from "react";
2868
2873
  function DataScript() {
2869
2874
  useEffect3(() => {
2870
- const src2 = datacapUrl;
2875
+ const src = datacapUrl;
2871
2876
  if (typeof window === "undefined") return;
2872
2877
  if (window.DatacapWebToken) {
2873
2878
  return;
2874
2879
  }
2875
- if (!document.querySelector(`script[src="${src2}"]`)) {
2876
- const script2 = document.createElement("script");
2877
- script2.src = src2;
2878
- script2.async = true;
2879
- script2.onload = () => {
2880
+ if (!document.querySelector(`script[src="${src}"]`)) {
2881
+ const script = document.createElement("script");
2882
+ script.src = src;
2883
+ script.async = true;
2884
+ script.onload = () => {
2880
2885
  if (window.DatacapWebToken) {
2881
2886
  } else {
2882
2887
  console.warn("\u26A0\uFE0F Script loaded, but DatacapWebToken not found");
2883
2888
  }
2884
2889
  };
2885
- script2.onerror = (err) => {
2890
+ script.onerror = (err) => {
2886
2891
  console.error("\u274C Failed to load Datacap script", err);
2887
2892
  };
2888
- document.head.appendChild(script2);
2893
+ document.head.appendChild(script);
2889
2894
  } else {
2890
2895
  }
2891
2896
  }, []);
@@ -3150,21 +3155,31 @@ function CardBankRadioStyles({}) {
3150
3155
 
3151
3156
  // src/app/components/FractalTokenizer.tsx
3152
3157
  import { useEffect as useEffect4 } from "react";
3153
- function FractalTokenizerScript() {
3158
+ function FractalTokenizerScript({ onLoad }) {
3154
3159
  useEffect4(() => {
3155
3160
  const src = `${fractalGatewayUrl}tokenizer/static/js/fractal_tokenizer.js`;
3156
- if (document.querySelector(`script[src="${src}"]`)) return;
3161
+ if (window.FractalTokenizer) {
3162
+ onLoad == null ? void 0 : onLoad();
3163
+ return;
3164
+ }
3165
+ const existing = document.querySelector(`script[src="${src}"]`);
3166
+ if (existing) {
3167
+ existing.addEventListener("load", () => onLoad == null ? void 0 : onLoad());
3168
+ return;
3169
+ }
3157
3170
  const script = document.createElement("script");
3158
3171
  script.src = src;
3159
3172
  script.async = true;
3160
3173
  script.onload = () => {
3161
3174
  try {
3162
- const TokenizerClass = eval("FractalTokenizer");
3163
- if (TokenizerClass) {
3164
- window.FractalTokenizer = TokenizerClass;
3175
+ if (typeof FractalTokenizer !== "undefined") {
3176
+ window.FractalTokenizer = FractalTokenizer;
3177
+ onLoad == null ? void 0 : onLoad();
3178
+ } else {
3179
+ console.error("FractalTokenizer not defined in global scope");
3165
3180
  }
3166
3181
  } catch (err) {
3167
- console.error("FractalTokenizer not accessible:", err);
3182
+ console.error(err);
3168
3183
  }
3169
3184
  };
3170
3185
  document.head.appendChild(script);
@@ -3323,30 +3338,62 @@ var FractalFields_default = FractalFields;
3323
3338
 
3324
3339
  // src/app/components/Datacap-Payment/DataCapScriptLoader.tsx
3325
3340
  import { useEffect as useEffect6 } from "react";
3326
- var scriptLoaded = false;
3327
- var DataCapScriptLoader = () => {
3341
+ var DataCapScriptLoader = ({
3342
+ onReady,
3343
+ onError
3344
+ }) => {
3328
3345
  useEffect6(() => {
3329
- if (scriptLoaded) {
3346
+ const src = `${datacapUrl}/hosted`;
3347
+ if (window.__DATACAP_SCRIPT_LOADED__ && window.DatacapHostedWebToken) {
3348
+ onReady == null ? void 0 : onReady();
3330
3349
  return;
3331
3350
  }
3351
+ if (window.__DATACAP_SCRIPT_LOADING__) {
3352
+ const interval = setInterval(() => {
3353
+ if (window.DatacapHostedWebToken) {
3354
+ clearInterval(interval);
3355
+ onReady == null ? void 0 : onReady();
3356
+ }
3357
+ }, 100);
3358
+ return () => clearInterval(interval);
3359
+ }
3360
+ window.__DATACAP_SCRIPT_LOADING__ = true;
3332
3361
  const existingScript = document.querySelector(
3333
- `script[src="${datacapUrl}/hosted"]`
3362
+ `script[src="${src}"]`
3334
3363
  );
3335
- console.log("\u{1F535} existingScript found:", !!existingScript);
3336
- if (!existingScript) {
3337
- const script2 = document.createElement("script");
3338
- script2.src = `${datacapUrl}/hosted`;
3339
- script2.async = true;
3340
- script2.onload = () => {
3341
- console.log("\u2705 DataCap script loaded successfully");
3342
- scriptLoaded = true;
3343
- };
3344
- script2.onerror = (err) => {
3345
- console.error("\u274C DataCap script failed to load", err);
3346
- };
3347
- document.head.appendChild(script2);
3348
- } else {
3349
- scriptLoaded = true;
3364
+ if (existingScript) {
3365
+ waitForSDK();
3366
+ return;
3367
+ }
3368
+ const script = document.createElement("script");
3369
+ script.src = src;
3370
+ script.async = true;
3371
+ script.onload = () => {
3372
+ waitForSDK();
3373
+ };
3374
+ script.onerror = (err) => {
3375
+ console.error("Datacap script failed");
3376
+ window.__DATACAP_SCRIPT_LOADING__ = false;
3377
+ onError == null ? void 0 : onError(err);
3378
+ };
3379
+ document.head.appendChild(script);
3380
+ function waitForSDK() {
3381
+ let attempts = 0;
3382
+ const interval = setInterval(() => {
3383
+ attempts++;
3384
+ if (window.DatacapHostedWebToken) {
3385
+ clearInterval(interval);
3386
+ window.__DATACAP_SCRIPT_LOADING__ = false;
3387
+ window.__DATACAP_SCRIPT_LOADED__ = true;
3388
+ console.log("\u2705 Datacap SDK Ready");
3389
+ onReady == null ? void 0 : onReady();
3390
+ }
3391
+ if (attempts > 100) {
3392
+ clearInterval(interval);
3393
+ window.__DATACAP_SCRIPT_LOADING__ = false;
3394
+ onError == null ? void 0 : onError("SDK bootstrap timeout");
3395
+ }
3396
+ }, 100);
3350
3397
  }
3351
3398
  }, []);
3352
3399
  return null;
@@ -3355,7 +3402,7 @@ var DataCapScriptLoader = () => {
3355
3402
  // src/app/components/Datacap-Payment/DataCapFields.tsx
3356
3403
  import { useEffect as useEffect7, useRef as useRef2, useState as useState3 } from "react";
3357
3404
  import { jsx as jsx15 } from "react/jsx-runtime";
3358
- var customCSS = `
3405
+ var baseCSS = `
3359
3406
  body {
3360
3407
  margin: 0;
3361
3408
  font-family: 'IBM Plex Mono', monospace !important;
@@ -3434,6 +3481,8 @@ var customCSS = `
3434
3481
  }
3435
3482
 
3436
3483
  `;
3484
+ var datacapInitializing = false;
3485
+ var datacapInitialized = false;
3437
3486
  var DataCapFields = ({
3438
3487
  isOpen,
3439
3488
  tokenKey,
@@ -3446,6 +3495,7 @@ var DataCapFields = ({
3446
3495
  const iframeId = "datacap-iframe";
3447
3496
  const resolverRef = useRef2(null);
3448
3497
  const [iframeReady, setIframeReady] = useState3(false);
3498
+ let customCSS = baseCSS;
3449
3499
  useEffect7(() => {
3450
3500
  if (!isOpen || !tokenKey) return;
3451
3501
  if (isAddCard) {
@@ -3490,11 +3540,13 @@ var DataCapFields = ({
3490
3540
  const waitForSDK = () => new Promise((resolve, reject) => {
3491
3541
  let attempts = 0;
3492
3542
  const interval = setInterval(() => {
3543
+ attempts++;
3493
3544
  if (window.DatacapHostedWebToken) {
3494
3545
  clearInterval(interval);
3546
+ console.log("\u2705 Datacap SDK Ready");
3495
3547
  resolve();
3496
3548
  }
3497
- if (attempts++ > 50) {
3549
+ if (attempts > 100) {
3498
3550
  clearInterval(interval);
3499
3551
  reject("Datacap SDK not loaded");
3500
3552
  }
@@ -3502,10 +3554,28 @@ var DataCapFields = ({
3502
3554
  });
3503
3555
  await waitForSDK();
3504
3556
  const sdk = window.DatacapHostedWebToken;
3557
+ if (datacapInitializing || datacapInitialized) {
3558
+ console.log("\u{1F7E1} Datacap already initializing/initialized");
3559
+ return;
3560
+ }
3561
+ datacapInitializing = true;
3562
+ const initTimeout = setTimeout(() => {
3563
+ var _a, _b;
3564
+ console.error("\u274C Datacap iframe load timeout");
3565
+ datacapInitializing = false;
3566
+ setLoader == null ? void 0 : setLoader(false);
3567
+ (_b = (_a = resolverRef.current) == null ? void 0 : _a.reject) == null ? void 0 : _b.call(
3568
+ _a,
3569
+ "Unable to load payment form"
3570
+ );
3571
+ }, 15e3);
3505
3572
  sdk.init(
3506
3573
  tokenKey,
3507
3574
  iframeId,
3508
3575
  (response) => {
3576
+ clearTimeout(initTimeout);
3577
+ datacapInitializing = false;
3578
+ datacapInitialized = true;
3509
3579
  setLoader == null ? void 0 : setLoader(false);
3510
3580
  if (!resolverRef.current) return;
3511
3581
  if ((response == null ? void 0 : response.Error) || (response == null ? void 0 : response.Errors)) {
@@ -3519,6 +3589,9 @@ var DataCapFields = ({
3519
3589
  );
3520
3590
  };
3521
3591
  initialize();
3592
+ return () => {
3593
+ resolverRef.current = null;
3594
+ };
3522
3595
  }, [isOpen, tokenKey]);
3523
3596
  useEffect7(() => {
3524
3597
  const uniqueId = Math.random();
@@ -3526,7 +3599,15 @@ var DataCapFields = ({
3526
3599
  return new Promise((resolve, reject) => {
3527
3600
  setLoader == null ? void 0 : setLoader(true);
3528
3601
  resolverRef.current = { resolve, reject };
3529
- window.DatacapHostedWebToken.requestToken();
3602
+ if (!window.DatacapHostedWebToken) {
3603
+ reject("Datacap SDK unavailable");
3604
+ return;
3605
+ }
3606
+ try {
3607
+ window.DatacapHostedWebToken.requestToken();
3608
+ } catch (err) {
3609
+ reject(err);
3610
+ }
3530
3611
  });
3531
3612
  };
3532
3613
  window.requestDcToken = fn;
@@ -3534,23 +3615,55 @@ var DataCapFields = ({
3534
3615
  delete window.requestDcToken;
3535
3616
  };
3536
3617
  }, []);
3537
- return /* @__PURE__ */ jsx15(
3538
- "iframe",
3539
- {
3540
- id: iframeId,
3541
- onLoad: () => {
3542
- console.log("\u{1F7E2} Iframe visually loaded");
3543
- setIframeReady(true);
3544
- setLoader == null ? void 0 : setLoader(false);
3545
- },
3546
- style: {
3547
- width: "100%",
3548
- height: `${height || "250px"}`,
3549
- border: "none",
3550
- opacity: iframeReady ? 1 : 0,
3551
- transition: "opacity 0.3s ease"
3618
+ useEffect7(() => {
3619
+ if (!isOpen) {
3620
+ datacapInitializing = false;
3621
+ datacapInitialized = false;
3622
+ }
3623
+ }, [isOpen]);
3624
+ return (
3625
+ // <iframe
3626
+ // id={iframeId}
3627
+ // onLoad={() => {
3628
+ // console.log("🟢 Iframe visually loaded");
3629
+ // setIframeReady(true);
3630
+ // setLoader?.(false);
3631
+ // }}
3632
+ // style={{
3633
+ // width: "100%",
3634
+ // height: `${height || "250px"}`,
3635
+ // border: "none",
3636
+ // opacity: iframeReady ? 1 : 0,
3637
+ // transition: "opacity 0.3s ease",
3638
+ // }}
3639
+ // />
3640
+ /* @__PURE__ */ jsx15(
3641
+ "iframe",
3642
+ {
3643
+ id: iframeId,
3644
+ onLoad: () => {
3645
+ console.log("\u{1F7E2} Iframe visually loaded");
3646
+ setIframeReady(true);
3647
+ setLoader == null ? void 0 : setLoader(false);
3648
+ },
3649
+ onError: () => {
3650
+ var _a, _b;
3651
+ console.error("\u274C iframe failed");
3652
+ setLoader == null ? void 0 : setLoader(false);
3653
+ (_b = (_a = resolverRef.current) == null ? void 0 : _a.reject) == null ? void 0 : _b.call(
3654
+ _a,
3655
+ "Payment form failed to load"
3656
+ );
3657
+ },
3658
+ style: {
3659
+ width: "100%",
3660
+ height: `${height || "250px"}`,
3661
+ border: "none",
3662
+ opacity: iframeReady ? 1 : 0,
3663
+ transition: "opacity 0.3s ease"
3664
+ }
3552
3665
  }
3553
- }
3666
+ )
3554
3667
  );
3555
3668
  };
3556
3669
 
@@ -4124,6 +4237,19 @@ function FractalCheckbox({ id, checked, onChange, children }) {
4124
4237
  ] });
4125
4238
  }
4126
4239
 
4240
+ // src/app/utils/Constant.js
4241
+ var PaymentMethodKeys = {
4242
+ PROPAYKEY: "25",
4243
+ PAYARCKEY: "26",
4244
+ STRIPEKEYCC: "27",
4245
+ PAYRIXKEY: "28",
4246
+ SKYFIACHKEY: "29",
4247
+ JUSTIFIKEY: "30",
4248
+ INFINICEPTKEY: "31",
4249
+ FRACTALKEY: "32"
4250
+ };
4251
+ var DcLoadingError = "Something went wrong while loading the payment form. Please try again after some time.";
4252
+
4127
4253
  // src/app/components/Charge/GetPaymentPage.tsx
4128
4254
  import { Fragment as Fragment9, jsx as jsx18, jsxs as jsxs9 } from "react/jsx-runtime";
4129
4255
  function GetPaymentPage(props) {
@@ -4147,6 +4273,7 @@ function GetPaymentPage(props) {
4147
4273
  const [saveACHConsent1, setSaveACHConsent1] = useState4(false);
4148
4274
  const [errorBankConsentOther, setErrorBankConsentOther] = useState4("");
4149
4275
  const [loaderText, setLoderText] = useState4("");
4276
+ const [isTokenizerReady, setTokenizerReady] = useState4(false);
4150
4277
  const fractalpayClientKey = props.merchantPublicKey;
4151
4278
  const isPreAuth = !!props.isPreAuth;
4152
4279
  const showButton = props.showButton !== false;
@@ -4698,6 +4825,7 @@ function GetPaymentPage(props) {
4698
4825
  } catch (err) {
4699
4826
  setErrorIframe(((_h2 = (_g2 = err == null ? void 0 : err.response) == null ? void 0 : _g2.data) == null ? void 0 : _h2.message) || (err == null ? void 0 : err.message) || "Something went wrong.");
4700
4827
  setLoading2(false);
4828
+ return;
4701
4829
  }
4702
4830
  const card_issue_type = ((_i2 = tokenizeData == null ? void 0 : tokenizeData.bin_lookup_result) == null ? void 0 : _i2.card_issue_type) || null;
4703
4831
  const feeExempt = ["debit", "prepaid"].includes(String(card_issue_type || "").toLowerCase());
@@ -5193,8 +5321,20 @@ function GetPaymentPage(props) {
5193
5321
  ] });
5194
5322
  return /* @__PURE__ */ jsxs9(Fragment9, { children: [
5195
5323
  /* @__PURE__ */ jsx18(DataScript, {}),
5196
- /* @__PURE__ */ jsx18(FractalTokenizerScript, {}),
5197
- /* @__PURE__ */ jsx18(DataCapScriptLoader, {}),
5324
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx18(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
5325
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 31 && /* @__PURE__ */ jsx18(
5326
+ DataCapScriptLoader,
5327
+ {
5328
+ onReady: () => {
5329
+ console.log("SDK Ready");
5330
+ },
5331
+ onError: (err) => {
5332
+ setLoading(false);
5333
+ setLoadingIframe(false);
5334
+ setError(DcLoadingError);
5335
+ }
5336
+ }
5337
+ ),
5198
5338
  /* @__PURE__ */ jsx18(Chargewidgetstyles, {}),
5199
5339
  /* @__PURE__ */ jsx18(CardBankRadioStyles, {}),
5200
5340
  /* @__PURE__ */ jsx18(FractalWidgetStyles, {}),
@@ -5387,7 +5527,7 @@ function GetPaymentPage(props) {
5387
5527
  }
5388
5528
  }
5389
5529
  ) }),
5390
- /* @__PURE__ */ jsx18(FractalField, { label: (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 ? "Card number" : "", error: cardError == null ? void 0 : cardError.cardNumber, children: /* @__PURE__ */ jsx18("div", { className: `fps-tokenizer ${(paymentData == null ? void 0 : paymentData.paymentGateway) !== 32 ? "dc-tokenizer" : ""}`, children: (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 ? show && /* @__PURE__ */ jsx18(
5530
+ /* @__PURE__ */ jsx18(FractalField, { label: (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 ? "Card number" : "", error: cardError == null ? void 0 : cardError.cardNumber, children: /* @__PURE__ */ jsx18("div", { className: `fps-tokenizer ${(paymentData == null ? void 0 : paymentData.paymentGateway) !== 32 ? "dc-tokenizer" : ""}`, children: (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 ? show && isTokenizerReady && /* @__PURE__ */ jsx18(
5391
5531
  FractalFields_default,
5392
5532
  {
5393
5533
  fractalStyles,
@@ -5853,6 +5993,7 @@ function AddCardEasyPay(props) {
5853
5993
  const exp_year_ref = useRef4(null);
5854
5994
  const cvv_ref = useRef4(null);
5855
5995
  const name_ref = useRef4(null);
5996
+ const [isTokenizerReady, setTokenizerReady] = useState5(false);
5856
5997
  const tokenizerRef = useRef4(null);
5857
5998
  const fractalStyles = {
5858
5999
  input: {
@@ -6125,8 +6266,20 @@ function AddCardEasyPay(props) {
6125
6266
  }, []);
6126
6267
  return /* @__PURE__ */ jsxs11(Fragment11, { children: [
6127
6268
  /* @__PURE__ */ jsx23(DataScript, {}),
6128
- /* @__PURE__ */ jsx23(FractalTokenizerScript, {}),
6129
- /* @__PURE__ */ jsx23(DataCapScriptLoader, {}),
6269
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx23(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
6270
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 31 && /* @__PURE__ */ jsx23(
6271
+ DataCapScriptLoader,
6272
+ {
6273
+ onReady: () => {
6274
+ console.log("SDK Ready");
6275
+ },
6276
+ onError: (err) => {
6277
+ setLoading(false);
6278
+ setLoadingIframe(false);
6279
+ setError(DcLoadingError);
6280
+ }
6281
+ }
6282
+ ),
6130
6283
  /* @__PURE__ */ jsx23(AddCardStyle, {}),
6131
6284
  /* @__PURE__ */ jsx23(Loader_default, { loading: loading || loadingIframe }),
6132
6285
  error && /* @__PURE__ */ jsx23("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx23(ErrorCardMessage_default, { error, onClose: handleClose }) }),
@@ -6155,7 +6308,7 @@ function AddCardEasyPay(props) {
6155
6308
  /* @__PURE__ */ jsxs11("div", { style: { maxHeight: "350px", minHeight: "0" }, className: "card-scrl", children: [
6156
6309
  /* @__PURE__ */ jsxs11("div", { className: "form-group", style: { marginTop: "0", marginBottom: "10px" }, children: [
6157
6310
  /* @__PURE__ */ jsx23("label", { htmlFor: "cardNumber", children: "Card Number" }),
6158
- (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx23(
6311
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && isTokenizerReady && /* @__PURE__ */ jsx23(
6159
6312
  FractalFields_default,
6160
6313
  {
6161
6314
  fractalStyles,
@@ -6290,18 +6443,6 @@ function AddCardEasyPay(props) {
6290
6443
  import { useEffect as useEffect11, useRef as useRef6, useState as useState6 } from "react";
6291
6444
  import axios5 from "axios";
6292
6445
 
6293
- // src/app/utils/Constant.js
6294
- var PaymentMethodKeys = {
6295
- PROPAYKEY: "25",
6296
- PAYARCKEY: "26",
6297
- STRIPEKEYCC: "27",
6298
- PAYRIXKEY: "28",
6299
- SKYFIACHKEY: "29",
6300
- JUSTIFIKEY: "30",
6301
- INFINICEPTKEY: "31",
6302
- FRACTALKEY: "32"
6303
- };
6304
-
6305
6446
  // src/app/components/AddCard/AddCardSkyStyle.tsx
6306
6447
  import { jsx as jsx24 } from "react/jsx-runtime";
6307
6448
  function AddCardSkyStyle({}) {
@@ -6509,8 +6650,12 @@ import { Fragment as Fragment12, jsx as jsx25, jsxs as jsxs12 } from "react/jsx-
6509
6650
  var FractalFieldsAddCardSky = ({ fractalStyles, tokenizerRef, extraInputs }) => {
6510
6651
  const instanceRef = useRef5(null);
6511
6652
  useEffect10(() => {
6512
- if (!window.FractalTokenizer) return;
6513
- const instance = new window.FractalTokenizer({
6653
+ const Tokenizer = window.FractalTokenizer;
6654
+ if (!Tokenizer) {
6655
+ console.error("Tokenizer not available");
6656
+ return;
6657
+ }
6658
+ const instance = new Tokenizer({
6514
6659
  styles: fractalStyles
6515
6660
  });
6516
6661
  instanceRef.current = instance;
@@ -6595,7 +6740,7 @@ var FractalFieldsAddCardSky_default = FractalFieldsAddCardSky;
6595
6740
 
6596
6741
  // src/app/components/AddCard/AddCardSky.tsx
6597
6742
  import { Fragment as Fragment13, jsx as jsx26, jsxs as jsxs13 } from "react/jsx-runtime";
6598
- function CardOnFile({ session_token, callback, isloading, onCancel, showChecks, merchantName, signCheckbox, checkedSignCheckbox, onCheckSign, cancelbtnClass, savebtnClass, inputClass, isDual, customCSS: customCSS2, height }) {
6743
+ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks, merchantName, signCheckbox, checkedSignCheckbox, onCheckSign, cancelbtnClass, savebtnClass, inputClass, isDual, customCSS, height }) {
6599
6744
  var _a, _b;
6600
6745
  const [loading, setLoading] = useState6(false);
6601
6746
  const [errorIframe, setErrorIframe] = useState6("");
@@ -6606,10 +6751,11 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
6606
6751
  const [error, setError] = useState6("");
6607
6752
  const showLoader = () => setLoading(true);
6608
6753
  const hideLoader = () => setLoading(false);
6609
- const [passFee, setPassFee] = useState6(false);
6754
+ const [passFee, setPassFee] = useState6(null);
6610
6755
  const [paymentGateway, setPaymentGateway] = useState6();
6611
6756
  const [dcToken, setDCToken] = useState6();
6612
6757
  const tokenizerRef = useRef6(null);
6758
+ const [isTokenizerReady, setTokenizerReady] = useState6(false);
6613
6759
  const fractalStyles = {
6614
6760
  input: {
6615
6761
  "font-family": "'Inter', sans-serif",
@@ -6872,8 +7018,20 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
6872
7018
  }, []);
6873
7019
  return /* @__PURE__ */ jsxs13(Fragment13, { children: [
6874
7020
  /* @__PURE__ */ jsx26(DataScript, {}),
6875
- /* @__PURE__ */ jsx26(FractalTokenizerScript, {}),
6876
- /* @__PURE__ */ jsx26(DataCapScriptLoader, {}),
7021
+ paymentGateway == 32 && /* @__PURE__ */ jsx26(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
7022
+ paymentGateway == 31 && /* @__PURE__ */ jsx26(
7023
+ DataCapScriptLoader,
7024
+ {
7025
+ onReady: () => {
7026
+ console.log("SDK Ready");
7027
+ },
7028
+ onError: (err) => {
7029
+ setLoading(false);
7030
+ setLoadingIframe(false);
7031
+ setError(DcLoadingError);
7032
+ }
7033
+ }
7034
+ ),
6877
7035
  /* @__PURE__ */ jsx26(AddCardSkyStyle, {}),
6878
7036
  /* @__PURE__ */ jsx26(Loader_default, { loading: loading || isloading || loadingIframe }),
6879
7037
  error && /* @__PURE__ */ jsx26("div", { style: { maxHeight: "606px", minHeight: "60vh", padding: "40px" }, children: /* @__PURE__ */ jsx26(ErrorCardMessage_default, { error, onClose: handleClose }) }),
@@ -6934,7 +7092,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
6934
7092
  (cardError == null ? void 0 : cardError.lastName) && /* @__PURE__ */ jsx26("small", { className: "error", children: cardError == null ? void 0 : cardError.lastName })
6935
7093
  ] })
6936
7094
  ] }),
6937
- /* @__PURE__ */ jsx26(
7095
+ isTokenizerReady && /* @__PURE__ */ jsx26(
6938
7096
  FractalFieldsAddCardSky_default,
6939
7097
  {
6940
7098
  fractalStyles,
@@ -6966,7 +7124,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
6966
7124
  type: "checkbox",
6967
7125
  id: "pass_fee",
6968
7126
  className: "toggle-checkbox",
6969
- checked: passFee,
7127
+ checked: passFee != null ? passFee : false,
6970
7128
  onChange: (e) => {
6971
7129
  setPassFee(e.target.checked);
6972
7130
  }
@@ -7109,7 +7267,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
7109
7267
  isOpen: true,
7110
7268
  tokenKey: dcToken,
7111
7269
  setLoader: setLoadingIframe,
7112
- customCSS: customCSS2,
7270
+ customCSS,
7113
7271
  height
7114
7272
  }
7115
7273
  ) }),
@@ -7138,7 +7296,7 @@ function CardOnFile({ session_token, callback, isloading, onCancel, showChecks,
7138
7296
  type: "checkbox",
7139
7297
  id: "pass_fee",
7140
7298
  className: "toggle-checkbox",
7141
- checked: passFee,
7299
+ checked: passFee != null ? passFee : false,
7142
7300
  onChange: (e) => {
7143
7301
  setPassFee(e.target.checked);
7144
7302
  }
@@ -7377,6 +7535,7 @@ function PartialPayment(props) {
7377
7535
  const [errorBankConsentOther, setErrorBankConsentOther] = useState7("");
7378
7536
  const [loaderText, setLoderText] = useState7("");
7379
7537
  let [isDebitAdjusted, setIsDebitAdjusted] = useState7(false);
7538
+ const [isTokenizerReady, setTokenizerReady] = useState7(false);
7380
7539
  const tokenizerRef = useRef7(null);
7381
7540
  const fractalStyles = {
7382
7541
  input: {
@@ -8101,8 +8260,20 @@ function PartialPayment(props) {
8101
8260
  /* @__PURE__ */ jsx29(DataScript, {}),
8102
8261
  /* @__PURE__ */ jsx29(Chargewidgetstyles, {}),
8103
8262
  /* @__PURE__ */ jsx29(CardBankRadioStyles, {}),
8104
- /* @__PURE__ */ jsx29(FractalTokenizerScript, {}),
8105
- /* @__PURE__ */ jsx29(DataCapScriptLoader, {}),
8263
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx29(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
8264
+ (paymentData == null ? void 0 : paymentData.paymentGateway) === 31 && /* @__PURE__ */ jsx29(
8265
+ DataCapScriptLoader,
8266
+ {
8267
+ onReady: () => {
8268
+ console.log("SDK Ready");
8269
+ },
8270
+ onError: (err) => {
8271
+ setLoading(false);
8272
+ setLoadingIframe(false);
8273
+ setError(DcLoadingError);
8274
+ }
8275
+ }
8276
+ ),
8106
8277
  /* @__PURE__ */ jsxs16(Fragment16, { children: [
8107
8278
  /* @__PURE__ */ jsx29("button", { ref: buttonRef, style: { display: "none" }, className: "paymentBtn", onClick: handleShow, children: "Pay" }),
8108
8279
  /* @__PURE__ */ jsxs16(
@@ -8318,7 +8489,7 @@ function PartialPayment(props) {
8318
8489
  ] }),
8319
8490
  /* @__PURE__ */ jsxs16("div", { className: "form-group", children: [
8320
8491
  /* @__PURE__ */ jsx29("label", { children: "CARD NUMBER" }),
8321
- /* @__PURE__ */ jsx29("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && /* @__PURE__ */ jsx29(
8492
+ /* @__PURE__ */ jsx29("div", { className: "toggle-num-wrapper", children: show && (paymentData == null ? void 0 : paymentData.paymentGateway) === 32 && isTokenizerReady && /* @__PURE__ */ jsx29(
8322
8493
  FractalFields_default,
8323
8494
  {
8324
8495
  fractalStyles,
@@ -8626,7 +8797,7 @@ function PartialPayment(props) {
8626
8797
  }
8627
8798
 
8628
8799
  // src/app/components/Skysystemz/PayButtonWithForm.tsx
8629
- import { useEffect as useEffect18, useState as useState11, useMemo } from "react";
8800
+ import { useEffect as useEffect16, useState as useState10, useMemo } from "react";
8630
8801
 
8631
8802
  // src/app/components/Skysystemz/SkyChargewidgetstyles.tsx
8632
8803
  import { jsx as jsx30 } from "react/jsx-runtime";
@@ -9472,7 +9643,7 @@ padding:0px !important;
9472
9643
  }
9473
9644
 
9474
9645
  // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
9475
- import { useCallback, useEffect as useEffect17, useRef as useRef11, useState as useState10 } from "react";
9646
+ import { useCallback, useEffect as useEffect15, useRef as useRef10, useState as useState9 } from "react";
9476
9647
  import axios8 from "axios";
9477
9648
  import Swal4 from "sweetalert2";
9478
9649
 
@@ -9758,200 +9929,9 @@ var ErrorCardOverlay = ({ onClose, error, autoTrigger = false }) => {
9758
9929
  };
9759
9930
  var ErrorCardOverlay_default = ErrorCardOverlay;
9760
9931
 
9761
- // src/app/components/Atoms/Googlepay/Googlepay.tsx
9762
- import { useRef as useRef9 } from "react";
9763
-
9764
- // src/app/components/Atoms/Googlepay/GooglePayScriptLoader.tsx
9765
- import { useEffect as useEffect14 } from "react";
9766
- var googlePayScriptLoaded = false;
9767
- var GooglePayScriptLoader = ({
9768
- onLoad
9769
- }) => {
9770
- useEffect14(() => {
9771
- if (googlePayScriptLoaded) {
9772
- onLoad == null ? void 0 : onLoad();
9773
- return;
9774
- }
9775
- const existingScript = document.querySelector(
9776
- `script[src="https://pay.google.com/gp/p/js/pay.js"]`
9777
- );
9778
- if (!existingScript) {
9779
- const script2 = document.createElement("script");
9780
- script2.src = "https://pay.google.com/gp/p/js/pay.js";
9781
- script2.async = true;
9782
- script2.onload = () => {
9783
- console.log("\u2705 Google Pay script loaded");
9784
- googlePayScriptLoaded = true;
9785
- console.log("google:", window.google);
9786
- onLoad == null ? void 0 : onLoad();
9787
- };
9788
- script2.onerror = (err) => {
9789
- console.error("\u274C Google Pay script failed", err);
9790
- };
9791
- document.head.appendChild(script2);
9792
- } else {
9793
- googlePayScriptLoaded = true;
9794
- onLoad == null ? void 0 : onLoad();
9795
- }
9796
- }, []);
9797
- return null;
9798
- };
9799
-
9800
- // src/app/components/Atoms/Googlepay/Googlepay.tsx
9801
- import { Fragment as Fragment18, jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
9802
- function GooglePayComponent({
9803
- amount,
9804
- googlePayEnvironment: googlePayEnvironment2,
9805
- googlePayGatewayMerchantId: googlePayGatewayMerchantId2,
9806
- googlePayMerchantId: googlePayMerchantId2,
9807
- googlePayMerchantName,
9808
- require3ds = false,
9809
- completeFractalFlow,
9810
- setLoading
9811
- }) {
9812
- const containerRef = useRef9(null);
9813
- const paymentsClientRef = useRef9(null);
9814
- const baseRequest = {
9815
- apiVersion: 2,
9816
- apiVersionMinor: 0
9817
- };
9818
- const allowedCardNetworks = ["AMEX", "DISCOVER", "MASTERCARD", "VISA"];
9819
- const allowedCardAuthMethods = require3ds ? ["CRYPTOGRAM_3DS"] : ["PAN_ONLY", "CRYPTOGRAM_3DS"];
9820
- const baseCardPaymentMethod = {
9821
- type: "CARD",
9822
- parameters: {
9823
- allowedAuthMethods: allowedCardAuthMethods,
9824
- allowedCardNetworks
9825
- }
9826
- };
9827
- const cardPaymentMethod = __spreadProps(__spreadValues({}, baseCardPaymentMethod), {
9828
- tokenizationSpecification: {
9829
- type: "PAYMENT_GATEWAY",
9830
- parameters: {
9831
- gateway: googlePayGatewayMerchantId2,
9832
- gatewayMerchantId: googlePayGatewayMerchantId2
9833
- }
9834
- }
9835
- });
9836
- const handlePaymentAuthorization = async (paymentData) => {
9837
- var _a, _b;
9838
- try {
9839
- const token = (_b = (_a = paymentData == null ? void 0 : paymentData.paymentMethodData) == null ? void 0 : _a.tokenizationData) == null ? void 0 : _b.token;
9840
- if (!token) throw new Error("Missing token");
9841
- const parsed = JSON.parse(token);
9842
- console.log(parsed, "parsed token");
9843
- setLoading(true);
9844
- completeFractalFlow(parsed, null, "google_pay");
9845
- return {
9846
- transactionState: "SUCCESS"
9847
- // ✅ CLOSES GOOGLE PAY POPUP
9848
- };
9849
- } catch (err) {
9850
- console.error("Payment failed:", err);
9851
- return {
9852
- transactionState: "ERROR",
9853
- // ❌ CLOSES WITH ERROR UI
9854
- error: {
9855
- intent: "PAYMENT_AUTHORIZATION",
9856
- message: "Payment failed",
9857
- reason: "PAYMENT_DATA_INVALID"
9858
- }
9859
- };
9860
- }
9861
- };
9862
- const getPaymentsClient = () => {
9863
- if (!paymentsClientRef.current && typeof window !== "undefined") {
9864
- const google = window.google;
9865
- if (!google) return null;
9866
- paymentsClientRef.current = new google.payments.api.PaymentsClient({
9867
- environment: googlePayEnvironment2,
9868
- // ✅ ADD THIS
9869
- paymentDataCallbacks: {
9870
- onPaymentAuthorized: handlePaymentAuthorization
9871
- }
9872
- });
9873
- }
9874
- return paymentsClientRef.current;
9875
- };
9876
- const getIsReadyToPayRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
9877
- allowedPaymentMethods: [baseCardPaymentMethod]
9878
- });
9879
- const getTransactionInfo = () => ({
9880
- countryCode: "US",
9881
- currencyCode: "USD",
9882
- totalPriceStatus: "FINAL",
9883
- totalPrice: amount,
9884
- checkoutOption: "COMPLETE_IMMEDIATE_PURCHASE"
9885
- });
9886
- const getPaymentDataRequest = () => __spreadProps(__spreadValues({}, baseRequest), {
9887
- allowedPaymentMethods: [cardPaymentMethod],
9888
- transactionInfo: getTransactionInfo(),
9889
- merchantInfo: {
9890
- merchantId: googlePayMerchantId2,
9891
- merchantName: googlePayMerchantName
9892
- },
9893
- // ✅ ADD THIS
9894
- callbackIntents: ["PAYMENT_AUTHORIZATION"]
9895
- });
9896
- const initializeGooglePay = async () => {
9897
- try {
9898
- const client = getPaymentsClient();
9899
- if (!client) {
9900
- console.error("Google Pay client not ready");
9901
- return;
9902
- }
9903
- const response = await client.isReadyToPay(
9904
- getIsReadyToPayRequest()
9905
- );
9906
- if (response.result && containerRef.current) {
9907
- const button = client.createButton({
9908
- onClick: onGooglePayClick,
9909
- allowedPaymentMethods: [baseCardPaymentMethod],
9910
- buttonType: "pay",
9911
- buttonColor: "black",
9912
- buttonRadius: 8
9913
- });
9914
- if (containerRef.current) {
9915
- containerRef.current.innerHTML = "";
9916
- }
9917
- containerRef.current.appendChild(button);
9918
- }
9919
- } catch (err) {
9920
- console.error("Google Pay init error:", err);
9921
- }
9922
- };
9923
- const onGooglePayClick = async () => {
9924
- const client = getPaymentsClient();
9925
- if (!client) {
9926
- console.error("Google Pay client not ready");
9927
- return;
9928
- }
9929
- try {
9930
- await client.loadPaymentData(getPaymentDataRequest());
9931
- } catch (err) {
9932
- if ((err == null ? void 0 : err.statusCode) !== "CANCELED") {
9933
- console.error(err);
9934
- }
9935
- }
9936
- };
9937
- const onScriptLoad = () => {
9938
- if (!googlePayEnvironment2 || !googlePayGatewayMerchantId2 || !amount || !googlePayMerchantId2) {
9939
- console.error("Missing Google Pay config");
9940
- return;
9941
- }
9942
- setTimeout(() => {
9943
- initializeGooglePay();
9944
- }, 0);
9945
- };
9946
- return /* @__PURE__ */ jsxs19(Fragment18, { children: [
9947
- /* @__PURE__ */ jsx35("div", { ref: containerRef, className: "text-center" }),
9948
- /* @__PURE__ */ jsx35(GooglePayScriptLoader, { onLoad: onScriptLoad })
9949
- ] });
9950
- }
9951
-
9952
9932
  // src/app/components/Atoms/Applepay/ApplePayButton.tsx
9953
- import { useEffect as useEffect16, useRef as useRef10 } from "react";
9954
- import { jsx as jsx36 } from "react/jsx-runtime";
9933
+ import { useEffect as useEffect14, useRef as useRef9 } from "react";
9934
+ import { jsx as jsx35 } from "react/jsx-runtime";
9955
9935
  function ApplePayButton({
9956
9936
  applePayMerchantId: applePayMerchantId2,
9957
9937
  applePayAmount,
@@ -9959,7 +9939,7 @@ function ApplePayButton({
9959
9939
  showLoader,
9960
9940
  completeFractalFlow
9961
9941
  }) {
9962
- const applePayRef = useRef10(null);
9942
+ const applePayRef = useRef9(null);
9963
9943
  const paymentRequestMethods = [
9964
9944
  {
9965
9945
  supportedMethods: "https://apple.com/apple-pay",
@@ -10061,21 +10041,21 @@ function ApplePayButton({
10061
10041
  console.log("\u274C Apple Pay flow failed:", err == null ? void 0 : err.message);
10062
10042
  }
10063
10043
  }
10064
- useEffect16(() => {
10044
+ useEffect14(() => {
10065
10045
  if (window.ApplePaySession && window.ApplePaySession.canMakePayments()) {
10066
10046
  console.log("\u2705 Apple Pay is available");
10067
10047
  } else {
10068
10048
  console.log("\u274C Apple Pay NOT available");
10069
10049
  }
10070
10050
  }, []);
10071
- useEffect16(() => {
10051
+ useEffect14(() => {
10072
10052
  const btn = applePayRef.current;
10073
10053
  if (!btn) return;
10074
10054
  const handleClick = () => handleApplePayClick();
10075
10055
  btn.addEventListener("click", handleClick);
10076
10056
  return () => btn.removeEventListener("click", handleClick);
10077
10057
  }, [applePayMerchantId2, applePayAmount, applePayMerchantName]);
10078
- return /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(
10058
+ return /* @__PURE__ */ jsx35("div", { children: /* @__PURE__ */ jsx35(
10079
10059
  "apple-pay-button",
10080
10060
  {
10081
10061
  ref: applePayRef,
@@ -10088,55 +10068,56 @@ function ApplePayButton({
10088
10068
  }
10089
10069
 
10090
10070
  // src/app/components/Atoms/ModelContentSky/ModelContentSky.tsx
10091
- import { Fragment as Fragment19, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
10092
- var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_token, customerId, callback, merchantName = "merchant", isPreAuth, surcharge = "0", submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds = false, autoTrigger = false, show, setShow, setHandleCloseRef, isPartial, bankSurcharge, partialRef, loadingPrev = false, orderGuid: ordGuid, remainingAmount: remAmount, onSubmit, onLoad = true, customCSS: customCSS2 }) => {
10071
+ import { Fragment as Fragment18, jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
10072
+ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_token, customerId, callback, merchantName = "merchant", isPreAuth, surcharge = "0", submitBtnClass, submitBtnIcon, isRequest, pass_fee, pass_fee_amount, require3ds = false, autoTrigger = false, show, setShow, setHandleCloseRef, isPartial, bankSurcharge, partialRef, loadingPrev = false, orderGuid: ordGuid, remainingAmount: remAmount, onSubmit, onLoad = true, customCSS }) => {
10093
10073
  var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u;
10094
- const hasRunRef = useRef11(false);
10095
- const cardFormRef = useRef11(null);
10096
- const bankFormRef = useRef11(null);
10097
- const expiryYearRef = useRef11(null);
10098
- const expiryMonthRef = useRef11(null);
10099
- const cardListRunRef = useRef11(false);
10100
- const threeDSContainerRef = useRef11(null);
10101
- const [activetab, setActive] = useState10("card");
10102
- const [activeList, setActiveList] = useState10("card");
10103
- const [cardData, setCardData] = useState10();
10104
- const [cardError, setCardError] = useState10({});
10105
- const [achData, setAchData] = useState10();
10106
- const [achError, setAchError] = useState10({});
10107
- const [saveACHinfo, setSaveACHinfo] = useState10(false);
10108
- const [saveACHConsent1, setSaveACHConsent1] = useState10(false);
10109
- const [saveCardInfo, setSaveCardInfo] = useState10(false);
10110
- const [error, setError] = useState10("");
10111
- const [errorIframe, setErrorIframe] = useState10("");
10112
- const [success, setSuccess] = useState10(false);
10113
- let [tranId, setTranId] = useState10("");
10114
- const [loading, setLoading] = useState10(false);
10115
- const [loading2, setLoading2] = useState10(false);
10116
- const [loadingIframe, setLoadingIframe] = useState10(false);
10117
- const [cardList, setCardList] = useState10([]);
10118
- const [bankList, setBankList] = useState10([]);
10119
- const [selectedCard, setSelectedCard] = useState10();
10120
- const [cashDiscount, setCashDiscount] = useState10(Number(amount));
10121
- const [activeinCard, setActiveinCard] = useState10("form");
10122
- const [activeinBank, setActiveinBank] = useState10("form");
10123
- const [isBankActive, setIsBankActive] = useState10(false);
10124
- const [processingFee, setProcessingFee] = useState10(0);
10125
- const [clientSecret, setClientSecret] = useState10("");
10126
- const [errorMessage, setErrorMessage] = useState10(null);
10127
- const [initialLoader, setInitialLoader] = useState10(false);
10128
- const [is3DSEnable, setIs3DSEnable] = useState10(false);
10129
- const [stripeResponse, setStripeResponse] = useState10(null);
10130
- const [orderLoader, setOrderLoader] = useState10(false);
10131
- const [orderGuid, setOrderGuid] = useState10(ordGuid || null);
10132
- const [partialAmount, setPartialAmount] = useState10("");
10133
- const [partialError, setPartialError] = useState10("");
10134
- const [remainingAmount, setRemainingAmount] = useState10("");
10135
- const [paymentGateway, setPaymentGateway] = useState10();
10136
- const [dcToken, setDCToken] = useState10();
10137
- const [isBankConsentChecked, setIsBankConsentChecked] = useState10(false);
10138
- const [errorBankConsent, setErrorBankConsent] = useState10("");
10139
- const [errorBankConsentOther, setErrorBankConsentOther] = useState10("");
10074
+ const hasRunRef = useRef10(false);
10075
+ const cardFormRef = useRef10(null);
10076
+ const bankFormRef = useRef10(null);
10077
+ const expiryYearRef = useRef10(null);
10078
+ const expiryMonthRef = useRef10(null);
10079
+ const cardListRunRef = useRef10(false);
10080
+ const threeDSContainerRef = useRef10(null);
10081
+ const [activetab, setActive] = useState9("card");
10082
+ const [activeList, setActiveList] = useState9("card");
10083
+ const [cardData, setCardData] = useState9();
10084
+ const [cardError, setCardError] = useState9({});
10085
+ const [achData, setAchData] = useState9();
10086
+ const [achError, setAchError] = useState9({});
10087
+ const [saveACHinfo, setSaveACHinfo] = useState9(false);
10088
+ const [saveACHConsent1, setSaveACHConsent1] = useState9(false);
10089
+ const [saveCardInfo, setSaveCardInfo] = useState9(false);
10090
+ const [error, setError] = useState9("");
10091
+ const [errorIframe, setErrorIframe] = useState9("");
10092
+ const [success, setSuccess] = useState9(false);
10093
+ let [tranId, setTranId] = useState9("");
10094
+ const [loading, setLoading] = useState9(false);
10095
+ const [loading2, setLoading2] = useState9(false);
10096
+ const [loadingIframe, setLoadingIframe] = useState9(false);
10097
+ const [cardList, setCardList] = useState9([]);
10098
+ const [bankList, setBankList] = useState9([]);
10099
+ const [selectedCard, setSelectedCard] = useState9();
10100
+ const [cashDiscount, setCashDiscount] = useState9(Number(amount));
10101
+ const [activeinCard, setActiveinCard] = useState9("form");
10102
+ const [activeinBank, setActiveinBank] = useState9("form");
10103
+ const [isBankActive, setIsBankActive] = useState9(false);
10104
+ const [processingFee, setProcessingFee] = useState9(0);
10105
+ const [clientSecret, setClientSecret] = useState9("");
10106
+ const [errorMessage, setErrorMessage] = useState9(null);
10107
+ const [initialLoader, setInitialLoader] = useState9(false);
10108
+ const [is3DSEnable, setIs3DSEnable] = useState9(false);
10109
+ const [stripeResponse, setStripeResponse] = useState9(null);
10110
+ const [orderLoader, setOrderLoader] = useState9(false);
10111
+ const [orderGuid, setOrderGuid] = useState9(ordGuid || null);
10112
+ const [partialAmount, setPartialAmount] = useState9("");
10113
+ const [partialError, setPartialError] = useState9("");
10114
+ const [remainingAmount, setRemainingAmount] = useState9("");
10115
+ const [paymentGateway, setPaymentGateway] = useState9();
10116
+ const [dcToken, setDCToken] = useState9();
10117
+ const [isBankConsentChecked, setIsBankConsentChecked] = useState9(false);
10118
+ const [errorBankConsent, setErrorBankConsent] = useState9("");
10119
+ const [errorBankConsentOther, setErrorBankConsentOther] = useState9("");
10120
+ const [isTokenizerReady, setTokenizerReady] = useState9(false);
10140
10121
  let mastercard2 = S3Url + "widget/mc-img.svg";
10141
10122
  let visa2 = S3Url + "widget/visa-img.svg";
10142
10123
  let americanexp2 = S3Url + "widget/ae-img.svg";
@@ -10164,7 +10145,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10164
10145
  const bankFeeAmount = Number(bankSurcharge || 0);
10165
10146
  const bankSavingsAmount = Math.max(bankFeeAmount > 0 ? cardFeeAmount - bankFeeAmount : cardFeeAmount, 0);
10166
10147
  const bankSavingsText = bankSavingsAmount > 0 ? `Save ${formatUSD(bankSavingsAmount.toFixed(2))}` : "";
10167
- const tokenizerRef = useRef11(null);
10148
+ const tokenizerRef = useRef10(null);
10168
10149
  const fractalStyles = {
10169
10150
  input: {
10170
10151
  "font-family": "'Inter', sans-serif",
@@ -10237,7 +10218,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10237
10218
  let dataObj = __spreadValues({
10238
10219
  Token: data == null ? void 0 : data.Token,
10239
10220
  amount,
10240
- postal_code: data == null ? void 0 : data.postalCode
10221
+ postal_code: data == null ? void 0 : data.postalCode,
10222
+ require3ds
10241
10223
  }, saveCardInfo ? {
10242
10224
  card: {
10243
10225
  postal_code: cardData == null ? void 0 : cardData.zipCode,
@@ -10343,8 +10325,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10343
10325
  return Object.keys(errors).length > 0;
10344
10326
  };
10345
10327
  const completeFractalFlow = async (tokenizeData, intentid, typeoftoken) => {
10346
- var _a2, _b2, _c2, _d2, _e2, _f2, _g2, _h2;
10328
+ var _a2, _b2, _c2, _d2, _e2, _f2, _g2;
10347
10329
  try {
10330
+ console.log({
10331
+ tokenizeData,
10332
+ intentid,
10333
+ typeoftoken
10334
+ });
10348
10335
  if (typeoftoken == "google_pay" || typeoftoken == "apple_pay") {
10349
10336
  handleCharge({
10350
10337
  Token: tokenizeData,
@@ -10352,39 +10339,28 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10352
10339
  typeoftoken
10353
10340
  });
10354
10341
  return;
10355
- }
10356
- let token = tokenizeData;
10357
- let verifyandsaveresp = await axios8.post(`${masterBaseUrl}api/v1/gateway/verify-and-save/${session_token}`, {
10358
- token,
10359
- require3ds,
10360
- pass_fee,
10361
- typeoftoken
10362
- });
10363
- if ((verifyandsaveresp == null ? void 0 : verifyandsaveresp.status) == 200) {
10364
- let responsetemp = (_a2 = verifyandsaveresp == null ? void 0 : verifyandsaveresp.data) == null ? void 0 : _a2.data;
10365
- let respData = {
10366
- Token: responsetemp.gateway_token,
10367
- Brand: responsetemp.card_data.brand,
10368
- ExpirationMonth: responsetemp.card_data.expire_mm,
10369
- ExpirationYear: responsetemp.card_data.expire_yy,
10370
- Last4: responsetemp.card_data.last4,
10371
- Bin: responsetemp.card_data.bin,
10372
- postalCode: cardData == null ? void 0 : cardData.zipCode,
10373
- stripe_3ds_auth_id: intentid
10374
- };
10342
+ } else {
10375
10343
  if (isPreAuth) {
10376
- handlePreAuth(respData);
10344
+ handlePreAuth(__spreadValues({
10345
+ Token: tokenizeData,
10346
+ postalCode: cardData == null ? void 0 : cardData.zipCode,
10347
+ typeoftoken: "token"
10348
+ }, intentid && { stripe_3ds_auth_id: intentid }));
10377
10349
  } else {
10378
- handleCharge(respData);
10350
+ handleCharge(__spreadValues({
10351
+ Token: tokenizeData,
10352
+ postalCode: cardData == null ? void 0 : cardData.zipCode,
10353
+ typeoftoken: "token"
10354
+ }, intentid && { stripe_3ds_auth_id: intentid }));
10379
10355
  }
10380
10356
  }
10381
10357
  } catch (error2) {
10382
10358
  console.log(error2, "error");
10383
- setError(((_c2 = (_b2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _b2.data) == null ? void 0 : _c2.message) || "Something went wrong!");
10359
+ setError(((_b2 = (_a2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) || "Something went wrong!");
10384
10360
  callback({
10385
- error: ((_e2 = (_d2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _d2.data) == null ? void 0 : _e2.message) || "Something went wrong!",
10386
- result: (_g2 = (_f2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _f2.data) == null ? void 0 : _g2.result,
10387
- statusCode: (_h2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _h2.status
10361
+ error: ((_d2 = (_c2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _c2.data) == null ? void 0 : _d2.message) || "Something went wrong!",
10362
+ result: (_f2 = (_e2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _e2.data) == null ? void 0 : _f2.result,
10363
+ statusCode: (_g2 = error2 == null ? void 0 : error2.response) == null ? void 0 : _g2.status
10388
10364
  });
10389
10365
  hideLoader();
10390
10366
  }
@@ -10956,7 +10932,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
10956
10932
  hideLoader();
10957
10933
  }
10958
10934
  } else {
10959
- setError("Please Select A Card/Bank");
10935
+ setErrorIframe("Please Select A Card/Bank");
10960
10936
  callback({
10961
10937
  error: "Please Select A Card/Bank"
10962
10938
  });
@@ -11029,13 +11005,13 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11029
11005
  setOrderLoader(false);
11030
11006
  }
11031
11007
  };
11032
- useEffect17(() => {
11008
+ useEffect15(() => {
11033
11009
  if (!show && !autoTrigger) {
11034
11010
  hasRunRef.current = false;
11035
11011
  cardListRunRef.current = false;
11036
11012
  }
11037
11013
  }, [show, autoTrigger]);
11038
- useEffect17(() => {
11014
+ useEffect15(() => {
11039
11015
  if (!hasRunRef.current && (show || autoTrigger) && onLoad) {
11040
11016
  getPaymentDetails();
11041
11017
  if (isPartial && !partialRef) {
@@ -11043,7 +11019,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11043
11019
  }
11044
11020
  }
11045
11021
  }, [show, autoTrigger, isPartial, onLoad]);
11046
- useEffect17(() => {
11022
+ useEffect15(() => {
11047
11023
  if ((show || autoTrigger) && pass_fee_amount) {
11048
11024
  let cashdisc = Number(amount) - Number(pass_fee_amount);
11049
11025
  if (cashdisc && !isNaN(cashdisc)) {
@@ -11105,7 +11081,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11105
11081
  console.error("3DS Auth failed \u274C", status);
11106
11082
  setError(`3DS Authentication ${status}`);
11107
11083
  };
11108
- useEffect17(() => {
11084
+ useEffect15(() => {
11109
11085
  if (setHandleCloseRef) {
11110
11086
  setHandleCloseRef(() => handleClose);
11111
11087
  }
@@ -11123,18 +11099,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11123
11099
  setPartialError("");
11124
11100
  }
11125
11101
  };
11126
- useEffect17(() => {
11102
+ useEffect15(() => {
11127
11103
  if (typeof FractalTokenizer === "undefined") return;
11128
11104
  const tokenizer = new FractalTokenizer({
11129
11105
  styles: {}
11130
11106
  });
11131
11107
  }, []);
11132
- const stateRef = useRef11({
11108
+ const stateRef = useRef10({
11133
11109
  activeinBank,
11134
11110
  activeinCard,
11135
11111
  activetab
11136
11112
  });
11137
- useEffect17(() => {
11113
+ useEffect15(() => {
11138
11114
  stateRef.current = {
11139
11115
  activeinBank,
11140
11116
  activeinCard,
@@ -11158,7 +11134,7 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11158
11134
  }
11159
11135
  }
11160
11136
  }, []);
11161
- useEffect17(() => {
11137
+ useEffect15(() => {
11162
11138
  onSubmit == null ? void 0 : onSubmit(submit);
11163
11139
  }, [onSubmit, submit]);
11164
11140
  function detectCardType(cardinput) {
@@ -11184,34 +11160,48 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11184
11160
  const cardType = detectCardType(cardInput);
11185
11161
  switch (cardType) {
11186
11162
  case "visa":
11187
- return /* @__PURE__ */ jsx37("img", { src: visa2, alt: "visa", width: 33 });
11163
+ return /* @__PURE__ */ jsx36("img", { src: visa2, alt: "visa", width: 33 });
11188
11164
  case "mastercard":
11189
- return /* @__PURE__ */ jsx37("img", { src: mastercard2, width: 33, alt: "mastercard" });
11165
+ return /* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "mastercard" });
11190
11166
  case "amex":
11191
- return /* @__PURE__ */ jsx37("img", { src: americanexp2, alt: "amex", width: 33 });
11167
+ return /* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "amex", width: 33 });
11192
11168
  case "discover":
11193
- return /* @__PURE__ */ jsx37("img", { src: discover2, width: 33, alt: "discover" });
11169
+ return /* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "discover" });
11194
11170
  case "diners":
11195
- return /* @__PURE__ */ jsx37("img", { src: dinersicon, alt: "Diners Club" });
11171
+ return /* @__PURE__ */ jsx36("img", { src: dinersicon, alt: "Diners Club" });
11196
11172
  case "jcb":
11197
- return /* @__PURE__ */ jsx37("img", { src: jcbicon, alt: "JCB" });
11173
+ return /* @__PURE__ */ jsx36("img", { src: jcbicon, alt: "JCB" });
11198
11174
  case "unionpay":
11199
- return /* @__PURE__ */ jsx37("img", { src: unionicon, alt: "UnionPay" });
11175
+ return /* @__PURE__ */ jsx36("img", { src: unionicon, alt: "UnionPay" });
11200
11176
  default:
11201
- return /* @__PURE__ */ jsx37("img", { src: defualtcardborder, alt: "card" });
11177
+ return /* @__PURE__ */ jsx36("img", { src: defualtcardborder, alt: "card" });
11202
11178
  }
11203
11179
  }
11204
- return /* @__PURE__ */ jsxs20(Fragment19, { children: [
11205
- (initialLoader || !onLoad) && /* @__PURE__ */ jsx37(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
11206
- error && /* @__PURE__ */ jsx37("div", { children: /* @__PURE__ */ jsx37(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
11207
- errorIframe && /* @__PURE__ */ jsx37("div", { children: /* @__PURE__ */ jsx37(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
11180
+ return /* @__PURE__ */ jsxs19(Fragment18, { children: [
11181
+ (initialLoader || !onLoad) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "dark", loading: initialLoader || !onLoad }),
11182
+ paymentGateway == 32 && /* @__PURE__ */ jsx36(FractalTokenizerScript, { onLoad: () => setTokenizerReady(true) }),
11183
+ paymentGateway == 31 && /* @__PURE__ */ jsx36(
11184
+ DataCapScriptLoader,
11185
+ {
11186
+ onReady: () => {
11187
+ console.log("SDK Ready");
11188
+ },
11189
+ onError: (err) => {
11190
+ setLoading(false);
11191
+ setLoadingIframe(false);
11192
+ setError(DcLoadingError);
11193
+ }
11194
+ }
11195
+ ),
11196
+ error && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error, onClose: handleClose, autoTrigger }) }),
11197
+ errorIframe && /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36(ErrorCardOverlay_default, { error: errorIframe, onClose: () => {
11208
11198
  setErrorIframe("");
11209
11199
  }, autoTrigger: onSubmit ? !onSubmit : autoTrigger }) }),
11210
- /* @__PURE__ */ jsxs20(Fragment19, { children: [
11211
- (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx37(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
11212
- /* @__PURE__ */ jsxs20("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
11213
- /* @__PURE__ */ jsx37("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
11214
- (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx37(
11200
+ /* @__PURE__ */ jsxs19(Fragment18, { children: [
11201
+ (loading || loading2 || loadingIframe) && /* @__PURE__ */ jsx36(Loader_default, { intensity: "light", loading: loading || loading2 || loadingPrev || orderLoader || loadingIframe }),
11202
+ /* @__PURE__ */ jsxs19("div", { className: "frac-card-payment-page frac-form frac-new-form", children: [
11203
+ /* @__PURE__ */ jsx36("div", { ref: threeDSContainerRef, style: { width: "100%", height: "100%" } }),
11204
+ (stripeResponse == null ? void 0 : stripeResponse.challenge_url) ? /* @__PURE__ */ jsx36(
11215
11205
  ThreeDSChallenge,
11216
11206
  {
11217
11207
  containerRef: threeDSContainerRef,
@@ -11221,33 +11211,33 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11221
11211
  onSuccess: handleSuccess,
11222
11212
  onError: handleError
11223
11213
  }
11224
- ) : /* @__PURE__ */ jsxs20("div", { className: "parent-pay-container", children: [
11225
- /* @__PURE__ */ jsx37("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs20("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
11226
- /* @__PURE__ */ jsx37("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx37("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
11227
- /* @__PURE__ */ jsx37("defs", { children: /* @__PURE__ */ jsx37("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx37("rect", { width: "16", height: "16", fill: "white" }) }) })
11214
+ ) : /* @__PURE__ */ jsxs19("div", { className: "parent-pay-container", children: [
11215
+ /* @__PURE__ */ jsx36("span", { style: { display: autoTrigger ? "none" : "block" }, className: "request-payment-close-popup", onClick: handleClose, children: /* @__PURE__ */ jsxs19("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
11216
+ /* @__PURE__ */ jsx36("g", { clipPath: "url(#clip0_12425_52336)", children: /* @__PURE__ */ jsx36("path", { d: "M9.46585 8.01168L15.6959 1.7814C16.1014 1.37615 16.1014 0.720912 15.6959 0.315659C15.2907 -0.0895946 14.6354 -0.0895946 14.2302 0.315659L7.99991 6.54593L1.76983 0.315659C1.36438 -0.0895946 0.709336 -0.0895946 0.304082 0.315659C-0.101361 0.720912 -0.101361 1.37615 0.304082 1.7814L6.53416 8.01168L0.304082 14.2419C-0.101361 14.6472 -0.101361 15.3024 0.304082 15.7077C0.506045 15.9098 0.771595 16.0114 1.03695 16.0114C1.30232 16.0114 1.56768 15.9098 1.76983 15.7077L7.99991 9.47742L14.2302 15.7077C14.4323 15.9098 14.6977 16.0114 14.9631 16.0114C15.2284 16.0114 15.4938 15.9098 15.6959 15.7077C16.1014 15.3024 16.1014 14.6472 15.6959 14.2419L9.46585 8.01168Z", fill: "#727272" }) }),
11217
+ /* @__PURE__ */ jsx36("defs", { children: /* @__PURE__ */ jsx36("clipPath", { id: "clip0_12425_52336", children: /* @__PURE__ */ jsx36("rect", { width: "16", height: "16", fill: "white" }) }) })
11228
11218
  ] }) }),
11229
- /* @__PURE__ */ jsx37("div", { className: "pay-main-logo-res" }),
11230
- /* @__PURE__ */ jsxs20("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
11231
- !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "pay-header pay-conatiner-one", children: [
11232
- /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-first", children: [
11233
- /* @__PURE__ */ jsxs20("div", { className: "pay-logo-container", children: [
11234
- /* @__PURE__ */ jsx37("div", { className: "pay-main-logo" }),
11235
- /* @__PURE__ */ jsx37("h1", { className: "pay-heading", children: "Pay" }),
11236
- (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs20("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
11219
+ /* @__PURE__ */ jsx36("div", { className: "pay-main-logo-res" }),
11220
+ /* @__PURE__ */ jsxs19("div", { className: onSubmit ? "pay-container frac-pay-container " : "pay-container", children: [
11221
+ !onSubmit && /* @__PURE__ */ jsxs19("div", { className: "pay-header pay-conatiner-one", children: [
11222
+ /* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-first", children: [
11223
+ /* @__PURE__ */ jsxs19("div", { className: "pay-logo-container", children: [
11224
+ /* @__PURE__ */ jsx36("div", { className: "pay-main-logo" }),
11225
+ /* @__PURE__ */ jsx36("h1", { className: "pay-heading", children: "Pay" }),
11226
+ (cardList == null ? void 0 : cardList.length) > 0 && activetab !== "cardList" && /* @__PURE__ */ jsxs19("button", { className: "res-charge-payment-back-btn ", onClick: () => setActive("cardList"), children: [
11237
11227
  " ",
11238
- /* @__PURE__ */ jsx37(IoArrowBack2, {}),
11228
+ /* @__PURE__ */ jsx36(IoArrowBack2, {}),
11239
11229
  " Back"
11240
11230
  ] })
11241
11231
  ] }),
11242
- /* @__PURE__ */ jsx37("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
11243
- /* @__PURE__ */ jsx37("small", { className: "pay-payment-amount", children: "Select payment type" }),
11244
- /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
11245
- /* @__PURE__ */ jsx37(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11246
- !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx37(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11232
+ /* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs19("div", { className: "pay-amount-conatiner", children: [
11233
+ /* @__PURE__ */ jsx36("small", { className: "pay-payment-amount", children: "Select payment type" }),
11234
+ /* @__PURE__ */ jsxs19("div", { className: "frac-card-bank-radio-main", children: [
11235
+ /* @__PURE__ */ jsx36(CardBankRadio, { label: "Card", amount: (_a = Number(amount)) == null ? void 0 : _a.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11236
+ !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx36(CardBankRadio, { label: "Bank", amount: (_b = Number(bankAmount)) == null ? void 0 : _b.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11247
11237
  ] }),
11248
- isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
11249
- /* @__PURE__ */ jsx37("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11250
- /* @__PURE__ */ jsx37(
11238
+ isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
11239
+ /* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11240
+ /* @__PURE__ */ jsx36(
11251
11241
  NumericFormat2,
11252
11242
  {
11253
11243
  prefix: "$",
@@ -11271,25 +11261,25 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11271
11261
  }
11272
11262
  }
11273
11263
  ),
11274
- partialError && /* @__PURE__ */ jsx37("span", { className: "error-span", children: partialError })
11264
+ partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
11275
11265
  ] })
11276
11266
  ] }) })
11277
11267
  ] }),
11278
- /* @__PURE__ */ jsxs20("div", { className: "pay-conatiner-one-last", children: [
11279
- /* @__PURE__ */ jsx37("img", { src: secure2, alt: "" }),
11280
- /* @__PURE__ */ jsx37("img", { src: pov2, alt: "" }),
11268
+ /* @__PURE__ */ jsxs19("div", { className: "pay-conatiner-one-last", children: [
11269
+ /* @__PURE__ */ jsx36("img", { src: secure2, alt: "" }),
11270
+ /* @__PURE__ */ jsx36("img", { src: pov2, alt: "" }),
11281
11271
  "Secure payments powered by Fractal"
11282
11272
  ] })
11283
11273
  ] }),
11284
- /* @__PURE__ */ jsx37("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx37("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs20("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
11285
- onSubmit && /* @__PURE__ */ jsx37("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs20("div", { className: "pay-amount-conatiner", children: [
11286
- /* @__PURE__ */ jsxs20("div", { className: "frac-card-bank-radio-main", children: [
11287
- /* @__PURE__ */ jsx37(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11288
- !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx37(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11274
+ /* @__PURE__ */ jsx36("div", { className: "pay-tab pay-conatiner-two", children: /* @__PURE__ */ jsx36("div", { className: "col-md-12", children: /* @__PURE__ */ jsxs19("div", { id: "payment-form-div ", className: onSubmit ? "frac-payment-form-div" : "", children: [
11275
+ onSubmit && /* @__PURE__ */ jsx36("div", { className: "amt-pay-con", children: /* @__PURE__ */ jsxs19("div", { className: "pay-amount-conatiner", children: [
11276
+ /* @__PURE__ */ jsxs19("div", { className: "frac-card-bank-radio-main", children: [
11277
+ /* @__PURE__ */ jsx36(CardBankRadio, { skydesign: true, label: "Card", amount: (_c = Number(amount)) == null ? void 0 : _c.toFixed(2), value: "card", onChange: handletabchange, activetab }),
11278
+ !isPreAuth && isBankActive && !isPartial && /* @__PURE__ */ jsx36(CardBankRadio, { skydesign: true, label: "Bank", amount: (_d = Number(bankAmount)) == null ? void 0 : _d.toFixed(2), value: "ach", onChange: handletabchange, activetab, savingsText: bankSavingsText })
11289
11279
  ] }),
11290
- isPartial && /* @__PURE__ */ jsxs20("div", { className: "frac-partial-payment-input", children: [
11291
- /* @__PURE__ */ jsx37("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11292
- /* @__PURE__ */ jsx37(
11280
+ isPartial && /* @__PURE__ */ jsxs19("div", { className: "frac-partial-payment-input", children: [
11281
+ /* @__PURE__ */ jsx36("label", { htmlFor: "partialpayment", children: "Partial Payment" }),
11282
+ /* @__PURE__ */ jsx36(
11293
11283
  NumericFormat2,
11294
11284
  {
11295
11285
  prefix: "$",
@@ -11306,34 +11296,34 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11306
11296
  fixedDecimalScale: true
11307
11297
  }
11308
11298
  ),
11309
- partialError && /* @__PURE__ */ jsx37("span", { className: "error-span", children: partialError })
11299
+ partialError && /* @__PURE__ */ jsx36("span", { className: "error-span", children: partialError })
11310
11300
  ] })
11311
11301
  ] }) }),
11312
- is3DSEnable ? clientSecret && /* @__PURE__ */ jsx37(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs20(Fragment19, { children: [
11313
- /* @__PURE__ */ jsxs20("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
11314
- !onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11315
- /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
11316
- /* @__PURE__ */ jsx37("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs20("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
11302
+ is3DSEnable ? clientSecret && /* @__PURE__ */ jsx36(CheckoutWrapper, { onSuccess, clientSecret, amount, showLoader, hideLoader, callback, session_token, handleClose, setError, isPreAuth }) : /* @__PURE__ */ jsxs19(Fragment18, { children: [
11303
+ /* @__PURE__ */ jsxs19("div", { id: "ach", style: { display: activetab === "card" ? "block" : "none" }, className: "tabcontent", children: [
11304
+ !onSubmit && /* @__PURE__ */ jsxs19(Fragment18, { children: [
11305
+ /* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
11306
+ /* @__PURE__ */ jsx36("div", { className: "frac-backarrow", children: (cardList == null ? void 0 : cardList.length) > 0 && activeinCard === "form" && /* @__PURE__ */ jsxs19("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinCard("list"), children: [
11317
11307
  " ",
11318
- /* @__PURE__ */ jsx37(IoArrowBack2, {})
11308
+ /* @__PURE__ */ jsx36(IoArrowBack2, {})
11319
11309
  ] }) }),
11320
- /* @__PURE__ */ jsx37("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
11310
+ /* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Card Payment" })
11321
11311
  ] }),
11322
- /* @__PURE__ */ jsxs20("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
11323
- /* @__PURE__ */ jsx37("img", { src: visa2, alt: "", width: 33 }),
11324
- /* @__PURE__ */ jsx37("img", { src: mastercard2, width: 33, alt: "" }),
11325
- /* @__PURE__ */ jsx37("img", { src: americanexp2, alt: "", width: 33 }),
11326
- /* @__PURE__ */ jsx37("img", { src: discover2, width: 33, alt: "" })
11312
+ /* @__PURE__ */ jsxs19("div", { style: { display: "flex", gap: "8px", margin: "8px 0px 19px 0px" }, children: [
11313
+ /* @__PURE__ */ jsx36("img", { src: visa2, alt: "", width: 33 }),
11314
+ /* @__PURE__ */ jsx36("img", { src: mastercard2, width: 33, alt: "" }),
11315
+ /* @__PURE__ */ jsx36("img", { src: americanexp2, alt: "", width: 33 }),
11316
+ /* @__PURE__ */ jsx36("img", { src: discover2, width: 33, alt: "" })
11327
11317
  ] })
11328
11318
  ] }),
11329
- activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11330
- /* @__PURE__ */ jsx37(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
11319
+ activeinCard === "list" && (cardList == null ? void 0 : cardList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
11320
+ /* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Card", ListItems: cardList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Card", otherButtonAction: () => {
11331
11321
  setActiveinCard("form");
11332
11322
  } }),
11333
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx37("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_e = Number(partialAmount)) == null ? void 0 : _e.toFixed(2)) : formatUSD((_f = Number(amount)) == null ? void 0 : _f.toFixed(2)) }) })
11334
- ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11335
- onSubmit && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11336
- /* @__PURE__ */ jsx37(
11323
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx36("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: partialAmount ? formatUSD((_e = Number(partialAmount)) == null ? void 0 : _e.toFixed(2)) : formatUSD((_f = Number(amount)) == null ? void 0 : _f.toFixed(2)) }) })
11324
+ ] }) : paymentGateway == 32 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
11325
+ onSubmit && /* @__PURE__ */ jsxs19(Fragment18, { children: [
11326
+ /* @__PURE__ */ jsx36(
11337
11327
  ApplePayButton,
11338
11328
  {
11339
11329
  applePayAmount: partialAmount ? partialAmount : amount,
@@ -11343,40 +11333,28 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11343
11333
  showLoader
11344
11334
  }
11345
11335
  ),
11346
- /* @__PURE__ */ jsx37(
11347
- GooglePayComponent,
11348
- {
11349
- amount: partialAmount ? partialAmount : amount,
11350
- googlePayEnvironment,
11351
- googlePayGatewayMerchantId,
11352
- googlePayMerchantId,
11353
- googlePayMerchantName: merchantName,
11354
- completeFractalFlow,
11355
- setLoading
11356
- }
11357
- ),
11358
- /* @__PURE__ */ jsx37("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx37("span", { children: "or" }) })
11336
+ /* @__PURE__ */ jsx36("div", { id: "digital-wallet-or", className: "frac-or", children: /* @__PURE__ */ jsx36("span", { children: "or" }) })
11359
11337
  ] }),
11360
- /* @__PURE__ */ jsxs20("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11338
+ /* @__PURE__ */ jsxs19("form", { id: "paymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11361
11339
  if (e.key === "Enter" && loading) {
11362
11340
  e.preventDefault();
11363
11341
  e.stopPropagation();
11364
11342
  }
11365
11343
  }, children: [
11366
- /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11367
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11368
- /* @__PURE__ */ jsx37("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11369
- /* @__PURE__ */ jsx37("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11344
+ /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11345
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11346
+ /* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11347
+ /* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11370
11348
  const value = e.target.value;
11371
11349
  if (/^[a-zA-Z\s]*$/.test(value)) {
11372
11350
  handleCardChange("cardName", value);
11373
11351
  }
11374
11352
  } }),
11375
- (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11353
+ (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11376
11354
  ] }),
11377
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11378
- /* @__PURE__ */ jsx37("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
11379
- /* @__PURE__ */ jsx37("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && /* @__PURE__ */ jsx37(
11355
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11356
+ /* @__PURE__ */ jsx36("label", { htmlFor: "cardNumber", children: "CARD NUMBER" }),
11357
+ /* @__PURE__ */ jsx36("div", { className: "toggle-num-wrapper toggle-num-wrapper-new", children: (show || autoTrigger) && paymentGateway === 32 && isTokenizerReady && /* @__PURE__ */ jsx36(
11380
11358
  FractalFields_default,
11381
11359
  {
11382
11360
  fractalStyles,
@@ -11385,18 +11363,18 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11385
11363
  }
11386
11364
  ) })
11387
11365
  ] }),
11388
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11389
- /* @__PURE__ */ jsx37("label", { htmlFor: "zip", children: "ZIP" }),
11390
- /* @__PURE__ */ jsx37("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_g = cardData == null ? void 0 : cardData.zipCode) != null ? _g : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
11391
- (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11392
- pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11366
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11367
+ /* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
11368
+ /* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_g = cardData == null ? void 0 : cardData.zipCode) != null ? _g : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
11369
+ (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11370
+ pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs19("small", { className: "frac-fee-text", children: [
11393
11371
  "Cards include a fee amount of ",
11394
- /* @__PURE__ */ jsx37("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11372
+ /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11395
11373
  "."
11396
11374
  ] })
11397
11375
  ] }),
11398
- customerId && /* @__PURE__ */ jsx37("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11399
- /* @__PURE__ */ jsx37(
11376
+ customerId && /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11377
+ /* @__PURE__ */ jsx36(
11400
11378
  "input",
11401
11379
  {
11402
11380
  type: "checkbox",
@@ -11406,10 +11384,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11406
11384
  onChange: (e) => setSaveCardInfo(e.target.checked)
11407
11385
  }
11408
11386
  ),
11409
- /* @__PURE__ */ jsx37("label", { htmlFor: "save_card", className: "toggle-label" }),
11410
- /* @__PURE__ */ jsx37("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11411
- /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11412
- /* @__PURE__ */ jsx37("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11387
+ /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
11388
+ /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11389
+ /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
11390
+ /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
11413
11391
  "svg",
11414
11392
  {
11415
11393
  xmlns: "http://www.w3.org/2000/svg",
@@ -11418,8 +11396,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11418
11396
  viewBox: "0 0 20 20",
11419
11397
  fill: "none",
11420
11398
  children: [
11421
- /* @__PURE__ */ jsx37("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11422
- /* @__PURE__ */ jsx37(
11399
+ /* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11400
+ /* @__PURE__ */ jsx36(
11423
11401
  "path",
11424
11402
  {
11425
11403
  d: "M9.03406 12.0979V12.0072C9.04055 11.4153 9.10057 10.9443 9.21411 10.5943C9.3309 10.2442 9.49635 9.96102 9.71046 9.74463C9.92457 9.52824 10.1825 9.33095 10.4842 9.15274C10.6788 9.03182 10.854 8.89658 11.0097 8.74702C11.1655 8.59745 11.2887 8.42562 11.3796 8.2315C11.4704 8.03739 11.5158 7.82259 11.5158 7.58711C11.5158 7.3039 11.4477 7.05887 11.3114 6.85203C11.1752 6.64519 10.9935 6.48608 10.7664 6.3747C10.5426 6.26014 10.2928 6.20286 10.017 6.20286C9.76723 6.20286 9.52879 6.25378 9.3017 6.35561C9.07461 6.45744 8.88646 6.61655 8.73723 6.83294C8.588 7.04614 8.50203 7.3214 8.47932 7.65871H7C7.02271 7.08592 7.17032 6.60223 7.44282 6.20764C7.71533 5.80986 8.07543 5.50915 8.52311 5.30549C8.97405 5.10183 9.47202 5 10.017 5C10.6139 5 11.1363 5.10979 11.5839 5.32936C12.0316 5.54574 12.3788 5.84964 12.6253 6.24105C12.8751 6.62928 13 7.08274 13 7.60143C13 7.95784 12.9432 8.27924 12.8297 8.56563C12.7161 8.84885 12.5539 9.10183 12.3431 9.32458C12.1354 9.54733 11.8856 9.74463 11.5937 9.91647C11.3179 10.0851 11.0941 10.2601 10.9221 10.4415C10.7534 10.6229 10.6302 10.8377 10.5523 11.0859C10.4745 11.3341 10.4323 11.6412 10.4258 12.0072V12.0979H9.03406ZM9.76886 15C9.50284 15 9.27413 14.9077 9.08273 14.7232C8.89132 14.5354 8.79562 14.3095 8.79562 14.0453C8.79562 13.7844 8.89132 13.5617 9.08273 13.3771C9.27413 13.1893 9.50284 13.0955 9.76886 13.0955C10.0316 13.0955 10.2587 13.1893 10.4501 13.3771C10.6448 13.5617 10.7421 13.7844 10.7421 14.0453C10.7421 14.2204 10.6967 14.3811 10.6058 14.5274C10.5182 14.6706 10.4015 14.7852 10.2555 14.8711C10.1095 14.957 9.94728 15 9.76886 15Z",
@@ -11429,55 +11407,55 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11429
11407
  ]
11430
11408
  }
11431
11409
  ) }),
11432
- /* @__PURE__ */ jsx37("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11410
+ /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
11433
11411
  "If checked, I agree to give the ",
11434
- /* @__PURE__ */ jsx37("b", { children: merchantName || "merchant" }),
11412
+ /* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
11435
11413
  " permission to charge this credit card for agreed-upon purchases in the future."
11436
11414
  ] }) })
11437
11415
  ] })
11438
11416
  ] }) })
11439
11417
  ] }),
11440
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx37("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_h = Number(partialAmount)) == null ? void 0 : _h.toFixed(2)) : formatUSD((_i = Number(amount)) == null ? void 0 : _i.toFixed(2)) }) })
11418
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx36("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_h = Number(partialAmount)) == null ? void 0 : _h.toFixed(2)) : formatUSD((_i = Number(amount)) == null ? void 0 : _i.toFixed(2)) }) })
11441
11419
  ] })
11442
- ] }) : /* @__PURE__ */ jsxs20("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11420
+ ] }) : /* @__PURE__ */ jsxs19("form", { id: "PaymentForm", style: { textAlign: "start" }, ref: cardFormRef, onSubmit: submitFunc, onKeyDown: (e) => {
11443
11421
  if (e.key === "Enter" && loading) {
11444
11422
  e.preventDefault();
11445
11423
  e.stopPropagation();
11446
11424
  }
11447
11425
  }, children: [
11448
- /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11449
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11450
- /* @__PURE__ */ jsx37("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11451
- /* @__PURE__ */ jsx37("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11426
+ /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: { minHeight: "398px", maxHeight: "398px", overflow: "auto", marginRight: "5px" }, children: [
11427
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11428
+ /* @__PURE__ */ jsx36("label", { htmlFor: "cardHolderName", children: "NAME ON CARD " }),
11429
+ /* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", value: (cardData == null ? void 0 : cardData.cardName) || "", onChange: (e) => {
11452
11430
  const value = e.target.value;
11453
11431
  if (/^[a-zA-Z\s]*$/.test(value)) {
11454
11432
  handleCardChange("cardName", value);
11455
11433
  }
11456
11434
  } }),
11457
- (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11435
+ (cardError == null ? void 0 : cardError.cardName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.cardName })
11458
11436
  ] }),
11459
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx37(
11437
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsx36(
11460
11438
  DataCapFields,
11461
11439
  {
11462
11440
  isOpen: show || autoTrigger,
11463
11441
  tokenKey: dcToken,
11464
11442
  setLoader: activeinCard === "form" ? setLoadingIframe : null,
11465
11443
  isEmbedded: onSubmit ? true : false,
11466
- customCSS: customCSS2
11444
+ customCSS
11467
11445
  }
11468
11446
  ) }),
11469
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11470
- /* @__PURE__ */ jsx37("label", { htmlFor: "zip", children: "ZIP" }),
11471
- /* @__PURE__ */ jsx37("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_j = cardData == null ? void 0 : cardData.zipCode) != null ? _j : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
11472
- (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11473
- pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11447
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11448
+ /* @__PURE__ */ jsx36("label", { htmlFor: "zip", children: "ZIP" }),
11449
+ /* @__PURE__ */ jsx36("input", { type: "text", className: "form-control-frac", maxLength: 100, placeholder: "000000", value: (_j = cardData == null ? void 0 : cardData.zipCode) != null ? _j : "", onChange: (e) => handleCardChange("zipCode", e.target.value) }),
11450
+ (cardError == null ? void 0 : cardError.zipCode) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: cardError == null ? void 0 : cardError.zipCode }),
11451
+ pass_fee && cardFeeAmount > 0 && /* @__PURE__ */ jsxs19("small", { className: "frac-fee-text", children: [
11474
11452
  "Cards include a fee amount of ",
11475
- /* @__PURE__ */ jsx37("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11453
+ /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(cardFeeAmount.toFixed(2)) }),
11476
11454
  "."
11477
11455
  ] })
11478
11456
  ] }),
11479
- customerId && /* @__PURE__ */ jsx37("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11480
- /* @__PURE__ */ jsx37(
11457
+ customerId && /* @__PURE__ */ jsx36("div", { className: "form-group-frac", children: /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-mn", style: { display: "flex", alignItems: "center", gap: "10px", paddingTop: "10px" }, children: [
11458
+ /* @__PURE__ */ jsx36(
11481
11459
  "input",
11482
11460
  {
11483
11461
  type: "checkbox",
@@ -11487,10 +11465,10 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11487
11465
  onChange: (e) => setSaveCardInfo(e.target.checked)
11488
11466
  }
11489
11467
  ),
11490
- /* @__PURE__ */ jsx37("label", { htmlFor: "save_card", className: "toggle-label" }),
11491
- /* @__PURE__ */ jsx37("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11492
- /* @__PURE__ */ jsxs20("div", { className: "frac-tooltip-wrapper", children: [
11493
- /* @__PURE__ */ jsx37("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs20(
11468
+ /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", className: "toggle-label" }),
11469
+ /* @__PURE__ */ jsx36("label", { htmlFor: "save_card", children: "Save card for future payments " }),
11470
+ /* @__PURE__ */ jsxs19("div", { className: "frac-tooltip-wrapper", children: [
11471
+ /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-icon", children: /* @__PURE__ */ jsxs19(
11494
11472
  "svg",
11495
11473
  {
11496
11474
  xmlns: "http://www.w3.org/2000/svg",
@@ -11499,8 +11477,8 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11499
11477
  viewBox: "0 0 20 20",
11500
11478
  fill: "none",
11501
11479
  children: [
11502
- /* @__PURE__ */ jsx37("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11503
- /* @__PURE__ */ jsx37(
11480
+ /* @__PURE__ */ jsx36("circle", { cx: "10", cy: "10", r: "10", fill: "#E0DFE2" }),
11481
+ /* @__PURE__ */ jsx36(
11504
11482
  "path",
11505
11483
  {
11506
11484
  d: "M9.03406 12.0979V12.0072C9.04055 11.4153 9.10057 10.9443 9.21411 10.5943C9.3309 10.2442 9.49635 9.96102 9.71046 9.74463C9.92457 9.52824 10.1825 9.33095 10.4842 9.15274C10.6788 9.03182 10.854 8.89658 11.0097 8.74702C11.1655 8.59745 11.2887 8.42562 11.3796 8.2315C11.4704 8.03739 11.5158 7.82259 11.5158 7.58711C11.5158 7.3039 11.4477 7.05887 11.3114 6.85203C11.1752 6.64519 10.9935 6.48608 10.7664 6.3747C10.5426 6.26014 10.2928 6.20286 10.017 6.20286C9.76723 6.20286 9.52879 6.25378 9.3017 6.35561C9.07461 6.45744 8.88646 6.61655 8.73723 6.83294C8.588 7.04614 8.50203 7.3214 8.47932 7.65871H7C7.02271 7.08592 7.17032 6.60223 7.44282 6.20764C7.71533 5.80986 8.07543 5.50915 8.52311 5.30549C8.97405 5.10183 9.47202 5 10.017 5C10.6139 5 11.1363 5.10979 11.5839 5.32936C12.0316 5.54574 12.3788 5.84964 12.6253 6.24105C12.8751 6.62928 13 7.08274 13 7.60143C13 7.95784 12.9432 8.27924 12.8297 8.56563C12.7161 8.84885 12.5539 9.10183 12.3431 9.32458C12.1354 9.54733 11.8856 9.74463 11.5937 9.91647C11.3179 10.0851 11.0941 10.2601 10.9221 10.4415C10.7534 10.6229 10.6302 10.8377 10.5523 11.0859C10.4745 11.3341 10.4323 11.6412 10.4258 12.0072V12.0979H9.03406ZM9.76886 15C9.50284 15 9.27413 14.9077 9.08273 14.7232C8.89132 14.5354 8.79562 14.3095 8.79562 14.0453C8.79562 13.7844 8.89132 13.5617 9.08273 13.3771C9.27413 13.1893 9.50284 13.0955 9.76886 13.0955C10.0316 13.0955 10.2587 13.1893 10.4501 13.3771C10.6448 13.5617 10.7421 13.7844 10.7421 14.0453C10.7421 14.2204 10.6967 14.3811 10.6058 14.5274C10.5182 14.6706 10.4015 14.7852 10.2555 14.8711C10.1095 14.957 9.94728 15 9.76886 15Z",
@@ -11510,48 +11488,48 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11510
11488
  ]
11511
11489
  }
11512
11490
  ) }),
11513
- /* @__PURE__ */ jsx37("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs20("p", { children: [
11491
+ /* @__PURE__ */ jsx36("div", { className: "frac-tooltip-text", children: /* @__PURE__ */ jsxs19("p", { children: [
11514
11492
  "If checked, I agree to give the ",
11515
- /* @__PURE__ */ jsx37("b", { children: merchantName || "merchant" }),
11493
+ /* @__PURE__ */ jsx36("b", { children: merchantName || "merchant" }),
11516
11494
  " permission to charge this credit card for agreed-upon purchases in the future."
11517
11495
  ] }) })
11518
11496
  ] })
11519
11497
  ] }) })
11520
11498
  ] }),
11521
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx37("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_k = Number(partialAmount)) == null ? void 0 : _k.toFixed(2)) : formatUSD((_l = Number(amount)) == null ? void 0 : _l.toFixed(2)) }) })
11499
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { marginTop: "20px", padding: "0" }, children: /* @__PURE__ */ jsx36("button", { type: "submit", style: { margin: 0, display: onSubmit ? "none" : "block" }, className: "pay-button", children: partialAmount ? formatUSD((_k = Number(partialAmount)) == null ? void 0 : _k.toFixed(2)) : formatUSD((_l = Number(amount)) == null ? void 0 : _l.toFixed(2)) }) })
11522
11500
  ] })
11523
11501
  ] }),
11524
- /* @__PURE__ */ jsx37("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs20(Fragment19, { children: [
11525
- !onSubmit && /* @__PURE__ */ jsxs20("div", { className: "frac-heading-card-wrap", children: [
11526
- /* @__PURE__ */ jsx37("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs20("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
11502
+ /* @__PURE__ */ jsx36("div", { id: "ach", style: { display: activetab === "ach" ? "block" : "none" }, className: "tabcontent", children: /* @__PURE__ */ jsxs19(Fragment18, { children: [
11503
+ !onSubmit && /* @__PURE__ */ jsxs19("div", { className: "frac-heading-card-wrap", children: [
11504
+ /* @__PURE__ */ jsx36("div", { className: "frac-backarrow", children: (bankList == null ? void 0 : bankList.length) > 0 && activeinBank === "form" && /* @__PURE__ */ jsxs19("button", { className: "charge-payment-back-btn ", onClick: () => setActiveinBank("list"), children: [
11527
11505
  " ",
11528
- /* @__PURE__ */ jsx37(IoArrowBack2, {})
11506
+ /* @__PURE__ */ jsx36(IoArrowBack2, {})
11529
11507
  ] }) }),
11530
- /* @__PURE__ */ jsx37("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
11508
+ /* @__PURE__ */ jsx36("h6", { className: "frac-card-payment-heading", children: "Bank Payment" })
11531
11509
  ] }),
11532
- activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs20(Fragment19, { children: [
11533
- /* @__PURE__ */ jsx37(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
11510
+ activeinBank === "list" && (bankList == null ? void 0 : bankList.length) > 0 ? /* @__PURE__ */ jsxs19(Fragment18, { children: [
11511
+ /* @__PURE__ */ jsx36(CardList, { headingClass: "card-ach-heading-frac", listHeading: "Banks", ListItems: bankList, selectedCard, setSelectedCard, handleDeleteCard, otherButtonLabel: "Pay With Other Bank", otherButtonAction: () => {
11534
11512
  setActiveinBank("form");
11535
11513
  } }),
11536
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx37("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
11537
- ] }) : /* @__PURE__ */ jsxs20("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11514
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac", style: { padding: "0", display: onSubmit ? "none" : "block" }, children: /* @__PURE__ */ jsx36("button", { className: "pay-button", style: { margin: "0px" }, type: "submit", onClick: handlechargeCustomer, children: formatUSD((_m = Number(bankAmount)) == null ? void 0 : _m.toFixed(2)) }) })
11515
+ ] }) : /* @__PURE__ */ jsxs19("form", { id: "ACHPaymentForm", style: { textAlign: "start" }, ref: bankFormRef, onSubmit: submitFunc, autoComplete: "off", onKeyDown: (e) => {
11538
11516
  if (e.key === "Enter" && loading) {
11539
11517
  e.preventDefault();
11540
11518
  e.stopPropagation();
11541
11519
  }
11542
11520
  }, children: [
11543
- /* @__PURE__ */ jsxs20("div", { className: "ach-scrl", style: {
11521
+ /* @__PURE__ */ jsxs19("div", { className: "ach-scrl", style: {
11544
11522
  minHeight: "444px",
11545
11523
  maxHeight: "444px"
11546
11524
  }, children: [
11547
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11548
- /* @__PURE__ */ jsx37("label", { htmlFor: "nameonaccount", children: "Name on account" }),
11549
- /* @__PURE__ */ jsx37("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_n = achData == null ? void 0 : achData.name) != null ? _n : "", onChange: handleChangeAch }),
11550
- (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
11525
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11526
+ /* @__PURE__ */ jsx36("label", { htmlFor: "nameonaccount", children: "Name on account" }),
11527
+ /* @__PURE__ */ jsx36("input", { type: "text", id: "nameonaccount", className: "form-control-frac", maxLength: 100, placeholder: "John Doe", name: "name", value: (_n = achData == null ? void 0 : achData.name) != null ? _n : "", onChange: handleChangeAch }),
11528
+ (achError == null ? void 0 : achError.name) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.name })
11551
11529
  ] }),
11552
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11553
- /* @__PURE__ */ jsx37("label", { htmlFor: "routingnumber", children: "Routing number" }),
11554
- /* @__PURE__ */ jsx37(
11530
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11531
+ /* @__PURE__ */ jsx36("label", { htmlFor: "routingnumber", children: "Routing number" }),
11532
+ /* @__PURE__ */ jsx36(
11555
11533
  "input",
11556
11534
  {
11557
11535
  type: "text",
@@ -11564,11 +11542,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11564
11542
  onChange: handleChangeAch
11565
11543
  }
11566
11544
  ),
11567
- (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
11545
+ (achError == null ? void 0 : achError.routingNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.routingNumber })
11568
11546
  ] }),
11569
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11570
- /* @__PURE__ */ jsx37("label", { htmlFor: "accountnumber", children: "Account number" }),
11571
- /* @__PURE__ */ jsx37(
11547
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11548
+ /* @__PURE__ */ jsx36("label", { htmlFor: "accountnumber", children: "Account number" }),
11549
+ /* @__PURE__ */ jsx36(
11572
11550
  "input",
11573
11551
  {
11574
11552
  type: "text",
@@ -11581,11 +11559,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11581
11559
  onChange: handleChangeAch
11582
11560
  }
11583
11561
  ),
11584
- (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
11562
+ (achError == null ? void 0 : achError.accountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.accountNumber })
11585
11563
  ] }),
11586
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11587
- /* @__PURE__ */ jsx37("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
11588
- /* @__PURE__ */ jsx37(
11564
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11565
+ /* @__PURE__ */ jsx36("label", { htmlFor: "confirmaccountnumber", children: "Confirm account number" }),
11566
+ /* @__PURE__ */ jsx36(
11589
11567
  "input",
11590
11568
  {
11591
11569
  type: "text",
@@ -11598,11 +11576,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11598
11576
  onChange: handleChangeAch
11599
11577
  }
11600
11578
  ),
11601
- (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
11579
+ (achError == null ? void 0 : achError.confirmAccountNumber) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.confirmAccountNumber })
11602
11580
  ] }),
11603
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11604
- /* @__PURE__ */ jsx37("label", { htmlFor: "bankname", children: "Bank name" }),
11605
- /* @__PURE__ */ jsx37(
11581
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11582
+ /* @__PURE__ */ jsx36("label", { htmlFor: "bankname", children: "Bank name" }),
11583
+ /* @__PURE__ */ jsx36(
11606
11584
  "input",
11607
11585
  {
11608
11586
  type: "text",
@@ -11615,11 +11593,11 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11615
11593
  onChange: handleChangeAch
11616
11594
  }
11617
11595
  ),
11618
- (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
11596
+ (achError == null ? void 0 : achError.bankName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.bankName })
11619
11597
  ] }),
11620
- ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11621
- /* @__PURE__ */ jsx37("label", { htmlFor: "companyName", children: "Company name" }),
11622
- /* @__PURE__ */ jsx37(
11598
+ ((achData == null ? void 0 : achData.accountType) === "business saving" || (achData == null ? void 0 : achData.accountType) === "business checking") && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11599
+ /* @__PURE__ */ jsx36("label", { htmlFor: "companyName", children: "Company name" }),
11600
+ /* @__PURE__ */ jsx36(
11623
11601
  "input",
11624
11602
  {
11625
11603
  type: "text",
@@ -11632,60 +11610,60 @@ var ModelContentSky = ({ amount, bankAmount, submitBtnText = "Pay", session_toke
11632
11610
  onChange: handleChangeAch
11633
11611
  }
11634
11612
  ),
11635
- (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx37("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
11613
+ (achError == null ? void 0 : achError.companyName) && /* @__PURE__ */ jsx36("span", { className: "error-span", children: achError == null ? void 0 : achError.companyName })
11636
11614
  ] }),
11637
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac", children: [
11638
- /* @__PURE__ */ jsx37("label", { htmlFor: "accounttype", children: "Select account type" }),
11639
- /* @__PURE__ */ jsxs20("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
11640
- /* @__PURE__ */ jsx37("option", { value: "", children: "Select account" }),
11641
- accountTypes.map((type) => /* @__PURE__ */ jsx37("option", { value: type.value, children: type.label }, type.value))
11615
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac", children: [
11616
+ /* @__PURE__ */ jsx36("label", { htmlFor: "accounttype", children: "Select account type" }),
11617
+ /* @__PURE__ */ jsxs19("select", { name: "accountType", id: "accounttype", className: "form-control-frac", value: (_t = achData == null ? void 0 : achData.accountType) != null ? _t : "", onChange: handleChangeAch, children: [
11618
+ /* @__PURE__ */ jsx36("option", { value: "", children: "Select account" }),
11619
+ accountTypes.map((type) => /* @__PURE__ */ jsx36("option", { value: type.value, children: type.label }, type.value))
11642
11620
  ] }),
11643
- bankFeeAmount > 0 && /* @__PURE__ */ jsxs20("small", { className: "frac-fee-text", children: [
11621
+ bankFeeAmount > 0 && /* @__PURE__ */ jsxs19("small", { className: "frac-fee-text", children: [
11644
11622
  "There is a processing fee of ",
11645
- /* @__PURE__ */ jsx37("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
11623
+ /* @__PURE__ */ jsx36("span", { className: "frac-fee-amount", children: formatUSD(bankFeeAmount.toFixed(2)) }),
11646
11624
  "."
11647
11625
  ] }),
11648
- !saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11649
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11650
- /* @__PURE__ */ jsx37("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
11626
+ !saveACHinfo && /* @__PURE__ */ jsxs19(Fragment18, { children: [
11627
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11628
+ /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "achconsent", className: "", checked: isBankConsentChecked, onChange: (e) => {
11651
11629
  setIsBankConsentChecked(e.target.checked);
11652
11630
  if (e.target.checked) {
11653
11631
  setErrorBankConsent("");
11654
11632
  }
11655
11633
  } }),
11656
- /* @__PURE__ */ jsx37("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
11634
+ /* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "achconsent", children: `By selecting this box, I authorize SkyFi, on behalf of ${merchantName || "merchant"}, to initiate a one-time electronic ACH debit from my bank account for the total amount displayed on this screen, including any applicable processing fee. I confirm that I am authorized to use this account and that the bank account information I provided is correct.` })
11657
11635
  ] }),
11658
- errorBankConsent && /* @__PURE__ */ jsx37("span", { className: "error-span", children: errorBankConsent })
11636
+ errorBankConsent && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsent })
11659
11637
  ] }),
11660
- customerId && /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11661
- /* @__PURE__ */ jsx37("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
11638
+ customerId && /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11639
+ /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACH", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHinfo, onChange: (e) => {
11662
11640
  setSaveACHinfo(e.target.checked);
11663
11641
  if (!e.target.checked) {
11664
11642
  setSaveACHConsent1(false);
11665
11643
  setErrorBankConsentOther("");
11666
11644
  }
11667
11645
  } }),
11668
- /* @__PURE__ */ jsx37("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
11646
+ /* @__PURE__ */ jsx36("label", { className: "saveachlabel", htmlFor: "saveACH", children: "Save for future use" })
11669
11647
  ] }),
11670
- saveACHinfo && /* @__PURE__ */ jsxs20(Fragment19, { children: [
11671
- /* @__PURE__ */ jsxs20("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11672
- /* @__PURE__ */ jsx37("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
11648
+ saveACHinfo && /* @__PURE__ */ jsxs19(Fragment18, { children: [
11649
+ /* @__PURE__ */ jsxs19("div", { className: "form-group-frac save-ach-div", style: { paddingTop: "5px" }, children: [
11650
+ /* @__PURE__ */ jsx36("input", { type: "checkbox", id: "saveACHConsent1", className: "", maxLength: 100, placeholder: "My Bank", checked: saveACHConsent1, onChange: (e) => {
11673
11651
  setSaveACHConsent1(e.target.checked);
11674
11652
  if (e.target.checked) {
11675
11653
  setErrorBankConsentOther("");
11676
11654
  }
11677
11655
  } }),
11678
- /* @__PURE__ */ jsxs20("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
11656
+ /* @__PURE__ */ jsxs19("label", { className: "saveachlabel", htmlFor: "saveACHConsent1", children: [
11679
11657
  "By providing my bank account information and selecting \u2018Save for future payments\u2019, I authorize ",
11680
11658
  merchantName || "merchant",
11681
11659
  " to store my bank account details for future ACH payments. I understand that future payments may be initiated using this saved account in accordance with my instructions. I confirm I am authorized to use this bank account."
11682
11660
  ] })
11683
11661
  ] }),
11684
- errorBankConsentOther && /* @__PURE__ */ jsx37("span", { className: "error-span", children: errorBankConsentOther })
11662
+ errorBankConsentOther && /* @__PURE__ */ jsx36("span", { className: "error-span", children: errorBankConsentOther })
11685
11663
  ] })
11686
11664
  ] })
11687
11665
  ] }),
11688
- /* @__PURE__ */ jsx37("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx37("button", { className: "pay-button", style: { margin: "20px 0 0", display: onSubmit ? "none" : "block" }, type: "submit", children: formatUSD((_u = Number(bankAmount)) == null ? void 0 : _u.toFixed(2)) }) })
11666
+ /* @__PURE__ */ jsx36("div", { className: "form-group-frac ", children: /* @__PURE__ */ jsx36("button", { className: "pay-button", style: { margin: "20px 0 0", display: onSubmit ? "none" : "block" }, type: "submit", children: formatUSD((_u = Number(bankAmount)) == null ? void 0 : _u.toFixed(2)) }) })
11689
11667
  ] })
11690
11668
  ] }) })
11691
11669
  ] })
@@ -11700,7 +11678,7 @@ var ModelContentSky_default = ModelContentSky;
11700
11678
 
11701
11679
  // src/app/components/Skysystemz/PayButtonWithForm.tsx
11702
11680
  import axios9 from "axios";
11703
- import { Fragment as Fragment20, jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
11681
+ import { Fragment as Fragment19, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
11704
11682
  var PaymentWidget = ({
11705
11683
  amount,
11706
11684
  bankAmount,
@@ -11721,15 +11699,15 @@ var PaymentWidget = ({
11721
11699
  isPartial,
11722
11700
  bankSurcharge,
11723
11701
  partialRef,
11724
- customCSS: customCSS2,
11702
+ customCSS,
11725
11703
  disableSubmitBtn = false
11726
11704
  }) => {
11727
- const [show, setShow] = useState11(autoTrigger || false);
11728
- const [loading, setLoading] = useState11(false);
11729
- const [childHandleClose, setChildHandleClose] = useState11(() => () => {
11705
+ const [show, setShow] = useState10(autoTrigger || false);
11706
+ const [loading, setLoading] = useState10(false);
11707
+ const [childHandleClose, setChildHandleClose] = useState10(() => () => {
11730
11708
  });
11731
- const [orderGuid, setOrderGuid] = useState11(null);
11732
- const [remainingAmount, setRemainingAmount] = useState11(null);
11709
+ const [orderGuid, setOrderGuid] = useState10(null);
11710
+ const [remainingAmount, setRemainingAmount] = useState10(null);
11733
11711
  const initialCommonProps = useMemo(
11734
11712
  () => ({
11735
11713
  amount,
@@ -11753,7 +11731,7 @@ var PaymentWidget = ({
11753
11731
  isPartial,
11754
11732
  bankSurcharge,
11755
11733
  partialRef,
11756
- customCSS: customCSS2,
11734
+ customCSS,
11757
11735
  disableSubmitBtn
11758
11736
  }),
11759
11737
  [
@@ -11779,8 +11757,8 @@ var PaymentWidget = ({
11779
11757
  disableSubmitBtn
11780
11758
  ]
11781
11759
  );
11782
- const [commonProps, setCommonProps] = useState11(initialCommonProps);
11783
- useEffect18(() => {
11760
+ const [commonProps, setCommonProps] = useState10(initialCommonProps);
11761
+ useEffect16(() => {
11784
11762
  if (show) {
11785
11763
  setCommonProps(initialCommonProps);
11786
11764
  }
@@ -11811,35 +11789,33 @@ var PaymentWidget = ({
11811
11789
  setLoading(false);
11812
11790
  }
11813
11791
  };
11814
- useEffect18(() => {
11792
+ useEffect16(() => {
11815
11793
  if (show && isPartial && partialRef) {
11816
11794
  getskyosOrderDetails();
11817
11795
  }
11818
11796
  }, [show, isPartial, partialRef]);
11819
- return /* @__PURE__ */ jsxs21(Fragment20, { children: [
11820
- /* @__PURE__ */ jsx38("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11821
- /* @__PURE__ */ jsx38(DataScript, {}),
11822
- /* @__PURE__ */ jsx38(FractalTokenizerScript, {}),
11823
- /* @__PURE__ */ jsx38(SkyChargewidgetstyles, {}),
11824
- /* @__PURE__ */ jsx38(CardBankRadioStyles, {}),
11825
- /* @__PURE__ */ jsx38(CustomModal2styles_default, {}),
11826
- /* @__PURE__ */ jsx38(DataCapScriptLoader, {}),
11827
- !autoTrigger && /* @__PURE__ */ jsxs21("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
11797
+ return /* @__PURE__ */ jsxs20(Fragment19, { children: [
11798
+ /* @__PURE__ */ jsx37("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
11799
+ /* @__PURE__ */ jsx37(DataScript, {}),
11800
+ /* @__PURE__ */ jsx37(SkyChargewidgetstyles, {}),
11801
+ /* @__PURE__ */ jsx37(CardBankRadioStyles, {}),
11802
+ /* @__PURE__ */ jsx37(CustomModal2styles_default, {}),
11803
+ !autoTrigger && /* @__PURE__ */ jsxs20("button", { className: submitBtnClass || "paymentBtn", disabled: disableSubmitBtn, onClick: () => setShow(true), children: [
11828
11804
  submitBtnText,
11829
11805
  submitBtnIcon
11830
11806
  ] }),
11831
- !autoTrigger ? /* @__PURE__ */ jsx38(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx38(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx38(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
11807
+ !autoTrigger ? /* @__PURE__ */ jsx37(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx37(ModelContentSky_default, __spreadProps(__spreadValues({ show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
11832
11808
  ] });
11833
11809
  };
11834
11810
 
11835
11811
  // src/app/components/Skysystemz/EmbeddedCheckout.tsx
11836
- import { useEffect as useEffect20, useState as useState12, useMemo as useMemo2 } from "react";
11812
+ import { useEffect as useEffect18, useState as useState11, useMemo as useMemo2 } from "react";
11837
11813
  import axios10 from "axios";
11838
11814
 
11839
11815
  // src/app/components/Skysystemz/EmbeddedCheckoutStyles.tsx
11840
- import { jsx as jsx39 } from "react/jsx-runtime";
11816
+ import { jsx as jsx38 } from "react/jsx-runtime";
11841
11817
  function EmbeddedCheckoutStyles({ extraCustomCSS }) {
11842
- return /* @__PURE__ */ jsx39("style", { children: `
11818
+ return /* @__PURE__ */ jsx38("style", { children: `
11843
11819
 
11844
11820
  .pay-amount-conatiner{
11845
11821
  margin-top: 20px !important;
@@ -12185,27 +12161,27 @@ padding:0px !important;
12185
12161
  }
12186
12162
 
12187
12163
  // src/app/components/Atoms/Applepay/ApplePayScriptLoader.tsx
12188
- import { useEffect as useEffect19 } from "react";
12164
+ import { useEffect as useEffect17 } from "react";
12189
12165
  var applePayScriptLoaded = false;
12190
12166
  var ApplePayScriptLoader = () => {
12191
- useEffect19(() => {
12167
+ useEffect17(() => {
12192
12168
  if (applePayScriptLoaded) return;
12193
12169
  const existingScript = document.querySelector(
12194
12170
  `script[src="https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js"]`
12195
12171
  );
12196
12172
  if (!existingScript) {
12197
- const script2 = document.createElement("script");
12198
- script2.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
12199
- script2.async = true;
12200
- script2.onload = () => {
12173
+ const script = document.createElement("script");
12174
+ script.src = "https://applepay.cdn-apple.com/jsapi/v1/apple-pay-sdk.js";
12175
+ script.async = true;
12176
+ script.onload = () => {
12201
12177
  console.log("\u2705 Apple Pay script loaded");
12202
12178
  applePayScriptLoaded = true;
12203
12179
  console.log("ApplePaySession:", window.ApplePaySession);
12204
12180
  };
12205
- script2.onerror = (err) => {
12181
+ script.onerror = (err) => {
12206
12182
  console.error("\u274C Apple Pay script failed", err);
12207
12183
  };
12208
- document.head.appendChild(script2);
12184
+ document.head.appendChild(script);
12209
12185
  } else {
12210
12186
  applePayScriptLoaded = true;
12211
12187
  }
@@ -12214,7 +12190,7 @@ var ApplePayScriptLoader = () => {
12214
12190
  };
12215
12191
 
12216
12192
  // src/app/components/Skysystemz/EmbeddedCheckout.tsx
12217
- import { Fragment as Fragment21, jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
12193
+ import { Fragment as Fragment20, jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
12218
12194
  var EmbeddedCheckout = ({
12219
12195
  amount,
12220
12196
  bankAmount,
@@ -12237,14 +12213,15 @@ var EmbeddedCheckout = ({
12237
12213
  partialRef,
12238
12214
  onSubmit,
12239
12215
  onLoad,
12240
- customCSS: customCSS2
12216
+ customCSS
12241
12217
  }) => {
12242
- const [show, setShow] = useState12(false);
12243
- const [loading, setLoading] = useState12(false);
12244
- const [childHandleClose, setChildHandleClose] = useState12(() => () => {
12218
+ const [show, setShow] = useState11(false);
12219
+ const [loading, setLoading] = useState11(false);
12220
+ const [childHandleClose, setChildHandleClose] = useState11(() => () => {
12245
12221
  });
12246
- const [orderGuid, setOrderGuid] = useState12(null);
12247
- const [remainingAmount, setRemainingAmount] = useState12(null);
12222
+ const [orderGuid, setOrderGuid] = useState11(null);
12223
+ const [remainingAmount, setRemainingAmount] = useState11(null);
12224
+ const [isTokenizerReady, setTokenizerReady] = useState11(false);
12248
12225
  const initialCommonProps = useMemo2(
12249
12226
  () => ({
12250
12227
  amount,
@@ -12291,8 +12268,8 @@ var EmbeddedCheckout = ({
12291
12268
  partialRef
12292
12269
  ]
12293
12270
  );
12294
- const [commonProps, setCommonProps] = useState12(initialCommonProps);
12295
- useEffect20(() => {
12271
+ const [commonProps, setCommonProps] = useState11(initialCommonProps);
12272
+ useEffect18(() => {
12296
12273
  if (show) {
12297
12274
  setCommonProps(initialCommonProps);
12298
12275
  }
@@ -12323,13 +12300,13 @@ var EmbeddedCheckout = ({
12323
12300
  setLoading(false);
12324
12301
  }
12325
12302
  };
12326
- useEffect20(() => {
12327
- if (show && isPartial && partialRef) {
12303
+ useEffect18(() => {
12304
+ if (autoTrigger && isPartial && partialRef) {
12328
12305
  getskyosOrderDetails();
12329
12306
  }
12330
- }, [show, isPartial, partialRef]);
12307
+ }, [autoTrigger, isPartial, partialRef]);
12331
12308
  console.log(onLoad, "onLoad");
12332
- useEffect20(() => {
12309
+ useEffect18(() => {
12333
12310
  const supported = !!window.ApplePaySession;
12334
12311
  let canPay = false;
12335
12312
  if (supported) {
@@ -12340,21 +12317,19 @@ var EmbeddedCheckout = ({
12340
12317
  }
12341
12318
  console.log(`ApplePaySession: ${supported}, canMakePayments: ${canPay}`);
12342
12319
  }, []);
12343
- return /* @__PURE__ */ jsxs22(Fragment21, { children: [
12344
- /* @__PURE__ */ jsx40("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
12345
- /* @__PURE__ */ jsx40(DataScript, {}),
12346
- /* @__PURE__ */ jsx40(FractalTokenizerScript, {}),
12347
- /* @__PURE__ */ jsx40(SkyChargewidgetstyles, {}),
12348
- /* @__PURE__ */ jsx40(CardBankRadioStyles, {}),
12349
- /* @__PURE__ */ jsx40(CustomModal2styles_default, {}),
12350
- /* @__PURE__ */ jsx40(DataCapScriptLoader, {}),
12351
- /* @__PURE__ */ jsx40(ApplePayScriptLoader, {}),
12352
- /* @__PURE__ */ jsx40(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS2 }),
12353
- !autoTrigger && /* @__PURE__ */ jsxs22("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
12320
+ return /* @__PURE__ */ jsxs21(Fragment20, { children: [
12321
+ /* @__PURE__ */ jsx39("link", { href: "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" }),
12322
+ /* @__PURE__ */ jsx39(DataScript, {}),
12323
+ /* @__PURE__ */ jsx39(SkyChargewidgetstyles, {}),
12324
+ /* @__PURE__ */ jsx39(CardBankRadioStyles, {}),
12325
+ /* @__PURE__ */ jsx39(CustomModal2styles_default, {}),
12326
+ /* @__PURE__ */ jsx39(ApplePayScriptLoader, {}),
12327
+ /* @__PURE__ */ jsx39(EmbeddedCheckoutStyles, { extraCustomCSS: customCSS }),
12328
+ !autoTrigger && /* @__PURE__ */ jsxs21("button", { className: submitBtnClass || "paymentBtn", onClick: () => setShow(true), children: [
12354
12329
  submitBtnText,
12355
12330
  submitBtnIcon
12356
12331
  ] }),
12357
- !autoTrigger ? /* @__PURE__ */ jsx40(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx40(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx40(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
12332
+ !autoTrigger ? /* @__PURE__ */ jsx39(CustomModal2_default, { open: show, onClose: childHandleClose, children: /* @__PURE__ */ jsx39(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount })) }) : /* @__PURE__ */ jsx39(ModelContentSky_default, __spreadProps(__spreadValues({ onLoad, onSubmit, show, loadingPrev: loading }, commonProps), { orderGuid, remainingAmount }))
12358
12333
  ] });
12359
12334
  };
12360
12335
  export {