@pelcro/react-pelcro-js 4.0.0-alpha.32 → 4.0.0-alpha.34

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
@@ -3745,7 +3745,7 @@ var passwordChange_en = {
3745
3745
  weakPassword: weakPassword$3
3746
3746
  };
3747
3747
 
3748
- var title$w = "Passwordless Login";
3748
+ var title$w = "Passwordless";
3749
3749
  var email$9 = "Enter email";
3750
3750
  var submit$c = "Submit";
3751
3751
  var required$c = "Required";
@@ -4690,7 +4690,7 @@ var passwordChange_fr = {
4690
4690
  weakPassword: weakPassword$2
4691
4691
  };
4692
4692
 
4693
- var title$n = "Connexion sans mot de passe";
4693
+ var title$n = "Sans mot de passe";
4694
4694
  var email$6 = "Entrez votre adresse courriel";
4695
4695
  var submit$8 = "Soumettre";
4696
4696
  var required$8 = "Champs obligatoires";
@@ -5581,7 +5581,7 @@ var passwordChange_ko = {
5581
5581
  weakPassword: weakPassword$1
5582
5582
  };
5583
5583
 
5584
- var title$e = "비밀번호 없는 로그인";
5584
+ var title$e = "암호 없음";
5585
5585
  var email$3 = "이메일 입력";
5586
5586
  var submit$4 = "제출";
5587
5587
  var required$4 = "필수 항목";
@@ -6519,7 +6519,7 @@ var passwordChange_es = {
6519
6519
  weakPassword: weakPassword
6520
6520
  };
6521
6521
 
6522
- var title$5 = "Acceso sin contraseña";
6522
+ var title$5 = "sin contraseña";
6523
6523
  var email = "Ingresar correo";
6524
6524
  var submit = "Enviar";
6525
6525
  var required = "obligatorio";
@@ -6861,7 +6861,7 @@ var subscriptionSuspend_es = {
6861
6861
  messages: messages
6862
6862
  };
6863
6863
 
6864
- var title$2 = "My QR code";
6864
+ var title$2 = "QR code";
6865
6865
  var qr_en = {
6866
6866
  title: title$2
6867
6867
  };
@@ -8272,7 +8272,7 @@ class PelcroActions {
8272
8272
  view,
8273
8273
  cartItems,
8274
8274
  ...otherStateFields
8275
- } = initialState$n;
8275
+ } = initialState$o;
8276
8276
  this.set(otherStateFields);
8277
8277
  });
8278
8278
 
@@ -8678,7 +8678,7 @@ class PelcroCallbacks {
8678
8678
 
8679
8679
  }
8680
8680
 
8681
- const initialState$n = {
8681
+ const initialState$o = {
8682
8682
  // View
8683
8683
  view: null,
8684
8684
  // Plans
@@ -8713,7 +8713,7 @@ const createPelcroStore = () => createStore(middleware_3((set, get) => {
8713
8713
  return {
8714
8714
  // Store setter
8715
8715
  set,
8716
- ...initialState$n,
8716
+ ...initialState$o,
8717
8717
  // State actions
8718
8718
  ...actions,
8719
8719
  // Callbacks
@@ -12134,9 +12134,18 @@ const HANDLE_INVITE_MEMBERS = "HANDLE_INVITE_MEMBERS";
12134
12134
  const HANDLE_REMOVE_MEMBER = "HANDLE_REMOVE_MEMBER";
12135
12135
  const UPDATE_INVITE_BUTTON = "UPDATE_INVITE_BUTTON";
12136
12136
  const UPDATE_MEMBERS = "UPDATE_MEMBERS";
12137
- const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID";
12137
+ const UPDATE_REMOVE_MEMBER_ID = "UPDATE_REMOVE_MEMBER_ID"; //Dashboard
12138
12138
 
12139
- const initialState$m = {
12139
+ const SET_IS_OPEN = "SET_IS_OPEN";
12140
+ const SET_ADDRESSES = "SET_ADDRESSES";
12141
+ const CLOSE_DASHBOARD = "CLOSE_DASHBOARD";
12142
+ const SET_ACTIVE_DASHBOARD_LINK = "SET_ACTIVE_DASHBOARD_LINK";
12143
+ const SET_DISABLESUBMIT = "SET_DISABLESUBMIT";
12144
+ const CANCEL_SUBSCRIPTION = "CANCEL_SUBSCRIPTION";
12145
+ const UNSUSPEND_SUBSCRIPTION = "UNSUSPEND_SUBSCRIPTION";
12146
+ const REACTIVATE_SUBSCRIPTION = "REACTIVATE_SUBSCRIPTION"; //========
12147
+
12148
+ const initialState$n = {
12140
12149
  email: "",
12141
12150
  username: "",
12142
12151
  password: "",
@@ -12149,10 +12158,10 @@ const initialState$m = {
12149
12158
  content: ""
12150
12159
  }
12151
12160
  };
12152
- const store$m = /*#__PURE__*/React.createContext(initialState$m);
12161
+ const store$n = /*#__PURE__*/React.createContext(initialState$n);
12153
12162
  const {
12154
- Provider: Provider$m
12155
- } = store$m;
12163
+ Provider: Provider$n
12164
+ } = store$n;
12156
12165
 
12157
12166
  const LoginContainer = ({
12158
12167
  style,
@@ -12276,7 +12285,7 @@ const LoginContainer = ({
12276
12285
  });
12277
12286
 
12278
12287
  case RESET_LOGIN_FORM:
12279
- return initialState$m;
12288
+ return initialState$n;
12280
12289
 
12281
12290
  case DISABLE_LOGIN_BUTTON:
12282
12291
  return lib_7({ ...state,
@@ -12294,12 +12303,12 @@ const LoginContainer = ({
12294
12303
  default:
12295
12304
  return state;
12296
12305
  }
12297
- }, initialState$m);
12306
+ }, initialState$n);
12298
12307
  return /*#__PURE__*/React__default['default'].createElement("div", {
12299
12308
  style: { ...style
12300
12309
  },
12301
12310
  className: `pelcro-container pelcro-login-container ${className}`
12302
- }, /*#__PURE__*/React__default['default'].createElement(Provider$m, {
12311
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$n, {
12303
12312
  value: {
12304
12313
  state,
12305
12314
  dispatch
@@ -12307,12 +12316,12 @@ const LoginContainer = ({
12307
12316
  }, children.length ? children.map((child, i) => {
12308
12317
  if (child) {
12309
12318
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
12310
- store: store$m,
12319
+ store: store$n,
12311
12320
  key: i
12312
12321
  });
12313
12322
  }
12314
12323
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
12315
- store: store$m
12324
+ store: store$n
12316
12325
  })));
12317
12326
  };
12318
12327
 
@@ -12620,7 +12629,7 @@ const LoginButton = ({
12620
12629
  buttonDisabled
12621
12630
  },
12622
12631
  dispatch
12623
- } = React.useContext(store$m);
12632
+ } = React.useContext(store$n);
12624
12633
  const {
12625
12634
  t
12626
12635
  } = useTranslation("login");
@@ -12679,15 +12688,15 @@ const LoginRequestLoginToken = ({
12679
12688
  };
12680
12689
 
12681
12690
  const LoginEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
12682
- store: store$m
12691
+ store: store$n
12683
12692
  }, props));
12684
12693
 
12685
12694
  const LoginUsername = props => /*#__PURE__*/React__default['default'].createElement(UserNameInput, Object.assign({
12686
- store: store$m
12695
+ store: store$n
12687
12696
  }, props));
12688
12697
 
12689
12698
  const LoginPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
12690
- store: store$m
12699
+ store: store$n
12691
12700
  }, props));
12692
12701
 
12693
12702
  var _path$t;
@@ -12757,15 +12766,6 @@ const AlertWithContext = ({
12757
12766
  }, otherProps), alert.content));
12758
12767
  };
12759
12768
 
12760
- function VerticalSeparator({
12761
- className = "",
12762
- ...otherProps
12763
- }) {
12764
- return /*#__PURE__*/React__default['default'].createElement("span", Object.assign({
12765
- className: `pelcro-vertical-separator ${className}`
12766
- }, otherProps));
12767
- }
12768
-
12769
12769
  var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
12770
12770
  !function(e,t){module.exports=t(React__default['default']);}(commonjsGlobal,function(e){return function(e){function t(n){if(o[n])return o[n].exports;var r=o[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var o={};return t.m=e,t.c=o,t.p="",t(0)}([function(e,t,o){e.exports=o(4);},function(e,t,o){e.exports=o(6)();},function(t,o){t.exports=e;},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e,t){return decodeURIComponent(e.replace(new RegExp("^(?:.*[&\\?]"+encodeURIComponent(t).replace(/[\.\+\*]/g,"\\$&")+"(?:\\=([^&]*))?)?.*$","i"),"$1"))};},function(e,t,o){function n(e){return e&&e.__esModule?e:{"default":e}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return !t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t);}Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(e[n]=o[n]);}return e},c=function(){function e(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n);}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}(),u=o(2),d=n(u),l=o(1),p=n(l),f=o(5),b=n(f),y=o(3),h=n(y),g=function(){var e=!1;try{e=!!(window.navigator&&window.navigator.standalone||navigator.userAgent.match("CriOS")||navigator.userAgent.match(/mobile/i));}catch(t){}return e},k=function(e){function t(){var e,o,n,s;r(this,t);for(var c=arguments.length,u=Array(c),d=0;d<c;d++)u[d]=arguments[d];return o=n=i(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(u))),n.state={isSdkLoaded:!1,isProcessing:!1},n.responseApi=function(e){window.FB.api("/me",{locale:n.props.language,fields:n.props.fields},function(t){a(t,e),n.props.callback(t);});},n.checkLoginState=function(e){n.setStateIfMounted({isProcessing:!1}),e.authResponse?n.responseApi(e.authResponse):n.props.onFailure?n.props.onFailure({status:e.status}):n.props.callback({status:e.status});},n.checkLoginAfterRefresh=function(e){"connected"===e.status?n.checkLoginState(e):window.FB.login(function(e){return n.checkLoginState(e)},!0);},n.click=function(e){if(n.state.isSdkLoaded&&!n.state.isProcessing&&!n.props.isDisabled){n.setState({isProcessing:!0});var t=n.props,o=t.scope,r=t.appId,i=t.onClick,s=t.returnScopes,a=t.responseType,c=t.redirectUri,u=t.disableMobileRedirect,d=t.authType,l=t.state;if("function"!=typeof i||(i(e),!e.defaultPrevented)){var p={client_id:r,redirect_uri:c,state:l,return_scopes:s,scope:o,response_type:a,auth_type:d};if(n.props.isMobile&&!u)window.location.href="https://www.facebook.com/dialog/oauth"+(0, b["default"])(p);else {if(!window.FB)return void(n.props.onFailure&&n.props.onFailure({status:"facebookNotLoaded"}));window.FB.login(n.checkLoginState,{scope:o,return_scopes:s,auth_type:p.auth_type});}}}},s=o,i(n,s)}return s(t,e),c(t,[{key:"componentDidMount",value:function(){if(this._isMounted=!0,document.getElementById("facebook-jssdk"))return void this.sdkLoaded();this.setFbAsyncInit(),this.loadSdkAsynchronously();var e=document.getElementById("fb-root");e||(e=document.createElement("div"),e.id="fb-root",document.body.appendChild(e));}},{key:"componentWillReceiveProps",value:function(e){this.state.isSdkLoaded&&e.autoLoad&&!this.props.autoLoad&&window.FB.getLoginStatus(this.checkLoginAfterRefresh);}},{key:"componentWillUnmount",value:function(){this._isMounted=!1;}},{key:"setStateIfMounted",value:function(e){this._isMounted&&this.setState(e);}},{key:"setFbAsyncInit",value:function(){var e=this,t=this.props,o=t.appId,n=t.xfbml,r=t.cookie,i=t.version,s=t.autoLoad;window.fbAsyncInit=function(){window.FB.init({version:"v"+i,appId:o,xfbml:n,cookie:r}),e.setStateIfMounted({isSdkLoaded:!0}),(s||e.isRedirectedFromFb())&&window.FB.getLoginStatus(e.checkLoginAfterRefresh);};}},{key:"isRedirectedFromFb",value:function(){var e=window.location.search;return (0, h["default"])(e,"code")||(0, h["default"])(e,"granted_scopes")}},{key:"sdkLoaded",value:function(){this.setState({isSdkLoaded:!0});}},{key:"loadSdkAsynchronously",value:function(){var e=this.props.language;!function(t,o,n){var r=t.getElementsByTagName(o)[0],i=r,s=r;t.getElementById(n)||(s=t.createElement(o),s.id=n,s.src="https://connect.facebook.net/"+e+"/sdk.js",i.parentNode.insertBefore(s,i));}(document,"script","facebook-jssdk");}},{key:"render",value:function o(){var o=this.props.render;if(!o)throw new Error("ReactFacebookLogin requires a render prop to render");var e={onClick:this.click,isDisabled:!!this.props.isDisabled,isProcessing:this.state.isProcessing,isSdkLoaded:this.state.isSdkLoaded};return this.props.render(e)}}]),t}(d["default"].Component);k.propTypes={isDisabled:p["default"].bool,callback:p["default"].func.isRequired,appId:p["default"].string.isRequired,xfbml:p["default"].bool,cookie:p["default"].bool,authType:p["default"].string,scope:p["default"].string,state:p["default"].string,responseType:p["default"].string,returnScopes:p["default"].bool,redirectUri:p["default"].string,autoLoad:p["default"].bool,disableMobileRedirect:p["default"].bool,isMobile:p["default"].bool,fields:p["default"].string,version:p["default"].string,language:p["default"].string,onClick:p["default"].func,onFailure:p["default"].func,render:p["default"].func.isRequired},k.defaultProps={redirectUri:"undefined"!=typeof window?window.location.href:"/",scope:"public_profile,email",returnScopes:!1,xfbml:!1,cookie:!1,authType:"",fields:"name",version:"2.3",language:"en_US",disableMobileRedirect:!1,isMobile:g(),onFailure:null,state:"facebookdirect",responseType:"code"},t["default"]=k;},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=function(e){return "?"+Object.keys(e).map(function(t){return t+"="+encodeURIComponent(e[t])}).join("&")};},function(e,t,o){function n(){}var r=o(7);e.exports=function(){function e(e,t,o,n,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var o={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return o.checkPropTypes=n,o.PropTypes=o,o};},function(e,t){var o="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=o;}])});
12771
12771
  });
@@ -12773,7 +12773,7 @@ var facebookLoginRenderProps = createCommonjsModule(function (module, exports) {
12773
12773
  var FacebookLogin = unwrapExports(facebookLoginRenderProps);
12774
12774
  facebookLoginRenderProps.FacebookLogin;
12775
12775
 
12776
- const initialState$l = {
12776
+ const initialState$m = {
12777
12777
  email: "",
12778
12778
  password: "",
12779
12779
  emailError: null,
@@ -12790,10 +12790,10 @@ const initialState$l = {
12790
12790
  content: ""
12791
12791
  }
12792
12792
  };
12793
- const store$l = /*#__PURE__*/React.createContext(initialState$l);
12793
+ const store$m = /*#__PURE__*/React.createContext(initialState$m);
12794
12794
  const {
12795
- Provider: Provider$l
12796
- } = store$l;
12795
+ Provider: Provider$m
12796
+ } = store$m;
12797
12797
 
12798
12798
  const RegisterContainer = ({
12799
12799
  style,
@@ -12984,7 +12984,7 @@ const RegisterContainer = ({
12984
12984
  });
12985
12985
 
12986
12986
  case RESET_LOGIN_FORM:
12987
- return initialState$l;
12987
+ return initialState$m;
12988
12988
 
12989
12989
  case DISABLE_REGISTRATION_BUTTON:
12990
12990
  return lib_7({ ...state,
@@ -13002,12 +13002,12 @@ const RegisterContainer = ({
13002
13002
  default:
13003
13003
  return state;
13004
13004
  }
13005
- }, initialState$l);
13005
+ }, initialState$m);
13006
13006
  return /*#__PURE__*/React__default['default'].createElement("div", {
13007
13007
  style: { ...style
13008
13008
  },
13009
13009
  className: `pelcro-container pelcro-register-container ${className}`
13010
- }, /*#__PURE__*/React__default['default'].createElement(Provider$l, {
13010
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$m, {
13011
13011
  value: {
13012
13012
  state,
13013
13013
  dispatch
@@ -13015,12 +13015,12 @@ const RegisterContainer = ({
13015
13015
  }, children.length ? children.map((child, i) => {
13016
13016
  if (child) {
13017
13017
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
13018
- store: store$l,
13018
+ store: store$m,
13019
13019
  key: i
13020
13020
  });
13021
13021
  }
13022
13022
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
13023
- store: store$l
13023
+ store: store$m
13024
13024
  })));
13025
13025
  };
13026
13026
  /**
@@ -13050,7 +13050,7 @@ function SvgFacebookLogo(props) {
13050
13050
  }
13051
13051
 
13052
13052
  const FacebookLoginButton = ({
13053
- label = "Continue With Facebook",
13053
+ label = "Facebook",
13054
13054
  className = "",
13055
13055
  labelClassName = "",
13056
13056
  iconClassName = ""
@@ -13060,10 +13060,10 @@ const FacebookLoginButton = ({
13060
13060
  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;
13061
13061
  const {
13062
13062
  dispatch: loginDispatch
13063
- } = React.useContext(store$m);
13063
+ } = React.useContext(store$n);
13064
13064
  const {
13065
13065
  dispatch: registerDispatch
13066
- } = React.useContext(store$l);
13066
+ } = React.useContext(store$m);
13067
13067
 
13068
13068
  const onSuccess = facebookUser => {
13069
13069
  loginDispatch === null || loginDispatch === void 0 ? void 0 : loginDispatch({
@@ -13219,7 +13219,7 @@ var gapi=window.gapi=window.gapi||{};gapi._bs=new Date().getTime();(function(){/
13219
13219
  gapi.load("",{callback:window["gapi_onload"],_c:{"jsl":{"ci":{"deviceType":"desktop","oauth-flow":{"authUrl":"https://accounts.google.com/o/oauth2/auth","proxyUrl":"https://accounts.google.com/o/oauth2/postmessageRelay","disableOpt":true,"idpIframeUrl":"https://accounts.google.com/o/oauth2/iframe","usegapi":false},"debug":{"reportExceptionRate":0.05,"forceIm":false,"rethrowException":false,"host":"https://apis.google.com"},"enableMultilogin":true,"googleapis.config":{"auth":{"useFirstPartyAuthV2":true}},"isPlusUser":false,"inline":{"css":1},"disableRealtimeCallback":false,"drive_share":{"skipInitCommand":true},"csi":{"rate":0.01},"client":{"cors":false},"isLoggedIn":true,"signInDeprecation":{"rate":0.0},"include_granted_scopes":true,"llang":"pt","iframes":{"youtube":{"params":{"location":["search","hash"]},"url":":socialhost:/:session_prefix:_/widget/render/youtube?usegapi\u003d1","methods":["scroll","openwindow"]},"ytsubscribe":{"url":"https://www.youtube.com/subscribe_embed?usegapi\u003d1"},"plus_circle":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/widget/plus/circle?usegapi\u003d1"},"plus_share":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/+1/sharebutton?plusShare\u003dtrue\u0026usegapi\u003d1"},"rbr_s":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/widget/render/recobarsimplescroller"},":source:":"3p","playemm":{"url":"https://play.google.com/work/embedded/search?usegapi\u003d1\u0026usegapi\u003d1"},"savetoandroidpay":{"url":"https://pay.google.com/gp/v/widget/save"},"blogger":{"params":{"location":["search","hash"]},"url":":socialhost:/:session_prefix:_/widget/render/blogger?usegapi\u003d1","methods":["scroll","openwindow"]},"evwidget":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/events/widget?usegapi\u003d1"},"partnersbadge":{"url":"https://www.gstatic.com/partners/badge/templates/badge.html?usegapi\u003d1"},"dataconnector":{"url":"https://dataconnector.corp.google.com/:session_prefix:ui/widgetview?usegapi\u003d1"},"surveyoptin":{"url":"https://www.google.com/shopping/customerreviews/optin?usegapi\u003d1"},":socialhost:":"https://apis.google.com","shortlists":{"url":""},"hangout":{"url":"https://talkgadget.google.com/:session_prefix:talkgadget/_/widget"},"plus_followers":{"params":{"url":""},"url":":socialhost:/_/im/_/widget/render/plus/followers?usegapi\u003d1"},"post":{"params":{"url":""},"url":":socialhost:/:session_prefix::im_prefix:_/widget/render/post?usegapi\u003d1"},":gplus_url:":"https://plus.google.com","signin":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/signin?usegapi\u003d1","methods":["onauth"]},"rbr_i":{"params":{"url":""},"url":":socialhost:/:session_prefix::se:_/widget/render/recobarinvitation"},"share":{"url":":socialhost:/:session_prefix::im_prefix:_/widget/render/share?usegapi\u003d1"},"plusone":{"params":{"count":"","size":"","url":""},"url":":socialhost:/:session_prefix::se:_/+1/fastbutton?usegapi\u003d1"},"comments":{"params":{"location":["search","hash"]},"url":":socialhost:/:session_prefix:_/widget/render/comments?usegapi\u003d1","methods":["scroll","openwindow"]},":im_socialhost:":"https://plus.googleapis.com","backdrop":{"url":"https://clients3.google.com/cast/chromecast/home/widget/backdrop?usegapi\u003d1"},"visibility":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/visibility?usegapi\u003d1"},"autocomplete":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/autocomplete"},"additnow":{"url":"https://apis.google.com/marketplace/button?usegapi\u003d1","methods":["launchurl"]},":signuphost:":"https://plus.google.com","ratingbadge":{"url":"https://www.google.com/shopping/customerreviews/badge?usegapi\u003d1"},"appcirclepicker":{"url":":socialhost:/:session_prefix:_/widget/render/appcirclepicker"},"follow":{"url":":socialhost:/:session_prefix:_/widget/render/follow?usegapi\u003d1"},"community":{"url":":ctx_socialhost:/:session_prefix::im_prefix:_/widget/render/community?usegapi\u003d1"},"sharetoclassroom":{"url":"https://classroom.google.com/sharewidget?usegapi\u003d1"},"ytshare":{"params":{"url":""},"url":":socialhost:/:session_prefix:_/widget/render/ytshare?usegapi\u003d1"},"plus":{"url":":socialhost:/:session_prefix:_/widget/render/badge?usegapi\u003d1"},"family_creation":{"params":{"url":""},"url":"https://families.google.com/webcreation?usegapi\u003d1\u0026usegapi\u003d1"},"commentcount":{"url":":socialhost:/:session_prefix:_/widget/render/commentcount?usegapi\u003d1"},"configurator":{"url":":socialhost:/:session_prefix:_/plusbuttonconfigurator?usegapi\u003d1"},"zoomableimage":{"url":"https://ssl.gstatic.com/microscope/embed/"},"appfinder":{"url":"https://workspace.google.com/:session_prefix:marketplace/appfinder?usegapi\u003d1"},"savetowallet":{"url":"https://pay.google.com/gp/v/widget/save"},"person":{"url":":socialhost:/:session_prefix:_/widget/render/person?usegapi\u003d1"},"savetodrive":{"url":"https://drive.google.com/savetodrivebutton?usegapi\u003d1","methods":["save"]},"page":{"url":":socialhost:/:session_prefix:_/widget/render/page?usegapi\u003d1"},"card":{"url":":socialhost:/:session_prefix:_/hovercard/card"}}},"h":"m;/_/scs/apps-static/_/js/k\u003doz.gapi.pt_BR.l4Bv_WkVC6g.O/am\u003dwQE/d\u003d1/ct\u003dzgms/rs\u003dAGLTcCOuH5S2uqmF6E8zOW7n3yiqiwhzNQ/m\u003d__features__","u":"https://apis.google.com/js/platform.js","hee":true,"fp":"821a251b140e4add32f87f4a7a08f044a59aa0e9","dpo":false},"platform":["additnow","backdrop","blogger","comments","commentcount","community","donation","family_creation","follow","hangout","health","page","partnersbadge","person","playemm","playreview","plus","plusone","post","ratingbadge","savetoandroidpay","savetodrive","savetowallet","sharetoclassroom","shortlists","signin2","surveyoptin","visibility","youtube","ytsubscribe","zoomableimage"],"fp":"821a251b140e4add32f87f4a7a08f044a59aa0e9","annotation":["interactivepost","recobar","signin2","autocomplete","profile"],"bimodal":["signin","share"]}});
13220
13220
 
13221
13221
  const GoogleLoginButton = ({
13222
- label = "Continue With Google",
13222
+ label = "Google",
13223
13223
  className = "",
13224
13224
  labelClassName = "",
13225
13225
  iconClassName = ""
@@ -13229,10 +13229,10 @@ const GoogleLoginButton = ({
13229
13229
  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;
13230
13230
  const {
13231
13231
  dispatch: loginDispatch
13232
- } = React.useContext(store$m);
13232
+ } = React.useContext(store$n);
13233
13233
  const {
13234
13234
  dispatch: registerDispatch
13235
- } = React.useContext(store$l);
13235
+ } = React.useContext(store$m);
13236
13236
  React.useEffect(() => {
13237
13237
  gapi.load("client:auth2", () => {
13238
13238
  gapi.auth2.init({
@@ -13302,7 +13302,7 @@ function SvgAuth0Logo(props) {
13302
13302
  }
13303
13303
 
13304
13304
  const Auth0LoginButton = ({
13305
- label = "Continue With Auth0",
13305
+ label = "Auth0",
13306
13306
  className = "",
13307
13307
  labelClassName = "",
13308
13308
  iconClassName = ""
@@ -13336,10 +13336,10 @@ const Auth0LoginButton = ({
13336
13336
  }, [auth0Enabled, auth0Loaded]);
13337
13337
  const {
13338
13338
  dispatch: loginDispatch
13339
- } = React.useContext(store$m);
13339
+ } = React.useContext(store$n);
13340
13340
  const {
13341
13341
  dispatch: registerDispatch
13342
- } = React.useContext(store$l);
13342
+ } = React.useContext(store$m);
13343
13343
 
13344
13344
  function handleClick() {
13345
13345
  var _auth0InstanceRef$cur, _auth0InstanceRef$cur2, _auth0InstanceRef$cur3;
@@ -13439,7 +13439,8 @@ function LoginView(props) {
13439
13439
  const {
13440
13440
  t
13441
13441
  } = useTranslation("login");
13442
- const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
13442
+ const auth0LoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.auth0_client_id;
13443
+ const socialLoginEnabled = ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.facebook_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.google_app_id) || auth0LoginEnabled;
13443
13444
  const passwordlessEnabled = (_window$Pelcro$site$r4 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r4 === void 0 ? void 0 : _window$Pelcro$site$r4.passwordless_enabled;
13444
13445
  const enableLoginWithUsername = (_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.enableLoginWithUsername;
13445
13446
  return /*#__PURE__*/React__default['default'].createElement("div", {
@@ -13449,23 +13450,17 @@ function LoginView(props) {
13449
13450
  className: "plc-mt-2 pelcro-form"
13450
13451
  }, /*#__PURE__*/React__default['default'].createElement(LoginContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), socialLoginEnabled && /*#__PURE__*/React__default['default'].createElement("div", {
13451
13452
  className: "plc-my-5"
13452
- }, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
13453
- className: "plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center"
13454
- }, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, {
13455
- className: "plc-block sm:plc-flex plc-w-full sm:plc-w-auto plc-mb-4 sm:plc-mb-0"
13456
- }), /*#__PURE__*/React__default['default'].createElement(VerticalSeparator, {
13457
- className: "plc-hidden sm:plc-inline-grid plc-mx-2 plc-h-8"
13458
- }), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, {
13459
- className: "plc-block sm:plc-flex plc-w-full sm:plc-w-auto"
13460
- })), /*#__PURE__*/React__default['default'].createElement("div", {
13461
- className: "plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center plc-mt-4"
13462
- }, /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, {
13463
- className: `plc-block sm:plc-flex plc-w-full sm:plc-w-auto plc-mb-4 sm:plc-mb-0 ${passwordlessEnabled ? "plc-flex-1" : "plc-w-1/2"}`
13464
- }), passwordlessEnabled && /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(VerticalSeparator, {
13465
- className: "plc-hidden sm:plc-inline-grid plc-mx-2 plc-h-8"
13466
- }), /*#__PURE__*/React__default['default'].createElement(LoginRequestLoginToken, {
13453
+ }, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("ul", {
13454
+ className: `${auth0LoginEnabled && !passwordlessEnabled || !auth0LoginEnabled && passwordlessEnabled ? "threeColumns" : "twoColumns"} loginOptions plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center`
13455
+ }, /*#__PURE__*/React__default['default'].createElement("li", null, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, {
13456
+ className: "plc-flex plc-w-full"
13457
+ })), /*#__PURE__*/React__default['default'].createElement("li", null, /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, {
13458
+ className: "plc-flex plc-w-full"
13459
+ })), auth0LoginEnabled && /*#__PURE__*/React__default['default'].createElement("li", null, /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, {
13460
+ className: "plc-flex plc-w-full"
13461
+ })), passwordlessEnabled && /*#__PURE__*/React__default['default'].createElement("li", null, /*#__PURE__*/React__default['default'].createElement(LoginRequestLoginToken, {
13467
13462
  onClick: props.onPasswordlessRequest,
13468
- className: "paswordlessButton plc-block sm:plc-flex plc-w-full sm:plc-w-auto"
13463
+ className: "plc-flex plc-w-full"
13469
13464
  })))), /*#__PURE__*/React__default['default'].createElement("div", {
13470
13465
  className: "plc-flex plc-items-center plc-justify-between plc-mt-5"
13471
13466
  }, /*#__PURE__*/React__default['default'].createElement("hr", {
@@ -13719,11 +13714,11 @@ function LoginModal({
13719
13714
  LoginModal.viewId = "login";
13720
13715
 
13721
13716
  const RegisterEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
13722
- store: store$l
13717
+ store: store$m
13723
13718
  }, props));
13724
13719
 
13725
13720
  const RegisterPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
13726
- store: store$l
13721
+ store: store$m
13727
13722
  }, props));
