@pelcro/react-pelcro-js 3.32.0 → 3.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/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";
@@ -3458,7 +3472,8 @@ var labels$11 = {
3458
3472
  firstName: "First name",
3459
3473
  lastName: "Last name",
3460
3474
  phone: "Phone",
3461
- freeItems: "Free Items"
3475
+ freeItems: "Free Items",
3476
+ isDefault: "Set as default"
3462
3477
  };
3463
3478
  var checkoutForm_en = {
3464
3479
  messages: messages$14,
@@ -3844,6 +3859,7 @@ var messages$X = {
3844
3859
  cancel: "Cancel your subscription online at anytime.",
3845
3860
  giftSent: "Subscription gift has been sent to",
3846
3861
  successfully: "successfully",
3862
+ sourceCreated: "Payment information has been added",
3847
3863
  sourceUpdated: "Your payment information has been updated",
3848
3864
  cardAuthFailed: "We are unable to authenticate your payment method. Please choose a different payment method and try again.",
3849
3865
  cardAuthNotSupported: "Updating your payment method to one that requires authentication is currently not possible. Please use a different payment method or contact customer service.",
@@ -3921,6 +3937,8 @@ var labels$V = {
3921
3937
  renewsOn: "Renews",
3922
3938
  canceledOn: "Canceled on",
3923
3939
  recipient: "Recipient",
3940
+ addPaymentSource: "Add payment method",
3941
+ setDefault: "Set as default",
3924
3942
  addAddress: "Add address",
3925
3943
  editAddress: "Edit address",
3926
3944
  addSubscription: "New Subscription",
@@ -3963,6 +3981,13 @@ var messages$W = {
3963
3981
  loading: "Unsuspending your subscription",
3964
3982
  success: "Subscription is successfully unsuspended",
3965
3983
  error: "Error while unsuspending your subscription"
3984
+ },
3985
+ paymentMethodDeletion: {
3986
+ isSureToDelete: "Are you sure you want to delete this payment method?",
3987
+ loading: "Deleting your payment method",
3988
+ success: "Payment method is successfully deleted",
3989
+ error: "Error while deleting your payment method",
3990
+ nonDeletable: "This payment method can't be deleted"
3966
3991
  }
3967
3992
  };
3968
3993
  var dashboard_en = {
@@ -4225,9 +4250,23 @@ var select$4 = {
4225
4250
  changePaymentMethod: "Modifier"
4226
4251
  }
4227
4252
  };
4253
+ var create$4 = {
4254
+ title: "Ajouter un nouveau mode de paiement",
4255
+ subtitle: "Saisissez les champs ci-dessous pour ajouter les informations relatives à votre carte de crédit"
4256
+ };
4228
4257
  var paymentMethod_fr = {
4229
4258
  update: update$2,
4230
- select: select$4
4259
+ select: select$4,
4260
+ "delete": {
4261
+ title: "Supprimer un mode de paiement",
4262
+ 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.",
4263
+ options: {
4264
+ select: "Sélectionner un mode de paiement existant",
4265
+ add: "Ajouter un nouveau mode de paiement"
4266
+ },
4267
+ paymentMethodReplaced: "Méthode de paiement supprimée et remplacée avec succès"
4268
+ },
4269
+ create: create$4
4231
4270
  };
4232
4271
 
4233
4272
  var title$q = "Entrez votre adresse courriel pour vous abonner à notre infolettre";
@@ -4329,7 +4368,8 @@ var labels$M = {
4329
4368
  firstName: "Prénom",
4330
4369
  lastName: "Nom de famille",
4331
4370
  phone: "Téléphoner",
4332
- freeItems: "Articles gratuits"
4371
+ freeItems: "Articles gratuits",
4372
+ isDefault: "Défini comme valeur par défaut"
4333
4373
  };
4334
4374
  var checkoutForm_fr = {
4335
4375
  messages: messages$O,
@@ -4716,6 +4756,7 @@ var messages$F = {
4716
4756
  cancel: "Annuler votre abonnement en ligne à tout moment.",
4717
4757
  giftSent: "Le cadeau d’abonnement a été envoyé à",
4718
4758
  successfully: "avec succès.",
4759
+ sourceCreated: "Les informations de paiement ont été ajoutées",
4719
4760
  sourceUpdated: "Vos informations de paiement ont été mises à jour",
4720
4761
  cardAuthFailed: "Nous ne parvenons pas à authentifier votre mode de paiement. Veuillez choisir un autre mode de paiement et essayer à nouveau.",
4721
4762
  cardAuthNotSupported: "Votre carte ne peut être mise à jour puisqu'elle nécessite une authentification. Veuillez utiliser un autre mode de paiement ou contacter le service client.",
@@ -5096,9 +5137,23 @@ var select$2 = {
5096
5137
  changePaymentMethod: "변경"
5097
5138
  }
5098
5139
  };
5140
+ var create$3 = {
5141
+ title: "새 결제 방법 추가",
5142
+ subtitle: "신용카드 정보를 추가하려면 아래 입력란을 입력하세요."
5143
+ };
5099
5144
  var paymentMethod_ko = {
5100
5145
  update: update$1,
5101
- select: select$2
5146
+ select: select$2,
5147
+ "delete": {
5148
+ title: "결제 방법 삭제",
5149
+ subtitle: "이 결제 방법은 활성 구독과 연결되거나 기본 결제 방법으로 사용될 수 있습니다. 아래에서 사용 가능한 옵션 중에서 선택하여 대체하세요.",
5150
+ options: {
5151
+ select: "기존 결제 방법 선택",
5152
+ add: "새 결제 방법 추가"
5153
+ },
5154
+ paymentMethodReplaced: "결제 방법 삭제 및 교체 성공"
5155
+ },
5156
+ create: create$3
5102
5157
  };
5103
5158
 
5104
5159
  var title$h = "Frieze 뉴스레터를 구독하려면 이메일을 입력하세요.";
@@ -5200,7 +5255,8 @@ var labels$v = {
5200
5255
  firstName: "이름",
5201
5256
  lastName: "성",
5202
5257
  phone: "핸드폰",
5203
- freeItems: "무료 아이템"
5258
+ freeItems: "무료 아이템",
5259
+ isDefault: "기본값으로 설정"
5204
5260
  };
5205
5261
  var checkoutForm_ko = {
5206
5262
  messages: messages$w,
@@ -5586,6 +5642,7 @@ var messages$n = {
5586
5642
  cancel: "유료 멤버십은 언제든 온라인으로 취소가 가능합니다.",
5587
5643
  giftSent: "유료 멤버십 선물이 ",
5588
5644
  successfully: "님께 성공적으로 전송되었습니다.",
5645
+ sourceCreated: "결제 정보가 추가되었습니다.",
5589
5646
  sourceUpdated: "귀하의 결제 정보가 업데이트되었습니다.",
5590
5647
  cardAuthFailed: "해당 결제 수단은 인증할 수 없습니다. 다른 결제 수단을 선택하여 다시 시도해보시기 바랍니다.",
5591
5648
  cardAuthNotSupported: "인증이 요구되는 결제 수단으로의 업데이트는 현재 지원되지 않습니다. 다른 결제 수단을 이용하거나 고객센터로 문의하시기 바랍니다.",
@@ -6071,9 +6128,23 @@ var select = {
6071
6128
  changePaymentMethod: "Cambiar"
6072
6129
  }
6073
6130
  };
6131
+ var create$2 = {
6132
+ title: "Añadir un nuevo método de pago",
6133
+ subtitle: "Introduzca los campos siguientes para añadir los datos de su tarjeta de crédito"
6134
+ };
6074
6135
  var paymentMethod_es = {
6075
6136
  update: update,
6076
- select: select
6137
+ select: select,
6138
+ "delete": {
6139
+ title: "Eliminar método de pago",
6140
+ 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.",
6141
+ options: {
6142
+ select: "Seleccione un método de pago existente",
6143
+ add: "Añadir un nuevo método de pago"
6144
+ },
6145
+ paymentMethodReplaced: "Método de pago eliminado y sustituido correctamente"
6146
+ },
6147
+ create: create$2
6077
6148
  };
6078
6149
 
6079
6150
  var title$8 = "Ingresa tu correo para suscribirte a nuestro boletín";
@@ -6175,7 +6246,8 @@ var labels$e = {
6175
6246
  firstName: "Nombre",
6176
6247
  lastName: "Apellido",
6177
6248
  phone: "Teléfono",
6178
- freeItems: "Artículos gratis"
6249
+ freeItems: "Artículos gratis",
6250
+ isDefault: "Fijar por defecto"
6179
6251
  };
6180
6252
  var checkoutForm_es = {
6181
6253
  messages: messages$e,
@@ -6558,6 +6630,7 @@ var messages$5 = {
6558
6630
  cancel: "Cancela tu suscripción en línea en cualquier momento.",
6559
6631
  giftSent: "La suscripción de regalo se ha enviado a",
6560
6632
  successfully: "exitosamente",
6633
+ sourceCreated: "Se ha añadido la información de pago",
6561
6634
  sourceUpdated: "Tu información de pago se ha actualizado",
6562
6635
  cardAuthFailed: "No pudimos autenticar tu método de pago. Por favor, elige un método de pago diferente e intenta de nuevo.",
6563
6636
  cardAuthNotSupported: "Actualmente no es posible actualizar tu método de pago a uno que requiere autenticación. Por favor, utiliza un método de pago diferente o contacta a atención al cliente.",
@@ -8756,7 +8829,7 @@ class PelcroActions {
8756
8829
  view,
8757
8830
  cartItems,
8758
8831
  ...otherStateFields
8759
- } = initialState$n;
8832
+ } = initialState$o;
8760
8833
  this.set(otherStateFields);
8761
8834
  });
8762
8835
  _defineProperty$3(this, "switchView", view => {
@@ -9061,6 +9134,38 @@ class PelcroActions {
9061
9134
  }
9062
9135
  switchToAddressView();
9063
9136
  });
9137
+ _defineProperty$3(this, "setPaymentMethodToEdit", id => {
9138
+ window.Pelcro.paymentMethods.getPaymentMethod({
9139
+ auth_token: window.Pelcro.user.read().auth_token,
9140
+ payment_method_id: id
9141
+ }, (err, res) => {
9142
+ if (err) {
9143
+ return console.error("invalid payment method id");
9144
+ }
9145
+ if (res) {
9146
+ const paymentMethodToEdit = res.data;
9147
+ this.set({
9148
+ paymentMethodToEdit
9149
+ });
9150
+ }
9151
+ });
9152
+ });
9153
+ _defineProperty$3(this, "setPaymentMethodToDelete", id => {
9154
+ window.Pelcro.paymentMethods.getPaymentMethod({
9155
+ auth_token: window.Pelcro.user.read().auth_token,
9156
+ payment_method_id: id
9157
+ }, (err, res) => {
9158
+ if (err) {
9159
+ return console.error("invalid payment method id");
9160
+ }
9161
+ if (res) {
9162
+ const paymentMethodToDelete = res.data;
9163
+ this.set({
9164
+ paymentMethodToDelete
9165
+ });
9166
+ }
9167
+ });
9168
+ });
9064
9169
  this.set = storeSetter;
9065
9170
  this.get = storeGetter;
9066
9171
  }
@@ -9105,7 +9210,7 @@ class PelcroCallbacks {
9105
9210
  }
9106
9211
  }
9107
9212
 
9108
- const initialState$n = {
9213
+ const initialState$o = {
9109
9214
  // View
9110
9215
  view: null,
9111
9216
  // Plans
@@ -9128,6 +9233,9 @@ const initialState$n = {
9128
9233
  couponCode: null,
9129
9234
  // memberships
9130
9235
  selectedMembership: null,
9236
+ // paymentMethods
9237
+ paymentMethodToDelete: null,
9238
+ paymentMethodToEdit: null,
9131
9239
  // User
9132
9240
  isAuthenticated: () => window.Pelcro.user.isAuthenticated(),
9133
9241
  selectedPaymentMethodId: null,
@@ -9140,7 +9248,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
9140
9248
  return {
9141
9249
  // Store setter
9142
9250
  set,
9143
- ...initialState$n,
9251
+ ...initialState$o,
9144
9252
  // State actions
9145
9253
  ...actions,
9146
9254
  // Callbacks
@@ -9910,8 +10018,8 @@ const saveToMetadataButton = new SaveToMetadataButtonClass();
9910
10018
 
9911
10019
  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}}
9912
10020
 
9913
- function _extends$B() {
9914
- _extends$B = Object.assign || function (target) {
10021
+ function _extends$C() {
10022
+ _extends$C = Object.assign || function (target) {
9915
10023
  for (var i = 1; i < arguments.length; i++) {
9916
10024
  var source = arguments[i];
9917
10025
 
@@ -9925,7 +10033,7 @@ function _extends$B() {
9925
10033
  return target;
9926
10034
  };
9927
10035
 
9928
- return _extends$B.apply(this, arguments);
10036
+ return _extends$C.apply(this, arguments);
9929
10037
  }
9930
10038
 
9931
10039
  function _taggedTemplateLiteralLoose(strings, raw) {
@@ -10015,7 +10123,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
10015
10123
  var reducer = function reducer(state, action) {
10016
10124
  switch (action.type) {
10017
10125
  case ActionType.ADD_TOAST:
10018
- return _extends$B({}, state, {
10126
+ return _extends$C({}, state, {
10019
10127
  toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
10020
10128
  });
10021
10129
 
@@ -10025,9 +10133,9 @@ var reducer = function reducer(state, action) {
10025
10133
  clearFromRemoveQueue(action.toast.id);
10026
10134
  }
10027
10135
 
10028
- return _extends$B({}, state, {
10136
+ return _extends$C({}, state, {
10029
10137
  toasts: state.toasts.map(function (t) {
10030
- return t.id === action.toast.id ? _extends$B({}, t, action.toast) : t;
10138
+ return t.id === action.toast.id ? _extends$C({}, t, action.toast) : t;
10031
10139
  })
10032
10140
  });
10033
10141
 
@@ -10054,9 +10162,9 @@ var reducer = function reducer(state, action) {
10054
10162
  });
10055
10163
  }
10056
10164
 
10057
- return _extends$B({}, state, {
10165
+ return _extends$C({}, state, {
10058
10166
  toasts: state.toasts.map(function (t) {
10059
- return t.id === toastId || toastId === undefined ? _extends$B({}, t, {
10167
+ return t.id === toastId || toastId === undefined ? _extends$C({}, t, {
10060
10168
  visible: false
10061
10169
  }) : t;
10062
10170
  })
@@ -10064,28 +10172,28 @@ var reducer = function reducer(state, action) {
10064
10172
 
10065
10173
  case ActionType.REMOVE_TOAST:
10066
10174
  if (action.toastId === undefined) {
10067
- return _extends$B({}, state, {
10175
+ return _extends$C({}, state, {
10068
10176
  toasts: []
10069
10177
  });
10070
10178
  }
10071
10179
 
10072
- return _extends$B({}, state, {
10180
+ return _extends$C({}, state, {
10073
10181
  toasts: state.toasts.filter(function (t) {
10074
10182
  return t.id !== action.toastId;
10075
10183
  })
10076
10184
  });
10077
10185
 
10078
10186
  case ActionType.START_PAUSE:
10079
- return _extends$B({}, state, {
10187
+ return _extends$C({}, state, {
10080
10188
  pausedAt: action.time
10081
10189
  });
10082
10190
 
10083
10191
  case ActionType.END_PAUSE:
10084
10192
  var diff = action.time - (state.pausedAt || 0);
10085
- return _extends$B({}, state, {
10193
+ return _extends$C({}, state, {
10086
10194
  pausedAt: undefined,
10087
10195
  toasts: state.toasts.map(function (t) {
10088
- return _extends$B({}, t, {
10196
+ return _extends$C({}, t, {
10089
10197
  pauseDuration: t.pauseDuration + diff
10090
10198
  });
10091
10199
  })
@@ -10132,12 +10240,12 @@ var useStore = function useStore(toastOptions) {
10132
10240
  var mergedToasts = state.toasts.map(function (t) {
10133
10241
  var _toastOptions$t$type, _toastOptions, _toastOptions$t$type2;
10134
10242
 
10135
- return _extends$B({}, toastOptions, toastOptions[t.type], t, {
10243
+ return _extends$C({}, toastOptions, toastOptions[t.type], t, {
10136
10244
  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],
10137
- style: _extends$B({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
10245
+ style: _extends$C({}, toastOptions.style, (_toastOptions$t$type2 = toastOptions[t.type]) == null ? void 0 : _toastOptions$t$type2.style, t.style)
10138
10246
  });
10139
10247
  });
10140
- return _extends$B({}, state, {
10248
+ return _extends$C({}, state, {
10141
10249
  toasts: mergedToasts
10142
10250
  });
10143
10251
  };
@@ -10147,7 +10255,7 @@ var createToast = function createToast(message, type, opts) {
10147
10255
  type = 'blank';
10148
10256
  }
10149
10257
 
10150
- return _extends$B({
10258
+ return _extends$C({
10151
10259
  createdAt: Date.now(),
10152
10260
  visible: true,
10153
10261
  type: type,
@@ -10197,14 +10305,14 @@ toast.remove = function (toastId) {
10197
10305
  };
10198
10306
 
10199
10307
  toast.promise = function (promise, msgs, opts) {
10200
- var id = toast.loading(msgs.loading, _extends$B({}, opts, opts == null ? void 0 : opts.loading));
10308
+ var id = toast.loading(msgs.loading, _extends$C({}, opts, opts == null ? void 0 : opts.loading));
10201
10309
  promise.then(function (p) {
10202
- toast.success(resolveValue(msgs.success, p), _extends$B({
10310
+ toast.success(resolveValue(msgs.success, p), _extends$C({
10203
10311
  id: id
10204
10312
  }, opts, opts == null ? void 0 : opts.success));
10205
10313
  return p;
10206
10314
  })["catch"](function (e) {
10207
- toast.error(resolveValue(msgs.error, e), _extends$B({
10315
+ toast.error(resolveValue(msgs.error, e), _extends$C({
10208
10316
  id: id
10209
10317
  }, opts, opts == null ? void 0 : opts.error));
10210
10318
  });
@@ -10543,7 +10651,7 @@ var ToastBar = /*#__PURE__*/React.memo(function (_ref2) {
10543
10651
  var message = React.createElement(Message, Object.assign({}, toast.ariaProps), resolveValue(toast.message, toast));
10544
10652
  return React.createElement(ToastBarBase, {
10545
10653
  className: toast.className,
10546
- style: _extends$B({}, animationStyle, style, toast.style)
10654
+ style: _extends$C({}, animationStyle, style, toast.style)
10547
10655
  }, typeof children === 'function' ? children({
10548
10656
  icon: icon,
10549
10657
  message: message
@@ -10573,7 +10681,7 @@ var getPositionStyle = function getPositionStyle(position, offset) {
10573
10681
  } : position.includes('right') ? {
10574
10682
  justifyContent: 'flex-end'
10575
10683
  } : {};
10576
- return _extends$B({
10684
+ return _extends$C({
10577
10685
  left: 0,
10578
10686
  right: 0,
10579
10687
  display: 'flex',
@@ -10600,7 +10708,7 @@ var Toaster = function Toaster(_ref) {
10600
10708
  handlers = _useToaster.handlers;
10601
10709
 
10602
10710
  return React.createElement("div", {
10603
- style: _extends$B({
10711
+ style: _extends$C({
10604
10712
  position: 'fixed',
10605
10713
  zIndex: 9999,
10606
10714
  top: DEFAULT_OFFSET,
@@ -10635,72 +10743,72 @@ var Toaster = function Toaster(_ref) {
10635
10743
  }));
10636
10744
  };
10637
10745
 
10638
- var _path$y;
10639
- 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); }
10746
+ var _path$z;
10747
+ 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); }
10640
10748
  function SvgCheckSolid(props) {
10641
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$A({
10749
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$B({
10642
10750
  xmlns: "http://www.w3.org/2000/svg",
10643
10751
  className: "h-5 w-5",
10644
10752
  viewBox: "0 0 20 20",
10645
10753
  fill: "currentColor"
10646
- }, props), _path$y || (_path$y = /*#__PURE__*/React__namespace.createElement("path", {
10754
+ }, props), _path$z || (_path$z = /*#__PURE__*/React__namespace.createElement("path", {
10647
10755
  fillRule: "evenodd",
10648
10756
  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",
10649
10757
  clipRule: "evenodd"
10650
10758
  })));
10651
10759
  }
10652
10760
 
10653
- var _path$x;
10654
- 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); }
10761
+ var _path$y;
10762
+ 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); }
10655
10763
  function SvgXIcon(props) {
10656
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
10764
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$A({
10657
10765
  xmlns: "http://www.w3.org/2000/svg",
10658
10766
  viewBox: "0 0 20 20",
10659
10767
  fill: "currentColor"
10660
- }, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
10768
+ }, props), _path$y || (_path$y = /*#__PURE__*/React__namespace.createElement("path", {
10661
10769
  fill: "evenodd",
10662
10770
  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",
10663
10771
  clipRule: "evenodd"
10664
10772
  })));
10665
10773
  }
10666
10774
 
10667
- var _path$w;
10668
- 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); }
10775
+ var _path$x;
10776
+ 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); }
10669
10777
  function SvgXIconSolid(props) {
10670
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
10778
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
10671
10779
  className: "plc-w-4 plc-h-4",
10672
10780
  fill: "currentColor",
10673
10781
  xmlns: "http://www.w3.org/2000/svg",
10674
10782
  viewBox: "0 0 100 100"
10675
- }, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
10783
+ }, props), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
10676
10784
  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"
10677
10785
  })));
10678
10786
  }
10679
10787
 
10680
- var _path$v;
10681
- 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); }
10788
+ var _path$w;
10789
+ 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); }
10682
10790
  function SvgExclamation(props) {
10683
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
10791
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
10684
10792
  className: "plc-w-4 plc-h-4 plc-mr-1",
10685
10793
  xmlns: "http://www.w3.org/2000/svg",
10686
10794
  viewBox: "0 0 20 20",
10687
10795
  fill: "currentColor"
10688
- }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
10796
+ }, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
10689
10797
  fillRule: "evenodd",
10690
10798
  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",
10691
10799
  clipRule: "evenodd"
10692
10800
  })));
10693
10801
  }
10694
10802
 
10695
- var _path$u, _path2$4;
10696
- 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); }
10803
+ var _path$v, _path2$4;
10804
+ 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); }
10697
10805
  function SvgSpinner(props) {
10698
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
10806
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
10699
10807
  className: "plc-animate-spin",
10700
10808
  viewBox: "0 0 24 24",
10701
10809
  fill: "currentColor",
10702
10810
  xmlns: "http://www.w3.org/2000/svg"
10703
- }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
10811
+ }, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
10704
10812
  opacity: 0.2,
10705
10813
  fill: "evenodd",
10706
10814
  clipRule: "evenodd",
@@ -11509,6 +11617,17 @@ function getSiteCardProcessor() {
11509
11617
  }
11510
11618
  return "stripe";
11511
11619
  }
11620
+ function getFourDigitYear(lastTwoDigits) {
11621
+ // Get the current year
11622
+ const currentYear = new Date().getFullYear();
11623
+
11624
+ // Extract the current century (first two digits)
11625
+ const currentCentury = Math.floor(currentYear / 100);
11626
+
11627
+ // Combine the century and the provided last two digits
11628
+ const fourDigitYear = currentCentury * 100 + lastTwoDigits;
11629
+ return fourDigitYear;
11630
+ }
11512
11631
 
11513
11632
  /**
11514
11633
  * @typedef {Object} OptionsType
@@ -12422,6 +12541,7 @@ const SET_CONFIRM_PASSWORD = "SET_CONFIRM_PASSWORD";
12422
12541
  const CONFIRM_PASSWORD_USED = "CONFIRM_PASSWORD_USED";
12423
12542
  const DISABLE_SUBMIT = "DISABLE_SUBMIT";
12424
12543
  const LOADING = "LOADING";
12544
+ const SKELETON_LOADER = "SKELETON_LOADER";
12425
12545
  const SUBMIT_PAYMENT = "SUBMIT_PAYMENT";
12426
12546
  const SUBSCRIBE = "CREATE_SUBSCRIPTION";
12427
12547
  const HANDLE_PAYPAL_SUBSCRIPTION = "HANDLE_PAYPAL_SUBSCRIPTION";
@@ -12489,6 +12609,9 @@ const LINK_TOKEN_VERIFY = "LINK_TOKEN_VERIFY";
12489
12609
  const SET_CANCEL_SUBSCRIPTION_REASON = "SET_CANCEL_SUBSCRIPTION_REASON";
12490
12610
  const SET_CANCEL_SUBSCRIPTION_OPTION = "SET_CANCEL_SUBSCRIPTION_OPTION";
12491
12611
  const HANDLE_CHECKBOX_CHANGE = "HANDLE_CHECKBOX_CHANGE";
12612
+ const SET_IS_DEFAULT_PAYMENT_METHOD = "SET_IS_DEFAULT_PAYMENT_METHOD";
12613
+ const SET_DELETE_PAYMENT_METHOD_OPTION = "SET_DELETE_PAYMENT_METHOD_OPTION";
12614
+ const SET_PAYMENT_METHODS = "SET_PAYMENT_METHODS";
12492
12615
  const SET_SUBSCRIPTION_SUSPEND_DATE = "SET_SUBSCRIPTION_SUSPEND_DATE";
12493
12616
  const SET_EMAILS = "SET_EMAILS";
12494
12617
  const SET_EMAILS_ERROR = "SET_EMAILS_ERROR";
@@ -12500,7 +12623,7 @@ const UPDATE_MEMBERS = "UPDATE_MEMBERS";
12500
12623
  const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID";
12501
12624
  const UPDATE_CYBERSOURCE_SESSION_ID = "UPDATE_CYBERSOURCE_SESSION_ID";
12502
12625
 
12503
- const initialState$m = {
12626
+ const initialState$n = {
12504
12627
  email: "",
12505
12628
  username: "",
12506
12629
  password: "",
@@ -12513,10 +12636,10 @@ const initialState$m = {
12513
12636
  content: ""
12514
12637
  }
12515
12638
  };
12516
- const store$m = /*#__PURE__*/React.createContext(initialState$m);
12639
+ const store$n = /*#__PURE__*/React.createContext(initialState$n);
12517
12640
  const {
12518
- Provider: Provider$m
12519
- } = store$m;
12641
+ Provider: Provider$n
12642
+ } = store$n;
12520
12643
  const LoginContainer = _ref => {
12521
12644
  var _window, _window$Pelcro, _window$Pelcro$uiSett;
12522
12645
  let {
@@ -12653,7 +12776,7 @@ const LoginContainer = _ref => {
12653
12776
  alert: action.payload
12654
12777
  });
12655
12778
  case RESET_LOGIN_FORM:
12656
- return initialState$m;
12779
+ return initialState$n;
12657
12780
  case DISABLE_LOGIN_BUTTON:
12658
12781
  return lib_7({
12659
12782
  ...state,
@@ -12669,13 +12792,13 @@ const LoginContainer = _ref => {
12669
12792
  default:
12670
12793
  return state;
12671
12794
  }
12672
- }, initialState$m);
12795
+ }, initialState$n);
12673
12796
  return /*#__PURE__*/React__default['default'].createElement("div", {
12674
12797
  style: {
12675
12798
  ...style
12676
12799
  },
12677
12800
  className: `pelcro-container pelcro-login-container ${className}`
12678
- }, /*#__PURE__*/React__default['default'].createElement(Provider$m, {
12801
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$n, {
12679
12802
  value: {
12680
12803
  state,
12681
12804
  dispatch
@@ -12683,12 +12806,12 @@ const LoginContainer = _ref => {
12683
12806
  }, children.length ? children.map((child, i) => {
12684
12807
  if (child) {
12685
12808
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
12686
- store: store$m,
12809
+ store: store$n,
12687
12810
  key: i
12688
12811
  });
12689
12812
  }
12690
12813
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
12691
- store: store$m
12814
+ store: store$n
12692
12815
  })));
12693
12816
  };
12694
12817
 
@@ -12997,7 +13120,7 @@ const LoginButton = _ref => {
12997
13120
  buttonDisabled
12998
13121
  },
12999
13122
  dispatch
13000
- } = React.useContext(store$m);
13123
+ } = React.useContext(store$n);
13001
13124
  const {
13002
13125
  t
13003
13126
  } = useTranslation("login");
@@ -13017,14 +13140,14 @@ const LoginButton = _ref => {
13017
13140
  }, otherProps), name !== null && name !== void 0 ? name : t("labels.login"));
13018
13141
  };
13019
13142
 
13020
- var _path$t, _path2$3;
13021
- 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); }
13143
+ var _path$u, _path2$3;
13144
+ 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); }
13022
13145
  function SvgEmailVerify(props) {
13023
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
13146
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
13024
13147
  className: "plc-w-6 plc-h-6",
13025
13148
  viewBox: "0 0 700 700",
13026
13149
  xmlns: "http://www.w3.org/2000/svg"
13027
- }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
13150
+ }, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
13028
13151
  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"
13029
13152
  })), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
13030
13153
  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"
@@ -13054,25 +13177,25 @@ const LoginRequestLoginToken = _ref => {
13054
13177
  };
13055
13178
 
13056
13179
  const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
13057
- store: store$m
13180
+ store: store$n
13058
13181
  }, props));
13059
13182
 
13060
13183
  const LoginUsername = props => /*#__PURE__*/React__default['default'].createElement(UserNameInput, Object.assign({
13061
- store: store$m
13184
+ store: store$n
13062
13185
  }, props));
13063
13186
 
13064
13187
  const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
13065
- store: store$m
13188
+ store: store$n
13066
13189
  }, props));
13067
13190
 
13068
- var _path$s;
13069
- 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); }
13191
+ var _path$t;
13192
+ 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); }
13070
13193
  function SvgCheck(props) {
13071
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
13194
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
13072
13195
  xmlns: "http://www.w3.org/2000/svg",
13073
13196
  fill: "currentColor",
13074
13197
  viewBox: "0 0 20 20"
13075
- }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
13198
+ }, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
13076
13199
  fillRule: "evenodd",
