@pelcro/react-pelcro-js 3.26.0-beta.27 → 3.26.0-beta.29
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.cjs.js +1477 -534
- package/dist/index.esm.js +1468 -535
- package/dist/pelcro.css +39 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -3354,9 +3354,23 @@ var select$6 = {
|
|
|
3354
3354
|
changePaymentMethod: "Change"
|
|
3355
3355
|
}
|
|
3356
3356
|
};
|
|
3357
|
+
var create$5 = {
|
|
3358
|
+
title: "Add a new payment method",
|
|
3359
|
+
subtitle: "Enter the fields below to add your credit card information"
|
|
3360
|
+
};
|
|
3357
3361
|
var paymentMethod_en = {
|
|
3358
3362
|
update: update$3,
|
|
3359
|
-
select: select$6
|
|
3363
|
+
select: select$6,
|
|
3364
|
+
"delete": {
|
|
3365
|
+
title: "Delete payment method",
|
|
3366
|
+
subtitle: "This payment method could be associated with active subscriptions or serve as the default payment method. Please choose from the available options below for replacement.",
|
|
3367
|
+
options: {
|
|
3368
|
+
select: "Select an existing payment method",
|
|
3369
|
+
add: "Add a new payment method"
|
|
3370
|
+
},
|
|
3371
|
+
paymentMethodReplaced: "Payment Method Successfully Deleted and Replaced"
|
|
3372
|
+
},
|
|
3373
|
+
create: create$5
|
|
3360
3374
|
};
|
|
3361
3375
|
|
|
3362
3376
|
var title$z = "Enter your email to subscribe to our newsletter";
|
|
@@ -3462,7 +3476,8 @@ var labels$15 = {
|
|
|
3462
3476
|
order: "Order",
|
|
3463
3477
|
amount: "Amount",
|
|
3464
3478
|
email: "Email",
|
|
3465
|
-
password: "Password"
|
|
3479
|
+
password: "Password",
|
|
3480
|
+
isDefault: "Set as default"
|
|
3466
3481
|
};
|
|
3467
3482
|
var checkoutForm_en = {
|
|
3468
3483
|
messages: messages$18,
|
|
@@ -3925,6 +3940,8 @@ var labels$Z = {
|
|
|
3925
3940
|
renewsOn: "Renews",
|
|
3926
3941
|
canceledOn: "Canceled on",
|
|
3927
3942
|
recipient: "Recipient",
|
|
3943
|
+
addPaymentSource: "Add payment method",
|
|
3944
|
+
setDefault: "Set as default",
|
|
3928
3945
|
addAddress: "Add address",
|
|
3929
3946
|
editAddress: "Edit address",
|
|
3930
3947
|
addSubscription: "New Subscription",
|
|
@@ -3986,6 +4003,13 @@ var messages$_ = {
|
|
|
3986
4003
|
loading: "Unsuspending your donation",
|
|
3987
4004
|
success: "Donation is successfully unsuspended",
|
|
3988
4005
|
error: "Error while unsuspending your donation"
|
|
4006
|
+
},
|
|
4007
|
+
paymentMethodDeletion: {
|
|
4008
|
+
isSureToDelete: "Are you sure you want to delete this payment method?",
|
|
4009
|
+
loading: "Deleting your payment method",
|
|
4010
|
+
success: "Payment method is successfully deleted",
|
|
4011
|
+
error: "Error while deleting your payment method",
|
|
4012
|
+
nonDeletable: "This payment method can't be deleted"
|
|
3989
4013
|
}
|
|
3990
4014
|
};
|
|
3991
4015
|
var dashboard_en = {
|
|
@@ -4282,9 +4306,23 @@ var select$4 = {
|
|
|
4282
4306
|
changePaymentMethod: "Modifier"
|
|
4283
4307
|
}
|
|
4284
4308
|
};
|
|
4309
|
+
var create$4 = {
|
|
4310
|
+
title: "Ajouter un nouveau mode de paiement",
|
|
4311
|
+
subtitle: "Saisissez les champs ci-dessous pour ajouter les informations relatives à votre carte de crédit"
|
|
4312
|
+
};
|
|
4285
4313
|
var paymentMethod_fr = {
|
|
4286
4314
|
update: update$2,
|
|
4287
|
-
select: select$4
|
|
4315
|
+
select: select$4,
|
|
4316
|
+
"delete": {
|
|
4317
|
+
title: "Supprimer un mode de paiement",
|
|
4318
|
+
subtitle: "Ce mode de paiement peut être associé à des abonnements actifs ou servir de mode de paiement par défaut. Veuillez choisir parmi les options disponibles ci-dessous pour le remplacement.",
|
|
4319
|
+
options: {
|
|
4320
|
+
select: "Sélectionner un mode de paiement existant",
|
|
4321
|
+
add: "Ajouter un nouveau mode de paiement"
|
|
4322
|
+
},
|
|
4323
|
+
paymentMethodReplaced: "Méthode de paiement supprimée et remplacée avec succès"
|
|
4324
|
+
},
|
|
4325
|
+
create: create$4
|
|
4288
4326
|
};
|
|
4289
4327
|
|
|
4290
4328
|
var title$q = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
|
|
@@ -4387,6 +4425,7 @@ var labels$P = {
|
|
|
4387
4425
|
lastName: "Nom de famille",
|
|
4388
4426
|
phone: "Téléphoner",
|
|
4389
4427
|
freeItems: "Articles gratuits",
|
|
4428
|
+
isDefault: "Défini comme valeur par défaut",
|
|
4390
4429
|
order: "Commande",
|
|
4391
4430
|
amount: "Montant",
|
|
4392
4431
|
email: "Courriel",
|
|
@@ -5209,9 +5248,23 @@ var select$2 = {
|
|
|
5209
5248
|
changePaymentMethod: "변경"
|
|
5210
5249
|
}
|
|
5211
5250
|
};
|
|
5251
|
+
var create$3 = {
|
|
5252
|
+
title: "새 결제 방법 추가",
|
|
5253
|
+
subtitle: "신용카드 정보를 추가하려면 아래 입력란을 입력하세요."
|
|
5254
|
+
};
|
|
5212
5255
|
var paymentMethod_ko = {
|
|
5213
5256
|
update: update$1,
|
|
5214
|
-
select: select$2
|
|
5257
|
+
select: select$2,
|
|
5258
|
+
"delete": {
|
|
5259
|
+
title: "결제 방법 삭제",
|
|
5260
|
+
subtitle: "이 결제 방법은 활성 구독과 연결되거나 기본 결제 방법으로 사용될 수 있습니다. 아래에서 사용 가능한 옵션 중에서 선택하여 대체하세요.",
|
|
5261
|
+
options: {
|
|
5262
|
+
select: "기존 결제 방법 선택",
|
|
5263
|
+
add: "새 결제 방법 추가"
|
|
5264
|
+
},
|
|
5265
|
+
paymentMethodReplaced: "결제 방법 삭제 및 교체 성공"
|
|
5266
|
+
},
|
|
5267
|
+
create: create$3
|
|
5215
5268
|
};
|
|
5216
5269
|
|
|
5217
5270
|
var title$h = "Frieze 뉴스레터를 구독하려면 이메일을 입력하세요.";
|
|
@@ -5317,7 +5370,8 @@ var labels$x = {
|
|
|
5317
5370
|
order: "주문",
|
|
5318
5371
|
amount: "금액",
|
|
5319
5372
|
email: "이메일",
|
|
5320
|
-
password: "비밀번호"
|
|
5373
|
+
password: "비밀번호",
|
|
5374
|
+
isDefault: "기본값으로 설정"
|
|
5321
5375
|
};
|
|
5322
5376
|
var checkoutForm_ko = {
|
|
5323
5377
|
messages: messages$y,
|
|
@@ -6241,9 +6295,23 @@ var select = {
|
|
|
6241
6295
|
changePaymentMethod: "Cambiar"
|
|
6242
6296
|
}
|
|
6243
6297
|
};
|
|
6298
|
+
var create$2 = {
|
|
6299
|
+
title: "Añadir un nuevo método de pago",
|
|
6300
|
+
subtitle: "Introduzca los campos siguientes para añadir los datos de su tarjeta de crédito"
|
|
6301
|
+
};
|
|
6244
6302
|
var paymentMethod_es = {
|
|
6245
6303
|
update: update,
|
|
6246
|
-
select: select
|
|
6304
|
+
select: select,
|
|
6305
|
+
"delete": {
|
|
6306
|
+
title: "Eliminar método de pago",
|
|
6307
|
+
subtitle: "Este método de pago podría estar asociado a suscripciones activas o servir como método de pago predeterminado. Elija entre las opciones disponibles a continuación para sustituirlo.",
|
|
6308
|
+
options: {
|
|
6309
|
+
select: "Seleccione un método de pago existente",
|
|
6310
|
+
add: "Añadir un nuevo método de pago"
|
|
6311
|
+
},
|
|
6312
|
+
paymentMethodReplaced: "Método de pago eliminado y sustituido correctamente"
|
|
6313
|
+
},
|
|
6314
|
+
create: create$2
|
|
6247
6315
|
};
|
|
6248
6316
|
|
|
6249
6317
|
var title$8 = "Ingresa tu correo para suscribirte a nuestro boletín";
|
|
@@ -6349,7 +6417,8 @@ var labels$f = {
|
|
|
6349
6417
|
order: "Pida",
|
|
6350
6418
|
amount: "Importe",
|
|
6351
6419
|
email: "Correo",
|
|
6352
|
-
password: "Contraseña"
|
|
6420
|
+
password: "Contraseña",
|
|
6421
|
+
isDefault: "Fijar por defecto"
|
|
6353
6422
|
};
|
|
6354
6423
|
var checkoutForm_es = {
|
|
6355
6424
|
messages: messages$f,
|
|
@@ -8982,7 +9051,7 @@ class PelcroActions {
|
|
|
8982
9051
|
view,
|
|
8983
9052
|
cartItems,
|
|
8984
9053
|
...otherStateFields
|
|
8985
|
-
} = initialState$
|
|
9054
|
+
} = initialState$o;
|
|
8986
9055
|
this.set(otherStateFields);
|
|
8987
9056
|
});
|
|
8988
9057
|
_defineProperty$3(this, "switchView", view => {
|
|
@@ -9287,6 +9356,38 @@ class PelcroActions {
|
|
|
9287
9356
|
}
|
|
9288
9357
|
switchToAddressView();
|
|
9289
9358
|
});
|
|
9359
|
+
_defineProperty$3(this, "setPaymentMethodToEdit", id => {
|
|
9360
|
+
window.Pelcro.paymentMethods.getPaymentMethod({
|
|
9361
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
9362
|
+
payment_method_id: id
|
|
9363
|
+
}, (err, res) => {
|
|
9364
|
+
if (err) {
|
|
9365
|
+
return console.error("invalid payment method id");
|
|
9366
|
+
}
|
|
9367
|
+
if (res) {
|
|
9368
|
+
const paymentMethodToEdit = res.data;
|
|
9369
|
+
this.set({
|
|
9370
|
+
paymentMethodToEdit
|
|
9371
|
+
});
|
|
9372
|
+
}
|
|
9373
|
+
});
|
|
9374
|
+
});
|
|
9375
|
+
_defineProperty$3(this, "setPaymentMethodToDelete", id => {
|
|
9376
|
+
window.Pelcro.paymentMethods.getPaymentMethod({
|
|
9377
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
9378
|
+
payment_method_id: id
|
|
9379
|
+
}, (err, res) => {
|
|
9380
|
+
if (err) {
|
|
9381
|
+
return console.error("invalid payment method id");
|
|
9382
|
+
}
|
|
9383
|
+
if (res) {
|
|
9384
|
+
const paymentMethodToDelete = res.data;
|
|
9385
|
+
this.set({
|
|
9386
|
+
paymentMethodToDelete
|
|
9387
|
+
});
|
|
9388
|
+
}
|
|
9389
|
+
});
|
|
9390
|
+
});
|
|
9290
9391
|
this.set = storeSetter;
|
|
9291
9392
|
this.get = storeGetter;
|
|
9292
9393
|
}
|
|
@@ -9331,7 +9432,7 @@ class PelcroCallbacks {
|
|
|
9331
9432
|
}
|
|
9332
9433
|
}
|
|
9333
9434
|
|
|
9334
|
-
const initialState$
|
|
9435
|
+
const initialState$o = {
|
|
9335
9436
|
// View
|
|
9336
9437
|
view: null,
|
|
9337
9438
|
// Plans
|
|
@@ -9357,6 +9458,9 @@ const initialState$n = {
|
|
|
9357
9458
|
couponCode: null,
|
|
9358
9459
|
// memberships
|
|
9359
9460
|
selectedMembership: null,
|
|
9461
|
+
// paymentMethods
|
|
9462
|
+
paymentMethodToDelete: null,
|
|
9463
|
+
paymentMethodToEdit: null,
|
|
9360
9464
|
// User
|
|
9361
9465
|
isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
|
|
9362
9466
|
selectedPaymentMethodId: null,
|
|
@@ -9369,7 +9473,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
|
|
|
9369
9473
|
return {
|
|
9370
9474
|
// Store setter
|
|
9371
9475
|
set,
|
|
9372
|
-
...initialState$
|
|
9476
|
+
...initialState$o,
|
|
9373
9477
|
// State actions
|
|
9374
9478
|
...actions,
|
|
9375
9479
|
// Callbacks
|
|
@@ -10323,8 +10427,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
|
|
|
10323
10427
|
|
|
10324
10428
|
let e={data:""},t=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n=/\n+/g,o=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o(c,n):n+"{"+o(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o.p?o.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i$1=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n," ").trim();return o[0]})(e);c[d]=o(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o(e,""):!1===e?"":e;}return e+l+(null==n?"":n)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return i$1(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let d,f,g;u.bind({g:1});let h=u.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f=r,g=l;}function j(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\d+/.test(s),c.className=u.apply(r,l)+(s?" "+s:""),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return t?t(a):a}}
|
|
10325
10429
|
|
|
10326
|
-
function _extends$
|
|
10327
|
-
_extends$
|
|
10430
|
+
function _extends$C() {
|
|
10431
|
+
_extends$C = Object.assign || function (target) {
|
|
10328
10432
|
for (var i = 1; i < arguments.length; i++) {
|
|
10329
10433
|
var source = arguments[i];
|
|
10330
10434
|
|
|
@@ -10338,7 +10442,7 @@ function _extends$B() {
|
|
|
10338
10442
|
return target;
|
|
10339
10443
|
};
|
|
10340
10444
|
|
|
10341
|
-
return _extends$
|
|
10445
|
+
return _extends$C.apply(this, arguments);
|
|
10342
10446
|
}
|
|
10343
10447
|
|
|
10344
10448
|
function _taggedTemplateLiteralLoose(strings, raw) {
|
|
@@ -10428,7 +10532,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
10428
10532
|
var reducer = function reducer(state, action) {
|
|
10429
10533
|
switch (action.type) {
|
|
10430
10534
|
case ActionType.ADD_TOAST:
|
|
10431
|
-
return _extends$
|
|
10535
|
+
return _extends$C({}, state, {
|
|
10432
10536
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
10433
10537
|
});
|
|
10434
10538
|
|
|
@@ -10438,9 +10542,9 @@ var reducer = function reducer(state, action) {
|
|
|
10438
10542
|
clearFromRemoveQueue(action.toast.id);
|
|
10439
10543
|
}
|
|
10440
10544
|
|
|
10441
|
-
return _extends$
|
|
10545
|
+
return _extends$C({}, state, {
|
|
10442
10546
|
toasts: state.toasts.map(function (t) {
|
|
10443
|
-
return t.id === action.toast.id ? _extends$
|
|
10547
|
+
return t.id === action.toast.id ? _extends$C({}, t, action.toast) : t;
|
|
10444
10548
|
})
|
|
10445
10549
|
});
|
|
10446
10550
|
|
|
@@ -10467,9 +10571,9 @@ var reducer = function reducer(state, action) {
|
|
|
10467
10571
|
});
|
|
10468
10572
|
}
|
|
10469
10573
|
|
|
10470
|
-
return _extends$
|
|
10574
|
+
return _extends$C({}, state, {
|
|
10471
10575
|
toasts: state.toasts.map(function (t) {
|
|
10472
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
10576
|
+
return t.id === toastId || toastId === undefined ? _extends$C({}, t, {
|
|
10473
10577
|
visible: false
|
|
10474
10578
|
}) : t;
|
|
10475
10579
|
})
|
|
@@ -10477,28 +10581,28 @@ var reducer = function reducer(state, action) {
|
|
|
10477
10581
|
|
|
10478
10582
|
case ActionType.REMOVE_TOAST:
|
|
10479
10583
|
if (action.toastId === undefined) {
|
|
10480
|
-
return _extends$
|
|
10584
|
+
return _extends$C({}, state, {
|
|
10481
10585
|
toasts: []
|
|
10482
10586
|
});
|
|
10483
10587
|
}
|
|
10484
10588
|
|
|
10485
|
-
return _extends$
|
|
10589
|
+
return _extends$C({}, state, {
|
|
10486
10590
|
toasts: state.toasts.filter(function (t) {
|
|
10487
10591
|
return t.id !== action.toastId;
|
|
10488
10592
|
})
|
|
10489
10593
|
});
|
|
10490
10594
|
|
|
10491
10595
|
case ActionType.START_PAUSE:
|
|
10492
|
-
return _extends$
|
|
10596
|
+
return _extends$C({}, state, {
|
|
10493
10597
|
pausedAt: action.time
|
|
10494
10598
|
});
|
|
10495
10599
|
|
|
10496
10600
|
case ActionType.END_PAUSE:
|
|
10497
10601
|
var diff = action.time - (state.pausedAt || 0);
|
|
10498
|
-
return _extends$
|
|
10602
|
+
return _extends$C({}, state, {
|
|
10499
10603
|
pausedAt: undefined,
|
|
10500
10604
|
toasts: state.toasts.map(function (t) {
|
|
10501
|
-
return _extends$
|
|
10605
|
+
return _extends$C({}, t, {
|
|
10502
10606
|
pauseDuration: t.pauseDuration + diff
|
|
10503
10607
|
});
|
|
10504
10608
|
})
|
|
@@ -10545,12 +10649,12 @@ var useStore = function useStore(toastOptions) {
|
|
|
10545
10649
|
var mergedToasts = state.toasts.map(function (t) {
|
|
10546
10650
|
var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
|
|
10547
10651
|
|
|
10548
|
-
return _extends$
|
|
10652
|
+
return _extends$C({}, toastOptions, toastOptions[t.type], t, {
|
|
10549
10653
|
duration: t.duration || ((_toastOptions$t$type = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type.duration) || ((_toastOptions = toastOptions) == null ? void 0 : _toastOptions.duration) || defaultTimeouts[t.type],
|
|
10550
|
-
style: _extends$
|
|
10654
|
+
style: _extends$C({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
|
|
10551
10655
|
});
|
|
10552
10656
|
});
|
|
10553
|
-
return _extends$
|
|
10657
|
+
return _extends$C({}, state, {
|
|
10554
10658
|
toasts: mergedToasts
|
|
10555
10659
|
});
|
|
10556
10660
|
};
|
|
@@ -10560,7 +10664,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
10560
10664
|
type = 'blank';
|
|
10561
10665
|
}
|
|
10562
10666
|
|
|
10563
|
-
return _extends$
|
|
10667
|
+
return _extends$C({
|
|
10564
10668
|
createdAt: Date.now(),
|
|
10565
10669
|
visible: true,
|
|
10566
10670
|
type: type,
|
|
@@ -10610,14 +10714,14 @@ toast.remove = function (toastId) {
|
|
|
10610
10714
|
};
|
|
10611
10715
|
|
|
10612
10716
|
toast.promise = function (promise, msgs, opts) {
|
|
10613
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
10717
|
+
var id = toast.loading(msgs.loading, _extends$C({}, opts, opts == null ? void 0 : opts.loading));
|
|
10614
10718
|
promise.then(function (p) {
|
|
10615
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
10719
|
+
toast.success(resolveValue(msgs.success, p), _extends$C({
|
|
10616
10720
|
id: id
|
|
10617
10721
|
}, opts, opts == null ? void 0 : opts.success));
|
|
10618
10722
|
return p;
|
|
10619
10723
|
})["catch"](function (e) {
|
|
10620
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
10724
|
+
toast.error(resolveValue(msgs.error, e), _extends$C({
|
|
10621
10725
|
id: id
|
|
10622
10726
|
}, opts, opts == null ? void 0 : opts.error));
|
|
10623
10727
|
});
|
|
@@ -10956,7 +11060,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
|
|
|
10956
11060
|
var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
|
|
10957
11061
|
return React.createElement(ToastBarBase, {
|
|
10958
11062
|
className: toast.className,
|
|
10959
|
-
style: _extends$
|
|
11063
|
+
style: _extends$C({}, animationStyle, style, toast.style)
|
|
10960
11064
|
}, typeof children === 'function' ? children({
|
|
10961
11065
|
icon: icon,
|
|
10962
11066
|
message: message
|
|
@@ -10986,7 +11090,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
|
|
|
10986
11090
|
} : position.includes('right') ? {
|
|
10987
11091
|
justifyContent: 'flex-end'
|
|
10988
11092
|
} : {};
|
|
10989
|
-
return _extends$
|
|
11093
|
+
return _extends$C({
|
|
10990
11094
|
left: 0,
|
|
10991
11095
|
right: 0,
|
|
10992
11096
|
display: 'flex',
|
|
@@ -11013,7 +11117,7 @@ var Toaster = function Toaster(_ref) {
|
|
|
11013
11117
|
handlers = _useToaster.handlers;
|
|
11014
11118
|
|
|
11015
11119
|
return React.createElement("div", {
|
|
11016
|
-
style: _extends$
|
|
11120
|
+
style: _extends$C({
|
|
11017
11121
|
position: 'fixed',
|
|
11018
11122
|
zIndex: 9999,
|
|
11019
11123
|
top: DEFAULT_OFFSET,
|
|
@@ -11048,72 +11152,72 @@ var Toaster = function Toaster(_ref) {
|
|
|
11048
11152
|
}));
|
|
11049
11153
|
};
|
|
11050
11154
|
|
|
11051
|
-
var _path$
|
|
11052
|
-
function _extends$
|
|
11155
|
+
var _path$z;
|
|
11156
|
+
function _extends$B() { _extends$B = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$B.apply(this, arguments); }
|
|
11053
11157
|
function SvgCheckSolid(props) {
|
|
11054
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
11158
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$B({
|
|
11055
11159
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11056
11160
|
className: "h-5 w-5",
|
|
11057
11161
|
viewBox: "0 0 20 20",
|
|
11058
11162
|
fill: "currentColor"
|
|
11059
|
-
}, props), _path$
|
|
11163
|
+
}, props), _path$z || (_path$z = /*#__PURE__*/React__namespace.createElement("path", {
|
|
11060
11164
|
fillRule: "evenodd",
|
|
11061
11165
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
11062
11166
|
clipRule: "evenodd"
|
|
11063
11167
|
})));
|
|
11064
11168
|
}
|
|
11065
11169
|
|
|
11066
|
-
var _path$
|
|
11067
|
-
function _extends$
|
|
11170
|
+
var _path$y;
|
|
11171
|
+
function _extends$A() { _extends$A = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$A.apply(this, arguments); }
|
|
11068
11172
|
function SvgXIcon(props) {
|
|
11069
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
11173
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$A({
|
|
11070
11174
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11071
11175
|
viewBox: "0 0 20 20",
|
|
11072
11176
|
fill: "currentColor"
|
|
11073
|
-
}, props), _path$
|
|
11177
|
+
}, props), _path$y || (_path$y = /*#__PURE__*/React__namespace.createElement("path", {
|
|
11074
11178
|
fill: "evenodd",
|
|
11075
11179
|
d: "M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",
|
|
11076
11180
|
clipRule: "evenodd"
|
|
11077
11181
|
})));
|
|
11078
11182
|
}
|
|
11079
11183
|
|
|
11080
|
-
var _path$
|
|
11081
|
-
function _extends$
|
|
11184
|
+
var _path$x;
|
|
11185
|
+
function _extends$z() { _extends$z = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$z.apply(this, arguments); }
|
|
11082
11186
|
function SvgXIconSolid(props) {
|
|
11083
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
11187
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
|
|
11084
11188
|
className: "plc-w-4 plc-h-4",
|
|
11085
11189
|
fill: "currentColor",
|
|
11086
11190
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11087
11191
|
viewBox: "0 0 100 100"
|
|
11088
|
-
}, props), _path$
|
|
11192
|
+
}, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
|
|
11089
11193
|
d: "M94.842 48.408c0 24.852-20.148 44.999-45.002 44.999-24.851 0-44.997-20.146-44.997-44.999 0-24.854 20.146-45 44.997-45 24.853 0 45.002 20.146 45.002 45zM71.073 64.841L54.73 48.497l16.344-16.344-4.979-4.979-16.343 16.345-16.343-16.344-4.799 4.799 16.344 16.344L28.61 64.661l4.979 4.978 16.344-16.344 16.343 16.344 4.797-4.798z"
|
|
11090
11194
|
})));
|
|
11091
11195
|
}
|
|
11092
11196
|
|
|
11093
|
-
var _path$
|
|
11094
|
-
function _extends$
|
|
11197
|
+
var _path$w;
|
|
11198
|
+
function _extends$y() { _extends$y = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
|
|
11095
11199
|
function SvgExclamation(props) {
|
|
11096
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
11200
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
11097
11201
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
11098
11202
|
xmlns: "http://www.w3.org/2000/svg",
|
|
11099
11203
|
viewBox: "0 0 20 20",
|
|
11100
11204
|
fill: "currentColor"
|
|
11101
|
-
}, props), _path$
|
|
11205
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
|
|
11102
11206
|
fillRule: "evenodd",
|
|
11103
11207
|
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
|
|
11104
11208
|
clipRule: "evenodd"
|
|
11105
11209
|
})));
|
|
11106
11210
|
}
|
|
11107
11211
|
|
|
11108
|
-
var _path$
|
|
11109
|
-
function _extends$
|
|
11212
|
+
var _path$v, _path2$4;
|
|
11213
|
+
function _extends$x() { _extends$x = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
|
|
11110
11214
|
function SvgSpinner(props) {
|
|
11111
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
11215
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
11112
11216
|
className: "plc-animate-spin",
|
|
11113
11217
|
viewBox: "0 0 24 24",
|
|
11114
11218
|
fill: "currentColor",
|
|
11115
11219
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11116
|
-
}, props), _path$
|
|
11220
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
|
|
11117
11221
|
opacity: 0.2,
|
|
11118
11222
|
fill: "evenodd",
|
|
11119
11223
|
clipRule: "evenodd",
|
|
@@ -11804,6 +11908,17 @@ function getSiteCardProcessor() {
|
|
|
11804
11908
|
}
|
|
11805
11909
|
return "stripe";
|
|
11806
11910
|
}
|
|
11911
|
+
function getFourDigitYear(lastTwoDigits) {
|
|
11912
|
+
// Get the current year
|
|
11913
|
+
const currentYear = new Date().getFullYear();
|
|
11914
|
+
|
|
11915
|
+
// Extract the current century (first two digits)
|
|
11916
|
+
const currentCentury = Math.floor(currentYear / 100);
|
|
11917
|
+
|
|
11918
|
+
// Combine the century and the provided last two digits
|
|
11919
|
+
const fourDigitYear = currentCentury * 100 + lastTwoDigits;
|
|
11920
|
+
return fourDigitYear;
|
|
11921
|
+
}
|
|
11807
11922
|
|
|
11808
11923
|
/**
|
|
11809
11924
|
* @typedef {Object} OptionsType
|
|
@@ -12781,6 +12896,7 @@ const SET_CONFIRM_PASSWORD = "SET_CONFIRM_PASSWORD";
|
|
|
12781
12896
|
const CONFIRM_PASSWORD_USED = "CONFIRM_PASSWORD_USED";
|
|
12782
12897
|
const DISABLE_SUBMIT = "DISABLE_SUBMIT";
|
|
12783
12898
|
const LOADING = "LOADING";
|
|
12899
|
+
const SKELETON_LOADER = "SKELETON_LOADER";
|
|
12784
12900
|
const SUBMIT_PAYMENT = "SUBMIT_PAYMENT";
|
|
12785
12901
|
const SUBSCRIBE = "CREATE_SUBSCRIPTION";
|
|
12786
12902
|
const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
|
|
@@ -12848,6 +12964,9 @@ const LINK_TOKEN_VERIFY = "LINK_TOKEN_VERIFY";
|
|
|
12848
12964
|
const SET_CANCEL_SUBSCRIPTION_REASON = "SET_CANCEL_SUBSCRIPTION_REASON";
|
|
12849
12965
|
const SET_CANCEL_SUBSCRIPTION_OPTION = "SET_CANCEL_SUBSCRIPTION_OPTION";
|
|
12850
12966
|
const HANDLE_CHECKBOX_CHANGE = "HANDLE_CHECKBOX_CHANGE";
|
|
12967
|
+
const SET_IS_DEFAULT_PAYMENT_METHOD = "SET_IS_DEFAULT_PAYMENT_METHOD";
|
|
12968
|
+
const SET_DELETE_PAYMENT_METHOD_OPTION = "SET_DELETE_PAYMENT_METHOD_OPTION";
|
|
12969
|
+
const SET_PAYMENT_METHODS = "SET_PAYMENT_METHODS";
|
|
12851
12970
|
const SET_SUBSCRIPTION_SUSPEND_DATE = "SET_SUBSCRIPTION_SUSPEND_DATE";
|
|
12852
12971
|
const SET_EMAILS = "SET_EMAILS";
|
|
12853
12972
|
const SET_EMAILS_ERROR = "SET_EMAILS_ERROR";
|
|
@@ -12859,7 +12978,7 @@ const UPDATE_MEMBERS = "UPDATE_MEMBERS";
|
|
|
12859
12978
|
const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID";
|
|
12860
12979
|
const UPDATE_CYBERSOURCE_SESSION_ID = "UPDATE_CYBERSOURCE_SESSION_ID";
|
|
12861
12980
|
|
|
12862
|
-
const initialState$
|
|
12981
|
+
const initialState$n = {
|
|
12863
12982
|
email: "",
|
|
12864
12983
|
username: "",
|
|
12865
12984
|
password: "",
|
|
@@ -12872,10 +12991,10 @@ const initialState$m = {
|
|
|
12872
12991
|
content: ""
|
|
12873
12992
|
}
|
|
12874
12993
|
};
|
|
12875
|
-
const store$
|
|
12994
|
+
const store$n = /*#__PURE__*/React.createContext(initialState$n);
|
|
12876
12995
|
const {
|
|
12877
|
-
Provider: Provider$
|
|
12878
|
-
} = store$
|
|
12996
|
+
Provider: Provider$n
|
|
12997
|
+
} = store$n;
|
|
12879
12998
|
const LoginContainer = _ref => {
|
|
12880
12999
|
var _window, _window$Pelcro, _window$Pelcro$uiSett;
|
|
12881
13000
|
let {
|
|
@@ -13012,7 +13131,7 @@ const LoginContainer = _ref => {
|
|
|
13012
13131
|
alert: action.payload
|
|
13013
13132
|
});
|
|
13014
13133
|
case RESET_LOGIN_FORM:
|
|
13015
|
-
return initialState$
|
|
13134
|
+
return initialState$n;
|
|
13016
13135
|
case DISABLE_LOGIN_BUTTON:
|
|
13017
13136
|
return lib_7({
|
|
13018
13137
|
...state,
|
|
@@ -13028,13 +13147,13 @@ const LoginContainer = _ref => {
|
|
|
13028
13147
|
default:
|
|
13029
13148
|
return state;
|
|
13030
13149
|
}
|
|
13031
|
-
}, initialState$
|
|
13150
|
+
}, initialState$n);
|
|
13032
13151
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13033
13152
|
style: {
|
|
13034
13153
|
...style
|
|
13035
13154
|
},
|
|
13036
13155
|
className: `pelcro-container pelcro-login-container ${className}`
|
|
13037
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
13156
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$n, {
|
|
13038
13157
|
value: {
|
|
13039
13158
|
state,
|
|
13040
13159
|
dispatch
|
|
@@ -13042,12 +13161,12 @@ const LoginContainer = _ref => {
|
|
|
13042
13161
|
}, children.length ? children.map((child, i) => {
|
|
13043
13162
|
if (child) {
|
|
13044
13163
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
13045
|
-
store: store$
|
|
13164
|
+
store: store$n,
|
|
13046
13165
|
key: i
|
|
13047
13166
|
});
|
|
13048
13167
|
}
|
|
13049
13168
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
13050
|
-
store: store$
|
|
13169
|
+
store: store$n
|
|
13051
13170
|
})));
|
|
13052
13171
|
};
|
|
13053
13172
|
|
|
@@ -13356,7 +13475,7 @@ const LoginButton = _ref => {
|
|
|
13356
13475
|
buttonDisabled
|
|
13357
13476
|
},
|
|
13358
13477
|
dispatch
|
|
13359
|
-
} = React.useContext(store$
|
|
13478
|
+
} = React.useContext(store$n);
|
|
13360
13479
|
const {
|
|
13361
13480
|
t
|
|
13362
13481
|
} = useTranslation("login");
|
|
@@ -13376,14 +13495,14 @@ const LoginButton = _ref => {
|
|
|
13376
13495
|
}, otherProps), name !== null && name !== void 0 ? name : t("labels.login"));
|
|
13377
13496
|
};
|
|
13378
13497
|
|
|
13379
|
-
var _path$
|
|
13380
|
-
function _extends$
|
|
13498
|
+
var _path$u, _path2$3;
|
|
13499
|
+
function _extends$w() { _extends$w = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
|
|
13381
13500
|
function SvgEmailVerify(props) {
|
|
13382
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13501
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
13383
13502
|
className: "plc-w-6 plc-h-6",
|
|
13384
13503
|
viewBox: "0 0 700 700",
|
|
13385
13504
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13386
|
-
}, props), _path$
|
|
13505
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13387
13506
|
d: "M583.01 231.93a15.008 15.008 0 00-.887-3.875c-.562-1.254-1.129-2.508-1.695-3.762a14.686 14.686 0 00-1.898-1.789c-.438-.437-.653-1.027-1.153-1.414l-56.266-44.164v-52.484a15.555 15.555 0 00-15.554-15.555H434.56l-74.945-58.895a15.547 15.547 0 00-19.227 0l-74.945 58.895h-70.996a15.555 15.555 0 00-15.555 15.555v52.484l-56.266 44.16c-.496.39-.715.996-1.152 1.43v.004a13.37 13.37 0 00-1.898 1.773c-.22.426-.414.86-.59 1.305a14.158 14.158 0 00-1.106 2.457 15.009 15.009 0 00-.886 3.875c0 .48-.329.918-.329 1.398l.004 264.45a15.555 15.555 0 0015.555 15.555h435.55a15.555 15.555 0 0015.555-15.555v-264.45c0-.48-.278-.918-.325-1.398zm-41.176.809l-20.723 14.809v-31.11zm-191.83-150.73l34.223 26.883h-68.445zm-140 57.992h280v124.45c.07 1.593.383 3.168.934 4.664l-140.93 100.66-140.46-100.33c.214-.77.37-1.555.464-2.348zm-31.109 107.55l-20.719-14.81 20.719-16.27zm-31.113 234.67V263.56l193.18 137.99a15.562 15.562 0 0018.078 0l193.18-137.99v218.66z"
|
|
13388
13507
|
})), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13389
13508
|
d: "M324.33 291.81a15.56 15.56 0 0020.582-.297l85.555-77.777a15.56 15.56 0 00-20.938-23.023l-75.398 68.539-44.023-37.723a15.54 15.54 0 00-11.46-4.106 15.553 15.553 0 00-8.758 27.718z"
|
|
@@ -13413,25 +13532,25 @@ const LoginRequestLoginToken = _ref => {
|
|
|
13413
13532
|
};
|
|
13414
13533
|
|
|
13415
13534
|
const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
13416
|
-
store: store$
|
|
13535
|
+
store: store$n
|
|
13417
13536
|
}, props));
|
|
13418
13537
|
|
|
13419
13538
|
const LoginUsername = props => /*#__PURE__*/React__default['default'].createElement(UserNameInput, Object.assign({
|
|
13420
|
-
store: store$
|
|
13539
|
+
store: store$n
|
|
13421
13540
|
}, props));
|
|
13422
13541
|
|
|
13423
13542
|
const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
13424
|
-
store: store$
|
|
13543
|
+
store: store$n
|
|
13425
13544
|
}, props));
|
|
13426
13545
|
|
|
13427
|
-
var _path$
|
|
13428
|
-
function _extends$
|
|
13546
|
+
var _path$t;
|
|
13547
|
+
function _extends$v() { _extends$v = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
|
|
13429
13548
|
function SvgCheck(props) {
|
|
13430
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13549
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
13431
13550
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13432
13551
|
fill: "currentColor",
|
|
13433
13552
|
viewBox: "0 0 20 20"
|
|
13434
|
-
}, props), _path$
|
|
13553
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13435
13554
|
fillRule: "evenodd",
|
|
13436
13555
|
d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
|
|
13437
13556
|
clipRule: "evenodd"
|
|
@@ -13497,7 +13616,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
|
|
|
13497
13616
|
var FacebookLogin = unwrapExports(facebookLoginRenderProps);
|
|
13498
13617
|
facebookLoginRenderProps.FacebookLogin;
|
|
13499
13618
|
|
|
13500
|
-
const initialState$
|
|
13619
|
+
const initialState$m = {
|
|
13501
13620
|
email: "",
|
|
13502
13621
|
password: "",
|
|
13503
13622
|
firstName: "",
|
|
@@ -13518,10 +13637,10 @@ const initialState$l = {
|
|
|
13518
13637
|
content: ""
|
|
13519
13638
|
}
|
|
13520
13639
|
};
|
|
13521
|
-
const store$
|
|
13640
|
+
const store$m = /*#__PURE__*/React.createContext(initialState$m);
|
|
13522
13641
|
const {
|
|
13523
|
-
Provider: Provider$
|
|
13524
|
-
} = store$
|
|
13642
|
+
Provider: Provider$m
|
|
13643
|
+
} = store$m;
|
|
13525
13644
|
const RegisterContainer = _ref => {
|
|
13526
13645
|
let {
|
|
13527
13646
|
style,
|
|
@@ -13733,7 +13852,7 @@ const RegisterContainer = _ref => {
|
|
|
13733
13852
|
alert: action.payload
|
|
13734
13853
|
});
|
|
13735
13854
|
case RESET_LOGIN_FORM:
|
|
13736
|
-
return initialState$
|
|
13855
|
+
return initialState$m;
|
|
13737
13856
|
case DISABLE_REGISTRATION_BUTTON:
|
|
13738
13857
|
return lib_7({
|
|
13739
13858
|
...state,
|
|
@@ -13749,13 +13868,13 @@ const RegisterContainer = _ref => {
|
|
|
13749
13868
|
default:
|
|
13750
13869
|
return state;
|
|
13751
13870
|
}
|
|
13752
|
-
}, initialState$
|
|
13871
|
+
}, initialState$m);
|
|
13753
13872
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
13754
13873
|
style: {
|
|
13755
13874
|
...style
|
|
13756
13875
|
},
|
|
13757
13876
|
className: `pelcro-container pelcro-register-container ${className}`
|
|
13758
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
13877
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$m, {
|
|
13759
13878
|
value: {
|
|
13760
13879
|
state,
|
|
13761
13880
|
dispatch
|
|
@@ -13763,12 +13882,12 @@ const RegisterContainer = _ref => {
|
|
|
13763
13882
|
}, children.length ? children.map((child, i) => {
|
|
13764
13883
|
if (child) {
|
|
13765
13884
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
13766
|
-
store: store$
|
|
13885
|
+
store: store$m,
|
|
13767
13886
|
key: i
|
|
13768
13887
|
});
|
|
13769
13888
|
}
|
|
13770
13889
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
13771
|
-
store: store$
|
|
13890
|
+
store: store$m
|
|
13772
13891
|
})));
|
|
13773
13892
|
};
|
|
13774
13893
|
|
|
@@ -13782,13 +13901,13 @@ function hasSecurityTokenEnabled$1() {
|
|
|
13782
13901
|
return hasSecuritySdkLoaded;
|
|
13783
13902
|
}
|
|
13784
13903
|
|
|
13785
|
-
var _path$
|
|
13786
|
-
function _extends$
|
|
13904
|
+
var _path$s;
|
|
13905
|
+
function _extends$u() { _extends$u = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
|
|
13787
13906
|
function SvgFacebookLogo(props) {
|
|
13788
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13907
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
13789
13908
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13790
13909
|
viewBox: "88.428 12.828 107.543 207.085"
|
|
13791
|
-
}, props), _path$
|
|
13910
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13792
13911
|
d: "M158.232 219.912v-94.461h31.707l4.747-36.813h-36.454V65.134c0-10.658 2.96-17.922 18.245-17.922l19.494-.009V14.278c-3.373-.447-14.944-1.449-28.406-1.449-28.106 0-47.348 17.155-47.348 48.661v27.149H88.428v36.813h31.788v94.461l38.016-.001z",
|
|
13793
13912
|
fill: "#3c5a9a"
|
|
13794
13913
|
})));
|
|
@@ -13805,10 +13924,10 @@ const FacebookLoginButton = _ref => {
|
|
|
13805
13924
|
const facebookLoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id;
|
|
13806
13925
|
const {
|
|
13807
13926
|
dispatch: loginDispatch
|
|
13808
|
-
} = React.useContext(store$
|
|
13927
|
+
} = React.useContext(store$n);
|
|
13809
13928
|
const {
|
|
13810
13929
|
dispatch: registerDispatch
|
|
13811
|
-
} = React.useContext(store$
|
|
13930
|
+
} = React.useContext(store$m);
|
|
13812
13931
|
const onSuccess = facebookUser => {
|
|
13813
13932
|
loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
|
|
13814
13933
|
type: HANDLE_SOCIAL_LOGIN,
|
|
@@ -13858,13 +13977,13 @@ var googleLogin = createCommonjsModule(function (module, exports) {
|
|
|
13858
13977
|
unwrapExports(googleLogin);
|
|
13859
13978
|
var googleLogin_1 = googleLogin.GoogleLogin;
|
|
13860
13979
|
|
|
13861
|
-
var _path$
|
|
13862
|
-
function _extends$
|
|
13980
|
+
var _path$r, _path2$2, _path3$1, _path4;
|
|
13981
|
+
function _extends$t() { _extends$t = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
|
|
13863
13982
|
function SvgGoogleLogo(props) {
|
|
13864
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
13983
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
13865
13984
|
viewBox: "0 0 24 24",
|
|
13866
13985
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13867
|
-
}, props), _path$
|
|
13986
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
13868
13987
|
fill: "#4285F4",
|
|
13869
13988
|
d: "M23.745 12.27c0-.79-.07-1.54-.19-2.27h-11.3v4.51h6.47c-.29 1.48-1.14 2.73-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"
|
|
13870
13989
|
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -13968,10 +14087,10 @@ const GoogleLoginButton = _ref => {
|
|
|
13968
14087
|
const googleClientId = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.google_app_id;
|
|
13969
14088
|
const {
|
|
13970
14089
|
dispatch: loginDispatch
|
|
13971
|
-
} = React.useContext(store$
|
|
14090
|
+
} = React.useContext(store$n);
|
|
13972
14091
|
const {
|
|
13973
14092
|
dispatch: registerDispatch
|
|
13974
|
-
} = React.useContext(store$
|
|
14093
|
+
} = React.useContext(store$m);
|
|
13975
14094
|
React.useEffect(() => {
|
|
13976
14095
|
gapi.load("client:auth2", () => {
|
|
13977
14096
|
gapi.auth2.init({
|
|
@@ -14022,13 +14141,13 @@ const GoogleLoginButton = _ref => {
|
|
|
14022
14141
|
}) : null;
|
|
14023
14142
|
};
|
|
14024
14143
|
|
|
14025
|
-
var _path$
|
|
14026
|
-
function _extends$
|
|
14144
|
+
var _path$q;
|
|
14145
|
+
function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
|
|
14027
14146
|
function SvgAuth0Logo(props) {
|
|
14028
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14147
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
14029
14148
|
viewBox: "0 0 256 285",
|
|
14030
14149
|
xmlns: "http://www.w3.org/2000/svg"
|
|
14031
|
-
}, props), _path$
|
|
14150
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14032
14151
|
d: "M220.412 0h-92.415l28.562 89.006h92.416l-74.77 53.077 28.57 89.511c48.128-35.06 63.854-88.12 46.208-142.588L220.413 0zM7.018 89.006h92.416L127.997 0H35.589L7.019 89.006c-17.655 54.468-1.92 107.529 46.207 142.588l28.563-89.51-74.77-53.078zm46.208 142.588l74.77 52.97 74.77-52.97-74.77-53.847-74.77 53.847z"
|
|
14033
14152
|
})));
|
|
14034
14153
|
}
|
|
@@ -14066,10 +14185,10 @@ const Auth0LoginButton = _ref => {
|
|
|
14066
14185
|
}, [auth0Enabled, auth0Loaded]);
|
|
14067
14186
|
const {
|
|
14068
14187
|
dispatch: loginDispatch
|
|
14069
|
-
} = React.useContext(store$
|
|
14188
|
+
} = React.useContext(store$n);
|
|
14070
14189
|
const {
|
|
14071
14190
|
dispatch: registerDispatch
|
|
14072
|
-
} = React.useContext(store$
|
|
14191
|
+
} = React.useContext(store$m);
|
|
14073
14192
|
function handleClick() {
|
|
14074
14193
|
var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
|
|
14075
14194
|
if (!auth0Loaded) {
|
|
@@ -14212,13 +14331,13 @@ function LoginView(props) {
|
|
|
14212
14331
|
}))));
|
|
14213
14332
|
}
|
|
14214
14333
|
|
|
14215
|
-
var _path$
|
|
14216
|
-
function _extends$
|
|
14334
|
+
var _path$p, _path2$1, _path3;
|
|
14335
|
+
function _extends$r() { _extends$r = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
|
|
14217
14336
|
function SvgPelcroAuthorship(props) {
|
|
14218
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
14337
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
14219
14338
|
xmlns: "http://www.w3.org/2000/svg",
|
|
14220
14339
|
viewBox: "0 -80.652 497.072 179.991"
|
|
14221
|
-
}, props), _path$
|
|
14340
|
+
}, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
14222
14341
|
fill: "none",
|
|
14223
14342
|
stroke: "#4a4a4a",
|
|
14224
14343
|
d: "M487.89 42.299c0 13.158-10.671 23.829-23.829 23.829H37.074c-13.162 0-23.832-10.671-23.832-23.829v-63.552c0-13.158 10.67-23.831 23.832-23.831H464.06c13.158 0 23.829 10.672 23.829 23.831l.001 63.552z"
|
|
@@ -14390,11 +14509,11 @@ function LoginModal(_ref) {
|
|
|
14390
14509
|
LoginModal.viewId = "login";
|
|
14391
14510
|
|
|
14392
14511
|
const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
14393
|
-
store: store$
|
|
14512
|
+
store: store$m
|
|
14394
14513
|
}, props));
|
|
14395
14514
|
|
|
14396
14515
|
const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
14397
|
-
store: store$
|
|
14516
|
+
store: store$m
|
|
14398
14517
|
}, props));
|
|
14399
14518
|
|
|
14400
14519
|
const RegisterButton = _ref => {
|
|
@@ -14414,7 +14533,7 @@ const RegisterButton = _ref => {
|
|
|
14414
14533
|
buttonDisabled
|
|
14415
14534
|
},
|
|
14416
14535
|
dispatch
|
|
14417
|
-
} = React.useContext(store$
|
|
14536
|
+
} = React.useContext(store$m);
|
|
14418
14537
|
const {
|
|
14419
14538
|
t
|
|
14420
14539
|
} = useTranslation("register");
|
|
@@ -14512,7 +14631,7 @@ function FirstName(_ref) {
|
|
|
14512
14631
|
}
|
|
14513
14632
|
|
|
14514
14633
|
const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
14515
|
-
store: store$
|
|
14634
|
+
store: store$m
|
|
14516
14635
|
}, props));
|
|
14517
14636
|
|
|
14518
14637
|
function LastName(_ref) {
|
|
@@ -14590,7 +14709,7 @@ function LastName(_ref) {
|
|
|
14590
14709
|
}
|
|
14591
14710
|
|
|
14592
14711
|
const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
14593
|
-
store: store$
|
|
14712
|
+
store: store$m
|
|
14594
14713
|
}, props));
|
|
14595
14714
|
|
|
14596
14715
|
function Phone(_ref) {
|
|
@@ -14871,7 +14990,7 @@ function TextInput(_ref) {
|
|
|
14871
14990
|
|
|
14872
14991
|
const RegisterTextInput = props => {
|
|
14873
14992
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
14874
|
-
store: store$
|
|
14993
|
+
store: store$m
|
|
14875
14994
|
}));
|
|
14876
14995
|
};
|
|
14877
14996
|
|
|
@@ -18047,7 +18166,7 @@ class CybersourceGateway {
|
|
|
18047
18166
|
*/
|
|
18048
18167
|
|
|
18049
18168
|
/** @type {PaymentStateType} */
|
|
18050
|
-
const initialState$
|
|
18169
|
+
const initialState$l = {
|
|
18051
18170
|
disableSubmit: false,
|
|
18052
18171
|
isLoading: false,
|
|
18053
18172
|
disableCouponButton: false,
|
|
@@ -18074,15 +18193,16 @@ const initialState$k = {
|
|
|
18074
18193
|
year: "",
|
|
18075
18194
|
passwordError: null,
|
|
18076
18195
|
cyberSourceSessionId: null,
|
|
18196
|
+
isDefault: false,
|
|
18077
18197
|
alert: {
|
|
18078
18198
|
type: "error",
|
|
18079
18199
|
content: ""
|
|
18080
18200
|
}
|
|
18081
18201
|
};
|
|
18082
|
-
const store$
|
|
18202
|
+
const store$l = /*#__PURE__*/React.createContext(initialState$l);
|
|
18083
18203
|
const {
|
|
18084
|
-
Provider: Provider$
|
|
18085
|
-
} = store$
|
|
18204
|
+
Provider: Provider$l
|
|
18205
|
+
} = store$l;
|
|
18086
18206
|
const PaymentMethodContainerWithoutStripe = _ref => {
|
|
18087
18207
|
var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isGift, _props$isRenewingGift, _props$invoice, _window$Pelcro, _window$Pelcro$uiSett;
|
|
18088
18208
|
let {
|
|
@@ -18110,7 +18230,9 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18110
18230
|
selectedDonationAmount,
|
|
18111
18231
|
customDonationAmount,
|
|
18112
18232
|
isAuthenticated,
|
|
18113
|
-
switchView
|
|
18233
|
+
switchView,
|
|
18234
|
+
paymentMethodToEdit,
|
|
18235
|
+
paymentMethodToDelete
|
|
18114
18236
|
} = usePelcro();
|
|
18115
18237
|
const {
|
|
18116
18238
|
whenUserReady
|
|
@@ -18225,7 +18347,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18225
18347
|
purchase(new CybersourceGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, state, dispatch);
|
|
18226
18348
|
} else if (type === "invoicePayment") {
|
|
18227
18349
|
payInvoice(new CybersourceGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, dispatch);
|
|
18228
|
-
} else if (type === "updatePaymentSource") {
|
|
18350
|
+
} else if (type === "createPaymentSource" || type === "updatePaymentSource") {
|
|
18229
18351
|
createNewCybersourceCard();
|
|
18230
18352
|
}
|
|
18231
18353
|
function createNewCybersourceCard() {
|
|
@@ -18555,7 +18677,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18555
18677
|
purchase(new TapGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, state, dispatch);
|
|
18556
18678
|
} else if (type === "invoicePayment") {
|
|
18557
18679
|
payInvoice(new TapGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, dispatch);
|
|
18558
|
-
} else if (type === "updatePaymentSource") {
|
|
18680
|
+
} else if (type === "createPaymentSource" || type === "updatePaymentSource") {
|
|
18559
18681
|
createNewTapCard();
|
|
18560
18682
|
}
|
|
18561
18683
|
function createNewTapCard() {
|
|
@@ -18766,14 +18888,121 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
18766
18888
|
purchase(new VantivGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, state, dispatch);
|
|
18767
18889
|
} else if (type === "invoicePayment") {
|
|
18768
18890
|
payInvoice(new VantivGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, dispatch);
|
|
18769
|
-
} else if (type === "
|
|
18891
|
+
} else if (type === "createPaymentSource") {
|
|
18770
18892
|
createNewVantivCard();
|
|
18893
|
+
} else if (type === "updatePaymentSource") {
|
|
18894
|
+
updateVantivCard();
|
|
18895
|
+
} else if (type === "deletePaymentSource") {
|
|
18896
|
+
replaceVantivCard();
|
|
18771
18897
|
}
|
|
18772
18898
|
function createNewVantivCard() {
|
|
18773
|
-
window.Pelcro.
|
|
18899
|
+
window.Pelcro.paymentMethods.create({
|
|
18900
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
18901
|
+
token: paymentRequest,
|
|
18902
|
+
gateway: "vantiv"
|
|
18903
|
+
}, (err, res) => {
|
|
18904
|
+
dispatch({
|
|
18905
|
+
type: DISABLE_SUBMIT,
|
|
18906
|
+
payload: false
|
|
18907
|
+
});
|
|
18908
|
+
dispatch({
|
|
18909
|
+
type: LOADING,
|
|
18910
|
+
payload: false
|
|
18911
|
+
});
|
|
18912
|
+
if (err) {
|
|
18913
|
+
onFailure(err);
|
|
18914
|
+
return dispatch({
|
|
18915
|
+
type: SHOW_ALERT,
|
|
18916
|
+
payload: {
|
|
18917
|
+
type: "error",
|
|
18918
|
+
content: getErrorMessages(err)
|
|
18919
|
+
}
|
|
18920
|
+
});
|
|
18921
|
+
}
|
|
18922
|
+
dispatch({
|
|
18923
|
+
type: SHOW_ALERT,
|
|
18924
|
+
payload: {
|
|
18925
|
+
type: "success",
|
|
18926
|
+
content: t("messages.sourceUpdated")
|
|
18927
|
+
}
|
|
18928
|
+
});
|
|
18929
|
+
onSuccess(res);
|
|
18930
|
+
});
|
|
18931
|
+
}
|
|
18932
|
+
function replaceVantivCard() {
|
|
18933
|
+
const {
|
|
18934
|
+
id: paymentMethodId
|
|
18935
|
+
} = paymentMethodToDelete;
|
|
18936
|
+
window.Pelcro.paymentMethods.create({
|
|
18774
18937
|
auth_token: window.Pelcro.user.read().auth_token,
|
|
18775
18938
|
token: paymentRequest,
|
|
18776
18939
|
gateway: "vantiv"
|
|
18940
|
+
}, (err, res) => {
|
|
18941
|
+
dispatch({
|
|
18942
|
+
type: DISABLE_SUBMIT,
|
|
18943
|
+
payload: false
|
|
18944
|
+
});
|
|
18945
|
+
dispatch({
|
|
18946
|
+
type: LOADING,
|
|
18947
|
+
payload: false
|
|
18948
|
+
});
|
|
18949
|
+
if (err) {
|
|
18950
|
+
onFailure(err);
|
|
18951
|
+
return dispatch({
|
|
18952
|
+
type: SHOW_ALERT,
|
|
18953
|
+
payload: {
|
|
18954
|
+
type: "error",
|
|
18955
|
+
content: getErrorMessages(err)
|
|
18956
|
+
}
|
|
18957
|
+
});
|
|
18958
|
+
}
|
|
18959
|
+
window.Pelcro.paymentMethods.deletePaymentMethod({
|
|
18960
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
18961
|
+
payment_method_id: paymentMethodId
|
|
18962
|
+
}, (err, res) => {
|
|
18963
|
+
if (err) {
|
|
18964
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
18965
|
+
return dispatch({
|
|
18966
|
+
type: SHOW_ALERT,
|
|
18967
|
+
payload: {
|
|
18968
|
+
type: "error",
|
|
18969
|
+
content: getErrorMessages(err)
|
|
18970
|
+
}
|
|
18971
|
+
});
|
|
18972
|
+
}
|
|
18973
|
+
onSuccess(res);
|
|
18974
|
+
});
|
|
18975
|
+
});
|
|
18976
|
+
}
|
|
18977
|
+
function updateVantivCard() {
|
|
18978
|
+
const {
|
|
18979
|
+
id: paymentMethodId
|
|
18980
|
+
} = paymentMethodToEdit;
|
|
18981
|
+
const {
|
|
18982
|
+
paypageRegistrationId,
|
|
18983
|
+
bin,
|
|
18984
|
+
type,
|
|
18985
|
+
firstSix,
|
|
18986
|
+
lastFour,
|
|
18987
|
+
expMonth,
|
|
18988
|
+
expYear
|
|
18989
|
+
} = paymentRequest;
|
|
18990
|
+
const {
|
|
18991
|
+
isDefault
|
|
18992
|
+
} = state;
|
|
18993
|
+
const fourDigitExpYear = getFourDigitYear(Number(expYear)).toString();
|
|
18994
|
+
window.Pelcro.paymentMethods.update({
|
|
18995
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
18996
|
+
payment_method_id: paymentMethodId,
|
|
18997
|
+
gateway: "vantiv",
|
|
18998
|
+
paypageRegistrationId: paypageRegistrationId,
|
|
18999
|
+
bin: bin,
|
|
19000
|
+
type: type,
|
|
19001
|
+
firstSix: firstSix,
|
|
19002
|
+
lastFour: lastFour,
|
|
19003
|
+
exp_month: expMonth,
|
|
19004
|
+
exp_year: fourDigitExpYear,
|
|
19005
|
+
is_default: isDefault
|
|
18777
19006
|
}, (err, res) => {
|
|
18778
19007
|
dispatch({
|
|
18779
19008
|
type: DISABLE_SUBMIT,
|
|
@@ -19631,7 +19860,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19631
19860
|
}
|
|
19632
19861
|
});
|
|
19633
19862
|
};
|
|
19634
|
-
const
|
|
19863
|
+
const createPaymentSource = (state, dispatch) => {
|
|
19635
19864
|
return stripe.createSource({
|
|
19636
19865
|
type: "card"
|
|
19637
19866
|
}).then(_ref8 => {
|
|
@@ -19652,7 +19881,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19652
19881
|
}
|
|
19653
19882
|
});
|
|
19654
19883
|
}
|
|
19655
|
-
window.Pelcro.
|
|
19884
|
+
window.Pelcro.paymentMethods.create({
|
|
19656
19885
|
auth_token: window.Pelcro.user.read().auth_token,
|
|
19657
19886
|
token: source.id
|
|
19658
19887
|
}, (err, res) => {
|
|
@@ -19685,13 +19914,127 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19685
19914
|
});
|
|
19686
19915
|
});
|
|
19687
19916
|
};
|
|
19688
|
-
const
|
|
19689
|
-
|
|
19690
|
-
|
|
19691
|
-
|
|
19692
|
-
|
|
19693
|
-
|
|
19694
|
-
|
|
19917
|
+
const updatePaymentSource = (state, dispatch) => {
|
|
19918
|
+
const {
|
|
19919
|
+
isDefault,
|
|
19920
|
+
month,
|
|
19921
|
+
year
|
|
19922
|
+
} = state;
|
|
19923
|
+
const {
|
|
19924
|
+
id: paymentMethodId
|
|
19925
|
+
} = paymentMethodToEdit;
|
|
19926
|
+
window.Pelcro.paymentMethods.update({
|
|
19927
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
19928
|
+
payment_method_id: paymentMethodId,
|
|
19929
|
+
gateway: "stripe",
|
|
19930
|
+
exp_month: month,
|
|
19931
|
+
exp_year: year,
|
|
19932
|
+
is_default: isDefault
|
|
19933
|
+
}, (err, res) => {
|
|
19934
|
+
dispatch({
|
|
19935
|
+
type: DISABLE_SUBMIT,
|
|
19936
|
+
payload: false
|
|
19937
|
+
});
|
|
19938
|
+
dispatch({
|
|
19939
|
+
type: LOADING,
|
|
19940
|
+
payload: false
|
|
19941
|
+
});
|
|
19942
|
+
if (err) {
|
|
19943
|
+
onFailure(err);
|
|
19944
|
+
return dispatch({
|
|
19945
|
+
type: SHOW_ALERT,
|
|
19946
|
+
payload: {
|
|
19947
|
+
type: "error",
|
|
19948
|
+
content: getErrorMessages(err)
|
|
19949
|
+
}
|
|
19950
|
+
});
|
|
19951
|
+
}
|
|
19952
|
+
dispatch({
|
|
19953
|
+
type: SHOW_ALERT,
|
|
19954
|
+
payload: {
|
|
19955
|
+
type: "success",
|
|
19956
|
+
content: t("messages.sourceUpdated")
|
|
19957
|
+
}
|
|
19958
|
+
});
|
|
19959
|
+
onSuccess(res);
|
|
19960
|
+
});
|
|
19961
|
+
};
|
|
19962
|
+
const replacePaymentSource = (state, dispatch) => {
|
|
19963
|
+
const {
|
|
19964
|
+
id: paymentMethodId
|
|
19965
|
+
} = paymentMethodToDelete;
|
|
19966
|
+
return stripe.createSource({
|
|
19967
|
+
type: "card"
|
|
19968
|
+
}).then(_ref9 => {
|
|
19969
|
+
var _source$card3;
|
|
19970
|
+
let {
|
|
19971
|
+
source,
|
|
19972
|
+
error
|
|
19973
|
+
} = _ref9;
|
|
19974
|
+
if (error) {
|
|
19975
|
+
return handlePaymentError(error);
|
|
19976
|
+
}
|
|
19977
|
+
|
|
19978
|
+
// We don't support source creation for 3D secure yet
|
|
19979
|
+
if ((source === null || source === void 0 ? void 0 : (_source$card3 = source.card) === null || _source$card3 === void 0 ? void 0 : _source$card3.three_d_secure) === "required") {
|
|
19980
|
+
return handlePaymentError({
|
|
19981
|
+
error: {
|
|
19982
|
+
message: t("messages.cardAuthNotSupported")
|
|
19983
|
+
}
|
|
19984
|
+
});
|
|
19985
|
+
}
|
|
19986
|
+
window.Pelcro.paymentMethods.create({
|
|
19987
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
19988
|
+
token: source.id
|
|
19989
|
+
}, (err, res) => {
|
|
19990
|
+
if (err) {
|
|
19991
|
+
onFailure(err);
|
|
19992
|
+
return dispatch({
|
|
19993
|
+
type: SHOW_ALERT,
|
|
19994
|
+
payload: {
|
|
19995
|
+
type: "error",
|
|
19996
|
+
content: getErrorMessages(err)
|
|
19997
|
+
}
|
|
19998
|
+
});
|
|
19999
|
+
}
|
|
20000
|
+
if (res) {
|
|
20001
|
+
setTimeout(() => {
|
|
20002
|
+
window.Pelcro.paymentMethods.deletePaymentMethod({
|
|
20003
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
20004
|
+
payment_method_id: paymentMethodId
|
|
20005
|
+
}, (err, res) => {
|
|
20006
|
+
dispatch({
|
|
20007
|
+
type: DISABLE_SUBMIT,
|
|
20008
|
+
payload: false
|
|
20009
|
+
});
|
|
20010
|
+
dispatch({
|
|
20011
|
+
type: LOADING,
|
|
20012
|
+
payload: false
|
|
20013
|
+
});
|
|
20014
|
+
if (err) {
|
|
20015
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
20016
|
+
return dispatch({
|
|
20017
|
+
type: SHOW_ALERT,
|
|
20018
|
+
payload: {
|
|
20019
|
+
type: "error",
|
|
20020
|
+
content: getErrorMessages(err)
|
|
20021
|
+
}
|
|
20022
|
+
});
|
|
20023
|
+
}
|
|
20024
|
+
onSuccess(res);
|
|
20025
|
+
});
|
|
20026
|
+
}, 1000);
|
|
20027
|
+
}
|
|
20028
|
+
});
|
|
20029
|
+
});
|
|
20030
|
+
};
|
|
20031
|
+
const updatePaymentRequest = state => {
|
|
20032
|
+
var _state$paymentRequest;
|
|
20033
|
+
state === null || state === void 0 ? void 0 : (_state$paymentRequest = state.paymentRequest) === null || _state$paymentRequest === void 0 ? void 0 : _state$paymentRequest.update({
|
|
20034
|
+
total: {
|
|
20035
|
+
label: plan.nickname || plan.description,
|
|
20036
|
+
amount: state.updatedPrice
|
|
20037
|
+
}
|
|
19695
20038
|
});
|
|
19696
20039
|
};
|
|
19697
20040
|
const sendRegisterRequest = (state, callback) => {
|
|
@@ -19764,12 +20107,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19764
20107
|
}
|
|
19765
20108
|
stripe.createSource({
|
|
19766
20109
|
type: "card"
|
|
19767
|
-
}).then(
|
|
19768
|
-
var
|
|
20110
|
+
}).then(_ref10 => {
|
|
20111
|
+
var _ref11, _ref12, _state$updatedPrice;
|
|
19769
20112
|
let {
|
|
19770
20113
|
source,
|
|
19771
20114
|
error
|
|
19772
|
-
} =
|
|
20115
|
+
} = _ref10;
|
|
19773
20116
|
if (error) {
|
|
19774
20117
|
return handlePaymentError(error);
|
|
19775
20118
|
}
|
|
@@ -19788,7 +20131,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
19788
20131
|
return total + item.price * item.quantity;
|
|
19789
20132
|
}, 0);
|
|
19790
20133
|
};
|
|
19791
|
-
(
|
|
20134
|
+
(_ref11 = (_ref12 = (_state$updatedPrice = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice !== void 0 ? _state$updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref12 !== void 0 ? _ref12 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref11 !== void 0 ? _ref11 : getOrderItemsTotal();
|
|
19792
20135
|
return handlePayment(source);
|
|
19793
20136
|
}).catch(error => {
|
|
19794
20137
|
return handlePaymentError(error);
|
|
@@ -20032,9 +20375,15 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20032
20375
|
});
|
|
20033
20376
|
}
|
|
20034
20377
|
}
|
|
20378
|
+
if (type === "createPaymentSource") {
|
|
20379
|
+
return createPaymentSource(state, dispatch);
|
|
20380
|
+
}
|
|
20035
20381
|
if (type === "updatePaymentSource") {
|
|
20036
20382
|
return updatePaymentSource(state, dispatch);
|
|
20037
20383
|
}
|
|
20384
|
+
if (type === "deletePaymentSource") {
|
|
20385
|
+
return replacePaymentSource(state, dispatch);
|
|
20386
|
+
}
|
|
20038
20387
|
if (!isAuthenticated() && plan.type === "donation") {
|
|
20039
20388
|
return sendRegisterRequest(state, () => submitPayment(state));
|
|
20040
20389
|
} else {
|
|
@@ -20180,16 +20529,26 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20180
20529
|
...state,
|
|
20181
20530
|
cyberSourceSessionId: action.payload
|
|
20182
20531
|
});
|
|
20532
|
+
case HANDLE_CHECKBOX_CHANGE:
|
|
20533
|
+
return lib_7({
|
|
20534
|
+
...state,
|
|
20535
|
+
...action.payload
|
|
20536
|
+
});
|
|
20537
|
+
case SET_IS_DEFAULT_PAYMENT_METHOD:
|
|
20538
|
+
return lib_7({
|
|
20539
|
+
...state,
|
|
20540
|
+
...action.payload
|
|
20541
|
+
});
|
|
20183
20542
|
default:
|
|
20184
20543
|
return state;
|
|
20185
20544
|
}
|
|
20186
|
-
}, initialState$
|
|
20545
|
+
}, initialState$l);
|
|
20187
20546
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20188
20547
|
style: {
|
|
20189
20548
|
...style
|
|
20190
20549
|
},
|
|
20191
20550
|
className: `pelcro-container pelcro-payment-container ${className}`
|
|
20192
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
20551
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$l, {
|
|
20193
20552
|
value: {
|
|
20194
20553
|
state,
|
|
20195
20554
|
dispatch
|
|
@@ -20197,12 +20556,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
|
|
|
20197
20556
|
}, children.length ? children.map((child, i) => {
|
|
20198
20557
|
if (child) {
|
|
20199
20558
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
20200
|
-
store: store$
|
|
20559
|
+
store: store$l,
|
|
20201
20560
|
key: i
|
|
20202
20561
|
});
|
|
20203
20562
|
}
|
|
20204
20563
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
20205
|
-
store: store$
|
|
20564
|
+
store: store$l
|
|
20206
20565
|
})));
|
|
20207
20566
|
};
|
|
20208
20567
|
const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
|
|
@@ -20223,11 +20582,11 @@ const PaymentMethodContainer = props => {
|
|
|
20223
20582
|
stripeAccount: window.Pelcro.site.read().account_id,
|
|
20224
20583
|
locale: getPageOrDefaultLanguage()
|
|
20225
20584
|
}, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
|
|
20226
|
-
store: store$
|
|
20585
|
+
store: store$l
|
|
20227
20586
|
}, props))));
|
|
20228
20587
|
} else if (cardProcessor !== "stripe") {
|
|
20229
20588
|
return /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainerWithoutStripe, Object.assign({
|
|
20230
|
-
store: store$
|
|
20589
|
+
store: store$l
|
|
20231
20590
|
}, props));
|
|
20232
20591
|
}
|
|
20233
20592
|
return null;
|
|
@@ -20387,7 +20746,7 @@ const PelcroPaymentRequestButton = props => {
|
|
|
20387
20746
|
currentPlan,
|
|
20388
20747
|
updatedPrice
|
|
20389
20748
|
}
|
|
20390
|
-
} = React.useContext(store$
|
|
20749
|
+
} = React.useContext(store$l);
|
|
20391
20750
|
const updatePaymentRequest = () => {
|
|
20392
20751
|
// Make sure payment request is up to date, eg. user added a coupon code.
|
|
20393
20752
|
paymentRequest === null || paymentRequest === void 0 ? void 0 : paymentRequest.update({
|
|
@@ -20412,7 +20771,10 @@ const PelcroPaymentRequestButton = props => {
|
|
|
20412
20771
|
}
|
|
20413
20772
|
return null;
|
|
20414
20773
|
};
|
|
20415
|
-
const CheckoutForm =
|
|
20774
|
+
const CheckoutForm = _ref => {
|
|
20775
|
+
let {
|
|
20776
|
+
type
|
|
20777
|
+
} = _ref;
|
|
20416
20778
|
const {
|
|
20417
20779
|
selectedPaymentMethodId
|
|
20418
20780
|
} = usePelcro();
|
|
@@ -20439,16 +20801,31 @@ const CheckoutForm = () => {
|
|
|
20439
20801
|
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20440
20802
|
className: "plc-w-6/12 plc-pr-4"
|
|
20441
20803
|
}, /*#__PURE__*/React__default['default'].createElement(MonthSelect, {
|
|
20442
|
-
store: store$
|
|
20804
|
+
store: store$l,
|
|
20443
20805
|
placeholder: "Exp Month *"
|
|
20444
20806
|
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20445
20807
|
className: "plc-w-6/12"
|
|
20446
20808
|
}, /*#__PURE__*/React__default['default'].createElement(YearSelect, {
|
|
20447
|
-
store: store$
|
|
20809
|
+
store: store$l,
|
|
20448
20810
|
placeholder: "Exp Year *"
|
|
20449
20811
|
}))));
|
|
20450
20812
|
}
|
|
20451
20813
|
if (cardProcessor === "stripe") {
|
|
20814
|
+
if (type === "updatePaymentSource") {
|
|
20815
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20816
|
+
className: "plc-flex plc-items-end plc-justify-between plc-my-2"
|
|
20817
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20818
|
+
className: "plc-w-6/12 plc-pr-4"
|
|
20819
|
+
}, /*#__PURE__*/React__default['default'].createElement(MonthSelect, {
|
|
20820
|
+
store: store$l,
|
|
20821
|
+
placeholder: "Exp Month *"
|
|
20822
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
20823
|
+
className: "plc-w-6/12"
|
|
20824
|
+
}, /*#__PURE__*/React__default['default'].createElement(YearSelect, {
|
|
20825
|
+
store: store$l,
|
|
20826
|
+
placeholder: "Exp Year *"
|
|
20827
|
+
})));
|
|
20828
|
+
}
|
|
20452
20829
|
return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(PelcroCardNumber, {
|
|
20453
20830
|
autoFocus: true
|
|
20454
20831
|
}), /*#__PURE__*/React__default['default'].createElement("img", {
|
|
@@ -20478,7 +20855,7 @@ const DiscountedPrice = props => {
|
|
|
20478
20855
|
taxAmount,
|
|
20479
20856
|
percentOff
|
|
20480
20857
|
}
|
|
20481
|
-
} = React.useContext(store$
|
|
20858
|
+
} = React.useContext(store$l);
|
|
20482
20859
|
const {
|
|
20483
20860
|
order,
|
|
20484
20861
|
plan
|
|
@@ -20539,7 +20916,7 @@ const SubmitPaymentMethod = _ref => {
|
|
|
20539
20916
|
month,
|
|
20540
20917
|
year
|
|
20541
20918
|
}
|
|
20542
|
-
} = React.useContext(store$
|
|
20919
|
+
} = React.useContext(store$l);
|
|
20543
20920
|
const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
|
|
20544
20921
|
const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
|
|
20545
20922
|
const priceFormatted = (plan === null || plan === void 0 ? void 0 : plan.type) === "donation" && (selectedDonationAmount || customDonationAmount) ? getFormattedPriceByLocal(selectedDonationAmount ? selectedDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity2 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity2 !== void 0 ? _plan$quantity2 : 1) : customDonationAmount * (plan === null || plan === void 0 ? void 0 : plan.amount) * ((_plan$quantity3 = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity3 !== void 0 ? _plan$quantity3 : 1), plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage()) : getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
|
|
@@ -20573,15 +20950,15 @@ const SubmitPaymentMethod = _ref => {
|
|
|
20573
20950
|
}, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
|
|
20574
20951
|
};
|
|
20575
20952
|
|
|
20576
|
-
var _path$
|
|
20577
|
-
function _extends$
|
|
20953
|
+
var _path$o;
|
|
20954
|
+
function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
|
|
20578
20955
|
function SvgArrowLeft(props) {
|
|
20579
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
20956
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
20580
20957
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20581
20958
|
fill: "none",
|
|
20582
20959
|
viewBox: "0 0 24 24",
|
|
20583
20960
|
stroke: "currentColor"
|
|
20584
|
-
}, props), _path$
|
|
20961
|
+
}, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20585
20962
|
strokeLinecap: "round",
|
|
20586
20963
|
strokeLinejoin: "round",
|
|
20587
20964
|
strokeWidth: 2,
|
|
@@ -20601,7 +20978,7 @@ const ApplyCouponButton = _ref => {
|
|
|
20601
20978
|
disableCouponButton
|
|
20602
20979
|
},
|
|
20603
20980
|
dispatch
|
|
20604
|
-
} = React.useContext(store$
|
|
20981
|
+
} = React.useContext(store$l);
|
|
20605
20982
|
const {
|
|
20606
20983
|
t
|
|
20607
20984
|
} = useTranslation("checkoutForm");
|
|
@@ -20633,7 +21010,7 @@ const CouponCodeField = props => {
|
|
|
20633
21010
|
couponCode,
|
|
20634
21011
|
couponError
|
|
20635
21012
|
}
|
|
20636
|
-
} = React.useContext(store$
|
|
21013
|
+
} = React.useContext(store$l);
|
|
20637
21014
|
const onCouponCodeChange = e => {
|
|
20638
21015
|
dispatch({
|
|
20639
21016
|
type: UPDATE_COUPON_CODE,
|
|
@@ -20659,15 +21036,15 @@ const CouponCodeField = props => {
|
|
|
20659
21036
|
}, props));
|
|
20660
21037
|
};
|
|
20661
21038
|
|
|
20662
|
-
var _path$
|
|
20663
|
-
function _extends$
|
|
21039
|
+
var _path$n;
|
|
21040
|
+
function _extends$p() { _extends$p = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
|
|
20664
21041
|
function SvgTicket(props) {
|
|
20665
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21042
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
20666
21043
|
xmlns: "http://www.w3.org/2000/svg",
|
|
20667
21044
|
fill: "none",
|
|
20668
21045
|
viewBox: "0 0 24 24",
|
|
20669
21046
|
stroke: "currentColor"
|
|
20670
|
-
}, props), _path$
|
|
21047
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
20671
21048
|
strokeLinecap: "round",
|
|
20672
21049
|
strokeLinejoin: "round",
|
|
20673
21050
|
strokeWidth: 2,
|
|
@@ -20685,7 +21062,7 @@ const CouponCode = _ref => {
|
|
|
20685
21062
|
state: {
|
|
20686
21063
|
enableCouponField
|
|
20687
21064
|
}
|
|
20688
|
-
} = React.useContext(store$
|
|
21065
|
+
} = React.useContext(store$l);
|
|
20689
21066
|
const {
|
|
20690
21067
|
t
|
|
20691
21068
|
} = useTranslation("checkoutForm");
|
|
@@ -20909,7 +21286,7 @@ const PaypalSubscribeButton = props => {
|
|
|
20909
21286
|
const {
|
|
20910
21287
|
dispatch,
|
|
20911
21288
|
state
|
|
20912
|
-
} = React.useContext(store$
|
|
21289
|
+
} = React.useContext(store$l);
|
|
20913
21290
|
const {
|
|
20914
21291
|
product,
|
|
20915
21292
|
plan,
|
|
@@ -21025,14 +21402,14 @@ const BankAuthenticationSuccess = () => {
|
|
|
21025
21402
|
}));
|
|
21026
21403
|
};
|
|
21027
21404
|
|
|
21028
|
-
var _path$
|
|
21029
|
-
function _extends$
|
|
21405
|
+
var _path$m;
|
|
21406
|
+
function _extends$o() { _extends$o = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
|
|
21030
21407
|
function SvgLock(props) {
|
|
21031
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
21408
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
21032
21409
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21033
21410
|
viewBox: "0 0 20 20",
|
|
21034
21411
|
fill: "currentColor"
|
|
21035
|
-
}, props), _path$
|
|
21412
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21036
21413
|
fillRule: "evenodd",
|
|
21037
21414
|
d: "M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",
|
|
21038
21415
|
clipRule: "evenodd"
|
|
@@ -21048,7 +21425,7 @@ const SelectedPaymentMethod = () => {
|
|
|
21048
21425
|
state: {
|
|
21049
21426
|
isLoading
|
|
21050
21427
|
}
|
|
21051
|
-
} = React.useContext(store$
|
|
21428
|
+
} = React.useContext(store$l);
|
|
21052
21429
|
const {
|
|
21053
21430
|
switchView,
|
|
21054
21431
|
selectedPaymentMethodId
|
|
@@ -21089,7 +21466,7 @@ const TaxAmount = () => {
|
|
|
21089
21466
|
state: {
|
|
21090
21467
|
taxAmount
|
|
21091
21468
|
}
|
|
21092
|
-
} = React.useContext(store$
|
|
21469
|
+
} = React.useContext(store$l);
|
|
21093
21470
|
const {
|
|
21094
21471
|
plan
|
|
21095
21472
|
} = usePelcro();
|
|
@@ -21107,15 +21484,15 @@ const TaxAmount = () => {
|
|
|
21107
21484
|
};
|
|
21108
21485
|
|
|
21109
21486
|
const IncludeFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
21110
|
-
store: store$
|
|
21487
|
+
store: store$l
|
|
21111
21488
|
}, props));
|
|
21112
21489
|
|
|
21113
21490
|
const IncludeLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
21114
|
-
store: store$
|
|
21491
|
+
store: store$l
|
|
21115
21492
|
}, props));
|
|
21116
21493
|
|
|
21117
21494
|
const IncludePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
21118
|
-
store: store$
|
|
21495
|
+
store: store$l
|
|
21119
21496
|
}, props));
|
|
21120
21497
|
|
|
21121
21498
|
const SubscriptionCreateFreePlanButton = _ref => {
|
|
@@ -21129,7 +21506,7 @@ const SubscriptionCreateFreePlanButton = _ref => {
|
|
|
21129
21506
|
disableSubmit
|
|
21130
21507
|
},
|
|
21131
21508
|
dispatch
|
|
21132
|
-
} = React.useContext(store$
|
|
21509
|
+
} = React.useContext(store$l);
|
|
21133
21510
|
const {
|
|
21134
21511
|
t
|
|
21135
21512
|
} = useTranslation("common");
|
|
@@ -21165,7 +21542,7 @@ const OrderCreateFreeButton = _ref => {
|
|
|
21165
21542
|
disableSubmit
|
|
21166
21543
|
},
|
|
21167
21544
|
dispatch
|
|
21168
|
-
} = React.useContext(store$
|
|
21545
|
+
} = React.useContext(store$l);
|
|
21169
21546
|
const {
|
|
21170
21547
|
t
|
|
21171
21548
|
} = useTranslation("checkoutForm");
|
|
@@ -21191,7 +21568,7 @@ const OrderCreateFreeButton = _ref => {
|
|
|
21191
21568
|
};
|
|
21192
21569
|
|
|
21193
21570
|
const DonationEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
21194
|
-
store: store$
|
|
21571
|
+
store: store$l
|
|
21195
21572
|
}, props));
|
|
21196
21573
|
|
|
21197
21574
|
/**
|
|
@@ -21208,7 +21585,7 @@ const ApplePayButton = _ref => {
|
|
|
21208
21585
|
const {
|
|
21209
21586
|
dispatch,
|
|
21210
21587
|
state
|
|
21211
|
-
} = React.useContext(store$
|
|
21588
|
+
} = React.useContext(store$l);
|
|
21212
21589
|
const {
|
|
21213
21590
|
plan,
|
|
21214
21591
|
invoice,
|
|
@@ -21521,6 +21898,43 @@ const ApplePayButton = _ref => {
|
|
|
21521
21898
|
});
|
|
21522
21899
|
};
|
|
21523
21900
|
|
|
21901
|
+
function PaymentMethodUpdateSetDefault(props) {
|
|
21902
|
+
const {
|
|
21903
|
+
dispatch,
|
|
21904
|
+
state: {
|
|
21905
|
+
isDefault
|
|
21906
|
+
}
|
|
21907
|
+
} = React.useContext(store$l);
|
|
21908
|
+
const {
|
|
21909
|
+
paymentMethodToEdit
|
|
21910
|
+
} = usePelcro();
|
|
21911
|
+
React.useEffect(() => {
|
|
21912
|
+
if (paymentMethodToEdit !== null && paymentMethodToEdit !== void 0 && paymentMethodToEdit.is_default) {
|
|
21913
|
+
dispatch({
|
|
21914
|
+
type: SET_IS_DEFAULT_PAYMENT_METHOD,
|
|
21915
|
+
payload: {
|
|
21916
|
+
isDefault: true
|
|
21917
|
+
}
|
|
21918
|
+
});
|
|
21919
|
+
}
|
|
21920
|
+
}, [paymentMethodToEdit]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
21921
|
+
|
|
21922
|
+
const handleCheckboxChange = e => {
|
|
21923
|
+
dispatch({
|
|
21924
|
+
type: HANDLE_CHECKBOX_CHANGE,
|
|
21925
|
+
payload: {
|
|
21926
|
+
isDefault: e.target.checked
|
|
21927
|
+
}
|
|
21928
|
+
});
|
|
21929
|
+
};
|
|
21930
|
+
return /*#__PURE__*/React__default['default'].createElement(Checkbox, {
|
|
21931
|
+
onChange: e => handleCheckboxChange(e),
|
|
21932
|
+
id: props.id,
|
|
21933
|
+
checked: isDefault,
|
|
21934
|
+
disabled: paymentMethodToEdit === null || paymentMethodToEdit === void 0 ? void 0 : paymentMethodToEdit.is_default
|
|
21935
|
+
}, props.label);
|
|
21936
|
+
}
|
|
21937
|
+
|
|
21524
21938
|
/**
|
|
21525
21939
|
*
|
|
21526
21940
|
*/
|
|
@@ -21606,9 +22020,14 @@ function PaymentMethodView(_ref) {
|
|
|
21606
22020
|
label: t("labels.email"),
|
|
21607
22021
|
required: true,
|
|
21608
22022
|
autoFocus: true
|
|
21609
|
-
})), /*#__PURE__*/React__default['default'].createElement(CheckoutForm,
|
|
22023
|
+
})), /*#__PURE__*/React__default['default'].createElement(CheckoutForm, {
|
|
22024
|
+
type: type
|
|
22025
|
+
}), showCoupon && /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21610
22026
|
className: "plc-mb-2"
|
|
21611
|
-
}, /*#__PURE__*/React__default['default'].createElement(CouponCode, null), /*#__PURE__*/React__default['default'].createElement(DiscountedPrice, null)), /*#__PURE__*/React__default['default'].createElement(TaxAmount, null), /*#__PURE__*/React__default['default'].createElement(
|
|
22027
|
+
}, /*#__PURE__*/React__default['default'].createElement(CouponCode, null), /*#__PURE__*/React__default['default'].createElement(DiscountedPrice, null)), /*#__PURE__*/React__default['default'].createElement(TaxAmount, null), type === "updatePaymentSource" && /*#__PURE__*/React__default['default'].createElement(PaymentMethodUpdateSetDefault, {
|
|
22028
|
+
id: "pelcro-input-is-default",
|
|
22029
|
+
label: t("labels.isDefault")
|
|
22030
|
+
}), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21612
22031
|
className: "plc-grid plc-mt-4 plc-gap-y-2"
|
|
21613
22032
|
}, /*#__PURE__*/React__default['default'].createElement(SubmitPaymentMethod, null), showExternalPaymentMethods && !supportsVantiv && !supportsCybersource && !supportsTap ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(PelcroPaymentRequestButton, null), /*#__PURE__*/React__default['default'].createElement(PaypalSubscribeButton, null)) : showExternalPaymentMethods && supportsVantiv ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(PaypalSubscribeButton, null)) : null, showApplePayButton && supportsVantiv ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(ApplePayButton, null)) : null)))));
|
|
21614
22033
|
}
|
|
@@ -21728,14 +22147,14 @@ function SubscriptionRenewModal(_ref) {
|
|
|
21728
22147
|
}
|
|
21729
22148
|
SubscriptionRenewModal.viewId = "subscription-renew";
|
|
21730
22149
|
|
|
21731
|
-
const initialState$
|
|
22150
|
+
const initialState$k = {
|
|
21732
22151
|
cancelationReason: "",
|
|
21733
22152
|
cancelationOption: ""
|
|
21734
22153
|
};
|
|
21735
|
-
const store$
|
|
22154
|
+
const store$k = /*#__PURE__*/React.createContext(initialState$k);
|
|
21736
22155
|
const {
|
|
21737
|
-
Provider: Provider$
|
|
21738
|
-
} = store$
|
|
22156
|
+
Provider: Provider$k
|
|
22157
|
+
} = store$k;
|
|
21739
22158
|
const SubscriptionCancelContainer = _ref => {
|
|
21740
22159
|
let {
|
|
21741
22160
|
style,
|
|
@@ -21760,35 +22179,35 @@ const SubscriptionCancelContainer = _ref => {
|
|
|
21760
22179
|
default:
|
|
21761
22180
|
return state;
|
|
21762
22181
|
}
|
|
21763
|
-
}, initialState$
|
|
22182
|
+
}, initialState$k);
|
|
21764
22183
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
21765
22184
|
style: {
|
|
21766
22185
|
...style
|
|
21767
22186
|
},
|
|
21768
22187
|
className: `pelcro-container pelcro-subscription-cancel-container ${className}`
|
|
21769
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
22188
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$k, {
|
|
21770
22189
|
value: {
|
|
21771
22190
|
state,
|
|
21772
22191
|
dispatch
|
|
21773
22192
|
}
|
|
21774
22193
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
21775
|
-
store: store$
|
|
22194
|
+
store: store$k,
|
|
21776
22195
|
key: i
|
|
21777
22196
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
21778
|
-
store: store$
|
|
22197
|
+
store: store$k
|
|
21779
22198
|
})));
|
|
21780
22199
|
};
|
|
21781
22200
|
|
|
21782
|
-
var _path$
|
|
21783
|
-
function _extends$
|
|
22201
|
+
var _path$l;
|
|
22202
|
+
function _extends$n() { _extends$n = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
|
|
21784
22203
|
function SvgInfoCircle(props) {
|
|
21785
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22204
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
21786
22205
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21787
22206
|
className: "plc-w-5 plc-h-5",
|
|
21788
22207
|
fill: "none",
|
|
21789
22208
|
viewBox: "0 0 24 24",
|
|
21790
22209
|
stroke: "currentColor"
|
|
21791
|
-
}, props), _path$
|
|
22210
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
21792
22211
|
strokeLinecap: "round",
|
|
21793
22212
|
strokeLinejoin: "round",
|
|
21794
22213
|
strokeWidth: 2,
|
|
@@ -21857,7 +22276,7 @@ const SubscriptionCancelReason = props => {
|
|
|
21857
22276
|
} = useTranslation("subscriptionCancel");
|
|
21858
22277
|
const {
|
|
21859
22278
|
dispatch
|
|
21860
|
-
} = React.useContext(store$
|
|
22279
|
+
} = React.useContext(store$k);
|
|
21861
22280
|
const handleOnTextAreaBlur = e => {
|
|
21862
22281
|
dispatch({
|
|
21863
22282
|
type: SET_CANCEL_SUBSCRIPTION_REASON,
|
|
@@ -21871,9 +22290,9 @@ const SubscriptionCancelReason = props => {
|
|
|
21871
22290
|
};
|
|
21872
22291
|
|
|
21873
22292
|
var _switch;
|
|
21874
|
-
function _extends$
|
|
22293
|
+
function _extends$m() { _extends$m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
|
|
21875
22294
|
function SvgSubscription(props) {
|
|
21876
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22295
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
21877
22296
|
xmlns: "http://www.w3.org/2000/svg",
|
|
21878
22297
|
viewBox: "0 0 100 125",
|
|
21879
22298
|
fill: "currentColor"
|
|
@@ -21902,7 +22321,7 @@ const SubscriptionCancelButton = _ref => {
|
|
|
21902
22321
|
cancelationReason,
|
|
21903
22322
|
cancelationOption
|
|
21904
22323
|
}
|
|
21905
|
-
} = React.useContext(store$
|
|
22324
|
+
} = React.useContext(store$k);
|
|
21906
22325
|
const {
|
|
21907
22326
|
t
|
|
21908
22327
|
} = useTranslation("subscriptionCancel");
|
|
@@ -21981,7 +22400,7 @@ const SubscriptionCancelOptions = _ref => {
|
|
|
21981
22400
|
cancelationOption
|
|
21982
22401
|
},
|
|
21983
22402
|
dispatch
|
|
21984
|
-
} = React.useContext(store$
|
|
22403
|
+
} = React.useContext(store$k);
|
|
21985
22404
|
const {
|
|
21986
22405
|
t
|
|
21987
22406
|
} = useTranslation("subscriptionCancel");
|
|
@@ -22097,14 +22516,14 @@ const SubscriptionCancelModal = _ref => {
|
|
|
22097
22516
|
};
|
|
22098
22517
|
SubscriptionCancelModal.viewId = "subscription-cancel";
|
|
22099
22518
|
|
|
22100
|
-
const initialState$
|
|
22519
|
+
const initialState$j = {
|
|
22101
22520
|
suspendDate: null,
|
|
22102
22521
|
buttonDisabled: false
|
|
22103
22522
|
};
|
|
22104
|
-
const store$
|
|
22523
|
+
const store$j = /*#__PURE__*/React.createContext(initialState$j);
|
|
22105
22524
|
const {
|
|
22106
|
-
Provider: Provider$
|
|
22107
|
-
} = store$
|
|
22525
|
+
Provider: Provider$j
|
|
22526
|
+
} = store$j;
|
|
22108
22527
|
const SubscriptionSuspendContainer = _ref => {
|
|
22109
22528
|
let {
|
|
22110
22529
|
style,
|
|
@@ -22130,22 +22549,22 @@ const SubscriptionSuspendContainer = _ref => {
|
|
|
22130
22549
|
default:
|
|
22131
22550
|
return state;
|
|
22132
22551
|
}
|
|
22133
|
-
}, initialState$
|
|
22552
|
+
}, initialState$j);
|
|
22134
22553
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
22135
22554
|
style: {
|
|
22136
22555
|
...style
|
|
22137
22556
|
},
|
|
22138
22557
|
className: `pelcro-container pelcro-subscription-suspend-container ${className}`
|
|
22139
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
22558
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$j, {
|
|
22140
22559
|
value: {
|
|
22141
22560
|
state,
|
|
22142
22561
|
dispatch
|
|
22143
22562
|
}
|
|
22144
22563
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
22145
|
-
store: store$
|
|
22564
|
+
store: store$j,
|
|
22146
22565
|
key: i
|
|
22147
22566
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
22148
|
-
store: store$
|
|
22567
|
+
store: store$j
|
|
22149
22568
|
})));
|
|
22150
22569
|
};
|
|
22151
22570
|
|
|
@@ -22194,7 +22613,7 @@ const SubscriptionSuspendDate = props => {
|
|
|
22194
22613
|
const {
|
|
22195
22614
|
dispatch,
|
|
22196
22615
|
state
|
|
22197
|
-
} = React.useContext(store$
|
|
22616
|
+
} = React.useContext(store$j);
|
|
22198
22617
|
const handleInputChange = value => {
|
|
22199
22618
|
if (value) {
|
|
22200
22619
|
dispatch({
|
|
@@ -22236,7 +22655,7 @@ const SubscriptionSuspendButton = _ref => {
|
|
|
22236
22655
|
buttonDisabled
|
|
22237
22656
|
},
|
|
22238
22657
|
dispatch
|
|
22239
|
-
} = React.useContext(store$
|
|
22658
|
+
} = React.useContext(store$j);
|
|
22240
22659
|
const {
|
|
22241
22660
|
t
|
|
22242
22661
|
} = useTranslation("subscriptionSuspend");
|
|
@@ -22337,10 +22756,10 @@ function SubscriptionSuspendModal(_ref) {
|
|
|
22337
22756
|
}
|
|
22338
22757
|
SubscriptionSuspendModal.viewId = "subscription-suspend";
|
|
22339
22758
|
|
|
22340
|
-
var _path$
|
|
22341
|
-
function _extends$
|
|
22759
|
+
var _path$k;
|
|
22760
|
+
function _extends$l() { _extends$l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
22342
22761
|
function SvgGift(props) {
|
|
22343
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
22762
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
22344
22763
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
22345
22764
|
fill: "none",
|
|
22346
22765
|
stroke: "currentColor",
|
|
@@ -22349,7 +22768,7 @@ function SvgGift(props) {
|
|
|
22349
22768
|
strokeWidth: 2,
|
|
22350
22769
|
viewBox: "0 0 24 24",
|
|
22351
22770
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22352
|
-
}, props), _path$
|
|
22771
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
22353
22772
|
d: "M20 12v10H4V12M2 7h20v5H2zM12 22V7M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7zM12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z"
|
|
22354
22773
|
})));
|
|
22355
22774
|
}
|
|
@@ -22655,7 +23074,7 @@ class DefaultNewsLetter extends React.Component {
|
|
|
22655
23074
|
}
|
|
22656
23075
|
const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
|
|
22657
23076
|
|
|
22658
|
-
const initialState$
|
|
23077
|
+
const initialState$i = {
|
|
22659
23078
|
didSubToNewslettersBefore: false,
|
|
22660
23079
|
newsletters: [],
|
|
22661
23080
|
isListLoading: true,
|
|
@@ -22665,10 +23084,10 @@ const initialState$h = {
|
|
|
22665
23084
|
content: ""
|
|
22666
23085
|
}
|
|
22667
23086
|
};
|
|
22668
|
-
const store$
|
|
23087
|
+
const store$i = /*#__PURE__*/React.createContext(initialState$i);
|
|
22669
23088
|
const {
|
|
22670
|
-
Provider: Provider$
|
|
22671
|
-
} = store$
|
|
23089
|
+
Provider: Provider$i
|
|
23090
|
+
} = store$i;
|
|
22672
23091
|
const NewsletterUpdateContainer = _ref => {
|
|
22673
23092
|
let {
|
|
22674
23093
|
style,
|
|
@@ -22775,7 +23194,7 @@ const NewsletterUpdateContainer = _ref => {
|
|
|
22775
23194
|
default:
|
|
22776
23195
|
return state;
|
|
22777
23196
|
}
|
|
22778
|
-
}, initialState$
|
|
23197
|
+
}, initialState$i);
|
|
22779
23198
|
React.useEffect(() => {
|
|
22780
23199
|
const getUserNewsletters = () => {
|
|
22781
23200
|
var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
|
|
@@ -22817,7 +23236,7 @@ const NewsletterUpdateContainer = _ref => {
|
|
|
22817
23236
|
...style
|
|
22818
23237
|
},
|
|
22819
23238
|
className: `pelcro-container pelcro-newsletter-update-container ${className}`
|
|
22820
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
23239
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
|
|
22821
23240
|
value: {
|
|
22822
23241
|
state,
|
|
22823
23242
|
dispatch
|
|
@@ -22825,12 +23244,12 @@ const NewsletterUpdateContainer = _ref => {
|
|
|
22825
23244
|
}, children.length ? children.map((child, i) => {
|
|
22826
23245
|
if (child) {
|
|
22827
23246
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
22828
|
-
store: store$
|
|
23247
|
+
store: store$i,
|
|
22829
23248
|
key: i
|
|
22830
23249
|
});
|
|
22831
23250
|
}
|
|
22832
23251
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
22833
|
-
store: store$
|
|
23252
|
+
store: store$i
|
|
22834
23253
|
})));
|
|
22835
23254
|
};
|
|
22836
23255
|
|
|
@@ -22846,7 +23265,7 @@ const NewsletterUpdateButton = _ref => {
|
|
|
22846
23265
|
isSubmitting,
|
|
22847
23266
|
isListLoading
|
|
22848
23267
|
}
|
|
22849
|
-
} = React.useContext(store$
|
|
23268
|
+
} = React.useContext(store$i);
|
|
22850
23269
|
const {
|
|
22851
23270
|
t
|
|
22852
23271
|
} = useTranslation("newsletter");
|
|
@@ -22875,7 +23294,7 @@ const NewsletterUpdateList = () => {
|
|
|
22875
23294
|
newsletters,
|
|
22876
23295
|
isListLoading
|
|
22877
23296
|
}
|
|
22878
|
-
} = React.useContext(store$
|
|
23297
|
+
} = React.useContext(store$i);
|
|
22879
23298
|
if (isListLoading) {
|
|
22880
23299
|
return /*#__PURE__*/React__default['default'].createElement(Loader, {
|
|
22881
23300
|
width: 60,
|
|
@@ -23072,7 +23491,7 @@ function SubscriptionCreateModal(_ref) {
|
|
|
23072
23491
|
}
|
|
23073
23492
|
SubscriptionCreateModal.viewId = "subscription-create";
|
|
23074
23493
|
|
|
23075
|
-
const initialState$
|
|
23494
|
+
const initialState$h = {
|
|
23076
23495
|
emails: "",
|
|
23077
23496
|
emailsError: null,
|
|
23078
23497
|
buttonDisabled: false,
|
|
@@ -23084,10 +23503,10 @@ const initialState$g = {
|
|
|
23084
23503
|
content: ""
|
|
23085
23504
|
}
|
|
23086
23505
|
};
|
|
23087
|
-
const store$
|
|
23506
|
+
const store$h = /*#__PURE__*/React.createContext(initialState$h);
|
|
23088
23507
|
const {
|
|
23089
|
-
Provider: Provider$
|
|
23090
|
-
} = store$
|
|
23508
|
+
Provider: Provider$h
|
|
23509
|
+
} = store$h;
|
|
23091
23510
|
const SubscriptionManageMembersContainer = _ref => {
|
|
23092
23511
|
let {
|
|
23093
23512
|
style,
|
|
@@ -23251,7 +23670,7 @@ const SubscriptionManageMembersContainer = _ref => {
|
|
|
23251
23670
|
default:
|
|
23252
23671
|
return state;
|
|
23253
23672
|
}
|
|
23254
|
-
}, initialState$
|
|
23673
|
+
}, initialState$h);
|
|
23255
23674
|
React.useEffect(() => {
|
|
23256
23675
|
dispatch({
|
|
23257
23676
|
type: HANDLE_LIST_MEMBERS
|
|
@@ -23262,7 +23681,7 @@ const SubscriptionManageMembersContainer = _ref => {
|
|
|
23262
23681
|
...style
|
|
23263
23682
|
},
|
|
23264
23683
|
className: `pelcro-container pelcro-manage-members-container ${className}`
|
|
23265
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
23684
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
|
|
23266
23685
|
value: {
|
|
23267
23686
|
state,
|
|
23268
23687
|
dispatch
|
|
@@ -23270,12 +23689,12 @@ const SubscriptionManageMembersContainer = _ref => {
|
|
|
23270
23689
|
}, children.length ? children.map((child, i) => {
|
|
23271
23690
|
if (child) {
|
|
23272
23691
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
23273
|
-
store: store$
|
|
23692
|
+
store: store$h,
|
|
23274
23693
|
key: i
|
|
23275
23694
|
});
|
|
23276
23695
|
}
|
|
23277
23696
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
23278
|
-
store: store$
|
|
23697
|
+
store: store$h
|
|
23279
23698
|
})));
|
|
23280
23699
|
};
|
|
23281
23700
|
|
|
@@ -23292,7 +23711,7 @@ const SubscriptionManageMembersButton = _ref => {
|
|
|
23292
23711
|
buttonDisabled
|
|
23293
23712
|
},
|
|
23294
23713
|
dispatch
|
|
23295
|
-
} = React.useContext(store$
|
|
23714
|
+
} = React.useContext(store$h);
|
|
23296
23715
|
const {
|
|
23297
23716
|
t
|
|
23298
23717
|
} = useTranslation("subscriptionManageMembers");
|
|
@@ -23322,7 +23741,7 @@ function SubscriptionManageMembersEmails(props) {
|
|
|
23322
23741
|
emails: stateEmails,
|
|
23323
23742
|
emailsError
|
|
23324
23743
|
}
|
|
23325
|
-
} = React.useContext(store$
|
|
23744
|
+
} = React.useContext(store$h);
|
|
23326
23745
|
const [emails, setEmails] = React.useState(stateEmails);
|
|
23327
23746
|
const [finishedTyping, setFinishedTyping] = React.useState(false);
|
|
23328
23747
|
const handleInputChange = React.useCallback(value => {
|
|
@@ -23352,15 +23771,15 @@ function SubscriptionManageMembersEmails(props) {
|
|
|
23352
23771
|
}, props));
|
|
23353
23772
|
}
|
|
23354
23773
|
|
|
23355
|
-
var _path$
|
|
23356
|
-
function _extends$
|
|
23774
|
+
var _path$j;
|
|
23775
|
+
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
23357
23776
|
function SvgCheckMark(props) {
|
|
23358
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
23777
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
23359
23778
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
23360
23779
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23361
23780
|
viewBox: "0 0 20 20",
|
|
23362
23781
|
fill: "currentColor"
|
|
23363
|
-
}, props), _path$
|
|
23782
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
23364
23783
|
fillRule: "evenodd",
|
|
23365
23784
|
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
|
|
23366
23785
|
clipRule: "evenodd"
|
|
@@ -23378,7 +23797,7 @@ function SubscriptionManageMembersList(props) {
|
|
|
23378
23797
|
removeMemberId,
|
|
23379
23798
|
loading
|
|
23380
23799
|
}
|
|
23381
|
-
} = React.useContext(store$
|
|
23800
|
+
} = React.useContext(store$h);
|
|
23382
23801
|
const getMemberStatus = React.useCallback(sub => {
|
|
23383
23802
|
if (sub.status === "pending") {
|
|
23384
23803
|
return {
|
|
@@ -23541,7 +23960,7 @@ function SubscriptionManageMembersModal(_ref) {
|
|
|
23541
23960
|
SubscriptionManageMembersModal.viewId = "manage-members";
|
|
23542
23961
|
|
|
23543
23962
|
var _window$Pelcro$user$r, _window$Pelcro$user$r2, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6, _window$Pelcro$user$r7;
|
|
23544
|
-
const initialState$
|
|
23963
|
+
const initialState$g = {
|
|
23545
23964
|
email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
|
|
23546
23965
|
emailError: null,
|
|
23547
23966
|
firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
|
|
@@ -23561,10 +23980,10 @@ const initialState$f = {
|
|
|
23561
23980
|
content: ""
|
|
23562
23981
|
}
|
|
23563
23982
|
};
|
|
23564
|
-
const store$
|
|
23983
|
+
const store$g = /*#__PURE__*/React.createContext(initialState$g);
|
|
23565
23984
|
const {
|
|
23566
|
-
Provider: Provider$
|
|
23567
|
-
} = store$
|
|
23985
|
+
Provider: Provider$g
|
|
23986
|
+
} = store$g;
|
|
23568
23987
|
const UserUpdateContainer = _ref => {
|
|
23569
23988
|
let {
|
|
23570
23989
|
style,
|
|
@@ -23760,13 +24179,13 @@ const UserUpdateContainer = _ref => {
|
|
|
23760
24179
|
default:
|
|
23761
24180
|
return state;
|
|
23762
24181
|
}
|
|
23763
|
-
}, initialState$
|
|
24182
|
+
}, initialState$g);
|
|
23764
24183
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
23765
24184
|
style: {
|
|
23766
24185
|
...style
|
|
23767
24186
|
},
|
|
23768
24187
|
className: `pelcro-container pelcro-user-update-container ${className}`
|
|
23769
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
24188
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
|
|
23770
24189
|
value: {
|
|
23771
24190
|
state,
|
|
23772
24191
|
dispatch
|
|
@@ -23774,24 +24193,24 @@ const UserUpdateContainer = _ref => {
|
|
|
23774
24193
|
}, children.length ? children.map((child, i) => {
|
|
23775
24194
|
if (child) {
|
|
23776
24195
|
return /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
23777
|
-
store: store$
|
|
24196
|
+
store: store$g,
|
|
23778
24197
|
key: i
|
|
23779
24198
|
});
|
|
23780
24199
|
}
|
|
23781
24200
|
}) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
23782
|
-
store: store$
|
|
24201
|
+
store: store$g
|
|
23783
24202
|
})));
|
|
23784
24203
|
};
|
|
23785
24204
|
|
|
23786
|
-
var _path$
|
|
23787
|
-
function _extends$
|
|
24205
|
+
var _path$i;
|
|
24206
|
+
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
23788
24207
|
function SvgEdit(props) {
|
|
23789
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
24208
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
23790
24209
|
className: "plc-w-6 plc-h-6",
|
|
23791
24210
|
xmlns: "http://www.w3.org/2000/svg",
|
|
23792
24211
|
viewBox: "0 0 20 20",
|
|
23793
24212
|
fill: "currentColor"
|
|
23794
|
-
}, props), _path$
|
|
24213
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
23795
24214
|
d: "M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zm-2.207 2.207L3 14.172V17h2.828l8.38-8.379-2.83-2.828z"
|
|
23796
24215
|
})));
|
|
23797
24216
|
}
|
|
@@ -23803,7 +24222,7 @@ const UserUpdateEmail = props => {
|
|
|
23803
24222
|
email,
|
|
23804
24223
|
emailError
|
|
23805
24224
|
}
|
|
23806
|
-
} = React.useContext(store$
|
|
24225
|
+
} = React.useContext(store$g);
|
|
23807
24226
|
const [enableEmailEdit, setEnableEmailEdit] = React.useState(false);
|
|
23808
24227
|
const {
|
|
23809
24228
|
t
|
|
@@ -23827,7 +24246,7 @@ const UserUpdateEmail = props => {
|
|
|
23827
24246
|
className: "plc-flex plc-items-start plc-relative"
|
|
23828
24247
|
}, /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
23829
24248
|
disabled: !enableEmailEdit,
|
|
23830
|
-
store: store$
|
|
24249
|
+
store: store$g,
|
|
23831
24250
|
label: t("labels.email"),
|
|
23832
24251
|
enableEmailEdit: enableEmailEdit
|
|
23833
24252
|
}, props)), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
@@ -23861,7 +24280,7 @@ const UserUpdateButton = _ref => {
|
|
|
23861
24280
|
phoneError
|
|
23862
24281
|
},
|
|
23863
24282
|
dispatch
|
|
23864
|
-
} = React.useContext(store$
|
|
24283
|
+
} = React.useContext(store$g);
|
|
23865
24284
|
const supportsTap = Boolean((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.tap_gateway_settings);
|
|
23866
24285
|
const {
|
|
23867
24286
|
t
|
|
@@ -23957,19 +24376,19 @@ function UpdateUserNameInput(_ref) {
|
|
|
23957
24376
|
}
|
|
23958
24377
|
|
|
23959
24378
|
const UserUpdateUsername = props => /*#__PURE__*/React__default['default'].createElement(UpdateUserNameInput, Object.assign({
|
|
23960
|
-
store: store$
|
|
24379
|
+
store: store$g
|
|
23961
24380
|
}, props));
|
|
23962
24381
|
|
|
23963
24382
|
const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
23964
|
-
store: store$
|
|
24383
|
+
store: store$g
|
|
23965
24384
|
}, props));
|
|
23966
24385
|
|
|
23967
24386
|
const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
23968
|
-
store: store$
|
|
24387
|
+
store: store$g
|
|
23969
24388
|
}, props));
|
|
23970
24389
|
|
|
23971
24390
|
const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
|
|
23972
|
-
store: store$
|
|
24391
|
+
store: store$g
|
|
23973
24392
|
}, props));
|
|
23974
24393
|
|
|
23975
24394
|
var userSolidIcon = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20class%3D%22plc-h-5%20plc-w-5%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22white%22%3E%20%20%3Cpath%20transform%3D%22translate%280%2C2%29%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10%209a3%203%200%20100-6%203%203%200%20000%206zm-7%209a7%207%200%201114%200H3z%22%20clip-rule%3D%22evenodd%22%20%2F%3E%3C%2Fsvg%3E";
|
|
@@ -24056,7 +24475,7 @@ function Tin(_ref) {
|
|
|
24056
24475
|
}
|
|
24057
24476
|
|
|
24058
24477
|
const UserUpdateTin = props => /*#__PURE__*/React__default['default'].createElement(Tin, Object.assign({
|
|
24059
|
-
store: store$
|
|
24478
|
+
store: store$g
|
|
24060
24479
|
}, props));
|
|
24061
24480
|
|
|
24062
24481
|
function DisplayName(_ref) {
|
|
@@ -24085,7 +24504,7 @@ function DisplayName(_ref) {
|
|
|
24085
24504
|
}
|
|
24086
24505
|
|
|
24087
24506
|
const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
|
|
24088
|
-
store: store$
|
|
24507
|
+
store: store$g
|
|
24089
24508
|
}, props));
|
|
24090
24509
|
|
|
24091
24510
|
const UserUpdateView = props => {
|
|
@@ -24179,11 +24598,11 @@ UserUpdateModal.viewId = "user-edit";
|
|
|
24179
24598
|
|
|
24180
24599
|
const UserUpdateTextInput = props => {
|
|
24181
24600
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
24182
|
-
store: store$
|
|
24601
|
+
store: store$g
|
|
24183
24602
|
}));
|
|
24184
24603
|
};
|
|
24185
24604
|
|
|
24186
|
-
const initialState$
|
|
24605
|
+
const initialState$f = {
|
|
24187
24606
|
isSubmitting: false,
|
|
24188
24607
|
firstName: "",
|
|
24189
24608
|
firstNameError: "",
|
|
@@ -24209,10 +24628,10 @@ const initialState$e = {
|
|
|
24209
24628
|
content: ""
|
|
24210
24629
|
}
|
|
24211
24630
|
};
|
|
24212
|
-
const store$
|
|
24631
|
+
const store$f = /*#__PURE__*/React.createContext(initialState$f);
|
|
24213
24632
|
const {
|
|
24214
|
-
Provider: Provider$
|
|
24215
|
-
} = store$
|
|
24633
|
+
Provider: Provider$f
|
|
24634
|
+
} = store$f;
|
|
24216
24635
|
const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
|
|
24217
24636
|
const AddressCreateContainer = _ref => {
|
|
24218
24637
|
var _props$giftCode, _ref2, _props$subscriptionId;
|
|
@@ -24446,7 +24865,7 @@ const AddressCreateContainer = _ref => {
|
|
|
24446
24865
|
default:
|
|
24447
24866
|
return state;
|
|
24448
24867
|
}
|
|
24449
|
-
}, initialState$
|
|
24868
|
+
}, initialState$f);
|
|
24450
24869
|
React.useEffect(() => {
|
|
24451
24870
|
const getStates = () => {
|
|
24452
24871
|
dispatch({
|
|
@@ -24478,16 +24897,16 @@ const AddressCreateContainer = _ref => {
|
|
|
24478
24897
|
...style
|
|
24479
24898
|
},
|
|
24480
24899
|
className: `pelcro-container pelcro-address-create-container ${className}`
|
|
24481
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
24900
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
|
|
24482
24901
|
value: {
|
|
24483
24902
|
state,
|
|
24484
24903
|
dispatch
|
|
24485
24904
|
}
|
|
24486
24905
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
24487
|
-
store: store$
|
|
24906
|
+
store: store$f,
|
|
24488
24907
|
key: i
|
|
24489
24908
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
24490
|
-
store: store$
|
|
24909
|
+
store: store$f
|
|
24491
24910
|
})));
|
|
24492
24911
|
};
|
|
24493
24912
|
|
|
@@ -24498,7 +24917,7 @@ function AddressCreateFirstName(props) {
|
|
|
24498
24917
|
firstName,
|
|
24499
24918
|
firstNameError
|
|
24500
24919
|
}
|
|
24501
|
-
} = React.useContext(store$
|
|
24920
|
+
} = React.useContext(store$f);
|
|
24502
24921
|
const handleInputChange = value => {
|
|
24503
24922
|
dispatch({
|
|
24504
24923
|
type: SET_TEXT_FIELD,
|
|
@@ -24532,7 +24951,7 @@ function AddressCreateLastName(props) {
|
|
|
24532
24951
|
lastName,
|
|
24533
24952
|
lastNameError
|
|
24534
24953
|
}
|
|
24535
|
-
} = React.useContext(store$
|
|
24954
|
+
} = React.useContext(store$f);
|
|
24536
24955
|
const handleInputChange = value => {
|
|
24537
24956
|
dispatch({
|
|
24538
24957
|
type: SET_TEXT_FIELD,
|
|
@@ -24564,7 +24983,7 @@ function AddressCreateLine1(props) {
|
|
|
24564
24983
|
line1,
|
|
24565
24984
|
line1Error
|
|
24566
24985
|
}
|
|
24567
|
-
} = React.useContext(store$
|
|
24986
|
+
} = React.useContext(store$f);
|
|
24568
24987
|
const handleBlur = () => {
|
|
24569
24988
|
return dispatch({
|
|
24570
24989
|
type: VALIDATE_FIELD,
|
|
@@ -24603,7 +25022,7 @@ function AddressCreateCity(props) {
|
|
|
24603
25022
|
city,
|
|
24604
25023
|
cityError
|
|
24605
25024
|
}
|
|
24606
|
-
} = React.useContext(store$
|
|
25025
|
+
} = React.useContext(store$f);
|
|
24607
25026
|
const handleInputChange = value => {
|
|
24608
25027
|
dispatch({
|
|
24609
25028
|
type: SET_TEXT_FIELD,
|
|
@@ -24635,7 +25054,7 @@ function AddressCreatePostalCode(props) {
|
|
|
24635
25054
|
postalCode,
|
|
24636
25055
|
postalCodeError
|
|
24637
25056
|
}
|
|
24638
|
-
} = React.useContext(store$
|
|
25057
|
+
} = React.useContext(store$f);
|
|
24639
25058
|
const handleInputChange = value => {
|
|
24640
25059
|
dispatch({
|
|
24641
25060
|
type: SET_TEXT_FIELD,
|
|
@@ -24671,7 +25090,7 @@ const AddressCreateSubmit = _ref => {
|
|
|
24671
25090
|
state: {
|
|
24672
25091
|
isSubmitting
|
|
24673
25092
|
}
|
|
24674
|
-
} = React.useContext(store$
|
|
25093
|
+
} = React.useContext(store$f);
|
|
24675
25094
|
const {
|
|
24676
25095
|
t
|
|
24677
25096
|
} = useTranslation("address");
|
|
@@ -24751,7 +25170,7 @@ function CountrySelect(_ref) {
|
|
|
24751
25170
|
}
|
|
24752
25171
|
|
|
24753
25172
|
const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
24754
|
-
store: store$
|
|
25173
|
+
store: store$f
|
|
24755
25174
|
}, props));
|
|
24756
25175
|
|
|
24757
25176
|
function StateSelect(_ref) {
|
|
@@ -24833,14 +25252,14 @@ function StateSelect(_ref) {
|
|
|
24833
25252
|
}
|
|
24834
25253
|
|
|
24835
25254
|
const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
24836
|
-
store: store$
|
|
25255
|
+
store: store$f
|
|
24837
25256
|
}, props));
|
|
24838
25257
|
|
|
24839
25258
|
const AddressCreateSetDefault = props => {
|
|
24840
25259
|
const {
|
|
24841
25260
|
dispatch,
|
|
24842
25261
|
state
|
|
24843
|
-
} = React.useContext(store$
|
|
25262
|
+
} = React.useContext(store$f);
|
|
24844
25263
|
const handleCheckboxChange = e => {
|
|
24845
25264
|
dispatch({
|
|
24846
25265
|
type: HANDLE_CHECKBOX_CHANGE,
|
|
@@ -24965,18 +25384,18 @@ AddressCreateModal.viewId = "address-create";
|
|
|
24965
25384
|
|
|
24966
25385
|
const AddressCreateTextInput = props => {
|
|
24967
25386
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
24968
|
-
store: store$
|
|
25387
|
+
store: store$f
|
|
24969
25388
|
}));
|
|
24970
25389
|
};
|
|
24971
25390
|
|
|
24972
25391
|
const AddressCreateLine2 = props => {
|
|
24973
25392
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
24974
25393
|
fieldName: "line2",
|
|
24975
|
-
store: store$
|
|
25394
|
+
store: store$f
|
|
24976
25395
|
}, props));
|
|
24977
25396
|
};
|
|
24978
25397
|
|
|
24979
|
-
const initialState$
|
|
25398
|
+
const initialState$e = {
|
|
24980
25399
|
isSubmitting: false,
|
|
24981
25400
|
firstName: "",
|
|
24982
25401
|
firstNameError: "",
|
|
@@ -25002,10 +25421,10 @@ const initialState$d = {
|
|
|
25002
25421
|
content: ""
|
|
25003
25422
|
}
|
|
25004
25423
|
};
|
|
25005
|
-
const store$
|
|
25424
|
+
const store$e = /*#__PURE__*/React.createContext(initialState$e);
|
|
25006
25425
|
const {
|
|
25007
|
-
Provider: Provider$
|
|
25008
|
-
} = store$
|
|
25426
|
+
Provider: Provider$e
|
|
25427
|
+
} = store$e;
|
|
25009
25428
|
const AddressUpdateContainer = _ref => {
|
|
25010
25429
|
var _props$addressId, _window, _window$Pelcro, _window$Pelcro$uiSett;
|
|
25011
25430
|
let {
|
|
@@ -25054,7 +25473,7 @@ const AddressUpdateContainer = _ref => {
|
|
|
25054
25473
|
const thisAddress = addresses[address];
|
|
25055
25474
|
if (+thisAddress.id === +addressId) {
|
|
25056
25475
|
const newState = {
|
|
25057
|
-
...initialState$
|
|
25476
|
+
...initialState$e,
|
|
25058
25477
|
firstName: thisAddress.first_name,
|
|
25059
25478
|
lastName: thisAddress.last_name,
|
|
25060
25479
|
line1: thisAddress.line1,
|
|
@@ -25205,7 +25624,7 @@ const AddressUpdateContainer = _ref => {
|
|
|
25205
25624
|
default:
|
|
25206
25625
|
return state;
|
|
25207
25626
|
}
|
|
25208
|
-
}, initialState$
|
|
25627
|
+
}, initialState$e);
|
|
25209
25628
|
React.useEffect(() => {
|
|
25210
25629
|
const getStates = () => {
|
|
25211
25630
|
dispatch({
|
|
@@ -25237,21 +25656,21 @@ const AddressUpdateContainer = _ref => {
|
|
|
25237
25656
|
...style
|
|
25238
25657
|
},
|
|
25239
25658
|
className: `pelcro-container pelcro-address-update-container ${className}`
|
|
25240
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
25659
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
|
|
25241
25660
|
value: {
|
|
25242
25661
|
state,
|
|
25243
25662
|
dispatch
|
|
25244
25663
|
}
|
|
25245
25664
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
25246
|
-
store: store$
|
|
25665
|
+
store: store$e,
|
|
25247
25666
|
key: i
|
|
25248
25667
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
25249
|
-
store: store$
|
|
25668
|
+
store: store$e
|
|
25250
25669
|
})));
|
|
25251
25670
|
};
|
|
25252
25671
|
|
|
25253
25672
|
const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
|
|
25254
|
-
store: store$
|
|
25673
|
+
store: store$e
|
|
25255
25674
|
}, props));
|
|
25256
25675
|
|
|
25257
25676
|
function AddressUpdateFirstName(props) {
|
|
@@ -25261,7 +25680,7 @@ function AddressUpdateFirstName(props) {
|
|
|
25261
25680
|
firstName,
|
|
25262
25681
|
firstNameError
|
|
25263
25682
|
}
|
|
25264
|
-
} = React.useContext(store$
|
|
25683
|
+
} = React.useContext(store$e);
|
|
25265
25684
|
const handleBlur = () => {
|
|
25266
25685
|
return dispatch({
|
|
25267
25686
|
type: VALIDATE_FIELD,
|
|
@@ -25300,7 +25719,7 @@ function AddressUpdateLastName(props) {
|
|
|
25300
25719
|
lastName,
|
|
25301
25720
|
lastNameError
|
|
25302
25721
|
}
|
|
25303
|
-
} = React.useContext(store$
|
|
25722
|
+
} = React.useContext(store$e);
|
|
25304
25723
|
const handleBlur = () => {
|
|
25305
25724
|
return dispatch({
|
|
25306
25725
|
type: VALIDATE_FIELD,
|
|
@@ -25339,7 +25758,7 @@ function AddressUpdateLine1(props) {
|
|
|
25339
25758
|
line1,
|
|
25340
25759
|
line1Error
|
|
25341
25760
|
}
|
|
25342
|
-
} = React.useContext(store$
|
|
25761
|
+
} = React.useContext(store$e);
|
|
25343
25762
|
const handleBlur = () => {
|
|
25344
25763
|
return dispatch({
|
|
25345
25764
|
type: VALIDATE_FIELD,
|
|
@@ -25375,7 +25794,7 @@ const AddressUpdateLine2 = props => {
|
|
|
25375
25794
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
|
|
25376
25795
|
fieldName: "line2"
|
|
25377
25796
|
}, props, {
|
|
25378
|
-
store: store$
|
|
25797
|
+
store: store$e
|
|
25379
25798
|
}));
|
|
25380
25799
|
};
|
|
25381
25800
|
|
|
@@ -25386,7 +25805,7 @@ function AddressUpdateCity(props) {
|
|
|
25386
25805
|
city,
|
|
25387
25806
|
cityError
|
|
25388
25807
|
}
|
|
25389
|
-
} = React.useContext(store$
|
|
25808
|
+
} = React.useContext(store$e);
|
|
25390
25809
|
const handleBlur = () => {
|
|
25391
25810
|
return dispatch({
|
|
25392
25811
|
type: VALIDATE_FIELD,
|
|
@@ -25425,7 +25844,7 @@ function AddressUpdatePostalCode(props) {
|
|
|
25425
25844
|
postalCode,
|
|
25426
25845
|
postalCodeError
|
|
25427
25846
|
}
|
|
25428
|
-
} = React.useContext(store$
|
|
25847
|
+
} = React.useContext(store$e);
|
|
25429
25848
|
const handleBlur = () => {
|
|
25430
25849
|
return dispatch({
|
|
25431
25850
|
type: VALIDATE_FIELD,
|
|
@@ -25468,7 +25887,7 @@ const AddressUpdateSubmit = _ref => {
|
|
|
25468
25887
|
state: {
|
|
25469
25888
|
isSubmitting
|
|
25470
25889
|
}
|
|
25471
|
-
} = React.useContext(store$
|
|
25890
|
+
} = React.useContext(store$e);
|
|
25472
25891
|
const {
|
|
25473
25892
|
t
|
|
25474
25893
|
} = useTranslation("address");
|
|
@@ -25484,7 +25903,7 @@ const AddressUpdateSubmit = _ref => {
|
|
|
25484
25903
|
};
|
|
25485
25904
|
|
|
25486
25905
|
const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
|
|
25487
|
-
store: store$
|
|
25906
|
+
store: store$e
|
|
25488
25907
|
}, props));
|
|
25489
25908
|
|
|
25490
25909
|
function AddressUpdateSetDefault(props) {
|
|
@@ -25493,7 +25912,7 @@ function AddressUpdateSetDefault(props) {
|
|
|
25493
25912
|
state: {
|
|
25494
25913
|
isDefault
|
|
25495
25914
|
}
|
|
25496
|
-
} = React.useContext(store$
|
|
25915
|
+
} = React.useContext(store$e);
|
|
25497
25916
|
const handleCheckboxChange = e => {
|
|
25498
25917
|
dispatch({
|
|
25499
25918
|
type: HANDLE_CHECKBOX_CHANGE,
|
|
@@ -25595,7 +26014,7 @@ AddressUpdateModal.viewId = "address-edit";
|
|
|
25595
26014
|
|
|
25596
26015
|
const AddressUpdateTextInput = props => {
|
|
25597
26016
|
return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
|
|
25598
|
-
store: store$
|
|
26017
|
+
store: store$e
|
|
25599
26018
|
}));
|
|
25600
26019
|
};
|
|
25601
26020
|
|
|
@@ -25685,7 +26104,7 @@ const PaymentMethodUpdateModal = props => {
|
|
|
25685
26104
|
};
|
|
25686
26105
|
PaymentMethodUpdateModal.viewId = "payment-method-update";
|
|
25687
26106
|
|
|
25688
|
-
const initialState$
|
|
26107
|
+
const initialState$d = {
|
|
25689
26108
|
email: "",
|
|
25690
26109
|
password: "",
|
|
25691
26110
|
passwordError: null,
|
|
@@ -25698,10 +26117,10 @@ const initialState$c = {
|
|
|
25698
26117
|
content: ""
|
|
25699
26118
|
}
|
|
25700
26119
|
};
|
|
25701
|
-
const store$
|
|
26120
|
+
const store$d = /*#__PURE__*/React.createContext(initialState$d);
|
|
25702
26121
|
const {
|
|
25703
|
-
Provider: Provider$
|
|
25704
|
-
} = store$
|
|
26122
|
+
Provider: Provider$d
|
|
26123
|
+
} = store$d;
|
|
25705
26124
|
const PasswordResetContainer = _ref => {
|
|
25706
26125
|
let {
|
|
25707
26126
|
style,
|
|
@@ -25756,7 +26175,7 @@ const PasswordResetContainer = _ref => {
|
|
|
25756
26175
|
type: SET_EMAIL,
|
|
25757
26176
|
payload: window.Pelcro.helpers.getURLParameter("email")
|
|
25758
26177
|
});
|
|
25759
|
-
initialState$
|
|
26178
|
+
initialState$d.email = window.Pelcro.helpers.getURLParameter("email");
|
|
25760
26179
|
dispatch({
|
|
25761
26180
|
type: SET_TOKEN,
|
|
25762
26181
|
payload: window.Pelcro.helpers.getURLParameter("token")
|
|
@@ -25816,27 +26235,27 @@ const PasswordResetContainer = _ref => {
|
|
|
25816
26235
|
default:
|
|
25817
26236
|
return state;
|
|
25818
26237
|
}
|
|
25819
|
-
}, initialState$
|
|
26238
|
+
}, initialState$d);
|
|
25820
26239
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
25821
26240
|
style: {
|
|
25822
26241
|
...style
|
|
25823
26242
|
},
|
|
25824
26243
|
className: `pelcro-container pelcro-password-reset-container ${className}`
|
|
25825
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
26244
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
|
|
25826
26245
|
value: {
|
|
25827
26246
|
state,
|
|
25828
26247
|
dispatch
|
|
25829
26248
|
}
|
|
25830
26249
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
25831
|
-
store: store$
|
|
26250
|
+
store: store$d,
|
|
25832
26251
|
key: i
|
|
25833
26252
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
25834
|
-
store: store$
|
|
26253
|
+
store: store$d
|
|
25835
26254
|
})));
|
|
25836
26255
|
};
|
|
25837
26256
|
|
|
25838
26257
|
const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
|
|
25839
|
-
store: store$
|
|
26258
|
+
store: store$d
|
|
25840
26259
|
}, props));
|
|
25841
26260
|
|
|
25842
26261
|
const PasswordResetButton = _ref => {
|
|
@@ -25850,7 +26269,7 @@ const PasswordResetButton = _ref => {
|
|
|
25850
26269
|
buttonDisabled
|
|
25851
26270
|
},
|
|
25852
26271
|
dispatch
|
|
25853
|
-
} = React.useContext(store$
|
|
26272
|
+
} = React.useContext(store$d);
|
|
25854
26273
|
const {
|
|
25855
26274
|
t
|
|
25856
26275
|
} = useTranslation("passwordReset");
|
|
@@ -25867,14 +26286,14 @@ const PasswordResetButton = _ref => {
|
|
|
25867
26286
|
};
|
|
25868
26287
|
|
|
25869
26288
|
const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
25870
|
-
store: store$
|
|
26289
|
+
store: store$d
|
|
25871
26290
|
}, props, {
|
|
25872
26291
|
value: window.Pelcro.helpers.getURLParameter("email"),
|
|
25873
26292
|
disabled: true
|
|
25874
26293
|
}));
|
|
25875
26294
|
|
|
25876
26295
|
const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
|
|
25877
|
-
store: store$
|
|
26296
|
+
store: store$d
|
|
25878
26297
|
}, props));
|
|
25879
26298
|
|
|
25880
26299
|
const PasswordResetView = props => {
|
|
@@ -25927,7 +26346,7 @@ const PasswordResetModal = _ref => {
|
|
|
25927
26346
|
};
|
|
25928
26347
|
PasswordResetModal.viewId = "password-reset";
|
|
25929
26348
|
|
|
25930
|
-
const initialState$
|
|
26349
|
+
const initialState$c = {
|
|
25931
26350
|
email: "",
|
|
25932
26351
|
emailError: null,
|
|
25933
26352
|
buttonDisabled: false,
|
|
@@ -25936,10 +26355,10 @@ const initialState$b = {
|
|
|
25936
26355
|
content: ""
|
|
25937
26356
|
}
|
|
25938
26357
|
};
|
|
25939
|
-
const store$
|
|
26358
|
+
const store$c = /*#__PURE__*/React.createContext(initialState$c);
|
|
25940
26359
|
const {
|
|
25941
|
-
Provider: Provider$
|
|
25942
|
-
} = store$
|
|
26360
|
+
Provider: Provider$c
|
|
26361
|
+
} = store$c;
|
|
25943
26362
|
const PasswordForgotContainer = _ref => {
|
|
25944
26363
|
let {
|
|
25945
26364
|
style,
|
|
@@ -26015,22 +26434,22 @@ const PasswordForgotContainer = _ref => {
|
|
|
26015
26434
|
default:
|
|
26016
26435
|
return state;
|
|
26017
26436
|
}
|
|
26018
|
-
}, initialState$
|
|
26437
|
+
}, initialState$c);
|
|
26019
26438
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26020
26439
|
style: {
|
|
26021
26440
|
...style
|
|
26022
26441
|
},
|
|
26023
26442
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
26024
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
26443
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
|
|
26025
26444
|
value: {
|
|
26026
26445
|
state,
|
|
26027
26446
|
dispatch
|
|
26028
26447
|
}
|
|
26029
26448
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
26030
|
-
store: store$
|
|
26449
|
+
store: store$c,
|
|
26031
26450
|
key: i
|
|
26032
26451
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
26033
|
-
store: store$
|
|
26452
|
+
store: store$c
|
|
26034
26453
|
})));
|
|
26035
26454
|
};
|
|
26036
26455
|
|
|
@@ -26047,7 +26466,7 @@ const PasswordForgotButton = _ref => {
|
|
|
26047
26466
|
emailError
|
|
26048
26467
|
},
|
|
26049
26468
|
dispatch
|
|
26050
|
-
} = React.useContext(store$
|
|
26469
|
+
} = React.useContext(store$c);
|
|
26051
26470
|
const {
|
|
26052
26471
|
t
|
|
26053
26472
|
} = useTranslation("passwordForgot");
|
|
@@ -26068,7 +26487,7 @@ const PasswordForgotButton = _ref => {
|
|
|
26068
26487
|
};
|
|
26069
26488
|
|
|
26070
26489
|
const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
26071
|
-
store: store$
|
|
26490
|
+
store: store$c
|
|
26072
26491
|
}, props));
|
|
26073
26492
|
|
|
26074
26493
|
const PasswordForgotView = props => {
|
|
@@ -26119,7 +26538,7 @@ const PasswordForgotModal = _ref => {
|
|
|
26119
26538
|
};
|
|
26120
26539
|
PasswordForgotModal.viewId = "password-forgot";
|
|
26121
26540
|
|
|
26122
|
-
const initialState$
|
|
26541
|
+
const initialState$b = {
|
|
26123
26542
|
email: "",
|
|
26124
26543
|
emailError: null,
|
|
26125
26544
|
buttonDisabled: false,
|
|
@@ -26128,10 +26547,10 @@ const initialState$a = {
|
|
|
26128
26547
|
content: ""
|
|
26129
26548
|
}
|
|
26130
26549
|
};
|
|
26131
|
-
const store$
|
|
26550
|
+
const store$b = /*#__PURE__*/React.createContext(initialState$b);
|
|
26132
26551
|
const {
|
|
26133
|
-
Provider: Provider$
|
|
26134
|
-
} = store$
|
|
26552
|
+
Provider: Provider$b
|
|
26553
|
+
} = store$b;
|
|
26135
26554
|
const PasswordlessRequestContainer = _ref => {
|
|
26136
26555
|
let {
|
|
26137
26556
|
style,
|
|
@@ -26207,22 +26626,22 @@ const PasswordlessRequestContainer = _ref => {
|
|
|
26207
26626
|
default:
|
|
26208
26627
|
return state;
|
|
26209
26628
|
}
|
|
26210
|
-
}, initialState$
|
|
26629
|
+
}, initialState$b);
|
|
26211
26630
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26212
26631
|
style: {
|
|
26213
26632
|
...style
|
|
26214
26633
|
},
|
|
26215
26634
|
className: `pelcro-container pelcro-password-forgot-container ${className}`
|
|
26216
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
26635
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
|
|
26217
26636
|
value: {
|
|
26218
26637
|
state,
|
|
26219
26638
|
dispatch
|
|
26220
26639
|
}
|
|
26221
26640
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
26222
|
-
store: store$
|
|
26641
|
+
store: store$b,
|
|
26223
26642
|
key: i
|
|
26224
26643
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
26225
|
-
store: store$
|
|
26644
|
+
store: store$b
|
|
26226
26645
|
})));
|
|
26227
26646
|
};
|
|
26228
26647
|
|
|
@@ -26239,7 +26658,7 @@ const PasswordlessRequestViewButton = _ref => {
|
|
|
26239
26658
|
emailError
|
|
26240
26659
|
},
|
|
26241
26660
|
dispatch
|
|
26242
|
-
} = React.useContext(store$
|
|
26661
|
+
} = React.useContext(store$b);
|
|
26243
26662
|
const {
|
|
26244
26663
|
t
|
|
26245
26664
|
} = useTranslation("passwordlessRequest");
|
|
@@ -26260,7 +26679,7 @@ const PasswordlessRequestViewButton = _ref => {
|
|
|
26260
26679
|
};
|
|
26261
26680
|
|
|
26262
26681
|
const PasswordlessRequestEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
26263
|
-
store: store$
|
|
26682
|
+
store: store$b
|
|
26264
26683
|
}, props));
|
|
26265
26684
|
|
|
26266
26685
|
const PasswordlessRequestView = props => {
|
|
@@ -26302,7 +26721,7 @@ const PasswordlessRequestModal = _ref => {
|
|
|
26302
26721
|
};
|
|
26303
26722
|
PasswordlessRequestModal.viewId = "passwordless-request";
|
|
26304
26723
|
|
|
26305
|
-
const initialState$
|
|
26724
|
+
const initialState$a = {
|
|
26306
26725
|
currentPassword: "",
|
|
26307
26726
|
newPassword: "",
|
|
26308
26727
|
confirmNewPassword: "",
|
|
@@ -26316,10 +26735,10 @@ const initialState$9 = {
|
|
|
26316
26735
|
content: ""
|
|
26317
26736
|
}
|
|
26318
26737
|
};
|
|
26319
|
-
const store$
|
|
26738
|
+
const store$a = /*#__PURE__*/React.createContext(initialState$a);
|
|
26320
26739
|
const {
|
|
26321
|
-
Provider: Provider$
|
|
26322
|
-
} = store$
|
|
26740
|
+
Provider: Provider$a
|
|
26741
|
+
} = store$a;
|
|
26323
26742
|
const PasswordChangeContainer = _ref => {
|
|
26324
26743
|
let {
|
|
26325
26744
|
style,
|
|
@@ -26470,22 +26889,22 @@ const PasswordChangeContainer = _ref => {
|
|
|
26470
26889
|
default:
|
|
26471
26890
|
return state;
|
|
26472
26891
|
}
|
|
26473
|
-
}, initialState$
|
|
26892
|
+
}, initialState$a);
|
|
26474
26893
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26475
26894
|
style: {
|
|
26476
26895
|
...style
|
|
26477
26896
|
},
|
|
26478
26897
|
className: `pelcro-container pelcro-password-change-container ${className}`
|
|
26479
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
26898
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
|
|
26480
26899
|
value: {
|
|
26481
26900
|
state,
|
|
26482
26901
|
dispatch
|
|
26483
26902
|
}
|
|
26484
26903
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
26485
|
-
store: store$
|
|
26904
|
+
store: store$a,
|
|
26486
26905
|
key: i
|
|
26487
26906
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
26488
|
-
store: store$
|
|
26907
|
+
store: store$a
|
|
26489
26908
|
})));
|
|
26490
26909
|
};
|
|
26491
26910
|
|
|
@@ -26496,7 +26915,7 @@ function PasswordChangeCurrentPassword(props) {
|
|
|
26496
26915
|
currentPassword,
|
|
26497
26916
|
currentPasswordError
|
|
26498
26917
|
}
|
|
26499
|
-
} = React.useContext(store$
|
|
26918
|
+
} = React.useContext(store$a);
|
|
26500
26919
|
const handleBlur = React.useCallback(() => {
|
|
26501
26920
|
return dispatch({
|
|
26502
26921
|
type: VALIDATE_PASSWORD
|
|
@@ -26530,7 +26949,7 @@ function PasswordChangeNewPassword(props) {
|
|
|
26530
26949
|
newPassword,
|
|
26531
26950
|
newPasswordError
|
|
26532
26951
|
}
|
|
26533
|
-
} = React.useContext(store$
|
|
26952
|
+
} = React.useContext(store$a);
|
|
26534
26953
|
const handleBlur = React.useCallback(() => {
|
|
26535
26954
|
return dispatch({
|
|
26536
26955
|
type: VALIDATE_NEW_PASSWORD
|
|
@@ -26564,7 +26983,7 @@ function PasswordChangeConfirmNewPassword(props) {
|
|
|
26564
26983
|
confirmNewPassword,
|
|
26565
26984
|
confirmNewPasswordError
|
|
26566
26985
|
}
|
|
26567
|
-
} = React.useContext(store$
|
|
26986
|
+
} = React.useContext(store$a);
|
|
26568
26987
|
const handleBlur = React.useCallback(() => {
|
|
26569
26988
|
return dispatch({
|
|
26570
26989
|
type: VALIDATE_CONFIRM_NEW_PASSWORD
|
|
@@ -26606,7 +27025,7 @@ const PasswordChangeButton = _ref => {
|
|
|
26606
27025
|
confirmNewPasswordError
|
|
26607
27026
|
},
|
|
26608
27027
|
dispatch
|
|
26609
|
-
} = React.useContext(store$
|
|
27028
|
+
} = React.useContext(store$a);
|
|
26610
27029
|
const {
|
|
26611
27030
|
t
|
|
26612
27031
|
} = useTranslation("passwordChange");
|
|
@@ -26673,17 +27092,17 @@ const PasswordChangeModal = _ref => {
|
|
|
26673
27092
|
};
|
|
26674
27093
|
PasswordChangeModal.viewId = "password-change";
|
|
26675
27094
|
|
|
26676
|
-
const initialState$
|
|
27095
|
+
const initialState$9 = {
|
|
26677
27096
|
buttonDisabled: false,
|
|
26678
27097
|
alert: {
|
|
26679
27098
|
type: "error",
|
|
26680
27099
|
content: ""
|
|
26681
27100
|
}
|
|
26682
27101
|
};
|
|
26683
|
-
const store$
|
|
27102
|
+
const store$9 = /*#__PURE__*/React.createContext(initialState$9);
|
|
26684
27103
|
const {
|
|
26685
|
-
Provider: Provider$
|
|
26686
|
-
} = store$
|
|
27104
|
+
Provider: Provider$9
|
|
27105
|
+
} = store$9;
|
|
26687
27106
|
const CartContainer = _ref => {
|
|
26688
27107
|
let {
|
|
26689
27108
|
style,
|
|
@@ -26769,22 +27188,22 @@ const CartContainer = _ref => {
|
|
|
26769
27188
|
default:
|
|
26770
27189
|
return state;
|
|
26771
27190
|
}
|
|
26772
|
-
}, initialState$
|
|
27191
|
+
}, initialState$9);
|
|
26773
27192
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
26774
27193
|
style: {
|
|
26775
27194
|
...style
|
|
26776
27195
|
},
|
|
26777
27196
|
className: `pelcro-container pelcro-cart-container ${className}`
|
|
26778
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
27197
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
|
|
26779
27198
|
value: {
|
|
26780
27199
|
state,
|
|
26781
27200
|
dispatch
|
|
26782
27201
|
}
|
|
26783
27202
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
26784
|
-
store: store$
|
|
27203
|
+
store: store$9,
|
|
26785
27204
|
key: i
|
|
26786
27205
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
26787
|
-
store: store$
|
|
27206
|
+
store: store$9
|
|
26788
27207
|
})));
|
|
26789
27208
|
};
|
|
26790
27209
|
|
|
@@ -26826,7 +27245,7 @@ const CartSubmit = _ref => {
|
|
|
26826
27245
|
buttonDisabled
|
|
26827
27246
|
},
|
|
26828
27247
|
dispatch
|
|
26829
|
-
} = React.useContext(store$
|
|
27248
|
+
} = React.useContext(store$9);
|
|
26830
27249
|
const {
|
|
26831
27250
|
t
|
|
26832
27251
|
} = useTranslation("cart");
|
|
@@ -26861,7 +27280,7 @@ const CartTotalPrice = () => {
|
|
|
26861
27280
|
state: {
|
|
26862
27281
|
alert
|
|
26863
27282
|
}
|
|
26864
|
-
} = React.useContext(store$
|
|
27283
|
+
} = React.useContext(store$9);
|
|
26865
27284
|
const {
|
|
26866
27285
|
cartItems
|
|
26867
27286
|
} = usePelcro();
|
|
@@ -27175,7 +27594,7 @@ const OrderConfirmModal = props => {
|
|
|
27175
27594
|
};
|
|
27176
27595
|
OrderConfirmModal.viewId = "order-confirm";
|
|
27177
27596
|
|
|
27178
|
-
const initialState$
|
|
27597
|
+
const initialState$8 = {
|
|
27179
27598
|
email: "",
|
|
27180
27599
|
firstName: "",
|
|
27181
27600
|
lastName: "",
|
|
@@ -27187,10 +27606,10 @@ const initialState$7 = {
|
|
|
27187
27606
|
content: ""
|
|
27188
27607
|
}
|
|
27189
27608
|
};
|
|
27190
|
-
const store$
|
|
27609
|
+
const store$8 = /*#__PURE__*/React.createContext(initialState$8);
|
|
27191
27610
|
const {
|
|
27192
|
-
Provider: Provider$
|
|
27193
|
-
} = store$
|
|
27611
|
+
Provider: Provider$8
|
|
27612
|
+
} = store$8;
|
|
27194
27613
|
const GiftCreateContainer = _ref => {
|
|
27195
27614
|
let {
|
|
27196
27615
|
style,
|
|
@@ -27288,22 +27707,22 @@ const GiftCreateContainer = _ref => {
|
|
|
27288
27707
|
default:
|
|
27289
27708
|
return state;
|
|
27290
27709
|
}
|
|
27291
|
-
}, initialState$
|
|
27710
|
+
}, initialState$8);
|
|
27292
27711
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
27293
27712
|
style: {
|
|
27294
27713
|
...style
|
|
27295
27714
|
},
|
|
27296
27715
|
className: `pelcro-container pelcro-gift-create-container ${className}`
|
|
27297
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
27716
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
|
|
27298
27717
|
value: {
|
|
27299
27718
|
state,
|
|
27300
27719
|
dispatch
|
|
27301
27720
|
}
|
|
27302
27721
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
27303
|
-
store: store$
|
|
27722
|
+
store: store$8,
|
|
27304
27723
|
key: i
|
|
27305
27724
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
27306
|
-
store: store$
|
|
27725
|
+
store: store$8
|
|
27307
27726
|
})));
|
|
27308
27727
|
};
|
|
27309
27728
|
|
|
@@ -27318,7 +27737,7 @@ const GiftCreateSubmitButton = _ref => {
|
|
|
27318
27737
|
state: {
|
|
27319
27738
|
disableSubmit
|
|
27320
27739
|
}
|
|
27321
|
-
} = React.useContext(store$
|
|
27740
|
+
} = React.useContext(store$8);
|
|
27322
27741
|
const {
|
|
27323
27742
|
t
|
|
27324
27743
|
} = useTranslation("register");
|
|
@@ -27335,17 +27754,17 @@ const GiftCreateSubmitButton = _ref => {
|
|
|
27335
27754
|
|
|
27336
27755
|
const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
|
|
27337
27756
|
initWithUserEmail: false,
|
|
27338
|
-
store: store$
|
|
27757
|
+
store: store$8
|
|
27339
27758
|
}, props));
|
|
27340
27759
|
|
|
27341
27760
|
const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
|
|
27342
27761
|
initWithUserFirstName: false,
|
|
27343
|
-
store: store$
|
|
27762
|
+
store: store$8
|
|
27344
27763
|
}, props));
|
|
27345
27764
|
|
|
27346
27765
|
const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
|
|
27347
27766
|
initWithUserLastName: false,
|
|
27348
|
-
store: store$
|
|
27767
|
+
store: store$8
|
|
27349
27768
|
}, props));
|
|
27350
27769
|
|
|
27351
27770
|
const nowDate = new Date();
|
|
@@ -27359,7 +27778,7 @@ const GiftCreateStartDate = props => {
|
|
|
27359
27778
|
const {
|
|
27360
27779
|
dispatch,
|
|
27361
27780
|
state
|
|
27362
|
-
} = React.useContext(store$
|
|
27781
|
+
} = React.useContext(store$8);
|
|
27363
27782
|
const handleInputChange = value => {
|
|
27364
27783
|
dispatch({
|
|
27365
27784
|
type: SET_START_DATE,
|
|
@@ -27389,7 +27808,7 @@ function GiftCreateMessage(props) {
|
|
|
27389
27808
|
const {
|
|
27390
27809
|
dispatch,
|
|
27391
27810
|
state
|
|
27392
|
-
} = React.useContext(store$
|
|
27811
|
+
} = React.useContext(store$8);
|
|
27393
27812
|
const MAX_CHARS_COUNT = 200;
|
|
27394
27813
|
const remainingCharsCount = (_ref = MAX_CHARS_COUNT - ((_state$giftMessage = state.giftMessage) === null || _state$giftMessage === void 0 ? void 0 : _state$giftMessage.length)) !== null && _ref !== void 0 ? _ref : 0;
|
|
27395
27814
|
const handleInputChange = value => {
|
|
@@ -27507,7 +27926,7 @@ const GiftCreateModal = _ref => {
|
|
|
27507
27926
|
};
|
|
27508
27927
|
GiftCreateModal.viewId = "gift-create";
|
|
27509
27928
|
|
|
27510
|
-
const initialState$
|
|
27929
|
+
const initialState$7 = {
|
|
27511
27930
|
isSubmitting: false,
|
|
27512
27931
|
giftCode: "",
|
|
27513
27932
|
buttonDisabled: true,
|
|
@@ -27516,10 +27935,10 @@ const initialState$6 = {
|
|
|
27516
27935
|
content: ""
|
|
27517
27936
|
}
|
|
27518
27937
|
};
|
|
27519
|
-
const store$
|
|
27938
|
+
const store$7 = /*#__PURE__*/React.createContext(initialState$7);
|
|
27520
27939
|
const {
|
|
27521
|
-
Provider: Provider$
|
|
27522
|
-
} = store$
|
|
27940
|
+
Provider: Provider$7
|
|
27941
|
+
} = store$7;
|
|
27523
27942
|
const GiftRedeemContainer = _ref => {
|
|
27524
27943
|
var _ref2, _props$subscriptionId;
|
|
27525
27944
|
let {
|
|
@@ -27629,22 +28048,22 @@ const GiftRedeemContainer = _ref => {
|
|
|
27629
28048
|
default:
|
|
27630
28049
|
return state;
|
|
27631
28050
|
}
|
|
27632
|
-
}, initialState$
|
|
28051
|
+
}, initialState$7);
|
|
27633
28052
|
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
27634
28053
|
style: {
|
|
27635
28054
|
...style
|
|
27636
28055
|
},
|
|
27637
28056
|
className: `pelcro-container pelcro-gift-redeem-container ${className}`
|
|
27638
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
28057
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
|
|
27639
28058
|
value: {
|
|
27640
28059
|
state,
|
|
27641
28060
|
dispatch
|
|
27642
28061
|
}
|
|
27643
28062
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
27644
|
-
store: store$
|
|
28063
|
+
store: store$7,
|
|
27645
28064
|
key: i
|
|
27646
28065
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
27647
|
-
store: store$
|
|
28066
|
+
store: store$7
|
|
27648
28067
|
})));
|
|
27649
28068
|
};
|
|
27650
28069
|
|
|
@@ -27678,7 +28097,7 @@ function GiftCode(_ref) {
|
|
|
27678
28097
|
}
|
|
27679
28098
|
|
|
27680
28099
|
const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
|
|
27681
|
-
store: store$
|
|
28100
|
+
store: store$7
|
|
27682
28101
|
}, props));
|
|
27683
28102
|
|
|
27684
28103
|
const GiftRedeemSubmitButton = _ref => {
|
|
@@ -27693,7 +28112,7 @@ const GiftRedeemSubmitButton = _ref => {
|
|
|
27693
28112
|
disableSubmit,
|
|
27694
28113
|
isSubmitting
|
|
27695
28114
|
}
|
|
27696
|
-
} = React.useContext(store$
|
|
28115
|
+
} = React.useContext(store$7);
|
|
27697
28116
|
const {
|
|
27698
28117
|
t
|
|
27699
28118
|
} = useTranslation("register");
|
|
@@ -27778,7 +28197,7 @@ const moveDefaultAddressToStart = addresses => {
|
|
|
27778
28197
|
const addressesWithoutDefault = addresses.filter(address => !address.is_default);
|
|
27779
28198
|
return [defaultAddress, ...addressesWithoutDefault];
|
|
27780
28199
|
};
|
|
27781
|
-
const initialState$
|
|
28200
|
+
const initialState$6 = {
|
|
27782
28201
|
addresses: [],
|
|
27783
28202
|
selectedAddressId: null,
|
|
27784
28203
|
isSubmitting: false,
|
|
@@ -27787,10 +28206,10 @@ const initialState$5 = {
|
|
|
27787
28206
|
content: ""
|
|
27788
28207
|
}
|
|
27789
28208
|
};
|
|
27790
|
-
const store$
|
|
28209
|
+
const store$6 = /*#__PURE__*/React.createContext(initialState$6);
|
|
27791
28210
|
const {
|
|
27792
|
-
Provider: Provider$
|
|
27793
|
-
} = store$
|
|
28211
|
+
Provider: Provider$6
|
|
28212
|
+
} = store$6;
|
|
27794
28213
|
const AddressSelectContainer = _ref => {
|
|
27795
28214
|
var _props$giftCode, _ref2, _props$subscriptionId;
|
|
27796
28215
|
let {
|
|
@@ -27917,7 +28336,7 @@ const AddressSelectContainer = _ref => {
|
|
|
27917
28336
|
default:
|
|
27918
28337
|
return state;
|
|
27919
28338
|
}
|
|
27920
|
-
}, initialState$
|
|
28339
|
+
}, initialState$6);
|
|
27921
28340
|
React.useEffect(() => {
|
|
27922
28341
|
var _window$Pelcro$user$r;
|
|
27923
28342
|
dispatch({
|
|
@@ -27930,16 +28349,16 @@ const AddressSelectContainer = _ref => {
|
|
|
27930
28349
|
...style
|
|
27931
28350
|
},
|
|
27932
28351
|
className: `pelcro-container pelcro-address-select-container ${className}`
|
|
27933
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
28352
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
|
|
27934
28353
|
value: {
|
|
27935
28354
|
state,
|
|
27936
28355
|
dispatch
|
|
27937
28356
|
}
|
|
27938
28357
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
27939
|
-
store: store$
|
|
28358
|
+
store: store$6,
|
|
27940
28359
|
key: i
|
|
27941
28360
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
27942
|
-
store: store$
|
|
28361
|
+
store: store$6
|
|
27943
28362
|
})));
|
|
27944
28363
|
};
|
|
27945
28364
|
|
|
@@ -27950,7 +28369,7 @@ const AddressSelectList = () => {
|
|
|
27950
28369
|
addresses,
|
|
27951
28370
|
selectedAddressId
|
|
27952
28371
|
}
|
|
27953
|
-
} = React.useContext(store$
|
|
28372
|
+
} = React.useContext(store$6);
|
|
27954
28373
|
const handleAddressSelect = event => {
|
|
27955
28374
|
dispatch({
|
|
27956
28375
|
type: SELECT_ADDRESS,
|
|
@@ -27993,7 +28412,7 @@ const AddressSelectSubmit = _ref => {
|
|
|
27993
28412
|
selectedAddressId,
|
|
27994
28413
|
isSubmitting
|
|
27995
28414
|
}
|
|
27996
|
-
} = React.useContext(store$
|
|
28415
|
+
} = React.useContext(store$6);
|
|
27997
28416
|
const {
|
|
27998
28417
|
t
|
|
27999
28418
|
} = useTranslation("address");
|
|
@@ -28089,7 +28508,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
|
|
|
28089
28508
|
}
|
|
28090
28509
|
return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
|
|
28091
28510
|
};
|
|
28092
|
-
const initialState$
|
|
28511
|
+
const initialState$5 = {
|
|
28093
28512
|
paymentMethods: [],
|
|
28094
28513
|
selectedPaymentMethodId: null,
|
|
28095
28514
|
isSubmitting: false,
|
|
@@ -28098,10 +28517,10 @@ const initialState$4 = {
|
|
|
28098
28517
|
content: ""
|
|
28099
28518
|
}
|
|
28100
28519
|
};
|
|
28101
|
-
const store$
|
|
28520
|
+
const store$5 = /*#__PURE__*/React.createContext(initialState$5);
|
|
28102
28521
|
const {
|
|
28103
|
-
Provider: Provider$
|
|
28104
|
-
} = store$
|
|
28522
|
+
Provider: Provider$5
|
|
28523
|
+
} = store$5;
|
|
28105
28524
|
const PaymentMethodSelectContainer = _ref => {
|
|
28106
28525
|
let {
|
|
28107
28526
|
style,
|
|
@@ -28154,7 +28573,7 @@ const PaymentMethodSelectContainer = _ref => {
|
|
|
28154
28573
|
default:
|
|
28155
28574
|
return state;
|
|
28156
28575
|
}
|
|
28157
|
-
}, initialState$
|
|
28576
|
+
}, initialState$5);
|
|
28158
28577
|
React.useEffect(() => {
|
|
28159
28578
|
var _window$Pelcro$user$r3;
|
|
28160
28579
|
dispatch({
|
|
@@ -28167,16 +28586,16 @@ const PaymentMethodSelectContainer = _ref => {
|
|
|
28167
28586
|
...style
|
|
28168
28587
|
},
|
|
28169
28588
|
className: `pelcro-container pelcro-payment-select-container ${className}`
|
|
28170
|
-
}, /*#__PURE__*/React__default['default'].createElement(Provider$
|
|
28589
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
|
|
28171
28590
|
value: {
|
|
28172
28591
|
state,
|
|
28173
28592
|
dispatch
|
|
28174
28593
|
}
|
|
28175
28594
|
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
28176
|
-
store: store$
|
|
28595
|
+
store: store$5,
|
|
28177
28596
|
key: i
|
|
28178
28597
|
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
28179
|
-
store: store$
|
|
28598
|
+
store: store$5
|
|
28180
28599
|
})));
|
|
28181
28600
|
};
|
|
28182
28601
|
|
|
@@ -28190,7 +28609,7 @@ const PaymentMethodSelectList = () => {
|
|
|
28190
28609
|
paymentMethods,
|
|
28191
28610
|
selectedPaymentMethodId
|
|
28192
28611
|
}
|
|
28193
|
-
} = React.useContext(store$
|
|
28612
|
+
} = React.useContext(store$5);
|
|
28194
28613
|
const handlePaymentMethodSelect = event => {
|
|
28195
28614
|
dispatch({
|
|
28196
28615
|
type: SELECT_PAYMENT_METHOD,
|
|
@@ -28238,7 +28657,7 @@ const PaymentMethodSelectSubmit = _ref => {
|
|
|
28238
28657
|
selectedPaymentMethodId,
|
|
28239
28658
|
isSubmitting
|
|
28240
28659
|
}
|
|
28241
|
-
} = React.useContext(store$
|
|
28660
|
+
} = React.useContext(store$5);
|
|
28242
28661
|
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
28243
28662
|
onClick: () => {
|
|
28244
28663
|
dispatch({
|
|
@@ -28276,50 +28695,469 @@ const PaymentMethodSelectView = props => {
|
|
|
28276
28695
|
}))));
|
|
28277
28696
|
};
|
|
28278
28697
|
|
|
28279
|
-
const PaymentMethodSelectModal = _ref => {
|
|
28280
|
-
var _window$Pelcro, _window$Pelcro$uiSett;
|
|
28281
|
-
let {
|
|
28282
|
-
onDisplay,
|
|
28283
|
-
onClose,
|
|
28284
|
-
...otherProps
|
|
28285
|
-
} = _ref;
|
|
28286
|
-
const {
|
|
28287
|
-
switchToCheckoutForm,
|
|
28288
|
-
set,
|
|
28289
|
-
plan,
|
|
28290
|
-
order
|
|
28291
|
-
} = usePelcro();
|
|
28292
|
-
const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
|
|
28293
|
-
React.useEffect(() => {
|
|
28294
|
-
if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) {
|
|
28295
|
-
switchToCheckoutForm();
|
|
28698
|
+
const PaymentMethodSelectModal = _ref => {
|
|
28699
|
+
var _window$Pelcro, _window$Pelcro$uiSett;
|
|
28700
|
+
let {
|
|
28701
|
+
onDisplay,
|
|
28702
|
+
onClose,
|
|
28703
|
+
...otherProps
|
|
28704
|
+
} = _ref;
|
|
28705
|
+
const {
|
|
28706
|
+
switchToCheckoutForm,
|
|
28707
|
+
set,
|
|
28708
|
+
plan,
|
|
28709
|
+
order
|
|
28710
|
+
} = usePelcro();
|
|
28711
|
+
const skipPayment = (_window$Pelcro = window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.skipPaymentForFreePlans;
|
|
28712
|
+
React.useEffect(() => {
|
|
28713
|
+
if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) {
|
|
28714
|
+
switchToCheckoutForm();
|
|
28715
|
+
}
|
|
28716
|
+
}, []);
|
|
28717
|
+
const onSuccess = selectedPaymentMethodId => {
|
|
28718
|
+
var _otherProps$onSuccess;
|
|
28719
|
+
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, selectedPaymentMethodId);
|
|
28720
|
+
switchToCheckoutForm();
|
|
28721
|
+
};
|
|
28722
|
+
const onAddNewPaymentMethod = () => {
|
|
28723
|
+
set({
|
|
28724
|
+
selectedPaymentMethodId: null
|
|
28725
|
+
});
|
|
28726
|
+
switchToCheckoutForm();
|
|
28727
|
+
};
|
|
28728
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
28729
|
+
onDisplay: onDisplay,
|
|
28730
|
+
onClose: onClose,
|
|
28731
|
+
id: "pelcro-payment-method-select-modal"
|
|
28732
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(PaymentMethodSelectView, Object.assign({
|
|
28733
|
+
onAddNewPaymentMethod: onAddNewPaymentMethod
|
|
28734
|
+
}, otherProps, {
|
|
28735
|
+
onSuccess: onSuccess
|
|
28736
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
28737
|
+
};
|
|
28738
|
+
PaymentMethodSelectModal.viewId = "payment-method-select";
|
|
28739
|
+
|
|
28740
|
+
const initialState$4 = {
|
|
28741
|
+
paymentMethods: [],
|
|
28742
|
+
selectedPaymentMethodId: null,
|
|
28743
|
+
isSubmitting: false,
|
|
28744
|
+
deleteOption: "",
|
|
28745
|
+
disableSubmit: false,
|
|
28746
|
+
isLoading: false,
|
|
28747
|
+
skeletonLoader: true,
|
|
28748
|
+
alert: {
|
|
28749
|
+
type: "error",
|
|
28750
|
+
content: ""
|
|
28751
|
+
}
|
|
28752
|
+
};
|
|
28753
|
+
const store$4 = /*#__PURE__*/React.createContext(initialState$4);
|
|
28754
|
+
const {
|
|
28755
|
+
Provider: Provider$4
|
|
28756
|
+
} = store$4;
|
|
28757
|
+
const PaymentMethodDeleteContainer = _ref => {
|
|
28758
|
+
let {
|
|
28759
|
+
style,
|
|
28760
|
+
className = "",
|
|
28761
|
+
onSuccess = () => {},
|
|
28762
|
+
onFailure = () => {},
|
|
28763
|
+
children
|
|
28764
|
+
} = _ref;
|
|
28765
|
+
const {
|
|
28766
|
+
paymentMethodToDelete
|
|
28767
|
+
} = usePelcro();
|
|
28768
|
+
React.useEffect(() => {
|
|
28769
|
+
window.Pelcro.paymentMethods.list({
|
|
28770
|
+
auth_token: window.Pelcro.user.read().auth_token
|
|
28771
|
+
}, (err, res) => {
|
|
28772
|
+
if (err) {
|
|
28773
|
+
return console.error(err);
|
|
28774
|
+
}
|
|
28775
|
+
if (res) {
|
|
28776
|
+
dispatch({
|
|
28777
|
+
type: SET_PAYMENT_METHODS,
|
|
28778
|
+
payload: res.data
|
|
28779
|
+
});
|
|
28780
|
+
dispatch({
|
|
28781
|
+
type: SKELETON_LOADER,
|
|
28782
|
+
payload: false
|
|
28783
|
+
});
|
|
28784
|
+
if (res.data.length !== 1) {
|
|
28785
|
+
dispatch({
|
|
28786
|
+
type: SET_DELETE_PAYMENT_METHOD_OPTION,
|
|
28787
|
+
payload: "select"
|
|
28788
|
+
});
|
|
28789
|
+
} else {
|
|
28790
|
+
dispatch({
|
|
28791
|
+
type: SET_DELETE_PAYMENT_METHOD_OPTION,
|
|
28792
|
+
payload: "add"
|
|
28793
|
+
});
|
|
28794
|
+
}
|
|
28795
|
+
}
|
|
28796
|
+
});
|
|
28797
|
+
}, []); // eslint-disable-line react-hooks/exhaustive-deps
|
|
28798
|
+
|
|
28799
|
+
const setDefaultPaymentMethod = () => {
|
|
28800
|
+
const {
|
|
28801
|
+
selectedPaymentMethodId: paymentMethodId
|
|
28802
|
+
} = state;
|
|
28803
|
+
window.Pelcro.paymentMethods.setDefaultPaymentMethod({
|
|
28804
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
28805
|
+
payment_method_id: paymentMethodId
|
|
28806
|
+
}, (err, res) => {
|
|
28807
|
+
if (err) {
|
|
28808
|
+
onFailure(err);
|
|
28809
|
+
return dispatch({
|
|
28810
|
+
type: SHOW_ALERT,
|
|
28811
|
+
payload: {
|
|
28812
|
+
type: "error",
|
|
28813
|
+
content: getErrorMessages(err)
|
|
28814
|
+
}
|
|
28815
|
+
});
|
|
28816
|
+
}
|
|
28817
|
+
setTimeout(() => {
|
|
28818
|
+
deletePaymentMethod();
|
|
28819
|
+
}, 1000);
|
|
28820
|
+
});
|
|
28821
|
+
};
|
|
28822
|
+
const deletePaymentMethod = () => {
|
|
28823
|
+
const {
|
|
28824
|
+
id: paymentMethodId
|
|
28825
|
+
} = paymentMethodToDelete;
|
|
28826
|
+
window.Pelcro.paymentMethods.deletePaymentMethod({
|
|
28827
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
28828
|
+
payment_method_id: paymentMethodId
|
|
28829
|
+
}, (err, res) => {
|
|
28830
|
+
if (err) {
|
|
28831
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
28832
|
+
return dispatch({
|
|
28833
|
+
type: SHOW_ALERT,
|
|
28834
|
+
payload: {
|
|
28835
|
+
type: "error",
|
|
28836
|
+
content: getErrorMessages(err)
|
|
28837
|
+
}
|
|
28838
|
+
});
|
|
28839
|
+
}
|
|
28840
|
+
dispatch({
|
|
28841
|
+
type: DISABLE_SUBMIT,
|
|
28842
|
+
payload: false
|
|
28843
|
+
});
|
|
28844
|
+
dispatch({
|
|
28845
|
+
type: LOADING,
|
|
28846
|
+
payload: false
|
|
28847
|
+
});
|
|
28848
|
+
onSuccess(res);
|
|
28849
|
+
});
|
|
28850
|
+
};
|
|
28851
|
+
const [state, dispatch] = useReducerWithSideEffects((state, action) => {
|
|
28852
|
+
switch (action.type) {
|
|
28853
|
+
case SELECT_PAYMENT_METHOD:
|
|
28854
|
+
return lib_7({
|
|
28855
|
+
...state,
|
|
28856
|
+
selectedPaymentMethodId: action.payload
|
|
28857
|
+
});
|
|
28858
|
+
case HANDLE_SUBMIT:
|
|
28859
|
+
return lib_5({
|
|
28860
|
+
...state,
|
|
28861
|
+
disableSubmit: true,
|
|
28862
|
+
isLoading: true
|
|
28863
|
+
}, (state, dispatch) => setDefaultPaymentMethod());
|
|
28864
|
+
case SET_DELETE_PAYMENT_METHOD_OPTION:
|
|
28865
|
+
return lib_7({
|
|
28866
|
+
...state,
|
|
28867
|
+
deleteOption: action.payload
|
|
28868
|
+
});
|
|
28869
|
+
case SET_PAYMENT_METHODS:
|
|
28870
|
+
return lib_7({
|
|
28871
|
+
...state,
|
|
28872
|
+
paymentMethods: action.payload
|
|
28873
|
+
});
|
|
28874
|
+
case SHOW_ALERT:
|
|
28875
|
+
return lib_7({
|
|
28876
|
+
...state,
|
|
28877
|
+
alert: action.payload
|
|
28878
|
+
});
|
|
28879
|
+
case DISABLE_SUBMIT:
|
|
28880
|
+
return lib_7({
|
|
28881
|
+
...state,
|
|
28882
|
+
disableSubmit: action.payload
|
|
28883
|
+
});
|
|
28884
|
+
case LOADING:
|
|
28885
|
+
return lib_7({
|
|
28886
|
+
...state,
|
|
28887
|
+
isLoading: action.payload
|
|
28888
|
+
});
|
|
28889
|
+
case SKELETON_LOADER:
|
|
28890
|
+
return lib_7({
|
|
28891
|
+
...state,
|
|
28892
|
+
skeletonLoader: action.payload
|
|
28893
|
+
});
|
|
28894
|
+
default:
|
|
28895
|
+
return state;
|
|
28896
|
+
}
|
|
28897
|
+
}, initialState$4);
|
|
28898
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28899
|
+
style: {
|
|
28900
|
+
...style
|
|
28901
|
+
},
|
|
28902
|
+
className: `pelcro-container pelcro-payment-method-delete-container ${className}`
|
|
28903
|
+
}, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
|
|
28904
|
+
value: {
|
|
28905
|
+
state,
|
|
28906
|
+
dispatch
|
|
28907
|
+
}
|
|
28908
|
+
}, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
|
|
28909
|
+
store: store$4,
|
|
28910
|
+
key: i
|
|
28911
|
+
})) : /*#__PURE__*/React__default['default'].cloneElement(children, {
|
|
28912
|
+
store: store$4
|
|
28913
|
+
})));
|
|
28914
|
+
};
|
|
28915
|
+
|
|
28916
|
+
const PaymentMethodDeleteSubmit = _ref => {
|
|
28917
|
+
let {
|
|
28918
|
+
name,
|
|
28919
|
+
onClick,
|
|
28920
|
+
...otherProps
|
|
28921
|
+
} = _ref;
|
|
28922
|
+
const {
|
|
28923
|
+
t
|
|
28924
|
+
} = useTranslation("paymentMethod");
|
|
28925
|
+
const {
|
|
28926
|
+
dispatch,
|
|
28927
|
+
state: {
|
|
28928
|
+
isLoading,
|
|
28929
|
+
isDisabled
|
|
28930
|
+
}
|
|
28931
|
+
} = React.useContext(store$4);
|
|
28932
|
+
return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
|
|
28933
|
+
onClick: () => {
|
|
28934
|
+
dispatch({
|
|
28935
|
+
type: HANDLE_SUBMIT
|
|
28936
|
+
});
|
|
28937
|
+
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
28938
|
+
},
|
|
28939
|
+
disabled: isDisabled,
|
|
28940
|
+
isLoading: isLoading,
|
|
28941
|
+
className: "plc-w-full"
|
|
28942
|
+
}, otherProps), name !== null && name !== void 0 ? name : t("select.buttons.selectPaymentMethod"));
|
|
28943
|
+
};
|
|
28944
|
+
|
|
28945
|
+
const PaymentMethodDeleteList = props => {
|
|
28946
|
+
const {
|
|
28947
|
+
t
|
|
28948
|
+
} = useTranslation("paymentMethod");
|
|
28949
|
+
const {
|
|
28950
|
+
dispatch,
|
|
28951
|
+
state: {
|
|
28952
|
+
deleteOption,
|
|
28953
|
+
selectedPaymentMethodId,
|
|
28954
|
+
paymentMethods,
|
|
28955
|
+
skeletonLoader
|
|
28956
|
+
}
|
|
28957
|
+
} = React.useContext(store$4);
|
|
28958
|
+
const {
|
|
28959
|
+
paymentMethodToDelete
|
|
28960
|
+
} = usePelcro();
|
|
28961
|
+
const handlePaymentMethodSelect = event => {
|
|
28962
|
+
dispatch({
|
|
28963
|
+
type: SELECT_PAYMENT_METHOD,
|
|
28964
|
+
payload: event.target.value
|
|
28965
|
+
});
|
|
28966
|
+
};
|
|
28967
|
+
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, skeletonLoader ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28968
|
+
className: "plc-w-full plc-h-40 plc-bg-gray-300 plc-rounded-md plc-animate-pulse"
|
|
28969
|
+
}) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, paymentMethods && deleteOption === "select" && /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28970
|
+
className: "plc-px-3 plc-py-2 plc-space-y-4 plc-overflow-y-scroll no-scrollbar plc-max-h-80 pelcro-payment-method-select-wrapper plc-mb-4"
|
|
28971
|
+
}, paymentMethods.filter(paymentMethod => (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id) !== (paymentMethodToDelete === null || paymentMethodToDelete === void 0 ? void 0 : paymentMethodToDelete.id)).map(paymentMethod => {
|
|
28972
|
+
var _paymentMethod$proper, _paymentMethod$proper2, _paymentMethod$proper3, _paymentMethod$proper4;
|
|
28973
|
+
const isSelected = selectedPaymentMethodId === String(paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id);
|
|
28974
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28975
|
+
key: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id,
|
|
28976
|
+
className: `plc-p-2 plc-pl-4 plc-shadow-md plc-text-gray-900 plc-rounded pelcro-payment-method-wrapper`
|
|
28977
|
+
}, /*#__PURE__*/React__default['default'].createElement(Radio, {
|
|
28978
|
+
className: "plc-flex plc-items-center pelcro-select-payment-method-radio",
|
|
28979
|
+
labelClassName: "plc-flex plc-items-center plc-space-x-2 plc-cursor-pointer plc-w-full",
|
|
28980
|
+
id: `pelcro-payment-method-select-${paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id}`,
|
|
28981
|
+
name: "paymentMethod",
|
|
28982
|
+
checked: isSelected,
|
|
28983
|
+
value: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id,
|
|
28984
|
+
onChange: handlePaymentMethodSelect
|
|
28985
|
+
}, getPaymentCardIcon$1((_paymentMethod$proper = paymentMethod.properties) === null || _paymentMethod$proper === void 0 ? void 0 : _paymentMethod$proper.brand), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28986
|
+
className: "plc-flex plc-flex-col plc-text-lg pelcro-payment-method-details"
|
|
28987
|
+
}, /*#__PURE__*/React__default['default'].createElement("p", {
|
|
28988
|
+
className: "plc-font-semibold"
|
|
28989
|
+
}, "\u2022\u2022\u2022\u2022 \u2022\u2022\u2022\u2022", " ", (_paymentMethod$proper2 = paymentMethod.properties) === null || _paymentMethod$proper2 === void 0 ? void 0 : _paymentMethod$proper2.last4), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
28990
|
+
className: "plc-text-sm plc-text-gray-500"
|
|
28991
|
+
}, t("select.expires"), " ", (_paymentMethod$proper3 = paymentMethod.properties) === null || _paymentMethod$proper3 === void 0 ? void 0 : _paymentMethod$proper3.exp_month, "/", (_paymentMethod$proper4 = paymentMethod.properties) === null || _paymentMethod$proper4 === void 0 ? void 0 : _paymentMethod$proper4.exp_year))));
|
|
28992
|
+
})), /*#__PURE__*/React__default['default'].createElement("div", {
|
|
28993
|
+
className: "plc-px-3"
|
|
28994
|
+
}, /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteSubmit, null))), deleteOption === "add" && /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, {
|
|
28995
|
+
type: "deletePaymentSource",
|
|
28996
|
+
showCoupon: false,
|
|
28997
|
+
showExternalPaymentMethods: false,
|
|
28998
|
+
showApplePayButton: false,
|
|
28999
|
+
onDisplay: props.onDisplay,
|
|
29000
|
+
onFailure: props.onFailure,
|
|
29001
|
+
onSuccess: props.onSuccess,
|
|
29002
|
+
setAsDefault: true
|
|
29003
|
+
})));
|
|
29004
|
+
};
|
|
29005
|
+
|
|
29006
|
+
const PaymentMethodDeleteOptions = _ref => {
|
|
29007
|
+
const {
|
|
29008
|
+
state: {
|
|
29009
|
+
deleteOption,
|
|
29010
|
+
paymentMethods,
|
|
29011
|
+
skeletonLoader
|
|
29012
|
+
},
|
|
29013
|
+
dispatch
|
|
29014
|
+
} = React.useContext(store$4);
|
|
29015
|
+
const {
|
|
29016
|
+
t
|
|
29017
|
+
} = useTranslation("paymentMethod");
|
|
29018
|
+
const handleOptionSelect = event => {
|
|
29019
|
+
dispatch({
|
|
29020
|
+
type: SET_DELETE_PAYMENT_METHOD_OPTION,
|
|
29021
|
+
payload: event.target.value
|
|
29022
|
+
});
|
|
29023
|
+
};
|
|
29024
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
29025
|
+
className: "plc-text-left plc-mr-auto plc-mb-6"
|
|
29026
|
+
}, skeletonLoader ? /*#__PURE__*/React__default['default'].createElement("div", {
|
|
29027
|
+
className: "plc-flex plc-flex-col plc-space-y-3"
|
|
29028
|
+
}, /*#__PURE__*/React__default['default'].createElement(Radio, {
|
|
29029
|
+
className: "plc-animate-puls"
|
|
29030
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
29031
|
+
className: "plc-w-36 plc-bg-gray-300 plc-h-4 plc-rounded-md plc-animate-pulse"
|
|
29032
|
+
})), /*#__PURE__*/React__default['default'].createElement(Radio, {
|
|
29033
|
+
className: "plc-animate-pulse"
|
|
29034
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
29035
|
+
className: "plc-w-36 plc-bg-gray-300 plc-h-4 plc-rounded-md plc-animate-pulse"
|
|
29036
|
+
}))) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, paymentMethods && paymentMethods.length !== 1 && /*#__PURE__*/React__default['default'].createElement(Radio, {
|
|
29037
|
+
onChange: handleOptionSelect,
|
|
29038
|
+
checked: deleteOption === "select",
|
|
29039
|
+
value: "select"
|
|
29040
|
+
}, t("delete.options.select")), /*#__PURE__*/React__default['default'].createElement(Radio, {
|
|
29041
|
+
onChange: handleOptionSelect,
|
|
29042
|
+
checked: deleteOption === "add",
|
|
29043
|
+
value: "add"
|
|
29044
|
+
}, t("delete.options.add"))));
|
|
29045
|
+
};
|
|
29046
|
+
|
|
29047
|
+
function PaymentMethodDeleteView(props) {
|
|
29048
|
+
const [t] = useTranslation("paymentMethod");
|
|
29049
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
29050
|
+
id: "pelcro-payment-method-delete-view"
|
|
29051
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
29052
|
+
className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
29053
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
29054
|
+
className: "plc-text-2xl plc-font-semibold plc-mb-2"
|
|
29055
|
+
}, t("delete.title")), /*#__PURE__*/React__default['default'].createElement("p", {
|
|
29056
|
+
className: ""
|
|
29057
|
+
}, t("delete.subtitle"))), /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, {
|
|
29058
|
+
className: "plc-mb-2"
|
|
29059
|
+
}), /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteOptions, null), /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteList, {
|
|
29060
|
+
onSuccess: props.onSuccess
|
|
29061
|
+
})));
|
|
29062
|
+
}
|
|
29063
|
+
|
|
29064
|
+
const PaymentMethodDeleteModal = props => {
|
|
29065
|
+
var _window, _window$Pelcro, _window$Pelcro$uiSett;
|
|
29066
|
+
const {
|
|
29067
|
+
t
|
|
29068
|
+
} = useTranslation("paymentMethod");
|
|
29069
|
+
const enableReactGA4 = (_window = window) === null || _window === void 0 ? void 0 : (_window$Pelcro = _window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableReactGA4;
|
|
29070
|
+
const {
|
|
29071
|
+
resetView
|
|
29072
|
+
} = usePelcro();
|
|
29073
|
+
const onSuccess = res => {
|
|
29074
|
+
var _props$onSuccess;
|
|
29075
|
+
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
29076
|
+
if (enableReactGA4) {
|
|
29077
|
+
ReactGA4.event("Delete payment card", {
|
|
29078
|
+
nonInteraction: true
|
|
29079
|
+
});
|
|
29080
|
+
} else {
|
|
29081
|
+
var _ReactGA$event;
|
|
29082
|
+
ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
|
|
29083
|
+
category: "ACTIONS",
|
|
29084
|
+
action: "Delete payment card",
|
|
29085
|
+
nonInteraction: true
|
|
29086
|
+
});
|
|
29087
|
+
}
|
|
29088
|
+
notify.success(t("delete.paymentMethodReplaced"));
|
|
29089
|
+
resetView();
|
|
29090
|
+
};
|
|
29091
|
+
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
29092
|
+
id: "pelcro-payment-method-delete-modal",
|
|
29093
|
+
onDisplay: props.onDisplay,
|
|
29094
|
+
onClose: props.onClose
|
|
29095
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteView, Object.assign({}, props, {
|
|
29096
|
+
onSuccess: onSuccess
|
|
29097
|
+
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
29098
|
+
};
|
|
29099
|
+
PaymentMethodDeleteModal.viewId = "payment-method-delete";
|
|
29100
|
+
|
|
29101
|
+
const PaymentMethodCreateContainer = props => {
|
|
29102
|
+
return /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainer, Object.assign({
|
|
29103
|
+
type: "createPaymentSource",
|
|
29104
|
+
className: "pelcro-payment-create-container"
|
|
29105
|
+
}, props));
|
|
29106
|
+
};
|
|
29107
|
+
|
|
29108
|
+
/**
|
|
29109
|
+
*
|
|
29110
|
+
*/
|
|
29111
|
+
function PaymentMethodCreateView(props) {
|
|
29112
|
+
const [t] = useTranslation("paymentMethod");
|
|
29113
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
29114
|
+
id: "pelcro-payment-method-create-view"
|
|
29115
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
29116
|
+
className: "plc-mb-2 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
|
|
29117
|
+
}, /*#__PURE__*/React__default['default'].createElement("h4", {
|
|
29118
|
+
className: "plc-text-2xl plc-font-semibold "
|
|
29119
|
+
}, t("create.title")), /*#__PURE__*/React__default['default'].createElement("p", null, t("create.subtitle"))), /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, {
|
|
29120
|
+
type: "createPaymentSource",
|
|
29121
|
+
showCoupon: false,
|
|
29122
|
+
showExternalPaymentMethods: false,
|
|
29123
|
+
showApplePayButton: false,
|
|
29124
|
+
onDisplay: props.onDisplay,
|
|
29125
|
+
onFailure: props.onFailure,
|
|
29126
|
+
onSuccess: props.onSuccess
|
|
29127
|
+
}));
|
|
29128
|
+
}
|
|
29129
|
+
|
|
29130
|
+
const PaymentMethodCreateModal = props => {
|
|
29131
|
+
var _window, _window$Pelcro, _window$Pelcro$uiSett;
|
|
29132
|
+
const enableReactGA4 = (_window = window) === null || _window === void 0 ? void 0 : (_window$Pelcro = _window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableReactGA4;
|
|
29133
|
+
const onSuccess = res => {
|
|
29134
|
+
var _props$onSuccess;
|
|
29135
|
+
(_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
|
|
29136
|
+
if (enableReactGA4) {
|
|
29137
|
+
ReactGA4.event("Created payment card", {
|
|
29138
|
+
nonInteraction: true
|
|
29139
|
+
});
|
|
29140
|
+
} else {
|
|
29141
|
+
var _ReactGA$event;
|
|
29142
|
+
ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
|
|
29143
|
+
category: "ACTIONS",
|
|
29144
|
+
action: "Created payment card",
|
|
29145
|
+
nonInteraction: true
|
|
29146
|
+
});
|
|
28296
29147
|
}
|
|
28297
|
-
}, []);
|
|
28298
|
-
const onSuccess = selectedPaymentMethodId => {
|
|
28299
|
-
var _otherProps$onSuccess;
|
|
28300
|
-
(_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, selectedPaymentMethodId);
|
|
28301
|
-
switchToCheckoutForm();
|
|
28302
|
-
};
|
|
28303
|
-
const onAddNewPaymentMethod = () => {
|
|
28304
|
-
set({
|
|
28305
|
-
selectedPaymentMethodId: null
|
|
28306
|
-
});
|
|
28307
|
-
switchToCheckoutForm();
|
|
28308
29148
|
};
|
|
28309
29149
|
return /*#__PURE__*/React__default['default'].createElement(Modal, {
|
|
28310
|
-
|
|
28311
|
-
|
|
28312
|
-
|
|
28313
|
-
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(
|
|
28314
|
-
onAddNewPaymentMethod: onAddNewPaymentMethod
|
|
28315
|
-
}, otherProps, {
|
|
29150
|
+
id: "pelcro-payment-method-create-modal",
|
|
29151
|
+
onDisplay: props.onDisplay,
|
|
29152
|
+
onClose: props.onClose
|
|
29153
|
+
}, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(PaymentMethodCreateView, Object.assign({}, props, {
|
|
28316
29154
|
onSuccess: onSuccess
|
|
28317
29155
|
}))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
|
|
28318
29156
|
};
|
|
28319
|
-
|
|
29157
|
+
PaymentMethodCreateModal.viewId = "payment-method-create";
|
|
28320
29158
|
|
|
28321
|
-
function _extends$
|
|
28322
|
-
_extends$
|
|
29159
|
+
function _extends$i() {
|
|
29160
|
+
_extends$i = Object.assign || function (target) {
|
|
28323
29161
|
for (var i = 1; i < arguments.length; i++) {
|
|
28324
29162
|
var source = arguments[i];
|
|
28325
29163
|
|
|
@@ -28333,7 +29171,7 @@ function _extends$h() {
|
|
|
28333
29171
|
return target;
|
|
28334
29172
|
};
|
|
28335
29173
|
|
|
28336
|
-
return _extends$
|
|
29174
|
+
return _extends$i.apply(this, arguments);
|
|
28337
29175
|
}
|
|
28338
29176
|
|
|
28339
29177
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
@@ -28517,7 +29355,7 @@ function render(props, propsBag, defaultTag, features, visible) {
|
|
|
28517
29355
|
return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
|
|
28518
29356
|
return null;
|
|
28519
29357
|
}, _match[RenderStrategy.Hidden] = function () {
|
|
28520
|
-
return _render(_extends$
|
|
29358
|
+
return _render(_extends$i({}, _rest, {
|
|
28521
29359
|
hidden: true,
|
|
28522
29360
|
style: {
|
|
28523
29361
|
display: 'none'
|
|
@@ -29045,7 +29883,7 @@ function TransitionChild(props) {
|
|
|
29045
29883
|
var passthroughProps = rest;
|
|
29046
29884
|
return React__default['default'].createElement(NestingContext.Provider, {
|
|
29047
29885
|
value: nesting
|
|
29048
|
-
}, render(_extends$
|
|
29886
|
+
}, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
|
|
29049
29887
|
}
|
|
29050
29888
|
|
|
29051
29889
|
function Transition(props) {
|
|
@@ -29089,7 +29927,7 @@ function Transition(props) {
|
|
|
29089
29927
|
value: nestingBag
|
|
29090
29928
|
}, React__default['default'].createElement(TransitionContext.Provider, {
|
|
29091
29929
|
value: transitionBag
|
|
29092
|
-
}, render(_extends$
|
|
29930
|
+
}, render(_extends$i({}, sharedProps, {
|
|
29093
29931
|
as: React.Fragment,
|
|
29094
29932
|
children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
|
|
29095
29933
|
}), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
|
|
@@ -29216,12 +30054,12 @@ var ActionTypes;
|
|
|
29216
30054
|
})(ActionTypes || (ActionTypes = {}));
|
|
29217
30055
|
|
|
29218
30056
|
(_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
|
|
29219
|
-
return _extends$
|
|
30057
|
+
return _extends$i({}, state, {
|
|
29220
30058
|
activeItemIndex: null,
|
|
29221
30059
|
menuState: MenuStates.Closed
|
|
29222
30060
|
});
|
|
29223
30061
|
}, _reducers[ActionTypes.OpenMenu] = function (state) {
|
|
29224
|
-
return _extends$
|
|
30062
|
+
return _extends$i({}, state, {
|
|
29225
30063
|
menuState: MenuStates.Open
|
|
29226
30064
|
});
|
|
29227
30065
|
}, _reducers[ActionTypes.GoToItem] = function (state, action) {
|
|
@@ -29240,7 +30078,7 @@ var ActionTypes;
|
|
|
29240
30078
|
}
|
|
29241
30079
|
});
|
|
29242
30080
|
if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
|
|
29243
|
-
return _extends$
|
|
30081
|
+
return _extends$i({}, state, {
|
|
29244
30082
|
searchQuery: '',
|
|
29245
30083
|
activeItemIndex: activeItemIndex
|
|
29246
30084
|
});
|
|
@@ -29251,19 +30089,19 @@ var ActionTypes;
|
|
|
29251
30089
|
|
|
29252
30090
|
return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
|
|
29253
30091
|
});
|
|
29254
|
-
if (match === -1 || match === state.activeItemIndex) return _extends$
|
|
30092
|
+
if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
|
|
29255
30093
|
searchQuery: searchQuery
|
|
29256
30094
|
});
|
|
29257
|
-
return _extends$
|
|
30095
|
+
return _extends$i({}, state, {
|
|
29258
30096
|
searchQuery: searchQuery,
|
|
29259
30097
|
activeItemIndex: match
|
|
29260
30098
|
});
|
|
29261
30099
|
}, _reducers[ActionTypes.ClearSearch] = function (state) {
|
|
29262
|
-
return _extends$
|
|
30100
|
+
return _extends$i({}, state, {
|
|
29263
30101
|
searchQuery: ''
|
|
29264
30102
|
});
|
|
29265
30103
|
}, _reducers[ActionTypes.RegisterItem] = function (state, action) {
|
|
29266
|
-
return _extends$
|
|
30104
|
+
return _extends$i({}, state, {
|
|
29267
30105
|
items: [].concat(state.items, [{
|
|
29268
30106
|
id: action.id,
|
|
29269
30107
|
dataRef: action.dataRef
|
|
@@ -29276,7 +30114,7 @@ var ActionTypes;
|
|
|
29276
30114
|
return a.id === action.id;
|
|
29277
30115
|
});
|
|
29278
30116
|
if (idx !== -1) nextItems.splice(idx, 1);
|
|
29279
|
-
return _extends$
|
|
30117
|
+
return _extends$i({}, state, {
|
|
29280
30118
|
items: nextItems,
|
|
29281
30119
|
activeItemIndex: function () {
|
|
29282
30120
|
if (idx === state.activeItemIndex) return null;
|
|
@@ -29315,19 +30153,19 @@ var ActionTypes$1;
|
|
|
29315
30153
|
(_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
|
|
29316
30154
|
if (state.disabled) return state;
|
|
29317
30155
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
29318
|
-
return _extends$
|
|
30156
|
+
return _extends$i({}, state, {
|
|
29319
30157
|
activeOptionIndex: null,
|
|
29320
30158
|
listboxState: ListboxStates.Closed
|
|
29321
30159
|
});
|
|
29322
30160
|
}, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
|
|
29323
30161
|
if (state.disabled) return state;
|
|
29324
30162
|
if (state.listboxState === ListboxStates.Open) return state;
|
|
29325
|
-
return _extends$
|
|
30163
|
+
return _extends$i({}, state, {
|
|
29326
30164
|
listboxState: ListboxStates.Open
|
|
29327
30165
|
});
|
|
29328
30166
|
}, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
|
|
29329
30167
|
if (state.disabled === action.disabled) return state;
|
|
29330
|
-
return _extends$
|
|
30168
|
+
return _extends$i({}, state, {
|
|
29331
30169
|
disabled: action.disabled
|
|
29332
30170
|
});
|
|
29333
30171
|
}, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
|
|
@@ -29348,7 +30186,7 @@ var ActionTypes$1;
|
|
|
29348
30186
|
}
|
|
29349
30187
|
});
|
|
29350
30188
|
if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
|
|
29351
|
-
return _extends$
|
|
30189
|
+
return _extends$i({}, state, {
|
|
29352
30190
|
searchQuery: '',
|
|
29353
30191
|
activeOptionIndex: activeOptionIndex
|
|
29354
30192
|
});
|
|
@@ -29361,10 +30199,10 @@ var ActionTypes$1;
|
|
|
29361
30199
|
|
|
29362
30200
|
return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
|
|
29363
30201
|
});
|
|
29364
|
-
if (match === -1 || match === state.activeOptionIndex) return _extends$
|
|
30202
|
+
if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
|
|
29365
30203
|
searchQuery: searchQuery
|
|
29366
30204
|
});
|
|
29367
|
-
return _extends$
|
|
30205
|
+
return _extends$i({}, state, {
|
|
29368
30206
|
searchQuery: searchQuery,
|
|
29369
30207
|
activeOptionIndex: match
|
|
29370
30208
|
});
|
|
@@ -29372,11 +30210,11 @@ var ActionTypes$1;
|
|
|
29372
30210
|
if (state.disabled) return state;
|
|
29373
30211
|
if (state.listboxState === ListboxStates.Closed) return state;
|
|
29374
30212
|
if (state.searchQuery === '') return state;
|
|
29375
|
-
return _extends$
|
|
30213
|
+
return _extends$i({}, state, {
|
|
29376
30214
|
searchQuery: ''
|
|
29377
30215
|
});
|
|
29378
30216
|
}, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
|
|
29379
|
-
return _extends$
|
|
30217
|
+
return _extends$i({}, state, {
|
|
29380
30218
|
options: [].concat(state.options, [{
|
|
29381
30219
|
id: action.id,
|
|
29382
30220
|
dataRef: action.dataRef
|
|
@@ -29389,7 +30227,7 @@ var ActionTypes$1;
|
|
|
29389
30227
|
return a.id === action.id;
|
|
29390
30228
|
});
|
|
29391
30229
|
if (idx !== -1) nextOptions.splice(idx, 1);
|
|
29392
|
-
return _extends$
|
|
30230
|
+
return _extends$i({}, state, {
|
|
29393
30231
|
options: nextOptions,
|
|
29394
30232
|
activeOptionIndex: function () {
|
|
29395
30233
|
if (idx === state.activeOptionIndex) return null;
|
|
@@ -29408,6 +30246,7 @@ var GroupContext = /*#__PURE__*/React.createContext(null);
|
|
|
29408
30246
|
GroupContext.displayName = 'GroupContext';
|
|
29409
30247
|
|
|
29410
30248
|
const getPaymentCardIcon = name => {
|
|
30249
|
+
var _icons$name$toLowerCa;
|
|
29411
30250
|
const icons = {
|
|
29412
30251
|
visa: /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
29413
30252
|
className: "plc-w-12",
|
|
@@ -29434,7 +30273,7 @@ const getPaymentCardIcon = name => {
|
|
|
29434
30273
|
d: "M 5 7 C 2.25 7 0 9.25 0 12 L 0 38 C 0 40.75 2.25 43 5 43 L 45 43 C 47.75 43 50 40.75 50 38 L 50 12 C 50 9.25 47.75 7 45 7 Z M 5 9 L 45 9 C 46.667969 9 48 10.332031 48 12 L 48 38 C 48 39.667969 46.667969 41 45 41 L 5 41 C 3.332031 41 2 39.667969 2 38 L 2 12 C 2 10.332031 3.332031 9 5 9 Z M 8.5625 19.90625 L 4.84375 28.40625 L 7.0625 28.40625 L 7.875 26.5 L 12.0625 26.5 L 12.875 28.40625 L 17.09375 28.40625 L 17.09375 22.09375 L 19.90625 28.40625 L 21.8125 28.40625 L 24.65625 22.1875 L 24.65625 28.40625 L 26.75 28.40625 L 26.75 19.90625 L 23.40625 19.90625 L 20.84375 25.625 L 18.28125 19.90625 L 15 19.90625 L 15 28.09375 L 11.34375 19.90625 Z M 29.5 19.90625 L 29.5 28.4375 L 37.5 28.4375 L 40 25.59375 L 42.46875 28.4375 L 45.125 28.4375 L 41.375 24.0625 L 45.125 19.90625 L 42.46875 19.90625 L 40.0625 22.5625 L 37.75 19.90625 Z M 9.90625 21.6875 L 11.21875 24.6875 L 8.65625 24.6875 Z M 31.5625 21.71875 L 36.65625 21.75 L 38.6875 24.0625 L 36.40625 26.625 L 31.5625 26.625 L 31.5625 24.9375 L 36.1875 24.9375 L 36.1875 23.3125 L 31.5625 23.3125 Z"
|
|
29435
30274
|
}))
|
|
29436
30275
|
};
|
|
29437
|
-
return name
|
|
30276
|
+
return (_icons$name$toLowerCa = icons[name.toLowerCase()]) !== null && _icons$name$toLowerCa !== void 0 ? _icons$name$toLowerCa : /*#__PURE__*/React__default['default'].createElement("svg", {
|
|
29438
30277
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29439
30278
|
className: "plc-w-12",
|
|
29440
30279
|
fill: "none",
|
|
@@ -29448,16 +30287,16 @@ const getPaymentCardIcon = name => {
|
|
|
29448
30287
|
}));
|
|
29449
30288
|
};
|
|
29450
30289
|
|
|
29451
|
-
var _path$
|
|
29452
|
-
function _extends$
|
|
30290
|
+
var _path$h;
|
|
30291
|
+
function _extends$h() { _extends$h = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$h.apply(this, arguments); }
|
|
29453
30292
|
function SvgChevronRight(props) {
|
|
29454
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30293
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
|
|
29455
30294
|
className: "plc-w-6 plc-h-6",
|
|
29456
30295
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29457
30296
|
fill: "none",
|
|
29458
30297
|
viewBox: "0 0 24 24",
|
|
29459
30298
|
stroke: "currentColor"
|
|
29460
|
-
}, props), _path$
|
|
30299
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29461
30300
|
strokeLinecap: "round",
|
|
29462
30301
|
strokeLinejoin: "round",
|
|
29463
30302
|
strokeWidth: 2,
|
|
@@ -29686,16 +30525,16 @@ const SavedItems = _ref3 => {
|
|
|
29686
30525
|
});
|
|
29687
30526
|
};
|
|
29688
30527
|
|
|
29689
|
-
var _path$
|
|
29690
|
-
function _extends$
|
|
30528
|
+
var _path$g;
|
|
30529
|
+
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
29691
30530
|
function SvgRefresh(props) {
|
|
29692
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30531
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
29693
30532
|
className: "plc-w-4 plc-h-4 plc-mr-1",
|
|
29694
30533
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29695
30534
|
fill: "none",
|
|
29696
30535
|
viewBox: "0 0 24 24",
|
|
29697
30536
|
stroke: "currentColor"
|
|
29698
|
-
}, props), _path$
|
|
30537
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29699
30538
|
strokeLinecap: "round",
|
|
29700
30539
|
strokeLinejoin: "round",
|
|
29701
30540
|
strokeWidth: 2,
|
|
@@ -29703,31 +30542,31 @@ function SvgRefresh(props) {
|
|
|
29703
30542
|
})));
|
|
29704
30543
|
}
|
|
29705
30544
|
|
|
29706
|
-
var _path$
|
|
29707
|
-
function _extends$
|
|
30545
|
+
var _path$f;
|
|
30546
|
+
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
29708
30547
|
function SvgCalendar(props) {
|
|
29709
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30548
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
29710
30549
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29711
30550
|
className: "plc-h-4 plc-w-4 plc-mr-1",
|
|
29712
30551
|
viewBox: "0 0 20 20",
|
|
29713
30552
|
fill: "currentColor"
|
|
29714
|
-
}, props), _path$
|
|
30553
|
+
}, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29715
30554
|
fillRule: "evenodd",
|
|
29716
30555
|
d: "M6 2a1 1 0 00-1 1v1H4a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V6a2 2 0 00-2-2h-1V3a1 1 0 10-2 0v1H7V3a1 1 0 00-1-1zm0 5a1 1 0 000 2h8a1 1 0 100-2H6z",
|
|
29717
30556
|
clipRule: "evenodd"
|
|
29718
30557
|
})));
|
|
29719
30558
|
}
|
|
29720
30559
|
|
|
29721
|
-
var _path$
|
|
29722
|
-
function _extends$
|
|
30560
|
+
var _path$e;
|
|
30561
|
+
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
29723
30562
|
function SvgPlus(props) {
|
|
29724
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30563
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
29725
30564
|
className: "plc-w-5 plc-h-5",
|
|
29726
30565
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29727
30566
|
fill: "none",
|
|
29728
30567
|
viewBox: "0 0 24 24",
|
|
29729
30568
|
stroke: "currentColor"
|
|
29730
|
-
}, props), _path$
|
|
30569
|
+
}, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
|
|
29731
30570
|
strokeLinecap: "round",
|
|
29732
30571
|
strokeLinejoin: "round",
|
|
29733
30572
|
strokeWidth: 2,
|
|
@@ -30090,16 +30929,16 @@ Accordion.item = function AccordionItem(_ref2) {
|
|
|
30090
30929
|
}, content)) : null;
|
|
30091
30930
|
};
|
|
30092
30931
|
|
|
30093
|
-
var _path$
|
|
30094
|
-
function _extends$
|
|
30932
|
+
var _path$d;
|
|
30933
|
+
function _extends$d() { _extends$d = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$d.apply(this, arguments); }
|
|
30095
30934
|
function SvgExit(props) {
|
|
30096
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30935
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
|
|
30097
30936
|
className: "plc-w-6 plc-h-6",
|
|
30098
30937
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30099
30938
|
fill: "none",
|
|
30100
30939
|
viewBox: "0 0 24 24",
|
|
30101
30940
|
stroke: "currentColor"
|
|
30102
|
-
}, props), _path$
|
|
30941
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30103
30942
|
strokeLinecap: "round",
|
|
30104
30943
|
strokeLinejoin: "round",
|
|
30105
30944
|
strokeWidth: 2,
|
|
@@ -30107,15 +30946,15 @@ function SvgExit(props) {
|
|
|
30107
30946
|
})));
|
|
30108
30947
|
}
|
|
30109
30948
|
|
|
30110
|
-
var _path$
|
|
30111
|
-
function _extends$
|
|
30949
|
+
var _path$c;
|
|
30950
|
+
function _extends$c() { _extends$c = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$c.apply(this, arguments); }
|
|
30112
30951
|
function SvgUser(props) {
|
|
30113
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30952
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
|
|
30114
30953
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30115
30954
|
fill: "none",
|
|
30116
30955
|
viewBox: "0 0 24 24",
|
|
30117
30956
|
stroke: "currentColor"
|
|
30118
|
-
}, props), _path$
|
|
30957
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30119
30958
|
strokeLinecap: "round",
|
|
30120
30959
|
strokeLinejoin: "round",
|
|
30121
30960
|
strokeWidth: 2,
|
|
@@ -30123,16 +30962,16 @@ function SvgUser(props) {
|
|
|
30123
30962
|
})));
|
|
30124
30963
|
}
|
|
30125
30964
|
|
|
30126
|
-
var _path$
|
|
30127
|
-
function _extends$
|
|
30965
|
+
var _path$b;
|
|
30966
|
+
function _extends$b() { _extends$b = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$b.apply(this, arguments); }
|
|
30128
30967
|
function SvgNewsletter(props) {
|
|
30129
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30968
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
|
|
30130
30969
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30131
30970
|
className: "plc-h-5 plc-w-5",
|
|
30132
30971
|
fill: "none",
|
|
30133
30972
|
viewBox: "0 0 24 24",
|
|
30134
30973
|
stroke: "currentColor"
|
|
30135
|
-
}, props), _path$
|
|
30974
|
+
}, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30136
30975
|
strokeLinecap: "round",
|
|
30137
30976
|
strokeLinejoin: "round",
|
|
30138
30977
|
strokeWidth: 2,
|
|
@@ -30140,16 +30979,16 @@ function SvgNewsletter(props) {
|
|
|
30140
30979
|
})));
|
|
30141
30980
|
}
|
|
30142
30981
|
|
|
30143
|
-
var _path$
|
|
30144
|
-
function _extends$
|
|
30982
|
+
var _path$a;
|
|
30983
|
+
function _extends$a() { _extends$a = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$a.apply(this, arguments); }
|
|
30145
30984
|
function SvgDocument(props) {
|
|
30146
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
30985
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
|
|
30147
30986
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30148
30987
|
className: "plc-h-6 plc-w-6 plc-mr-2",
|
|
30149
30988
|
fill: "none",
|
|
30150
30989
|
viewBox: "0 0 24 24",
|
|
30151
30990
|
stroke: "currentColor"
|
|
30152
|
-
}, props), _path$
|
|
30991
|
+
}, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30153
30992
|
strokeLinecap: "round",
|
|
30154
30993
|
strokeLinejoin: "round",
|
|
30155
30994
|
strokeWidth: 2,
|
|
@@ -30157,16 +30996,16 @@ function SvgDocument(props) {
|
|
|
30157
30996
|
})));
|
|
30158
30997
|
}
|
|
30159
30998
|
|
|
30160
|
-
var _path$
|
|
30161
|
-
function _extends$
|
|
30999
|
+
var _path$9;
|
|
31000
|
+
function _extends$9() { _extends$9 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$9.apply(this, arguments); }
|
|
30162
31001
|
function SvgPaymentCard(props) {
|
|
30163
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
31002
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
|
|
30164
31003
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
30165
31004
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30166
31005
|
fill: "none",
|
|
30167
31006
|
viewBox: "0 0 24 24",
|
|
30168
31007
|
stroke: "currentColor"
|
|
30169
|
-
}, props), _path$
|
|
31008
|
+
}, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30170
31009
|
strokeLinecap: "round",
|
|
30171
31010
|
strokeLinejoin: "round",
|
|
30172
31011
|
strokeWidth: 2,
|
|
@@ -30174,16 +31013,16 @@ function SvgPaymentCard(props) {
|
|
|
30174
31013
|
})));
|
|
30175
31014
|
}
|
|
30176
31015
|
|
|
30177
|
-
var _path$
|
|
30178
|
-
function _extends$
|
|
31016
|
+
var _path$8, _path2;
|
|
31017
|
+
function _extends$8() { _extends$8 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$8.apply(this, arguments); }
|
|
30179
31018
|
function SvgLocationPin(props) {
|
|
30180
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
31019
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
|
|
30181
31020
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
30182
31021
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30183
31022
|
fill: "none",
|
|
30184
31023
|
viewBox: "0 0 24 24",
|
|
30185
31024
|
stroke: "currentColor"
|
|
30186
|
-
}, props), _path$
|
|
31025
|
+
}, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30187
31026
|
strokeLinecap: "round",
|
|
30188
31027
|
strokeLinejoin: "round",
|
|
30189
31028
|
strokeWidth: 2,
|
|
@@ -30196,16 +31035,16 @@ function SvgLocationPin(props) {
|
|
|
30196
31035
|
})));
|
|
30197
31036
|
}
|
|
30198
31037
|
|
|
30199
|
-
var _path$
|
|
30200
|
-
function _extends$
|
|
31038
|
+
var _path$7;
|
|
31039
|
+
function _extends$7() { _extends$7 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$7.apply(this, arguments); }
|
|
30201
31040
|
function SvgShopping(props) {
|
|
30202
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
31041
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
|
|
30203
31042
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
30204
31043
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30205
31044
|
fill: "none",
|
|
30206
31045
|
viewBox: "0 0 24 24",
|
|
30207
31046
|
stroke: "currentColor"
|
|
30208
|
-
}, props), _path$
|
|
31047
|
+
}, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30209
31048
|
strokeLinecap: "round",
|
|
30210
31049
|
strokeLinejoin: "round",
|
|
30211
31050
|
strokeWidth: 2,
|
|
@@ -30213,16 +31052,16 @@ function SvgShopping(props) {
|
|
|
30213
31052
|
})));
|
|
30214
31053
|
}
|
|
30215
31054
|
|
|
30216
|
-
var _path$
|
|
30217
|
-
function _extends$
|
|
31055
|
+
var _path$6;
|
|
31056
|
+
function _extends$6() { _extends$6 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$6.apply(this, arguments); }
|
|
30218
31057
|
function SvgBookmark(props) {
|
|
30219
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
31058
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
|
|
30220
31059
|
className: "plc-w-6 plc-h-6 plc-mr-2",
|
|
30221
31060
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30222
31061
|
fill: "none",
|
|
30223
31062
|
viewBox: "0 0 24 24",
|
|
30224
31063
|
stroke: "currentColor"
|
|
30225
|
-
}, props), _path$
|
|
31064
|
+
}, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30226
31065
|
strokeLinecap: "round",
|
|
30227
31066
|
strokeLinejoin: "round",
|
|
30228
31067
|
strokeWidth: 2,
|
|
@@ -30230,63 +31069,76 @@ function SvgBookmark(props) {
|
|
|
30230
31069
|
})));
|
|
30231
31070
|
}
|
|
30232
31071
|
|
|
30233
|
-
var _path$
|
|
30234
|
-
function _extends$
|
|
31072
|
+
var _path$5;
|
|
31073
|
+
function _extends$5() { _extends$5 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$5.apply(this, arguments); }
|
|
30235
31074
|
function SvgKey(props) {
|
|
30236
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
31075
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
|
|
30237
31076
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30238
31077
|
viewBox: "0 0 20 20",
|
|
30239
31078
|
fill: "currentColor"
|
|
30240
|
-
}, props), _path$
|
|
31079
|
+
}, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30241
31080
|
fillRule: "evenodd",
|
|
30242
31081
|
d: "M18 8a6 6 0 01-7.743 5.743L10 14l-1 1-1 1H6v2H2v-4l4.257-4.257A6 6 0 1118 8zm-6-4a1 1 0 100 2 2 2 0 012 2 1 1 0 102 0 4 4 0 00-4-4z",
|
|
30243
31082
|
clipRule: "evenodd"
|
|
30244
31083
|
})));
|
|
30245
31084
|
}
|
|
30246
31085
|
|
|
30247
|
-
var _path$
|
|
30248
|
-
function _extends$
|
|
31086
|
+
var _path$4;
|
|
31087
|
+
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
30249
31088
|
function SvgDonate(props) {
|
|
30250
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
31089
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
|
|
30251
31090
|
width: 24,
|
|
30252
31091
|
height: 24,
|
|
30253
31092
|
fill: "currentColor",
|
|
30254
31093
|
xmlns: "http://www.w3.org/2000/svg"
|
|
30255
|
-
}, props), _path$
|
|
31094
|
+
}, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30256
31095
|
d: "M4 21h9.62a3.995 3.995 0 003.037-1.397l5.102-5.952a1 1 0 00-.442-1.6l-1.968-.656a3.043 3.043 0 00-2.823.503l-3.185 2.547-.617-1.235A3.98 3.98 0 009.146 11H4c-1.103 0-2 .897-2 2v6c0 1.103.897 2 2 2zm0-8h5.146c.763 0 1.448.423 1.789 1.105l.447.895H7v2h6.014a.996.996 0 00.442-.11l.003-.001.004-.002h.003l.002-.001h.004l.001-.001c.009.003.003-.001.003-.001.01 0 .002-.001.002-.001h.001l.002-.001.003-.001.002-.001.002-.001.003-.001.002-.001c.003 0 .001-.001.002-.001l.003-.002.002-.001.002-.001.003-.001.002-.001h.001l.002-.001h.001l.002-.001.002-.001c.009-.001.003-.001.003-.001l.002-.001a.915.915 0 00.11-.078l4.146-3.317c.262-.208.623-.273.94-.167l.557.186-4.133 4.823a2.029 2.029 0 01-1.52.688H4v-6zM16 2h-.017c-.163.002-1.006.039-1.983.705-.951-.648-1.774-.7-1.968-.704L12.002 2h-.004c-.801 0-1.555.313-2.119.878C9.313 3.445 9 4.198 9 5s.313 1.555.861 2.104l3.414 3.586a1.006 1.006 0 001.45-.001l3.396-3.568C18.688 6.555 19 5.802 19 5s-.313-1.555-.878-2.121A2.978 2.978 0 0016.002 2H16zm1 3c0 .267-.104.518-.311.725L14 8.55l-2.707-2.843C11.104 5.518 11 5.267 11 5s.104-.518.294-.708A.977.977 0 0111.979 4c.025.001.502.032 1.067.485.081.065.163.139.247.222l.707.707.707-.707c.084-.083.166-.157.247-.222.529-.425.976-.478 1.052-.484a.987.987 0 01.701.292c.189.189.293.44.293.707z"
|
|
30257
31096
|
})));
|
|
30258
31097
|
}
|
|
30259
31098
|
|
|
30260
|
-
var _path$
|
|
30261
|
-
function _extends$
|
|
31099
|
+
var _path$3;
|
|
31100
|
+
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
30262
31101
|
function SvgMemberships(props) {
|
|
30263
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
31102
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
|
|
30264
31103
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30265
31104
|
fill: "none",
|
|
30266
31105
|
strokeWidth: 1.5,
|
|
30267
31106
|
stroke: "currentColor",
|
|
30268
31107
|
width: 24,
|
|
30269
31108
|
height: 24
|
|
30270
|
-
}, props), _path$
|
|
31109
|
+
}, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30271
31110
|
strokeLinecap: "round",
|
|
30272
31111
|
strokeLinejoin: "round",
|
|
30273
31112
|
d: "M15 9h3.75M15 12h3.75M15 15h3.75M4.5 19.5h15a2.25 2.25 0 002.25-2.25V6.75A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25v10.5A2.25 2.25 0 004.5 19.5zm6-10.125a1.875 1.875 0 11-3.75 0 1.875 1.875 0 013.75 0zm1.294 6.336a6.721 6.721 0 01-3.17.789 6.721 6.721 0 01-3.168-.789 3.376 3.376 0 016.338 0z"
|
|
30274
31113
|
})));
|
|
30275
31114
|
}
|
|
30276
31115
|
|
|
30277
|
-
var _path$
|
|
30278
|
-
function _extends$
|
|
31116
|
+
var _path$2;
|
|
31117
|
+
function _extends$2() { _extends$2 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$2.apply(this, arguments); }
|
|
30279
31118
|
function SvgQrcode(props) {
|
|
30280
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
31119
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
|
|
30281
31120
|
xmlns: "http://www.w3.org/2000/svg",
|
|
30282
31121
|
width: 682.667,
|
|
30283
31122
|
height: 682.667,
|
|
30284
31123
|
viewBox: "0 0 512 512"
|
|
30285
|
-
}, props), _path$
|
|
31124
|
+
}, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
30286
31125
|
d: "M93.5 62.4c-15.7 3.9-28 16.6-31.4 32.4-.7 3.3-1.1 17.2-1.1 36.4 0 29.1.1 31.4 2 35.3 5.3 11 21.2 11.1 26.4.1 1.4-2.9 1.6-7.9 1.6-34.6 0-34.4.1-35.3 6.3-39 3-1.9 5.2-2 34.5-2 26.9 0 31.9-.2 34.8-1.6 11-5.2 10.9-21.1-.1-26.4-3.9-1.9-6.1-2-36.1-1.9-21.8 0-33.5.5-36.9 1.3zM345.4 63c-10.9 5.4-10.9 21.2 0 26.4 2.9 1.4 7.9 1.6 34.8 1.6 29.3 0 31.5.1 34.5 2 6.2 3.7 6.3 4.6 6.3 39 0 26.7.2 31.7 1.6 34.6 5.2 11 21.1 10.9 26.4-.1 1.9-3.9 2-6.2 2-35.3 0-19.2-.4-33.1-1.1-36.4-3.5-16.2-16.5-29.2-32.7-32.7-3.3-.7-17.2-1.1-36.5-1.1-29.3 0-31.5.1-35.3 2zM146 128.9c-6.9 2.1-12.1 6.5-15.6 13.1-1.8 3.2-1.9 6.3-1.9 38.5 0 34.2 0 35.1 2.2 39.1 2.8 5.3 9.1 10.7 14.2 12.2 2.5.8 14.4 1.2 35.8 1.2 36.3 0 38.3-.3 45.2-7.2 6.8-6.9 7.1-8.9 7.1-45.1 0-22.2-.4-33.2-1.2-36.1-1.8-6-10-13.9-16-15.4-5.3-1.3-65.5-1.6-69.8-.3zm57 51.6V203h-45v-45h45v22.5zM297 128.9c-8 2.5-14.9 9.2-16.9 16.4-.9 2.9-1.1 14.3-.9 37.7.3 37.2.2 36.2 7.4 43.3 6.6 6.4 8.8 6.7 45 6.7 35.6 0 38-.3 44.2-6.3 1.9-1.8 4.3-5 5.5-7.2 2.1-3.9 2.2-5 2.2-39s-.1-35.1-2.2-39c-2.5-4.7-6.4-8.5-11.3-11.1-3.2-1.7-6.4-1.9-37-2.1-18.4-.1-34.6.2-36 .6zm57 51.6V203h-45v-45h45v22.5zM144.1 280.3c-4.8 1.8-10.8 7.2-13.4 12-2.2 4.1-2.2 4.9-2.2 39.2 0 34 .1 35.1 2.2 39 2.5 4.7 6.4 8.5 11.3 11.1 3.2 1.7 6.6 1.9 35.5 2.2 38.9.4 40.7.2 48-7.2 3.2-3.2 5.5-6.6 6.3-9.2.8-2.9 1.2-13.9 1.2-36.1 0-35.8-.4-38.3-6.6-44.7-7-7.2-6-7.1-44.4-7.3-25.4-.1-35.4.1-37.9 1zm58.9 51.2V354h-45v-45h45v22.5zM294.8 280.4c-6.8 2.4-12.9 8.9-14.8 15.7-1.5 5-1.3 66.2.2 71 1.5 5.1 6.9 11.4 12.2 14.2 4 2.2 4.9 2.2 39.1 2.2 32.2 0 35.3-.1 38.5-1.9 4.9-2.6 8.8-6.4 11.3-11.1 2.1-3.9 2.2-5 2.2-39s-.1-35.1-2.2-39c-3-5.6-8-10.1-13.2-12-5.9-2-67.5-2.2-73.3-.1zm59.2 51.1V354h-45v-45h45v22.5zM68.7 339.2c-2.2 1.3-4.5 3.8-5.7 6.3-1.9 3.9-2 6.2-2 35.3 0 19.2.4 33.1 1.1 36.4 3.4 16.1 16.6 29.3 32.7 32.7 3.3.7 17.2 1.1 36.4 1.1 29.1 0 31.4-.1 35.3-2 11-5.3 11.1-21.2.1-26.4-2.9-1.4-7.9-1.6-34.6-1.6-34.4 0-35.3-.1-39-6.3-1.9-3-2-5.2-2-34.5 0-26.9-.2-31.9-1.6-34.8-3.6-7.5-13.5-10.5-20.7-6.2zM429.2 338.7c-1.8.9-4.3 3-5.5 4.7-2.1 3-2.2 4-2.7 36.1-.5 35.8-.6 36.1-6.3 39.5-3 1.9-5.3 2-34.5 2-34.5 0-36.1.2-40.2 6-5.4 7.5-2.8 18 5.5 22 3.9 1.9 6.2 2 35.3 2 19.2 0 33.1-.4 36.4-1.1 16.2-3.5 29.2-16.5 32.7-32.7.7-3.3 1.1-17.2 1.1-36.4 0-29.1-.1-31.4-2-35.3-3.6-7.4-12.5-10.4-19.8-6.8z"
|
|
30287
31126
|
})));
|
|
30288
31127
|
}
|
|
30289
31128
|
|
|
31129
|
+
var _path$1;
|
|
31130
|
+
function _extends$1() { _extends$1 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
31131
|
+
function SvgTrashCan(props) {
|
|
31132
|
+
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
31133
|
+
className: "plc-w-6 plc-h-6",
|
|
31134
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
31135
|
+
viewBox: "0 0 448 512",
|
|
31136
|
+
fill: "currentColor"
|
|
31137
|
+
}, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
31138
|
+
d: "M135.2 17.7C140.6 6.8 151.7 0 163.8 0h120.4c12.1 0 23.2 6.8 28.6 17.7L320 32h96c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 96 0 81.7 0 64s14.3-32 32-32h96l7.2-14.3zM32 128h384v320c0 35.3-28.7 64-64 64H96c-35.3 0-64-28.7-64-64V128zm96 64c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16zm96 0c-8.8 0-16 7.2-16 16v224c0 8.8 7.2 16 16 16s16-7.2 16-16V208c0-8.8-7.2-16-16-16z"
|
|
31139
|
+
})));
|
|
31140
|
+
}
|
|
31141
|
+
|
|
30290
31142
|
const DonationsMenu = _ref => {
|
|
30291
31143
|
let {
|
|
30292
31144
|
onClose,
|
|
@@ -30608,7 +31460,9 @@ function DashboardWithHook(props) {
|
|
|
30608
31460
|
switchView,
|
|
30609
31461
|
resetView,
|
|
30610
31462
|
logout,
|
|
30611
|
-
set
|
|
31463
|
+
set,
|
|
31464
|
+
setPaymentMethodToEdit,
|
|
31465
|
+
setPaymentMethodToDelete
|
|
30612
31466
|
} = usePelcro();
|
|
30613
31467
|
return /*#__PURE__*/React__default['default'].createElement(DashboardWithTrans, {
|
|
30614
31468
|
setAddress: addressIdToEdit => set({
|
|
@@ -30631,7 +31485,9 @@ function DashboardWithHook(props) {
|
|
|
30631
31485
|
product,
|
|
30632
31486
|
plan,
|
|
30633
31487
|
isGift
|
|
30634
|
-
})
|
|
31488
|
+
}),
|
|
31489
|
+
setPaymentMethodToEdit: setPaymentMethodToEdit,
|
|
31490
|
+
setPaymentMethodToDelete: setPaymentMethodToDelete
|
|
30635
31491
|
});
|
|
30636
31492
|
}
|
|
30637
31493
|
DashboardWithHook.viewId = "dashboard";
|
|
@@ -30658,6 +31514,18 @@ class Dashboard extends React.Component {
|
|
|
30658
31514
|
nonInteraction: true
|
|
30659
31515
|
});
|
|
30660
31516
|
}
|
|
31517
|
+
window.Pelcro.paymentMethods.list({
|
|
31518
|
+
auth_token: window.Pelcro.user.read().auth_token
|
|
31519
|
+
}, (err, res) => {
|
|
31520
|
+
if (err) {
|
|
31521
|
+
return console.error(err);
|
|
31522
|
+
}
|
|
31523
|
+
if (res) {
|
|
31524
|
+
this.setState({
|
|
31525
|
+
sources: res.data
|
|
31526
|
+
});
|
|
31527
|
+
}
|
|
31528
|
+
});
|
|
30661
31529
|
const {
|
|
30662
31530
|
addresses
|
|
30663
31531
|
} = window.Pelcro.user.read();
|
|
@@ -30727,10 +31595,46 @@ class Dashboard extends React.Component {
|
|
|
30727
31595
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
|
|
30728
31596
|
});
|
|
30729
31597
|
});
|
|
31598
|
+
_defineProperty$3(this, "deletePaymentMethod", (paymentMethodId, onSuccess, onFailure) => {
|
|
31599
|
+
// disable the Login button to prevent repeated clicks
|
|
31600
|
+
window.Pelcro.paymentMethods.deletePaymentMethod({
|
|
31601
|
+
auth_token: window.Pelcro.user.read().auth_token,
|
|
31602
|
+
payment_method_id: paymentMethodId
|
|
31603
|
+
}, (err, res) => {
|
|
31604
|
+
if (err) {
|
|
31605
|
+
return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
|
|
31606
|
+
}
|
|
31607
|
+
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
|
|
31608
|
+
});
|
|
31609
|
+
});
|
|
31610
|
+
_defineProperty$3(this, "onDeletePaymentMethodClick", source => {
|
|
31611
|
+
const isDeletable = source === null || source === void 0 ? void 0 : source.deletable;
|
|
31612
|
+
if (isDeletable) {
|
|
31613
|
+
this.props.onClose();
|
|
31614
|
+
notify.confirm((onSuccess, onFailure) => {
|
|
31615
|
+
this.deletePaymentMethod(source.id, onSuccess, onFailure);
|
|
31616
|
+
}, {
|
|
31617
|
+
confirmMessage: this.locale("messages.paymentMethodDeletion.isSureToDelete"),
|
|
31618
|
+
loadingMessage: this.locale("messages.paymentMethodDeletion.loading"),
|
|
31619
|
+
successMessage: this.locale("messages.paymentMethodDeletion.success"),
|
|
31620
|
+
errorMessage: this.locale("messages.paymentMethodDeletion.error")
|
|
31621
|
+
}, {
|
|
31622
|
+
closeButtonLabel: this.locale("labels.subCancellation.goBack")
|
|
31623
|
+
});
|
|
31624
|
+
} else {
|
|
31625
|
+
this.props.setPaymentMethodToDelete(source.id);
|
|
31626
|
+
return this.props.setView("payment-method-delete");
|
|
31627
|
+
}
|
|
31628
|
+
});
|
|
30730
31629
|
_defineProperty$3(this, "displayRedeem", () => {
|
|
30731
31630
|
return this.props.setView("gift-redeem");
|
|
30732
31631
|
});
|
|
30733
31632
|
_defineProperty$3(this, "displaySourceCreate", () => {
|
|
31633
|
+
return this.props.setView("payment-method-create");
|
|
31634
|
+
});
|
|
31635
|
+
_defineProperty$3(this, "displaySourceEdit", e => {
|
|
31636
|
+
const source = e.currentTarget.dataset.key;
|
|
31637
|
+
this.props.setPaymentMethodToEdit(source);
|
|
30734
31638
|
return this.props.setView("payment-method-update");
|
|
30735
31639
|
});
|
|
30736
31640
|
_defineProperty$3(this, "displayUserEdit", () => {
|
|
@@ -30992,6 +31896,52 @@ class Dashboard extends React.Component {
|
|
|
30992
31896
|
onClick: this.displayAddressCreate
|
|
30993
31897
|
}, this.locale("labels.addAddress"))))));
|
|
30994
31898
|
});
|
|
31899
|
+
_defineProperty$3(this, "renderSources", () => {
|
|
31900
|
+
const sources = this.state.sources && this.state.sources.sort((a, b) => a.is_default === b.is_default ? 0 : a.is_default ? -1 : 1).map((source, index) => {
|
|
31901
|
+
var _source$properties, _source$properties2;
|
|
31902
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31903
|
+
key: "dashboard-source-" + source.id,
|
|
31904
|
+
className: "plc-flex plc-flex-row plc-pr-6"
|
|
31905
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31906
|
+
className: "plc-flex plc-flex-grow plc-items-center plc-justify-between plc-max-w-xs plc-p-4 plc-mb-2 plc-text-white plc-bg-gray-800 plc-rounded-md plc-h-14"
|
|
31907
|
+
}, /*#__PURE__*/React__default['default'].createElement("span", null, getPaymentCardIcon(source === null || source === void 0 ? void 0 : (_source$properties = source.properties) === null || _source$properties === void 0 ? void 0 : _source$properties.brand)), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
31908
|
+
className: "plc-ml-1 plc-text-lg plc-tracking-widest plc-flex-grow plc-text-center"
|
|
31909
|
+
}, "\u2022\u2022\u2022\u2022 ", source === null || source === void 0 ? void 0 : (_source$properties2 = source.properties) === null || _source$properties2 === void 0 ? void 0 : _source$properties2.last4), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
31910
|
+
id: "pelcro-button-update-source-" + index,
|
|
31911
|
+
variant: "icon",
|
|
31912
|
+
className: "plc-text-white",
|
|
31913
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
|
31914
|
+
"data-key": source.id,
|
|
31915
|
+
onClick: this.displaySourceEdit,
|
|
31916
|
+
disabled: this.state.disableSubmit
|
|
31917
|
+
}), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
31918
|
+
id: "pelcro-button-delete-source-" + index,
|
|
31919
|
+
variant: "icon",
|
|
31920
|
+
className: "plc-text-white",
|
|
31921
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgTrashCan, null),
|
|
31922
|
+
onClick: () => {
|
|
31923
|
+
this.onDeletePaymentMethodClick(source);
|
|
31924
|
+
},
|
|
31925
|
+
disabled: this.state.disableSubmit
|
|
31926
|
+
})), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
31927
|
+
className: "plc-flex-grow"
|
|
31928
|
+
}), source.is_default && /*#__PURE__*/React__default['default'].createElement("span", {
|
|
31929
|
+
className: "plc-rounded-full plc-bg-gray-800 plc-text-white plc-inline-flex plc-h-7 plc-my-auto plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-ml-2"
|
|
31930
|
+
}, this.locale("labels.default")));
|
|
31931
|
+
});
|
|
31932
|
+
return /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31933
|
+
className: "plc-pr-2"
|
|
31934
|
+
}, /*#__PURE__*/React__default['default'].createElement("div", {
|
|
31935
|
+
className: "plc-overflow-y-scroll plc-max-h-52"
|
|
31936
|
+
}, sources), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
31937
|
+
variant: "ghost",
|
|
31938
|
+
icon: /*#__PURE__*/React__default['default'].createElement(SvgPlus, {
|
|
31939
|
+
className: "plc-w-4 plc-mr-1"
|
|
31940
|
+
}),
|
|
31941
|
+
className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase hover:plc-bg-gray-100 plc-my-1 plc-ml-1",
|
|
31942
|
+
onClick: this.displaySourceCreate
|
|
31943
|
+
}, this.locale("labels.addPaymentSource")));
|
|
31944
|
+
});
|
|
30995
31945
|
_defineProperty$3(this, "closeDashboard", () => {
|
|
30996
31946
|
this.setState({
|
|
30997
31947
|
isOpen: false
|
|
@@ -31002,7 +31952,8 @@ class Dashboard extends React.Component {
|
|
|
31002
31952
|
subscriptions: window.Pelcro.subscription.list(),
|
|
31003
31953
|
giftRecipients: (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.gift_recipients) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [],
|
|
31004
31954
|
disableSubmit: false,
|
|
31005
|
-
addresses: []
|
|
31955
|
+
addresses: [],
|
|
31956
|
+
sources: []
|
|
31006
31957
|
};
|
|
31007
31958
|
this.site = window.Pelcro.site.read();
|
|
31008
31959
|
this.locale = this.props.t;
|
|
@@ -31011,7 +31962,7 @@ class Dashboard extends React.Component {
|
|
|
31011
31962
|
this.enableReactGA4 = (_window = window) === null || _window === void 0 ? void 0 : (_window$Pelcro = _window.Pelcro) === null || _window$Pelcro === void 0 ? void 0 : (_window$Pelcro$uiSett = _window$Pelcro.uiSettings) === null || _window$Pelcro$uiSett === void 0 ? void 0 : _window$Pelcro$uiSett.enableReactGA4;
|
|
31012
31963
|
}
|
|
31013
31964
|
render() {
|
|
31014
|
-
var _window$Pelcro$user$r3, _window$Pelcro2, _window$Pelcro2$uiSet
|
|
31965
|
+
var _window$Pelcro$user$r3, _window$Pelcro2, _window$Pelcro2$uiSet;
|
|
31015
31966
|
const {
|
|
31016
31967
|
isOpen
|
|
31017
31968
|
} = this.state;
|
|
@@ -31114,25 +32065,7 @@ class Dashboard extends React.Component {
|
|
|
31114
32065
|
name: SUB_MENUS.PAYMENT_CARDS,
|
|
31115
32066
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgPaymentCard, null),
|
|
31116
32067
|
title: this.locale("labels.paymentSource"),
|
|
31117
|
-
content:
|
|
31118
|
-
className: "plc-flex plc-items-center plc-justify-between plc-max-w-xs plc-p-4 plc-mb-2 plc-text-white plc-bg-gray-800 plc-rounded-md plc-h-14"
|
|
31119
|
-
}, this.user.source ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, getPaymentCardIcon((_this$user$source = this.user.source) === null || _this$user$source === void 0 ? void 0 : (_this$user$source$pro = _this$user$source.properties) === null || _this$user$source$pro === void 0 ? void 0 : _this$user$source$pro.brand), /*#__PURE__*/React__default['default'].createElement("span", {
|
|
31120
|
-
className: "plc-ml-1 plc-text-lg plc-tracking-widest"
|
|
31121
|
-
}, "\u2022\u2022\u2022\u2022 ", (_this$user$source2 = this.user.source) === null || _this$user$source2 === void 0 ? void 0 : (_this$user$source2$pr = _this$user$source2.properties) === null || _this$user$source2$pr === void 0 ? void 0 : _this$user$source2$pr.last4), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
31122
|
-
variant: "icon",
|
|
31123
|
-
className: "plc-text-white",
|
|
31124
|
-
icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
|
|
31125
|
-
onClick: this.displaySourceCreate,
|
|
31126
|
-
disabled: this.state.disableSubmit
|
|
31127
|
-
})) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("span", null, this.locale("messages.noCard")), /*#__PURE__*/React__default['default'].createElement(Button, {
|
|
31128
|
-
variant: "icon",
|
|
31129
|
-
className: "plc-text-white",
|
|
31130
|
-
icon: /*#__PURE__*/React__default['default'].createElement(SvgPlus, {
|
|
31131
|
-
className: "plc-w-6 plc-h-6"
|
|
31132
|
-
}),
|
|
31133
|
-
onClick: this.displaySourceCreate,
|
|
31134
|
-
disabled: this.state.disableSubmit
|
|
31135
|
-
})))
|
|
32068
|
+
content: this.renderSources()
|
|
31136
32069
|
}), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
|
|
31137
32070
|
name: SUB_MENUS.ADDRESSES,
|
|
31138
32071
|
icon: /*#__PURE__*/React__default['default'].createElement(SvgLocationPin, null),
|
|
@@ -35197,6 +36130,15 @@ exports.PasswordlessRequestViewButton = PasswordlessRequestViewButton;
|
|
|
35197
36130
|
exports.PaymentCreateContainer = PaymentCreateContainer;
|
|
35198
36131
|
exports.PaymentCreateView = PaymentCreateView;
|
|
35199
36132
|
exports.PaymentMethodContainer = PaymentMethodContainer;
|
|
36133
|
+
exports.PaymentMethodCreateContainer = PaymentMethodCreateContainer;
|
|
36134
|
+
exports.PaymentMethodCreateModal = PaymentMethodCreateModal;
|
|
36135
|
+
exports.PaymentMethodCreateView = PaymentMethodCreateView;
|
|
36136
|
+
exports.PaymentMethodDeleteContainer = PaymentMethodDeleteContainer;
|
|
36137
|
+
exports.PaymentMethodDeleteList = PaymentMethodDeleteList;
|
|
36138
|
+
exports.PaymentMethodDeleteModal = PaymentMethodDeleteModal;
|
|
36139
|
+
exports.PaymentMethodDeleteOptions = PaymentMethodDeleteOptions;
|
|
36140
|
+
exports.PaymentMethodDeleteSubmit = PaymentMethodDeleteSubmit;
|
|
36141
|
+
exports.PaymentMethodDeleteView = PaymentMethodDeleteView;
|
|
35200
36142
|
exports.PaymentMethodSelectContainer = PaymentMethodSelectContainer;
|
|
35201
36143
|
exports.PaymentMethodSelectList = PaymentMethodSelectList;
|
|
35202
36144
|
exports.PaymentMethodSelectModal = PaymentMethodSelectModal;
|
|
@@ -35204,6 +36146,7 @@ exports.PaymentMethodSelectSubmit = PaymentMethodSelectSubmit;
|
|
|
35204
36146
|
exports.PaymentMethodSelectView = PaymentMethodSelectView;
|
|
35205
36147
|
exports.PaymentMethodUpdateContainer = PaymentMethodUpdateContainer;
|
|
35206
36148
|
exports.PaymentMethodUpdateModal = PaymentMethodUpdateModal;
|
|
36149
|
+
exports.PaymentMethodUpdateSetDefault = PaymentMethodUpdateSetDefault;
|
|
35207
36150
|
exports.PaymentMethodUpdateView = PaymentMethodUpdateView;
|
|
35208
36151
|
exports.PaymentMethodView = PaymentMethodView;
|
|
35209
36152
|
exports.PaymentSuccessModal = PaymentSuccessModal;
|