13728
13723
 
13729
13724
  const RegisterButton = ({
@@ -13743,7 +13738,7 @@ const RegisterButton = ({
13743
13738
  buttonDisabled
13744
13739
  },
13745
13740
  dispatch
13746
- } = React.useContext(store$l);
13741
+ } = React.useContext(store$m);
13747
13742
  const {
13748
13743
  t
13749
13744
  } = useTranslation("register");
@@ -13881,7 +13876,7 @@ function FirstName({
13881
13876
  }
13882
13877
 
13883
13878
  const RegisterFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
13884
- store: store$l
13879
+ store: store$m
13885
13880
  }, props));
13886
13881
 
13887
13882
  function LastName({
@@ -13912,7 +13907,7 @@ function LastName({
13912
13907
  }
13913
13908
 
13914
13909
  const RegisterLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
13915
- store: store$l
13910
+ store: store$m
13916
13911
  }, props));
13917
13912
 
13918
13913
  /**
@@ -13926,7 +13921,8 @@ function RegisterView(props) {
13926
13921
  t
13927
13922
  } = useTranslation("register");
13928
13923
  usePelcro();
13929
- const socialLoginEnabled = ((_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.facebook_app_id) || ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.google_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.auth0_client_id);
13924
+ const auth0LoginEnabled = (_window$Pelcro$site$r = window.Pelcro.site.read()) === null || _window$Pelcro$site$r === void 0 ? void 0 : _window$Pelcro$site$r.auth0_client_id;
13925
+ const socialLoginEnabled = ((_window$Pelcro$site$r2 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r2 === void 0 ? void 0 : _window$Pelcro$site$r2.facebook_app_id) || ((_window$Pelcro$site$r3 = window.Pelcro.site.read()) === null || _window$Pelcro$site$r3 === void 0 ? void 0 : _window$Pelcro$site$r3.google_app_id) || auth0LoginEnabled;
13930
13926
  const showNameFields = (_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.enableNameFieldsInRegister;
13931
13927
  return /*#__PURE__*/React__default['default'].createElement("div", {
13932
13928
  id: "pelcro-register-view"
@@ -13935,19 +13931,15 @@ function RegisterView(props) {
13935
13931
  className: "plc-mt-2 pelcro-form"
13936
13932
  }, /*#__PURE__*/React__default['default'].createElement(RegisterContainer, props, /*#__PURE__*/React__default['default'].createElement(AlertWithContext, null), socialLoginEnabled && /*#__PURE__*/React__default['default'].createElement("div", {
13937
13933
  className: "plc-my-5"
13938
- }, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("div", {
13939
- className: "plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center"
13940
- }, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, {
13941
- className: "plc-block sm:plc-flex plc-w-full sm:plc-w-auto plc-mb-4 sm:plc-mb-0"
13942
- }), /*#__PURE__*/React__default['default'].createElement(VerticalSeparator, {
13943
- className: "plc-hidden sm:plc-inline-grid plc-mx-2 plc-h-8"
13944
- }), /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, {
13945
- className: "plc-block sm:plc-flex plc-w-full sm:plc-w-auto"
13946
- })), /*#__PURE__*/React__default['default'].createElement("div", {
13947
- className: "plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center plc-mt-4"
13948
- }, /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, {
13949
- className: "plc-block sm:plc-flex plc-w-full sm:plc-w-1/2 plc-mb-4 sm:plc-mb-0"
13950
- }))), /*#__PURE__*/React__default['default'].createElement("div", {
13934
+ }, /*#__PURE__*/React__default['default'].createElement("div", null, /*#__PURE__*/React__default['default'].createElement("ul", {
13935
+ className: `${auth0LoginEnabled ? "threeColumns" : "twoColumns"} loginOptions plc-block sm:plc-flex plc-flex-col sm:plc-flex-row plc-justify-center plc-flex-wrap plc-items-center`
13936
+ }, /*#__PURE__*/React__default['default'].createElement("li", null, /*#__PURE__*/React__default['default'].createElement(GoogleLoginButton, {
13937
+ className: "plc-flex plc-w-full"
13938
+ })), /*#__PURE__*/React__default['default'].createElement("li", null, /*#__PURE__*/React__default['default'].createElement(FacebookLoginButton, {
13939
+ className: "plc-flex plc-w-full"
13940
+ })), auth0LoginEnabled && /*#__PURE__*/React__default['default'].createElement("li", null, /*#__PURE__*/React__default['default'].createElement(Auth0LoginButton, {
13941
+ className: "plc-flex plc-w-full"
13942
+ })))), /*#__PURE__*/React__default['default'].createElement("div", {
13951
13943
  className: "plc-flex plc-items-center plc-justify-between plc-mt-5"
13952
13944
  }, /*#__PURE__*/React__default['default'].createElement("hr", {
13953
13945
  className: "plc-w-full plc-border-gray-300"
@@ -14038,7 +14030,7 @@ function TextInput({
14038
14030
 
14039
14031
  const RegisterTextInput = props => {
14040
14032
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
14041
- store: store$l
14033
+ store: store$m
14042
14034
  }));
14043
14035
  };
14044
14036
 
@@ -18872,26 +18864,26 @@ const NextArrow = ({
18872
18864
  onClick,
18873
18865
  className
18874
18866
  }) => /*#__PURE__*/React__default['default'].createElement("button", {
18875
- className: `sm:plc-flex plc-hidden plc-text-white plc-w-11 plc-h-11 plc-bg-primary plc-items-center plc-justify-center plc-rounded-full plc-text-sm plc-absolute plc-top-1/2 plc--right-16 plc-transform plc--translate-y-1/2 plc-border plc-border-primary hover:plc-bg-white hover:plc-text-primary ${className}`,
18867
+ className: `sm:plc-flex plc-hidden plc-text-gray-500 plc-w-11 plc-h-11 plc-items-center plc-justify-center plc-rounded-full plc-text-sm plc-absolute plc-top-1/2 plc--right-12 plc-transform plc--translate-y-1/2 hover:plc-text-gray-900 ${className}`,
18876
18868
  onClick: onClick
18877
18869
  }, /*#__PURE__*/React__default['default'].createElement(SvgArrowThinRight, {
18878
18870
  stroke: "currentColor",
18879
18871
  "aria-hidden": "true",
18880
18872
  focusable: "false",
18881
- className: "plc-h-5 plc-w-5"
18873
+ className: "plc-h-7 plc-w-7"
18882
18874
  }));
18883
18875
 
18884
18876
  const PrevArrow = ({
18885
18877
  onClick,
18886
18878
  className
18887
18879
  }) => /*#__PURE__*/React__default['default'].createElement("button", {
18888
- className: `sm:plc-flex plc-hidden plc-text-white plc-w-11 plc-h-11 plc-bg-primary plc-items-center plc-justify-center plc-rounded-full plc-text-sm plc-absolute plc-top-1/2 plc--left-16 plc-transform plc--translate-y-1/2 plc-border plc-border-primary hover:plc-bg-white hover:plc-text-primary ${className}`,
18880
+ className: `sm:plc-flex plc-hidden plc-text-gray-500 plc-w-11 plc-h-11 plc-items-center plc-justify-center plc-rounded-full plc-text-sm plc-absolute plc-top-1/2 plc--left-12 plc-transform plc--translate-y-1/2 hover:plc-text-gray-900 ${className}`,
18889
18881
  onClick: onClick
18890
18882
  }, /*#__PURE__*/React__default['default'].createElement(SvgArrowThinLeft, {
18891
18883
  stroke: "currentColor",
18892
18884
  "aria-hidden": "true",
18893
18885
  focusable: "false",
18894
- className: "plc-h-5 plc-w-5"
18886
+ className: "plc-h-7 plc-w-7"
18895
18887
  }));
18896
18888
 
18897
18889
  function Carousel({
@@ -18927,7 +18919,7 @@ function Carousel({
18927
18919
  }]
18928
18920
  };
18929
18921
  return /*#__PURE__*/React__default['default'].createElement("div", {
18930
- className: "carousel-wrapper plc-relative sm:plc-px-16 plc-px-0"
18922
+ className: "carousel-wrapper plc-relative sm:plc-px-8 plc-px-0"
18931
18923
  }, /*#__PURE__*/React__default['default'].createElement(Slider, Object.assign({
18932
18924
  ref: ref
18933
18925
  }, settings), children));
@@ -19158,9 +19150,9 @@ class SelectModal extends React.Component {
19158
19150
  description
19159
19151
  } = this.state.product;
19160
19152
  return /*#__PURE__*/React__default['default'].createElement("div", {
19161
- className: "productTabs"
19153
+ className: "productTabs plc-flex plc-flex-col plc-items-center"
19162
19154
  }, /*#__PURE__*/React__default['default'].createElement("ul", {
19163
- className: "tabs plc-flex plc-items-center plc-text-center plc-border-b plc-border-gray-300 plc-mb-4 plc-overflow-x-auto"
19155
+ className: "tabs plc-w-full plc-flex plc-items-center plc-text-center plc-border-b plc-border-gray-300 plc-mb-4 plc-overflow-x-auto"
19164
19156
  }, this.state.productList.map((product, index) => {
19165
19157
  var _this$state$product;
19166
19158
 
@@ -19174,7 +19166,7 @@ class SelectModal extends React.Component {
19174
19166
  className: "plc-px-4 plc-py-2 plc-rounded plc-text-gray-600 focus:plc-outline-none plc-whitespace-nowrap"
19175
19167
  }, product.name));
19176
19168
  })), /*#__PURE__*/React__default['default'].createElement("div", {
19177
- className: "selectedProduct plc-flex plc-flex-col plc-items-center plc-justify-center"
19169
+ className: "selectedProduct plc-flex plc-flex-col plc-items-center plc-justify-center plc-max-w-3xl"
19178
19170
  }, image && /*#__PURE__*/React__default['default'].createElement("figure", {
19179
19171
  className: "plc-mb-2"
19180
19172
  }, /*#__PURE__*/React__default['default'].createElement("img", {
@@ -19225,7 +19217,7 @@ class SelectModal extends React.Component {
19225
19217
  const isChecked = this.state.plan.id === plan.id ? true : false;
19226
19218
  return /*#__PURE__*/React__default['default'].createElement("div", {
19227
19219
  key: plan.id,
19228
- className: `${((_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.plan.id) === plan.id ? "plc-border-2 plc-border-primary-800" : "plc-border plc-border-gray-300"} plc-h-full plc-flex plc-flex-col plc-items-start plc-text-gray-900 plc-border-solid plc-rounded-md plc-bg-white pelcro-select-plan-wrapper`
19220
+ className: `${((_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.plan.id) === plan.id ? "plc-border-2 plc-border-primary" : "plc-border plc-border-gray-300"} plc-h-full plc-flex plc-flex-col plc-items-start plc-text-gray-900 plc-border-solid plc-rounded-md plc-bg-white pelcro-select-plan-wrapper`
19229
19221
  }, /*#__PURE__*/React__default['default'].createElement(Radio, {
19230
19222
  wrapperClassName: "plc-w-full plc-flex plc-h-full",
19231
19223
  className: "plc-hidden pelcro-select-plan-radio",
@@ -19236,13 +19228,13 @@ class SelectModal extends React.Component {
19236
19228
  "data-key": plan.id,
19237
19229
  onChange: this.selectPlan
19238
19230
  }, /*#__PURE__*/React__default['default'].createElement("div", {
19239
- className: "plc-p-4 plc-text-center plc-flex plc-flex-col plc-justify-center plc-items-center plc-w-full plc-border-b plc-border-gray-300"
19231
+ className: "plc-p-4 plc-text-center plc-flex plc-flex-col plc-justify-center plc-items-center plc-w-full"
19240
19232
  }, /*#__PURE__*/React__default['default'].createElement("h4", {
19241
19233
  className: "pelcro-select-plan-title plc-font-medium plc-text-xl plc-break-all"
19242
19234
  }, plan.nickname), /*#__PURE__*/React__default['default'].createElement("p", {
19243
19235
  className: "plc-text-sm plc-mt-1 pelcro-select-plan-description plc-text-gray-400"
19244
19236
  }, plan.description)), /*#__PURE__*/React__default['default'].createElement("div", {
19245
- className: "plc-mt-auto plc-px-4 plc-mb-4"
19237
+ className: "plc-mt-auto plc-px-4 plc-mb-4 plc-border-t plc-border-gray-300"
19246
19238
  }, /*#__PURE__*/React__default['default'].createElement("div", {
19247
19239
  className: "plc-pt-4 plc-mb-4 plc-font-semibold pelcro-select-plan-price plc-px-4 plc-text-center plc-flex plc-items-end plc-justify-center"
19248
19240
  }, /*#__PURE__*/React__default['default'].createElement("p", {
@@ -19254,7 +19246,7 @@ class SelectModal extends React.Component {
19254
19246
  }, plan.currency), /*#__PURE__*/React__default['default'].createElement("span", {
19255
19247
  className: "plc-capitalize"
19256
19248
  }, "/ ", plan.interval))), /*#__PURE__*/React__default['default'].createElement("div", {
19257
- className: `${((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.plan.id) === plan.id ? "plc-bg-primary-800 plc-text-white" : "plc-text-primary-800"} plc-flex plc-items-center plc-justify-center plc-text-center plc-py-2 plc-px-4 plc-w-full plc-border-2 plc-rounded-md plc-border-primary-800`
19249
+ className: `${((_this$state2 = this.state) === null || _this$state2 === void 0 ? void 0 : _this$state2.plan.id) === plan.id ? "plc-bg-primary plc-text-white" : "plc-text-primary-800"} plc-flex plc-items-center plc-justify-center plc-text-center plc-py-2 plc-px-4 plc-w-full plc-border-2 plc-rounded-md plc-border-primary`
19258
19250
  }, this.locale("buttons.select")))));
19259
19251
  });
19260
19252
  return /*#__PURE__*/React__default['default'].createElement(Carousel, {
@@ -19409,7 +19401,7 @@ class SelectModal extends React.Component {
19409
19401
  }, this.state.mode === "plan" && /*#__PURE__*/React__default['default'].createElement("button", {
19410
19402
  type: "button",
19411
19403
  onClick: this.goBack,
19412
- className: "plc-absolute plc-w-6 plc-text-gray-500 focus:plc-text-black plc-z-max plc-top-1/2 plc-left-5 plc-transform plc--translate-y-1/2 plc-border-0 hover:plc-text-black hover:plc-shadow-none plc-bg-transparent hover:plc-bg-transparent focus:plc-bg-transparent"
19404
+ className: "plc-absolute plc-w-6 plc-text-gray-500 focus:plc-text-black plc-z-max plc-top-1/2 plc-left-2 sm:plc-left-5 plc-transform plc--translate-y-1/2 plc-border-0 hover:plc-text-black hover:plc-shadow-none plc-bg-transparent hover:plc-bg-transparent focus:plc-bg-transparent"
19413
19405
  }, /*#__PURE__*/React__default['default'].createElement(SvgArrowLeft, null)), /*#__PURE__*/React__default['default'].createElement("h4", {
19414
19406
  className: "plc-text-2xl plc-font-semibold"
19415
19407
  }, this.product && this.product.paywall.select_title || ((_window$Pelcro$produc2 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc2 === void 0 ? void 0 : _window$Pelcro$produc2.paywall.select_title)), /*#__PURE__*/React__default['default'].createElement("p", null, this.product && this.product.paywall.select_subtitle || ((_window$Pelcro$produc3 = window.Pelcro.product.list()[0]) === null || _window$Pelcro$produc3 === void 0 ? void 0 : _window$Pelcro$produc3.paywall.select_subtitle)))), /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement("div", {
@@ -19428,7 +19420,7 @@ class SelectModal extends React.Component {
19428
19420
  disabled: this.state.disabled,
19429
19421
  onClick: this.submitOption,
19430
19422
  id: "pelcro-submit",
19431
- className: "plc-w-full plc-mt-2"
19423
+ className: "plc-mt-2 plc-w-full plc-max-w-sm plc-ml-auto plc-mr-auto plc-block"
19432
19424
  }, this.locale("buttons.next"))))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, !window.Pelcro.user.isAuthenticated() && /*#__PURE__*/React__default['default'].createElement("p", {
19433
19425
  className: "plc-mb-9"
19434
19426
  }, /*#__PURE__*/React__default['default'].createElement("span", {
@@ -21506,7 +21498,7 @@ class TapGateway {
21506
21498
 
21507
21499
  /** @type {PaymentStateType} */
21508
21500
 
21509
- const initialState$k = {
21501
+ const initialState$l = {
21510
21502
  disableSubmit: false,
21511
21503
  isLoading: false,
21512
21504
  disableCouponButton: false,
@@ -21531,10 +21523,10 @@ const initialState$k = {
21531
21523
  content: ""
21532
21524
  }
21533
21525
  };
21534
- const store$k = /*#__PURE__*/React.createContext(initialState$k);
21526
+ const store$l = /*#__PURE__*/React.createContext(initialState$l);
21535
21527
  const {
21536
- Provider: Provider$k
21537
- } = store$k;
21528
+ Provider: Provider$l
21529
+ } = store$l;
21538
21530
 
21539
21531
  const PaymentMethodContainerWithoutStripe = ({
21540
21532
  style,
@@ -23217,21 +23209,21 @@ const PaymentMethodContainerWithoutStripe = ({
23217
23209
  default:
23218
23210
  return state;
23219
23211
  }
23220
- }, initialState$k);
23212
+ }, initialState$l);
23221
23213
  return /*#__PURE__*/React__default['default'].createElement("div", {
23222
23214
  style: { ...style
23223
23215
  },
23224
23216
  className: `pelcro-container pelcro-payment-container ${className}`
23225
- }, /*#__PURE__*/React__default['default'].createElement(Provider$k, {
23217
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$l, {
23226
23218
  value: {
23227
23219
  state,
23228
23220
  dispatch
23229
23221
  }
23230
23222
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
23231
- store: store$k,
23223
+ store: store$l,
23232
23224
  key: i
23233
23225
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
23234
- store: store$k
23226
+ store: store$l
23235
23227
  })));
23236
23228
  };
23237
23229
 
@@ -23259,11 +23251,11 @@ const PaymentMethodContainer = props => {
23259
23251
  stripeAccount: window.Pelcro.site.read().account_id,
23260
23252
  locale: getPageOrDefaultLanguage()
23261
23253
  }, /*#__PURE__*/React__default['default'].createElement(es_11, null, /*#__PURE__*/React__default['default'].createElement(UnwrappedForm, Object.assign({
23262
- store: store$k
23254
+ store: store$l
23263
23255
  }, props))));
23264
23256
  } else {
23265
23257
  return /*#__PURE__*/React__default['default'].createElement(PaymentMethodContainerWithoutStripe, Object.assign({
23266
- store: store$k
23258
+ store: store$l
23267
23259
  }, props));
23268
23260
  }
23269
23261
  };
@@ -23314,7 +23306,7 @@ const PelcroPaymentRequestButton = props => {
23314
23306
  currentPlan,
23315
23307
  updatedPrice
23316
23308
  }
23317
- } = React.useContext(store$k);
23309
+ } = React.useContext(store$l);
23318
23310
 
23319
23311
  const updatePaymentRequest = () => {
23320
23312
  // Make sure payment request is up to date, eg. user added a coupon code.
@@ -23396,7 +23388,7 @@ const DiscountedPrice = props => {
23396
23388
  taxAmount,
23397
23389
  percentOff
23398
23390
  }
23399
- } = React.useContext(store$k);
23391
+ } = React.useContext(store$l);
23400
23392
  const {
23401
23393
  order,
23402
23394
  plan
@@ -23446,7 +23438,7 @@ const SubmitPaymentMethod = ({
23446
23438
  isLoading,
23447
23439
  updatedPrice
23448
23440
  }
23449
- } = React.useContext(store$k);
23441
+ } = React.useContext(store$l);
23450
23442
  const planQuantity = (_plan$quantity = plan === null || plan === void 0 ? void 0 : plan.quantity) !== null && _plan$quantity !== void 0 ? _plan$quantity : 1;
23451
23443
  const price = updatedPrice !== null && updatedPrice !== void 0 ? updatedPrice : plan === null || plan === void 0 ? void 0 : plan.amount;
23452
23444
  const priceFormatted = getFormattedPriceByLocal(price * planQuantity, plan === null || plan === void 0 ? void 0 : plan.currency, getPageOrDefaultLanguage());
@@ -23478,7 +23470,7 @@ const ApplyCouponButton = ({
23478
23470
  disableCouponButton
23479
23471
  },
23480
23472
  dispatch
23481
- } = React.useContext(store$k);
23473
+ } = React.useContext(store$l);
23482
23474
  const {
23483
23475
  t
23484
23476
  } = useTranslation("checkoutForm");
@@ -23512,7 +23504,7 @@ const CouponCodeField = props => {
23512
23504
  couponCode,
23513
23505
  couponError
23514
23506
  }
23515
- } = React.useContext(store$k);
23507
+ } = React.useContext(store$l);
23516
23508
 