13077
13200
  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",
13078
13201
  clipRule: "evenodd"
@@ -13138,7 +13261,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
13138
13261
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
13139
13262
  facebookLoginRenderProps.FacebookLogin;
13140
13263
 
13141
- const initialState$l = {
13264
+ const initialState$m = {
13142
13265
  email: "",
13143
13266
  password: "",
13144
13267
  firstName: "",
@@ -13159,10 +13282,10 @@ const initialState$l = {
13159
13282
  content: ""
13160
13283
  }
13161
13284
  };
13162
- const store$l = /*#__PURE__*/React.createContext(initialState$l);
13285
+ const store$m = /*#__PURE__*/React.createContext(initialState$m);
13163
13286
  const {
13164
- Provider: Provider$l
13165
- } = store$l;
13287
+ Provider: Provider$m
13288
+ } = store$m;
13166
13289
  const RegisterContainer = _ref => {
13167
13290
  let {
13168
13291
  style,
@@ -13374,7 +13497,7 @@ const RegisterContainer = _ref => {
13374
13497
  alert: action.payload
13375
13498
  });
13376
13499
  case RESET_LOGIN_FORM:
13377
- return initialState$l;
13500
+ return initialState$m;
13378
13501
  case DISABLE_REGISTRATION_BUTTON:
13379
13502
  return lib_7({
13380
13503
  ...state,
@@ -13390,13 +13513,13 @@ const RegisterContainer = _ref => {
13390
13513
  default:
13391
13514
  return state;
13392
13515
  }
13393
- }, initialState$l);
13516
+ }, initialState$m);
13394
13517
  return /*#__PURE__*/React__default['default'].createElement("div", {
13395
13518
  style: {
13396
13519
  ...style
13397
13520
  },
13398
13521
  className: `pelcro-container pelcro-register-container ${className}`
13399
- }, /*#__PURE__*/React__default['default'].createElement(Provider$l, {
13522
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$m, {
13400
13523
  value: {
13401
13524
  state,
13402
13525
  dispatch
@@ -13404,12 +13527,12 @@ const RegisterContainer = _ref => {
13404
13527
  }, children.length ? children.map((child, i) => {
13405
13528
  if (child) {
13406
13529
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
13407
- store: store$l,
13530
+ store: store$m,
13408
13531
  key: i
13409
13532
  });
13410
13533
  }
13411
13534
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
13412
- store: store$l
13535
+ store: store$m
13413
13536
  })));
13414
13537
  };
13415
13538
 
@@ -13423,13 +13546,13 @@ function hasSecurityTokenEnabled$1() {
13423
13546
  return hasSecuritySdkLoaded;
13424
13547
  }
13425
13548
 
13426
- var _path$r;
13427
- 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); }
13549
+ var _path$s;
13550
+ 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); }
13428
13551
  function SvgFacebookLogo(props) {
13429
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
13552
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
13430
13553
  xmlns: "http://www.w3.org/2000/svg",
13431
13554
  viewBox: "88.428 12.828 107.543 207.085"
13432
- }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
13555
+ }, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
13433
13556
  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",
13434
13557
  fill: "#3c5a9a"
13435
13558
  })));
@@ -13446,10 +13569,10 @@ const FacebookLoginButton = _ref => {
13446
13569
  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;
13447
13570
  const {
13448
13571
  dispatch: loginDispatch
13449
- } = React.useContext(store$m);
13572
+ } = React.useContext(store$n);
13450
13573
  const {
13451
13574
  dispatch: registerDispatch
13452
- } = React.useContext(store$l);
13575
+ } = React.useContext(store$m);
13453
13576
  const onSuccess = facebookUser => {
13454
13577
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
13455
13578
  type: HANDLE_SOCIAL_LOGIN,
@@ -13499,13 +13622,13 @@ var googleLogin = createCommonjsModule(function (module, exports) {
13499
13622
  unwrapExports(googleLogin);
13500
13623
  var googleLogin_1 = googleLogin.GoogleLogin;
13501
13624
 
13502
- var _path$q, _path2$2, _path3$1, _path4;
13503
- 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); }
13625
+ var _path$r, _path2$2, _path3$1, _path4;
13626
+ 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); }
13504
13627
  function SvgGoogleLogo(props) {
13505
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
13628
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
13506
13629
  viewBox: "0 0 24 24",
13507
13630
  xmlns: "http://www.w3.org/2000/svg"
13508
- }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
13631
+ }, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
13509
13632
  fill: "#4285F4",
13510
13633
  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"
13511
13634
  })), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
@@ -13609,10 +13732,10 @@ const GoogleLoginButton = _ref => {
13609
13732
  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;
13610
13733
  const {
13611
13734
  dispatch: loginDispatch
13612
- } = React.useContext(store$m);
13735
+ } = React.useContext(store$n);
13613
13736
  const {
13614
13737
  dispatch: registerDispatch
13615
- } = React.useContext(store$l);
13738
+ } = React.useContext(store$m);
13616
13739
  React.useEffect(() => {
13617
13740
  gapi.load("client:auth2", () => {
13618
13741
  gapi.auth2.init({
@@ -13663,13 +13786,13 @@ const GoogleLoginButton = _ref => {
13663
13786
  }) : null;
13664
13787
  };
13665
13788
 
13666
- var _path$p;
13667
- 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); }
13789
+ var _path$q;
13790
+ 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); }
13668
13791
  function SvgAuth0Logo(props) {
13669
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
13792
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
13670
13793
  viewBox: "0 0 256 285",
13671
13794
  xmlns: "http://www.w3.org/2000/svg"
13672
- }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
13795
+ }, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
13673
13796
  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"
13674
13797
  })));
13675
13798
  }
@@ -13707,10 +13830,10 @@ const Auth0LoginButton = _ref => {
13707
13830
  }, [auth0Enabled, auth0Loaded]);
13708
13831
  const {
13709
13832
  dispatch: loginDispatch
13710
- } = React.useContext(store$m);
13833
+ } = React.useContext(store$n);
13711
13834
  const {
13712
13835
  dispatch: registerDispatch
13713
- } = React.useContext(store$l);
13836
+ } = React.useContext(store$m);
13714
13837
  function handleClick() {
13715
13838
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
13716
13839
  if (!auth0Loaded) {
@@ -13853,13 +13976,13 @@ function LoginView(props) {
13853
13976
  }))));
13854
13977
  }
13855
13978
 
13856
- var _path$o, _path2$1, _path3;
13857
- 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); }
13979
+ var _path$p, _path2$1, _path3;
13980
+ 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); }
13858
13981
  function SvgPelcroAuthorship(props) {
13859
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
13982
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
13860
13983
  xmlns: "http://www.w3.org/2000/svg",
13861
13984
  viewBox: "0 -80.652 497.072 179.991"
13862
- }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
13985
+ }, props), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
13863
13986
  fill: "none",
13864
13987
  stroke: "#4a4a4a",
13865
13988
  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"
@@ -14031,11 +14154,11 @@ function LoginModal(_ref) {
14031
14154
  LoginModal.viewId = "login";
14032
14155
 
14033
14156
  const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
14034
- store: store$l
14157
+ store: store$m
14035
14158
  }, props));
14036
14159
 
14037
14160
  const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
14038
- store: store$l
14161
+ store: store$m
14039
14162
  }, props));
14040
14163
 
14041
14164
  const RegisterButton = _ref => {
@@ -14055,7 +14178,7 @@ const RegisterButton = _ref => {
14055
14178
  buttonDisabled
14056
14179
  },
14057
14180
  dispatch
14058
- } = React.useContext(store$l);
14181
+ } = React.useContext(store$m);
14059
14182
  const {
14060
14183
  t
14061
14184
  } = useTranslation("register");
@@ -14153,7 +14276,7 @@ function FirstName(_ref) {
14153
14276
  }
14154
14277
 
14155
14278
  const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
14156
- store: store$l
14279
+ store: store$m
14157
14280
  }, props));
14158
14281
 
14159
14282
  function LastName(_ref) {
@@ -14231,7 +14354,7 @@ function LastName(_ref) {
14231
14354
  }
14232
14355
 
14233
14356
  const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
14234
- store: store$l
14357
+ store: store$m
14235
14358
  }, props));
14236
14359
 
14237
14360
  function Phone(_ref) {
@@ -14512,7 +14635,7 @@ function TextInput(_ref) {
14512
14635
 
14513
14636
  const RegisterTextInput = props => {
14514
14637
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
14515
- store: store$l
14638
+ store: store$m
14516
14639
  }));
14517
14640
  };
14518
14641
 
@@ -17254,7 +17377,7 @@ class CybersourceGateway {
17254
17377
  */
17255
17378
 
17256
17379
  /** @type {PaymentStateType} */
17257
- const initialState$k = {
17380
+ const initialState$l = {
17258
17381
  disableSubmit: false,
17259
17382
  isLoading: false,
17260
17383
  disableCouponButton: false,
@@ -17277,15 +17400,16 @@ const initialState$k = {
17277
17400
  month: "",
17278
17401
  year: "",
17279
17402
  cyberSourceSessionId: null,
17403
+ isDefault: false,
17280
17404
  alert: {
17281
17405
  type: "error",
17282
17406
  content: ""
17283
17407
  }
17284
17408
  };
17285
- const store$k = /*#__PURE__*/React.createContext(initialState$k);
17409
+ const store$l = /*#__PURE__*/React.createContext(initialState$l);
17286
17410
  const {
17287
- Provider: Provider$k
17288
- } = store$k;
17411
+ Provider: Provider$l
17412
+ } = store$l;
17289
17413
  const PaymentMethodContainerWithoutStripe = _ref => {
17290
17414
  var _props$product, _props$plan, _props$subscriptionId, _props$selectedAddres, _props$giftRecipient, _props$isGift, _props$isRenewingGift, _props$invoice, _window$Pelcro, _window$Pelcro$uiSett;
17291
17415
  let {
@@ -17309,7 +17433,9 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17309
17433
  set,
17310
17434
  order,
17311
17435
  selectedPaymentMethodId,
17312
- couponCode
17436
+ couponCode,
17437
+ paymentMethodToEdit,
17438
+ paymentMethodToDelete
17313
17439
  } = usePelcro();
17314
17440
  const {
17315
17441
  whenUserReady
@@ -17408,7 +17534,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17408
17534
  purchase(new CybersourceGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, state, dispatch);
17409
17535
  } else if (type === "invoicePayment") {
17410
17536
  payInvoice(new CybersourceGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest);
17411
- } else if (type === "updatePaymentSource") {
17537
+ } else if (type === "createPaymentSource" || type === "updatePaymentSource") {
17412
17538
  createNewCybersourceCard();
17413
17539
  }
17414
17540
  function createNewCybersourceCard() {
@@ -17730,7 +17856,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17730
17856
  purchase(new TapGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, state, dispatch);
17731
17857
  } else if (type === "invoicePayment") {
17732
17858
  payInvoice(new TapGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest);
17733
- } else if (type === "updatePaymentSource") {
17859
+ } else if (type === "createPaymentSource" || type === "updatePaymentSource") {
17734
17860
  createNewTapCard();
17735
17861
  }
17736
17862
  function createNewTapCard() {
@@ -17941,14 +18067,133 @@ const PaymentMethodContainerWithoutStripe = _ref => {
17941
18067
  purchase(new VantivGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest, state, dispatch);
17942
18068
  } else if (type === "invoicePayment") {
17943
18069
  payInvoice(new VantivGateway(), isUsingExistingPaymentMethod ? selectedPaymentMethodId : paymentRequest);
17944
- } else if (type === "updatePaymentSource") {
18070
+ } else if (type === "createPaymentSource") {
17945
18071
  createNewVantivCard();
18072
+ } else if (type === "updatePaymentSource") {
18073
+ updateVantivCard();
18074
+ } else if (type === "deletePaymentSource") {
18075
+ replaceVantivCard();
17946
18076
  }
17947
18077
  function createNewVantivCard() {
17948
- window.Pelcro.source.create({
18078
+ window.Pelcro.paymentMethods.create({
18079
+ auth_token: window.Pelcro.user.read().auth_token,
18080
+ token: paymentRequest,
18081
+ gateway: "vantiv"
18082
+ }, (err, res) => {
18083
+ dispatch({
18084
+ type: DISABLE_SUBMIT,
18085
+ payload: false
18086
+ });
18087
+ dispatch({
18088
+ type: LOADING,
18089
+ payload: false
18090
+ });
18091
+ if (err) {
18092
+ onFailure(err);
18093
+ return dispatch({
18094
+ type: SHOW_ALERT,
18095
+ payload: {
18096
+ type: "error",
18097
+ content: getErrorMessages(err)
18098
+ }
18099
+ });
18100
+ }
18101
+ dispatch({
18102
+ type: SHOW_ALERT,
18103
+ payload: {
18104
+ type: "success",
18105
+ content: t("messages.sourceCreated")
18106
+ }
18107
+ });
18108
+ onSuccess(res);
18109
+ });
18110
+ }
18111
+ function replaceVantivCard() {
18112
+ const {
18113
+ id: paymentMethodId
18114
+ } = paymentMethodToDelete;
18115
+ window.Pelcro.paymentMethods.create({
17949
18116
  auth_token: window.Pelcro.user.read().auth_token,
17950
18117
  token: paymentRequest,
17951
18118
  gateway: "vantiv"
18119
+ }, (err, res) => {
18120
+ if (err) {
18121
+ dispatch({
18122
+ type: DISABLE_SUBMIT,
18123
+ payload: false
18124
+ });
18125
+ dispatch({
18126
+ type: LOADING,
18127
+ payload: false
18128
+ });
18129
+ onFailure(err);
18130
+ return dispatch({
18131
+ type: SHOW_ALERT,
18132
+ payload: {
18133
+ type: "error",
18134
+ content: getErrorMessages(err)
18135
+ }
18136
+ });
18137
+ }
18138
+ if (res) {
18139
+ setTimeout(() => {
18140
+ window.Pelcro.paymentMethods.deletePaymentMethod({
18141
+ auth_token: window.Pelcro.user.read().auth_token,
18142
+ payment_method_id: paymentMethodId
18143
+ }, (err, res) => {
18144
+ dispatch({
18145
+ type: DISABLE_SUBMIT,
18146
+ payload: false
18147
+ });
18148
+ dispatch({
18149
+ type: LOADING,
18150
+ payload: false
18151
+ });
18152
+ if (err) {
18153
+ onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
18154
+ return dispatch({
18155
+ type: SHOW_ALERT,
18156
+ payload: {
18157
+ type: "error",
18158
+ content: getErrorMessages(err)
18159
+ }
18160
+ });
18161
+ }
18162
+ onSuccess(res);
18163
+ });
18164
+ }, 2000);
18165
+ }
18166
+ });
18167
+ }
18168
+ function updateVantivCard() {
18169
+ const {
18170
+ id: paymentMethodId
18171
+ } = paymentMethodToEdit;
18172
+ const {
18173
+ paypageRegistrationId,
18174
+ bin,
18175
+ type,
18176
+ firstSix,
18177
+ lastFour,
18178
+ expMonth,
18179
+ expYear
18180
+ } = paymentRequest;
18181
+ const {
18182
+ isDefault
18183
+ } = state;
18184
+ const fourDigitExpYear = getFourDigitYear(Number(expYear)).toString();
18185
+ window.Pelcro.paymentMethods.update({
18186
+ auth_token: window.Pelcro.user.read().auth_token,
18187
+ payment_method_id: paymentMethodId,
18188
+ gateway: "vantiv",
18189
+ paypageRegistrationId: paypageRegistrationId,
18190
+ bin: bin,
18191
+ type: type,
18192
+ firstSix: firstSix,
18193
+ lastFour: lastFour,
18194
+ exp_month: expMonth,
18195
+ exp_year: fourDigitExpYear,
18196
+ is_default: isDefault
17952
18197
  }, (err, res) => {
17953
18198
  dispatch({
17954
18199
  type: DISABLE_SUBMIT,
@@ -18755,7 +19000,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18755
19000
  confirmStripeCardPayment(res, err);
18756
19001
  });
18757
19002
  };
18758
- const updatePaymentSource = (state, dispatch) => {
19003
+ const createPaymentSource = (state, dispatch) => {
18759
19004
  return stripe.createSource({
18760
19005
  type: "card"
18761
19006
  }).then(_ref8 => {
@@ -18776,7 +19021,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18776
19021
  }
18777
19022
  });
18778
19023
  }
18779
- window.Pelcro.source.create({
19024
+ window.Pelcro.paymentMethods.create({
18780
19025
  auth_token: window.Pelcro.user.read().auth_token,
18781
19026
  token: source.id
18782
19027
  }, (err, res) => {
@@ -18802,30 +19047,144 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18802
19047
  type: SHOW_ALERT,
18803
19048
  payload: {
18804
19049
  type: "success",
18805
- content: t("messages.sourceUpdated")
19050
+ content: t("messages.sourceCreated")
18806
19051
  }
18807
19052
  });
18808
19053
  onSuccess(res);
18809
19054
  });
18810
19055
  });
18811
19056
  };
18812
- const updatePaymentRequest = state => {
18813
- var _state$paymentRequest;
18814
- state === null || state === void 0 ? void 0 : (_state$paymentRequest = state.paymentRequest) === null || _state$paymentRequest === void 0 ? void 0 : _state$paymentRequest.update({
18815
- total: {
18816
- label: plan.nickname || plan.description,
18817
- amount: state.updatedPrice
18818
- }
18819
- });
18820
- };
18821
- const submitPayment = (state, dispatch) => {
18822
- if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
18823
- const isQuickPurchase = !Array.isArray(order);
18824
- const mappedOrderItems = isQuickPurchase ? [{
18825
- sku_id: order.id,
18826
- quantity: order.quantity
18827
- }] : order.map(item => ({
18828
- sku_id: item.id,
19057
+ const updatePaymentSource = (state, dispatch) => {
19058
+ const {
19059
+ isDefault,
19060
+ month,
19061
+ year
19062
+ } = state;
19063
+ const {
19064
+ id: paymentMethodId
19065
+ } = paymentMethodToEdit;
19066
+ window.Pelcro.paymentMethods.update({
19067
+ auth_token: window.Pelcro.user.read().auth_token,
19068
+ payment_method_id: paymentMethodId,
19069
+ gateway: "stripe",
19070
+ exp_month: month,
19071
+ exp_year: year,
19072
+ is_default: isDefault
19073
+ }, (err, res) => {
19074
+ dispatch({
19075
+ type: DISABLE_SUBMIT,
19076
+ payload: false
19077
+ });
19078
+ dispatch({
19079
+ type: LOADING,
19080
+ payload: false
19081
+ });
19082
+ if (err) {
19083
+ onFailure(err);
19084
+ return dispatch({
19085
+ type: SHOW_ALERT,
19086
+ payload: {
19087
+ type: "error",
19088
+ content: getErrorMessages(err)
19089
+ }
19090
+ });
19091
+ }
19092
+ dispatch({
19093
+ type: SHOW_ALERT,
19094
+ payload: {
19095
+ type: "success",
19096
+ content: t("messages.sourceUpdated")
19097
+ }
19098
+ });
19099
+ onSuccess(res);
19100
+ });
19101
+ };
19102
+ const replacePaymentSource = (state, dispatch) => {
19103
+ const {
19104
+ id: paymentMethodId
19105
+ } = paymentMethodToDelete;
19106
+ return stripe.createSource({
19107
+ type: "card"
19108
+ }).then(_ref9 => {
19109
+ var _source$card3;
19110
+ let {
19111
+ source,
19112
+ error
19113
+ } = _ref9;
19114
+ if (error) {
19115
+ return handlePaymentError(error);
19116
+ }
19117
+
19118
+ // We don't support source creation for 3D secure yet
19119
+ 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") {
19120
+ return handlePaymentError({
19121
+ error: {
19122
+ message: t("messages.cardAuthNotSupported")
19123
+ }
19124
+ });
19125
+ }
19126
+ window.Pelcro.paymentMethods.create({
19127
+ auth_token: window.Pelcro.user.read().auth_token,
19128
+ token: source.id
19129
+ }, (err, res) => {
19130
+ if (err) {
19131
+ onFailure(err);
19132
+ return dispatch({
19133
+ type: SHOW_ALERT,
19134
+ payload: {
19135
+ type: "error",
19136
+ content: getErrorMessages(err)
19137
+ }
19138
+ });
19139
+ }
19140
+ if (res) {
19141
+ setTimeout(() => {
19142
+ window.Pelcro.paymentMethods.deletePaymentMethod({
19143
+ auth_token: window.Pelcro.user.read().auth_token,
19144
+ payment_method_id: paymentMethodId
19145
+ }, (err, res) => {
19146
+ dispatch({
19147
+ type: DISABLE_SUBMIT,
19148
+ payload: false
19149
+ });
19150
+ dispatch({
19151
+ type: LOADING,
19152
+ payload: false
19153
+ });
19154
+ if (err) {
19155
+ onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
19156
+ return dispatch({
19157
+ type: SHOW_ALERT,
19158
+ payload: {
19159
+ type: "error",
19160
+ content: getErrorMessages(err)
19161
+ }
19162
+ });
19163
+ }
19164
+ onSuccess(res);
19165
+ });
19166
+ }, 2000);
19167
+ }
19168
+ });
19169
+ });
19170
+ };
19171
+ const updatePaymentRequest = state => {
19172
+ var _state$paymentRequest;
19173
+ state === null || state === void 0 ? void 0 : (_state$paymentRequest = state.paymentRequest) === null || _state$paymentRequest === void 0 ? void 0 : _state$paymentRequest.update({
19174
+ total: {
19175
+ label: plan.nickname || plan.description,
19176
+ amount: state.updatedPrice
19177
+ }
19178
+ });
19179
+ };
19180
+ const submitPayment = (state, dispatch) => {
19181
+ if (skipPayment && props !== null && props !== void 0 && props.freeOrders) {
19182
+ const isQuickPurchase = !Array.isArray(order);
19183
+ const mappedOrderItems = isQuickPurchase ? [{
19184
+ sku_id: order.id,
19185
+ quantity: order.quantity
19186
+ }] : order.map(item => ({
19187
+ sku_id: item.id,
18829
19188
  quantity: item.quantity
18830
19189
  }));
18831
19190
  window.Pelcro.ecommerce.order.create({
@@ -18844,12 +19203,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18844
19203
  }
18845
19204
  stripe.createSource({
18846
19205
  type: "card"
18847
- }).then(_ref9 => {
18848
- var _ref10, _ref11, _state$updatedPrice2;
19206
+ }).then(_ref10 => {
19207
+ var _ref11, _ref12, _state$updatedPrice2;
18849
19208
  let {
18850
19209
  source,
18851
19210
  error
18852
- } = _ref9;
19211
+ } = _ref10;
18853
19212
  if (error) {
18854
19213
  return handlePaymentError(error);
18855
19214
  }
@@ -18868,7 +19227,7 @@ const PaymentMethodContainerWithoutStripe = _ref => {
18868
19227
  return total + item.price * item.quantity;
18869
19228
  }, 0);
18870
19229
  };
18871
- (_ref10 = (_ref11 = (_state$updatedPrice2 = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice2 !== void 0 ? _state$updatedPrice2 : plan === null || plan === void 0 ? void 0 : plan.amount) !== null && _ref11 !== void 0 ? _ref11 : invoice === null || invoice === void 0 ? void 0 : invoice.amount_remaining) !== null && _ref10 !== void 0 ? _ref10 : getOrderItemsTotal();
19230
+ (_ref11 = (_ref12 = (_state$updatedPrice2 = state === null || state === void 0 ? void 0 : state.updatedPrice) !== null && _state$updatedPrice2 !== void 0 ? _state$updatedPrice2 : 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();
18872
19231
  return handlePayment(source);
18873
19232
  }).catch(error => {
18874
19233
  return handlePaymentError(error);
@@ -19094,9 +19453,15 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19094
19453
  isExistingSource: true
19095
19454
  });
19096
19455
  }
19456
+ if (type === "createPaymentSource") {
19457
+ return createPaymentSource(state, dispatch);
19458
+ }
19097
19459
  if (type === "updatePaymentSource") {
19098
19460
  return updatePaymentSource(state, dispatch);
19099
19461
  }
19462
+ if (type === "deletePaymentSource") {
19463
+ return replacePaymentSource(state, dispatch);
19464
+ }
19100
19465
  submitPayment(state);
19101
19466
  });
19102
19467
  case HANDLE_PAYPAL_SUBSCRIPTION:
@@ -19214,16 +19579,26 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19214
19579
  ...state,
19215
19580
  cyberSourceSessionId: action.payload
19216
19581
  });
19582
+ case HANDLE_CHECKBOX_CHANGE:
19583
+ return lib_7({
19584
+ ...state,
19585
+ ...action.payload
19586
+ });
19587
+ case SET_IS_DEFAULT_PAYMENT_METHOD:
19588
+ return lib_7({
19589
+ ...state,
19590
+ ...action.payload
19591
+ });
19217
19592
  default:
19218
19593
  return state;
19219
19594
  }
19220
- }, initialState$k);
19595
+ }, initialState$l);
19221
19596
  return /*#__PURE__*/React__default['default'].createElement("div", {
19222
19597
  style: {
19223
19598
  ...style
19224
19599
  },
19225
19600
  className: `pelcro-container pelcro-payment-container ${className}`
19226
- }, /*#__PURE__*/React__default['default'].createElement(Provider$k, {
19601
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$l, {
19227
19602
  value: {
19228
19603
  state,
19229
19604
  dispatch
@@ -19231,12 +19606,12 @@ const PaymentMethodContainerWithoutStripe = _ref => {
19231
19606
  }, children.length ? children.map((child, i) => {
19232
19607
  if (child) {
19233
19608
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
19234
- store: store$k,
19609
+ store: store$l,
19235
19610
  key: i
19236
19611
  });
19237
19612
  }
19238
19613
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
19239
- store: store$k
19614
+ store: store$l
19240
19615
  })));
19241
19616
  };
19242
19617
  const UnwrappedForm = es_12(PaymentMethodContainerWithoutStripe);
@@ -19261,11 +19636,11 @@ const PaymentMethodContainer = props => {
19261
19636
  stripeAccount: window.Pelcro.site.read().account_id,
19262
19637
  locale: getPageOrDefaultLanguage()
19263
19638
  }, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
19264
- store: store$k
19639
+ store: store$l
19265
19640
  }, props))));
19266
19641
  } else if (cardProcessor !== "stripe") {
19267
19642
  return /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainerWithoutStripe, Object.assign({
19268
- store: store$k
19643
+ store: store$l
19269
19644
  }, props));
19270
19645
  }
19271
19646
  return null;
@@ -19425,7 +19800,7 @@ const PelcroPaymentRequestButton = props => {
19425
19800
  currentPlan,
19426
19801
  updatedPrice
19427
19802
  }
19428
- } = React.useContext(store$k);
19803
+ } = React.useContext(store$l);
19429
19804
  const updatePaymentRequest = () => {
19430
19805
  // Make sure payment request is up to date, eg. user added a coupon code.
19431
19806
  paymentRequest === null || paymentRequest === void 0 ? void 0 : paymentRequest.update({
@@ -19450,9 +19825,13 @@ const PelcroPaymentRequestButton = props => {
19450
19825
  }
19451
19826
  return null;
19452
19827
  };
19453
- const CheckoutForm = () => {
19828
+ const CheckoutForm = _ref => {
19829
+ let {
19830
+ type
19831
+ } = _ref;
19454
19832
  const {
19455
- selectedPaymentMethodId
19833
+ selectedPaymentMethodId,
19834
+ paymentMethodToEdit
19456
19835
  } = usePelcro();
19457
19836
  const cardProcessor = getSiteCardProcessor();
19458
19837
  if (selectedPaymentMethodId) {
@@ -19477,16 +19856,38 @@ const CheckoutForm = () => {
19477
19856
  }, /*#__PURE__*/React__default['default'].createElement("div", {
19478
19857
  className: "plc-w-6/12 plc-pr-4"
19479
19858
  }, /*#__PURE__*/React__default['default'].createElement(MonthSelect, {
19480
- store: store$k,
19859
+ store: store$l,
19481
19860
  placeholder: "Exp Month *"
19482
19861
  })), /*#__PURE__*/React__default['default'].createElement("div", {
19483
19862
  className: "plc-w-6/12"
19484
19863
  }, /*#__PURE__*/React__default['default'].createElement(YearSelect, {
19485
- store: store$k,
19864
+ store: store$l,
19486
19865
  placeholder: "Exp Year *"
19487
19866
  }))));
19488
19867
  }
19489
19868
  if (cardProcessor === "stripe") {
19869
+ if (type === "updatePaymentSource") {
19870
+ var _paymentMethodToEdit$;
19871
+ return /*#__PURE__*/React__default['default'].createElement("div", null, paymentMethodToEdit ? /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(Input, {
19872
+ className: "plc-tracking-widest plc-flex-grow plc-text-center",
19873
+ value: `•••• •••• •••• ${paymentMethodToEdit === null || paymentMethodToEdit === void 0 ? void 0 : (_paymentMethodToEdit$ = paymentMethodToEdit.properties) === null || _paymentMethodToEdit$ === void 0 ? void 0 : _paymentMethodToEdit$.last4}`,
19874
+ disabled: true
19875
+ })) : /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(Input, {
19876
+ className: "plc-bg-gray-300 plc-animate-pulse"
19877
+ })), /*#__PURE__*/React__default['default'].createElement("div", {
19878
+ className: "plc-flex plc-items-end plc-justify-between plc-my-2"
19879
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
19880
+ className: "plc-w-6/12 plc-pr-4"
19881
+ }, /*#__PURE__*/React__default['default'].createElement(MonthSelect, {
19882
+ store: store$l,
19883
+ placeholder: "Exp Month *"
19884
+ })), /*#__PURE__*/React__default['default'].createElement("div", {
19885
+ className: "plc-w-6/12"
19886
+ }, /*#__PURE__*/React__default['default'].createElement(YearSelect, {
19887
+ store: store$l,
19888
+ placeholder: "Exp Year *"
19889
+ }))));
19890
+ }
19490
19891
  return /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement(PelcroCardNumber, {
19491
19892
  autoFocus: true
19492
19893
  }), /*#__PURE__*/React__default['default'].createElement("img", {
@@ -19516,7 +19917,7 @@ const DiscountedPrice = props => {
19516
19917
  taxAmount,
19517
19918
  percentOff
19518
19919
  }
19519
- } = React.useContext(store$k);
19920
+ } = React.useContext(store$l);
19520
19921
  const {
19521
19922
  order,
19522
19923
  plan
@@ -19573,7 +19974,7 @@ const SubmitPaymentMethod = _ref => {
19573
19974
  month,
19574
19975
  year
19575
19976
  }
19576
- } = React.useContext(store$k);
19977
+ } = React.useContext(store$l);
19577
19978
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
19578
19979
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
19579
19980
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -19607,15 +20008,15 @@ const SubmitPaymentMethod = _ref => {
19607
20008
  }, t("labels.pay"), " ", priceFormatted && priceFormatted) : t("labels.submit"));
19608
20009
  };
19609
20010
 
19610
- var _path$n;
19611
- 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); }
20011
+ var _path$o;
20012
+ 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); }
19612
20013
  function SvgArrowLeft(props) {
19613
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
20014
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
19614
20015
  xmlns: "http://www.w3.org/2000/svg",
19615
20016
  fill: "none",
19616
20017
  viewBox: "0 0 24 24",
19617
20018
  stroke: "currentColor"
19618
- }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
20019
+ }, props), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
19619
20020
  strokeLinecap: "round",
19620
20021
  strokeLinejoin: "round",
19621
20022
  strokeWidth: 2,
@@ -19635,7 +20036,7 @@ const ApplyCouponButton = _ref => {
19635
20036
  disableCouponButton
19636
20037
  },
19637
20038
  dispatch
19638
- } = React.useContext(store$k);
20039
+ } = React.useContext(store$l);
19639
20040
  const {
19640
20041
  t
19641
20042
  } = useTranslation("checkoutForm");
@@ -19667,7 +20068,7 @@ const CouponCodeField = props => {
19667
20068
  couponCode,
19668
20069
  couponError
19669
20070
  }
19670
- } = React.useContext(store$k);
20071
+ } = React.useContext(store$l);
19671
20072
  const onCouponCodeChange = e => {
19672
20073
  dispatch({
19673
20074
  type: UPDATE_COUPON_CODE,
@@ -19693,15 +20094,15 @@ const CouponCodeField = props => {
19693
20094
  }, props));
19694
20095
  };
19695
20096
 
19696
- var _path$m;
19697
- 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); }
20097
+ var _path$n;
20098
+ 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); }
19698
20099
  function SvgTicket(props) {
19699
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
20100
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
19700
20101
  xmlns: "http://www.w3.org/2000/svg",
19701
20102
  fill: "none",
19702
20103
  viewBox: "0 0 24 24",
19703
20104
  stroke: "currentColor"
19704
- }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
20105
+ }, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
19705
20106
  strokeLinecap: "round",
19706
20107
  strokeLinejoin: "round",
19707
20108
  strokeWidth: 2,
@@ -19719,7 +20120,7 @@ const CouponCode = _ref => {
19719
20120
  state: {
19720
20121
  enableCouponField
19721
20122
  }
19722
- } = React.useContext(store$k);
20123
+ } = React.useContext(store$l);
19723
20124
  const {
19724
20125
  t
19725
20126
  } = useTranslation("checkoutForm");
@@ -19943,7 +20344,7 @@ const PaypalSubscribeButton = props => {
19943
20344
  const {
19944
20345
  dispatch,
19945
20346
  state
19946
- } = React.useContext(store$k);
20347
+ } = React.useContext(store$l);
19947
20348
  const {
19948
20349
  product,
19949
20350
  plan,
@@ -20059,14 +20460,14 @@ const BankAuthenticationSuccess = () => {
20059
20460
  }));
20060
20461
  };
20061
20462
 
20062
- var _path$l;
20063
- 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); }
20463
+ var _path$m;
20464
+ 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); }
20064
20465
  function SvgLock(props) {
20065
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
20466
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
20066
20467
  xmlns: "http://www.w3.org/2000/svg",
20067
20468
  viewBox: "0 0 20 20",
20068
20469
  fill: "currentColor"
20069
- }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
20470
+ }, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
20070
20471
  fillRule: "evenodd",
20071
20472
  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",
20072
20473
  clipRule: "evenodd"
@@ -20082,7 +20483,7 @@ const SelectedPaymentMethod = () => {
20082
20483
  state: {
20083
20484
  isLoading
20084
20485
  }
20085
- } = React.useContext(store$k);
20486
+ } = React.useContext(store$l);
20086
20487
  const {
20087
20488
  switchView,
20088
20489
  selectedPaymentMethodId
@@ -20123,7 +20524,7 @@ const TaxAmount = () => {
20123
20524
  state: {
20124
20525
  taxAmount
20125
20526
  }
20126
- } = React.useContext(store$k);
20527
+ } = React.useContext(store$l);
20127
20528
  const {
20128
20529
  plan
20129
20530
  } = usePelcro();
@@ -20141,15 +20542,15 @@ const TaxAmount = () => {
20141
20542
  };
20142
20543
 
20143
20544
  const IncludeFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
20144
- store: store$k
20545
+ store: store$l
20145
20546
  }, props));
20146
20547
 
20147
20548
  const IncludeLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
20148
- store: store$k
20549
+ store: store$l
20149
20550
  }, props));
20150
20551
 
20151
20552
  const IncludePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
20152
- store: store$k
20553
+ store: store$l
20153
20554
  }, props));
20154
20555
 
20155
20556
  const SubscriptionCreateFreePlanButton = _ref => {
@@ -20163,7 +20564,7 @@ const SubscriptionCreateFreePlanButton = _ref => {
20163
20564
  disableSubmit
20164
20565
  },
20165
20566
  dispatch
20166
- } = React.useContext(store$k);
20567
+ } = React.useContext(store$l);
20167
20568
  const {
20168
20569
  t
20169
20570
  } = useTranslation("common");
@@ -20199,7 +20600,7 @@ const OrderCreateFreeButton = _ref => {
20199
20600
  disableSubmit
20200
20601
  },
20201
20602
  dispatch
20202
- } = React.useContext(store$k);
20603
+ } = React.useContext(store$l);
20203
20604
  const {
20204
20605
  t
20205
20606
  } = useTranslation("checkoutForm");
@@ -20238,7 +20639,7 @@ const ApplePayButton = _ref => {
20238
20639
  const {
20239
20640
  dispatch,
20240
20641
  state
20241
- } = React.useContext(store$k);
20642
+ } = React.useContext(store$l);
20242
20643
  const {
20243
20644
  plan,
20244
20645
  invoice,
@@ -20551,6 +20952,43 @@ const ApplePayButton = _ref => {
20551
20952
  });
20552
20953
  };
20553
20954
 
20955
+ function PaymentMethodUpdateSetDefault(props) {
20956
+ const {
20957
+ dispatch,
20958
+ state: {
20959
+ isDefault
20960
+ }
20961
+ } = React.useContext(store$l);
20962
+ const {
20963
+ paymentMethodToEdit
20964
+ } = usePelcro();
20965
+ React.useEffect(() => {
20966
+ if (paymentMethodToEdit !== null && paymentMethodToEdit !== void 0 && paymentMethodToEdit.is_default) {
20967
+ dispatch({
20968
+ type: SET_IS_DEFAULT_PAYMENT_METHOD,
20969
+ payload: {
20970
+ isDefault: true
20971
+ }
20972
+ });
20973
+ }
20974
+ }, [paymentMethodToEdit]); // eslint-disable-line react-hooks/exhaustive-deps
20975
+
20976
+ const handleCheckboxChange = e => {
20977
+ dispatch({
20978
+ type: HANDLE_CHECKBOX_CHANGE,
20979
+ payload: {
20980
+ isDefault: e.target.checked
20981
+ }
20982
+ });
20983
+ };
20984
+ return /*#__PURE__*/React__default['default'].createElement(Checkbox, {
20985
+ onChange: e => handleCheckboxChange(e),
20986
+ id: props.id,
20987
+ checked: isDefault,
20988
+ disabled: paymentMethodToEdit === null || paymentMethodToEdit === void 0 ? void 0 : paymentMethodToEdit.is_default
20989
+ }, props.label);
20990
+ }
20991
+
20554
20992
  /**
20555
20993
  *
20556
20994
  */