23517
23509
  const onCouponCodeChange = e => {
23518
23510
  dispatch({
@@ -23568,7 +23560,7 @@ const CouponCode = ({
23568
23560
  state: {
23569
23561
  enableCouponField
23570
23562
  }
23571
- } = React.useContext(store$k);
23563
+ } = React.useContext(store$l);
23572
23564
  const {
23573
23565
  t
23574
23566
  } = useTranslation("checkoutForm");
@@ -23825,7 +23817,7 @@ const PaypalSubscribeButton = props => {
23825
23817
  const {
23826
23818
  dispatch,
23827
23819
  state
23828
- } = React.useContext(store$k);
23820
+ } = React.useContext(store$l);
23829
23821
  const {
23830
23822
  product,
23831
23823
  plan,
@@ -23958,7 +23950,7 @@ const SelectedPaymentMethod = () => {
23958
23950
  state: {
23959
23951
  isLoading
23960
23952
  }
23961
- } = React.useContext(store$k);
23953
+ } = React.useContext(store$l);
23962
23954
  const {
23963
23955
  switchView,
23964
23956
  selectedPaymentMethodId
@@ -24000,7 +23992,7 @@ const TaxAmount = () => {
24000
23992
  state: {
24001
23993
  taxAmount
24002
23994
  }
24003
- } = React.useContext(store$k);
23995
+ } = React.useContext(store$l);
24004
23996
  const {
24005
23997
  plan
24006
23998
  } = usePelcro();
@@ -24019,11 +24011,11 @@ const TaxAmount = () => {
24019
24011
  };
24020
24012
 
24021
24013
  const IncludeFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
24022
- store: store$k
24014
+ store: store$l
24023
24015
  }, props));
24024
24016
 
24025
24017
  const IncludeLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
24026
- store: store$k
24018
+ store: store$l
24027
24019
  }, props));
24028
24020
 
24029
24021
  function Phone({
@@ -24052,7 +24044,7 @@ function Phone({
24052
24044
  }
24053
24045
 
24054
24046
  const IncludePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
24055
- store: store$k
24047
+ store: store$l
24056
24048
  }, props));
24057
24049
 
24058
24050
  const SubscriptionCreateFreePlanButton = ({
@@ -24065,7 +24057,7 @@ const SubscriptionCreateFreePlanButton = ({
24065
24057
  disableSubmit
24066
24058
  },
24067
24059
  dispatch
24068
- } = React.useContext(store$k);
24060
+ } = React.useContext(store$l);
24069
24061
  const {
24070
24062
  t
24071
24063
  } = useTranslation("common");
@@ -24281,13 +24273,13 @@ function SubscriptionRenewModal({
24281
24273
  }
24282
24274
  SubscriptionRenewModal.viewId = "subscription-renew";
24283
24275
 
24284
- const initialState$j = {
24276
+ const initialState$k = {
24285
24277
  cancelationReason: ""
24286
24278
  };
24287
- const store$j = /*#__PURE__*/React.createContext(initialState$j);
24279
+ const store$k = /*#__PURE__*/React.createContext(initialState$k);
24288
24280
  const {
24289
- Provider: Provider$j
24290
- } = store$j;
24281
+ Provider: Provider$k
24282
+ } = store$k;
24291
24283
 
24292
24284
  const SubscriptionCancelContainer = ({
24293
24285
  style,
@@ -24308,21 +24300,21 @@ const SubscriptionCancelContainer = ({
24308
24300
  default:
24309
24301
  return state;
24310
24302
  }
24311
- }, initialState$j);
24303
+ }, initialState$k);
24312
24304
  return /*#__PURE__*/React__default['default'].createElement("div", {
24313
24305
  style: { ...style
24314
24306
  },
24315
24307
  className: `pelcro-container pelcro-subscription-cancel-container ${className}`
24316
- }, /*#__PURE__*/React__default['default'].createElement(Provider$j, {
24308
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$k, {
24317
24309
  value: {
24318
24310
  state,
24319
24311
  dispatch
24320
24312
  }
24321
24313
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
24322
- store: store$j,
24314
+ store: store$k,
24323
24315
  key: i
24324
24316
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
24325
- store: store$j
24317
+ store: store$k
24326
24318
  })));
24327
24319
  };
24328
24320
 
@@ -24407,7 +24399,7 @@ const SubscriptionCancelReason = props => {
24407
24399
  const {
24408
24400
  dispatch,
24409
24401
  state
24410
- } = React.useContext(store$j);
24402
+ } = React.useContext(store$k);
24411
24403
 
24412
24404
  const handleOnTextAreaBlur = e => {
24413
24405
  dispatch({
@@ -24455,7 +24447,7 @@ const SubscriptionCancelNowButton = ({
24455
24447
  cancelationReason
24456
24448
  },
24457
24449
  dispatch
24458
- } = React.useContext(store$j);
24450
+ } = React.useContext(store$k);
24459
24451
  const {
24460
24452
  t
24461
24453
  } = useTranslation("subscriptionCancel");
@@ -24527,7 +24519,7 @@ const SubscriptionCancelLaterButton = ({
24527
24519
  cancelationReason
24528
24520
  },
24529
24521
  dispatch
24530
- } = React.useContext(store$j);
24522
+ } = React.useContext(store$k);
24531
24523
  const {
24532
24524
  t
24533
24525
  } = useTranslation("subscriptionCancel");
@@ -24638,14 +24630,14 @@ const SubscriptionCancelModal = ({
24638
24630
  };
24639
24631
  SubscriptionCancelModal.viewId = "subscription-cancel";
24640
24632
 
24641
- const initialState$i = {
24633
+ const initialState$j = {
24642
24634
  suspendDate: null,
24643
24635
  buttonDisabled: false
24644
24636
  };
24645
- const store$i = /*#__PURE__*/React.createContext(initialState$i);
24637
+ const store$j = /*#__PURE__*/React.createContext(initialState$j);
24646
24638
  const {
24647
- Provider: Provider$i
24648
- } = store$i;
24639
+ Provider: Provider$j
24640
+ } = store$j;
24649
24641
 
24650
24642
  const SubscriptionSuspendContainer = ({
24651
24643
  style,
@@ -24671,21 +24663,21 @@ const SubscriptionSuspendContainer = ({
24671
24663
  default:
24672
24664
  return state;
24673
24665
  }
24674
- }, initialState$i);
24666
+ }, initialState$j);
24675
24667
  return /*#__PURE__*/React__default['default'].createElement("div", {
24676
24668
  style: { ...style
24677
24669
  },
24678
24670
  className: `pelcro-container pelcro-subscription-suspend-container ${className}`
24679
- }, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
24671
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$j, {
24680
24672
  value: {
24681
24673
  state,
24682
24674
  dispatch
24683
24675
  }
24684
24676
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
24685
- store: store$i,
24677
+ store: store$j,
24686
24678
  key: i
24687
24679
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
24688
- store: store$i
24680
+ store: store$j
24689
24681
  })));
24690
24682
  };
24691
24683
 
@@ -24734,7 +24726,7 @@ const SubscriptionSuspendDate = props => {
24734
24726
  const {
24735
24727
  dispatch,
24736
24728
  state
24737
- } = React.useContext(store$i);
24729
+ } = React.useContext(store$j);
24738
24730
 
24739
24731
  const handleInputChange = value => {
24740
24732
  if (value) {
@@ -24776,7 +24768,7 @@ const SubscriptionSuspendButton = ({
24776
24768
  buttonDisabled
24777
24769
  },
24778
24770
  dispatch
24779
- } = React.useContext(store$i);
24771
+ } = React.useContext(store$j);
24780
24772
  const {
24781
24773
  t
24782
24774
  } = useTranslation("subscriptionSuspend");
@@ -25246,7 +25238,7 @@ class DefaultNewsLetter extends React.Component {
25246
25238
 
25247
25239
  const NewsLetter = withTranslation("newsletter")(DefaultNewsLetter);
25248
25240
 
25249
- const initialState$h = {
25241
+ const initialState$i = {
25250
25242
  didSubToNewslettersBefore: false,
25251
25243
  newsletters: [],
25252
25244
  isListLoading: true,
@@ -25256,10 +25248,10 @@ const initialState$h = {
25256
25248
  content: ""
25257
25249
  }
25258
25250
  };
25259
- const store$h = /*#__PURE__*/React.createContext(initialState$h);
25251
+ const store$i = /*#__PURE__*/React.createContext(initialState$i);
25260
25252
  const {
25261
- Provider: Provider$h
25262
- } = store$h;
25253
+ Provider: Provider$i
25254
+ } = store$i;
25263
25255
 
25264
25256
  const NewsletterUpdateContainer = ({
25265
25257
  style,
@@ -25372,7 +25364,7 @@ const NewsletterUpdateContainer = ({
25372
25364
  default:
25373
25365
  return state;
25374
25366
  }
25375
- }, initialState$h);
25367
+ }, initialState$i);
25376
25368
  React.useEffect(() => {
25377
25369
  const getUserNewsletters = () => {
25378
25370
  var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
@@ -25416,7 +25408,7 @@ const NewsletterUpdateContainer = ({
25416
25408
  style: { ...style
25417
25409
  },
25418
25410
  className: `pelcro-container pelcro-newsletter-update-container ${className}`
25419
- }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
25411
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$i, {
25420
25412
  value: {
25421
25413
  state,
25422
25414
  dispatch
@@ -25424,12 +25416,12 @@ const NewsletterUpdateContainer = ({
25424
25416
  }, children.length ? children.map((child, i) => {
25425
25417
  if (child) {
25426
25418
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
25427
- store: store$h,
25419
+ store: store$i,
25428
25420
  key: i
25429
25421
  });
25430
25422
  }
25431
25423
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25432
- store: store$h
25424
+ store: store$i
25433
25425
  })));
25434
25426
  };
25435
25427
 
@@ -25444,7 +25436,7 @@ const NewsletterUpdateButton = ({
25444
25436
  isSubmitting,
25445
25437
  isListLoading
25446
25438
  }
25447
- } = React.useContext(store$h);
25439
+ } = React.useContext(store$i);
25448
25440
  const {
25449
25441
  t
25450
25442
  } = useTranslation("newsletter");
@@ -25474,7 +25466,7 @@ const NewsletterUpdateList = () => {
25474
25466
  newsletters,
25475
25467
  isListLoading
25476
25468
  }
25477
- } = React.useContext(store$h);
25469
+ } = React.useContext(store$i);
25478
25470
 