@@ -20628,9 +21066,14 @@ function PaymentMethodView(_ref) {
20628
21066
  errorId: "pelcro-input-phone-error",
20629
21067
  label: t("labels.phone"),
20630
21068
  required: true
20631
- })), /*#__PURE__*/React__default['default'].createElement(CheckoutForm, null), showCoupon && /*#__PURE__*/React__default['default'].createElement("div", {
21069
+ })), /*#__PURE__*/React__default['default'].createElement(CheckoutForm, {
21070
+ type: type
21071
+ }), showCoupon && /*#__PURE__*/React__default['default'].createElement("div", {
20632
21072
  className: "plc-mb-2"
20633
- }, /*#__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("div", {
21073
+ }, /*#__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, {
21074
+ id: "pelcro-input-is-default",
21075
+ label: t("labels.isDefault")
21076
+ }), /*#__PURE__*/React__default['default'].createElement("div", {
20634
21077
  className: "plc-grid plc-mt-4 plc-gap-y-2"
20635
21078
  }, /*#__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)))));
20636
21079
  }
@@ -20750,14 +21193,14 @@ function SubscriptionRenewModal(_ref) {
20750
21193
  }
20751
21194
  SubscriptionRenewModal.viewId = "subscription-renew";
20752
21195
 
20753
- const initialState$j = {
21196
+ const initialState$k = {
20754
21197
  cancelationReason: "",
20755
21198
  cancelationOption: ""
20756
21199
  };
20757
- const store$j = /*#__PURE__*/React.createContext(initialState$j);
21200
+ const store$k = /*#__PURE__*/React.createContext(initialState$k);
20758
21201
  const {
20759
- Provider: Provider$j
20760
- } = store$j;
21202
+ Provider: Provider$k
21203
+ } = store$k;
20761
21204
  const SubscriptionCancelContainer = _ref => {
20762
21205
  let {
20763
21206
  style,
@@ -20782,35 +21225,35 @@ const SubscriptionCancelContainer = _ref => {
20782
21225
  default:
20783
21226
  return state;
20784
21227
  }
20785
- }, initialState$j);
21228
+ }, initialState$k);
20786
21229
  return /*#__PURE__*/React__default['default'].createElement("div", {
20787
21230
  style: {
20788
21231
  ...style
20789
21232
  },
20790
21233
  className: `pelcro-container pelcro-subscription-cancel-container ${className}`
20791
- }, /*#__PURE__*/React__default['default'].createElement(Provider$j, {
21234
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$k, {
20792
21235
  value: {
20793
21236
  state,
20794
21237
  dispatch
20795
21238
  }
20796
21239
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
20797
- store: store$j,
21240
+ store: store$k,
20798
21241
  key: i
20799
21242
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
20800
- store: store$j
21243
+ store: store$k
20801
21244
  })));
20802
21245
  };
20803
21246
 
20804
- var _path$k;
20805
- 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); }
21247
+ var _path$l;
21248
+ 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); }
20806
21249
  function SvgInfoCircle(props) {
20807
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
21250
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
20808
21251
  xmlns: "http://www.w3.org/2000/svg",
20809
21252
  className: "plc-w-5 plc-h-5",
20810
21253
  fill: "none",
20811
21254
  viewBox: "0 0 24 24",
20812
21255
  stroke: "currentColor"
20813
- }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
21256
+ }, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
20814
21257
  strokeLinecap: "round",
20815
21258
  strokeLinejoin: "round",
20816
21259
  strokeWidth: 2,
@@ -20879,7 +21322,7 @@ const SubscriptionCancelReason = props => {
20879
21322
  } = useTranslation("subscriptionCancel");
20880
21323
  const {
20881
21324
  dispatch
20882
- } = React.useContext(store$j);
21325
+ } = React.useContext(store$k);
20883
21326
  const handleOnTextAreaBlur = e => {
20884
21327
  dispatch({
20885
21328
  type: SET_CANCEL_SUBSCRIPTION_REASON,
@@ -20893,9 +21336,9 @@ const SubscriptionCancelReason = props => {
20893
21336
  };
20894
21337
 
20895
21338
  var _switch;
20896
- 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); }
21339
+ 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); }
20897
21340
  function SvgSubscription(props) {
20898
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
21341
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
20899
21342
  xmlns: "http://www.w3.org/2000/svg",
20900
21343
  viewBox: "0 0 100 125",
20901
21344
  fill: "currentColor"
@@ -20924,7 +21367,7 @@ const SubscriptionCancelButton = _ref => {
20924
21367
  cancelationReason,
20925
21368
  cancelationOption
20926
21369
  }
20927
- } = React.useContext(store$j);
21370
+ } = React.useContext(store$k);
20928
21371
  const {
20929
21372
  t
20930
21373
  } = useTranslation("subscriptionCancel");
@@ -21003,7 +21446,7 @@ const SubscriptionCancelOptions = _ref => {
21003
21446
  cancelationOption
21004
21447
  },
21005
21448
  dispatch
21006
- } = React.useContext(store$j);
21449
+ } = React.useContext(store$k);
21007
21450
  const {
21008
21451
  t
21009
21452
  } = useTranslation("subscriptionCancel");
@@ -21119,14 +21562,14 @@ const SubscriptionCancelModal = _ref => {
21119
21562
  };
21120
21563
  SubscriptionCancelModal.viewId = "subscription-cancel";
21121
21564
 
21122
- const initialState$i = {
21565
+ const initialState$j = {
21123
21566
  suspendDate: null,
21124
21567
  buttonDisabled: false
21125
21568
  };
21126
- const store$i = /*#__PURE__*/React.createContext(initialState$i);
21569
+ const store$j = /*#__PURE__*/React.createContext(initialState$j);
21127
21570
  const {
21128
- Provider: Provider$i
21129
- } = store$i;
21571
+ Provider: Provider$j
21572
+ } = store$j;
21130
21573
  const SubscriptionSuspendContainer = _ref => {
21131
21574
  let {
21132
21575
  style,
@@ -21152,22 +21595,22 @@ const SubscriptionSuspendContainer = _ref => {
21152
21595
  default:
21153
21596
  return state;
21154
21597
  }
21155
- }, initialState$i);
21598
+ }, initialState$j);
21156
21599
  return /*#__PURE__*/React__default['default'].createElement("div", {
21157
21600
  style: {
21158
21601
  ...style
21159
21602
  },
21160
21603
  className: `pelcro-container pelcro-subscription-suspend-container ${className}`
21161
- }, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
21604
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$j, {
21162
21605
  value: {
21163
21606
  state,
21164
21607
  dispatch
21165
21608
  }
21166
21609
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
21167
- store: store$i,
21610
+ store: store$j,
21168
21611
  key: i
21169
21612
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
21170
- store: store$i
21613
+ store: store$j
21171
21614
  })));
21172
21615
  };
21173
21616
 
@@ -21216,7 +21659,7 @@ const SubscriptionSuspendDate = props => {
21216
21659
  const {
21217
21660
  dispatch,
21218
21661
  state
21219
- } = React.useContext(store$i);
21662
+ } = React.useContext(store$j);
21220
21663
  const handleInputChange = value => {
21221
21664
  if (value) {
21222
21665
  dispatch({
@@ -21258,7 +21701,7 @@ const SubscriptionSuspendButton = _ref => {
21258
21701
  buttonDisabled
21259
21702
  },
21260
21703
  dispatch
21261
- } = React.useContext(store$i);
21704
+ } = React.useContext(store$j);
21262
21705
  const {
21263
21706
  t
21264
21707
  } = useTranslation("subscriptionSuspend");
@@ -21359,10 +21802,10 @@ function SubscriptionSuspendModal(_ref) {
21359
21802
  }
21360
21803
  SubscriptionSuspendModal.viewId = "subscription-suspend";
21361
21804
 
21362
- var _path$j;
21363
- 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); }
21805
+ var _path$k;
21806
+ 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); }
21364
21807
  function SvgGift(props) {
21365
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
21808
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
21366
21809
  className: "plc-w-6 plc-h-6 plc-mr-2",
21367
21810
  fill: "none",
21368
21811
  stroke: "currentColor",
@@ -21371,7 +21814,7 @@ function SvgGift(props) {
21371
21814
  strokeWidth: 2,
21372
21815
  viewBox: "0 0 24 24",
21373
21816
  xmlns: "http://www.w3.org/2000/svg"
21374
- }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
21817
+ }, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
21375
21818
  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"
21376
21819
  })));
21377
21820
  }
@@ -21677,7 +22120,7 @@ class DefaultNewsLetter extends React.Component {
21677
22120
  }
21678
22121
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
21679
22122
 
21680
- const initialState$h = {
22123
+ const initialState$i = {
21681
22124
  didSubToNewslettersBefore: false,
21682
22125
  newsletters: [],
21683
22126
  isListLoading: true,
@@ -21687,10 +22130,10 @@ const initialState$h = {
21687
22130
  content: ""
21688
22131
  }
21689
22132
  };
21690
- const store$h = /*#__PURE__*/React.createContext(initialState$h);
22133
+ const store$i = /*#__PURE__*/React.createContext(initialState$i);
21691
22134
  const {
21692
- Provider: Provider$h
21693
- } = store$h;
22135
+ Provider: Provider$i
22136
+ } = store$i;
21694
22137
  const NewsletterUpdateContainer = _ref => {
21695
22138
  let {
21696
22139
  style,
@@ -21797,7 +22240,7 @@ const NewsletterUpdateContainer = _ref => {
21797
22240
  default:
21798
22241
  return state;
21799
22242
  }
21800
- }, initialState$h);
22243
+ }, initialState$i);
21801
22244
  React.useEffect(() => {
21802
22245
  const getUserNewsletters = () => {
21803
22246
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -21839,7 +22282,7 @@ const NewsletterUpdateContainer = _ref => {
21839
22282
  ...style
21840
22283
  },
21841
22284
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
21842
- }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
22285
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
21843
22286
  value: {
21844
22287
  state,
21845
22288
  dispatch
@@ -21847,12 +22290,12 @@ const NewsletterUpdateContainer = _ref => {
21847
22290
  }, children.length ? children.map((child, i) => {
21848
22291
  if (child) {
21849
22292
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
21850
- store: store$h,
22293
+ store: store$i,
21851
22294
  key: i
21852
22295
  });
21853
22296
  }
21854
22297
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
21855
- store: store$h
22298
+ store: store$i
21856
22299
  })));
21857
22300
  };
21858
22301
 
@@ -21868,7 +22311,7 @@ const NewsletterUpdateButton = _ref => {
21868
22311
  isSubmitting,
21869
22312
  isListLoading
21870
22313
  }
21871
- } = React.useContext(store$h);
22314
+ } = React.useContext(store$i);
21872
22315
  const {
21873
22316
  t
21874
22317
  } = useTranslation("newsletter");
@@ -21897,7 +22340,7 @@ const NewsletterUpdateList = () => {
21897
22340
  newsletters,
21898
22341
  isListLoading
21899
22342
  }
21900
- } = React.useContext(store$h);
22343
+ } = React.useContext(store$i);
21901
22344
  if (isListLoading) {
21902
22345
  return /*#__PURE__*/React__default['default'].createElement(Loader, {
21903
22346
  width: 60,
@@ -22092,7 +22535,7 @@ function SubscriptionCreateModal(_ref) {
22092
22535
  }
22093
22536
  SubscriptionCreateModal.viewId = "subscription-create";
22094
22537
 
22095
- const initialState$g = {
22538
+ const initialState$h = {
22096
22539
  emails: "",
22097
22540
  emailsError: null,
22098
22541
  buttonDisabled: false,
@@ -22104,10 +22547,10 @@ const initialState$g = {
22104
22547
  content: ""
22105
22548
  }
22106
22549
  };
22107
- const store$g = /*#__PURE__*/React.createContext(initialState$g);
22550
+ const store$h = /*#__PURE__*/React.createContext(initialState$h);
22108
22551
  const {
22109
- Provider: Provider$g
22110
- } = store$g;
22552
+ Provider: Provider$h
22553
+ } = store$h;
22111
22554
  const SubscriptionManageMembersContainer = _ref => {
22112
22555
  let {
22113
22556
  style,
@@ -22271,7 +22714,7 @@ const SubscriptionManageMembersContainer = _ref => {
22271
22714
  default:
22272
22715
  return state;
22273
22716
  }
22274
- }, initialState$g);
22717
+ }, initialState$h);
22275
22718
  React.useEffect(() => {
22276
22719
  dispatch({
22277
22720
  type: HANDLE_LIST_MEMBERS
@@ -22282,7 +22725,7 @@ const SubscriptionManageMembersContainer = _ref => {
22282
22725
  ...style
22283
22726
  },
22284
22727
  className: `pelcro-container pelcro-manage-members-container ${className}`
22285
- }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
22728
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
22286
22729
  value: {
22287
22730
  state,
22288
22731
  dispatch
@@ -22290,12 +22733,12 @@ const SubscriptionManageMembersContainer = _ref => {
22290
22733
  }, children.length ? children.map((child, i) => {
22291
22734
  if (child) {
22292
22735
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
22293
- store: store$g,
22736
+ store: store$h,
22294
22737
  key: i
22295
22738
  });
22296
22739
  }
22297
22740
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
22298
- store: store$g
22741
+ store: store$h
22299
22742
  })));
22300
22743
  };
22301
22744
 
@@ -22312,7 +22755,7 @@ const SubscriptionManageMembersButton = _ref => {
22312
22755
  buttonDisabled
22313
22756
  },
22314
22757
  dispatch
22315
- } = React.useContext(store$g);
22758
+ } = React.useContext(store$h);
22316
22759
  const {
22317
22760
  t
22318
22761
  } = useTranslation("subscriptionManageMembers");
@@ -22342,7 +22785,7 @@ function SubscriptionManageMembersEmails(props) {
22342
22785
  emails: stateEmails,
22343
22786
  emailsError
22344
22787
  }
22345
- } = React.useContext(store$g);
22788
+ } = React.useContext(store$h);
22346
22789
  const [emails, setEmails] = React.useState(stateEmails);
22347
22790
  const [finishedTyping, setFinishedTyping] = React.useState(false);
22348
22791
  const handleInputChange = React.useCallback(value => {
@@ -22372,15 +22815,15 @@ function SubscriptionManageMembersEmails(props) {
22372
22815
  }, props));
22373
22816
  }
22374
22817
 
22375
- var _path$i;
22376
- 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); }
22818
+ var _path$j;
22819
+ 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); }
22377
22820
  function SvgCheckMark(props) {
22378
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
22821
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
22379
22822
  className: "plc-w-4 plc-h-4 plc-mr-1",
22380
22823
  xmlns: "http://www.w3.org/2000/svg",
22381
22824
  viewBox: "0 0 20 20",
22382
22825
  fill: "currentColor"
22383
- }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
22826
+ }, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
22384
22827
  fillRule: "evenodd",
22385
22828
  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",
22386
22829
  clipRule: "evenodd"
@@ -22398,7 +22841,7 @@ function SubscriptionManageMembersList(props) {
22398
22841
  removeMemberId,
22399
22842
  loading
22400
22843
  }
22401
- } = React.useContext(store$g);
22844
+ } = React.useContext(store$h);
22402
22845
  const getMemberStatus = React.useCallback(sub => {
22403
22846
  if (sub.status === "pending") {
22404
22847
  return {
@@ -22561,7 +23004,7 @@ function SubscriptionManageMembersModal(_ref) {
22561
23004
  SubscriptionManageMembersModal.viewId = "manage-members";
22562
23005
 
22563
23006
  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;
22564
- const initialState$f = {
23007
+ const initialState$g = {
22565
23008
  email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
22566
23009
  emailError: null,
22567
23010
  firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
@@ -22581,10 +23024,10 @@ const initialState$f = {
22581
23024
  content: ""
22582
23025
  }
22583
23026
  };
22584
- const store$f = /*#__PURE__*/React.createContext(initialState$f);
23027
+ const store$g = /*#__PURE__*/React.createContext(initialState$g);
22585
23028
  const {
22586
- Provider: Provider$f
22587
- } = store$f;
23029
+ Provider: Provider$g
23030
+ } = store$g;
22588
23031
  const UserUpdateContainer = _ref => {
22589
23032
  let {
22590
23033
  style,
@@ -22780,13 +23223,13 @@ const UserUpdateContainer = _ref => {
22780
23223
  default:
22781
23224
  return state;
22782
23225
  }
22783
- }, initialState$f);
23226
+ }, initialState$g);
22784
23227
  return /*#__PURE__*/React__default['default'].createElement("div", {
22785
23228
  style: {
22786
23229
  ...style
22787
23230
  },
22788
23231
  className: `pelcro-container pelcro-user-update-container ${className}`
22789
- }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
23232
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
22790
23233
  value: {
22791
23234
  state,
22792
23235
  dispatch
@@ -22794,24 +23237,24 @@ const UserUpdateContainer = _ref => {
22794
23237
  }, children.length ? children.map((child, i) => {
22795
23238
  if (child) {
22796
23239
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
22797
- store: store$f,
23240
+ store: store$g,
22798
23241
  key: i
22799
23242
  });
22800
23243
  }
22801
23244
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
22802
- store: store$f
23245
+ store: store$g
22803
23246
  })));
22804
23247
  };
22805
23248
 
22806
- var _path$h;
22807
- function _extends$i() { _extends$i = 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$i.apply(this, arguments); }
23249
+ var _path$i;
23250
+ 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); }
22808
23251
  function SvgEdit(props) {
22809
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$i({
23252
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
22810
23253
  className: "plc-w-6 plc-h-6",
22811
23254
  xmlns: "http://www.w3.org/2000/svg",
22812
23255
  viewBox: "0 0 20 20",
22813
23256
  fill: "currentColor"
22814
- }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
23257
+ }, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
22815
23258
  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"
22816
23259
  })));
22817
23260
  }
@@ -22823,7 +23266,7 @@ const UserUpdateEmail = props => {
22823
23266
  email,
22824
23267
  emailError
22825
23268
  }
22826
- } = React.useContext(store$f);
23269
+ } = React.useContext(store$g);
22827
23270
  const [enableEmailEdit, setEnableEmailEdit] = React.useState(false);
22828
23271
  const {
22829
23272
  t
@@ -22847,7 +23290,7 @@ const UserUpdateEmail = props => {
22847
23290
  className: "plc-flex plc-items-start plc-relative"
22848
23291
  }, /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
22849
23292
  disabled: !enableEmailEdit,
22850
- store: store$f,
23293
+ store: store$g,
22851
23294
  label: t("labels.email"),
22852
23295
  enableEmailEdit: enableEmailEdit
22853
23296
  }, props)), /*#__PURE__*/React__default['default'].createElement(Button, {
@@ -22881,7 +23324,7 @@ const UserUpdateButton = _ref => {
22881
23324
  phoneError
22882
23325
  },
22883
23326
  dispatch
22884
- } = React.useContext(store$f);
23327
+ } = React.useContext(store$g);
22885
23328
  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);
22886
23329
  const {
22887
23330
  t
@@ -22977,19 +23420,19 @@ function UpdateUserNameInput(_ref) {
22977
23420
  }
22978
23421
 
22979
23422
  const UserUpdateUsername = props => /*#__PURE__*/React__default['default'].createElement(UpdateUserNameInput, Object.assign({
22980
- store: store$f
23423
+ store: store$g
22981
23424
  }, props));
22982
23425
 
22983
23426
  const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
22984
- store: store$f
23427
+ store: store$g
22985
23428
  }, props));
22986
23429
 
22987
23430
  const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
22988
- store: store$f
23431
+ store: store$g
22989
23432
  }, props));
22990
23433
 
22991
23434
  const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
22992
- store: store$f
23435
+ store: store$g
22993
23436
  }, props));
22994
23437
 
22995
23438
  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";
@@ -23076,7 +23519,7 @@ function Tin(_ref) {
23076
23519
  }
23077
23520
 
23078
23521
  const UserUpdateTin = props => /*#__PURE__*/React__default['default'].createElement(Tin, Object.assign({
23079
- store: store$f
23522
+ store: store$g
23080
23523
  }, props));
23081
23524
 
23082
23525
  function DisplayName(_ref) {
@@ -23105,7 +23548,7 @@ function DisplayName(_ref) {
23105
23548
  }
23106
23549
 
23107
23550
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
23108
- store: store$f
23551
+ store: store$g
23109
23552
  }, props));
23110
23553
 
23111
23554
  const UserUpdateView = props => {
@@ -23199,11 +23642,11 @@ UserUpdateModal.viewId = "user-edit";
23199
23642
 
23200
23643
  const UserUpdateTextInput = props => {
23201
23644
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
23202
- store: store$f
23645
+ store: store$g
23203
23646
  }));
23204
23647
  };
23205
23648
 
23206
- const initialState$e = {
23649
+ const initialState$f = {
23207
23650
  isSubmitting: false,
23208
23651
  firstName: "",
23209
23652
  firstNameError: "",
@@ -23229,10 +23672,10 @@ const initialState$e = {
23229
23672
  content: ""
23230
23673
  }
23231
23674
  };
23232
- const store$e = /*#__PURE__*/React.createContext(initialState$e);
23675
+ const store$f = /*#__PURE__*/React.createContext(initialState$f);
23233
23676
  const {
23234
- Provider: Provider$e
23235
- } = store$e;
23677
+ Provider: Provider$f
23678
+ } = store$f;
23236
23679
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
23237
23680
  const AddressCreateContainer = _ref => {
23238
23681
  var _props$giftCode, _ref2, _props$subscriptionId;
@@ -23466,7 +23909,7 @@ const AddressCreateContainer = _ref => {
23466
23909
  default:
23467
23910
  return state;
23468
23911
  }
23469
- }, initialState$e);
23912
+ }, initialState$f);
23470
23913
  React.useEffect(() => {
23471
23914
  const getStates = () => {
23472
23915
  dispatch({
@@ -23498,16 +23941,16 @@ const AddressCreateContainer = _ref => {
23498
23941
  ...style
23499
23942
  },
23500
23943
  className: `pelcro-container pelcro-address-create-container ${className}`
23501
- }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
23944
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
23502
23945
  value: {
23503
23946
  state,
23504
23947
  dispatch
23505
23948
  }
23506
23949
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
23507
- store: store$e,
23950
+ store: store$f,
23508
23951
  key: i
23509
23952
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
23510
- store: store$e
23953
+ store: store$f
23511
23954
  })));
23512
23955
  };
23513
23956
 
@@ -23518,7 +23961,7 @@ function AddressCreateFirstName(props) {
23518
23961
  firstName,
23519
23962
  firstNameError
23520
23963
  }
23521
- } = React.useContext(store$e);
23964
+ } = React.useContext(store$f);
23522
23965
  const handleInputChange = value => {
23523
23966
  dispatch({
23524
23967
  type: SET_TEXT_FIELD,
@@ -23552,7 +23995,7 @@ function AddressCreateLastName(props) {
23552
23995
  lastName,
23553
23996
  lastNameError
23554
23997
  }
23555
- } = React.useContext(store$e);
23998
+ } = React.useContext(store$f);
23556
23999
  const handleInputChange = value => {
23557
24000
  dispatch({
23558
24001
  type: SET_TEXT_FIELD,
@@ -23584,7 +24027,7 @@ function AddressCreateLine1(props) {
23584
24027
  line1,
23585
24028
  line1Error
23586
24029
  }
23587
- } = React.useContext(store$e);
24030
+ } = React.useContext(store$f);
23588
24031
  const handleBlur = () => {
23589
24032
  return dispatch({
23590
24033
  type: VALIDATE_FIELD,
@@ -23623,7 +24066,7 @@ function AddressCreateCity(props) {
23623
24066
  city,
23624
24067
  cityError
23625
24068
  }
23626
- } = React.useContext(store$e);
24069
+ } = React.useContext(store$f);
23627
24070
  const handleInputChange = value => {
23628
24071
  dispatch({
23629
24072
  type: SET_TEXT_FIELD,
@@ -23655,7 +24098,7 @@ function AddressCreatePostalCode(props) {
23655
24098
  postalCode,
23656
24099
  postalCodeError
23657
24100
  }
23658
- } = React.useContext(store$e);
24101
+ } = React.useContext(store$f);
23659
24102
  const handleInputChange = value => {
23660
24103
  dispatch({
23661
24104
  type: SET_TEXT_FIELD,
@@ -23691,7 +24134,7 @@ const AddressCreateSubmit = _ref => {
23691
24134
  state: {
23692
24135
  isSubmitting
23693
24136
  }
23694
- } = React.useContext(store$e);
24137
+ } = React.useContext(store$f);
23695
24138
  const {
23696
24139
  t
23697
24140
  } = useTranslation("address");
@@ -23771,7 +24214,7 @@ function CountrySelect(_ref) {
23771
24214
  }
23772
24215
 
23773
24216
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
23774
- store: store$e
24217
+ store: store$f
23775
24218
  }, props));
23776
24219
 
23777
24220
  function StateSelect(_ref) {
@@ -23853,14 +24296,14 @@ function StateSelect(_ref) {
23853
24296
  }
23854
24297
 
23855
24298
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
23856
- store: store$e
24299
+ store: store$f
23857
24300
  }, props));
23858
24301
 
23859
24302
  const AddressCreateSetDefault = props => {
23860
24303
  const {
23861
24304
  dispatch,
23862
24305
  state
23863
- } = React.useContext(store$e);
24306
+ } = React.useContext(store$f);
23864
24307
  const handleCheckboxChange = e => {
23865
24308
  dispatch({
23866
24309
  type: HANDLE_CHECKBOX_CHANGE,
@@ -23985,18 +24428,18 @@ AddressCreateModal.viewId = "address-create";
23985
24428
 
23986
24429
  const AddressCreateTextInput = props => {
23987
24430
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
23988
- store: store$e
24431
+ store: store$f
23989
24432
  }));
23990
24433
  };
23991
24434
 
23992
24435
  const AddressCreateLine2 = props => {
23993
24436
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
23994
24437
  fieldName: "line2",
23995
- store: store$e
24438
+ store: store$f
23996
24439
  }, props));
23997
24440
  };
23998
24441
 
23999
- const initialState$d = {
24442
+ const initialState$e = {
24000
24443
  isSubmitting: false,
24001
24444
  firstName: "",
24002
24445
  firstNameError: "",
@@ -24022,10 +24465,10 @@ const initialState$d = {
24022
24465
  content: ""
24023
24466
  }
24024
24467
  };
24025
- const store$d = /*#__PURE__*/React.createContext(initialState$d);
24468
+ const store$e = /*#__PURE__*/React.createContext(initialState$e);
24026
24469
  const {
24027
- Provider: Provider$d
24028
- } = store$d;
24470
+ Provider: Provider$e
24471
+ } = store$e;
24029
24472
  const AddressUpdateContainer = _ref => {
24030
24473
  var _props$addressId, _window, _window$Pelcro, _window$Pelcro$uiSett;
24031
24474
  let {
@@ -24074,7 +24517,7 @@ const AddressUpdateContainer = _ref => {
24074
24517
  const thisAddress = addresses[address];
24075
24518
  if (+thisAddress.id === +addressId) {
24076
24519
  const newState = {
24077
- ...initialState$d,
24520
+ ...initialState$e,
24078
24521
  firstName: thisAddress.first_name,
24079
24522
  lastName: thisAddress.last_name,
24080
24523
  line1: thisAddress.line1,
@@ -24225,7 +24668,7 @@ const AddressUpdateContainer = _ref => {
24225
24668
  default:
24226
24669
  return state;
24227
24670
  }
24228
- }, initialState$d);
24671
+ }, initialState$e);
24229
24672
  React.useEffect(() => {
24230
24673
  const getStates = () => {
24231
24674
  dispatch({
@@ -24257,21 +24700,21 @@ const AddressUpdateContainer = _ref => {
24257
24700
  ...style
24258
24701
  },
24259
24702
  className: `pelcro-container pelcro-address-update-container ${className}`
24260
- }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
24703
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
24261
24704
  value: {
24262
24705
  state,
24263
24706
  dispatch
24264
24707
  }
24265
24708
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
24266
- store: store$d,
24709
+ store: store$e,
24267
24710
  key: i
24268
24711
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
24269
- store: store$d
24712
+ store: store$e
24270
24713
  })));
24271
24714
  };
24272
24715
 
24273
24716
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
24274
- store: store$d
24717
+ store: store$e
24275
24718
  }, props));
24276
24719
 
24277
24720
  function AddressUpdateFirstName(props) {
@@ -24281,7 +24724,7 @@ function AddressUpdateFirstName(props) {
24281
24724
  firstName,
24282
24725
  firstNameError
24283
24726
  }
24284
- } = React.useContext(store$d);
24727
+ } = React.useContext(store$e);
24285
24728
  const handleBlur = () => {
24286
24729
  return dispatch({
24287
24730
  type: VALIDATE_FIELD,
@@ -24320,7 +24763,7 @@ function AddressUpdateLastName(props) {
24320
24763
  lastName,
24321
24764
  lastNameError
24322
24765
  }
24323
- } = React.useContext(store$d);
24766
+ } = React.useContext(store$e);
24324
24767
  const handleBlur = () => {
24325
24768
  return dispatch({
24326
24769
  type: VALIDATE_FIELD,
@@ -24359,7 +24802,7 @@ function AddressUpdateLine1(props) {
24359
24802
  line1,
24360
24803
  line1Error
24361
24804
  }
24362
- } = React.useContext(store$d);
24805
+ } = React.useContext(store$e);
24363
24806
  const handleBlur = () => {
24364
24807
  return dispatch({
24365
24808
  type: VALIDATE_FIELD,
@@ -24395,7 +24838,7 @@ const AddressUpdateLine2 = props => {
24395
24838
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
24396
24839
  fieldName: "line2"
24397
24840
  }, props, {
24398
- store: store$d
24841
+ store: store$e
24399
24842
  }));
24400
24843
  };
24401
24844
 
@@ -24406,7 +24849,7 @@ function AddressUpdateCity(props) {
24406
24849
  city,
24407
24850
  cityError
24408
24851
  }
24409
- } = React.useContext(store$d);
24852
+ } = React.useContext(store$e);
24410
24853
  const handleBlur = () => {
24411
24854
  return dispatch({
24412
24855
  type: VALIDATE_FIELD,
@@ -24445,7 +24888,7 @@ function AddressUpdatePostalCode(props) {
24445
24888
  postalCode,
24446
24889
  postalCodeError
24447
24890
  }
24448
- } = React.useContext(store$d);
24891
+ } = React.useContext(store$e);
24449
24892
  const handleBlur = () => {
24450
24893
  return dispatch({
24451
24894
  type: VALIDATE_FIELD,
@@ -24488,7 +24931,7 @@ const AddressUpdateSubmit = _ref => {
24488
24931
  state: {
24489
24932
  isSubmitting
24490
24933
  }
24491
- } = React.useContext(store$d);
24934
+ } = React.useContext(store$e);
24492
24935
  const {
24493
24936
  t
24494
24937
  } = useTranslation("address");
@@ -24504,7 +24947,7 @@ const AddressUpdateSubmit = _ref => {
24504
24947
  };
24505
24948
 
24506
24949
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
24507
- store: store$d
24950
+ store: store$e
24508
24951
  }, props));
24509
24952
 
24510
24953
  function AddressUpdateSetDefault(props) {
@@ -24513,7 +24956,7 @@ function AddressUpdateSetDefault(props) {
24513
24956
  state: {
24514
24957
  isDefault
24515
24958
  }
24516
- } = React.useContext(store$d);
24959
+ } = React.useContext(store$e);
24517
24960
  const handleCheckboxChange = e => {
24518
24961
  dispatch({
24519
24962
  type: HANDLE_CHECKBOX_CHANGE,
@@ -24615,7 +25058,7 @@ AddressUpdateModal.viewId = "address-edit";
24615
25058
 
24616
25059
  const AddressUpdateTextInput = props => {
24617
25060
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
24618
- store: store$d
25061
+ store: store$e
24619
25062
  }));
24620
25063
  };
24621
25064
 
@@ -24705,7 +25148,7 @@ const PaymentMethodUpdateModal = props => {
24705
25148
  };
24706
25149
  PaymentMethodUpdateModal.viewId = "payment-method-update";
24707
25150
 
24708
- const initialState$c = {
25151
+ const initialState$d = {
24709
25152
  email: "",
24710
25153
  password: "",
24711
25154
  passwordError: null,
@@ -24718,10 +25161,10 @@ const initialState$c = {
24718
25161
  content: ""
24719
25162
  }
24720
25163
  };
24721
- const store$c = /*#__PURE__*/React.createContext(initialState$c);
25164
+ const store$d = /*#__PURE__*/React.createContext(initialState$d);
24722
25165
  const {
24723
- Provider: Provider$c
24724
- } = store$c;
25166
+ Provider: Provider$d
25167
+ } = store$d;
24725
25168
  const PasswordResetContainer = _ref => {
24726
25169
  let {
24727
25170
  style,
@@ -24776,7 +25219,7 @@ const PasswordResetContainer = _ref => {
24776
25219
  type: SET_EMAIL,
24777
25220
  payload: window.Pelcro.helpers.getURLParameter("email")
24778
25221
  });
24779
- initialState$c.email = window.Pelcro.helpers.getURLParameter("email");
25222
+ initialState$d.email = window.Pelcro.helpers.getURLParameter("email");
24780
25223
  dispatch({
24781
25224
  type: SET_TOKEN,
24782
25225
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -24836,27 +25279,27 @@ const PasswordResetContainer = _ref => {
24836
25279
  default:
24837
25280
  return state;
24838
25281
  }
24839
- }, initialState$c);
25282
+ }, initialState$d);
24840
25283
  return /*#__PURE__*/React__default['default'].createElement("div", {
24841
25284
  style: {
24842
25285
  ...style
24843
25286
  },
24844
25287
  className: `pelcro-container pelcro-password-reset-container ${className}`
24845
- }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
25288
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
24846
25289
  value: {
24847
25290
  state,
24848
25291
  dispatch
24849
25292
  }
24850
25293
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
24851
- store: store$c,
25294
+ store: store$d,
24852
25295
  key: i
24853
25296
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
24854
- store: store$c
25297
+ store: store$d
24855
25298
  })));
24856
25299
  };
24857
25300
 
24858
25301
  const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
24859
- store: store$c
25302
+ store: store$d
24860
25303
  }, props));
24861
25304
 
24862
25305
  const PasswordResetButton = _ref => {
@@ -24870,7 +25313,7 @@ const PasswordResetButton = _ref => {
24870
25313
  buttonDisabled
24871
25314
  },
24872
25315
  dispatch
24873
- } = React.useContext(store$c);
25316
+ } = React.useContext(store$d);
24874
25317
  const {
24875
25318
  t
24876
25319
  } = useTranslation("passwordReset");
@@ -24887,14 +25330,14 @@ const PasswordResetButton = _ref => {
24887
25330
  };
24888
25331
 
24889
25332
  const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
24890
- store: store$c
25333
+ store: store$d
24891
25334
  }, props, {
24892
25335
  value: window.Pelcro.helpers.getURLParameter("email"),
24893
25336
  disabled: true
24894
25337
  }));
24895
25338
 
24896
25339
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
24897
- store: store$c
25340
+ store: store$d
24898
25341
  }, props));
24899
25342
 
24900
25343
  const PasswordResetView = props => {
@@ -24947,7 +25390,7 @@ const PasswordResetModal = _ref => {
24947
25390
  };
24948
25391
  PasswordResetModal.viewId = "password-reset";
24949
25392
 
24950
- const initialState$b = {
25393
+ const initialState$c = {
24951
25394
  email: "",
24952
25395
  emailError: null,
24953
25396
  buttonDisabled: false,
@@ -24956,10 +25399,10 @@ const initialState$b = {
24956
25399
  content: ""
24957
25400
  }
24958
25401
  };
24959
- const store$b = /*#__PURE__*/React.createContext(initialState$b);
25402
+ const store$c = /*#__PURE__*/React.createContext(initialState$c);
24960
25403
  const {
24961
- Provider: Provider$b
24962
- } = store$b;
25404
+ Provider: Provider$c
25405
+ } = store$c;
24963
25406
  const PasswordForgotContainer = _ref => {
24964
25407
  let {
24965
25408
  style,
@@ -25035,22 +25478,22 @@ const PasswordForgotContainer = _ref => {
25035
25478
  default:
25036
25479
  return state;
25037
25480
  }
25038
- }, initialState$b);
25481
+ }, initialState$c);
25039
25482
  return /*#__PURE__*/React__default['default'].createElement("div", {
25040
25483
  style: {
25041
25484
  ...style
25042
25485
  },
25043
25486
  className: `pelcro-container pelcro-password-forgot-container ${className}`
25044
- }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
25487
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
25045
25488
  value: {
25046
25489
  state,
25047
25490
  dispatch
25048
25491
  }
25049
25492
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25050
- store: store$b,
25493
+ store: store$c,
25051
25494
  key: i
25052
25495
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25053
- store: store$b
25496
+ store: store$c
25054
25497
  })));
25055
25498
  };
25056
25499
 
@@ -25067,7 +25510,7 @@ const PasswordForgotButton = _ref => {
25067
25510
  emailError
25068
25511
  },
25069
25512
  dispatch
25070
- } = React.useContext(store$b);
25513
+ } = React.useContext(store$c);
25071
25514
  const {
25072
25515
  t
25073
25516
  } = useTranslation("passwordForgot");
@@ -25088,7 +25531,7 @@ const PasswordForgotButton = _ref => {
25088
25531
  };
25089
25532
 
25090
25533
  const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
25091
- store: store$b
25534
+ store: store$c
25092
25535
  }, props));
25093
25536
 
25094
25537
  const PasswordForgotView = props => {
@@ -25139,7 +25582,7 @@ const PasswordForgotModal = _ref => {
25139
25582
  };
25140
25583
  PasswordForgotModal.viewId = "password-forgot";
25141
25584
 
25142
- const initialState$a = {
25585
+ const initialState$b = {
25143
25586
  email: "",
25144
25587
  emailError: null,
25145
25588
  buttonDisabled: false,
@@ -25148,10 +25591,10 @@ const initialState$a = {
25148
25591
  content: ""
25149
25592
  }
25150
25593
  };
25151
- const store$a = /*#__PURE__*/React.createContext(initialState$a);
25594
+ const store$b = /*#__PURE__*/React.createContext(initialState$b);
25152
25595
  const {
25153
- Provider: Provider$a
25154
- } = store$a;
25596
+ Provider: Provider$b
25597
+ } = store$b;
25155
25598
  const PasswordlessRequestContainer = _ref => {
25156
25599
  let {
25157
25600
  style,
@@ -25227,22 +25670,22 @@ const PasswordlessRequestContainer = _ref => {
25227
25670
  default:
25228
25671
  return state;
25229
25672
  }
25230
- }, initialState$a);
25673
+ }, initialState$b);
25231
25674
  return /*#__PURE__*/React__default['default'].createElement("div", {
25232
25675
  style: {
25233
25676
  ...style
25234
25677
  },
25235
25678
  className: `pelcro-container pelcro-password-forgot-container ${className}`
25236
- }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
25679
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
25237
25680
  value: {
25238
25681
  state,
25239
25682
  dispatch
25240
25683
  }
25241
25684
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25242
- store: store$a,
25685
+ store: store$b,
25243
25686
  key: i
25244
25687
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25245
- store: store$a
25688
+ store: store$b
25246
25689
  })));
25247
25690
  };
25248
25691
 
@@ -25259,7 +25702,7 @@ const PasswordlessRequestViewButton = _ref => {
25259
25702
  emailError
25260
25703
  },
25261
25704
  dispatch
25262
- } = React.useContext(store$a);
25705
+ } = React.useContext(store$b);
25263
25706
  const {
25264
25707
  t
25265
25708
  } = useTranslation("passwordlessRequest");
@@ -25280,7 +25723,7 @@ const PasswordlessRequestViewButton = _ref => {
25280
25723
  };
25281
25724
 
25282
25725
  const PasswordlessRequestEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
25283
- store: store$a
25726
+ store: store$b
25284
25727
  }, props));
25285
25728
 
25286
25729
  const PasswordlessRequestView = props => {
@@ -25322,7 +25765,7 @@ const PasswordlessRequestModal = _ref => {
25322
25765
  };
25323
25766
  PasswordlessRequestModal.viewId = "passwordless-request";
25324
25767
 
25325
- const initialState$9 = {
25768
+ const initialState$a = {
25326
25769
  currentPassword: "",
25327
25770
  newPassword: "",
25328
25771
  confirmNewPassword: "",
@@ -25336,10 +25779,10 @@ const initialState$9 = {
25336
25779
  content: ""
25337
25780
  }
25338
25781
  };
25339
- const store$9 = /*#__PURE__*/React.createContext(initialState$9);
25782
+ const store$a = /*#__PURE__*/React.createContext(initialState$a);
25340
25783
  const {
25341
- Provider: Provider$9
25342
- } = store$9;
25784
+ Provider: Provider$a
25785
+ } = store$a;
25343
25786
  const PasswordChangeContainer = _ref => {
25344
25787
  let {
25345
25788
  style,
@@ -25490,22 +25933,22 @@ const PasswordChangeContainer = _ref => {
25490
25933
  default:
25491
25934
  return state;
25492
25935
  }
25493
- }, initialState$9);
25936
+ }, initialState$a);
25494
25937
  return /*#__PURE__*/React__default['default'].createElement("div", {
25495
25938
  style: {
25496
25939
  ...style
25497
25940
  },
25498
25941
  className: `pelcro-container pelcro-password-change-container ${className}`
25499
- }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
25942
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
25500
25943
  value: {
25501
25944
  state,
25502
25945
  dispatch
25503
25946
  }
25504
25947
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25505
- store: store$9,
25948
+ store: store$a,
25506
25949
  key: i
25507
25950
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25508
- store: store$9
25951
+ store: store$a
25509
25952
  })));
25510
25953
  };
25511
25954
 
@@ -25516,7 +25959,7 @@ function PasswordChangeCurrentPassword(props) {
25516
25959
  currentPassword,
25517
25960
  currentPasswordError
25518
25961
  }
25519
- } = React.useContext(store$9);
25962
+ } = React.useContext(store$a);
25520
25963
  const handleBlur = React.useCallback(() => {
25521
25964
  return dispatch({
25522
25965
  type: VALIDATE_PASSWORD
@@ -25550,7 +25993,7 @@ function PasswordChangeNewPassword(props) {
25550
25993
  newPassword,
25551
25994
  newPasswordError
25552
25995
  }
25553
- } = React.useContext(store$9);
25996
+ } = React.useContext(store$a);
25554
25997
  const handleBlur = React.useCallback(() => {
25555
25998
  return dispatch({
25556
25999
  type: VALIDATE_NEW_PASSWORD
@@ -25584,7 +26027,7 @@ function PasswordChangeConfirmNewPassword(props) {
25584
26027
  confirmNewPassword,
25585
26028
  confirmNewPasswordError
25586
26029
  }
25587
- } = React.useContext(store$9);
26030
+ } = React.useContext(store$a);
25588
26031
  const handleBlur = React.useCallback(() => {
25589
26032
  return dispatch({
25590
26033
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -25626,7 +26069,7 @@ const PasswordChangeButton = _ref => {
25626
26069
  confirmNewPasswordError
25627
26070
  },
25628
26071
  dispatch
25629
- } = React.useContext(store$9);
26072
+ } = React.useContext(store$a);
25630
26073
  const {
25631
26074
  t
25632
26075
  } = useTranslation("passwordChange");
@@ -25693,17 +26136,17 @@ const PasswordChangeModal = _ref => {
25693
26136
  };
25694
26137
  PasswordChangeModal.viewId = "password-change";
25695
26138
 
25696
- const initialState$8 = {
26139
+ const initialState$9 = {
25697
26140
  buttonDisabled: false,
25698
26141
  alert: {
25699
26142
  type: "error",
25700
26143
  content: ""
25701
26144
  }
25702
26145
  };
25703
- const store$8 = /*#__PURE__*/React.createContext(initialState$8);
26146
+ const store$9 = /*#__PURE__*/React.createContext(initialState$9);
25704
26147
  const {
25705
- Provider: Provider$8
25706
- } = store$8;
26148
+ Provider: Provider$9
26149
+ } = store$9;
25707
26150
  const CartContainer = _ref => {
25708
26151
  let {
25709
26152
  style,
@@ -25789,22 +26232,22 @@ const CartContainer = _ref => {
25789
26232
  default:
25790
26233
  return state;
25791
26234
  }
25792
- }, initialState$8);
26235
+ }, initialState$9);
25793
26236
  return /*#__PURE__*/React__default['default'].createElement("div", {
25794
26237
  style: {
25795
26238
  ...style
25796
26239
  },
25797
26240
  className: `pelcro-container pelcro-cart-container ${className}`
25798
- }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
26241
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
25799
26242
  value: {
25800
26243
  state,
25801
26244
  dispatch
25802
26245
  }
25803
26246
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
25804
- store: store$8,
26247
+ store: store$9,
25805
26248
  key: i
25806
26249
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25807
- store: store$8
26250
+ store: store$9
25808
26251
  })));
25809
26252
  };
25810
26253
 
@@ -25846,7 +26289,7 @@ const CartSubmit = _ref => {
25846
26289
  buttonDisabled
25847
26290
  },
25848
26291
  dispatch
25849
- } = React.useContext(store$8);
26292
+ } = React.useContext(store$9);
25850
26293
  const {
25851
26294
  t
25852
26295
  } = useTranslation("cart");
@@ -25881,7 +26324,7 @@ const CartTotalPrice = () => {
25881
26324
  state: {
25882
26325
  alert
25883
26326
  }
25884
- } = React.useContext(store$8);
26327
+ } = React.useContext(store$9);
25885
26328
  const {
25886
26329
  cartItems
25887
26330
  } = usePelcro();