25479
25471
  if (isListLoading) {
25480
25472
  return /*#__PURE__*/React__default['default'].createElement(Loader, {
@@ -25687,7 +25679,7 @@ function SubscriptionCreateModal({
25687
25679
  }
25688
25680
  SubscriptionCreateModal.viewId = "subscription-create";
25689
25681
 
25690
- const initialState$g = {
25682
+ const initialState$h = {
25691
25683
  emails: "",
25692
25684
  emailsError: null,
25693
25685
  buttonDisabled: false,
@@ -25699,10 +25691,10 @@ const initialState$g = {
25699
25691
  content: ""
25700
25692
  }
25701
25693
  };
25702
- const store$g = /*#__PURE__*/React.createContext(initialState$g);
25694
+ const store$h = /*#__PURE__*/React.createContext(initialState$h);
25703
25695
  const {
25704
- Provider: Provider$g
25705
- } = store$g;
25696
+ Provider: Provider$h
25697
+ } = store$h;
25706
25698
 
25707
25699
  const SubscriptionManageMembersContainer = ({
25708
25700
  style,
@@ -25874,7 +25866,7 @@ const SubscriptionManageMembersContainer = ({
25874
25866
  default:
25875
25867
  return state;
25876
25868
  }
25877
- }, initialState$g);
25869
+ }, initialState$h);
25878
25870
  React.useEffect(() => {
25879
25871
  dispatch({
25880
25872
  type: HANDLE_LIST_MEMBERS
@@ -25884,7 +25876,7 @@ const SubscriptionManageMembersContainer = ({
25884
25876
  style: { ...style
25885
25877
  },
25886
25878
  className: `pelcro-container pelcro-manage-members-container ${className}`
25887
- }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
25879
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$h, {
25888
25880
  value: {
25889
25881
  state,
25890
25882
  dispatch
@@ -25892,12 +25884,12 @@ const SubscriptionManageMembersContainer = ({
25892
25884
  }, children.length ? children.map((child, i) => {
25893
25885
  if (child) {
25894
25886
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
25895
- store: store$g,
25887
+ store: store$h,
25896
25888
  key: i
25897
25889
  });
25898
25890
  }
25899
25891
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
25900
- store: store$g
25892
+ store: store$h
25901
25893
  })));
25902
25894
  };
25903
25895
 
@@ -25913,7 +25905,7 @@ const SubscriptionManageMembersButton = ({
25913
25905
  buttonDisabled
25914
25906
  },
25915
25907
  dispatch
25916
- } = React.useContext(store$g);
25908
+ } = React.useContext(store$h);
25917
25909
  const {
25918
25910
  t
25919
25911
  } = useTranslation("subscriptionManageMembers");
@@ -25943,7 +25935,7 @@ function SubscriptionManageMembersEmails(props) {
25943
25935
  emails: stateEmails,
25944
25936
  emailsError
25945
25937
  }
25946
- } = React.useContext(store$g);
25938
+ } = React.useContext(store$h);
25947
25939
  const [emails, setEmails] = React.useState(stateEmails);
25948
25940
  const [finishedTyping, setFinishedTyping] = React.useState(false);
25949
25941
  const handleInputChange = React.useCallback(value => {
@@ -26002,7 +25994,7 @@ function SubscriptionManageMembersList(props) {
26002
25994
  removeMemberId,
26003
25995
  loading
26004
25996
  }
26005
- } = React.useContext(store$g);
25997
+ } = React.useContext(store$h);
26006
25998
  const getMemberStatus = React.useCallback(sub => {
26007
25999
  if (sub.status === "pending") {
26008
26000
  return {
@@ -26165,11 +26157,11 @@ function SubscriptionManageMembersModal({
26165
26157
  }
26166
26158
  SubscriptionManageMembersModal.viewId = "manage-members";
26167
26159
 
26168
- 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;
26169
- const initialState$f = {
26170
- email: (_window$Pelcro$user$r = window.Pelcro.user.read()) === null || _window$Pelcro$user$r === void 0 ? void 0 : _window$Pelcro$user$r.email,
26160
+ var _window$Pelcro$user$r$1, _window$Pelcro$user$r2$1, _window$Pelcro$user$r3, _window$Pelcro$user$r4, _window$Pelcro$user$r5, _window$Pelcro$user$r6;
26161
+ const initialState$g = {
26162
+ email: (_window$Pelcro$user$r$1 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r$1 === void 0 ? void 0 : _window$Pelcro$user$r$1.email,
26171
26163
  emailError: null,
26172
- firstName: (_window$Pelcro$user$r2 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.first_name,
26164
+ firstName: (_window$Pelcro$user$r2$1 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r2$1 === void 0 ? void 0 : _window$Pelcro$user$r2$1.first_name,
26173
26165
  lastName: (_window$Pelcro$user$r3 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r3 === void 0 ? void 0 : _window$Pelcro$user$r3.last_name,
26174
26166
  lastNameError: null,
26175
26167
  username: (_window$Pelcro$user$r4 = window.Pelcro.user.read()) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.username,
@@ -26183,10 +26175,10 @@ const initialState$f = {
26183
26175
  content: ""
26184
26176
  }
26185
26177
  };
26186
- const store$f = /*#__PURE__*/React.createContext(initialState$f);
26178
+ const store$g = /*#__PURE__*/React.createContext(initialState$g);
26187
26179
  const {
26188
- Provider: Provider$f
26189
- } = store$f;
26180
+ Provider: Provider$g
26181
+ } = store$g;
26190
26182
 
26191
26183
  const UserUpdateContainer = ({
26192
26184
  style,
@@ -26353,12 +26345,12 @@ const UserUpdateContainer = ({
26353
26345
  default:
26354
26346
  return state;
26355
26347
  }
26356
- }, initialState$f);
26348
+ }, initialState$g);
26357
26349
  return /*#__PURE__*/React__default['default'].createElement("div", {
26358
26350
  style: { ...style
26359
26351
  },
26360
26352
  className: `pelcro-container pelcro-user-update-container ${className}`
26361
- }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
26353
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$g, {
26362
26354
  value: {
26363
26355
  state,
26364
26356
  dispatch
@@ -26366,12 +26358,12 @@ const UserUpdateContainer = ({
26366
26358
  }, children.length ? children.map((child, i) => {
26367
26359
  if (child) {
26368
26360
  return /*#__PURE__*/React__default['default'].cloneElement(child, {
26369
- store: store$f,
26361
+ store: store$g,
26370
26362
  key: i
26371
26363
  });
26372
26364
  }
26373
26365
  }) : /*#__PURE__*/React__default['default'].cloneElement(children, {
26374
- store: store$f
26366
+ store: store$g
26375
26367
  })));
26376
26368
  };
26377
26369
 
@@ -26397,7 +26389,7 @@ const UserUpdateEmail = props => {
26397
26389
  email,
26398
26390
  emailError
26399
26391
  }
26400
- } = React.useContext(store$f);
26392
+ } = React.useContext(store$g);
26401
26393
  const [enableEmailEdit, setEnableEmailEdit] = React.useState(false);
26402
26394
  const {
26403
26395
  t
@@ -26423,7 +26415,7 @@ const UserUpdateEmail = props => {
26423
26415
  className: "plc-flex plc-items-start plc-relative"
26424
26416
  }, /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
26425
26417
  disabled: !enableEmailEdit,
26426
- store: store$f,
26418
+ store: store$g,
26427
26419
  label: t("labels.email"),
26428
26420
  enableEmailEdit: enableEmailEdit
26429
26421
  }, props)), /*#__PURE__*/React__default['default'].createElement(Button, {
@@ -26448,7 +26440,7 @@ const UserUpdateButton = ({
26448
26440
  emailError
26449
26441
  },
26450
26442
  dispatch
26451
- } = React.useContext(store$f);
26443
+ } = React.useContext(store$g);
26452
26444
  const {
26453
26445
  t
26454
26446
  } = useTranslation("userEdit");
@@ -26539,19 +26531,19 @@ function UpdateUserNameInput({
26539
26531
  }
26540
26532
 
26541
26533
  const UserUpdateUsername = props => /*#__PURE__*/React__default['default'].createElement(UpdateUserNameInput, Object.assign({
26542
- store: store$f
26534
+ store: store$g
26543
26535
  }, props));
26544
26536
 
26545
26537
  const UserUpdateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
26546
- store: store$f
26538
+ store: store$g
26547
26539
  }, props));
26548
26540
 
26549
26541
  const UserUpdateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
26550
- store: store$f
26542
+ store: store$g
26551
26543
  }, props));
26552
26544
 
26553
26545
  const UserUpdatePhone = props => /*#__PURE__*/React__default['default'].createElement(Phone, Object.assign({
26554
- store: store$f
26546
+ store: store$g
26555
26547
  }, props));
26556
26548
 
26557
26549
  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";
@@ -26638,7 +26630,7 @@ function Tin({
26638
26630
  }
26639
26631
 
26640
26632
  const UserUpdateTin = props => /*#__PURE__*/React__default['default'].createElement(Tin, Object.assign({
26641
- store: store$f
26633
+ store: store$g
26642
26634
  }, props));
26643
26635
 
26644
26636
  function DisplayName({
@@ -26669,7 +26661,7 @@ function DisplayName({
26669
26661
  }
26670
26662
 
26671
26663
  const UserUpdateDisplayName = props => /*#__PURE__*/React__default['default'].createElement(DisplayName, Object.assign({
26672
- store: store$f
26664
+ store: store$g
26673
26665
  }, props));
26674
26666
 
26675
26667
  const UserUpdateView = props => {
@@ -26764,11 +26756,11 @@ UserUpdateModal.viewId = "user-edit";
26764
26756
 
26765
26757
  const UserUpdateTextInput = props => {
26766
26758
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
26767
- store: store$f
26759
+ store: store$g
26768
26760
  }));
26769
26761
  };
26770
26762
 
26771
- const initialState$e = {
26763
+ const initialState$f = {
26772
26764
  isSubmitting: false,
26773
26765
  firstName: "",
26774
26766
  firstNameError: "",
@@ -26794,10 +26786,10 @@ const initialState$e = {
26794
26786
  content: ""
26795
26787
  }
26796
26788
  };
26797
- const store$e = /*#__PURE__*/React.createContext(initialState$e);
26789
+ const store$f = /*#__PURE__*/React.createContext(initialState$f);
26798
26790
  const {
26799
- Provider: Provider$e
26800
- } = store$e;
26791
+ Provider: Provider$f
26792
+ } = store$f;
26801
26793
 
26802
26794
  const getNewlyCreatedAddress = addresses => addresses[addresses.length - 1];
26803
26795
 
@@ -27044,7 +27036,7 @@ const AddressCreateContainer = ({
27044
27036
  default:
27045
27037
  return state;
27046
27038
  }
27047
- }, initialState$e);
27039
+ }, initialState$f);
27048
27040
  React.useEffect(() => {
27049
27041
  const getStates = () => {
27050
27042
  dispatch({
@@ -27076,16 +27068,16 @@ const AddressCreateContainer = ({
27076
27068
  style: { ...style
27077
27069
  },
27078
27070
  className: `pelcro-container pelcro-address-create-container ${className}`
27079
- }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
27071
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$f, {
27080
27072
  value: {
27081
27073
  state,
27082
27074
  dispatch
27083
27075
  }
27084
27076
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
27085
- store: store$e,
27077
+ store: store$f,
27086
27078
  key: i
27087
27079
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
27088
- store: store$e
27080
+ store: store$f
27089
27081
  })));
27090
27082
  };
27091
27083
 
@@ -27096,7 +27088,7 @@ function AddressCreateFirstName(props) {
27096
27088
  firstName,
27097
27089
  firstNameError
27098
27090
  }
27099
- } = React.useContext(store$e);
27091
+ } = React.useContext(store$f);
27100
27092
 
27101
27093
  const handleInputChange = value => {
27102
27094
  dispatch({
@@ -27132,7 +27124,7 @@ function AddressCreateLastName(props) {
27132
27124
  lastName,
27133
27125
  lastNameError
27134
27126
  }
27135
- } = React.useContext(store$e);
27127
+ } = React.useContext(store$f);
27136
27128
 
27137
27129
  const handleInputChange = value => {
27138
27130
  dispatch({
@@ -27167,7 +27159,7 @@ function AddressCreateLine1(props) {
27167
27159
  line1,
27168
27160
  line1Error
27169
27161
  }
27170
- } = React.useContext(store$e);
27162
+ } = React.useContext(store$f);
27171
27163
 
27172
27164
  const handleBlur = () => {
27173
27165
  return dispatch({
@@ -27210,7 +27202,7 @@ function AddressCreateCity(props) {
27210
27202
  city,
27211
27203
  cityError
27212
27204
  }
27213
- } = React.useContext(store$e);
27205
+ } = React.useContext(store$f);
27214
27206
 
27215
27207
  const handleInputChange = value => {
27216
27208
  dispatch({
@@ -27245,7 +27237,7 @@ function AddressCreatePostalCode(props) {
27245
27237
  postalCode,
27246
27238
  postalCodeError
27247
27239
  }
27248
- } = React.useContext(store$e);
27240
+ } = React.useContext(store$f);
27249
27241
 
27250
27242
  const handleInputChange = value => {
27251
27243
  dispatch({
@@ -27283,7 +27275,7 @@ const AddressCreateSubmit = ({
27283
27275
  state: {
27284
27276
  isSubmitting
27285
27277
  }
27286
- } = React.useContext(store$e);
27278
+ } = React.useContext(store$f);
27287
27279
  const {
27288
27280
  t
27289
27281
  } = useTranslation("address");
@@ -27396,7 +27388,7 @@ function CountrySelect({
27396
27388
  }
27397
27389
 
27398
27390
  const AddressCreateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
27399
- store: store$e
27391
+ store: store$f
27400
27392
  }, props));
27401
27393
 
27402
27394
  function StateSelect({
@@ -27485,14 +27477,14 @@ function StateSelect({
27485
27477
  }
27486
27478
 
27487
27479
  const AddressCreateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
27488
- store: store$e
27480
+ store: store$f
27489
27481
  }, props));
27490
27482
 
27491
27483
  const AddressCreateSetDefault = props => {
27492
27484
  const {
27493
27485
  dispatch,
27494
27486
  state
27495
- } = React.useContext(store$e);
27487
+ } = React.useContext(store$f);
27496
27488
 
27497
27489
  const handleCheckboxChange = e => {
27498
27490
  dispatch({
@@ -27627,18 +27619,18 @@ AddressCreateModal.viewId = "address-create";
27627
27619
 
27628
27620
  const AddressCreateTextInput = props => {
27629
27621
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
27630
- store: store$e
27622
+ store: store$f
27631
27623
  }));
27632
27624
  };
27633
27625
 
27634
27626
  const AddressCreateLine2 = props => {
27635
27627
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
27636
27628
  fieldName: "line2",
27637
- store: store$e
27629
+ store: store$f
27638
27630
  }, props));
27639
27631
  };
27640
27632
 
27641
- const initialState$d = {
27633
+ const initialState$e = {
27642
27634
  isSubmitting: false,
27643
27635
  firstName: "",
27644
27636
  firstNameError: "",
@@ -27664,10 +27656,10 @@ const initialState$d = {
27664
27656
  content: ""
27665
27657
  }
27666
27658
  };
27667
- const store$d = /*#__PURE__*/React.createContext(initialState$d);
27659
+ const store$e = /*#__PURE__*/React.createContext(initialState$e);
27668
27660
  const {
27669
- Provider: Provider$d
27670
- } = store$d;
27661
+ Provider: Provider$e
27662
+ } = store$e;
27671
27663
 
27672
27664
  const AddressUpdateContainer = ({
27673
27665
  style,
@@ -27719,7 +27711,7 @@ const AddressUpdateContainer = ({
27719
27711
  const thisAddress = addresses[address];
27720
27712
 
27721
27713
  if (+thisAddress.id === +addressId) {
27722
- const newState = { ...initialState$d,
27714
+ const newState = { ...initialState$e,
27723
27715
  firstName: thisAddress.first_name,
27724
27716
  lastName: thisAddress.last_name,
27725
27717
  line1: thisAddress.line1,
@@ -27860,7 +27852,7 @@ const AddressUpdateContainer = ({
27860
27852
  default:
27861
27853
  return state;
27862
27854
  }
27863
- }, initialState$d);
27855
+ }, initialState$e);
27864
27856
  React.useEffect(() => {
27865
27857
  const getStates = () => {
27866
27858
  dispatch({
@@ -27892,21 +27884,21 @@ const AddressUpdateContainer = ({
27892
27884
  style: { ...style
27893
27885
  },
27894
27886
  className: `pelcro-container pelcro-address-update-container ${className}`
27895
- }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
27887
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$e, {
27896
27888
  value: {
27897
27889
  state,
27898
27890
  dispatch
27899
27891
  }
27900
27892
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
27901
- store: store$d,
27893
+ store: store$e,
27902
27894
  key: i
27903
27895
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
27904
- store: store$d
27896
+ store: store$e
27905
27897
  })));
27906
27898
  };
27907
27899
 
27908
27900
  const AddressUpdateCountrySelect = props => /*#__PURE__*/React__default['default'].createElement(CountrySelect, Object.assign({
27909
- store: store$d
27901
+ store: store$e
27910
27902
  }, props));
27911
27903
 
27912
27904
  function AddressUpdateFirstName(props) {
@@ -27916,7 +27908,7 @@ function AddressUpdateFirstName(props) {
27916
27908
  firstName,
27917
27909
  firstNameError
27918
27910
  }
27919
- } = React.useContext(store$d);
27911
+ } = React.useContext(store$e);
27920
27912
 
27921
27913
  const handleBlur = () => {
27922
27914
  return dispatch({
@@ -27959,7 +27951,7 @@ function AddressUpdateLastName(props) {
27959
27951
  lastName,
27960
27952
  lastNameError
27961
27953
  }
27962
- } = React.useContext(store$d);
27954
+ } = React.useContext(store$e);
27963
27955
 
27964
27956
  const handleBlur = () => {
27965
27957
  return dispatch({
@@ -28002,7 +27994,7 @@ function AddressUpdateLine1(props) {
28002
27994
  line1,
28003
27995
  line1Error
28004
27996
  }
28005
- } = React.useContext(store$d);
27997
+ } = React.useContext(store$e);
28006
27998
 
28007
27999
  const handleBlur = () => {
28008
28000
  return dispatch({
@@ -28042,7 +28034,7 @@ const AddressUpdateLine2 = props => {
28042
28034
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({
28043
28035
  fieldName: "line2"
28044
28036
  }, props, {
28045
- store: store$d
28037
+ store: store$e
28046
28038
  }));
28047
28039
  };
28048
28040
 
@@ -28053,7 +28045,7 @@ function AddressUpdateCity(props) {
28053
28045
  city,
28054
28046
  cityError
28055
28047
  }
28056
- } = React.useContext(store$d);
28048
+ } = React.useContext(store$e);
28057
28049
 
28058
28050
  const handleBlur = () => {
28059
28051
  return dispatch({
@@ -28096,7 +28088,7 @@ function AddressUpdatePostalCode(props) {
28096
28088
  postalCode,
28097
28089
  postalCodeError
28098
28090
  }
28099
- } = React.useContext(store$d);
28091
+ } = React.useContext(store$e);
28100
28092
 
28101
28093
  const handleBlur = () => {
28102
28094
  return dispatch({
@@ -28142,7 +28134,7 @@ const AddressUpdateSubmit = ({
28142
28134
  state: {
28143
28135
  isSubmitting
28144
28136
  }
28145
- } = React.useContext(store$d);
28137
+ } = React.useContext(store$e);
28146
28138
  const {
28147
28139
  t
28148
28140
  } = useTranslation("address");
@@ -28158,7 +28150,7 @@ const AddressUpdateSubmit = ({
28158
28150
  };
28159
28151
 
28160
28152
  const AddressUpdateStateSelect = props => /*#__PURE__*/React__default['default'].createElement(StateSelect, Object.assign({
28161
- store: store$d
28153
+ store: store$e
28162
28154
  }, props));
28163
28155
 
28164
28156
  function AddressUpdateSetDefault(props) {
@@ -28167,7 +28159,7 @@ function AddressUpdateSetDefault(props) {
28167
28159
  state: {
28168
28160
  isDefault
28169
28161
  }
28170
- } = React.useContext(store$d);
28162
+ } = React.useContext(store$e);
28171
28163
 
28172
28164
  const handleCheckboxChange = e => {
28173
28165
  dispatch({
@@ -28275,7 +28267,7 @@ AddressUpdateModal.viewId = "address-edit";
28275
28267
 
28276
28268
  const AddressUpdateTextInput = props => {
28277
28269
  return /*#__PURE__*/React__default['default'].createElement(TextInput, Object.assign({}, props, {
28278
- store: store$d
28270
+ store: store$e
28279
28271
  }));
28280
28272
  };
28281
28273
 
@@ -28357,7 +28349,7 @@ const PaymentMethodUpdateModal = props => {
28357
28349
  };
28358
28350
  PaymentMethodUpdateModal.viewId = "payment-method-update";
28359
28351
 
28360
- const initialState$c = {
28352
+ const initialState$d = {
28361
28353
  email: "",
28362
28354
  password: "",
28363
28355
  passwordError: null,
@@ -28370,10 +28362,10 @@ const initialState$c = {
28370
28362
  content: ""
28371
28363
  }
28372
28364
  };
28373
- const store$c = /*#__PURE__*/React.createContext(initialState$c);
28365
+ const store$d = /*#__PURE__*/React.createContext(initialState$d);
28374
28366
  const {
28375
- Provider: Provider$c
28376
- } = store$c;
28367
+ Provider: Provider$d
28368
+ } = store$d;
28377
28369
 
28378
28370
  const PasswordResetContainer = ({
28379
28371
  style,
@@ -28430,7 +28422,7 @@ const PasswordResetContainer = ({
28430
28422
  type: SET_EMAIL,
28431
28423
  payload: window.Pelcro.helpers.getURLParameter("email")
28432
28424
  });
28433
- initialState$c.email = window.Pelcro.helpers.getURLParameter("email");
28425
+ initialState$d.email = window.Pelcro.helpers.getURLParameter("email");
28434
28426
  dispatch({
28435
28427
  type: SET_TOKEN,
28436
28428
  payload: window.Pelcro.helpers.getURLParameter("token")
@@ -28490,26 +28482,26 @@ const PasswordResetContainer = ({
28490
28482
  default:
28491
28483
  return state;
28492
28484
  }
28493
- }, initialState$c);
28485
+ }, initialState$d);
28494
28486
  return /*#__PURE__*/React__default['default'].createElement("div", {
28495
28487
  style: { ...style
28496
28488
  },
28497
28489
  className: `pelcro-container pelcro-password-reset-container ${className}`
28498
- }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
28490
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$d, {
28499
28491
  value: {
28500
28492
  state,
28501
28493
  dispatch
28502
28494
  }
28503
28495
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
28504
- store: store$c,
28496
+ store: store$d,
28505
28497
  key: i
28506
28498
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
28507
- store: store$c
28499
+ store: store$d
28508
28500
  })));
28509
28501
  };
28510
28502
 
28511
28503
  const PasswordResetPassword = props => /*#__PURE__*/React__default['default'].createElement(Password, Object.assign({
28512
- store: store$c
28504
+ store: store$d
28513
28505
  }, props));
28514
28506
 
28515
28507
  const PasswordResetButton = ({
@@ -28522,7 +28514,7 @@ const PasswordResetButton = ({
28522
28514
  buttonDisabled
28523
28515
  },
28524
28516
  dispatch
28525
- } = React.useContext(store$c);
28517
+ } = React.useContext(store$d);
28526
28518
  const {
28527
28519
  t
28528
28520
  } = useTranslation("passwordReset");
@@ -28539,14 +28531,14 @@ const PasswordResetButton = ({
28539
28531
  };
28540
28532
 
28541
28533
  const PasswordResetEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
28542
- store: store$c
28534
+ store: store$d
28543
28535
  }, props, {
28544
28536
  value: window.Pelcro.helpers.getURLParameter("email"),
28545
28537
  disabled: true
28546
28538
  }));
28547
28539
 
28548
28540
  const PasswordResetConfirmPassword = props => /*#__PURE__*/React__default['default'].createElement(ConfirmPassword, Object.assign({
28549
- store: store$c
28541
+ store: store$d
28550
28542
  }, props));
28551
28543
 
28552
28544
  const PasswordResetView = props => {
@@ -28601,7 +28593,7 @@ const PasswordResetModal = ({
28601
28593
  };
28602
28594
  PasswordResetModal.viewId = "password-reset";
28603
28595
 
28604
- const initialState$b = {
28596
+ const initialState$c = {
28605
28597
  email: "",
28606
28598
  emailError: null,
28607
28599
  buttonDisabled: false,
@@ -28610,10 +28602,10 @@ const initialState$b = {
28610
28602
  content: ""
28611
28603
  }
28612
28604
  };
28613
- const store$b = /*#__PURE__*/React.createContext(initialState$b);
28605
+ const store$c = /*#__PURE__*/React.createContext(initialState$c);
28614
28606
  const {
28615
- Provider: Provider$b
28616
- } = store$b;
28607
+ Provider: Provider$c
28608
+ } = store$c;
28617
28609
 
28618
28610
  const PasswordForgotContainer = ({
28619
28611
  style,
@@ -28691,21 +28683,21 @@ const PasswordForgotContainer = ({
28691
28683
  default:
28692
28684
  return state;
28693
28685
  }
28694
- }, initialState$b);
28686
+ }, initialState$c);
28695
28687
  return /*#__PURE__*/React__default['default'].createElement("div", {
28696
28688
  style: { ...style
28697
28689
  },
28698
28690
  className: `pelcro-container pelcro-password-forgot-container ${className}`
28699
- }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
28691
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$c, {
28700
28692
  value: {
28701
28693
  state,
28702
28694
  dispatch
28703
28695
  }
28704
28696
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
28705
- store: store$b,
28697
+ store: store$c,
28706
28698
  key: i
28707
28699
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
28708
- store: store$b
28700
+ store: store$c
28709
28701
  })));
28710
28702
  };
28711
28703
 
@@ -28721,7 +28713,7 @@ const PasswordForgotButton = ({
28721
28713
  emailError
28722
28714
  },
28723
28715
  dispatch
28724
- } = React.useContext(store$b);
28716
+ } = React.useContext(store$c);
28725
28717
  const {
28726
28718
  t
28727
28719
  } = useTranslation("passwordForgot");
@@ -28742,7 +28734,7 @@ const PasswordForgotButton = ({
28742
28734
  };
28743
28735
 
28744
28736
  const PasswordForgotEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
28745
- store: store$b
28737
+ store: store$c
28746
28738
  }, props));
28747
28739
 
28748
28740
  const PasswordForgotView = props => {
@@ -28796,7 +28788,7 @@ const PasswordForgotModal = ({
28796
28788
  };
28797
28789
  PasswordForgotModal.viewId = "password-forgot";
28798
28790
 
28799
- const initialState$a = {
28791
+ const initialState$b = {
28800
28792
  email: "",
28801
28793
  emailError: null,
28802
28794
  buttonDisabled: false,
@@ -28805,10 +28797,10 @@ const initialState$a = {
28805
28797
  content: ""
28806
28798
  }
28807
28799
  };
28808
- const store$a = /*#__PURE__*/React.createContext(initialState$a);
28800
+ const store$b = /*#__PURE__*/React.createContext(initialState$b);
28809
28801
  const {
28810
- Provider: Provider$a
28811
- } = store$a;
28802
+ Provider: Provider$b
28803
+ } = store$b;
28812
28804
 
28813
28805
  const PasswordlessRequestContainer = ({
28814
28806
  style,
@@ -28886,21 +28878,21 @@ const PasswordlessRequestContainer = ({
28886
28878
  default:
28887
28879
  return state;
28888
28880
  }
28889
- }, initialState$a);
28881
+ }, initialState$b);
28890
28882
  return /*#__PURE__*/React__default['default'].createElement("div", {
28891
28883
  style: { ...style
28892
28884
  },
28893
28885
  className: `pelcro-container pelcro-password-forgot-container ${className}`
28894
- }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
28886
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$b, {
28895
28887
  value: {
28896
28888
  state,
28897
28889
  dispatch
28898
28890
  }
28899
28891
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
28900
- store: store$a,
28892
+ store: store$b,
28901
28893
  key: i
28902
28894
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
28903
- store: store$a
28895
+ store: store$b
28904
28896
  })));
28905
28897
  };
28906
28898
 
@@ -28916,7 +28908,7 @@ const PasswordlessRequestViewButton = ({
28916
28908
  emailError
28917
28909
  },
28918
28910
  dispatch
28919
- } = React.useContext(store$a);
28911
+ } = React.useContext(store$b);
28920
28912
  const {
28921
28913
  t
28922
28914
  } = useTranslation("passwordlessRequest");
@@ -28937,7 +28929,7 @@ const PasswordlessRequestViewButton = ({
28937
28929
  };
28938
28930
 
28939
28931
  const PasswordlessRequestEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
28940
- store: store$a
28932
+ store: store$b
28941
28933
  }, props));
28942
28934
 
28943
28935
  const PasswordlessRequestView = props => {
@@ -28981,7 +28973,7 @@ const PasswordlessRequestModal = ({
28981
28973
  };
28982
28974
  PasswordlessRequestModal.viewId = "passwordless-request";
28983
28975
 
28984
- const initialState$9 = {
28976
+ const initialState$a = {
28985
28977
  currentPassword: "",
28986
28978
  newPassword: "",
28987
28979
  confirmNewPassword: "",
@@ -28995,10 +28987,10 @@ const initialState$9 = {
28995
28987
  content: ""
28996
28988
  }
28997
28989
  };
28998
- const store$9 = /*#__PURE__*/React.createContext(initialState$9);
28990
+ const store$a = /*#__PURE__*/React.createContext(initialState$a);
28999
28991
  const {
29000
- Provider: Provider$9
29001
- } = store$9;
28992
+ Provider: Provider$a
28993
+ } = store$a;
29002
28994
  const PasswordChangeContainer = ({
29003
28995
  style,
29004
28996
  className = "",
@@ -29150,21 +29142,21 @@ const PasswordChangeContainer = ({
29150
29142
  default:
29151
29143
  return state;
29152
29144
  }
29153
- }, initialState$9);
29145
+ }, initialState$a);
29154
29146
  return /*#__PURE__*/React__default['default'].createElement("div", {
29155
29147
  style: { ...style
29156
29148
  },
29157
29149
  className: `pelcro-container pelcro-password-change-container ${className}`
29158
- }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
29150
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$a, {
29159
29151
  value: {
29160
29152
  state,
29161
29153
  dispatch
29162
29154
  }
29163
29155
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
29164
- store: store$9,
29156
+ store: store$a,
29165
29157
  key: i
29166
29158
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
29167
- store: store$9
29159
+ store: store$a
29168
29160
  })));
29169
29161
  };
29170
29162
 
@@ -29175,7 +29167,7 @@ function PasswordChangeCurrentPassword(props) {
29175
29167
  currentPassword,
29176
29168
  currentPasswordError
29177
29169
  }
29178
- } = React.useContext(store$9);
29170
+ } = React.useContext(store$a);
29179
29171
  const handleBlur = React.useCallback(() => {
29180
29172
  return dispatch({
29181
29173
  type: VALIDATE_PASSWORD
@@ -29209,7 +29201,7 @@ function PasswordChangeNewPassword(props) {
29209
29201
  newPassword,
29210
29202
  newPasswordError
29211
29203
  }
29212
- } = React.useContext(store$9);
29204
+ } = React.useContext(store$a);
29213
29205
  const handleBlur = React.useCallback(() => {
29214
29206
  return dispatch({
29215
29207
  type: VALIDATE_NEW_PASSWORD
@@ -29243,7 +29235,7 @@ function PasswordChangeConfirmNewPassword(props) {
29243
29235
  confirmNewPassword,
29244
29236
  confirmNewPasswordError
29245
29237
  }
29246
- } = React.useContext(store$9);
29238
+ } = React.useContext(store$a);
29247
29239
  const handleBlur = React.useCallback(() => {
29248
29240
  return dispatch({
29249
29241
  type: VALIDATE_CONFIRM_NEW_PASSWORD
@@ -29284,7 +29276,7 @@ const PasswordChangeButton = ({
29284
29276
  confirmNewPasswordError
29285
29277
  },
29286
29278
  dispatch
29287
- } = React.useContext(store$9);
29279
+ } = React.useContext(store$a);
29288
29280
  const {
29289
29281
  t
29290
29282
  } = useTranslation("passwordChange");
@@ -29353,17 +29345,17 @@ const PasswordChangeModal = ({
29353
29345
  };
29354
29346
  PasswordChangeModal.viewId = "password-change";
29355
29347
 
29356
- const initialState$8 = {
29348
+ const initialState$9 = {
29357
29349
  buttonDisabled: false,
29358
29350
  alert: {
29359
29351
  type: "error",
29360
29352
  content: ""
29361
29353
  }
29362
29354
  };
29363
- const store$8 = /*#__PURE__*/React.createContext(initialState$8);
29355
+ const store$9 = /*#__PURE__*/React.createContext(initialState$9);
29364
29356
  const {
29365
- Provider: Provider$8
29366
- } = store$8;
29357
+ Provider: Provider$9
29358
+ } = store$9;
29367
29359
 
29368
29360
  const CartContainer = ({
29369
29361
  style,
@@ -29454,21 +29446,21 @@ const CartContainer = ({
29454
29446
  default:
29455
29447
  return state;
29456
29448
  }
29457
- }, initialState$8);
29449
+ }, initialState$9);
29458
29450
  return /*#__PURE__*/React__default['default'].createElement("div", {
29459
29451
  style: { ...style
29460
29452
  },
29461
29453
  className: `pelcro-container pelcro-cart-container ${className}`
29462
- }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
29454
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$9, {
29463
29455
  value: {
29464
29456
  state,
29465
29457
  dispatch
29466
29458
  }
29467
29459
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
29468
- store: store$8,
29460
+ store: store$9,
29469
29461
  key: i
29470
29462
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
29471
- store: store$8
29463
+ store: store$9
29472
29464
  })));
29473
29465
  };
29474
29466
 
@@ -29507,7 +29499,7 @@ const CartSubmit = ({
29507
29499
  buttonDisabled
29508
29500
  },
29509
29501
  dispatch
29510
- } = React.useContext(store$8);
29502
+ } = React.useContext(store$9);
29511
29503
  const {
29512
29504
  t
29513
29505
  } = useTranslation("cart");
@@ -29541,7 +29533,7 @@ const CartTotalPrice = () => {
29541
29533
  state: {
29542
29534
  alert
29543
29535
  }
29544
- } = React.useContext(store$8);
29536
+ } = React.useContext(store$9);
29545
29537
  const {
29546
29538
  cartItems
29547
29539
  } = usePelcro();
@@ -29865,7 +29857,7 @@ const OrderConfirmModal = props => {
29865
29857
  };
29866
29858
  OrderConfirmModal.viewId = "order-confirm";
29867
29859
 
29868
- const initialState$7 = {
29860
+ const initialState$8 = {
29869
29861
  email: "",
29870
29862
  firstName: "",
29871
29863
  lastName: "",
@@ -29877,10 +29869,10 @@ const initialState$7 = {
29877
29869
  content: ""
29878
29870
  }
29879
29871
  };
29880
- const store$7 = /*#__PURE__*/React.createContext(initialState$7);
29872
+ const store$8 = /*#__PURE__*/React.createContext(initialState$8);
29881
29873
  const {
29882
- Provider: Provider$7
29883
- } = store$7;
29874
+ Provider: Provider$8
29875
+ } = store$8;
29884
29876
 
29885
29877
  const GiftCreateContainer = ({
29886
29878
  style,
@@ -29984,21 +29976,21 @@ const GiftCreateContainer = ({
29984
29976
  default:
29985
29977
  return state;
29986
29978
  }
29987
- }, initialState$7);
29979
+ }, initialState$8);
29988
29980
  return /*#__PURE__*/React__default['default'].createElement("div", {
29989
29981
  style: { ...style
29990
29982
  },
29991
29983
  className: `pelcro-container pelcro-gift-create-container ${className}`
29992
- }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
29984
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$8, {
29993
29985
  value: {
29994
29986
  state,
29995
29987
  dispatch
29996
29988
  }
29997
29989
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
29998
- store: store$7,
29990
+ store: store$8,
29999
29991
  key: i
30000
29992
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
30001
- store: store$7
29993
+ store: store$8
30002
29994
  })));
30003
29995
  };
30004
29996
 
@@ -30012,7 +30004,7 @@ const GiftCreateSubmitButton = ({
30012
30004
  state: {
30013
30005
  disableSubmit
30014
30006
  }
30015
- } = React.useContext(store$7);
30007
+ } = React.useContext(store$8);
30016
30008
  const {
30017
30009
  t
30018
30010
  } = useTranslation("register");
@@ -30029,15 +30021,15 @@ const GiftCreateSubmitButton = ({
30029
30021
 
30030
30022
  const GiftCreateEmail = props => /*#__PURE__*/React__default['default'].createElement(Email, Object.assign({
30031
30023
  initWithUserEmail: false,
30032
- store: store$7
30024
+ store: store$8
30033
30025
  }, props));
30034
30026
 
30035
30027
  const GiftCreateFirstName = props => /*#__PURE__*/React__default['default'].createElement(FirstName, Object.assign({
30036
- store: store$7
30028
+ store: store$8
30037
30029
  }, props));
30038
30030
 
30039
30031
  const GiftCreateLastName = props => /*#__PURE__*/React__default['default'].createElement(LastName, Object.assign({
30040
- store: store$7
30032
+ store: store$8
30041
30033
  }, props));
30042
30034
 
30043
30035
  const nowDate = new Date();
@@ -30052,7 +30044,7 @@ const GiftCreateStartDate = props => {
30052
30044
  const {
30053
30045
  dispatch,
30054
30046
  state
30055
- } = React.useContext(store$7);
30047
+ } = React.useContext(store$8);
30056
30048
 
30057
30049
  const handleInputChange = value => {
30058
30050
  dispatch({
@@ -30087,7 +30079,7 @@ function GiftCreateMessage(props) {
30087
30079
  const {
30088
30080
  dispatch,
30089
30081
  state
30090
- } = React.useContext(store$7);
30082
+ } = React.useContext(store$8);
30091
30083
  const MAX_CHARS_COUNT = 200;
30092
30084
  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;
30093
30085
 
@@ -30207,7 +30199,7 @@ const GiftCreateModal = ({
30207
30199
  }, t("gift.titles.firstTitle")))), /*#__PURE__*/React__default['default'].createElement(ModalBody, null, /*#__PURE__*/React__default['default'].createElement(GiftCreateView, Object.assign({}, otherProps, {
30208
30200
  onSuccess: onSuccess
30209
30201
  }))), /*#__PURE__*/React__default['default'].createElement(ModalFooter, null, /*#__PURE__*/React__default['default'].createElement("p", {
30210
- className: "plc-mb-9"
30202
+ className: "plc-mb-4"
30211
30203
  }, /*#__PURE__*/React__default['default'].createElement("span", {
30212
30204
  className: "plc-font-medium"
30213
30205
  }, t("messages.selectPlan") + " "), /*#__PURE__*/React__default['default'].createElement(Link, {
@@ -30217,7 +30209,7 @@ const GiftCreateModal = ({
30217
30209
  };
30218
30210
  GiftCreateModal.viewId = "gift-create";
30219
30211
 
30220
- const initialState$6 = {
30212
+ const initialState$7 = {
30221
30213
  isSubmitting: false,
30222
30214
  giftCode: "",
30223
30215
  buttonDisabled: true,
@@ -30226,10 +30218,10 @@ const initialState$6 = {
30226
30218
  content: ""
30227
30219
  }
30228
30220
  };
30229
- const store$6 = /*#__PURE__*/React.createContext(initialState$6);
30221
+ const store$7 = /*#__PURE__*/React.createContext(initialState$7);
30230
30222
  const {
30231
- Provider: Provider$6
30232
- } = store$6;
30223
+ Provider: Provider$7
30224
+ } = store$7;
30233
30225
 
30234
30226
  const GiftRedeemContainer = ({
30235
30227
  style,
@@ -30343,21 +30335,21 @@ const GiftRedeemContainer = ({
30343
30335
  default:
30344
30336
  return state;
30345
30337
  }
30346
- }, initialState$6);
30338
+ }, initialState$7);
30347
30339
  return /*#__PURE__*/React__default['default'].createElement("div", {
30348
30340
  style: { ...style
30349
30341
  },
30350
30342
  className: `pelcro-container pelcro-gift-redeem-container ${className}`
30351
- }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
30343
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$7, {
30352
30344
  value: {
30353
30345
  state,
30354
30346
  dispatch
30355
30347
  }
30356
30348
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
30357
- store: store$6,
30349
+ store: store$7,
30358
30350
  key: i
30359
30351
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
30360
- store: store$6
30352
+ store: store$7
30361
30353
  })));
30362
30354
  };
30363
30355
 
@@ -30394,7 +30386,7 @@ function GiftCode({
30394
30386
  }
30395
30387
 
30396
30388
  const GiftRedeemCode = props => /*#__PURE__*/React__default['default'].createElement(GiftCode, Object.assign({
30397
- store: store$6
30389
+ store: store$7
30398
30390
  }, props));
30399
30391
 
30400
30392
  const GiftRedeemSubmitButton = ({
@@ -30408,7 +30400,7 @@ const GiftRedeemSubmitButton = ({
30408
30400
  disableSubmit,
30409
30401
  isSubmitting
30410
30402
  }
30411
- } = React.useContext(store$6);
30403
+ } = React.useContext(store$7);
30412
30404
  const {
30413
30405
  t
30414
30406
  } = useTranslation("register");
@@ -30503,7 +30495,7 @@ const moveDefaultAddressToStart = addresses => {
30503
30495
  return [defaultAddress, ...addressesWithoutDefault];
30504
30496
  };
30505
30497
 
30506
- const initialState$5 = {
30498
+ const initialState$6 = {
30507
30499
  addresses: [],
30508
30500
  selectedAddressId: null,
30509
30501
  isSubmitting: false,
@@ -30512,10 +30504,10 @@ const initialState$5 = {
30512
30504
  content: ""
30513
30505
  }
30514
30506
  };
30515
- const store$5 = /*#__PURE__*/React.createContext(initialState$5);
30507
+ const store$6 = /*#__PURE__*/React.createContext(initialState$6);
30516
30508
  const {
30517
- Provider: Provider$5
30518
- } = store$5;
30509
+ Provider: Provider$6
30510
+ } = store$6;
30519
30511
 
30520
30512
  const AddressSelectContainer = ({
30521
30513
  style,
@@ -30652,7 +30644,7 @@ const AddressSelectContainer = ({
30652
30644
  default:
30653
30645
  return state;
30654
30646
  }
30655
- }, initialState$5);
30647
+ }, initialState$6);
30656
30648
  React.useEffect(() => {
30657
30649
  var _window$Pelcro$user$r;
30658
30650
 
@@ -30665,16 +30657,16 @@ const AddressSelectContainer = ({
30665
30657
  style: { ...style
30666
30658
  },
30667
30659
  className: `pelcro-container pelcro-address-select-container ${className}`
30668
- }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
30660
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$6, {
30669
30661
  value: {
30670
30662
  state,
30671
30663
  dispatch
30672
30664
  }
30673
30665
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
30674
- store: store$5,
30666
+ store: store$6,
30675
30667
  key: i
30676
30668
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
30677
- store: store$5
30669
+ store: store$6
30678
30670
  })));
30679
30671
  };
30680
30672
 
@@ -30685,7 +30677,7 @@ const AddressSelectList = () => {
30685
30677
  addresses,
30686
30678
  selectedAddressId
30687
30679
  }
30688
- } = React.useContext(store$5);
30680
+ } = React.useContext(store$6);
30689
30681
 
30690
30682
  const handleAddressSelect = event => {
30691
30683
  dispatch({
@@ -30729,7 +30721,7 @@ const AddressSelectSubmit = ({
30729
30721
  selectedAddressId,
30730
30722
  isSubmitting
30731
30723
  }
30732
- } = React.useContext(store$5);
30724
+ } = React.useContext(store$6);
30733
30725
  const {
30734
30726
  t
30735
30727
  } = useTranslation("address");
@@ -30839,7 +30831,7 @@ const moveDefaultPaymentMethodToStart = paymentMethods => {
30839
30831
  return [defaultPaymentMethod, ...paymentMethodsWithoutDefault];
30840
30832
  };
30841
30833
 
30842
- const initialState$4 = {
30834
+ const initialState$5 = {
30843
30835
  paymentMethods: [],
30844
30836
  selectedPaymentMethodId: null,
30845
30837
  isSubmitting: false,
@@ -30848,10 +30840,10 @@ const initialState$4 = {
30848
30840
  content: ""
30849
30841
  }
30850
30842
  };
30851
- const store$4 = /*#__PURE__*/React.createContext(initialState$4);
30843
+ const store$5 = /*#__PURE__*/React.createContext(initialState$5);
30852
30844
  const {
30853
- Provider: Provider$4
30854
- } = store$4;
30845
+ Provider: Provider$5
30846
+ } = store$5;
30855
30847
 
30856
30848
  const PaymentMethodSelectContainer = ({
30857
30849
  style,
@@ -30910,7 +30902,7 @@ const PaymentMethodSelectContainer = ({
30910
30902
  default:
30911
30903
  return state;
30912
30904
  }
30913
- }, initialState$4);
30905
+ }, initialState$5);
30914
30906
  React.useEffect(() => {
30915
30907
  var _window$Pelcro$user$r3;
30916
30908
 
@@ -30923,16 +30915,16 @@ const PaymentMethodSelectContainer = ({
30923
30915
  style: { ...style
30924
30916
  },
30925
30917
  className: `pelcro-container pelcro-payment-select-container ${className}`
30926
- }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
30918
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$5, {
30927
30919
  value: {
30928
30920
  state,
30929
30921
  dispatch
30930
30922
  }
30931
30923
  }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
30932
- store: store$4,
30924
+ store: store$5,
30933
30925
  key: i
30934
30926
  })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
30935
- store: store$4
30927
+ store: store$5
30936
30928
  })));
30937
30929
  };