@@ -26195,7 +26638,7 @@ const OrderConfirmModal = props => {
26195
26638
  };
26196
26639
  OrderConfirmModal.viewId = "order-confirm";
26197
26640
 
26198
- const initialState$7 = {
26641
+ const initialState$8 = {
26199
26642
  email: "",
26200
26643
  firstName: "",
26201
26644
  lastName: "",
@@ -26207,10 +26650,10 @@ const initialState$7 = {
26207
26650
  content: ""
26208
26651
  }
26209
26652
  };
26210
- const store$7 = /*#__PURE__*/React.createContext(initialState$7);
26653
+ const store$8 = /*#__PURE__*/React.createContext(initialState$8);
26211
26654
  const {
26212
- Provider: Provider$7
26213
- } = store$7;
26655
+ Provider: Provider$8
26656
+ } = store$8;
26214
26657
  const GiftCreateContainer = _ref => {
26215
26658
  let {
26216
26659
  style,
@@ -26308,22 +26751,22 @@ const GiftCreateContainer = _ref => {
26308
26751
  default:
26309
26752
  return state;
26310
26753
  }
26311
- }, initialState$7);
26754
+ }, initialState$8);
26312
26755
  return /*#__PURE__*/React__default['default'].createElement("div", {
26313
26756
  style: {
26314
26757
  ...style
26315
26758
  },
26316
26759
  className: `pelcro-container pelcro-gift-create-container ${className}`
26317
- }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
26760
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
26318
26761
  value: {
26319
26762
  state,
26320
26763
  dispatch
26321
26764
  }
26322
26765
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
26323
- store: store$7,
26766
+ store: store$8,
26324
26767
  key: i
26325
26768
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
26326
- store: store$7
26769
+ store: store$8
26327
26770
  })));
26328
26771
  };
26329
26772
 
@@ -26338,7 +26781,7 @@ const GiftCreateSubmitButton = _ref => {
26338
26781
  state: {
26339
26782
  disableSubmit
26340
26783
  }
26341
- } = React.useContext(store$7);
26784
+ } = React.useContext(store$8);
26342
26785
  const {
26343
26786
  t
26344
26787
  } = useTranslation("register");
@@ -26355,17 +26798,17 @@ const GiftCreateSubmitButton = _ref => {
26355
26798
 
26356
26799
  const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
26357
26800
  initWithUserEmail: false,
26358
- store: store$7
26801
+ store: store$8
26359
26802
  }, props));
26360
26803
 
26361
26804
  const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
26362
26805
  initWithUserFirstName: false,
26363
- store: store$7
26806
+ store: store$8
26364
26807
  }, props));
26365
26808
 
26366
26809
  const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
26367
26810
  initWithUserLastName: false,
26368
- store: store$7
26811
+ store: store$8
26369
26812
  }, props));
26370
26813
 
26371
26814
  const nowDate = new Date();
@@ -26379,7 +26822,7 @@ const GiftCreateStartDate = props => {
26379
26822
  const {
26380
26823
  dispatch,
26381
26824
  state
26382
- } = React.useContext(store$7);
26825
+ } = React.useContext(store$8);
26383
26826
  const handleInputChange = value => {
26384
26827
  dispatch({
26385
26828
  type: SET_START_DATE,
@@ -26409,7 +26852,7 @@ function GiftCreateMessage(props) {
26409
26852
  const {
26410
26853
  dispatch,
26411
26854
  state
26412
- } = React.useContext(store$7);
26855
+ } = React.useContext(store$8);
26413
26856
  const MAX_CHARS_COUNT = 200;
26414
26857
  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;
26415
26858
  const handleInputChange = value => {
@@ -26527,7 +26970,7 @@ const GiftCreateModal = _ref => {
26527
26970
  };
26528
26971
  GiftCreateModal.viewId = "gift-create";
26529
26972
 
26530
- const initialState$6 = {
26973
+ const initialState$7 = {
26531
26974
  isSubmitting: false,
26532
26975
  giftCode: "",
26533
26976
  buttonDisabled: true,
@@ -26536,10 +26979,10 @@ const initialState$6 = {
26536
26979
  content: ""
26537
26980
  }
26538
26981
  };
26539
- const store$6 = /*#__PURE__*/React.createContext(initialState$6);
26982
+ const store$7 = /*#__PURE__*/React.createContext(initialState$7);
26540
26983
  const {
26541
- Provider: Provider$6
26542
- } = store$6;
26984
+ Provider: Provider$7
26985
+ } = store$7;
26543
26986
  const GiftRedeemContainer = _ref => {
26544
26987
  var _ref2, _props$subscriptionId;
26545
26988
  let {
@@ -26649,22 +27092,22 @@ const GiftRedeemContainer = _ref => {
26649
27092
  default:
26650
27093
  return state;
26651
27094
  }
26652
- }, initialState$6);
27095
+ }, initialState$7);
26653
27096
  return /*#__PURE__*/React__default['default'].createElement("div", {
26654
27097
  style: {
26655
27098
  ...style
26656
27099
  },
26657
27100
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
26658
- }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
27101
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
26659
27102
  value: {
26660
27103
  state,
26661
27104
  dispatch
26662
27105
  }
26663
27106
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
26664
- store: store$6,
27107
+ store: store$7,
26665
27108
  key: i
26666
27109
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
26667
- store: store$6
27110
+ store: store$7
26668
27111
  })));
26669
27112
  };
26670
27113
 
@@ -26698,7 +27141,7 @@ function GiftCode(_ref) {
26698
27141
  }
26699
27142
 
26700
27143
  const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
26701
- store: store$6
27144
+ store: store$7
26702
27145
  }, props));
26703
27146
 
26704
27147
  const GiftRedeemSubmitButton = _ref => {
@@ -26713,7 +27156,7 @@ const GiftRedeemSubmitButton = _ref => {
26713
27156
  disableSubmit,
26714
27157
  isSubmitting
26715
27158
  }
26716
- } = React.useContext(store$6);
27159
+ } = React.useContext(store$7);
26717
27160
  const {
26718
27161
  t
26719
27162
  } = useTranslation("register");
@@ -26798,7 +27241,7 @@ const moveDefaultAddressToStart = addresses => {
26798
27241
  const addressesWithoutDefault = addresses.filter(address => !address.is_default);
26799
27242
  return [defaultAddress, ...addressesWithoutDefault];
26800
27243
  };
26801
- const initialState$5 = {
27244
+ const initialState$6 = {
26802
27245
  addresses: [],
26803
27246
  selectedAddressId: null,
26804
27247
  isSubmitting: false,
@@ -26807,10 +27250,10 @@ const initialState$5 = {
26807
27250
  content: ""
26808
27251
  }
26809
27252
  };
26810
- const store$5 = /*#__PURE__*/React.createContext(initialState$5);
27253
+ const store$6 = /*#__PURE__*/React.createContext(initialState$6);
26811
27254
  const {
26812
- Provider: Provider$5
26813
- } = store$5;
27255
+ Provider: Provider$6
27256
+ } = store$6;
26814
27257
  const AddressSelectContainer = _ref => {
26815
27258
  var _props$giftCode, _ref2, _props$subscriptionId;
26816
27259
  let {
@@ -26937,7 +27380,7 @@ const AddressSelectContainer = _ref => {
26937
27380
  default:
26938
27381
  return state;
26939
27382
  }
26940
- }, initialState$5);
27383
+ }, initialState$6);
26941
27384
  React.useEffect(() => {
26942
27385
  var _window$Pelcro$user$r;
26943
27386
  dispatch({
@@ -26950,16 +27393,16 @@ const AddressSelectContainer = _ref => {
26950
27393
  ...style
26951
27394
  },
26952
27395
  className: `pelcro-container pelcro-address-select-container ${className}`
26953
- }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
27396
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
26954
27397
  value: {
26955
27398
  state,
26956
27399
  dispatch
26957
27400
  }
26958
27401
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
26959
- store: store$5,
27402
+ store: store$6,
26960
27403
  key: i
26961
27404
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
26962
- store: store$5
27405
+ store: store$6
26963
27406
  })));
26964
27407
  };
26965
27408
 
@@ -26970,7 +27413,7 @@ const AddressSelectList = () => {
26970
27413
  addresses,
26971
27414
  selectedAddressId
26972
27415
  }
26973
- } = React.useContext(store$5);
27416
+ } = React.useContext(store$6);
26974
27417
  const handleAddressSelect = event => {
26975
27418
  dispatch({
26976
27419
  type: SELECT_ADDRESS,
@@ -27013,7 +27456,7 @@ const AddressSelectSubmit = _ref => {
27013
27456
  selectedAddressId,
27014
27457
  isSubmitting
27015
27458
  }
27016
- } = React.useContext(store$5);
27459
+ } = React.useContext(store$6);
27017
27460
  const {
27018
27461
  t
27019
27462
  } = useTranslation("address");
@@ -27109,7 +27552,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
27109
27552
  }
27110
27553
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
27111
27554
  };
27112
- const initialState$4 = {
27555
+ const initialState$5 = {
27113
27556
  paymentMethods: [],
27114
27557
  selectedPaymentMethodId: null,
27115
27558
  isSubmitting: false,
@@ -27118,10 +27561,10 @@ const initialState$4 = {
27118
27561
  content: ""
27119
27562
  }
27120
27563
  };
27121
- const store$4 = /*#__PURE__*/React.createContext(initialState$4);
27564
+ const store$5 = /*#__PURE__*/React.createContext(initialState$5);
27122
27565
  const {
27123
- Provider: Provider$4
27124
- } = store$4;
27566
+ Provider: Provider$5
27567
+ } = store$5;
27125
27568
  const PaymentMethodSelectContainer = _ref => {
27126
27569
  let {
27127
27570
  style,
@@ -27174,7 +27617,7 @@ const PaymentMethodSelectContainer = _ref => {
27174
27617
  default:
27175
27618
  return state;
27176
27619
  }
27177
- }, initialState$4);
27620
+ }, initialState$5);
27178
27621
  React.useEffect(() => {
27179
27622
  var _window$Pelcro$user$r3;
27180
27623
  dispatch({
@@ -27187,16 +27630,16 @@ const PaymentMethodSelectContainer = _ref => {
27187
27630
  ...style
27188
27631
  },
27189
27632
  className: `pelcro-container pelcro-payment-select-container ${className}`
27190
- }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
27633
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
27191
27634
  value: {
27192
27635
  state,
27193
27636
  dispatch
27194
27637
  }
27195
27638
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
27196
- store: store$4,
27639
+ store: store$5,
27197
27640
  key: i
27198
27641
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
27199
- store: store$4
27642
+ store: store$5
27200
27643
  })));
27201
27644
  };
27202
27645
 
@@ -27210,7 +27653,7 @@ const PaymentMethodSelectList = () => {
27210
27653
  paymentMethods,
27211
27654
  selectedPaymentMethodId
27212
27655
  }
27213
- } = React.useContext(store$4);
27656
+ } = React.useContext(store$5);
27214
27657
  const handlePaymentMethodSelect = event => {
27215
27658
  dispatch({
27216
27659
  type: SELECT_PAYMENT_METHOD,
@@ -27258,7 +27701,7 @@ const PaymentMethodSelectSubmit = _ref => {
27258
27701
  selectedPaymentMethodId,
27259
27702
  isSubmitting
27260
27703
  }
27261
- } = React.useContext(store$4);
27704
+ } = React.useContext(store$5);
27262
27705
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
27263
27706
  onClick: () => {
27264
27707
  dispatch({
@@ -27276,70 +27719,490 @@ const PaymentMethodSelectView = props => {
27276
27719
  t
27277
27720
  } = useTranslation("paymentMethod");
27278
27721
  return /*#__PURE__*/React__default['default'].createElement("div", {
27279
- id: "pelcro-payment-method-select-view"
27722
+ id: "pelcro-payment-method-select-view"
27723
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
27724
+ className: "plc-mb-6 plc-space-y-2 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
27725
+ }, /*#__PURE__*/React__default['default'].createElement("h4", {
27726
+ className: "plc-text-2xl plc-font-semibold"
27727
+ }, t("select.title")), /*#__PURE__*/React__default['default'].createElement("p", null, t("select.subtitle"))), /*#__PURE__*/React__default['default'].createElement("form", {
27728
+ action: "javascript:void(0);",
27729
+ className: "plc-mt-2 pelcro-form"
27730
+ }, /*#__PURE__*/React__default['default'].createElement(PaymentMethodSelectContainer, props, /*#__PURE__*/React__default['default'].createElement(PaymentMethodSelectList, null), /*#__PURE__*/React__default['default'].createElement("div", {
27731
+ className: "plc-flex plc-justify-center plc-mt-4"
27732
+ }, /*#__PURE__*/React__default['default'].createElement(Link, {
27733
+ id: "pelcro-add-payment-method",
27734
+ onClick: props.onAddNewPaymentMethod
27735
+ }, t("select.buttons.addPaymentMethod"))), /*#__PURE__*/React__default['default'].createElement(PaymentMethodSelectSubmit, {
27736
+ role: "submit",
27737
+ className: "plc-w-full plc-mt-4",
27738
+ id: "pelcro-submit"
27739
+ }))));
27740
+ };
27741
+
27742
+ const PaymentMethodSelectModal = _ref => {
27743
+ var _window$Pelcro, _window$Pelcro$uiSett;
27744
+ let {
27745
+ onDisplay,
27746
+ onClose,
27747
+ ...otherProps
27748
+ } = _ref;
27749
+ const {
27750
+ switchToCheckoutForm,
27751
+ set,
27752
+ plan,
27753
+ order
27754
+ } = usePelcro();
27755
+ 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;
27756
+ React.useEffect(() => {
27757
+ if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) {
27758
+ switchToCheckoutForm();
27759
+ }
27760
+ }, []);
27761
+ const onSuccess = selectedPaymentMethodId => {
27762
+ var _otherProps$onSuccess;
27763
+ (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, selectedPaymentMethodId);
27764
+ switchToCheckoutForm();
27765
+ };
27766
+ const onAddNewPaymentMethod = () => {
27767
+ set({
27768
+ selectedPaymentMethodId: null
27769
+ });
27770
+ switchToCheckoutForm();
27771
+ };
27772
+ return /*#__PURE__*/React__default['default'].createElement(Modal, {
27773
+ onDisplay: onDisplay,
27774
+ onClose: onClose,
27775
+ id: "pelcro-payment-method-select-modal"
27776
+ }, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(PaymentMethodSelectView, Object.assign({
27777
+ onAddNewPaymentMethod: onAddNewPaymentMethod
27778
+ }, otherProps, {
27779
+ onSuccess: onSuccess
27780
+ }))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
27781
+ };
27782
+ PaymentMethodSelectModal.viewId = "payment-method-select";
27783
+
27784
+ const initialState$4 = {
27785
+ paymentMethods: [],
27786
+ selectedPaymentMethodId: null,
27787
+ isSubmitting: false,
27788
+ deleteOption: "",
27789
+ disableSubmit: false,
27790
+ isLoading: false,
27791
+ skeletonLoader: true,
27792
+ alert: {
27793
+ type: "error",
27794
+ content: ""
27795
+ }
27796
+ };
27797
+ const store$4 = /*#__PURE__*/React.createContext(initialState$4);
27798
+ const {
27799
+ Provider: Provider$4
27800
+ } = store$4;
27801
+ const PaymentMethodDeleteContainer = _ref => {
27802
+ let {
27803
+ style,
27804
+ className = "",
27805
+ onSuccess = () => {},
27806
+ onFailure = () => {},
27807
+ children
27808
+ } = _ref;
27809
+ const {
27810
+ paymentMethodToDelete
27811
+ } = usePelcro();
27812
+ React.useEffect(() => {
27813
+ window.Pelcro.paymentMethods.list({
27814
+ auth_token: window.Pelcro.user.read().auth_token
27815
+ }, (err, res) => {
27816
+ if (err) {
27817
+ return console.error(err);
27818
+ }
27819
+ if (res) {
27820
+ dispatch({
27821
+ type: SET_PAYMENT_METHODS,
27822
+ payload: res.data
27823
+ });
27824
+ dispatch({
27825
+ type: SKELETON_LOADER,
27826
+ payload: false
27827
+ });
27828
+ if (res.data.length !== 1) {
27829
+ dispatch({
27830
+ type: SET_DELETE_PAYMENT_METHOD_OPTION,
27831
+ payload: "select"
27832
+ });
27833
+ } else {
27834
+ dispatch({
27835
+ type: SET_DELETE_PAYMENT_METHOD_OPTION,
27836
+ payload: "add"
27837
+ });
27838
+ }
27839
+ }
27840
+ });
27841
+ }, []); // eslint-disable-line react-hooks/exhaustive-deps
27842
+
27843
+ const setDefaultPaymentMethod = () => {
27844
+ const {
27845
+ selectedPaymentMethodId: paymentMethodId
27846
+ } = state;
27847
+ window.Pelcro.paymentMethods.update({
27848
+ auth_token: window.Pelcro.user.read().auth_token,
27849
+ payment_method_id: paymentMethodId,
27850
+ is_default: true
27851
+ }, (err, res) => {
27852
+ if (err) {
27853
+ onFailure(err);
27854
+ return dispatch({
27855
+ type: SHOW_ALERT,
27856
+ payload: {
27857
+ type: "error",
27858
+ content: getErrorMessages(err)
27859
+ }
27860
+ });
27861
+ }
27862
+ setTimeout(() => {
27863
+ deletePaymentMethod();
27864
+ }, 2000);
27865
+ });
27866
+ };
27867
+ const deletePaymentMethod = () => {
27868
+ const {
27869
+ id: paymentMethodId
27870
+ } = paymentMethodToDelete;
27871
+ window.Pelcro.paymentMethods.deletePaymentMethod({
27872
+ auth_token: window.Pelcro.user.read().auth_token,
27873
+ payment_method_id: paymentMethodId
27874
+ }, (err, res) => {
27875
+ if (err) {
27876
+ onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
27877
+ return dispatch({
27878
+ type: SHOW_ALERT,
27879
+ payload: {
27880
+ type: "error",
27881
+ content: getErrorMessages(err)
27882
+ }
27883
+ });
27884
+ }
27885
+ dispatch({
27886
+ type: DISABLE_SUBMIT,
27887
+ payload: false
27888
+ });
27889
+ dispatch({
27890
+ type: LOADING,
27891
+ payload: false
27892
+ });
27893
+ onSuccess(res);
27894
+ });
27895
+ };
27896
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
27897
+ switch (action.type) {
27898
+ case SELECT_PAYMENT_METHOD:
27899
+ return lib_7({
27900
+ ...state,
27901
+ selectedPaymentMethodId: action.payload
27902
+ });
27903
+ case HANDLE_SUBMIT:
27904
+ return lib_5({
27905
+ ...state,
27906
+ disableSubmit: true,
27907
+ isLoading: true
27908
+ }, (state, dispatch) => setDefaultPaymentMethod());
27909
+ case SET_DELETE_PAYMENT_METHOD_OPTION:
27910
+ return lib_7({
27911
+ ...state,
27912
+ deleteOption: action.payload
27913
+ });
27914
+ case SET_PAYMENT_METHODS:
27915
+ return lib_7({
27916
+ ...state,
27917
+ paymentMethods: action.payload
27918
+ });
27919
+ case SHOW_ALERT:
27920
+ return lib_7({
27921
+ ...state,
27922
+ alert: action.payload
27923
+ });
27924
+ case DISABLE_SUBMIT:
27925
+ return lib_7({
27926
+ ...state,
27927
+ disableSubmit: action.payload
27928
+ });
27929
+ case LOADING:
27930
+ return lib_7({
27931
+ ...state,
27932
+ isLoading: action.payload
27933
+ });
27934
+ case SKELETON_LOADER:
27935
+ return lib_7({
27936
+ ...state,
27937
+ skeletonLoader: action.payload
27938
+ });
27939
+ default:
27940
+ return state;
27941
+ }
27942
+ }, initialState$4);
27943
+ return /*#__PURE__*/React__default['default'].createElement("div", {
27944
+ style: {
27945
+ ...style
27946
+ },
27947
+ className: `pelcro-container pelcro-payment-method-delete-container ${className}`
27948
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
27949
+ value: {
27950
+ state,
27951
+ dispatch
27952
+ }
27953
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
27954
+ store: store$4,
27955
+ key: i
27956
+ })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
27957
+ store: store$4
27958
+ })));
27959
+ };
27960
+
27961
+ const PaymentMethodDeleteSubmit = _ref => {
27962
+ let {
27963
+ name,
27964
+ onClick,
27965
+ ...otherProps
27966
+ } = _ref;
27967
+ const {
27968
+ t
27969
+ } = useTranslation("paymentMethod");
27970
+ const {
27971
+ dispatch,
27972
+ state: {
27973
+ isLoading,
27974
+ isDisabled
27975
+ }
27976
+ } = React.useContext(store$4);
27977
+ return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
27978
+ onClick: () => {
27979
+ dispatch({
27980
+ type: HANDLE_SUBMIT
27981
+ });
27982
+ onClick === null || onClick === void 0 ? void 0 : onClick();
27983
+ },
27984
+ disabled: isDisabled,
27985
+ isLoading: isLoading,
27986
+ className: "plc-w-full"
27987
+ }, otherProps), name !== null && name !== void 0 ? name : t("select.buttons.selectPaymentMethod"));
27988
+ };
27989
+
27990
+ const PaymentMethodDeleteList = props => {
27991
+ const {
27992
+ t
27993
+ } = useTranslation("paymentMethod");
27994
+ const {
27995
+ dispatch,
27996
+ state: {
27997
+ deleteOption,
27998
+ selectedPaymentMethodId,
27999
+ paymentMethods,
28000
+ skeletonLoader
28001
+ }
28002
+ } = React.useContext(store$4);
28003
+ const {
28004
+ paymentMethodToDelete
28005
+ } = usePelcro();
28006
+ const handlePaymentMethodSelect = event => {
28007
+ dispatch({
28008
+ type: SELECT_PAYMENT_METHOD,
28009
+ payload: event.target.value
28010
+ });
28011
+ };
28012
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, skeletonLoader ? /*#__PURE__*/React__default['default'].createElement("div", {
28013
+ className: "plc-w-full plc-h-40 plc-bg-gray-300 plc-rounded-md plc-animate-pulse"
28014
+ }) : /*#__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", {
28015
+ 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"
28016
+ }, paymentMethods.filter(paymentMethod => (paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id) !== (paymentMethodToDelete === null || paymentMethodToDelete === void 0 ? void 0 : paymentMethodToDelete.id)).map(paymentMethod => {
28017
+ var _paymentMethod$proper, _paymentMethod$proper2, _paymentMethod$proper3, _paymentMethod$proper4;
28018
+ const isSelected = selectedPaymentMethodId === String(paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id);
28019
+ return /*#__PURE__*/React__default['default'].createElement("div", {
28020
+ key: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id,
28021
+ className: `plc-p-2 plc-pl-4 plc-shadow-md plc-text-gray-900 plc-rounded pelcro-payment-method-wrapper`
28022
+ }, /*#__PURE__*/React__default['default'].createElement(Radio, {
28023
+ className: "plc-flex plc-items-center pelcro-select-payment-method-radio",
28024
+ labelClassName: "plc-flex plc-items-center plc-space-x-2 plc-cursor-pointer plc-w-full",
28025
+ id: `pelcro-payment-method-select-${paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id}`,
28026
+ name: "paymentMethod",
28027
+ checked: isSelected,
28028
+ value: paymentMethod === null || paymentMethod === void 0 ? void 0 : paymentMethod.id,
28029
+ onChange: handlePaymentMethodSelect
28030
+ }, getPaymentCardIcon$1((_paymentMethod$proper = paymentMethod.properties) === null || _paymentMethod$proper === void 0 ? void 0 : _paymentMethod$proper.brand), /*#__PURE__*/React__default['default'].createElement("div", {
28031
+ className: "plc-flex plc-flex-col plc-text-lg pelcro-payment-method-details"
28032
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
28033
+ className: "plc-font-semibold"
28034
+ }, "\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", {
28035
+ className: "plc-text-sm plc-text-gray-500"
28036
+ }, 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))));
28037
+ })), /*#__PURE__*/React__default['default'].createElement("div", {
28038
+ className: "plc-px-3"
28039
+ }, /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteSubmit, null))), deleteOption === "add" && /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, {
28040
+ type: "deletePaymentSource",
28041
+ showCoupon: false,
28042
+ showExternalPaymentMethods: false,
28043
+ showApplePayButton: false,
28044
+ onDisplay: props.onDisplay,
28045
+ onFailure: props.onFailure,
28046
+ onSuccess: props.onSuccess,
28047
+ setAsDefault: true
28048
+ })));
28049
+ };
28050
+
28051
+ const PaymentMethodDeleteOptions = _ref => {
28052
+ const {
28053
+ state: {
28054
+ deleteOption,
28055
+ paymentMethods,
28056
+ skeletonLoader
28057
+ },
28058
+ dispatch
28059
+ } = React.useContext(store$4);
28060
+ const {
28061
+ t
28062
+ } = useTranslation("paymentMethod");
28063
+ const handleOptionSelect = event => {
28064
+ dispatch({
28065
+ type: SET_DELETE_PAYMENT_METHOD_OPTION,
28066
+ payload: event.target.value
28067
+ });
28068
+ };
28069
+ return /*#__PURE__*/React__default['default'].createElement("div", {
28070
+ className: "plc-text-left plc-mr-auto plc-mb-6"
28071
+ }, skeletonLoader ? /*#__PURE__*/React__default['default'].createElement("div", {
28072
+ className: "plc-flex plc-flex-col plc-space-y-3"
28073
+ }, /*#__PURE__*/React__default['default'].createElement(Radio, {
28074
+ className: "plc-animate-puls"
28075
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
28076
+ className: "plc-w-36 plc-bg-gray-300 plc-h-4 plc-rounded-md plc-animate-pulse"
28077
+ })), /*#__PURE__*/React__default['default'].createElement(Radio, {
28078
+ className: "plc-animate-pulse"
28079
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
28080
+ className: "plc-w-36 plc-bg-gray-300 plc-h-4 plc-rounded-md plc-animate-pulse"
28081
+ }))) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, paymentMethods && paymentMethods.length !== 1 && /*#__PURE__*/React__default['default'].createElement(Radio, {
28082
+ onChange: handleOptionSelect,
28083
+ checked: deleteOption === "select",
28084
+ value: "select"
28085
+ }, t("delete.options.select")), /*#__PURE__*/React__default['default'].createElement(Radio, {
28086
+ onChange: handleOptionSelect,
28087
+ checked: deleteOption === "add",
28088
+ value: "add"
28089
+ }, t("delete.options.add"))));
28090
+ };
28091
+
28092
+ function PaymentMethodDeleteView(props) {
28093
+ const [t] = useTranslation("paymentMethod");
28094
+ return /*#__PURE__*/React__default['default'].createElement("div", {
28095
+ id: "pelcro-payment-method-delete-view"
28096
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
28097
+ className: "plc-mb-6 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
28098
+ }, /*#__PURE__*/React__default['default'].createElement("h4", {
28099
+ className: "plc-text-2xl plc-font-semibold plc-mb-2"
28100
+ }, t("delete.title")), /*#__PURE__*/React__default['default'].createElement("p", {
28101
+ className: ""
28102
+ }, t("delete.subtitle"))), /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, {
28103
+ className: "plc-mb-2"
28104
+ }), /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteOptions, null), /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteList, {
28105
+ onSuccess: props.onSuccess
28106
+ })));
28107
+ }
28108
+
28109
+ const PaymentMethodDeleteModal = props => {
28110
+ var _window, _window$Pelcro, _window$Pelcro$uiSett;
28111
+ const {
28112
+ t
28113
+ } = useTranslation("paymentMethod");
28114
+ 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;
28115
+ const {
28116
+ resetView
28117
+ } = usePelcro();
28118
+ const onSuccess = res => {
28119
+ var _props$onSuccess;
28120
+ (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
28121
+ if (enableReactGA4) {
28122
+ ReactGA4.event("Delete payment card", {
28123
+ nonInteraction: true
28124
+ });
28125
+ } else {
28126
+ var _ReactGA$event;
28127
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
28128
+ category: "ACTIONS",
28129
+ action: "Delete payment card",
28130
+ nonInteraction: true
28131
+ });
28132
+ }
28133
+ notify$1.success(t("delete.paymentMethodReplaced"));
28134
+ resetView();
28135
+ };
28136
+ return /*#__PURE__*/React__default['default'].createElement(Modal, {
28137
+ id: "pelcro-payment-method-delete-modal",
28138
+ onDisplay: props.onDisplay,
28139
+ onClose: props.onClose
28140
+ }, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(PaymentMethodDeleteView, Object.assign({}, props, {
28141
+ onSuccess: onSuccess
28142
+ }))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
28143
+ };
28144
+ PaymentMethodDeleteModal.viewId = "payment-method-delete";
28145
+
28146
+ const PaymentMethodCreateContainer = props => {
28147
+ return /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainer, Object.assign({
28148
+ type: "createPaymentSource",
28149
+ className: "pelcro-payment-create-container"
28150
+ }, props));
28151
+ };
28152
+
28153
+ /**
28154
+ *
28155
+ */
28156
+ function PaymentMethodCreateView(props) {
28157
+ const [t] = useTranslation("paymentMethod");
28158
+ return /*#__PURE__*/React__default['default'].createElement("div", {
28159
+ id: "pelcro-payment-method-create-view"
27280
28160
  }, /*#__PURE__*/React__default['default'].createElement("div", {
27281
- className: "plc-mb-6 plc-space-y-2 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
28161
+ className: "plc-mb-2 plc-text-center plc-text-gray-900 pelcro-title-wrapper"
27282
28162
  }, /*#__PURE__*/React__default['default'].createElement("h4", {
27283
- className: "plc-text-2xl plc-font-semibold"
27284
- }, t("select.title")), /*#__PURE__*/React__default['default'].createElement("p", null, t("select.subtitle"))), /*#__PURE__*/React__default['default'].createElement("form", {
27285
- action: "javascript:void(0);",
27286
- className: "plc-mt-2 pelcro-form"
27287
- }, /*#__PURE__*/React__default['default'].createElement(PaymentMethodSelectContainer, props, /*#__PURE__*/React__default['default'].createElement(PaymentMethodSelectList, null), /*#__PURE__*/React__default['default'].createElement("div", {
27288
- className: "plc-flex plc-justify-center plc-mt-4"
27289
- }, /*#__PURE__*/React__default['default'].createElement(Link, {
27290
- id: "pelcro-add-payment-method",
27291
- onClick: props.onAddNewPaymentMethod
27292
- }, t("select.buttons.addPaymentMethod"))), /*#__PURE__*/React__default['default'].createElement(PaymentMethodSelectSubmit, {
27293
- role: "submit",
27294
- className: "plc-w-full plc-mt-4",
27295
- id: "pelcro-submit"
27296
- }))));
27297
- };
28163
+ className: "plc-text-2xl plc-font-semibold "
28164
+ }, t("create.title")), /*#__PURE__*/React__default['default'].createElement("p", null, t("create.subtitle"))), /*#__PURE__*/React__default['default'].createElement(PaymentMethodView, {
28165
+ type: "createPaymentSource",
28166
+ showCoupon: false,
28167
+ showExternalPaymentMethods: false,
28168
+ showApplePayButton: false,
28169
+ onDisplay: props.onDisplay,
28170
+ onFailure: props.onFailure,
28171
+ onSuccess: props.onSuccess
28172
+ }));
28173
+ }
27298
28174
 
27299
- const PaymentMethodSelectModal = _ref => {
27300
- var _window$Pelcro, _window$Pelcro$uiSett;
27301
- let {
27302
- onDisplay,
27303
- onClose,
27304
- ...otherProps
27305
- } = _ref;
27306
- const {
27307
- switchToCheckoutForm,
27308
- set,
27309
- plan,
27310
- order
27311
- } = usePelcro();
27312
- 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;
27313
- React.useEffect(() => {
27314
- if (skipPayment && ((plan === null || plan === void 0 ? void 0 : plan.amount) === 0 || (order === null || order === void 0 ? void 0 : order.price) === 0)) {
27315
- switchToCheckoutForm();
28175
+ const PaymentMethodCreateModal = props => {
28176
+ var _window, _window$Pelcro, _window$Pelcro$uiSett;
28177
+ 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;
28178
+ const onSuccess = res => {
28179
+ var _props$onSuccess;
28180
+ (_props$onSuccess = props.onSuccess) === null || _props$onSuccess === void 0 ? void 0 : _props$onSuccess.call(props, res);
28181
+ if (enableReactGA4) {
28182
+ ReactGA4.event("Created payment card", {
28183
+ nonInteraction: true
28184
+ });
28185
+ } else {
28186
+ var _ReactGA$event;
28187
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
28188
+ category: "ACTIONS",
28189
+ action: "Created payment card",
28190
+ nonInteraction: true
28191
+ });
27316
28192
  }
27317
- }, []);
27318
- const onSuccess = selectedPaymentMethodId => {
27319
- var _otherProps$onSuccess;
27320
- (_otherProps$onSuccess = otherProps.onSuccess) === null || _otherProps$onSuccess === void 0 ? void 0 : _otherProps$onSuccess.call(otherProps, selectedPaymentMethodId);
27321
- switchToCheckoutForm();
27322
- };
27323
- const onAddNewPaymentMethod = () => {
27324
- set({
27325
- selectedPaymentMethodId: null
27326
- });
27327
- switchToCheckoutForm();
27328
28193
  };
27329
28194
  return /*#__PURE__*/React__default['default'].createElement(Modal, {
27330
- onDisplay: onDisplay,
27331
- onClose: onClose,
27332
- id: "pelcro-payment-method-select-modal"
27333
- }, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(PaymentMethodSelectView, Object.assign({
27334
- onAddNewPaymentMethod: onAddNewPaymentMethod
27335
- }, otherProps, {
28195
+ id: "pelcro-payment-method-create-modal",
28196
+ onDisplay: props.onDisplay,
28197
+ onClose: props.onClose
28198
+ }, /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(PaymentMethodCreateView, Object.assign({}, props, {
27336
28199
  onSuccess: onSuccess
27337
28200
  }))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement(Authorship, null)));
27338
28201
  };
27339
- PaymentMethodSelectModal.viewId = "payment-method-select";
28202
+ PaymentMethodCreateModal.viewId = "payment-method-create";
27340
28203
 
27341
- function _extends$h() {
27342
- _extends$h = Object.assign || function (target) {
28204
+ function _extends$i() {
28205
+ _extends$i = Object.assign || function (target) {
27343
28206
  for (var i = 1; i < arguments.length; i++) {
27344
28207
  var source = arguments[i];
27345
28208
 
@@ -27353,7 +28216,7 @@ function _extends$h() {
27353
28216
  return target;
27354
28217
  };
27355
28218
 
27356
- return _extends$h.apply(this, arguments);
28219
+ return _extends$i.apply(this, arguments);
27357
28220
  }
27358
28221
 
27359
28222
  function _objectWithoutPropertiesLoose(source, excluded) {
@@ -27537,7 +28400,7 @@ function render(props, propsBag, defaultTag, features, visible) {
27537
28400
  return match(strategy, (_match = {}, _match[RenderStrategy.Unmount] = function () {
27538
28401
  return null;
27539
28402
  }, _match[RenderStrategy.Hidden] = function () {
27540
- return _render(_extends$h({}, _rest, {
28403
+ return _render(_extends$i({}, _rest, {
27541
28404
  hidden: true,
27542
28405
  style: {
27543
28406
  display: 'none'
@@ -28065,7 +28928,7 @@ function TransitionChild(props) {
28065
28928
  var passthroughProps = rest;
28066
28929
  return React__default['default'].createElement(NestingContext.Provider, {
28067
28930
  value: nesting
28068
- }, render(_extends$h({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
28931
+ }, render(_extends$i({}, passthroughProps, propsWeControl), propsBag, DEFAULT_TRANSITION_CHILD_TAG, TransitionChildRenderFeatures, state === TreeStates.Visible));
28069
28932
  }
28070
28933
 
28071
28934
  function Transition(props) {
@@ -28109,7 +28972,7 @@ function Transition(props) {
28109
28972
  value: nestingBag
28110
28973
  }, React__default['default'].createElement(TransitionContext.Provider, {
28111
28974
  value: transitionBag
28112
- }, render(_extends$h({}, sharedProps, {
28975
+ }, render(_extends$i({}, sharedProps, {
28113
28976
  as: React.Fragment,
28114
28977
  children: React__default['default'].createElement(TransitionChild, Object.assign({}, sharedProps, passthroughProps))
28115
28978
  }), propsBag, React.Fragment, TransitionChildRenderFeatures, state === TreeStates.Visible)));
@@ -28236,12 +29099,12 @@ var ActionTypes;
28236
29099
  })(ActionTypes || (ActionTypes = {}));
28237
29100
 
28238
29101
  (_reducers = {}, _reducers[ActionTypes.CloseMenu] = function (state) {
28239
- return _extends$h({}, state, {
29102
+ return _extends$i({}, state, {
28240
29103
  activeItemIndex: null,
28241
29104
  menuState: MenuStates.Closed
28242
29105
  });
28243
29106
  }, _reducers[ActionTypes.OpenMenu] = function (state) {
28244
- return _extends$h({}, state, {
29107
+ return _extends$i({}, state, {
28245
29108
  menuState: MenuStates.Open
28246
29109
  });
28247
29110
  }, _reducers[ActionTypes.GoToItem] = function (state, action) {
@@ -28260,7 +29123,7 @@ var ActionTypes;
28260
29123
  }
28261
29124
  });
28262
29125
  if (state.searchQuery === '' && state.activeItemIndex === activeItemIndex) return state;
28263
- return _extends$h({}, state, {
29126
+ return _extends$i({}, state, {
28264
29127
  searchQuery: '',
28265
29128
  activeItemIndex: activeItemIndex
28266
29129
  });
@@ -28271,19 +29134,19 @@ var ActionTypes;
28271
29134
 
28272
29135
  return ((_item$dataRef$current = item.dataRef.current.textValue) == null ? void 0 : _item$dataRef$current.startsWith(searchQuery)) && !item.dataRef.current.disabled;
28273
29136
  });
28274
- if (match === -1 || match === state.activeItemIndex) return _extends$h({}, state, {
29137
+ if (match === -1 || match === state.activeItemIndex) return _extends$i({}, state, {
28275
29138
  searchQuery: searchQuery
28276
29139
  });
28277
- return _extends$h({}, state, {
29140
+ return _extends$i({}, state, {
28278
29141
  searchQuery: searchQuery,
28279
29142
  activeItemIndex: match
28280
29143
  });
28281
29144
  }, _reducers[ActionTypes.ClearSearch] = function (state) {
28282
- return _extends$h({}, state, {
29145
+ return _extends$i({}, state, {
28283
29146
  searchQuery: ''
28284
29147
  });
28285
29148
  }, _reducers[ActionTypes.RegisterItem] = function (state, action) {
28286
- return _extends$h({}, state, {
29149
+ return _extends$i({}, state, {
28287
29150
  items: [].concat(state.items, [{
28288
29151
  id: action.id,
28289
29152
  dataRef: action.dataRef
@@ -28296,7 +29159,7 @@ var ActionTypes;
28296
29159
  return a.id === action.id;
28297
29160
  });
28298
29161
  if (idx !== -1) nextItems.splice(idx, 1);
28299
- return _extends$h({}, state, {
29162
+ return _extends$i({}, state, {
28300
29163
  items: nextItems,
28301
29164
  activeItemIndex: function () {
28302
29165
  if (idx === state.activeItemIndex) return null;
@@ -28335,19 +29198,19 @@ var ActionTypes$1;
28335
29198
  (_reducers$1 = {}, _reducers$1[ActionTypes$1.CloseListbox] = function (state) {
28336
29199
  if (state.disabled) return state;
28337
29200
  if (state.listboxState === ListboxStates.Closed) return state;
28338
- return _extends$h({}, state, {
29201
+ return _extends$i({}, state, {
28339
29202
  activeOptionIndex: null,
28340
29203
  listboxState: ListboxStates.Closed
28341
29204
  });
28342
29205
  }, _reducers$1[ActionTypes$1.OpenListbox] = function (state) {
28343
29206
  if (state.disabled) return state;
28344
29207
  if (state.listboxState === ListboxStates.Open) return state;
28345
- return _extends$h({}, state, {
29208
+ return _extends$i({}, state, {
28346
29209
  listboxState: ListboxStates.Open
28347
29210
  });
28348
29211
  }, _reducers$1[ActionTypes$1.SetDisabled] = function (state, action) {
28349
29212
  if (state.disabled === action.disabled) return state;
28350
- return _extends$h({}, state, {
29213
+ return _extends$i({}, state, {
28351
29214
  disabled: action.disabled
28352
29215
  });
28353
29216
  }, _reducers$1[ActionTypes$1.GoToOption] = function (state, action) {
@@ -28368,7 +29231,7 @@ var ActionTypes$1;
28368
29231
  }
28369
29232
  });
28370
29233
  if (state.searchQuery === '' && state.activeOptionIndex === activeOptionIndex) return state;
28371
- return _extends$h({}, state, {
29234
+ return _extends$i({}, state, {
28372
29235
  searchQuery: '',
28373
29236
  activeOptionIndex: activeOptionIndex
28374
29237
  });
@@ -28381,10 +29244,10 @@ var ActionTypes$1;
28381
29244
 
28382
29245
  return !option.dataRef.current.disabled && ((_option$dataRef$curre = option.dataRef.current.textValue) == null ? void 0 : _option$dataRef$curre.startsWith(searchQuery));
28383
29246
  });
28384
- if (match === -1 || match === state.activeOptionIndex) return _extends$h({}, state, {
29247
+ if (match === -1 || match === state.activeOptionIndex) return _extends$i({}, state, {
28385
29248
  searchQuery: searchQuery
28386
29249
  });
28387
- return _extends$h({}, state, {
29250
+ return _extends$i({}, state, {
28388
29251
  searchQuery: searchQuery,
28389
29252
  activeOptionIndex: match
28390
29253
  });
@@ -28392,11 +29255,11 @@ var ActionTypes$1;
28392
29255
  if (state.disabled) return state;
28393
29256
  if (state.listboxState === ListboxStates.Closed) return state;
28394
29257
  if (state.searchQuery === '') return state;
28395
- return _extends$h({}, state, {
29258
+ return _extends$i({}, state, {
28396
29259
  searchQuery: ''
28397
29260
  });
28398
29261
  }, _reducers$1[ActionTypes$1.RegisterOption] = function (state, action) {
28399
- return _extends$h({}, state, {
29262
+ return _extends$i({}, state, {
28400
29263
  options: [].concat(state.options, [{
28401
29264
  id: action.id,
28402
29265
  dataRef: action.dataRef
@@ -28409,7 +29272,7 @@ var ActionTypes$1;
28409
29272
  return a.id === action.id;
28410
29273
  });
28411
29274
  if (idx !== -1) nextOptions.splice(idx, 1);
28412
- return _extends$h({}, state, {
29275
+ return _extends$i({}, state, {
28413
29276
  options: nextOptions,
28414
29277
  activeOptionIndex: function () {
28415
29278
  if (idx === state.activeOptionIndex) return null;
@@ -28428,6 +29291,7 @@ var GroupContext = /*#__PURE__*/React.createContext(null);
28428
29291
  GroupContext.displayName = 'GroupContext';
28429
29292
 
28430
29293
  const getPaymentCardIcon = name => {
29294
+ var _icons$name$toLowerCa;
28431
29295
  const icons = {
28432
29296
  visa: /*#__PURE__*/React__default['default'].createElement("svg", {
28433
29297
  className: "plc-w-12",
@@ -28454,7 +29318,7 @@ const getPaymentCardIcon = name => {
28454
29318
  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"
28455
29319
  }))
28456
29320
  };
28457
- return name ? icons[name.toLowerCase()] : /*#__PURE__*/React__default['default'].createElement("svg", {
29321
+ return (_icons$name$toLowerCa = icons[name === null || name === void 0 ? void 0 : name.toLowerCase()]) !== null && _icons$name$toLowerCa !== void 0 ? _icons$name$toLowerCa : /*#__PURE__*/React__default['default'].createElement("svg", {
28458
29322
  xmlns: "http://www.w3.org/2000/svg",
28459
29323
  className: "plc-w-12",
28460
29324
  fill: "none",
@@ -28468,16 +29332,16 @@ const getPaymentCardIcon = name => {
28468
29332
  }));
28469
29333
  };
28470
29334
 
28471
- var _path$g;
28472
- 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); }
29335
+ var _path$h;
29336
+ 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); }
28473
29337
  function SvgChevronRight(props) {
28474
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
29338
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$h({
28475
29339
  className: "plc-w-6 plc-h-6",
28476
29340
  xmlns: "http://www.w3.org/2000/svg",
28477
29341
  fill: "none",
28478
29342
  viewBox: "0 0 24 24",
28479
29343
  stroke: "currentColor"
28480
- }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
29344
+ }, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
28481
29345
  strokeLinecap: "round",
28482
29346
  strokeLinejoin: "round",
28483
29347
  strokeWidth: 2,
@@ -28706,16 +29570,16 @@ const SavedItems = _ref3 => {
28706
29570
  });
28707
29571
  };
28708
29572
 
28709
- var _path$f;
28710
- 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); }
29573
+ var _path$g;
29574
+ 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); }
28711
29575
  function SvgRefresh(props) {
28712
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
29576
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
28713
29577
  className: "plc-w-4 plc-h-4 plc-mr-1",
28714
29578
  xmlns: "http://www.w3.org/2000/svg",
28715
29579
  fill: "none",
28716
29580
  viewBox: "0 0 24 24",
28717
29581
  stroke: "currentColor"
28718
- }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
29582
+ }, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
28719
29583
  strokeLinecap: "round",
28720
29584
  strokeLinejoin: "round",
28721
29585
  strokeWidth: 2,
@@ -28723,31 +29587,31 @@ function SvgRefresh(props) {
28723
29587
  })));
28724
29588
  }
28725
29589
 
28726
- var _path$e;
28727
- 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); }
29590
+ var _path$f;
29591
+ 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); }
28728
29592
  function SvgCalendar(props) {
28729
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
29593
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
28730
29594
  xmlns: "http://www.w3.org/2000/svg",
28731
29595
  className: "plc-h-4 plc-w-4 plc-mr-1",
28732
29596
  viewBox: "0 0 20 20",
28733
29597
  fill: "currentColor"
28734
- }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
29598
+ }, props), _path$f || (_path$f = /*#__PURE__*/React__namespace.createElement("path", {
28735
29599
  fillRule: "evenodd",
28736
29600
  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",
28737
29601
  clipRule: "evenodd"
28738
29602
  })));
28739
29603
  }
28740
29604
 
28741
- var _path$d;
28742
- 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); }
29605
+ var _path$e;
29606
+ 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); }
28743
29607
  function SvgPlus(props) {
28744
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
29608
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
28745
29609
  className: "plc-w-5 plc-h-5",
28746
29610
  xmlns: "http://www.w3.org/2000/svg",
28747
29611
  fill: "none",
28748
29612
  viewBox: "0 0 24 24",
28749
29613
  stroke: "currentColor"
28750
- }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
29614
+ }, props), _path$e || (_path$e = /*#__PURE__*/React__namespace.createElement("path", {
28751
29615
  strokeLinecap: "round",
28752
29616
  strokeLinejoin: "round",
28753
29617
  strokeWidth: 2,
@@ -29107,16 +29971,16 @@ Accordion.item = function AccordionItem(_ref2) {
29107
29971
  }, content)) : null;
29108
29972
  };
29109
29973
 
29110
- var _path$c;
29111
- 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); }
29974
+ var _path$d;
29975
+ 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); }
29112
29976
  function SvgExit(props) {
29113
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
29977
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$d({
29114
29978
  className: "plc-w-6 plc-h-6",
29115
29979
  xmlns: "http://www.w3.org/2000/svg",
29116
29980
  fill: "none",
29117
29981
  viewBox: "0 0 24 24",
29118
29982
  stroke: "currentColor"
29119
- }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
29983
+ }, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
29120
29984
  strokeLinecap: "round",
29121
29985
  strokeLinejoin: "round",
29122
29986
  strokeWidth: 2,
@@ -29124,15 +29988,15 @@ function SvgExit(props) {
29124
29988
  })));
29125
29989
  }
29126
29990
 
29127
- var _path$b;
29128
- 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); }
29991
+ var _path$c;
29992
+ 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); }
29129
29993
  function SvgUser(props) {
29130
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
29994
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$c({
29131
29995
  xmlns: "http://www.w3.org/2000/svg",
29132
29996
  fill: "none",
29133
29997
  viewBox: "0 0 24 24",
29134
29998
  stroke: "currentColor"
29135
- }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
29999
+ }, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
29136
30000
  strokeLinecap: "round",
29137
30001
  strokeLinejoin: "round",
29138
30002
  strokeWidth: 2,
@@ -29140,16 +30004,16 @@ function SvgUser(props) {
29140
30004
  })));
29141
30005
  }
29142
30006
 
29143
- var _path$a;
29144
- 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); }
30007
+ var _path$b;
30008
+ 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); }
29145
30009
  function SvgNewsletter(props) {
29146
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
30010
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$b({
29147
30011
  xmlns: "http://www.w3.org/2000/svg",
29148
30012
  className: "plc-h-5 plc-w-5",
29149
30013
  fill: "none",
29150
30014
  viewBox: "0 0 24 24",
29151
30015
  stroke: "currentColor"
29152
- }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
30016
+ }, props), _path$b || (_path$b = /*#__PURE__*/React__namespace.createElement("path", {
29153
30017
  strokeLinecap: "round",
29154
30018
  strokeLinejoin: "round",
29155
30019
  strokeWidth: 2,
@@ -29157,16 +30021,16 @@ function SvgNewsletter(props) {
29157
30021
  })));
29158
30022
  }
29159
30023
 
29160
- var _path$9;
29161
- 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); }
30024
+ var _path$a;
30025
+ 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); }
29162
30026
  function SvgDocument(props) {
29163
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
30027
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$a({
29164
30028
  xmlns: "http://www.w3.org/2000/svg",
29165
30029
  className: "plc-h-6 plc-w-6 plc-mr-2",
29166
30030
  fill: "none",
29167
30031
  viewBox: "0 0 24 24",
29168
30032
  stroke: "currentColor"
29169
- }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
30033
+ }, props), _path$a || (_path$a = /*#__PURE__*/React__namespace.createElement("path", {
29170
30034
  strokeLinecap: "round",
29171
30035
  strokeLinejoin: "round",
29172
30036
  strokeWidth: 2,
@@ -29174,16 +30038,16 @@ function SvgDocument(props) {
29174
30038
  })));
29175
30039
  }
29176
30040
 
29177
- var _path$8;
29178
- 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); }
30041
+ var _path$9;
30042
+ 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); }
29179
30043
  function SvgPaymentCard(props) {
29180
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
30044
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$9({
29181
30045
  className: "plc-w-6 plc-h-6 plc-mr-2",
29182
30046
  xmlns: "http://www.w3.org/2000/svg",
29183
30047
  fill: "none",
29184
30048
  viewBox: "0 0 24 24",
29185
30049
  stroke: "currentColor"
29186
- }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
30050
+ }, props), _path$9 || (_path$9 = /*#__PURE__*/React__namespace.createElement("path", {
29187
30051
  strokeLinecap: "round",
29188
30052
  strokeLinejoin: "round",
29189
30053
  strokeWidth: 2,
@@ -29191,16 +30055,16 @@ function SvgPaymentCard(props) {
29191
30055
  })));
29192
30056
  }
29193
30057
 
29194
- var _path$7, _path2;
29195
- 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); }
30058
+ var _path$8, _path2;
30059
+ 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); }
29196
30060
  function SvgLocationPin(props) {
29197
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
30061
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$8({
29198
30062
  className: "plc-w-6 plc-h-6 plc-mr-2",
29199
30063
  xmlns: "http://www.w3.org/2000/svg",
29200
30064
  fill: "none",
29201
30065
  viewBox: "0 0 24 24",
29202
30066
  stroke: "currentColor"
29203
- }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
30067
+ }, props), _path$8 || (_path$8 = /*#__PURE__*/React__namespace.createElement("path", {
29204
30068
  strokeLinecap: "round",
29205
30069
  strokeLinejoin: "round",
29206
30070
  strokeWidth: 2,
@@ -29213,16 +30077,16 @@ function SvgLocationPin(props) {
29213
30077
  })));
29214
30078
  }