30938
30930
 
@@ -30946,7 +30938,7 @@ const PaymentMethodSelectList = () => {
30946
30938
  paymentMethods,
30947
30939
  selectedPaymentMethodId
30948
30940
  }
30949
- } = React.useContext(store$4);
30941
+ } = React.useContext(store$5);
30950
30942
 
30951
30943
  const handlePaymentMethodSelect = event => {
30952
30944
  dispatch({
@@ -30996,7 +30988,7 @@ const PaymentMethodSelectSubmit = ({
30996
30988
  selectedPaymentMethodId,
30997
30989
  isSubmitting
30998
30990
  }
30999
- } = React.useContext(store$4);
30991
+ } = React.useContext(store$5);
31000
30992
  return /*#__PURE__*/React__default['default'].createElement(Button, Object.assign({
31001
30993
  onClick: () => {
31002
30994
  dispatch({
@@ -31082,6 +31074,217 @@ const PaymentMethodSelectModal = ({
31082
31074
  };
31083
31075
  PaymentMethodSelectModal.viewId = "payment-method-select";
31084
31076
 
31077
+ var _window$Pelcro$user$r, _window$Pelcro$user$r2;
31078
+ const initialState$4 = {
31079
+ isOpen: false,
31080
+ activeDashboardLink: null,
31081
+ subscriptions: window.Pelcro.subscription.list(),
31082
+ 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 : [],
31083
+ disableSubmit: false,
31084
+ addresses: []
31085
+ };
31086
+ const store$4 = /*#__PURE__*/React.createContext(initialState$4);
31087
+ const {
31088
+ Provider: Provider$4
31089
+ } = store$4;
31090
+
31091
+ const DashboardContainer = ({
31092
+ onClose,
31093
+ style,
31094
+ className = "",
31095
+ children,
31096
+ ...props
31097
+ }) => {
31098
+ const {
31099
+ t
31100
+ } = useTranslation("dashboard");
31101
+ React.useEffect(() => {
31102
+ var _ReactGA$event;
31103
+
31104
+ dispatch({
31105
+ type: SET_IS_OPEN,
31106
+ payload: true
31107
+ });
31108
+ window.Pelcro.insight.track("Modal Displayed", {
31109
+ name: "dashboard"
31110
+ });
31111
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
31112
+ category: "VIEWS",
31113
+ action: "Dashboard Modal Viewed",
31114
+ nonInteraction: true
31115
+ });
31116
+ const {
31117
+ addresses
31118
+ } = window.Pelcro.user.read();
31119
+ if (addresses) dispatch({
31120
+ type: SET_ADDRESSES,
31121
+ payload: addresses
31122
+ });
31123
+ return () => {};
31124
+ }, []);
31125
+ /**
31126
+ *
31127
+ * @param {*} payload
31128
+ * @param {*} dispatch
31129
+ */
31130
+
31131
+ const cancelSubscription = ({
31132
+ subscription_id,
31133
+ onSuccess,
31134
+ onFailure
31135
+ }, dispatch) => {
31136
+ window.Pelcro.subscription.cancel({
31137
+ auth_token: window.Pelcro.user.read().auth_token,
31138
+ subscription_id: subscription_id
31139
+ }, (err, res) => {
31140
+ var _ReactGA$event2;
31141
+
31142
+ dispatch({
31143
+ type: SET_DISABLESUBMIT,
31144
+ payload: false
31145
+ });
31146
+
31147
+ if (err) {
31148
+ return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31149
+ }
31150
+
31151
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
31152
+ category: "ACTIONS",
31153
+ action: "Canceled",
31154
+ nonInteraction: true
31155
+ });
31156
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
31157
+ });
31158
+ };
31159
+ /**
31160
+ *
31161
+ * @param {*} payload
31162
+ * @param {*} dispatch
31163
+ */
31164
+
31165
+
31166
+ const unSuspendSubscription = ({
31167
+ subscription_id,
31168
+ onSuccess,
31169
+ onFailure
31170
+ }, dispatch) => {
31171
+ window.Pelcro.subscription.update({
31172
+ auth_token: window.Pelcro.user.read().auth_token,
31173
+ subscription_id: subscription_id,
31174
+ suspend: 0
31175
+ }, (err, res) => {
31176
+ var _ReactGA$event3;
31177
+
31178
+ dispatch({
31179
+ type: SET_DISABLESUBMIT,
31180
+ payload: false
31181
+ });
31182
+
31183
+ if (err) {
31184
+ return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31185
+ }
31186
+
31187
+ ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event3 = ReactGA.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA, {
31188
+ category: "ACTIONS",
31189
+ action: "UnSuspended",
31190
+ nonInteraction: true
31191
+ });
31192
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
31193
+ });
31194
+ };
31195
+ /**
31196
+ *
31197
+ * @param {*} payload
31198
+ * @param {*} dispatch
31199
+ */
31200
+
31201
+
31202
+ const reactivateSubscription = ({
31203
+ subscription_id,
31204
+ onSuccess,
31205
+ onFailure
31206
+ }, dispatch) => {
31207
+ window.Pelcro.subscription.reactivate({
31208
+ auth_token: window.Pelcro.user.read().auth_token,
31209
+ subscription_id: subscription_id
31210
+ }, (err, res) => {
31211
+ dispatch({
31212
+ type: SET_DISABLESUBMIT,
31213
+ payload: false
31214
+ });
31215
+ onClose();
31216
+
31217
+ if (err) {
31218
+ onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
31219
+ return notify.error(t("messages.subReactivation.error"));
31220
+ }
31221
+
31222
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
31223
+ return notify.success(t("messages.subReactivation.success"));
31224
+ });
31225
+ };
31226
+
31227
+ const [state, dispatch] = useReducerWithSideEffects((state, action) => {
31228
+ switch (action.type) {
31229
+ case SET_IS_OPEN:
31230
+ return lib_7({ ...state,
31231
+ isOpen: action.payload
31232
+ });
31233
+
31234
+ case CLOSE_DASHBOARD:
31235
+ return lib_7({ ...state,
31236
+ isOpen: false,
31237
+ activeDashboardLink: null
31238
+ });
31239
+
31240
+ case SET_ACTIVE_DASHBOARD_LINK:
31241
+ return lib_7({ ...state,
31242
+ activeDashboardLink: action.payload
31243
+ });
31244
+
31245
+ case SET_DISABLESUBMIT:
31246
+ {
31247
+ return lib_7({ ...state,
31248
+ disableSubmit: action.payload
31249
+ });
31250
+ }
31251
+
31252
+ case CANCEL_SUBSCRIPTION:
31253
+ return lib_5({ ...state,
31254
+ disableSubmit: true
31255
+ }, (state, dispatch) => cancelSubscription(action.payload, dispatch));
31256
+
31257
+ case UNSUSPEND_SUBSCRIPTION:
31258
+ return lib_5({ ...state,
31259
+ disableSubmit: true
31260
+ }, (state, dispatch) => unSuspendSubscription(action.payload, dispatch));
31261
+
31262
+ case REACTIVATE_SUBSCRIPTION:
31263
+ return lib_5({ ...state,
31264
+ disableSubmit: true
31265
+ }, (state, dispatch) => reactivateSubscription(action.payload, dispatch));
31266
+
31267
+ default:
31268
+ return state;
31269
+ }
31270
+ }, initialState$4);
31271
+ return /*#__PURE__*/React__default['default'].createElement("div", {
31272
+ style: { ...style
31273
+ },
31274
+ className: `pelcro-container pelcro-dashboard-container ${className}`
31275
+ }, /*#__PURE__*/React__default['default'].createElement(Provider$4, {
31276
+ value: {
31277
+ state,
31278
+ dispatch
31279
+ }
31280
+ }, children.length ? children.map((child, i) => /*#__PURE__*/React__default['default'].cloneElement(child, {
31281
+ store: store$4,
31282
+ key: i
31283
+ })) : /*#__PURE__*/React__default['default'].cloneElement(children, {
31284
+ store: store$4
31285
+ })));
31286
+ };
31287
+
31085
31288
  function _extends$h() {
31086
31289
  _extends$h = Object.assign || function (target) {
31087
31290
  for (var i = 1; i < arguments.length; i++) {
@@ -32611,6 +32814,14 @@ const SubscriptionsMenu = props => {
32611
32814
  const {
32612
32815
  t
32613
32816
  } = useTranslation("dashboard");
32817
+ const {
32818
+ switchView
32819
+ } = usePelcro();
32820
+
32821
+ const displayRedeem = () => {
32822
+ return switchView("gift-redeem");
32823
+ };
32824
+
32614
32825
  return /*#__PURE__*/React__default['default'].createElement(Card, {
32615
32826
  id: "pelcro-dashboard-subscriptions-menu",
32616
32827
  className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
@@ -32649,22 +32860,23 @@ const SubscriptionsMenu = props => {
32649
32860
  className: "plc-w-4 plc-h-4 plc-mr-1"
32650
32861
  }),
32651
32862
  className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase plc-rounded-none hover:plc-bg-gray-100",
32652
- onClick: props.displayRedeem
32863
+ onClick: displayRedeem
32653
32864
  }, t("labels.redeemGift")))))));
32654
32865
  };
32655
32866
  const SubscriptionsItems = ({
32656
32867
  onClose,
32657
- cancelSubscription,
32658
- unSuspendSubscription,
32659
- reactivateSubscription,
32660
32868
  setProductAndPlan,
32661
32869
  setSubscriptionIdToRenew,
32662
- setView,
32663
32870
  getSubscriptionStatus,
32664
- disableSubmit,
32665
32871
  activeMenu,
32666
32872
  toggleActiveMenu
32667
32873
  }) => {
32874
+ const {
32875
+ state: {
32876
+ disableSubmit
32877
+ },
32878
+ dispatch
32879
+ } = React.useContext(store$4);
32668
32880
  const {
32669
32881
  t
32670
32882
  } = useTranslation("dashboard");
@@ -32696,7 +32908,14 @@ const SubscriptionsItems = ({
32696
32908
  switchView(null);
32697
32909
  onClose === null || onClose === void 0 ? void 0 : onClose();
32698
32910
  notify.confirm((onSuccess, onFailure) => {
32699
- cancelSubscription(sub.id, onSuccess, onFailure);
32911
+ dispatch({
32912
+ type: CANCEL_SUBSCRIPTION,
32913
+ payload: {
32914
+ subscription_id: sub.id,
32915
+ onSuccess,
32916
+ onFailure
32917
+ }
32918
+ });
32700
32919
  }, {
32701
32920
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
32702
32921
  loadingMessage: t("messages.subCancellation.loading"),
@@ -32713,7 +32932,12 @@ const SubscriptionsItems = ({
32713
32932
  return switchView("email-verify");
32714
32933
  }
32715
32934
 
32716
- reactivateSubscription(sub.id);
32935
+ dispatch({
32936
+ type: REACTIVATE_SUBSCRIPTION,
32937
+ payload: {
32938
+ subscription_id: sub.id
32939
+ }
32940
+ });
32717
32941
  }; // Renew click
32718
32942
 
32719
32943
 
@@ -32724,7 +32948,7 @@ const SubscriptionsItems = ({
32724
32948
  const plan = window.Pelcro.plan.getById(plan_id);
32725
32949
  setProductAndPlan(product, plan);
32726
32950
  setSubscriptionIdToRenew(sub.id);
32727
- setView("plan-select");
32951
+ switchView("plan-select");
32728
32952
  }; // Manage members click
32729
32953
 
32730
32954
 
@@ -32733,7 +32957,7 @@ const SubscriptionsItems = ({
32733
32957
  set({
32734
32958
  subscriptionToManageMembers
32735
32959
  });
32736
- setView("manage-members");
32960
+ switchView("manage-members");
32737
32961
  }; // Suspend click
32738
32962
 
32739
32963
 
@@ -32743,7 +32967,7 @@ const SubscriptionsItems = ({
32743
32967
  }
32744
32968
 
32745
32969
  setSubscriptionToSuspend(sub.id);
32746
- return setView("subscription-suspend");
32970
+ return switchView("subscription-suspend");
32747
32971
  }; // UnSuspend click
32748
32972
 
32749
32973
 
@@ -32754,7 +32978,14 @@ const SubscriptionsItems = ({
32754
32978
 
32755
32979
  onClose === null || onClose === void 0 ? void 0 : onClose();
32756
32980
  notify.confirm((onSuccess, onFailure) => {
32757
- unSuspendSubscription(sub.id, onSuccess, onFailure);
32981
+ dispatch({
32982
+ type: UNSUSPEND_SUBSCRIPTION,
32983
+ payload: {
32984
+ subscription_id: sub.id,
32985
+ onSuccess,
32986
+ onFailure
32987
+ }
32988
+ });
32758
32989
  }, {
32759
32990
  confirmMessage: t("messages.subUnSuspend.isSureToUnSuspend"),
32760
32991
  loadingMessage: t("messages.subUnSuspend.loading"),
@@ -33085,9 +33316,6 @@ const OrderItems = ({
33085
33316
  };
33086
33317
 
33087
33318
  const DonationsMenu = ({
33088
- reactivateSubscription,
33089
- disableSubmit,
33090
- cancelSubscription,
33091
33319
  getSubscriptionStatus,
33092
33320
  onClose
33093
33321
  }) => {
@@ -33098,6 +33326,12 @@ const DonationsMenu = ({
33098
33326
  switchView,
33099
33327
  setSubscriptionToCancel
33100
33328
  } = usePelcro();
33329
+ const {
33330
+ state: {
33331
+ disableSubmit
33332
+ },
33333
+ dispatch
33334
+ } = React.useContext(store$4);
33101
33335
  const subscriptions = getDonationSubs().sort((a, b) => a.expires_at - b.expires_at).sort((a, b) => a.renews_at - b.renews_at).map(sub => {
33102
33336
  // Cancel button click handlers
33103
33337
  const onCancelClick = () => {
@@ -33115,7 +33349,14 @@ const DonationsMenu = ({
33115
33349
  switchView(null);
33116
33350
  onClose === null || onClose === void 0 ? void 0 : onClose();
33117
33351
  notify.confirm((onSuccess, onFailure) => {
33118
- cancelSubscription(sub.id, onSuccess, onFailure);
33352
+ dispatch({
33353
+ type: CANCEL_SUBSCRIPTION,
33354
+ payload: {
33355
+ subscription_id: sub.id,
33356
+ onSuccess,
33357
+ onFailure
33358
+ }
33359
+ });
33119
33360
  }, {
33120
33361
  confirmMessage: t("messages.subCancellation.isSureToCancel"),
33121
33362
  loadingMessage: t("messages.subCancellation.loading"),
@@ -33132,7 +33373,12 @@ const DonationsMenu = ({
33132
33373
  return switchView("email-verify");
33133
33374
  }
33134
33375
 
33135
- reactivateSubscription(sub.id);
33376
+ dispatch({
33377
+ type: REACTIVATE_SUBSCRIPTION,
33378
+ payload: {
33379
+ subscription_id: sub.id
33380
+ }
33381
+ });
33136
33382
  };
33137
33383
 
33138
33384
  return /*#__PURE__*/React__default['default'].createElement("tr", {
@@ -33499,8 +33745,16 @@ const GiftsMenu = props => {
33499
33745
  const {
33500
33746
  t
33501
33747
  } = useTranslation("dashboard");
33748
+ const {
33749
+ switchView,
33750
+ set
33751
+ } = usePelcro();
33502
33752
  const 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 : [];
33503
33753
 
33754
+ const setIsRenewingGift = isRenewingGift => set({
33755
+ isRenewingGift
33756
+ });
33757
+
33504
33758
  const renderGiftRecipients = ({
33505
33759
  disableSubmit
33506
33760
  }) => {
@@ -33517,8 +33771,8 @@ const GiftsMenu = props => {
33517
33771
  const plan = window.Pelcro.plan.getById(planId);
33518
33772
  props === null || props === void 0 ? void 0 : props.setProductAndPlan(product, plan);
33519
33773
  props === null || props === void 0 ? void 0 : props.setSubscriptionIdToRenew(recipient.id);
33520
- props === null || props === void 0 ? void 0 : props.setIsRenewingGift(true);
33521
- props === null || props === void 0 ? void 0 : props.setView("plan-select");
33774
+ setIsRenewingGift(true);
33775
+ switchView("plan-select");
33522
33776
  };
33523
33777
 
33524
33778
  return /*#__PURE__*/React__default['default'].createElement("tr", {
@@ -33587,11 +33841,28 @@ const AddressesMenu = props => {
33587
33841
  const {
33588
33842
  t
33589
33843
  } = useTranslation("dashboard");
33844
+ const {
33845
+ switchView,
33846
+ set
33847
+ } = usePelcro();
33590
33848
  const [requestStates, setRequestStates] = React.useState({
33591
33849
  loading: false,
33592
33850
  success: false,
33593
33851
  failed: false
33594
33852
  });
33853
+
33854
+ const displayAddressCreate = () => {
33855
+ return switchView("address-create");
33856
+ };
33857
+
33858
+ const displayAddressEdit = e => {
33859
+ const address = e.currentTarget.dataset.key;
33860
+ set({
33861
+ addressIdToEdit: address
33862
+ });
33863
+ return switchView("address-edit");
33864
+ };
33865
+
33595
33866
  return /*#__PURE__*/React__default['default'].createElement(Card, {
33596
33867
  id: "pelcro-dashboard-addresses-menu",
33597
33868
  className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
@@ -33600,10 +33871,10 @@ const AddressesMenu = props => {
33600
33871
  }, /*#__PURE__*/React__default['default'].createElement(AddressesItems, {
33601
33872
  requestStates: requestStates,
33602
33873
  setRequestStates: setRequestStates,
33603
- displayAddressEdit: props === null || props === void 0 ? void 0 : props.displayAddressEdit
33874
+ displayAddressEdit: displayAddressEdit
33604
33875
  }), /*#__PURE__*/React__default['default'].createElement(AddNew, {
33605
33876
  title: t("labels.addAddress"),
33606
- onClick: () => props === null || props === void 0 ? void 0 : props.displayAddressCreate()
33877
+ onClick: displayAddressCreate
33607
33878
  }));
33608
33879
  };
33609
33880
 
@@ -33700,22 +33971,54 @@ const getPaymentCardIcon = name => {
33700
33971
  d: "M3 10h18M7 15h1m4 0h1m-7 4h12a3 3 0 003-3V8a3 3 0 00-3-3H6a3 3 0 00-3 3v8a3 3 0 003 3z"
33701
33972
  }));
33702
33973
  };
33974
+ const hasInvoices = () => {
33975
+ var _window$Pelcro$invoic, _window$Pelcro$invoic2;
33976
+
33977
+ const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
33978
+ return invoices.length > 0;
33979
+ };
33980
+ const showNewsletters = () => {
33981
+ var _ref, _window$Pelcro, _window$Pelcro$uiSett, _window$Pelcro$uiSett2;
33982
+
33983
+ const showNewslettersUiSettings = (_ref = ((_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$uiSett2 = _window$Pelcro$uiSett.newsletters) === null || _window$Pelcro$uiSett2 === void 0 ? void 0 : _window$Pelcro$uiSett2.length) > 0) !== null && _ref !== void 0 ? _ref : false;
33984
+ return showNewslettersUiSettings;
33985
+ };
33986
+ const hasDonationSubs = () => {
33987
+ var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r, _window$Pelcro$user$r2;
33988
+
33989
+ const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
33990
+ const canceledDonations = (_window$Pelcro$user$r = (_window$Pelcro$user$r2 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r2 === void 0 ? void 0 : _window$Pelcro$user$r2.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : [];
33991
+ return donations.length > 0 || canceledDonations.length > 0;
33992
+ };
33993
+ const hasActiveMemberships = () => {
33994
+ var _window$Pelcro$user$r3, _window$Pelcro$user$r4;
33995
+
33996
+ return (_window$Pelcro$user$r3 = (_window$Pelcro$user$r4 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r4 === void 0 ? void 0 : _window$Pelcro$user$r4.some(membership => membership.status === "active" && membership.subscription.ended_at === null)) !== null && _window$Pelcro$user$r3 !== void 0 ? _window$Pelcro$user$r3 : false;
33997
+ };
33703
33998
 
33704
33999
  const PaymentCardsMenu = props => {
33705
34000
  const {
33706
34001
  t
33707
34002
  } = useTranslation("dashboard");
34003
+ const {
34004
+ switchView
34005
+ } = usePelcro();
33708
34006
  const source = window.Pelcro.user.read().source;
34007
+
34008
+ const displaySourceCreate = () => {
34009
+ return switchView("payment-method-update");
34010
+ };
34011
+
33709
34012
  return /*#__PURE__*/React__default['default'].createElement(Card, {
33710
34013
  id: "pelcro-dashboard-payment-menu",
33711
34014
  className: "plc-max-w-100% md:plc-max-w-80% plc-m-auto",
33712
34015
  title: t("labels.paymentSource")
33713
34016
  }, source ? /*#__PURE__*/React__default['default'].createElement(PaymentCardsItems, {
33714
- displaySourceCreate: props === null || props === void 0 ? void 0 : props.displaySourceCreate,
34017
+ displaySourceCreate: displaySourceCreate,
33715
34018
  source: source
33716
34019
  }) : /*#__PURE__*/React__default['default'].createElement(AddNew, {
33717
34020
  title: t("labels.addCard"),
33718
- onClick: () => props === null || props === void 0 ? void 0 : props.displaySourceCreate()
34021
+ onClick: displaySourceCreate
33719
34022
  }));
33720
34023
  };
33721
34024
 
@@ -35348,625 +35651,399 @@ const SUB_MENUS = {
35348
35651
  LOGOUT: "logout",
35349
35652
  SAVED_ITEMS: "saved-items"
35350
35653
  };
35351
- /**
35352
- *
35353
- */
35354
-
35355
- function DashboardWithHook(props) {
35356
- React__default['default'].useEffect(() => {
35357
- var _props$onDisplay;
35654
+ const DashboardContent = props => {
35655
+ var _window$Pelcro$user$r, _window$Pelcro, _window$Pelcro$uiSett;
35358
35656
 
35359
- (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
35360
- }, []);
35657
+ const {
35658
+ state: {
35659
+ isOpen,
35660
+ activeDashboardLink,
35661
+ disableSubmit
35662
+ },
35663
+ dispatch
35664
+ } = React.useContext(store$4);
35361
35665
  const {
35362
35666
  switchView,
35363
- resetView,
35364
- logout,
35365
- set
35667
+ set,
35668
+ logout
35366
35669
  } = usePelcro();
35367
- return /*#__PURE__*/React__default['default'].createElement(DashboardWithTrans, {
35368
- setAddress: addressIdToEdit => set({
35369
- addressIdToEdit
35370
- }),
35371
- setSubscriptionIdToRenew: subscriptionIdToRenew => set({
35372
- subscriptionIdToRenew
35373
- }),
35374
- setIsRenewingGift: isRenewingGift => set({
35375
- isRenewingGift
35376
- }),
35377
- onClose: () => {
35378
- var _props$onClose;
35379
-
35380
- (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
35381
- resetView();
35382
- },
35383
- logout: logout,
35384
- setView: switchView,
35385
- setProductAndPlan: (product, plan, isGift) => set({
35386
- product,
35387
- plan,
35388
- isGift
35389
- })
35390
- });
35391
- }
35392
- DashboardWithHook.viewId = "dashboard";
35393
-
35394
- class Dashboard extends React.Component {
35395
- constructor(props) {
35396
- var _window$Pelcro$user$r, _window$Pelcro$user$r2;
35397
-
35398
- super(props);
35399
-
35400
- _defineProperty$3(this, "componentDidMount", () => {
35401
- var _ReactGA$event;
35402
-
35403
- this.setState({
35404
- isOpen: true
35405
- });
35406
- window.Pelcro.insight.track("Modal Displayed", {
35407
- name: "dashboard"
35408
- });
35409
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event = ReactGA.event) === null || _ReactGA$event === void 0 ? void 0 : _ReactGA$event.call(ReactGA, {
35410
- category: "VIEWS",
35411
- action: "Dashboard Modal Viewed",
35412
- nonInteraction: true
35413
- });
35414
- const {
35415
- addresses
35416
- } = window.Pelcro.user.read();
35417
- if (addresses) this.setState({
35418
- addresses: addresses
35419
- });
35420
- });
35421
-
35422
- _defineProperty$3(this, "componentWillUnmount", () => {
35423
- document.removeEventListener("click", this.hideMenuIfClickedOutside);
35424
- });
35425
-
35426
- _defineProperty$3(this, "initializeHideMenuHandler", () => {
35427
- document.addEventListener("click", this.hideMenuIfClickedOutside);
35428
- });
35429
-
35430
- _defineProperty$3(this, "hideMenuIfClickedOutside", event => {
35431
- const dashboardSubmenus = document.getElementById("pelcro-view-dashboard-submenus");
35432
- const didClickOutsideMenu = this.state.isOpen && this.menuRef.current && !this.menuRef.current.contains(event.target) && !(dashboardSubmenus !== null && dashboardSubmenus !== void 0 && dashboardSubmenus.contains(event.target));
35433
-
35434
- if (didClickOutsideMenu) {
35435
- this.setState({
35436
- isOpen: false,
35437
- activeDashboardLink: null
35438
- });
35439
- }
35440
- });
35441
-
35442
- _defineProperty$3(this, "setActiveDashboardLink", submenuName => {
35443
- this.setState({
35444
- activeDashboardLink: submenuName !== null && submenuName !== void 0 ? submenuName : null
35445
- });
35446
- });
35447
-
35448
- _defineProperty$3(this, "cancelSubscription", (subscription_id, onSuccess, onFailure) => {
35449
- // disable the Login button to prevent repeated clicks
35450
- window.Pelcro.subscription.cancel({
35451
- auth_token: window.Pelcro.user.read().auth_token,
35452
- subscription_id: subscription_id
35453
- }, (err, res) => {
35454
- var _ReactGA$event2;
35455
-
35456
- if (err) {
35457
- return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
35458
- }
35459
-
35460
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event2 = ReactGA.event) === null || _ReactGA$event2 === void 0 ? void 0 : _ReactGA$event2.call(ReactGA, {
35461
- category: "ACTIONS",
35462
- action: "Canceled",
35463
- nonInteraction: true
35464
- });
35465
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
35466
- });
35467
- });
35670
+ const {
35671
+ t
35672
+ } = useTranslation("dashboard");
35673
+ const menuRef = React.useRef(null);
35674
+ const user = window.Pelcro.user.read();
35675
+ const userHasName = user.first_name || user.last_name;
35676
+ const profilePicture = (_window$Pelcro$user$r = window.Pelcro.user.read().profile_photo) !== null && _window$Pelcro$user$r !== void 0 ? _window$Pelcro$user$r : userSolidIcon;
35677
+ const newsletters = (_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.newsletters;
35678
+ Array.isArray(newsletters) && newsletters.length > 0;
35468
35679
 
35469
- _defineProperty$3(this, "unSuspendSubscription", (subscription_id, onSuccess, onFailure) => {
35470
- window.Pelcro.subscription.update({
35471
- auth_token: window.Pelcro.user.read().auth_token,
35472
- subscription_id: subscription_id,
35473
- suspend: 0
35474
- }, (err, res) => {
35475
- var _ReactGA$event3;
35680
+ const initializeHideMenuHandler = () => {
35681
+ document.addEventListener("click", hideMenuIfClickedOutside);
35682
+ };
35476
35683
 
35477
- if (err) {
35478
- return onFailure === null || onFailure === void 0 ? void 0 : onFailure(err);
35479
- }
35684
+ const hideMenuIfClickedOutside = event => {
35685
+ const dashboardSubmenus = document.getElementById("pelcro-view-dashboard-submenus");
35686
+ const didClickOutsideMenu = isOpen && menuRef.current && !menuRef.current.contains(event.target) && !(dashboardSubmenus !== null && dashboardSubmenus !== void 0 && dashboardSubmenus.contains(event.target));
35480
35687
 
35481
- ReactGA === null || ReactGA === void 0 ? void 0 : (_ReactGA$event3 = ReactGA.event) === null || _ReactGA$event3 === void 0 ? void 0 : _ReactGA$event3.call(ReactGA, {
35482
- category: "ACTIONS",
35483
- action: "UnSuspended",
35484
- nonInteraction: true
35485
- });
35486
- onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(res);
35688
+ if (didClickOutsideMenu) {
35689
+ dispatch({
35690
+ type: CLOSE_DASHBOARD
35487
35691
  });
35488
- });
35489
-
35490
- _defineProperty$3(this, "displayRedeem", () => {
35491
- return this.props.setView("gift-redeem");
35492
- });
35493
-
35494
- _defineProperty$3(this, "displaySourceCreate", () => {
35495
- return this.props.setView("payment-method-update");
35496
- });
35497
-
35498
- _defineProperty$3(this, "displayUserEdit", () => {
35499
- return this.props.setView("user-edit");
35500
- });
35501
-
35502
- _defineProperty$3(this, "displayChangePassword", () => {
35503
- return this.props.setView("password-change");
35504
- });
35692
+ }
35693
+ };
35505
35694
 
35506
- _defineProperty$3(this, "displayNewsletterUpdate", () => {
35507
- return this.props.setView("newsletter-update");
35695
+ const setActiveDashboardLink = submenuName => {
35696
+ dispatch({
35697
+ type: SET_ACTIVE_DASHBOARD_LINK,
35698
+ payload: submenuName !== null && submenuName !== void 0 ? submenuName : null
35508
35699
  });
35700
+ };
35509
35701
 
35510
- _defineProperty$3(this, "displayQRCode", () => {
35511
- return this.props.setView("qrcode");
35512
- });
35702
+ const displayProfilePicChange = () => {
35703
+ return switchView("profile-picture");
35704
+ };
35513
35705
 
35514
- _defineProperty$3(this, "displayProductSelect", ({
35706
+ const setProductAndPlan = (product, plan, isGift) => {
35707
+ set({
35708
+ product,
35709
+ plan,
35515
35710
  isGift
35516
- }) => {
35517
- if (isGift) {
35518
- this.props.setProductAndPlan(null, null, true);
35519
- }
35520
-
35521
- return this.props.setView("plan-select");
35522
- });
35523
-
35524
- _defineProperty$3(this, "displayAddressCreate", () => {
35525
- return this.props.setView("address-create");
35526
35711
  });
35712
+ };
35527
35713
 
35528
- _defineProperty$3(this, "displayAddressEdit", e => {
35529
- const address = e.currentTarget.dataset.key;
35530
- this.props.setAddress(address);
35531
- return this.props.setView("address-edit");
35532
- });
35714
+ const displayProductSelect = ({
35715
+ isGift
35716
+ }) => {
35717
+ if (isGift) {
35718
+ setProductAndPlan(null, null, true);
35719
+ }
35533
35720
 
35534
- _defineProperty$3(this, "displayProfilePicChange", () => {
35535
- return this.props.setView("profile-picture");
35536
- });
35721
+ return switchView("plan-select");
35722
+ };
35537
35723
 
35538
- _defineProperty$3(this, "getSubscriptionStatusText", subscription => {
35539
- if (subscription.status === "canceled") {
35540
- const cancelDate = new Date(subscription.canceled_at);
35541
- const formattedCancelDate = new Intl.DateTimeFormat("en-CA").format(cancelDate);
35542
- return `${this.locale("labels.canceledOn")} ${formattedCancelDate}`;
35543
- }
35724
+ const getSubscriptionStatusText = subscription => {
35725
+ if (subscription.status === "canceled") {
35726
+ const cancelDate = new Date(subscription.canceled_at);
35727
+ const formattedCancelDate = new Intl.DateTimeFormat("en-CA").format(cancelDate);
35728
+ return `${t("labels.canceledOn")} ${formattedCancelDate}`;
35729
+ }
35544
35730
 
35545
- if (subscription.status === "incomplete") {
35546
- return `${this.locale("labels.status.incomplete")}`;
35547
- }
35731
+ if (subscription.status === "incomplete") {
35732
+ return `${t("labels.status.incomplete")}`;
35733
+ }
35548
35734
 
35549
- if (subscription.status === "extended") {
35550
- // DateTime from BE is missing 3 zeros so we add them before instancing a date
35551
- const expiryDate = new Date(Number(`${subscription.end_date}000`));
35552
- const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35553
- return `${this.locale("labels.until")} ${formattedExpiryDate}`;
35554
- }
35735
+ if (subscription.status === "extended") {
35736
+ // DateTime from BE is missing 3 zeros so we add them before instancing a date
35737
+ const expiryDate = new Date(Number(`${subscription.end_date}000`));
35738
+ const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35739
+ return `${t("labels.until")} ${formattedExpiryDate}`;
35740
+ }
35555
35741
 
35556
- if (subscription.cancel_at_period_end) {
35557
- // DateTime from BE is missing 3 zeros so we add them before instancing a date
35558
- const expiryDate = new Date(Number(`${subscription.expires_at}000`));
35559
- const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35560
- return `${this.locale("labels.expiresOn")} ${formattedExpiryDate}`;
35561
- }
35742
+ if (subscription.cancel_at_period_end) {
35743
+ // DateTime from BE is missing 3 zeros so we add them before instancing a date
35744
+ const expiryDate = new Date(Number(`${subscription.expires_at}000`));
35745
+ const formattedExpiryDate = new Intl.DateTimeFormat("en-CA").format(expiryDate);
35746
+ return `${t("labels.expiresOn")} ${formattedExpiryDate}`;
35747
+ }
35562
35748
 
35563
- const renewDate = new Date(Number(`${subscription.renews_at}000`));
35564
- const formattedRenewDate = new Intl.DateTimeFormat("en-CA").format(renewDate);
35565
- return `${this.locale("labels.renewsOn")} ${formattedRenewDate}`;
35566
- });
35749
+ const renewDate = new Date(Number(`${subscription.renews_at}000`));
35750
+ const formattedRenewDate = new Intl.DateTimeFormat("en-CA").format(renewDate);
35751
+ return `${t("labels.renewsOn")} ${formattedRenewDate}`;
35752
+ };
35567
35753
 
35568
- _defineProperty$3(this, "reactivateSubscription", subscription_id => {
35569
- // disable the Login button to prevent repeated clicks
35570
- this.setState({
35571
- disableSubmit: true
35572
- });
35573
- window.Pelcro.subscription.reactivate({
35574
- auth_token: window.Pelcro.user.read().auth_token,
35575
- subscription_id: subscription_id
35576
- }, (err, res) => {
35577
- this.setState({
35578
- disableSubmit: false
35579
- });
35580
- this.props.onClose();
35754
+ const getSubscriptionStatus = sub => {
35755
+ const isSubscriptionEndingSoon = sub => {
35756
+ const weekFromNow = new Date().getTime() + 7 * 24 * 60 * 60 * 1000;
35757
+ const endingAt = new Date(sub.expires_at * 1000).getTime();
35758
+ return weekFromNow > endingAt && sub.cancel_at_period_end;
35759
+ };
35581
35760
 
35582
- if (err) {
35583
- return notify.error(this.locale("messages.subReactivation.error"));
35584
- }
35761
+ const isSubscriptionInTrial = sub => {
35762
+ if (!sub.trial_end) {
35763
+ return;
35764
+ }
35585
35765
 
35586
- return notify.success(this.locale("messages.subReactivation.success"));
35587
- });
35588
- });
35766
+ const now = new Date().getTime();
35767
+ const trialEndDate = new Date(sub.trial_end).getTime();
35768
+ return now < trialEndDate;
35769
+ };
35589
35770
 
35590
- _defineProperty$3(this, "getSubscriptionStatus", sub => {
35591
- const isSubscriptionEndingSoon = sub => {
35592
- const weekFromNow = new Date().getTime() + 7 * 24 * 60 * 60 * 1000;
35593
- const endingAt = new Date(sub.expires_at * 1000).getTime();
35594
- return weekFromNow > endingAt && sub.cancel_at_period_end;
35771
+ if (isSubscriptionEndingSoon(sub)) {
35772
+ return {
35773
+ title: t("labels.status.endingSoon"),
35774
+ content: getSubscriptionStatusText(sub),
35775
+ textColor: "plc-text-orange-700",
35776
+ bgColor: "plc-bg-orange-100",
35777
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35595
35778
  };
35779
+ }
35596
35780
 
35597
- const isSubscriptionInTrial = sub => {
35598
- if (!sub.trial_end) {
35599
- return;
35600
- }
35601
-
35602
- const now = new Date().getTime();
35603
- const trialEndDate = new Date(sub.trial_end).getTime();
35604
- return now < trialEndDate;
35781
+ if (isSubscriptionInTrial(sub)) {
35782
+ return {
35783
+ title: t("labels.status.inTrial"),
35784
+ content: getSubscriptionStatusText(sub),
35785
+ textColor: "plc-text-yellow-700",
35786
+ bgColor: "plc-bg-yellow-100",
35787
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null)
35605
35788
  };
35789
+ }
35606
35790
 
35607
- if (isSubscriptionEndingSoon(sub)) {
35608
- return {
35609
- title: this.locale("labels.status.endingSoon"),
35610
- content: this.getSubscriptionStatusText(sub),
35611
- textColor: "plc-text-orange-700",
35612
- bgColor: "plc-bg-orange-100",
35613
- icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35614
- };
35615
- }
35616
-
35617
- if (isSubscriptionInTrial(sub)) {
35618
- return {
35619
- title: this.locale("labels.status.inTrial"),
35620
- content: this.getSubscriptionStatusText(sub),
35621
- textColor: "plc-text-yellow-700",
35622
- bgColor: "plc-bg-yellow-100",
35623
- icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null)
35624
- };
35625
- }
35626
-
35627
- if (sub.status === "incomplete") {
35628
- return {
35629
- title: this.locale("labels.status.incomplete"),
35630
- content: this.getSubscriptionStatusText(sub),
35631
- textColor: "plc-text-orange-700",
35632
- bgColor: "plc-bg-orange-100",
35633
- icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35634
- };
35635
- }
35636
-
35637
- if (sub.status === "canceled") {
35638
- return {
35639
- title: this.locale("labels.status.canceled"),
35640
- content: this.getSubscriptionStatusText(sub),
35641
- textColor: "plc-text-red-700",
35642
- bgColor: "plc-bg-red-100",
35643
- icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35644
- };
35645
- }
35791
+ if (sub.status === "incomplete") {
35792
+ return {
35793
+ title: t("labels.status.incomplete"),
35794
+ content: getSubscriptionStatusText(sub),
35795
+ textColor: "plc-text-orange-700",
35796
+ bgColor: "plc-bg-orange-100",
35797
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35798
+ };
35799
+ }
35646
35800
 
35801
+ if (sub.status === "canceled") {
35647
35802
  return {
35648
- title: this.locale("labels.status.active"),
35649
- content: this.getSubscriptionStatusText(sub),
35650
- textColor: "plc-text-green-700",
35651
- bgColor: "plc-bg-green-100",
35652
- icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null)
35803
+ title: t("labels.status.canceled"),
35804
+ content: getSubscriptionStatusText(sub),
35805
+ textColor: "plc-text-red-700",
35806
+ bgColor: "plc-bg-red-100",
35807
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgExclamation, null)
35653
35808
  };
35654
- });
35809
+ }
35655
35810
 
35656
- _defineProperty$3(this, "renderAddresses", () => {
35657
- const addresses = this.state.addresses && this.state.addresses.map((address, index) => {
35658
- return /*#__PURE__*/React__default['default'].createElement("tr", {
35659
- key: "dashboard-address-" + address.id
35660
- }, /*#__PURE__*/React__default['default'].createElement("td", {
35661
- className: "plc-pr-2 plc-text-gray-400 plc-truncate"
35662
- }, /*#__PURE__*/React__default['default'].createElement("span", {
35663
- className: "plc-font-semibold plc-text-gray-600"
35664
- }, address.city ? `${address.city},` : null, " ", address.country), " ", /*#__PURE__*/React__default['default'].createElement("span", {
35665
- title: address.line1
35666
- }, address.line1), /*#__PURE__*/React__default['default'].createElement("div", {
35667
- className: "plc-flex plc-mb-2 plc-mt-1"
35668
- }, /*#__PURE__*/React__default['default'].createElement("span", {
35669
- className: "plc-rounded-full plc-bg-gray-200 plc-text-black plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-capitalize"
35670
- }, address.type === "shipping" ? this.locale("labels.shipping") : this.locale("labels.billing")), address.is_default && /*#__PURE__*/React__default['default'].createElement("span", {
35671
- className: "plc-rounded-full plc-bg-gray-800 plc-text-white plc-inline-flex plc-items-start plc-py-1 plc-px-4 plc-text-sm plc-ml-2"
35672
- }, this.locale("labels.default")))), /*#__PURE__*/React__default['default'].createElement("td", null, /*#__PURE__*/React__default['default'].createElement(Button, {
35673
- variant: "icon",
35674
- className: "plc-text-gray-500",
35675
- icon: /*#__PURE__*/React__default['default'].createElement(SvgEdit, null),
35676
- id: "pelcro-button-update-address-" + index,
35677
- "data-key": address.id,
35678
- onClick: this.displayAddressEdit
35679
- })));
35680
- });
35681
- return /*#__PURE__*/React__default['default'].createElement("table", {
35682
- className: "plc-w-full plc-table-fixed"
35683
- }, /*#__PURE__*/React__default['default'].createElement("thead", {
35684
- className: "plc-text-xs plc-font-semibold plc-tracking-wider plc-text-gray-400 plc-uppercase "
35685
- }, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("th", {
35686
- className: "plc-w-10/12"
35687
- }, this.locale("labels.address")), /*#__PURE__*/React__default['default'].createElement("th", {
35688
- className: "plc-w-2/12"
35689
- }, this.locale("labels.edit")))), /*#__PURE__*/React__default['default'].createElement("tbody", null, /*#__PURE__*/React__default['default'].createElement("tr", {
35690
- className: "plc-h-4"
35691
- }), addresses, /*#__PURE__*/React__default['default'].createElement("tr", null, /*#__PURE__*/React__default['default'].createElement("td", {
35692
- colSpan: "2",
35693
- className: "plc-p-1"
35694
- }, /*#__PURE__*/React__default['default'].createElement(Button, {
35695
- variant: "ghost",
35696
- icon: /*#__PURE__*/React__default['default'].createElement(SvgPlus, {
35697
- className: "plc-w-4 plc-mr-1"
35698
- }),
35699
- className: "plc-w-full plc-h-8 plc-font-semibold plc-tracking-wider plc-text-gray-900 plc-uppercase hover:plc-bg-gray-100",
35700
- onClick: this.displayAddressCreate
35701
- }, this.locale("labels.addAddress"))))));
35811
+ return {
35812
+ title: t("labels.status.active"),
35813
+ content: getSubscriptionStatusText(sub),
35814
+ textColor: "plc-text-green-700",
35815
+ bgColor: "plc-bg-green-100",
35816
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgCheckMark, null)
35817
+ };
35818
+ };
35819
+
35820
+ const setSubscriptionIdToRenew = subscriptionIdToRenew => {
35821
+ set({
35822
+ subscriptionIdToRenew
35702
35823
  });
35824
+ };
35703
35825
 
35704
- _defineProperty$3(this, "closeDashboard", () => {
35705
- this.setState({
35706
- isOpen: false,
35707
- activeDashboardLink: null
35708
- });
35826
+ const closeDashboard = () => {
35827
+ dispatch({
35828
+ type: CLOSE_DASHBOARD
35709
35829
  });
35830
+ };
35710
35831
 
35711
- this.state = {
35712
- isOpen: false,
35713
- activeDashboardLink: null,
35714
- subscriptions: window.Pelcro.subscription.list(),
35715
- 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 : [],
35716
- disableSubmit: false,
35717
- addresses: []
35832
+ React.useEffect(() => {
35833
+ return () => {
35834
+ document.removeEventListener("click", hideMenuIfClickedOutside);
35718
35835
  };
35719
- this.site = window.Pelcro.site.read();
35720
- this.locale = this.props.t;
35721
- this.user = window.Pelcro.user.read();
35722
- this.menuRef = /*#__PURE__*/React__default['default'].createRef();
35723
- }
35724
-
35725
- render() {
35726
- var _window$Pelcro$user$r3, _window$Pelcro, _window$Pelcro$uiSett;
35727
-
35728
- const {
35729
- isOpen
35730
- } = this.state;
35731
- const userHasName = this.user.first_name || this.user.last_name;
35732
- const profilePicture = (_window$Pelcro$user$r3 = window.Pelcro.user.read().profile_photo) !== null && _window$Pelcro$user$r3 !== void 0 ? _window$Pelcro$user$r3 : userSolidIcon;
35733
- const newsletters = (_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.newsletters;
35734
- Array.isArray(newsletters) && newsletters.length > 0;
35735
- return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Transition, {
35736
- className: "plc-fixed plc-inset-y-0 plc-left-0 plc-h-full lg:plc-w-3/12 plc-w-full plc-overflow-y-auto plc-text-left plc-bg-white plc-shadow-xl plc-z-max",
35737
- show: isOpen,
35738
- enter: "plc-transform plc-transition plc-duration-500",
35739
- enterFrom: "plc--translate-x-full",
35740
- enterTo: "plc-translate-x-0",
35741
- afterEnter: this.initializeHideMenuHandler,
35742
- leave: "plc-transform plc-transition plc-duration-500",
35743
- leaveFrom: "plc-translate-x-0",
35744
- leaveTo: "plc--translate-x-full",
35745
- afterLeave: this.props.onClose
35746
- }, /*#__PURE__*/React__default['default'].createElement("div", {
35747
- id: "pelcro-view-dashboard",
35748
- ref: this.menuRef
35749
- }, /*#__PURE__*/React__default['default'].createElement("header", {
35750
- className: "plc-bg-gray-200 plc-flex plc-py-5"
35751
- }, /*#__PURE__*/React__default['default'].createElement("div", {
35752
- className: "plc-flex plc-items-center"
35753
- }, /*#__PURE__*/React__default['default'].createElement("div", {
35754
- className: "plc-flex plc-justify-center plc-ml-3 sm:plc-ml-6 plc-flex-shrink-0"
35755
- }, /*#__PURE__*/React__default['default'].createElement("div", {
35756
- className: "plc-relative plc-flex-shrink-0"
35757
- }, /*#__PURE__*/React__default['default'].createElement("img", {
35758
- className: "pelcro-user-profile-picture plc-bg-gray-300 plc-cursor-pointer plc-h-10 plc-rounded-md plc-w-10",
35759
- src: profilePicture,
35760
- alt: "profile picture",
35761
- onClick: this.displayProfilePicChange
35762
- }))), /*#__PURE__*/React__default['default'].createElement("div", {
35763
- className: "plc-flex plc-flex-col plc-justify-between plc-flex-grow plc-w-56 plc-ml-4 plc-break-words sm:plc-w-auto"
35764
- }, userHasName && /*#__PURE__*/React__default['default'].createElement("p", {
35765
- className: "plc-font-bold plc-break-all"
35766
- }, this.user.first_name, " ", this.user.last_name), /*#__PURE__*/React__default['default'].createElement("p", {
35767
- className: `plc-m-0 plc-text-sm plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-lg plc-font-bold plc-mt-auto"}`
35768
- }, this.user.email)), /*#__PURE__*/React__default['default'].createElement("div", {
35769
- className: "lg:plc-hidden"
35770
- }, /*#__PURE__*/React__default['default'].createElement(Button, {
35771
- variant: "ghost",
35772
- type: "button",
35773
- className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-5 plc-right-10",
35774
- onClick: this.closeDashboard
35775
- }, /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
35776
- className: "plc-fill-current"
35777
- }))))), /*#__PURE__*/React__default['default'].createElement("section", {
35778
- className: "plc-mt-6 plc-shadow-sm"
35779
- }, /*#__PURE__*/React__default['default'].createElement("header", {
35780
- className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35781
- }, /*#__PURE__*/React__default['default'].createElement("p", {
35782
- className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35783
- }, this.locale("labels.mySettings"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35784
- name: SUB_MENUS.PROFILE,
35785
- icon: /*#__PURE__*/React__default['default'].createElement(SvgUser, {
35786
- className: "plc-w-6 plc-h-6 plc-mr-2"
35787
- }),
35788
- title: this.locale("labels.profile"),
35789
- setActiveDashboardLink: this.setActiveDashboardLink,
35790
- activeDashboardLink: this.state.activeDashboardLink
35791
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35792
- name: SUB_MENUS.QRCODE,
35793
- icon: /*#__PURE__*/React__default['default'].createElement(SvgQrcode, {
35794
- className: "plc-w-6 plc-h-6 plc-mr-2"
35795
- }),
35796
- title: "My QR code",
35797
- setActiveDashboardLink: this.setActiveDashboardLink,
35798
- activeDashboardLink: this.state.activeDashboardLink
35799
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35800
- name: SUB_MENUS.PASSWORDCHANGE,
35801
- icon: /*#__PURE__*/React__default['default'].createElement(SvgKey, {
35802
- className: "plc-w-6 plc-h-6 plc-mr-2"
35803
- }),
35804
- title: this.locale("labels.changePassword"),
35805
- setActiveDashboardLink: this.setActiveDashboardLink,
35806
- activeDashboardLink: this.state.activeDashboardLink
35807
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35808
- name: SUB_MENUS.SAVED_ITEMS,
35809
- icon: /*#__PURE__*/React__default['default'].createElement(SvgBookmark, null),
35810
- title: this.locale("labels.savedItems.label"),
35811
- setActiveDashboardLink: this.setActiveDashboardLink,
35812
- activeDashboardLink: this.state.activeDashboardLink
35813
- }), /*#__PURE__*/React__default['default'].createElement("header", {
35814
- className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35815
- }, /*#__PURE__*/React__default['default'].createElement("p", {
35816
- className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35817
- }, this.locale("labels.accountSettings"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35818
- name: SUB_MENUS.PAYMENT_CARDS,
35819
- icon: /*#__PURE__*/React__default['default'].createElement(SvgPaymentCard, null),
35820
- title: this.locale("labels.paymentSource"),
35821
- setActiveDashboardLink: this.setActiveDashboardLink,
35822
- activeDashboardLink: this.state.activeDashboardLink
35823
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35824
- name: SUB_MENUS.ADDRESSES,
35825
- icon: /*#__PURE__*/React__default['default'].createElement(SvgLocationPin, null),
35826
- title: this.locale("labels.addresses"),
35827
- setActiveDashboardLink: this.setActiveDashboardLink,
35828
- activeDashboardLink: this.state.activeDashboardLink
35829
- }), /*#__PURE__*/React__default['default'].createElement("header", {
35830
- className: "plc-pl-4 plc-my-2 sm:plc-pl-8"
35831
- }, /*#__PURE__*/React__default['default'].createElement("p", {
35832
- className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35833
- }, this.locale("labels.purchases"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35834
- name: SUB_MENUS.SUBSCRIPTIONS,
35835
- icon: /*#__PURE__*/React__default['default'].createElement(SvgSubscription, {
35836
- className: "plc-w-10 plc-h-10 plc-pt-2 plc-pr-1 plc--ml-2"
35837
- }),
35838
- title: this.locale("labels.subscriptions"),
35839
- setActiveDashboardLink: this.setActiveDashboardLink,
35840
- activeDashboardLink: this.state.activeDashboardLink
35841
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35842
- show: showNewsletters(),
35843
- name: SUB_MENUS.NEWSLETTERS,
35844
- icon: /*#__PURE__*/React__default['default'].createElement(SvgNewsletter, {
35845
- className: "plc-transform plc--translate-x-1 plc-scale-105 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35846
- }),
35847
- title: this.locale("labels.Newsletters"),
35848
- setActiveDashboardLink: this.setActiveDashboardLink,
35849
- activeDashboardLink: this.state.activeDashboardLink
35850
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35851
- show: hasActiveMemberships(),
35852
- name: SUB_MENUS.MEMBERSHIPS,
35853
- icon: /*#__PURE__*/React__default['default'].createElement(SvgMemberships, {
35854
- className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35855
- }),
35856
- title: this.locale("labels.memberships"),
35857
- setActiveDashboardLink: this.setActiveDashboardLink,
35858
- activeDashboardLink: this.state.activeDashboardLink
35859
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35860
- show: hasDonationSubs(),
35861
- name: SUB_MENUS.DONATIONS,
35862
- icon: /*#__PURE__*/React__default['default'].createElement(SvgDonate, {
35863
- className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35864
- }),
35865
- title: this.locale("labels.donations"),
35866
- setActiveDashboardLink: this.setActiveDashboardLink,
35867
- activeDashboardLink: this.state.activeDashboardLink
35868
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35869
- name: SUB_MENUS.GIFTS,
35870
- icon: /*#__PURE__*/React__default['default'].createElement(SvgGift, null),
35871
- title: this.locale("labels.gifts"),
35872
- setActiveDashboardLink: this.setActiveDashboardLink,
35873
- activeDashboardLink: this.state.activeDashboardLink
35874
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35875
- show: window.Pelcro.site.read().ecommerce_enabled,
35876
- name: SUB_MENUS.ORDERS,
35877
- icon: /*#__PURE__*/React__default['default'].createElement(SvgShopping, null),
35878
- title: this.locale("labels.orders.label"),
35879
- setActiveDashboardLink: this.setActiveDashboardLink,
35880
- activeDashboardLink: this.state.activeDashboardLink
35881
- }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35882
- show: hasInvoices(),
35883
- name: SUB_MENUS.INVOICES,
35884
- icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, null),
35885
- title: this.locale("labels.invoices"),
35886
- setActiveDashboardLink: this.setActiveDashboardLink,
35887
- activeDashboardLink: this.state.activeDashboardLink
35888
- })), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35889
- name: SUB_MENUS.LOGOUT,
35890
- icon: /*#__PURE__*/React__default['default'].createElement(SvgExit, null),
35891
- title: this.locale("labels.logout"),
35892
- setActiveDashboardLink: this.setActiveDashboardLink,
35893
- activeDashboardLink: this.state.activeDashboardLink
35894
- }))), this.state.activeDashboardLink && isOpen && /*#__PURE__*/React__default['default'].createElement("div", {
35895
- id: "pelcro-view-dashboard-submenus",
35896
- className: "plc-fixed plc-inset-y-0 plc-right-0 plc-h-full lg:plc-w-9/12 plc-w-full plc-bg-gray-100 plc-z-max plc-overflow-auto"
35897
- }, this.state.activeDashboardLink === SUB_MENUS.PROFILE && /*#__PURE__*/React__default['default'].createElement(ProfileMenu, null), this.state.activeDashboardLink === SUB_MENUS.QRCODE && /*#__PURE__*/React__default['default'].createElement(QRCodeMenu, null), this.state.activeDashboardLink === SUB_MENUS.PASSWORDCHANGE && /*#__PURE__*/React__default['default'].createElement(PasswordChangeMenu, null), this.state.activeDashboardLink === SUB_MENUS.SAVED_ITEMS && /*#__PURE__*/React__default['default'].createElement(SavedItemsMenu, null), this.state.activeDashboardLink === SUB_MENUS.PAYMENT_CARDS && /*#__PURE__*/React__default['default'].createElement(PaymentCardsMenu, {
35898
- displaySourceCreate: this.displaySourceCreate
35899
- }), this.state.activeDashboardLink === SUB_MENUS.ADDRESSES && /*#__PURE__*/React__default['default'].createElement(AddressesMenu, {
35900
- displayAddressCreate: this.displayAddressCreate,
35901
- displayAddressEdit: this.displayAddressEdit
35902
- }), this.state.activeDashboardLink === SUB_MENUS.SUBSCRIPTIONS && /*#__PURE__*/React__default['default'].createElement(SubscriptionsMenu // getSubscriptionStatus={this.getSubscriptionStatus}
35903
- , {
35904
- displayProductSelect: this.displayProductSelect,
35905
- displayRedeem: this.displayRedeem,
35906
- cancelSubscription: this.cancelSubscription,
35907
- unSuspendSubscription: this.unSuspendSubscription,
35908
- reactivateSubscription: this.reactivateSubscription,
35909
- setProductAndPlan: this.props.setProductAndPlan,
35910
- setSubscriptionIdToRenew: this.props.setSubscriptionIdToRenew,
35911
- setView: this.props.setView,
35912
- getSubscriptionStatus: this.getSubscriptionStatus,
35913
- disableSubmit: this.state.disableSubmit
35914
- }), this.state.activeDashboardLink === SUB_MENUS.MEMBERSHIPS && /*#__PURE__*/React__default['default'].createElement(MembershipsMenu, {
35915
- getSubscriptionStatus: this.getSubscriptionStatus
35916
- }), this.state.activeDashboardLink === SUB_MENUS.NEWSLETTERS && /*#__PURE__*/React__default['default'].createElement(NewslettersMenu, null), this.state.activeDashboardLink === SUB_MENUS.DONATIONS && /*#__PURE__*/React__default['default'].createElement(DonationsMenu, {
35917
- cancelSubscription: this.cancelSubscription,
35918
- reactivateSubscription: this.reactivateSubscription,
35919
- disableSubmit: this.state.disableSubmit,
35920
- getSubscriptionStatus: this.getSubscriptionStatus
35921
- }), this.state.activeDashboardLink === SUB_MENUS.GIFTS && /*#__PURE__*/React__default['default'].createElement(GiftsMenu, {
35922
- getSubscriptionStatus: this.getSubscriptionStatus,
35923
- displayProductSelect: this.displayProductSelect,
35924
- setProductAndPlan: this.props.setProductAndPlan,
35925
- setSubscriptionIdToRenew: this.props.setSubscriptionIdToRenew,
35926
- setIsRenewingGift: this.props.setIsRenewingGift,
35927
- setView: this.props.setView,
35928
- disableSubmit: this.state.disableSubmit
35929
- }), this.state.activeDashboardLink === SUB_MENUS.ORDERS && /*#__PURE__*/React__default['default'].createElement(OrdersMenu, null), this.state.activeDashboardLink === SUB_MENUS.INVOICES && /*#__PURE__*/React__default['default'].createElement(InvoicesMenu, null), this.state.activeDashboardLink === SUB_MENUS.LOGOUT && this.props.logout(), /*#__PURE__*/React__default['default'].createElement(Button, {
35930
- variant: "ghost",
35931
- type: "button",
35932
- className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-2 plc-right-2 md:plc-top-5 md:plc-right-10",
35933
- onClick: this.closeDashboard
35934
- }, /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
35935
- className: "plc-fill-current"
35936
- }))));
35937
- }
35938
-
35939
- }
35940
-
35941
- function hasInvoices() {
35942
- var _window$Pelcro$invoic, _window$Pelcro$invoic2;
35943
-
35944
- const invoices = (_window$Pelcro$invoic = (_window$Pelcro$invoic2 = window.Pelcro.invoice.list()) === null || _window$Pelcro$invoic2 === void 0 ? void 0 : _window$Pelcro$invoic2.filter(invoice => invoice.total > 0)) !== null && _window$Pelcro$invoic !== void 0 ? _window$Pelcro$invoic : [];
35945
- return invoices.length > 0;
35946
- }
35947
-
35948
- function showNewsletters() {
35949
- var _ref, _window$Pelcro2, _window$Pelcro2$uiSet, _window$Pelcro2$uiSet2;
35950
-
35951
- const showNewslettersUiSettings = (_ref = ((_window$Pelcro2 = window.Pelcro) === null || _window$Pelcro2 === void 0 ? void 0 : (_window$Pelcro2$uiSet = _window$Pelcro2.uiSettings) === null || _window$Pelcro2$uiSet === void 0 ? void 0 : (_window$Pelcro2$uiSet2 = _window$Pelcro2$uiSet.newsletters) === null || _window$Pelcro2$uiSet2 === void 0 ? void 0 : _window$Pelcro2$uiSet2.length) > 0) !== null && _ref !== void 0 ? _ref : false;
35952
- return showNewslettersUiSettings;
35953
- }
35836
+ }, []);
35837
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(Transition, {
35838
+ className: "plc-fixed plc-inset-y-0 plc-left-0 plc-h-full lg:plc-w-3/12 plc-w-full plc-overflow-y-auto plc-text-left plc-bg-white plc-shadow-xl plc-z-max",
35839
+ show: isOpen,
35840
+ enter: "plc-transform plc-transition plc-duration-500",
35841
+ enterFrom: "plc--translate-x-full",
35842
+ enterTo: "plc-translate-x-0",
35843
+ afterEnter: initializeHideMenuHandler,
35844
+ leave: "plc-transform plc-transition plc-duration-500",
35845
+ leaveFrom: "plc-translate-x-0",
35846
+ leaveTo: "plc--translate-x-full",
35847
+ afterLeave: props === null || props === void 0 ? void 0 : props.onClose
35848
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
35849
+ id: "pelcro-view-dashboard",
35850
+ ref: menuRef
35851
+ }, /*#__PURE__*/React__default['default'].createElement("header", {
35852
+ className: "plc-bg-gray-200 plc-flex plc-py-5"
35853
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
35854
+ className: "plc-flex plc-items-center"
35855
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
35856
+ className: "plc-flex plc-justify-center plc-ml-3 sm:plc-ml-6 plc-flex-shrink-0"
35857
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
35858
+ className: "plc-relative plc-flex-shrink-0"
35859
+ }, /*#__PURE__*/React__default['default'].createElement("img", {
35860
+ className: "pelcro-user-profile-picture plc-bg-gray-300 plc-cursor-pointer plc-h-10 plc-rounded-md plc-w-10",
35861
+ src: profilePicture,
35862
+ alt: "profile picture",
35863
+ onClick: displayProfilePicChange
35864
+ }))), /*#__PURE__*/React__default['default'].createElement("div", {
35865
+ className: "plc-flex plc-flex-col plc-justify-between plc-flex-grow plc-w-56 plc-ml-4 plc-break-words sm:plc-w-auto"
35866
+ }, userHasName && /*#__PURE__*/React__default['default'].createElement("p", {
35867
+ className: "plc-font-bold plc-break-all"
35868
+ }, user.first_name, " ", user.last_name), /*#__PURE__*/React__default['default'].createElement("p", {
35869
+ className: `plc-m-0 plc-text-sm plc-break-all ${userHasName ? "plc-text-sm" : "plc-text-lg plc-font-bold plc-mt-auto"}`
35870
+ }, user.email)), /*#__PURE__*/React__default['default'].createElement("div", {
35871
+ className: "lg:plc-hidden"
35872
+ }, /*#__PURE__*/React__default['default'].createElement(Button, {
35873
+ variant: "ghost",
35874
+ type: "button",
35875
+ className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-5 plc-right-10",
35876
+ onClick: closeDashboard
35877
+ }, /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
35878
+ className: "plc-fill-current"
35879
+ }))))), /*#__PURE__*/React__default['default'].createElement("section", {
35880
+ className: "plc-mt-6 plc-shadow-sm"
35881
+ }, /*#__PURE__*/React__default['default'].createElement("header", {
35882
+ className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35883
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
35884
+ className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35885
+ }, t("labels.mySettings"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35886
+ name: SUB_MENUS.PROFILE,
35887
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgUser, {
35888
+ className: "plc-w-6 plc-h-6 plc-mr-2"
35889
+ }),
35890
+ title: t("labels.profile"),
35891
+ setActiveDashboardLink: setActiveDashboardLink,
35892
+ activeDashboardLink: activeDashboardLink
35893
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35894
+ name: SUB_MENUS.QRCODE,
35895
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgQrcode, {
35896
+ className: "plc-w-6 plc-h-6 plc-mr-2"
35897
+ }),
35898
+ title: "My QR code",
35899
+ setActiveDashboardLink: setActiveDashboardLink,
35900
+ activeDashboardLink: activeDashboardLink
35901
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35902
+ name: SUB_MENUS.PASSWORDCHANGE,
35903
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgKey, {
35904
+ className: "plc-w-6 plc-h-6 plc-mr-2"
35905
+ }),
35906
+ title: t("labels.changePassword"),
35907
+ setActiveDashboardLink: setActiveDashboardLink,
35908
+ activeDashboardLink: activeDashboardLink
35909
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35910
+ name: SUB_MENUS.SAVED_ITEMS,
35911
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgBookmark, null),
35912
+ title: t("labels.savedItems.label"),
35913
+ setActiveDashboardLink: setActiveDashboardLink,
35914
+ activeDashboardLink: activeDashboardLink
35915
+ }), /*#__PURE__*/React__default['default'].createElement("header", {
35916
+ className: "plc-pl-4 plc-mb-2 sm:plc-pl-8"
35917
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
35918
+ className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35919
+ }, t("labels.accountSettings"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35920
+ name: SUB_MENUS.PAYMENT_CARDS,
35921
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgPaymentCard, null),
35922
+ title: t("labels.paymentSource"),
35923
+ setActiveDashboardLink: setActiveDashboardLink,
35924
+ activeDashboardLink: activeDashboardLink
35925
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35926
+ name: SUB_MENUS.ADDRESSES,
35927
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgLocationPin, null),
35928
+ title: t("labels.addresses"),
35929
+ setActiveDashboardLink: setActiveDashboardLink,
35930
+ activeDashboardLink: activeDashboardLink
35931
+ }), /*#__PURE__*/React__default['default'].createElement("header", {
35932
+ className: "plc-pl-4 plc-my-2 sm:plc-pl-8"
35933
+ }, /*#__PURE__*/React__default['default'].createElement("p", {
35934
+ className: "plc-font-bold plc-tracking-widest plc-text-gray-500"
35935
+ }, t("labels.purchases"))), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35936
+ name: SUB_MENUS.SUBSCRIPTIONS,
35937
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgSubscription, {
35938
+ className: "plc-w-10 plc-h-10 plc-pt-2 plc-pr-1 plc--ml-2"
35939
+ }),
35940
+ title: t("labels.subscriptions"),
35941
+ setActiveDashboardLink: setActiveDashboardLink,
35942
+ activeDashboardLink: activeDashboardLink
35943
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35944
+ show: showNewsletters(),
35945
+ name: SUB_MENUS.NEWSLETTERS,
35946
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgNewsletter, {
35947
+ className: "plc-transform plc--translate-x-1 plc-scale-105 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35948
+ }),
35949
+ title: t("labels.Newsletters"),
35950
+ setActiveDashboardLink: setActiveDashboardLink,
35951
+ activeDashboardLink: activeDashboardLink
35952
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35953
+ show: hasActiveMemberships(),
35954
+ name: SUB_MENUS.MEMBERSHIPS,
35955
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgMemberships, {
35956
+ className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35957
+ }),
35958
+ title: t("labels.memberships"),
35959
+ setActiveDashboardLink: setActiveDashboardLink,
35960
+ activeDashboardLink: activeDashboardLink
35961
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35962
+ show: hasDonationSubs(),
35963
+ name: SUB_MENUS.DONATIONS,
35964
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgDonate, {
35965
+ className: "plc-transform plc-scale-120 plc-w-7 plc-h-8 plc-mr-1 plc-pt-1"
35966
+ }),
35967
+ title: t("labels.donations"),
35968
+ setActiveDashboardLink: setActiveDashboardLink,
35969
+ activeDashboardLink: activeDashboardLink
35970
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35971
+ name: SUB_MENUS.GIFTS,
35972
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgGift, null),
35973
+ title: t("labels.gifts"),
35974
+ setActiveDashboardLink: setActiveDashboardLink,
35975
+ activeDashboardLink: activeDashboardLink
35976
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35977
+ show: window.Pelcro.site.read().ecommerce_enabled,
35978
+ name: SUB_MENUS.ORDERS,
35979
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgShopping, null),
35980
+ title: t("labels.orders.label"),
35981
+ setActiveDashboardLink: setActiveDashboardLink,
35982
+ activeDashboardLink: activeDashboardLink
35983
+ }), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35984
+ show: hasInvoices(),
35985
+ name: SUB_MENUS.INVOICES,
35986
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgDocument, null),
35987
+ title: t("labels.invoices"),
35988
+ setActiveDashboardLink: setActiveDashboardLink,
35989
+ activeDashboardLink: activeDashboardLink
35990
+ })), /*#__PURE__*/React__default['default'].createElement(DashboardLink, {
35991
+ name: SUB_MENUS.LOGOUT,
35992
+ icon: /*#__PURE__*/React__default['default'].createElement(SvgExit, null),
35993
+ title: t("labels.logout"),
35994
+ setActiveDashboardLink: setActiveDashboardLink,
35995
+ activeDashboardLink: activeDashboardLink
35996
+ }))), activeDashboardLink && isOpen && /*#__PURE__*/React__default['default'].createElement("div", {
35997
+ id: "pelcro-view-dashboard-submenus",
35998
+ className: "plc-fixed plc-inset-y-0 plc-right-0 plc-h-full lg:plc-w-9/12 plc-w-full plc-bg-gray-100 plc-z-max plc-overflow-auto"
35999
+ }, activeDashboardLink === SUB_MENUS.PROFILE && /*#__PURE__*/React__default['default'].createElement(ProfileMenu, null), activeDashboardLink === SUB_MENUS.QRCODE && /*#__PURE__*/React__default['default'].createElement(QRCodeMenu, null), activeDashboardLink === SUB_MENUS.PASSWORDCHANGE && /*#__PURE__*/React__default['default'].createElement(PasswordChangeMenu, null), activeDashboardLink === SUB_MENUS.SAVED_ITEMS && /*#__PURE__*/React__default['default'].createElement(SavedItemsMenu, null), activeDashboardLink === SUB_MENUS.PAYMENT_CARDS && /*#__PURE__*/React__default['default'].createElement(PaymentCardsMenu, null), activeDashboardLink === SUB_MENUS.ADDRESSES && /*#__PURE__*/React__default['default'].createElement(AddressesMenu, null), activeDashboardLink === SUB_MENUS.SUBSCRIPTIONS && /*#__PURE__*/React__default['default'].createElement(SubscriptionsMenu, {
36000
+ displayProductSelect: displayProductSelect,
36001
+ setProductAndPlan: setProductAndPlan,
36002
+ setSubscriptionIdToRenew: setSubscriptionIdToRenew,
36003
+ getSubscriptionStatus: getSubscriptionStatus
36004
+ }), activeDashboardLink === SUB_MENUS.MEMBERSHIPS && /*#__PURE__*/React__default['default'].createElement(MembershipsMenu, {
36005
+ getSubscriptionStatus: getSubscriptionStatus
36006
+ }), activeDashboardLink === SUB_MENUS.NEWSLETTERS && /*#__PURE__*/React__default['default'].createElement(NewslettersMenu, null), activeDashboardLink === SUB_MENUS.DONATIONS && /*#__PURE__*/React__default['default'].createElement(DonationsMenu, {
36007
+ getSubscriptionStatus: getSubscriptionStatus
36008
+ }), activeDashboardLink === SUB_MENUS.GIFTS && /*#__PURE__*/React__default['default'].createElement(GiftsMenu, {
36009
+ getSubscriptionStatus: getSubscriptionStatus,
36010
+ displayProductSelect: displayProductSelect,
36011
+ setProductAndPlan: setProductAndPlan,
36012
+ setSubscriptionIdToRenew: setSubscriptionIdToRenew,
36013
+ disableSubmit: disableSubmit
36014
+ }), activeDashboardLink === SUB_MENUS.ORDERS && /*#__PURE__*/React__default['default'].createElement(OrdersMenu, null), activeDashboardLink === SUB_MENUS.INVOICES && /*#__PURE__*/React__default['default'].createElement(InvoicesMenu, null), activeDashboardLink === SUB_MENUS.LOGOUT && logout(), /*#__PURE__*/React__default['default'].createElement(Button, {
36015
+ variant: "ghost",
36016
+ type: "button",
36017
+ className: "plc-text-gray-500 plc-rounded-2xl plc-absolute plc-z-max plc-top-2 plc-right-2 md:plc-top-5 md:plc-right-10",
36018
+ onClick: closeDashboard
36019
+ }, /*#__PURE__*/React__default['default'].createElement(SvgXIcon, {
36020
+ className: "plc-fill-current"
36021
+ }))));
36022
+ };
35954
36023
 
35955
- function hasDonationSubs() {
35956
- var _window$Pelcro$subscr, _window$Pelcro$subscr2, _window$Pelcro$subscr3, _window$Pelcro$user$r4, _window$Pelcro$user$r5;
36024
+ /**
36025
+ *
36026
+ */
35957
36027
 
35958
- const donations = (_window$Pelcro$subscr = (_window$Pelcro$subscr2 = window.Pelcro.subscription) === null || _window$Pelcro$subscr2 === void 0 ? void 0 : (_window$Pelcro$subscr3 = _window$Pelcro$subscr2.list()) === null || _window$Pelcro$subscr3 === void 0 ? void 0 : _window$Pelcro$subscr3.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$subscr !== void 0 ? _window$Pelcro$subscr : [];
35959
- const canceledDonations = (_window$Pelcro$user$r4 = (_window$Pelcro$user$r5 = window.Pelcro.user.read().expired_subscriptions) === null || _window$Pelcro$user$r5 === void 0 ? void 0 : _window$Pelcro$user$r5.filter(sub => sub.plan.is_donation && !sub.is_gift_donor)) !== null && _window$Pelcro$user$r4 !== void 0 ? _window$Pelcro$user$r4 : [];
35960
- return donations.length > 0 || canceledDonations.length > 0;
35961
- }
36028
+ function Dashboard(props) {
36029
+ React__default['default'].useEffect(() => {
36030
+ var _props$onDisplay;
35962
36031
 
35963
- function hasActiveMemberships() {
35964
- var _window$Pelcro$user$r6, _window$Pelcro$user$r7;
36032
+ (_props$onDisplay = props.onDisplay) === null || _props$onDisplay === void 0 ? void 0 : _props$onDisplay.call(props);
36033
+ }, []);
36034
+ const {
36035
+ resetView
36036
+ } = usePelcro();
36037
+ return /*#__PURE__*/React__default['default'].createElement(DashboardContainer, props, /*#__PURE__*/React__default['default'].createElement(DashboardContent, Object.assign({
36038
+ onClose: () => {
36039
+ var _props$onClose;
35965
36040
 
35966
- return (_window$Pelcro$user$r6 = (_window$Pelcro$user$r7 = window.Pelcro.user.read().memberships) === null || _window$Pelcro$user$r7 === void 0 ? void 0 : _window$Pelcro$user$r7.some(membership => membership.status === "active" && membership.subscription.ended_at === null)) !== null && _window$Pelcro$user$r6 !== void 0 ? _window$Pelcro$user$r6 : false;
36041
+ (_props$onClose = props.onClose) === null || _props$onClose === void 0 ? void 0 : _props$onClose.call(props);
36042
+ resetView();
36043
+ }
36044
+ }, props)));
35967
36045
  }
35968
-
35969
- const DashboardWithTrans = withTranslation("dashboard")(Dashboard);
36046
+ Dashboard.viewId = "dashboard";
35970
36047
 
35971
36048
  // The button in the lower left that shows the dashboard.
35972
36049
  const DashboardOpenButton = () => {
@@ -38423,6 +38500,7 @@ const QrCodeModal = ({
38423
38500
  };
38424
38501
  QrCodeModal.viewId = "qrcode";
38425
38502
 
38503
+ exports.AddNew = AddNew;
38426
38504
  exports.AddressCreateCity = AddressCreateCity;
38427
38505
  exports.AddressCreateContainer = AddressCreateContainer;
38428
38506
  exports.AddressCreateCountrySelect = AddressCreateCountrySelect;
@@ -38456,6 +38534,7 @@ exports.AddressUpdateStateSelect = AddressUpdateStateSelect;
38456
38534
  exports.AddressUpdateSubmit = AddressUpdateSubmit;
38457
38535
  exports.AddressUpdateTextInput = AddressUpdateTextInput;
38458
38536
  exports.AddressUpdateView = AddressUpdateView;
38537
+ exports.AddressesMenu = AddressesMenu;
38459
38538
  exports.Alert = AlertWithContext;
38460
38539
  exports.AlertElement = Alert;
38461
38540
  exports.ApplyCouponButton = ApplyCouponButton;
@@ -38463,6 +38542,7 @@ exports.Auth0LoginButton = Auth0LoginButton;
38463
38542
  exports.Badge = Badge;
38464
38543
  exports.BankRedirection = BankRedirection;
38465
38544
  exports.Button = Button;
38545
+ exports.Card = Card;
38466
38546
  exports.CartContainer = CartContainer;
38467
38547
  exports.CartModal = CartModal;
38468
38548
  exports.CartRemoveItemButton = CartRemoveItemButton;
@@ -38474,10 +38554,14 @@ exports.CheckoutForm = CheckoutForm;
38474
38554
  exports.ConfirmPassword = ConfirmPassword;
38475
38555
  exports.CouponCode = CouponCode;
38476
38556
  exports.CouponCodeField = CouponCodeField;
38477
- exports.Dashboard = DashboardWithHook;
38557
+ exports.Dashboard = Dashboard;
38558
+ exports.DashboardContainer = DashboardContainer;
38559
+ exports.DashboardContent = DashboardContent;
38560
+ exports.DashboardLink = DashboardLink;
38478
38561
  exports.DashboardOpenButton = DashboardOpenButton;
38479
38562
  exports.DatePicker = DatePicker;
38480
38563
  exports.DiscountedPrice = DiscountedPrice;
38564
+ exports.DonationsMenu = DonationsMenu;
38481
38565
  exports.Email = Email;
38482
38566
  exports.EmailVerifyContainer = EmailVerifyContainer;
38483
38567
  exports.EmailVerifyModal = EmailVerifyModal;
@@ -38498,6 +38582,7 @@ exports.GiftRedeemContainer = GiftRedeemContainer;
38498
38582
  exports.GiftRedeemModal = GiftRedeemModal;
38499
38583
  exports.GiftRedeemSubmitButton = GiftRedeemSubmitButton;
38500
38584
  exports.GiftRedeemView = GiftRedeemView;
38585
+ exports.GiftsMenu = GiftsMenu;
38501
38586
  exports.GoogleLoginButton = GoogleLoginButton;
38502
38587
  exports.Input = Input;
38503
38588
  exports.InvoiceDetailsContainer = InvoiceDetailsContainer;
@@ -38508,6 +38593,7 @@ exports.InvoiceDetailsView = InvoiceDetailsView;
38508
38593
  exports.InvoicePaymentContainer = InvoicePaymentContainer;
38509
38594
  exports.InvoicePaymentModal = InvoicePaymentModal;
38510
38595
  exports.InvoicePaymentView = InvoicePaymentView;
38596
+ exports.InvoicesMenu = InvoicesMenu;
38511
38597
  exports.Link = Link;
38512
38598
  exports.LoginButton = LoginButton;
38513
38599
  exports.LoginContainer = LoginContainer;
@@ -38518,6 +38604,7 @@ exports.LoginRequestLoginToken = LoginRequestLoginToken;
38518
38604
  exports.LoginUsername = LoginUsername;
38519
38605
  exports.LoginView = LoginView;
38520
38606
  exports.Logout = Logout;
38607
+ exports.MembershipsMenu = MembershipsMenu;
38521
38608
  exports.MeterModal = MeterModal;
38522
38609
  exports.MeterView = MeterView;
38523
38610
  exports.Modal = Modal;
@@ -38530,17 +38617,20 @@ exports.NewsletterUpdateContainer = NewsletterUpdateContainer;
38530
38617
  exports.NewsletterUpdateList = NewsletterUpdateList;
38531
38618
  exports.NewsletterUpdateModal = NewsletterUpdateModal;
38532
38619
  exports.NewsletterUpdateView = NewsletterUpdateView;
38620
+ exports.NewslettersMenu = NewslettersMenu;
38533
38621
  exports.Notification = Notification;
38534
38622
  exports.OrderConfirmModal = OrderConfirmModal;
38535
38623
  exports.OrderCreateContainer = OrderCreateContainer;
38536
38624
  exports.OrderCreateModal = OrderCreateModal;
38537
38625
  exports.OrderCreateSubmitButton = OrderCreateSubmitButton;
38538
38626
  exports.OrderCreateView = OrderCreateView;
38627
+ exports.OrderItems = OrderItems;
38539
38628
  exports.Password = Password;
38540
38629
  exports.PasswordChangeButton = PasswordChangeButton;
38541
38630
  exports.PasswordChangeConfirmNewPassword = PasswordChangeConfirmNewPassword;
38542
38631
  exports.PasswordChangeContainer = PasswordChangeContainer;
38543
38632
  exports.PasswordChangeCurrentPassword = PasswordChangeCurrentPassword;
38633
+ exports.PasswordChangeMenu = PasswordChangeMenu;
38544
38634
  exports.PasswordChangeModal = PasswordChangeModal;
38545
38635
  exports.PasswordChangeNewPassword = PasswordChangeNewPassword;
38546
38636
  exports.PasswordChangeView = PasswordChangeView;
@@ -38561,6 +38651,7 @@ exports.PasswordlessRequestEmail = PasswordlessRequestEmail;
38561
38651
  exports.PasswordlessRequestModal = PasswordlessRequestModal;
38562
38652
  exports.PasswordlessRequestView = PasswordlessRequestView;
38563
38653
  exports.PasswordlessRequestViewButton = PasswordlessRequestViewButton;
38654
+ exports.PaymentCardsMenu = PaymentCardsMenu;
38564
38655
  exports.PaymentCreateContainer = PaymentCreateContainer;
38565
38656
  exports.PaymentCreateView = PaymentCreateView;
38566
38657
  exports.PaymentMethodContainer = PaymentMethodContainer;
@@ -38581,6 +38672,7 @@ exports.PelcroCardExpiry = PelcroCardExpiry;
38581
38672
  exports.PelcroCardNumber = PelcroCardNumber;
38582
38673
  exports.PelcroModalController = PelcroModalController;
38583
38674
  exports.PelcroPaymentRequestButton = PelcroPaymentRequestButton;
38675
+ exports.ProfileMenu = ProfileMenu;
38584
38676
  exports.ProfilePicChangeButton = ProfilePicChangeButton;
38585
38677
  exports.ProfilePicChangeContainer = ProfilePicChangeContainer;
38586
38678
  exports.ProfilePicChangeCropper = ProfilePicChangeCropper;
@@ -38589,6 +38681,7 @@ exports.ProfilePicChangeRemoveButton = ProfilePicChangeRemoveButton;
38589
38681
  exports.ProfilePicChangeSelectButton = ProfilePicChangeSelectButton;
38590
38682
  exports.ProfilePicChangeView = ProfilePicChangeView;
38591
38683
  exports.ProfilePicChangeZoom = ProfilePicChangeZoom;
38684
+ exports.QRCodeMenu = QRCodeMenu;
38592
38685
  exports.QrCodeModal = QrCodeModal;
38593
38686
  exports.QrCodeView = QrCodeView;
38594
38687
  exports.Radio = Radio;
@@ -38602,6 +38695,7 @@ exports.RegisterLastName = RegisterLastName;
38602
38695
  exports.RegisterModal = RegisterModal;
38603
38696
  exports.RegisterPassword = RegisterPassword;
38604
38697
  exports.RegisterView = RegisterView;
38698
+ exports.SavedItems = SavedItems;
38605
38699
  exports.Select = Select;
38606
38700
  exports.SelectModal = SelectModalWithHook;
38607
38701
  exports.SelectedPaymentMethod = SelectedPaymentMethod;
@@ -38626,6 +38720,7 @@ exports.SubscriptionRenewView = SubscriptionRenewView;
38626
38720
  exports.SubscriptionSuspendContainer = SubscriptionSuspendContainer;
38627
38721
  exports.SubscriptionSuspendModal = SubscriptionSuspendModal;
38628
38722
  exports.SubscriptionSuspendView = SubscriptionSuspendView;
38723
+ exports.SubscriptionsItems = SubscriptionsItems;
38629
38724
  exports.TaxAmount = TaxAmount;
38630
38725
  exports.TextArea = TextArea;
38631
38726
  exports.Tooltip = Tooltip;