29215
30079
 
29216
- var _path$6;
29217
- 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); }
30080
+ var _path$7;
30081
+ 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); }
29218
30082
  function SvgShopping(props) {
29219
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
30083
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$7({
29220
30084
  className: "plc-w-6 plc-h-6 plc-mr-2",
29221
30085
  xmlns: "http://www.w3.org/2000/svg",
29222
30086
  fill: "none",
29223
30087
  viewBox: "0 0 24 24",
29224
30088
  stroke: "currentColor"
29225
- }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
30089
+ }, props), _path$7 || (_path$7 = /*#__PURE__*/React__namespace.createElement("path", {
29226
30090
  strokeLinecap: "round",
29227
30091
  strokeLinejoin: "round",
29228
30092
  strokeWidth: 2,
@@ -29230,16 +30094,16 @@ function SvgShopping(props) {
29230
30094
  })));
29231
30095
  }
29232
30096
 
29233
- var _path$5;
29234
- 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); }
30097
+ var _path$6;
30098
+ 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); }
29235
30099
  function SvgBookmark(props) {
29236
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
30100
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$6({
29237
30101
  className: "plc-w-6 plc-h-6 plc-mr-2",
29238
30102
  xmlns: "http://www.w3.org/2000/svg",
29239
30103
  fill: "none",
29240
30104
  viewBox: "0 0 24 24",
29241
30105
  stroke: "currentColor"
29242
- }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
30106
+ }, props), _path$6 || (_path$6 = /*#__PURE__*/React__namespace.createElement("path", {
29243
30107
  strokeLinecap: "round",
29244
30108
  strokeLinejoin: "round",
29245
30109
  strokeWidth: 2,
@@ -29247,63 +30111,76 @@ function SvgBookmark(props) {
29247
30111
  })));
29248
30112
  }
29249
30113
 
29250
- var _path$4;
29251
- 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); }
30114
+ var _path$5;
30115
+ 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); }
29252
30116
  function SvgKey(props) {
29253
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
30117
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$5({
29254
30118
  xmlns: "http://www.w3.org/2000/svg",
29255
30119
  viewBox: "0 0 20 20",
29256
30120
  fill: "currentColor"
29257
- }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
30121
+ }, props), _path$5 || (_path$5 = /*#__PURE__*/React__namespace.createElement("path", {
29258
30122
  fillRule: "evenodd",
29259
30123
  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",
29260
30124
  clipRule: "evenodd"
29261
30125
  })));
29262
30126
  }
29263
30127
 
29264
- var _path$3;
29265
- 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); }
30128
+ var _path$4;
30129
+ 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); }
29266
30130
  function SvgDonate(props) {
29267
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
30131
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$4({
29268
30132
  width: 24,
29269
30133
  height: 24,
29270
30134
  fill: "currentColor",
29271
30135
  xmlns: "http://www.w3.org/2000/svg"
29272
- }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
30136
+ }, props), _path$4 || (_path$4 = /*#__PURE__*/React__namespace.createElement("path", {
29273
30137
  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"
29274
30138
  })));
29275
30139
  }
29276
30140
 
29277
- var _path$2;
29278
- 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); }
30141
+ var _path$3;
30142
+ 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); }
29279
30143
  function SvgMemberships(props) {
29280
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
30144
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$3({
29281
30145
  xmlns: "http://www.w3.org/2000/svg",
29282
30146
  fill: "none",
29283
30147
  strokeWidth: 1.5,
29284
30148
  stroke: "currentColor",
29285
30149
  width: 24,
29286
30150
  height: 24
29287
- }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
30151
+ }, props), _path$3 || (_path$3 = /*#__PURE__*/React__namespace.createElement("path", {
29288
30152
  strokeLinecap: "round",
29289
30153
  strokeLinejoin: "round",
29290
30154
  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"
29291
30155
  })));
29292
30156
  }
29293
30157
 
29294
- var _path$1;
29295
- 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); }
30158
+ var _path$2;
30159
+ 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); }
29296
30160
  function SvgQrcode(props) {
29297
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
30161
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$2({
29298
30162
  xmlns: "http://www.w3.org/2000/svg",
29299
30163
  width: 682.667,
29300
30164
  height: 682.667,
29301
30165
  viewBox: "0 0 512 512"
29302
- }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
30166
+ }, props), _path$2 || (_path$2 = /*#__PURE__*/React__namespace.createElement("path", {
29303
30167
  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"
29304
30168
  })));
29305
30169
  }
29306
30170
 
30171
+ var _path$1;
30172
+ 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); }
30173
+ function SvgTrashCan(props) {
30174
+ return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
30175
+ className: "plc-w-6 plc-h-6",
30176
+ xmlns: "http://www.w3.org/2000/svg",
30177
+ viewBox: "0 0 448 512",
30178
+ fill: "currentColor"
30179
+ }, props), _path$1 || (_path$1 = /*#__PURE__*/React__namespace.createElement("path", {
30180
+ 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"
30181
+ })));
30182
+ }
30183
+
29307
30184
  const DonationsMenu = _ref => {
29308
30185
  let {
29309
30186
  reactivateSubscription,
@@ -29618,7 +30495,9 @@ function DashboardWithHook(props) {
29618
30495
  switchView,
29619
30496
  resetView,
29620
30497
  logout,
29621
- set
30498
+ set,
30499
+ setPaymentMethodToEdit,
30500
+ setPaymentMethodToDelete
29622
30501
  } = usePelcro();
29623
30502
  return /*#__PURE__*/React__default['default'].createElement(DashboardWithTrans, {
29624
30503
  setAddress: addressIdToEdit => set({
@@ -29641,7 +30520,9 @@ function DashboardWithHook(props) {
29641
30520
  product,
29642
30521
  plan,
29643
30522
  isGift
29644
- })
30523
+ }),
30524
+ setPaymentMethodToEdit: setPaymentMethodToEdit,
30525
+ setPaymentMethodToDelete: setPaymentMethodToDelete
29645
30526
  });
29646
30527
  }
29647
30528
  DashboardWithHook.viewId = "dashboard";
@@ -29668,6 +30549,18 @@ class Dashboard extends React.Component {
29668
30549
  nonInteraction: true
29669
30550
  });
29670
30551
  }
30552
+ window.Pelcro.paymentMethods.list({
30553
+ auth_token: window.Pelcro.user.read().auth_token
30554
+ }, (err, res) => {
30555
+ if (err) {
30556
+ return console.error(err);
30557
+ }
30558
+ if (res) {
30559
+ this.setState({
30560
+ sources: res.data
30561
+ });
30562
+ }
30563
+ });
29671
30564
  const {
29672
30565
  addresses
29673
30566
  } = window.Pelcro.user.read();
@@ -29737,10 +30630,46 @@ class Dashboard extends React.Component {
29737
30630
  onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
29738
30631
  });
29739
30632
  });
30633
+ _defineProperty$3(this, "deletePaymentMethod", (paymentMethodId, onSuccess, onFailure) => {
30634
+ // disable the Login button to prevent repeated clicks
30635
+ window.Pelcro.paymentMethods.deletePaymentMethod({
30636
+ auth_token: window.Pelcro.user.read().auth_token,
30637
+ payment_method_id: paymentMethodId
30638
+ }, (err, res) => {
30639
+ if (err) {
30640
+ return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
30641
+ }
30642
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
30643
+ });
30644
+ });
30645
+ _defineProperty$3(this, "onDeletePaymentMethodClick", source => {
30646
+ const isDeletable = source === null || source === void 0 ? void 0 : source.deletable;
30647
+ if (isDeletable) {
30648
+ this.props.onClose();
30649
+ notify$1.confirm((onSuccess, onFailure) => {
30650
+ this.deletePaymentMethod(source.id, onSuccess, onFailure);
30651
+ }, {
30652
+ confirmMessage: this.locale("messages.paymentMethodDeletion.isSureToDelete"),
30653
+ loadingMessage: this.locale("messages.paymentMethodDeletion.loading"),
30654
+ successMessage: this.locale("messages.paymentMethodDeletion.success"),
30655
+ errorMessage: this.locale("messages.paymentMethodDeletion.error")
30656
+ }, {
30657
+ closeButtonLabel: this.locale("labels.subCancellation.goBack")
30658
+ });
30659
+ } else {
30660
+ this.props.setPaymentMethodToDelete(source.id);
30661
+ return this.props.setView("payment-method-delete");
30662
+ }
30663
+ });
29740
30664
  _defineProperty$3(this, "displayRedeem", () => {
29741
30665
  return this.props.setView("gift-redeem");
29742
30666
  });
29743
30667
  _defineProperty$3(this, "displaySourceCreate", () => {
30668
+ return this.props.setView("payment-method-create");
30669
+ });
30670
+ _defineProperty$3(this, "displaySourceEdit", e => {
30671
+ const source = e.currentTarget.dataset.key;
30672
+ this.props.setPaymentMethodToEdit(source);
29744
30673
  return this.props.setView("payment-method-update");
29745
30674
  });
29746
30675
  _defineProperty$3(this, "displayUserEdit", () => {
@@ -29994,6 +30923,52 @@ class Dashboard extends React.Component {
29994
30923
  onClick: this.displayAddressCreate
29995
30924
  }, this.locale("labels.addAddress"))))));
29996
30925
  });
30926
+ _defineProperty$3(this, "renderSources", () => {
30927
+ 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) => {
30928
+ var _source$properties, _source$properties2;
30929
+ return /*#__PURE__*/React__default['default'].createElement("div", {
30930
+ key: "dashboard-source-" + source.id,
30931
+ className: "plc-flex plc-flex-row plc-pr-6"
30932
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
30933
+ 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"
30934
+ }, /*#__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", {
30935
+ className: "plc-ml-1 plc-text-lg plc-tracking-widest plc-flex-grow plc-text-center"
30936
+ }, "\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, {
30937
+ id: "pelcro-button-update-source-" + index,
30938
+ variant: "icon",
30939
+ className: "plc-text-white",
30940
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
30941
+ "data-key": source.id,
30942
+ onClick: this.displaySourceEdit,
30943
+ disabled: this.state.disableSubmit
30944
+ }), /*#__PURE__*/React__default['default'].createElement(Button, {
30945
+ id: "pelcro-button-delete-source-" + index,
30946
+ variant: "icon",
30947
+ className: "plc-text-white",
30948
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgTrashCan, null),
30949
+ onClick: () => {
30950
+ this.onDeletePaymentMethodClick(source);
30951
+ },
30952
+ disabled: this.state.disableSubmit
30953
+ })), /*#__PURE__*/React__default['default'].createElement("span", {
30954
+ className: "plc-flex-grow"
30955
+ }), source.is_default && /*#__PURE__*/React__default['default'].createElement("span", {
30956
+ 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"
30957
+ }, this.locale("labels.default")));
30958
+ });
30959
+ return /*#__PURE__*/React__default['default'].createElement("div", {
30960
+ className: "plc-pr-2"
30961
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
30962
+ className: "plc-overflow-y-scroll plc-max-h-52"
30963
+ }, sources), /*#__PURE__*/React__default['default'].createElement(Button, {
30964
+ variant: "ghost",
30965
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgPlus, {
30966
+ className: "plc-w-4 plc-mr-1"
30967
+ }),
30968
+ 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",
30969
+ onClick: this.displaySourceCreate
30970
+ }, this.locale("labels.addPaymentSource")));
30971
+ });
29997
30972
  _defineProperty$3(this, "closeDashboard", () => {
29998
30973
  this.setState({
29999
30974
  isOpen: false
@@ -30004,7 +30979,8 @@ class Dashboard extends React.Component {
30004
30979
  subscriptions: window.Pelcro.subscription.list(),
30005
30980
  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 : [],
30006
30981
  disableSubmit: false,
30007
- addresses: []
30982
+ addresses: [],
30983
+ sources: []
30008
30984
  };
30009
30985
  this.site = window.Pelcro.site.read();
30010
30986
  this.locale = this.props.t;
@@ -30013,7 +30989,7 @@ class Dashboard extends React.Component {
30013
30989
  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;
30014
30990
  }
30015
30991
  render() {
30016
- var _window$Pelcro$user$r3, _window$Pelcro2, _window$Pelcro2$uiSet, _this$user$source, _this$user$source$pro, _this$user$source2, _this$user$source2$pr;
30992
+ var _window$Pelcro$user$r3, _window$Pelcro2, _window$Pelcro2$uiSet;
30017
30993
  const {
30018
30994
  isOpen
30019
30995
  } = this.state;
@@ -30116,25 +31092,7 @@ class Dashboard extends React.Component {
30116
31092
  name: SUB_MENUS.PAYMENT_CARDS,
30117
31093
  icon: /*#__PURE__*/React__default['default'].createElement(SvgPaymentCard, null),
30118
31094
  title: this.locale("labels.paymentSource"),
30119
- content: /*#__PURE__*/React__default['default'].createElement("div", {
30120
- 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"
30121
- }, 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", {
30122
- className: "plc-ml-1 plc-text-lg plc-tracking-widest"
30123
- }, "\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, {
30124
- variant: "icon",
30125
- className: "plc-text-white",
30126
- icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
30127
- onClick: this.displaySourceCreate,
30128
- disabled: this.state.disableSubmit
30129
- })) : /*#__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, {
30130
- variant: "icon",
30131
- className: "plc-text-white",
30132
- icon: /*#__PURE__*/React__default['default'].createElement(SvgPlus, {
30133
- className: "plc-w-6 plc-h-6"
30134
- }),
30135
- onClick: this.displaySourceCreate,
30136
- disabled: this.state.disableSubmit
30137
- })))
31095
+ content: this.renderSources()
30138
31096
  }), /*#__PURE__*/React__default['default'].createElement(Accordion.item, {
30139
31097
  name: SUB_MENUS.ADDRESSES,
30140
31098
  icon: /*#__PURE__*/React__default['default'].createElement(SvgLocationPin, null),
@@ -34191,6 +35149,15 @@ exports.PasswordlessRequestViewButton = PasswordlessRequestViewButton;
34191
35149
  exports.PaymentCreateContainer = PaymentCreateContainer;
34192
35150
  exports.PaymentCreateView = PaymentCreateView;
34193
35151
  exports.PaymentMethodContainer = PaymentMethodContainer;
35152
+ exports.PaymentMethodCreateContainer = PaymentMethodCreateContainer;
35153
+ exports.PaymentMethodCreateModal = PaymentMethodCreateModal;
35154
+ exports.PaymentMethodCreateView = PaymentMethodCreateView;
35155
+ exports.PaymentMethodDeleteContainer = PaymentMethodDeleteContainer;
35156
+ exports.PaymentMethodDeleteList = PaymentMethodDeleteList;
35157
+ exports.PaymentMethodDeleteModal = PaymentMethodDeleteModal;
35158
+ exports.PaymentMethodDeleteOptions = PaymentMethodDeleteOptions;
35159
+ exports.PaymentMethodDeleteSubmit = PaymentMethodDeleteSubmit;
35160
+ exports.PaymentMethodDeleteView = PaymentMethodDeleteView;
34194
35161
  exports.PaymentMethodSelectContainer = PaymentMethodSelectContainer;
34195
35162
  exports.PaymentMethodSelectList = PaymentMethodSelectList;
34196
35163
  exports.PaymentMethodSelectModal = PaymentMethodSelectModal;
@@ -34198,6 +35165,7 @@ exports.PaymentMethodSelectSubmit = PaymentMethodSelectSubmit;
34198
35165
  exports.PaymentMethodSelectView = PaymentMethodSelectView;
34199
35166
  exports.PaymentMethodUpdateContainer = PaymentMethodUpdateContainer;
34200
35167
  exports.PaymentMethodUpdateModal = PaymentMethodUpdateModal;
35168
+ exports.PaymentMethodUpdateSetDefault = PaymentMethodUpdateSetDefault;
34201
35169
  exports.PaymentMethodUpdateView = PaymentMethodUpdateView;
34202
35170
  exports.PaymentMethodView = PaymentMethodView;
34203
35171
  exports.PaymentSuccessModal = PaymentSuccessModal;