@sikka/hawa 0.0.26 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -71
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +5 -4
- package/src/blocks/Account/UserProfileForm.js +2 -4
- package/src/blocks/AuthForms/NewPasswordForm.js +5 -4
- package/src/blocks/AuthForms/ResetPasswordForm.js +6 -0
- package/src/blocks/AuthForms/SignInForm.js +12 -2
- package/src/blocks/AuthForms/SignUpForm.js +10 -8
- package/src/blocks/Payment/ChargeWalletForm.js +9 -7
- package/src/blocks/Payment/CheckoutForm.js +11 -1
- package/src/blocks/Payment/Confirmation.js +18 -23
- package/src/blocks/Payment/PaymentMethod.js +8 -3
- package/src/blocks/Payment/SelectPayment.js +18 -7
- package/src/blocks/Pricing/PricingPlans.js +6 -0
- package/src/elements/ActionButton.js +0 -33
- package/src/elements/AdaptiveButton.js +1 -0
- package/src/elements/HawaAlert.js +7 -0
- package/src/elements/HawaColorPicker.js +61 -0
- package/src/elements/HawaItemCard.js +5 -1
- package/src/elements/HawaLogoButton.js +13 -1
- package/src/elements/HawaPopMenu.js +6 -0
- package/src/elements/HawaPricingCard.js +14 -0
- package/src/elements/HawaRadio.js +8 -0
- package/src/elements/HawaSettingsRow.js +5 -3
- package/src/elements/HawaTextArea.js +20 -32
- package/src/elements/HawaTextField.js +16 -20
- package/src/elements/index.js +2 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.html +1 -1
- package/storybook-static/{main.ac6e4b72b033097dad76.manager.bundle.js → main.9d5968bcf15d21f5487c.manager.bundle.js} +0 -0
- package/storybook-static/main.c6115a9b.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.b026595c.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.741b86a0.iframe.bundle.js.LICENSE.txt → vendors~main.b026595c.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.b026595c.iframe.bundle.js.map +1 -0
- package/storybook-static/main.20c7df82.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.741b86a0.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.741b86a0.iframe.bundle.js.map +0 -1
package/README.md
CHANGED
|
@@ -7,75 +7,36 @@
|
|
|
7
7
|
[](https://www.npmjs.com/package/@sikka/hawa)
|
|
8
8
|
[](https://www.npmjs.com/package/@sikka/hawa)
|
|
9
9
|
|
|
10
|
-
> Opinionated UI Kit for web apps and websites
|
|
10
|
+
> Opinionated UI Kit for web apps and websites built with MUI
|
|
11
11
|
|
|
12
12
|
## Install
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
|
|
16
15
|
npm install --save @sikka/hawa
|
|
17
|
-
|
|
18
16
|
```
|
|
19
17
|
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
### Elements
|
|
23
|
-
|
|
24
|
-
The smallest components of this UI kit are the typical low-level components.
|
|
25
|
-
|
|
26
|
-
### Blocks
|
|
27
|
-
|
|
28
|
-
Blocks are commonly used collection of components.
|
|
29
|
-
|
|
30
|
-
### Boxes
|
|
31
|
-
|
|
32
|
-
Most components and blocks will live inside **boxes**. Windows can show anything. It can show a video, image, form, iFrame, etc. Boxes make out the layout of your website or application. Boxes can be arranged in different layouts
|
|
33
|
-
|
|
34
|
-
<p align="center">
|
|
35
|
-
<img src="https://user-images.githubusercontent.com/46135573/143972102-0c104239-b8f6-4a7b-9aad-54f6d91a8906.png" alt="layout-types" />
|
|
36
|
-
</p>
|
|
37
|
-
|
|
38
|
-
Points
|
|
39
|
-
|
|
40
|
-
- The content inside each box can be scrollable (vertical/horizontal/Both) with one prop
|
|
41
|
-
- you can control the spacing of the content inside each box with one prop
|
|
42
|
-
- you can also control the spacing of all the box in the layout
|
|
43
|
-
- some boxes can float (animation of open and close modal)
|
|
44
|
-
- some boxes can go full screen (animation to transition)
|
|
45
|
-
|
|
46
|
-
# Features
|
|
18
|
+
# Roadmap
|
|
47
19
|
|
|
48
20
|
- [ ] Change borders and margin, padding in one place
|
|
49
21
|
- [ ] Drag and drop tool to create a layout of boxes
|
|
50
22
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- [ ] Layout
|
|
54
|
-
- [ ] TextArea
|
|
55
|
-
- [ ] Autocomplete
|
|
56
|
-
- [ ] Badges
|
|
23
|
+
</br>
|
|
57
24
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
```jsx
|
|
61
|
-
//example coming soon inshallah
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
## Contributing
|
|
25
|
+
# Contributing
|
|
65
26
|
|
|
66
27
|
To contribute, clone this github repository and run the development server
|
|
67
28
|
|
|
68
|
-
- clone repository
|
|
69
|
-
|
|
70
29
|
```bash
|
|
71
30
|
git clone git@github.com:sikka-software/hawa.git
|
|
72
31
|
cd hawa
|
|
73
32
|
npm install
|
|
74
33
|
```
|
|
75
34
|
|
|
76
|
-
|
|
35
|
+
</br>
|
|
77
36
|
|
|
78
|
-
|
|
37
|
+
# TESTING
|
|
38
|
+
|
|
39
|
+
Run development server
|
|
79
40
|
|
|
80
41
|
```bash
|
|
81
42
|
git clone git@github.com:sikka-software/hawa.git
|
|
@@ -84,30 +45,6 @@ npm install
|
|
|
84
45
|
npm run storybook
|
|
85
46
|
```
|
|
86
47
|
|
|
87
|
-
- Edit **Hawa/src/stories/Hawa.stories.js\_** file
|
|
88
|
-
|
|
89
|
-
- Add your custom testing component in **Hawa.stories.js** file
|
|
90
|
-
|
|
91
|
-
- Or you can preview without running development server. [See Preview](https://sikka-software.github.io/Hawa/storybook-static/)
|
|
92
|
-
|
|
93
|
-
```jsx
|
|
94
|
-
//example coming soon inshallah
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## Deployment
|
|
98
|
-
|
|
99
|
-
```bash
|
|
100
|
-
npm run build-storybook
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
## Publishing (Admin)
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
npm version [major | minor | patch]
|
|
107
|
-
npm run build-lib
|
|
108
|
-
npm publish --access public
|
|
109
|
-
```
|
|
110
|
-
|
|
111
48
|
## License
|
|
112
49
|
|
|
113
50
|
MIT © [SIKKA SOFTWARE](https://sikka.sa)
|
package/es/index.es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e,{useState as t}from"react";import r from"@mui/material/Button";import i from"@mui/material/Tooltip";import n from"prop-types";import{jsxs as l,jsx as a,Fragment as o}from"react/jsx-runtime";import d from"@mui/material/Snackbar";import s from"@mui/material/AlertTitle";import c from"@mui/material/Alert";import u from"@mui/material/FormControlLabel";import m from"@mui/material/Checkbox";import h from"@mui/material/Container";import p from"@mui/material/Typography";import v from"@mui/icons-material/CheckCircleOutlined";import f from"@mui/material/Input";import g from"@mui/material/InputLabel";import x from"@mui/material/Switch";import y from"@mui/icons-material/GitHub";import b from"@mui/icons-material/Twitter";import w from"@mui/icons-material/AccountBalanceWallet";import T from"@mui/material/Select";import C from"@mui/material/Table";import P from"@mui/material/TableBody";import k from"@mui/material/TableCell";import S from"@mui/material/TableContainer";import W from"@mui/material/TableHead";import L from"@mui/material/TableRow";import{useForm as A,FormProvider as O,Controller as q}from"react-hook-form";import I from"@mui/material/InputAdornment";import z from"@mui/icons-material/HttpsOutlined";import R from"@mui/icons-material/MailOutline";import N from"@mui/icons-material/PermIdentityOutlined";import j from"@mui/material/Divider";import{styled as B,useTheme as D}from"@mui/material/styles";import M from"@mui/material/Box";import G from"@mui/material/Drawer";import E from"@mui/material/AppBar";import F from"@mui/material/Toolbar";import U from"@mui/material/List";import Z from"@mui/material/IconButton";import $ from"@mui/icons-material/Menu";import H from"@mui/icons-material/ChevronLeft";import V from"@mui/icons-material/ChevronRight";import _ from"@mui/material/ListItemButton";import X from"@mui/material/ListItemText";import J from"@mui/material/Menu";import K from"@mui/material/Avatar";import Q from"@mui/material/MenuItem";import Y from"@mui/icons-material/Close";import ee from"@mui/material/Dialog";import te from"@mui/material/DialogActions";import re from"@mui/material/DialogContent";import ie from"@mui/material/DialogTitle";import{useTheme as ne,Menu as le,MenuItem as ae,Typography as oe}from"@mui/material";function de(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?de(Object(r),!0).forEach((function(t){ce(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):de(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ce(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ue(e,t){if(null==e)return{};var r,i,n=function(e,t){if(null==e)return{};var r,i,n={},l=Object.keys(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)r=l[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function me(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var i,n,l=[],a=!0,o=!1;try{for(r=r.call(e);!(a=(i=r.next()).done)&&(l.push(i.value),!t||l.length!==t);a=!0);}catch(e){o=!0,n=e}finally{try{a||null==r.return||r.return()}finally{if(o)throw n}}return l}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return he(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return he(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r<t;r++)i[r]=e[r];return i}var pe=function(e){return e.showText?l(r,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,a("div",{style:{width:10}}),e.buttonText]}):a(i,{title:e.buttonText,placement:"top",children:a(r,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};pe.propTypes={buttonText:n.string,showText:n.bool};var ve=function(e){return a(r,se(se({},e),{},{children:e.text}))},fe=function(e){return a(d,{variant:"danger",open:e.open,onClose:e.handleClose,children:l(c,{icon:!1,severity:"error",variant:"offline",children:[e.title&&a(s,{children:e.title}),e.text]})})},ge=function(t){return console.log("props : ",t),a(e.Fragment,{children:a(u,{label:t.label,control:a(m,{style:{color:t.color||null},defaultChecked:t.defaultValue})})})},xe=function(e){var i=me(t(e.defaultValue),2),n=i[0],l=i[1];return a(h,{variant:e.location||"panelTabs",children:e.options.map((function(t,i){var o;return a(r,{onClick:function(){e.handleChange(t.value),l(t.value)},fullWidth:!0,variant:(null==n?void 0:n.toLowerCase())===(null===(o=t.value)||void 0===o?void 0:o.toLowerCase())?"selected":"unselected",children:t.label},i)}))})},ye=function(e){var t="ar"===e.lang;return l(h,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&l(h,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&a("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&a(h,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&a(h,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})},be=function(e){var t,i,n="ar"===e.lang,o={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},d={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},s={usd:n?"دولار":"$",sar:n?"ريال":"SAR"},c=n?e.features_ar:e.features;return l(h,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:n?"rtl":"ltr"},children:[l(h,{variant:"plan-header",children:[a(p,{variant:"h3",fontWeight:500,children:n?e.title_ar:e.title}),a(p,{variant:"caption",children:n?e.subtitle_ar:e.subtitle}),a("br",{}),a(p,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,a("div",{style:{width:5}}),a(p,{children:s[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),a(p,{style:{fontSize:14,margin:5},children:n?o[e.cycleText]:d[e.cycleText]})]}):l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[a(p,{children:s[null===(i=e.currency)||void 0===i?void 0:i.toLowerCase()]}),a("div",{style:{width:5}}),e.price]}),a(p,{style:{fontSize:14,margin:5},children:"ar"===e.lang?o[e.cycleText]:d[e.cycleText]})]})})]}),a("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==c?void 0:c.map((function(e){return l("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[a("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:a(v,{fontSize:"small"})}),a("div",{style:{width:10}}),a(p,{variant:"subtitle2",children:e})]})}))}),a(r,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})},we=function(e){return a(p,se(se({},e),{},{children:e.children}))},Te=function(e){return l("div",{style:e.inForm&&{width:"100%"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&a(g,{children:e.label}),e.helperText&&a(p,{variant:"validation",children:e.helperText})]}),a(f,se({disableUnderline:!0},e))]})},Ce=function(e){return a(x,se({},e))},Pe=function(e){return l(h,{variant:"settingsRow",children:[a(we,{children:e.settingsLabel}),"checkbox"===e.settingsType&&a(m,se({},e)),"text"===e.settingsType&&a(Te,se({},e)),"radio"===e.settingsType&&a(xe,se({location:"inSettings"},e)),"boolean"===e.settingsType&&a(Ce,se({},e))]})};Pe.propTypes={type:n.oneOf(["text","number","password"]),helperText:n.string};var ke=function(e){var t,i="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":i=a("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":i=a(y,{});break;case"twitter":i=a(b,{});break;case"mada":i=a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":i=a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":i=a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":i=a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":i=a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":i=a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":i=a(w,{})}return l(r,se(se({},e),{},{variant:"withLogo",children:[i,a("div",{style:{width:10}}),a(p,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},Se=function(e){return a(r,se(se({},e),{},{children:e.children}))},We=function(e){return l("div",{style:{width:"100%"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[a(g,{children:e.label}),e.helperText&&a(p,{variant:"validation",children:e.helperText})]}),a(T,se(se({},e),{},{children:e.children}))]})},Le=function(e){return a(g,{children:a("div",{style:{fontSize:15},children:e.label})})},Ae=function(e){return l(c,{severity:e.severity,icon:e.hideIcon,children:[e.title&&a(s,{children:e.title}),e.text]})},Oe=function(e){var t="ar"===e.lang;return a(S,{style:{direction:t?"rtl":"ltr"},children:l(C,{"aria-label":"a dense table",children:[a(W,{children:a(L,{children:e.columns.map((function(e,r){return a(k,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})}),a(P,{children:e.rows.map((function(e,r){return a(L,{children:e.map((function(e,r){return a(k,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))},r)}))}),e.end&&a(L,{children:e.end.map((function(e,r){return a(k,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})},qe=function(e){var t=A(),i=t.formState.errors,n=t.handleSubmit,o=t.control;return a(h,{maxWidth:"sm",children:a(O,se(se({},t),{},{children:l("form",{onSubmit:n(e.handleUpdateProfile),children:[a(q,{control:o,name:"fullName",render:function(t){var r,n,l=t.field;return a(Te,se({fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(n=i.fullName)||void 0===n?void 0:n.message},l))}}),a(q,{control:o,name:"phoneNumber",render:function(e){var t=e.field;return a(Te,se({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),a(q,{control:o,name:"email",render:function(t){var r,n,l=t.field;return a(Te,se({fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:e.texts.emailLabel,helperText:null===(n=i.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder},l))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),a(q,{control:o,name:"password",render:function(t){var r,n,l=t.field;return a(Te,se({fullWidth:!0,type:"password",value:null!==(r=l.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=i.password)||void 0===n?void 0:n.message},l))},rules:{required:e.texts.passwordRequiredText}}),a(q,{control:o,name:"confirmPassword",render:function(t){var r,n,l=t.field;return a(Te,se({fullWidth:!0,type:"password",value:null!==(r=l.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=i.confirmPassword)||void 0===n?void 0:n.message},l))},rules:{required:e.texts.confirmPasswordRequiredText}}),a(r,{type:"submit",fullWidth:!0,variant:"last",children:"update profile"})," "]})}))})},Ie=function(e){return l(h,{maxWidth:"sm",children:[e.children,a(r,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})},ze=function(e){var i=me(t(""),2);i[0],i[1];var n=me(t(""),2);n[0],n[1];var o=me(t(!1),2),d=o[0],s=o[1],c=A(),u=c.formState.errors,m=c.handleSubmit,p=c.control;return l(h,{maxWidth:"xs",variant:"auth",children:[d&&a(Ae,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?a(we,{style:{textAlign:"center",margin:5},children:e.texts.passwordChanged}):a(O,se(se({},c),{},{children:l("form",{onSubmit:m((function(t){console.log("handling subb",t),t.password===t.confirmPassword?e.handleNewPassword():s(!0)})),children:[a(q,{control:p,name:"password",render:function(t){var r,i,n=t.field;return a(Te,se({fullWidth:!0,type:"password",value:null!==(r=n.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=u.password)||void 0===i?void 0:i.message,startAdornment:a(I,{position:"start",children:a(z,{})})},n))},rules:{required:e.texts.passwordRequiredText}}),a(q,{control:p,name:"confirmPassword",render:function(t){var r,i,n=t.field;return a(Te,se({fullWidth:!0,type:"password",value:null!==(r=n.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(i=u.confirmPassword)||void 0===i?void 0:i.message,startAdornment:a(I,{position:"start",children:a(z,{})})},n))},rules:{required:e.texts.confirmPasswordRequiredText}}),a(r,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updatePassword})]})}))]})},Re=function(e){var t=A(),i=t.formState.errors,n=t.handleSubmit;t.register;var o=t.control;return a(h,{maxWidth:"xs",variant:"auth",children:e.sent?a(we,{style:{textAlign:"center",margin:5},children:e.emailSentText}):l("form",{onSubmit:n(e.handleResetPassword),children:[a(q,{control:o,name:"email",render:function(t){var r,n,l=t.field;return a(Te,se({fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:e.texts.emailLabel,helperText:null===(n=i.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:a(I,{position:"start",children:a(R,{})})},l))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),a(r,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})},Ne=function(e){var t=A(),i=t.formState.errors,n=t.handleSubmit,o=t.control;return l(h,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.error&&l(c,{severity:"error",variant:"inContainer",children:[e.errorTitle&&a(s,{children:e.errorTitle}),e.errorText]}),a(O,se(se({},t),{},{children:l("form",{onSubmit:n(e.handleSignUp),children:[a(q,{control:o,name:"fullName",render:function(t){var r,n,l=t.field;return a(Te,{fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(n=i.fullName)||void 0===n?void 0:n.message,startAdornment:a(I,{position:"start",children:a(N,{})})})},rules:{required:e.texts.fullNameRequiredText}}),a(q,{control:o,name:"email",render:function(t){var r,n,l=t.field;return a(Te,{fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:e.texts.emailLabel,helperText:null===(n=i.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:a(I,{position:"start",children:a(R,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),a(q,{control:o,name:"password",render:function(t){var r,n,l,o=t.field;return a(Te,se({fullWidth:!0,type:"password",defaultValue:null!==(r=o.value)&&void 0!==r?r:"",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(l=i.password)||void 0===l?void 0:l.message,startAdornment:a(I,{position:"start",children:a(z,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),a(r,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l(p,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",a("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),a(j,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&a(ke,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&a(ke,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&a(ke,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};Ne.propTypes={theme:n.oneOf(["secondary","primary"])};var je=function(e){var t=A(),i=t.formState.errors,n=t.handleSubmit,o=t.control;return l(h,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&a(Ae,{title:e.errorTitle,text:e.errorText,severity:"error"}),l("form",{onSubmit:n(e.handleSignIn),children:[a(q,{control:o,name:"email",render:function(t){var r,n,l=t.field;return a(Te,se({fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:e.texts.emailLabel,helperText:null===(n=i.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:a(I,{position:"start",children:a(R,{})})},l))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),a(q,{control:o,name:"password",render:function(t){var r,n,l,o=t.field;return a(Te,se({fullWidth:!0,type:"password",defaultValue:null!==(r=o.value)&&void 0!==r?r:"",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(l=i.password)||void 0===l?void 0:l.message,startAdornment:a(I,{position:"start",children:a(z,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),a(p,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),a(r,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),l(p,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",a("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),a(j,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&a(ke,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&a(ke,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&a(ke,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})},Be=function(e){return l(h,{maxWidth:"xs",children:[a(we,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&a(ke,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&a(ke,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&a(ke,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&a(ke,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&a(ke,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&a(ke,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&a(ke,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};Te.propTypes={theme:n.oneOf(["secondary","primary"]),viaApplePay:n.bool,viaGooglePay:n.bool,viaSTCPay:n.bool,viaCreditCard:n.bool,viaPayPal:n.bool,handleApplePay:n.func};var De=function(e){var t,i=A(),n=i.formState.errors,o=i.handleSubmit,d=i.control;return a(h,{maxWidth:"xs",children:l("form",{onSubmit:o(e.handle),children:[a(Te,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message}),a(q,{control:d,name:"cardName",render:function(e){var t;return e.field,a(Te,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),a(q,{control:d,name:"cardName",render:function(e){var t;return e.field,a(Te,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),a(q,{control:d,name:"cardName",render:function(e){var t;return e.field,a(Te,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),a(r,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},Me=function(e){var i=me(t(0),2),n=i[0],o=i[1],d=A();d.formState.errors;var s=d.handleSubmit,c=d.control;return l(h,{maxWidth:"xs",children:[l(p,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(n).toLocaleString("en")||"0",a(p,{children:e.currency||"SAR"})]}),a(O,se(se({},d),{},{children:l("form",{onSubmit:s(e.handleChargeWallet),children:[a(q,{control:c,name:"amount",render:function(e){var t,r=e.field;return a(Te,se(se({fullWidth:!0,placeholder:"Enter amount",type:"number",value:null!==(t=r.value)&&void 0!==t?t:""},r),{},{inputProps:{inputMode:"numeric",min:"0",max:"9999999",step:"0.01"},onChange:function(e){r.onChange(parseFloat(e.target.value)),console.log("e",e.target.value),o(e.target.value)}}))}}),a(r,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSignIn,children:"Charge Wallet"})]})}))]})},Ge=function(e){return l(h,{maxWidth:"xs",children:[a(p,{align:"center",children:"Wallet Balance"}),l(p,{align:"center",variant:"h1",children:[e.walletBalance||"0",a(p,{children:e.currency||"SAR"})]}),a(r,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},Ee=function(e){var t,i,n,o,d,s,c,u,m,v,f="ar"===e.lang,g=A(),x=g.formState.errors,y=g.handleSubmit;g.register;var b=g.control,w={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return l(h,{maxWidth:"sm",style:{direction:f?"rtl":"ltr"},children:[a(p,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),a(Oe,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),a(j,{variant:"middle"}),a(p,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),a(O,se(se({},g),{},{children:l("form",{onSubmit:y(e.handlePayNow),children:[l(h,{sx:w,children:[a(q,{control:b,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,i,n,l=t.field;return a(Te,se({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:(null===(i=e.texts)||void 0===i?void 0:i.firstNameLabel)+" *",helperText:null===(n=x.firstName)||void 0===n?void 0:n.message},l))}}),a("div",{style:{width:20}}),a(q,{control:b,name:"lastName",rules:{required:null===(i=e.texts)||void 0===i?void 0:i.required},render:function(t){var r,i,n,l=t.field;return a(Te,se({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:(null===(i=e.texts)||void 0===i?void 0:i.lastNameLabel)+" *",helperText:null===(n=x.lastName)||void 0===n?void 0:n.message},l))}})]}),a(q,{control:b,name:"email",render:function(t){var r,i,n,l=t.field;return a(Te,se({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:(null===(i=e.texts)||void 0===i?void 0:i.emailLabel)+" *",helperText:null===(n=x.email)||void 0===n?void 0:n.message},l))},rules:{required:null===(n=e.texts)||void 0===n?void 0:n.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(o=e.texts)||void 0===o?void 0:o.emailInvalidText}}}),l(h,{sx:w,children:[a(q,{control:b,name:"streetAddress",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,i,n,l=t.field;return a(Te,se({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:(null===(i=e.texts)||void 0===i?void 0:i.streetAddressLabel)+" *",helperText:null===(n=x.streetAddress)||void 0===n?void 0:n.message},l))}}),a("div",{style:{width:20}}),a(q,{control:b,name:"buildingNumber",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,i,n,l=t.field;return a(Te,se({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:(null===(i=e.texts)||void 0===i?void 0:i.buildingNumberLabel)+" *",helperText:null===(n=x.buildingNumber)||void 0===n?void 0:n.message},l))}})]}),l(h,{sx:w,children:[a(q,{control:b,name:"province",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,i,n,l=t.field;return a(Te,se({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:(null===(i=e.texts)||void 0===i?void 0:i.stateLabel)+" *",helperText:null===(n=x.province)||void 0===n?void 0:n.message},l))}}),a("div",{style:{width:20}}),a(q,{control:b,name:"city",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,i,n,l=t.field;return a(Te,se({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=l.value)&&void 0!==r?r:"",label:(null===(i=e.texts)||void 0===i?void 0:i.cityLabel)+" *",helperText:null===(n=x.city)||void 0===n?void 0:n.message},l))}})]}),l(h,{sx:w,children:[a(q,{control:b,name:"zipCode",rules:{required:null===(m=e.texts)||void 0===m?void 0:m.required},render:function(t){var r,i,n,l=t.field;return a(Te,se({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=l.value)&&void 0!==r?r:"",label:(null===(i=e.texts)||void 0===i?void 0:i.zipCodeLabel)+" *",helperText:null===(n=x.zipCode)||void 0===n?void 0:n.message},l))}}),a("div",{style:{width:20}}),a(q,{control:b,name:"country",rules:{required:null===(v=e.texts)||void 0===v?void 0:v.required},render:function(t){var r,i,n,o=t.field;return l(We,se(se({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(i=o.value)&&void 0!==i?i:"",helperText:null===(n=x.country)||void 0===n?void 0:n.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},o),{},{children:[a("option",{}),e.countriesList.map((function(e,t){return a("option",{children:e},t)}))]}))}})]}),a(r,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})},Fe=function(e){var t="ar"===e.lang,i=A();return i.formState.errors,i.handleSubmit,i.register,i.control,l("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l(h,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[a(p,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),a(j,{variant:"middle"}),l(p,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",a("strong",{children:e.userEmail})]}),a(p,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),a(p,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),a(j,{variant:"middle"}),e.products&&l(o,{children:[a(p,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),a(Oe,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),a(j,{variant:"middle"})]}),a(r,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),a(r,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),a(r,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),a(p,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),a("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:a(p,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})},Ue=function(e){return a("div",{children:e.children})},Ze=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},$e=function(e){return ce({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},He=B("div")((function(e){var t=e.theme;return se({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),Ve=B(E,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return se({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:240,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),_e=B(G,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return se(se({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&se(se({},Ze(t)),{},{"& .MuiDrawer-paper":Ze(t)})),!r&&se(se({},$e(t)),{},{"& .MuiDrawer-paper":$e(t)}))}));function Xe(t){var r=D(),n=me(e.useState(!0),2),o=n[0],d=n[1],s=me(e.useState(null),2);s[0],s[1];var c=me(e.useState(null),2),u=c[0],m=c[1];return l(M,{sx:{display:"flex"},children:[a(Ve,{variant:"appbar",position:"fixed",open:o,children:l(F,{variant:"appbar",children:[a(Z,{color:"inherit","aria-label":"open drawer",onClick:function(){d(!0)},edge:"start",sx:se({marginRight:5},o&&{display:"none"}),children:a($,{})}),l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[a(p,{variant:"h6",noWrap:!0,component:"div",children:t.pageTitle}),l(M,{children:[a(i,{title:"Open settings",children:a(Z,{onClick:function(e){m(e.currentTarget)},sx:{p:0},children:a(K,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),a(J,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:u,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(u),onClose:function(){m(null)},variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:r.allBorderRadius,border:"1px solid ".concat(r.primaryActionColor)}},children:t.accountMenu.map((function(e){return l(Q,{onClick:e.action,children:[e.icon&&a(e.icon,{}),a(p,{textAlign:"center",children:e.label})]},e.label)}))})]})]})]})}),l(_e,{variant:"permanent",open:o,children:[l(He,{children:[t.logo,a(Z,{onClick:function(){d(!1)},children:"rtl"===r.direction?a(V,{}):a(H,{})})]}),a(j,{}),a(U,{children:t.pages.map((function(e,r){var n,d;return a(i,{title:e.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:o?0:1}},children:l(_,{variant:(null===(n=t.pageName)||void 0===n?void 0:n.toLowerCase())===(null===(d=e.slug)||void 0===d?void 0:d.toLowerCase())&&"clicked",onClick:e.action,sx:{minHeight:48,justifyContent:o?"initial":"center",px:2.5},children:[a(e.icon,{}),a("div",{style:{width:20}}),a(X,{primary:e.text,sx:{opacity:o?1:0}})]},e.text)},r)}))})]}),l(M,{sx:{flexGrow:1,p:3},children:[a(He,{}),t.children]})]})}var Je=["children","onClose","hideClose"],Ke=function(e){var t=e.children,r=e.onClose,i=e.hideClose,n=ue(e,Je);return l(ie,se(se({sx:{m:0,p:2}},n),{},{children:[t,i?null:a(Z,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:a(Y,{})})]}))};function Qe(e){var r=me(t(!1),2);return r[0],r[1],l(ee,se(se({},e),{},{variant:"main",children:[a(Ke,{onClose:e.onClose,hideClose:e.hideClose,children:e.title}),a(re,{children:e.children}),a(te,{children:e.actions})]}))}var Ye=function(e){var t=ne();return a(le,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return l(ae,{onClick:e.action,children:[e.icon&&a(e.icon,{}),a("div",{style:{width:10}}),a(oe,{textAlign:"center",children:e.label})]},e.label)}))})},et=["Products","Pricing","Blog"],tt=function(t){var n=ne(),o=me(e.useState(null),2),d=o[0],s=o[1],c=me(e.useState(null),2),u=c[0],m=c[1],v=function(){s(null)};return console.log("theme is ",n),a(E,{position:"static",variant:"appbar",children:a(h,{maxWidth:"xl",variant:"appbar",children:l(F,{disableGutters:!0,children:[a(p,{variant:"h6",noWrap:!0,component:"div",sx:{mr:2,display:{xs:"none",md:"flex"}},children:"LOGO"}),l(M,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[a(Z,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:t.handleOpenSideMenu,color:"inherit",children:a($,{})}),a(J,{id:"menu-appbar",anchorEl:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(d),onClose:v,sx:{display:{xs:"block",md:"none"}},children:et.map((function(e){return a(Q,{onClick:v,children:a(p,{textAlign:"center",children:e})},e)}))})]}),a(p,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:"LOGO"}),a(M,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:et.map((function(e){return a(r,{onClick:v,sx:{my:2,display:"block"},children:e},e)}))}),l(M,{sx:{flexGrow:0},children:[a(i,{title:"Open settings",children:a(Z,{onClick:function(e){m(e.currentTarget)},sx:{p:0},children:a(K,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),a(Ye,{anchor:u,handleClose:function(e){return m(null)},menuItems:t.accountMenu})]})]})})})};export{ve as ActionButton,pe as AdaptiveButton,Ue as Box,Me as ChargeWalletForm,Ee as CheckoutForm,Fe as ConfirmationPage,De as CreditCardForm,Ae as HawaAlert,tt as HawaAppBar,Xe as HawaAppLayout,Se as HawaButton,ge as HawaCheckbox,Qe as HawaDialog,Le as HawaInputLabel,ye as HawaItemCard,ke as HawaLogoButton,be as HawaPricingCard,xe as HawaRadio,We as HawaSelect,Pe as HawaSettingsRow,Oe as HawaTable,Te as HawaTextField,we as HawaTypography,ze as NewPasswordForm,fe as OfflineBanner,Ge as PayWithWallet,Re as ResetPasswordForm,Be as SelectPayment,je as SignInForm,Ne as SignUpForm,qe as UserProfileForm,Ie as UserSettingsForm};
|
|
1
|
+
import*as e from"react";import t,{useState as r}from"react";import n from"@mui/material/Button";import i from"@mui/material/Tooltip";import a from"prop-types";import{jsxs as l,jsx as o,Fragment as d}from"react/jsx-runtime";import s from"@mui/material/Snackbar";import c from"@mui/material/AlertTitle";import u from"@mui/material/Alert";import p from"@mui/material/FormControlLabel";import m from"@mui/material/Checkbox";import h from"@mui/material/Container";import f from"@mui/material/Typography";import v from"@mui/icons-material/CheckCircleOutlined";import g from"@mui/material/Input";import x from"@mui/material/InputLabel";import b from"@mui/material/Switch";import y from"@emotion/styled";import w from"@mui/icons-material/GitHub";import T from"@mui/icons-material/Twitter";import C from"@mui/icons-material/AccountBalanceWallet";import k from"@mui/material/Select";import P from"@mui/material/Table";import S from"@mui/material/TableBody";import W from"@mui/material/TableCell";import O from"@mui/material/TableContainer";import L from"@mui/material/TableHead";import I from"@mui/material/TableRow";import{useForm as N,FormProvider as A,Controller as j}from"react-hook-form";import q from"@mui/material/InputAdornment";import R from"@mui/icons-material/HttpsOutlined";import z from"@mui/icons-material/MailOutline";import E from"@mui/icons-material/PermIdentityOutlined";import B from"@mui/material/Divider";import{styled as D,useTheme as M}from"@mui/material/styles";import G from"@mui/material/Box";import $ from"@mui/material/Drawer";import U from"@mui/material/AppBar";import _ from"@mui/material/Toolbar";import V from"@mui/material/List";import F from"@mui/material/IconButton";import Z from"@mui/icons-material/Menu";import H from"@mui/icons-material/ChevronLeft";import X from"@mui/icons-material/ChevronRight";import Y from"@mui/material/ListItemButton";import J from"@mui/material/ListItemText";import K from"@mui/material/Menu";import Q from"@mui/material/Avatar";import ee from"@mui/material/MenuItem";import te from"@mui/icons-material/Close";import re from"@mui/material/Dialog";import ne from"@mui/material/DialogActions";import ie from"@mui/material/DialogContent";import ae from"@mui/material/DialogTitle";import{useTheme as le,Menu as oe,MenuItem as de,Typography as se}from"@mui/material";function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ue(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ce(Object(r),!0).forEach((function(t){pe(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function pe(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function me(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function he(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function fe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,i,a=[],l=!0,o=!1;try{for(r=r.call(e);!(l=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);l=!0);}catch(e){o=!0,i=e}finally{try{l||null==r.return||r.return()}finally{if(o)throw i}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return ve(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ve(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var ge=function(e){return e.showText?l(n,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,o("div",{style:{width:10}}),e.buttonText]}):o(i,{title:e.buttonText,placement:"top",children:o(n,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};ge.propTypes={buttonText:a.string,onClick:a.func,showText:a.bool};var xe=function(e){return o(n,ue(ue({},e),{},{children:e.text}))},be=function(e){return o(s,{variant:"danger",open:e.open,onClose:e.handleClose,children:l(u,{icon:!1,severity:"error",variant:"offline",children:[e.title&&o(c,{children:e.title}),e.text]})})},ye=function(e){return console.log("props : ",e),o(t.Fragment,{children:o(p,{label:e.label,control:o(m,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},we=function(e){var t=fe(r(e.defaultValue),2),i=t[0],a=t[1];return o(h,{variant:e.location||"panelTabs",children:e.options.map((function(t,r){var l;return o(n,{onClick:function(){e.handleChange(t.value),a(t.value)},fullWidth:!0,variant:(null==i?void 0:i.toLowerCase())===(null===(l=t.value)||void 0===l?void 0:l.toLowerCase())?"selected":"unselected",children:t.label},r)}))})};we.propTypes={lang:a.string,options:a.array,defaultValue:a.string,handleChange:a.func,location:a.string};var Te=function(e){var t="ar"===e.lang;return l(h,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&l(h,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&o("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&o(h,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&o(h,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};Te.propTypes={lang:a.string,onCardClick:a.func};var Ce=function(e){var t,r,i="ar"===e.lang,a={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},d={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},s={usd:i?"دولار":"$",sar:i?"ريال":"SAR"},c=i?e.features_ar:e.features;return l(h,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:i?"rtl":"ltr"},children:[l(h,{variant:"plan-header",children:[o(f,{variant:"h3",fontWeight:500,children:i?e.title_ar:e.title}),o(f,{variant:"caption",children:i?e.subtitle_ar:e.subtitle}),o("br",{}),o(f,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,o("div",{style:{width:5}}),o(f,{children:s[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),o(f,{style:{fontSize:14,margin:5},children:i?a[e.cycleText]:d[e.cycleText]})]}):l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[o(f,{children:s[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),o("div",{style:{width:5}}),e.price]}),o(f,{style:{fontSize:14,margin:5},children:"ar"===e.lang?a[e.cycleText]:d[e.cycleText]})]})})]}),o("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==c?void 0:c.map((function(e){return l("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[o("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:o(v,{fontSize:"small"})}),o("div",{style:{width:10}}),o(f,{variant:"subtitle2",children:e})]})}))}),o(n,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};Ce.propTypes={lang:a.string,buttonText:a.string,selectedPlan:a.string,title:a.string,title_ar:a.string,subtitle:a.string,subtitle_ar:a.string,features:a.array,features_ar:a.array};var ke=function(e){return o(f,ue(ue({},e),{},{children:e.children}))},Pe=function(e){return o("div",{style:e.inForm&&{width:"100%"},children:l("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&o(x,{children:e.label}),e.helperText&&o(f,{variant:"validation",children:e.helperText})]}),o(g,ue({disableUnderline:!0},e))]})})},Se=function(e){return o(b,ue({},e))};var We="production"!==process.env.NODE_ENV?a.oneOfType([a.number,a.string,a.object,a.array]):{};function Oe(){return Oe=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Oe.apply(this,arguments)}function Le(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function Ie(e,t,r={clone:!0}){const n=r.clone?Oe({},e):e;return Le(e)&&Le(t)&&Object.keys(t).forEach((i=>{"__proto__"!==i&&(Le(t[i])&&i in e&&Le(e[i])?n[i]=Ie(e[i],t[i],r):n[i]=t[i])})),n}const Ne=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ae=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],je=[...Ne,...Ae];function qe(e){return function(e,t,r,n){const i=(a=e,((l=t)&&"string"==typeof l?l.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),a):null)||r);var a,l;return"number"==typeof i?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),i*e):Array.isArray(i)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>i.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${e} > ${i.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),i[e]):"function"==typeof i?i:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function Re(e,t){if(null==e)return{};var r,n,i={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(i[r]=e[r]);return i}"production"===process.env.NODE_ENV||Ne.reduce(((e,t)=>(e[t]=We,e)),{}),"production"===process.env.NODE_ENV||Ae.reduce(((e,t)=>(e[t]=We,e)),{}),"production"===process.env.NODE_ENV||je.reduce(((e,t)=>(e[t]=We,e)),{});const ze=["values","unit","step"];function Ee(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=Re(e,ze),a=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>Oe({},e,{[t.key]:t.val})),{})})(t),l=Object.keys(a);function o(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function d(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function s(e,i){const a=l.indexOf(i);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==a&&"number"==typeof t[l[a]]?t[l[a]]:i)-n/100}${r})`}return Oe({keys:l,values:a,up:o,down:d,between:s,only:function(e){return l.indexOf(e)+1<l.length?s(e,l[l.indexOf(e)+1]):o(e)},not:function(e){const t=l.indexOf(e);return 0===t?o(l[1]):t===l.length-1?d(l[t]):s(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},i)}var Be={borderRadius:4};const De=["breakpoints","palette","spacing","shape"];const Me=e.createContext(null);"production"!==process.env.NODE_ENV&&(Me.displayName="ThemeContext");var Ge=Me;function $e(t=null){const r=function(){const t=e.useContext(Ge);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t}();return r&&(n=r,0!==Object.keys(n).length)?r:t;var n}const Ue=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={}}=e,l=Re(e,De),o=Ee(r),d=function(e=8){if(e.mui)return e;const t=qe({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(i);let s=Ie({breakpoints:o,direction:"ltr",components:{},palette:Oe({mode:"light"},n),spacing:d,shape:Oe({},Be,a)},l);return s=t.reduce(((e,t)=>Ie(e,t)),s),s}();function _e(e=Ue){return $e(e)}var Ve,Fe,Ze=y.input(Ve||(Ve=he(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n cursor: pointer;\n height: 35px;\n border-radius: ","px;\n background-color: ",";\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius}),(function(e){return e.value})),He=y.input(Fe||(Fe=he(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n // height: 30px;\n padding: 10px;\n border-radius: ","px;\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius})),Xe=function(e){var t=_e();return l("div",{style:{display:"flex",flexDirection:"row"},children:[o(He,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),o("div",{style:{width:10}}),o(Ze,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};Xe.propTypes={color:a.string,handleChange:a.func};var Ye=function(e){return l(h,{variant:"settingsRow",children:[o(ke,{children:e.settingsLabel}),"checkbox"===e.settingsType&&o(m,ue({},e)),"text"===e.settingsType&&o(Pe,ue({},e)),"radio"===e.settingsType&&o(we,ue({location:"inSettings"},e)),"boolean"===e.settingsType&&o(Se,ue({},e)),"color"===e.settingsType&&o(Xe,ue({},e))]})};Ye.propTypes={type:a.oneOf(["checkbox","text","radio","boolean","color"]),helperText:a.string};var Je=function(e){var t,r="ar"===e.lang,i="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":i=o("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":i=o(w,{});break;case"twitter":i=o(T,{});break;case"mada":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":i=o("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":i=o(C,{})}return l(n,ue(ue({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[i,o("div",{style:{width:10}}),o(f,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};Je.propTypes={lang:a.string,logo:a.string,buttonText:a.string};var Ke=function(e){return o(n,ue(ue({},e),{},{children:e.children}))},Qe=function(e){return l("div",{style:{width:"100%"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o(x,{children:e.label}),e.helperText&&o(f,{variant:"validation",children:e.helperText})]}),o(k,ue(ue({},e),{},{children:e.children}))]})},et=function(e){var t=_e();return console.log("theme is ",t),o("label",{children:o("textarea",{style:{color:"black",backgroundColor:e.bgColor||"white",borderBottom:"none",border:"none",width:"100%",padding:0,margin:0,marginBottom:0,resize:e.resize||"vertical"}})})},tt=function(e){return o(x,{children:o("div",{style:{fontSize:15},children:e.label})})},rt=function(e){return l(u,{severity:e.severity,icon:e.hideIcon,children:[e.title&&o(c,{children:e.title}),e.text]})};rt.propTypes={severity:a.string,title:a.string,text:a.string,hideIcon:a.bool};var nt=function(e){var t="ar"===e.lang;return o(O,{style:{direction:t?"rtl":"ltr"},children:l(P,{"aria-label":"a dense table",children:[o(L,{children:o(I,{children:e.columns.map((function(e,r){return o(W,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})}),o(S,{children:e.rows.map((function(e,r){return o(I,{children:e.map((function(e,r){return o(W,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))},r)}))}),e.end&&o(I,{children:e.end.map((function(e,r){return o(W,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})},it=function(e){var t=N(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return o(h,{maxWidth:"sm",children:o(A,ue(ue({},t),{},{children:l("form",{onSubmit:i(e.handleUpdateProfile),children:[o(j,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message},a))}}),o(j,{control:a,name:"phoneNumber",render:function(e){var t=e.field;return o(Pe,ue({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),o(j,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(j,{control:a,name:"password",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.passwordRequiredText}}),o(j,{control:a,name:"confirmPassword",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"password",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(i=r.confirmPassword)||void 0===i?void 0:i.message},a))},rules:{required:e.texts.confirmPasswordRequiredText}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},at=function(e){return l(h,{maxWidth:"sm",children:[e.children,o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})},lt=function(e){var t=fe(r(!1),2),i=t[0],a=t[1],d=N(),s=d.formState.errors,c=d.handleSubmit,u=d.control;return l(h,{maxWidth:"xs",variant:"auth",children:[i&&o(rt,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?o(ke,{style:{textAlign:"center",margin:5},children:e.texts.passwordChanged}):o(A,ue(ue({},d),{},{children:l("form",{onSubmit:c((function(t){console.log("handling subb",t),t.password===t.confirmPassword?e.handleNewPassword():a(!0)})),children:[o(j,{control:u,name:"password",render:function(t){var r,n,i=t.field;return o(Pe,ue({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=s.password)||void 0===n?void 0:n.message,startAdornment:o(q,{position:"start",children:o(R,{})})},i))},rules:{required:e.texts.passwordRequiredText}}),o(j,{control:u,name:"confirmPassword",render:function(t){var r,n,i=t.field;return o(Pe,ue({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=s.confirmPassword)||void 0===n?void 0:n.message,startAdornment:o(q,{position:"start",children:o(R,{})})},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updatePassword})]})}))]})};lt.propTypes={texts:a.object,handleNewPassword:a.func};var ot=function(e){var t=N(),r=t.formState.errors,i=t.handleSubmit;t.register;var a=t.control;return o(h,{maxWidth:"xs",variant:"auth",children:e.sent?o(ke,{style:{textAlign:"center",margin:5},children:e.emailSentText}):l("form",{onSubmit:i(e.handleResetPassword),children:[o(j,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(q,{position:"start",children:o(z,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};ot.propTypes={texts:a.object,emailSentText:a.string,handleResetPassword:a.func};var dt=function(e){var t=N(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return l(h,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.error&&l(u,{severity:"error",variant:"inContainer",children:[e.errorTitle&&o(c,{children:e.errorTitle}),e.errorText]}),o(A,ue(ue({},t),{},{children:l("form",{onSubmit:i(e.handleSignUp),children:[o(j,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(Pe,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(i=r.fullName)||void 0===i?void 0:i.message,startAdornment:o(q,{position:"start",children:o(E,{})})})},rules:{required:e.texts.fullNameRequiredText}}),o(j,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Pe,{fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(q,{position:"start",children:o(z,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(j,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(Pe,ue({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:o(q,{position:"start",children:o(R,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(n,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l(f,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",o("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),o(B,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(Je,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&o(Je,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&o(Je,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};dt.propTypes={texts:a.object,viaGoogle:a.bool,viaGithub:a.bool,viaTwitter:a.bool,handleSignUp:a.func,handleRouteToSignIn:a.func,handleGoogleSignUp:a.func,handleGithubSignUp:a.func,handleTwitterSignUp:a.func};var st=function(e){var t=N(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return l(h,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&o(rt,{title:e.errorTitle,text:e.errorText,severity:"error"}),l("form",{onSubmit:i(e.handleSignIn),children:[o(j,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Pe,ue({fullWidth:!0,type:"text",value:null!==(n=a.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(i=r.email)||void 0===i?void 0:i.message,placeholder:e.texts.emailPlaceholder,startAdornment:o(q,{position:"start",children:o(z,{})})},a))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),o(j,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(Pe,ue({fullWidth:!0,type:"password",defaultValue:null!==(n=l.value)&&void 0!==n?n:"",value:null!==(i=l.value)&&void 0!==i?i:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message,startAdornment:o(q,{position:"start",children:o(R,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(f,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),l(f,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",o("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),o(B,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(Je,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&o(Je,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&o(Je,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};st.propTypes={texts:a.object,viaGoogle:a.bool,viaGithub:a.bool,viaTwitter:a.bool,handleSignIn:a.func,handleRouteToSignUp:a.func,handleGoogleSignIn:a.func,handleGithubSignIn:a.func,handleTwitterSignIn:a.func};var ct=function(e){return l(h,{maxWidth:"xs",children:[o(ke,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&o(Je,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&o(Je,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&o(Je,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&o(Je,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&o(Je,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&o(Je,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&o(Je,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};ct.propTypes={viaMada:a.bool,viaWallet:a.bool,viaSTCPay:a.bool,viaPayPal:a.bool,viaApplePay:a.bool,viaCreditCard:a.bool,madaLabel:a.string,stcPayLabel:a.string,paypalLabel:a.string,walletLabel:a.string,applePayLabel:a.string,visaMasterLabel:a.string,handleMada:a.func,handleWallet:a.func,handleSTCPay:a.func,handlePayPal:a.func,handleApplePay:a.func,handleCreditCard:a.func};var ut=function(e){var t,r=N(),i=r.formState.errors,a=r.handleSubmit,d=r.control;return o(h,{maxWidth:"xs",children:l("form",{onSubmit:a(e.handle),children:[o(Pe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message}),o(j,{control:d,name:"cardName",render:function(e){var t;return e.field,o(Pe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(j,{control:d,name:"cardName",render:function(e){var t;return e.field,o(Pe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(j,{control:d,name:"cardName",render:function(e){var t;return e.field,o(Pe,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=i.password)||void 0===t?void 0:t.message})}}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},pt=function(e){var t=fe(r(0),2),i=t[0],a=t[1],d=N();d.formState.errors;var s=d.handleSubmit,c=d.control;return l(h,{maxWidth:"xs",children:[l(f,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(i).toLocaleString("en")||"0",o(f,{children:e.currency||"SAR"})]}),o(A,ue(ue({},d),{},{children:l("form",{onSubmit:s(e.handleChargeWallet),children:[o(j,{control:c,name:"amount",render:function(t){var r,n=t.field;return o(Pe,ue(ue({fullWidth:!0,placeholder:e.texts.amountLabel,type:"number",value:null!==(r=n.value)&&void 0!==r?r:""},n),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){n.onChange(parseFloat(e.target.value)),a(e.target.value)}}))}}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSignIn,children:e.texts.chargeWallet})]})}))]})};pt.propTypes={texts:a.object,handleChargeWallet:a.func};var mt=function(e){return l(h,{maxWidth:"xs",children:[o(f,{align:"center",children:"Wallet Balance"}),l(f,{align:"center",variant:"h1",children:[e.walletBalance||"0",o(f,{children:e.currency||"SAR"})]}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},ht=function(e){var t,r,i,a,d,s,c,u,p,m,v="ar"===e.lang,g=N(),x=g.formState.errors,b=g.handleSubmit;g.register;var y=g.control,w={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return l(h,{maxWidth:"sm",style:{direction:v?"rtl":"ltr"},children:[o(f,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(nt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(B,{variant:"middle"}),o(f,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),o(A,ue(ue({},g),{},{children:l("form",{onSubmit:b(e.handlePayNow),children:[l(h,{sx:w,children:[o(j,{control:y,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.firstNameLabel)+" *",helperText:null===(i=x.firstName)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(j,{control:y,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.lastNameLabel)+" *",helperText:null===(i=x.lastName)||void 0===i?void 0:i.message},a))}})]}),o(j,{control:y,name:"email",render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.emailLabel)+" *",helperText:null===(i=x.email)||void 0===i?void 0:i.message},a))},rules:{required:null===(i=e.texts)||void 0===i?void 0:i.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(a=e.texts)||void 0===a?void 0:a.emailInvalidText}}}),l(h,{sx:w,children:[o(j,{control:y,name:"streetAddress",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.streetAddressLabel)+" *",helperText:null===(i=x.streetAddress)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(j,{control:y,name:"buildingNumber",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.buildingNumberLabel)+" *",helperText:null===(i=x.buildingNumber)||void 0===i?void 0:i.message},a))}})]}),l(h,{sx:w,children:[o(j,{control:y,name:"province",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.stateLabel)+" *",helperText:null===(i=x.province)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(j,{control:y,name:"city",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.cityLabel)+" *",helperText:null===(i=x.city)||void 0===i?void 0:i.message},a))}})]}),l(h,{sx:w,children:[o(j,{control:y,name:"zipCode",rules:{required:null===(p=e.texts)||void 0===p?void 0:p.required},render:function(t){var r,n,i,a=t.field;return o(Pe,ue({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=a.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.zipCodeLabel)+" *",helperText:null===(i=x.zipCode)||void 0===i?void 0:i.message},a))}}),o("div",{style:{width:20}}),o(j,{control:y,name:"country",rules:{required:null===(m=e.texts)||void 0===m?void 0:m.required},render:function(t){var r,n,i,a=t.field;return l(Qe,ue(ue({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(n=a.value)&&void 0!==n?n:"",helperText:null===(i=x.country)||void 0===i?void 0:i.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},a),{},{children:[o("option",{}),e.countriesList.map((function(e,t){return o("option",{children:e},t)}))]}))}})]}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};ht.propTypes={texts:a.object,lang:a.string,countriesList:a.array,products:a.array,total:a.string,handlePayNow:a.func};var ft=function(e){var t="ar"===e.lang;return l("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l(h,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[o(f,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),o(B,{variant:"middle"}),l(f,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",o("strong",{children:e.userEmail})]}),o(f,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),o(f,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),o(B,{variant:"middle"}),e.products&&l(d,{children:[o(f,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(nt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(B,{variant:"middle"})]}),o(n,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),o(n,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),o(n,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),o(f,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),o("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:o(f,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};ft.propTypes={texts:a.object,products:a.array,countriesList:a.array,lang:a.string,total:a.string,userEmail:a.string,orderNumber:a.string,confirmationTitle:a.string,handleHome:a.func,handlePrint:a.func,handleHistory:a.func,handleRefundPolicyLink:a.func};var vt=function(e){return o("div",{children:e.children})},gt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},xt=function(e){return pe({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},bt=D("div")((function(e){var t=e.theme;return ue({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),yt=D(U,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ue({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:240,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),wt=D($,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ue(ue({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&ue(ue({},gt(t)),{},{"& .MuiDrawer-paper":gt(t)})),!r&&ue(ue({},xt(t)),{},{"& .MuiDrawer-paper":xt(t)}))}));function Tt(e){var r=M(),n=fe(t.useState(!0),2),a=n[0],d=n[1],s=fe(t.useState(null),2);s[0],s[1];var c=fe(t.useState(null),2),u=c[0],p=c[1];return l(G,{sx:{display:"flex"},children:[o(yt,{variant:"appbar",position:"fixed",open:a,children:l(_,{variant:"appbar",children:[o(F,{color:"inherit","aria-label":"open drawer",onClick:function(){d(!0)},edge:"start",sx:ue({marginRight:5},a&&{display:"none"}),children:o(Z,{})}),l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[o(f,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),l(G,{children:[o(i,{title:"Open settings",children:o(F,{onClick:function(e){p(e.currentTarget)},sx:{p:0},children:o(Q,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),o(K,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:u,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(u),onClose:function(){p(null)},variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:r.allBorderRadius,border:"1px solid ".concat(r.primaryActionColor)}},children:e.accountMenu.map((function(e){return l(ee,{onClick:e.action,children:[e.icon&&o(e.icon,{}),o(f,{textAlign:"center",children:e.label})]},e.label)}))})]})]})]})}),l(wt,{variant:"permanent",open:a,children:[l(bt,{children:[e.logo,o(F,{onClick:function(){d(!1)},children:"rtl"===r.direction?o(X,{}):o(H,{})})]}),o(B,{}),o(V,{children:e.pages.map((function(t,r){var n,d;return o(i,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:a?0:1}},children:l(Y,{variant:(null===(n=e.pageName)||void 0===n?void 0:n.toLowerCase())===(null===(d=t.slug)||void 0===d?void 0:d.toLowerCase())&&"clicked",onClick:t.action,sx:{minHeight:48,justifyContent:a?"initial":"center",px:2.5},children:[o(t.icon,{}),o("div",{style:{width:20}}),o(J,{primary:t.text,sx:{opacity:a?1:0}})]},t.text)},r)}))})]}),l(G,{sx:{flexGrow:1,p:3},children:[o(bt,{}),e.children]})]})}var Ct=["children","onClose","hideClose"],kt=function(e){var t=e.children,r=e.onClose,n=e.hideClose,i=me(e,Ct);return l(ae,ue(ue({sx:{m:0,p:2}},i),{},{children:[t,n?null:o(F,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:o(te,{})})]}))};function Pt(e){var t=fe(r(!1),2);return t[0],t[1],l(re,ue(ue({},e),{},{variant:"main",children:[o(kt,{onClose:e.onClose,hideClose:e.hideClose,children:e.title}),o(ie,{children:e.children}),o(ne,{children:e.actions})]}))}var St=function(e){var t=le();return o(oe,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return l(de,{onClick:e.action,children:[e.icon&&o(e.icon,{}),o("div",{style:{width:10}}),o(se,{textAlign:"center",children:e.label})]},e.label)}))})};St.propTypes={handleClose:a.func,menuItems:a.array};var Wt=["Products","Pricing","Blog"],Ot=function(e){var r=le(),a=fe(t.useState(null),2),d=a[0],s=a[1],c=fe(t.useState(null),2),u=c[0],p=c[1],m=function(){s(null)};return console.log("theme is ",r),o(U,{position:"static",variant:"appbar",children:o(h,{maxWidth:"xl",variant:"appbar",children:l(_,{disableGutters:!0,children:[o(f,{variant:"h6",noWrap:!0,component:"div",sx:{mr:2,display:{xs:"none",md:"flex"}},children:"LOGO"}),l(G,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[o(F,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e.handleOpenSideMenu,color:"inherit",children:o(Z,{})}),o(K,{id:"menu-appbar",anchorEl:d,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(d),onClose:m,sx:{display:{xs:"block",md:"none"}},children:Wt.map((function(e){return o(ee,{onClick:m,children:o(f,{textAlign:"center",children:e})},e)}))})]}),o(f,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:"LOGO"}),o(G,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:Wt.map((function(e){return o(n,{onClick:m,sx:{my:2,display:"block"},children:e},e)}))}),l(G,{sx:{flexGrow:0},children:[o(i,{title:"Open settings",children:o(F,{onClick:function(e){p(e.currentTarget)},sx:{p:0},children:o(Q,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),o(St,{anchor:u,handleClose:function(e){return p(null)},menuItems:e.accountMenu})]})]})})})};export{xe as ActionButton,ge as AdaptiveButton,vt as Box,pt as ChargeWalletForm,ht as CheckoutForm,ft as ConfirmationPage,ut as CreditCardForm,rt as HawaAlert,Ot as HawaAppBar,Tt as HawaAppLayout,Ke as HawaButton,ye as HawaCheckbox,Xe as HawaColorPicker,Pt as HawaDialog,tt as HawaInputLabel,Te as HawaItemCard,Je as HawaLogoButton,Ce as HawaPricingCard,we as HawaRadio,Qe as HawaSelect,Ye as HawaSettingsRow,nt as HawaTable,et as HawaTextArea,Pe as HawaTextField,ke as HawaTypography,lt as NewPasswordForm,be as OfflineBanner,mt as PayWithWallet,ot as ResetPasswordForm,ct as SelectPayment,st as SignInForm,dt as SignUpForm,it as UserProfileForm,at as UserSettingsForm};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@mui/material/Button"),r=require("@mui/material/Tooltip"),l=require("prop-types"),a=require("react/jsx-runtime"),n=require("@mui/material/Snackbar"),i=require("@mui/material/AlertTitle"),o=require("@mui/material/Alert"),s=require("@mui/material/FormControlLabel"),d=require("@mui/material/Checkbox"),u=require("@mui/material/Container"),c=require("@mui/material/Typography"),x=require("@mui/icons-material/CheckCircleOutlined"),h=require("@mui/material/Input"),f=require("@mui/material/InputLabel"),m=require("@mui/material/Switch"),p=require("@mui/icons-material/GitHub"),v=require("@mui/icons-material/Twitter"),g=require("@mui/icons-material/AccountBalanceWallet"),j=require("@mui/material/Select"),y=require("@mui/material/Table"),b=require("@mui/material/TableBody"),w=require("@mui/material/TableCell"),C=require("@mui/material/TableContainer"),T=require("@mui/material/TableHead"),P=require("@mui/material/TableRow"),q=require("react-hook-form"),S=require("@mui/material/InputAdornment"),k=require("@mui/icons-material/HttpsOutlined"),W=require("@mui/icons-material/MailOutline"),L=require("@mui/icons-material/PermIdentityOutlined"),A=require("@mui/material/Divider"),O=require("@mui/material/styles"),I=require("@mui/material/Box"),F=require("@mui/material/Drawer"),R=require("@mui/material/AppBar"),z=require("@mui/material/Toolbar"),B=require("@mui/material/List"),N=require("@mui/material/IconButton"),D=require("@mui/icons-material/Menu"),M=require("@mui/icons-material/ChevronLeft"),G=require("@mui/icons-material/ChevronRight"),H=require("@mui/material/ListItemButton"),E=require("@mui/material/ListItemText"),U=require("@mui/material/Menu"),Z=require("@mui/material/Avatar"),$=require("@mui/material/MenuItem"),_=require("@mui/icons-material/Close"),V=require("@mui/material/Dialog"),X=require("@mui/material/DialogActions"),J=require("@mui/material/DialogContent"),K=require("@mui/material/DialogTitle"),Q=require("@mui/material");function Y(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var ee=Y(e),te=Y(t),re=Y(r),le=Y(l),ae=Y(n),ne=Y(i),ie=Y(o),oe=Y(s),se=Y(d),de=Y(u),ue=Y(c),ce=Y(x),xe=Y(h),he=Y(f),fe=Y(m),me=Y(p),pe=Y(v),ve=Y(g),ge=Y(j),je=Y(y),ye=Y(b),be=Y(w),we=Y(C),Ce=Y(T),Te=Y(P),Pe=Y(S),qe=Y(k),Se=Y(W),ke=Y(L),We=Y(A),Le=Y(I),Ae=Y(F),Oe=Y(R),Ie=Y(z),Fe=Y(B),Re=Y(N),ze=Y(D),Be=Y(M),Ne=Y(G),De=Y(H),Me=Y(E),Ge=Y(U),He=Y(Z),Ee=Y($),Ue=Y(_),Ze=Y(V),$e=Y(X),_e=Y(J),Ve=Y(K);function Xe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,l)}return r}function Je(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(r),!0).forEach((function(t){Ke(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Ke(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Qe(e,t){if(null==e)return{};var r,l,a=function(e,t){if(null==e)return{};var r,l,a={},n=Object.keys(e);for(l=0;l<n.length;l++)r=n[l],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)r=n[l],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Ye(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var l,a,n=[],i=!0,o=!1;try{for(r=r.call(e);!(i=(l=r.next()).done)&&(n.push(l.value),!t||n.length!==t);i=!0);}catch(e){o=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(o)throw a}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return et(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return et(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,l=new Array(t);r<t;r++)l[r]=e[r];return l}var tt=function(e){return e.showText?a.jsxs(te.default,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,a.jsx("div",{style:{width:10}}),e.buttonText]}):a.jsx(re.default,{title:e.buttonText,placement:"top",children:a.jsx(te.default,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};tt.propTypes={buttonText:le.default.string,showText:le.default.bool};var rt=function(t){var r=Ye(e.useState(t.defaultValue),2),l=r[0],n=r[1];return a.jsx(de.default,{variant:t.location||"panelTabs",children:t.options.map((function(e,r){var i;return a.jsx(te.default,{onClick:function(){t.handleChange(e.value),n(e.value)},fullWidth:!0,variant:(null==l?void 0:l.toLowerCase())===(null===(i=e.value)||void 0===i?void 0:i.toLowerCase())?"selected":"unselected",children:e.label},r)}))})},lt=function(e){return a.jsx(ue.default,Je(Je({},e),{},{children:e.children}))},at=function(e){return a.jsxs("div",{style:e.inForm&&{width:"100%"},children:[a.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&a.jsx(he.default,{children:e.label}),e.helperText&&a.jsx(ue.default,{variant:"validation",children:e.helperText})]}),a.jsx(xe.default,Je({disableUnderline:!0},e))]})},nt=function(e){return a.jsx(fe.default,Je({},e))},it=function(e){return a.jsxs(de.default,{variant:"settingsRow",children:[a.jsx(lt,{children:e.settingsLabel}),"checkbox"===e.settingsType&&a.jsx(se.default,Je({},e)),"text"===e.settingsType&&a.jsx(at,Je({},e)),"radio"===e.settingsType&&a.jsx(rt,Je({location:"inSettings"},e)),"boolean"===e.settingsType&&a.jsx(nt,Je({},e))]})};it.propTypes={type:le.default.oneOf(["text","number","password"]),helperText:le.default.string};var ot=function(e){var t,r="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":r=a.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":r=a.jsx(me.default,{});break;case"twitter":r=a.jsx(pe.default,{});break;case"mada":r=a.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":r=a.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":r=a.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":r=a.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":r=a.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":r=a.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":r=a.jsx(ve.default,{})}return a.jsxs(te.default,Je(Je({},e),{},{variant:"withLogo",children:[r,a.jsx("div",{style:{width:10}}),a.jsx(ue.default,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},st=function(e){return a.jsxs("div",{style:{width:"100%"},children:[a.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[a.jsx(he.default,{children:e.label}),e.helperText&&a.jsx(ue.default,{variant:"validation",children:e.helperText})]}),a.jsx(ge.default,Je(Je({},e),{},{children:e.children}))]})},dt=function(e){return a.jsxs(ie.default,{severity:e.severity,icon:e.hideIcon,children:[e.title&&a.jsx(ne.default,{children:e.title}),e.text]})},ut=function(e){var t="ar"===e.lang;return a.jsx(we.default,{style:{direction:t?"rtl":"ltr"},children:a.jsxs(je.default,{"aria-label":"a dense table",children:[a.jsx(Ce.default,{children:a.jsx(Te.default,{children:e.columns.map((function(e,r){return a.jsx(be.default,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})}),a.jsx(ye.default,{children:e.rows.map((function(e,r){return a.jsx(Te.default,{children:e.map((function(e,r){return a.jsx(be.default,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))},r)}))}),e.end&&a.jsx(Te.default,{children:e.end.map((function(e,r){return a.jsx(be.default,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})},ct=function(e){var t=q.useForm(),r=t.formState.errors,l=t.handleSubmit,n=t.control;return a.jsxs(de.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.error&&a.jsxs(ie.default,{severity:"error",variant:"inContainer",children:[e.errorTitle&&a.jsx(ne.default,{children:e.errorTitle}),e.errorText]}),a.jsx(q.FormProvider,Je(Je({},t),{},{children:a.jsxs("form",{onSubmit:l(e.handleSignUp),children:[a.jsx(q.Controller,{control:n,name:"fullName",render:function(t){var l,n,i=t.field;return a.jsx(at,{fullWidth:!0,type:"text",value:null!==(l=i.value)&&void 0!==l?l:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(n=r.fullName)||void 0===n?void 0:n.message,startAdornment:a.jsx(Pe.default,{position:"start",children:a.jsx(ke.default,{})})})},rules:{required:e.texts.fullNameRequiredText}}),a.jsx(q.Controller,{control:n,name:"email",render:function(t){var l,n,i=t.field;return a.jsx(at,{fullWidth:!0,type:"text",value:null!==(l=i.value)&&void 0!==l?l:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:a.jsx(Pe.default,{position:"start",children:a.jsx(Se.default,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),a.jsx(q.Controller,{control:n,name:"password",render:function(t){var l,n,i,o=t.field;return a.jsx(at,Je({fullWidth:!0,type:"password",defaultValue:null!==(l=o.value)&&void 0!==l?l:"",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message,startAdornment:a.jsx(Pe.default,{position:"start",children:a.jsx(qe.default,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),a.jsx(te.default,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),a.jsxs(ue.default,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",a.jsx("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),a.jsx(We.default,{}),a.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&a.jsx(ot,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&a.jsx(ot,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&a.jsx(ot,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};ct.propTypes={theme:le.default.oneOf(["secondary","primary"])};at.propTypes={theme:le.default.oneOf(["secondary","primary"]),viaApplePay:le.default.bool,viaGooglePay:le.default.bool,viaSTCPay:le.default.bool,viaCreditCard:le.default.bool,viaPayPal:le.default.bool,handleApplePay:le.default.func};var xt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},ht=function(e){return Ke({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},ft=O.styled("div")((function(e){var t=e.theme;return Je({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),mt=O.styled(Oe.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return Je({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:240,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),pt=O.styled(Ae.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return Je(Je({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&Je(Je({},xt(t)),{},{"& .MuiDrawer-paper":xt(t)})),!r&&Je(Je({},ht(t)),{},{"& .MuiDrawer-paper":ht(t)}))}));var vt=["children","onClose","hideClose"],gt=function(e){var t=e.children,r=e.onClose,l=e.hideClose,n=Qe(e,vt);return a.jsxs(Ve.default,Je(Je({sx:{m:0,p:2}},n),{},{children:[t,l?null:a.jsx(Re.default,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:a.jsx(Ue.default,{})})]}))};var jt=function(e){var t=Q.useTheme();return a.jsx(Q.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return a.jsxs(Q.MenuItem,{onClick:e.action,children:[e.icon&&a.jsx(e.icon,{}),a.jsx("div",{style:{width:10}}),a.jsx(Q.Typography,{textAlign:"center",children:e.label})]},e.label)}))})},yt=["Products","Pricing","Blog"];exports.ActionButton=function(e){return a.jsx(te.default,Je(Je({},e),{},{children:e.text}))},exports.AdaptiveButton=tt,exports.Box=function(e){return a.jsx("div",{children:e.children})},exports.ChargeWalletForm=function(t){var r=Ye(e.useState(0),2),l=r[0],n=r[1],i=q.useForm();i.formState.errors;var o=i.handleSubmit,s=i.control;return a.jsxs(de.default,{maxWidth:"xs",children:[a.jsxs(ue.default,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(l).toLocaleString("en")||"0",a.jsx(ue.default,{children:t.currency||"SAR"})]}),a.jsx(q.FormProvider,Je(Je({},i),{},{children:a.jsxs("form",{onSubmit:o(t.handleChargeWallet),children:[a.jsx(q.Controller,{control:s,name:"amount",render:function(e){var t,r=e.field;return a.jsx(at,Je(Je({fullWidth:!0,placeholder:"Enter amount",type:"number",value:null!==(t=r.value)&&void 0!==t?t:""},r),{},{inputProps:{inputMode:"numeric",min:"0",max:"9999999",step:"0.01"},onChange:function(e){r.onChange(parseFloat(e.target.value)),console.log("e",e.target.value),n(e.target.value)}}))}}),a.jsx(te.default,{type:"submit",fullWidth:!0,variant:"last",onClick:t.handleSignIn,children:"Charge Wallet"})]})}))]})},exports.CheckoutForm=function(e){var t,r,l,n,i,o,s,d,u,c,x="ar"===e.lang,h=q.useForm(),f=h.formState.errors,m=h.handleSubmit;h.register;var p=h.control,v={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return a.jsxs(de.default,{maxWidth:"sm",style:{direction:x?"rtl":"ltr"},children:[a.jsx(ue.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),a.jsx(ut,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),a.jsx(We.default,{variant:"middle"}),a.jsx(ue.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),a.jsx(q.FormProvider,Je(Je({},h),{},{children:a.jsxs("form",{onSubmit:m(e.handlePayNow),children:[a.jsxs(de.default,{sx:v,children:[a.jsx(q.Controller,{control:p,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,l,n,i=t.field;return a.jsx(at,Je({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(l=e.texts)||void 0===l?void 0:l.firstNameLabel)+" *",helperText:null===(n=f.firstName)||void 0===n?void 0:n.message},i))}}),a.jsx("div",{style:{width:20}}),a.jsx(q.Controller,{control:p,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,l,n,i=t.field;return a.jsx(at,Je({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(l=e.texts)||void 0===l?void 0:l.lastNameLabel)+" *",helperText:null===(n=f.lastName)||void 0===n?void 0:n.message},i))}})]}),a.jsx(q.Controller,{control:p,name:"email",render:function(t){var r,l,n,i=t.field;return a.jsx(at,Je({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(l=e.texts)||void 0===l?void 0:l.emailLabel)+" *",helperText:null===(n=f.email)||void 0===n?void 0:n.message},i))},rules:{required:null===(l=e.texts)||void 0===l?void 0:l.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(n=e.texts)||void 0===n?void 0:n.emailInvalidText}}}),a.jsxs(de.default,{sx:v,children:[a.jsx(q.Controller,{control:p,name:"streetAddress",rules:{required:null===(i=e.texts)||void 0===i?void 0:i.required},render:function(t){var r,l,n,i=t.field;return a.jsx(at,Je({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(l=e.texts)||void 0===l?void 0:l.streetAddressLabel)+" *",helperText:null===(n=f.streetAddress)||void 0===n?void 0:n.message},i))}}),a.jsx("div",{style:{width:20}}),a.jsx(q.Controller,{control:p,name:"buildingNumber",rules:{required:null===(o=e.texts)||void 0===o?void 0:o.required},render:function(t){var r,l,n,i=t.field;return a.jsx(at,Je({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(l=e.texts)||void 0===l?void 0:l.buildingNumberLabel)+" *",helperText:null===(n=f.buildingNumber)||void 0===n?void 0:n.message},i))}})]}),a.jsxs(de.default,{sx:v,children:[a.jsx(q.Controller,{control:p,name:"province",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,l,n,i=t.field;return a.jsx(at,Je({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(l=e.texts)||void 0===l?void 0:l.stateLabel)+" *",helperText:null===(n=f.province)||void 0===n?void 0:n.message},i))}}),a.jsx("div",{style:{width:20}}),a.jsx(q.Controller,{control:p,name:"city",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,l,n,i=t.field;return a.jsx(at,Je({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(l=e.texts)||void 0===l?void 0:l.cityLabel)+" *",helperText:null===(n=f.city)||void 0===n?void 0:n.message},i))}})]}),a.jsxs(de.default,{sx:v,children:[a.jsx(q.Controller,{control:p,name:"zipCode",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,l,n,i=t.field;return a.jsx(at,Je({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(l=e.texts)||void 0===l?void 0:l.zipCodeLabel)+" *",helperText:null===(n=f.zipCode)||void 0===n?void 0:n.message},i))}}),a.jsx("div",{style:{width:20}}),a.jsx(q.Controller,{control:p,name:"country",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,l,n,i=t.field;return a.jsxs(st,Je(Je({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(l=i.value)&&void 0!==l?l:"",helperText:null===(n=f.country)||void 0===n?void 0:n.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},i),{},{children:[a.jsx("option",{}),e.countriesList.map((function(e,t){return a.jsx("option",{children:e},t)}))]}))}})]}),a.jsx(te.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})},exports.ConfirmationPage=function(e){var t="ar"===e.lang,r=q.useForm();return r.formState.errors,r.handleSubmit,r.register,r.control,a.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[a.jsxs(de.default,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[a.jsx(ue.default,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),a.jsx(We.default,{variant:"middle"}),a.jsxs(ue.default,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",a.jsx("strong",{children:e.userEmail})]}),a.jsx(ue.default,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),a.jsx(ue.default,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),a.jsx(We.default,{variant:"middle"}),e.products&&a.jsxs(a.Fragment,{children:[a.jsx(ue.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),a.jsx(ut,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),a.jsx(We.default,{variant:"middle"})]}),a.jsx(te.default,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),a.jsx(te.default,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),a.jsx(te.default,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),a.jsx(ue.default,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),a.jsx("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:a.jsx(ue.default,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})},exports.CreditCardForm=function(e){var t,r=q.useForm(),l=r.formState.errors,n=r.handleSubmit,i=r.control;return a.jsx(de.default,{maxWidth:"xs",children:a.jsxs("form",{onSubmit:n(e.handle),children:[a.jsx(at,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=l.password)||void 0===t?void 0:t.message}),a.jsx(q.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,a.jsx(at,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=l.password)||void 0===t?void 0:t.message})}}),a.jsx(q.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,a.jsx(at,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=l.password)||void 0===t?void 0:t.message})}}),a.jsx(q.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,a.jsx(at,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=l.password)||void 0===t?void 0:t.message})}}),a.jsx(te.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},exports.HawaAlert=dt,exports.HawaAppBar=function(e){var t=Q.useTheme(),r=Ye(ee.default.useState(null),2),l=r[0],n=r[1],i=Ye(ee.default.useState(null),2),o=i[0],s=i[1],d=function(){n(null)};return console.log("theme is ",t),a.jsx(Oe.default,{position:"static",variant:"appbar",children:a.jsx(de.default,{maxWidth:"xl",variant:"appbar",children:a.jsxs(Ie.default,{disableGutters:!0,children:[a.jsx(ue.default,{variant:"h6",noWrap:!0,component:"div",sx:{mr:2,display:{xs:"none",md:"flex"}},children:"LOGO"}),a.jsxs(Le.default,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[a.jsx(Re.default,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e.handleOpenSideMenu,color:"inherit",children:a.jsx(ze.default,{})}),a.jsx(Ge.default,{id:"menu-appbar",anchorEl:l,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(l),onClose:d,sx:{display:{xs:"block",md:"none"}},children:yt.map((function(e){return a.jsx(Ee.default,{onClick:d,children:a.jsx(ue.default,{textAlign:"center",children:e})},e)}))})]}),a.jsx(ue.default,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:"LOGO"}),a.jsx(Le.default,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:yt.map((function(e){return a.jsx(te.default,{onClick:d,sx:{my:2,display:"block"},children:e},e)}))}),a.jsxs(Le.default,{sx:{flexGrow:0},children:[a.jsx(re.default,{title:"Open settings",children:a.jsx(Re.default,{onClick:function(e){s(e.currentTarget)},sx:{p:0},children:a.jsx(He.default,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),a.jsx(jt,{anchor:o,handleClose:function(e){return s(null)},menuItems:e.accountMenu})]})]})})})},exports.HawaAppLayout=function(e){var t=O.useTheme(),r=Ye(ee.default.useState(!0),2),l=r[0],n=r[1],i=Ye(ee.default.useState(null),2);i[0],i[1];var o=Ye(ee.default.useState(null),2),s=o[0],d=o[1];return a.jsxs(Le.default,{sx:{display:"flex"},children:[a.jsx(mt,{variant:"appbar",position:"fixed",open:l,children:a.jsxs(Ie.default,{variant:"appbar",children:[a.jsx(Re.default,{color:"inherit","aria-label":"open drawer",onClick:function(){n(!0)},edge:"start",sx:Je({marginRight:5},l&&{display:"none"}),children:a.jsx(ze.default,{})}),a.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[a.jsx(ue.default,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),a.jsxs(Le.default,{children:[a.jsx(re.default,{title:"Open settings",children:a.jsx(Re.default,{onClick:function(e){d(e.currentTarget)},sx:{p:0},children:a.jsx(He.default,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),a.jsx(Ge.default,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:s,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(s),onClose:function(){d(null)},variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.accountMenu.map((function(e){return a.jsxs(Ee.default,{onClick:e.action,children:[e.icon&&a.jsx(e.icon,{}),a.jsx(ue.default,{textAlign:"center",children:e.label})]},e.label)}))})]})]})]})}),a.jsxs(pt,{variant:"permanent",open:l,children:[a.jsxs(ft,{children:[e.logo,a.jsx(Re.default,{onClick:function(){n(!1)},children:"rtl"===t.direction?a.jsx(Ne.default,{}):a.jsx(Be.default,{})})]}),a.jsx(We.default,{}),a.jsx(Fe.default,{children:e.pages.map((function(t,r){var n,i;return a.jsx(re.default,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:l?0:1}},children:a.jsxs(De.default,{variant:(null===(n=e.pageName)||void 0===n?void 0:n.toLowerCase())===(null===(i=t.slug)||void 0===i?void 0:i.toLowerCase())&&"clicked",onClick:t.action,sx:{minHeight:48,justifyContent:l?"initial":"center",px:2.5},children:[a.jsx(t.icon,{}),a.jsx("div",{style:{width:20}}),a.jsx(Me.default,{primary:t.text,sx:{opacity:l?1:0}})]},t.text)},r)}))})]}),a.jsxs(Le.default,{sx:{flexGrow:1,p:3},children:[a.jsx(ft,{}),e.children]})]})},exports.HawaButton=function(e){return a.jsx(te.default,Je(Je({},e),{},{children:e.children}))},exports.HawaCheckbox=function(e){return console.log("props : ",e),a.jsx(ee.default.Fragment,{children:a.jsx(oe.default,{label:e.label,control:a.jsx(se.default,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},exports.HawaDialog=function(t){var r=Ye(e.useState(!1),2);return r[0],r[1],a.jsxs(Ze.default,Je(Je({},t),{},{variant:"main",children:[a.jsx(gt,{onClose:t.onClose,hideClose:t.hideClose,children:t.title}),a.jsx(_e.default,{children:t.children}),a.jsx($e.default,{children:t.actions})]}))},exports.HawaInputLabel=function(e){return a.jsx(he.default,{children:a.jsx("div",{style:{fontSize:15},children:e.label})})},exports.HawaItemCard=function(e){var t="ar"===e.lang;return a.jsxs(de.default,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&a.jsxs(de.default,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&a.jsx("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&a.jsx(de.default,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&a.jsx(de.default,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})},exports.HawaLogoButton=ot,exports.HawaPricingCard=function(e){var t,r,l="ar"===e.lang,n={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},i={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},o={usd:l?"دولار":"$",sar:l?"ريال":"SAR"},s=l?e.features_ar:e.features;return a.jsxs(de.default,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:l?"rtl":"ltr"},children:[a.jsxs(de.default,{variant:"plan-header",children:[a.jsx(ue.default,{variant:"h3",fontWeight:500,children:l?e.title_ar:e.title}),a.jsx(ue.default,{variant:"caption",children:l?e.subtitle_ar:e.subtitle}),a.jsx("br",{}),a.jsx(ue.default,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?a.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[a.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,a.jsx("div",{style:{width:5}}),a.jsx(ue.default,{children:o[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),a.jsx(ue.default,{style:{fontSize:14,margin:5},children:l?n[e.cycleText]:i[e.cycleText]})]}):a.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[a.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[a.jsx(ue.default,{children:o[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),a.jsx("div",{style:{width:5}}),e.price]}),a.jsx(ue.default,{style:{fontSize:14,margin:5},children:"ar"===e.lang?n[e.cycleText]:i[e.cycleText]})]})})]}),a.jsx("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==s?void 0:s.map((function(e){return a.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[a.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:a.jsx(ce.default,{fontSize:"small"})}),a.jsx("div",{style:{width:10}}),a.jsx(ue.default,{variant:"subtitle2",children:e})]})}))}),a.jsx(te.default,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})},exports.HawaRadio=rt,exports.HawaSelect=st,exports.HawaSettingsRow=it,exports.HawaTable=ut,exports.HawaTextField=at,exports.HawaTypography=lt,exports.NewPasswordForm=function(t){var r=Ye(e.useState(""),2);r[0],r[1];var l=Ye(e.useState(""),2);l[0],l[1];var n=Ye(e.useState(!1),2),i=n[0],o=n[1],s=q.useForm(),d=s.formState.errors,u=s.handleSubmit,c=s.control;return a.jsxs(de.default,{maxWidth:"xs",variant:"auth",children:[i&&a.jsx(dt,{text:t.texts.passwordMatchError,severity:"error"}),t.passwordChanged?a.jsx(lt,{style:{textAlign:"center",margin:5},children:t.texts.passwordChanged}):a.jsx(q.FormProvider,Je(Je({},s),{},{children:a.jsxs("form",{onSubmit:u((function(e){console.log("handling subb",e),e.password===e.confirmPassword?t.handleNewPassword():o(!0)})),children:[a.jsx(q.Controller,{control:c,name:"password",render:function(e){var r,l,n=e.field;return a.jsx(at,Je({fullWidth:!0,type:"password",value:null!==(r=n.value)&&void 0!==r?r:"",label:t.texts.passwordLabel,placeholder:t.texts.passwordPlaceholder,helperText:null===(l=d.password)||void 0===l?void 0:l.message,startAdornment:a.jsx(Pe.default,{position:"start",children:a.jsx(qe.default,{})})},n))},rules:{required:t.texts.passwordRequiredText}}),a.jsx(q.Controller,{control:c,name:"confirmPassword",render:function(e){var r,l,n=e.field;return a.jsx(at,Je({fullWidth:!0,type:"password",value:null!==(r=n.value)&&void 0!==r?r:"",label:t.texts.confirmPasswordLabel,placeholder:t.texts.confirmPasswordPlaceholder,helperText:null===(l=d.confirmPassword)||void 0===l?void 0:l.message,startAdornment:a.jsx(Pe.default,{position:"start",children:a.jsx(qe.default,{})})},n))},rules:{required:t.texts.confirmPasswordRequiredText}}),a.jsx(te.default,{type:"submit",fullWidth:!0,variant:"last",children:t.texts.updatePassword})]})}))]})},exports.OfflineBanner=function(e){return a.jsx(ae.default,{variant:"danger",open:e.open,onClose:e.handleClose,children:a.jsxs(ie.default,{icon:!1,severity:"error",variant:"offline",children:[e.title&&a.jsx(ne.default,{children:e.title}),e.text]})})},exports.PayWithWallet=function(e){return a.jsxs(de.default,{maxWidth:"xs",children:[a.jsx(ue.default,{align:"center",children:"Wallet Balance"}),a.jsxs(ue.default,{align:"center",variant:"h1",children:[e.walletBalance||"0",a.jsx(ue.default,{children:e.currency||"SAR"})]}),a.jsx(te.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},exports.ResetPasswordForm=function(e){var t=q.useForm(),r=t.formState.errors,l=t.handleSubmit;t.register;var n=t.control;return a.jsx(de.default,{maxWidth:"xs",variant:"auth",children:e.sent?a.jsx(lt,{style:{textAlign:"center",margin:5},children:e.emailSentText}):a.jsxs("form",{onSubmit:l(e.handleResetPassword),children:[a.jsx(q.Controller,{control:n,name:"email",render:function(t){var l,n,i=t.field;return a.jsx(at,Je({fullWidth:!0,type:"text",value:null!==(l=i.value)&&void 0!==l?l:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:a.jsx(Pe.default,{position:"start",children:a.jsx(Se.default,{})})},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),a.jsx(te.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})},exports.SelectPayment=function(e){return a.jsxs(de.default,{maxWidth:"xs",children:[a.jsx(lt,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&a.jsx(ot,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&a.jsx(ot,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&a.jsx(ot,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&a.jsx(ot,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&a.jsx(ot,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&a.jsx(ot,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&a.jsx(ot,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})},exports.SignInForm=function(e){var t=q.useForm(),r=t.formState.errors,l=t.handleSubmit,n=t.control;return a.jsxs(de.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&a.jsx(dt,{title:e.errorTitle,text:e.errorText,severity:"error"}),a.jsxs("form",{onSubmit:l(e.handleSignIn),children:[a.jsx(q.Controller,{control:n,name:"email",render:function(t){var l,n,i=t.field;return a.jsx(at,Je({fullWidth:!0,type:"text",value:null!==(l=i.value)&&void 0!==l?l:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:a.jsx(Pe.default,{position:"start",children:a.jsx(Se.default,{})})},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),a.jsx(q.Controller,{control:n,name:"password",render:function(t){var l,n,i,o=t.field;return a.jsx(at,Je({fullWidth:!0,type:"password",defaultValue:null!==(l=o.value)&&void 0!==l?l:"",value:null!==(n=o.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message,startAdornment:a.jsx(Pe.default,{position:"start",children:a.jsx(qe.default,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),a.jsx(ue.default,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),a.jsx(te.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),a.jsxs(ue.default,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",a.jsx("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),a.jsx(We.default,{}),a.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&a.jsx(ot,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&a.jsx(ot,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&a.jsx(ot,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})},exports.SignUpForm=ct,exports.UserProfileForm=function(e){var t=q.useForm(),r=t.formState.errors,l=t.handleSubmit,n=t.control;return a.jsx(de.default,{maxWidth:"sm",children:a.jsx(q.FormProvider,Je(Je({},t),{},{children:a.jsxs("form",{onSubmit:l(e.handleUpdateProfile),children:[a.jsx(q.Controller,{control:n,name:"fullName",render:function(t){var l,n,i=t.field;return a.jsx(at,Je({fullWidth:!0,type:"text",value:null!==(l=i.value)&&void 0!==l?l:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(n=r.fullName)||void 0===n?void 0:n.message},i))}}),a.jsx(q.Controller,{control:n,name:"phoneNumber",render:function(e){var t=e.field;return a.jsx(at,Je({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),a.jsx(q.Controller,{control:n,name:"email",render:function(t){var l,n,i=t.field;return a.jsx(at,Je({fullWidth:!0,type:"text",value:null!==(l=i.value)&&void 0!==l?l:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),a.jsx(q.Controller,{control:n,name:"password",render:function(t){var l,n,i=t.field;return a.jsx(at,Je({fullWidth:!0,type:"password",value:null!==(l=i.value)&&void 0!==l?l:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=r.password)||void 0===n?void 0:n.message},i))},rules:{required:e.texts.passwordRequiredText}}),a.jsx(q.Controller,{control:n,name:"confirmPassword",render:function(t){var l,n,i=t.field;return a.jsx(at,Je({fullWidth:!0,type:"password",value:null!==(l=i.value)&&void 0!==l?l:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=r.confirmPassword)||void 0===n?void 0:n.message},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),a.jsx(te.default,{type:"submit",fullWidth:!0,variant:"last",children:"update profile"})," "]})}))})},exports.UserSettingsForm=function(e){return a.jsxs(de.default,{maxWidth:"sm",children:[e.children,a.jsx(te.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@mui/material/Button"),r=require("@mui/material/Tooltip"),n=require("prop-types"),l=require("react/jsx-runtime"),a=require("@mui/material/Snackbar"),i=require("@mui/material/AlertTitle"),o=require("@mui/material/Alert"),s=require("@mui/material/FormControlLabel"),d=require("@mui/material/Checkbox"),u=require("@mui/material/Container"),c=require("@mui/material/Typography"),f=require("@mui/icons-material/CheckCircleOutlined"),x=require("@mui/material/Input"),p=require("@mui/material/InputLabel"),h=require("@mui/material/Switch"),m=require("@emotion/styled"),v=require("@mui/icons-material/GitHub"),g=require("@mui/icons-material/Twitter"),j=require("@mui/icons-material/AccountBalanceWallet"),y=require("@mui/material/Select"),b=require("@mui/material/Table"),w=require("@mui/material/TableBody"),C=require("@mui/material/TableCell"),T=require("@mui/material/TableContainer"),P=require("@mui/material/TableHead"),k=require("@mui/material/TableRow"),S=require("react-hook-form"),q=require("@mui/material/InputAdornment"),O=require("@mui/icons-material/HttpsOutlined"),W=require("@mui/icons-material/MailOutline"),L=require("@mui/icons-material/PermIdentityOutlined"),A=require("@mui/material/Divider"),I=require("@mui/material/styles"),N=require("@mui/material/Box"),R=require("@mui/material/Drawer"),B=require("@mui/material/AppBar"),z=require("@mui/material/Toolbar"),E=require("@mui/material/List"),D=require("@mui/material/IconButton"),F=require("@mui/icons-material/Menu"),M=require("@mui/icons-material/ChevronLeft"),G=require("@mui/icons-material/ChevronRight"),$=require("@mui/material/ListItemButton"),H=require("@mui/material/ListItemText"),U=require("@mui/material/Menu"),_=require("@mui/material/Avatar"),V=require("@mui/material/MenuItem"),Z=require("@mui/icons-material/Close"),X=require("@mui/material/Dialog"),Y=require("@mui/material/DialogActions"),J=require("@mui/material/DialogContent"),K=require("@mui/material/DialogTitle"),Q=require("@mui/material");function ee(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function te(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var re=ee(e),ne=te(e),le=ee(t),ae=ee(r),ie=ee(n),oe=ee(a),se=ee(i),de=ee(o),ue=ee(s),ce=ee(d),fe=ee(u),xe=ee(c),pe=ee(f),he=ee(x),me=ee(p),ve=ee(h),ge=ee(m),je=ee(v),ye=ee(g),be=ee(j),we=ee(y),Ce=ee(b),Te=ee(w),Pe=ee(C),ke=ee(T),Se=ee(P),qe=ee(k),Oe=ee(q),We=ee(O),Le=ee(W),Ae=ee(L),Ie=ee(A),Ne=ee(N),Re=ee(R),Be=ee(B),ze=ee(z),Ee=ee(E),De=ee(D),Fe=ee(F),Me=ee(M),Ge=ee(G),$e=ee($),He=ee(H),Ue=ee(U),_e=ee(_),Ve=ee(V),Ze=ee(Z),Xe=ee(X),Ye=ee(Y),Je=ee(J),Ke=ee(K);function Qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function et(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(r),!0).forEach((function(t){tt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Qe(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function tt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rt(e,t){if(null==e)return{};var r,n,l=function(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}function nt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function lt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==r)return;var n,l,a=[],i=!0,o=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){o=!0,l=e}finally{try{i||null==r.return||r.return()}finally{if(o)throw l}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return at(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return at(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function at(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var it=function(e){return e.showText?l.jsxs(le.default,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,l.jsx("div",{style:{width:10}}),e.buttonText]}):l.jsx(ae.default,{title:e.buttonText,placement:"top",children:l.jsx(le.default,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};it.propTypes={buttonText:ie.default.string,onClick:ie.default.func,showText:ie.default.bool};var ot=function(t){var r=lt(e.useState(t.defaultValue),2),n=r[0],a=r[1];return l.jsx(fe.default,{variant:t.location||"panelTabs",children:t.options.map((function(e,r){var i;return l.jsx(le.default,{onClick:function(){t.handleChange(e.value),a(e.value)},fullWidth:!0,variant:(null==n?void 0:n.toLowerCase())===(null===(i=e.value)||void 0===i?void 0:i.toLowerCase())?"selected":"unselected",children:e.label},r)}))})};ot.propTypes={lang:ie.default.string,options:ie.default.array,defaultValue:ie.default.string,handleChange:ie.default.func,location:ie.default.string};var st=function(e){var t="ar"===e.lang;return l.jsxs(fe.default,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&l.jsxs(fe.default,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&l.jsx("div",{style:{margin:0,marginRight:-20,marginLeft:-20,marginBottom:-20,display:"flex",paddingTop:5,paddingLeft:5,paddingRight:5,justifyContent:"flex-end"},children:e.headerActions}),e.header]}),e.content&&l.jsx(fe.default,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&l.jsx(fe.default,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};st.propTypes={lang:ie.default.string,onCardClick:ie.default.func};var dt=function(e){var t,r,n="ar"===e.lang,a={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},i={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},o={usd:n?"دولار":"$",sar:n?"ريال":"SAR"},s=n?e.features_ar:e.features;return l.jsxs(fe.default,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:n?"rtl":"ltr"},children:[l.jsxs(fe.default,{variant:"plan-header",children:[l.jsx(xe.default,{variant:"h3",fontWeight:500,children:n?e.title_ar:e.title}),l.jsx(xe.default,{variant:"caption",children:n?e.subtitle_ar:e.subtitle}),l.jsx("br",{}),l.jsx(xe.default,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?l.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,l.jsx("div",{style:{width:5}}),l.jsx(xe.default,{children:o[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),l.jsx(xe.default,{style:{fontSize:14,margin:5},children:n?a[e.cycleText]:i[e.cycleText]})]}):l.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[l.jsx(xe.default,{children:o[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),l.jsx("div",{style:{width:5}}),e.price]}),l.jsx(xe.default,{style:{fontSize:14,margin:5},children:"ar"===e.lang?a[e.cycleText]:i[e.cycleText]})]})})]}),l.jsx("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==s?void 0:s.map((function(e){return l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[l.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:l.jsx(pe.default,{fontSize:"small"})}),l.jsx("div",{style:{width:10}}),l.jsx(xe.default,{variant:"subtitle2",children:e})]})}))}),l.jsx(le.default,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};dt.propTypes={lang:ie.default.string,buttonText:ie.default.string,selectedPlan:ie.default.string,title:ie.default.string,title_ar:ie.default.string,subtitle:ie.default.string,subtitle_ar:ie.default.string,features:ie.default.array,features_ar:ie.default.array};var ut=function(e){return l.jsx(xe.default,et(et({},e),{},{children:e.children}))},ct=function(e){return l.jsx("div",{style:e.inForm&&{width:"100%"},children:l.jsxs("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&l.jsx(me.default,{children:e.label}),e.helperText&&l.jsx(xe.default,{variant:"validation",children:e.helperText})]}),l.jsx(he.default,et({disableUnderline:!0},e))]})})},ft=function(e){return l.jsx(ve.default,et({},e))};var xt="production"!==process.env.NODE_ENV?ie.default.oneOfType([ie.default.number,ie.default.string,ie.default.object,ie.default.array]):{};function pt(){return pt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},pt.apply(this,arguments)}function ht(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function mt(e,t,r={clone:!0}){const n=r.clone?pt({},e):e;return ht(e)&&ht(t)&&Object.keys(t).forEach((l=>{"__proto__"!==l&&(ht(t[l])&&l in e&&ht(e[l])?n[l]=mt(e[l],t[l],r):n[l]=t[l])})),n}const vt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],gt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],jt=[...vt,...gt];function yt(e){return function(e,t,r,n){const l=(a=e,((i=t)&&"string"==typeof i?i.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),a):null)||r);var a,i;return"number"==typeof l?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${e}.`),l*e):Array.isArray(l)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>l.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(l)}.`,`${e} > ${l.length-1}, you need to add the missing values.`].join("\n")):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join("\n"))),l[e]):"function"==typeof l?l:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${l}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function bt(e,t){if(null==e)return{};var r,n,l={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(l[r]=e[r]);return l}"production"===process.env.NODE_ENV||vt.reduce(((e,t)=>(e[t]=xt,e)),{}),"production"===process.env.NODE_ENV||gt.reduce(((e,t)=>(e[t]=xt,e)),{}),"production"===process.env.NODE_ENV||jt.reduce(((e,t)=>(e[t]=xt,e)),{});const wt=["values","unit","step"];function Ct(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,l=bt(e,wt),a=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>pt({},e,{[t.key]:t.val})),{})})(t),i=Object.keys(a);function o(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function d(e,l){const a=i.indexOf(l);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==a&&"number"==typeof t[i[a]]?t[i[a]]:l)-n/100}${r})`}return pt({keys:i,values:a,up:o,down:s,between:d,only:function(e){return i.indexOf(e)+1<i.length?d(e,i[i.indexOf(e)+1]):o(e)},not:function(e){const t=i.indexOf(e);return 0===t?o(i[1]):t===i.length-1?s(i[t]):d(e,i[i.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},l)}var Tt={borderRadius:4};const Pt=["breakpoints","palette","spacing","shape"];const kt=ne.createContext(null);"production"!==process.env.NODE_ENV&&(kt.displayName="ThemeContext");var St=kt;function qt(e=null){const t=function(){const e=ne.useContext(St);return"production"!==process.env.NODE_ENV&&ne.useDebugValue(e),e}();return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}const Ot=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:l,shape:a={}}=e,i=bt(e,Pt),o=Ct(r),s=function(e=8){if(e.mui)return e;const t=yt({spacing:e}),r=(...e)=>("production"!==process.env.NODE_ENV&&(e.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${e.length}`)),(0===e.length?[1]:e).map((e=>{const r=t(e);return"number"==typeof r?`${r}px`:r})).join(" "));return r.mui=!0,r}(l);let d=mt({breakpoints:o,direction:"ltr",components:{},palette:pt({mode:"light"},n),spacing:s,shape:pt({},Tt,a)},i);return d=t.reduce(((e,t)=>mt(e,t)),d),d}();function Wt(e=Ot){return qt(e)}var Lt,At,It=ge.default.input(Lt||(Lt=nt(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n cursor: pointer;\n height: 35px;\n border-radius: ","px;\n background-color: ",";\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius}),(function(e){return e.value})),Nt=ge.default.input(At||(At=nt(["\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border: none;\n // height: 30px;\n padding: 10px;\n border-radius: ","px;\n &::-webkit-color-swatch {\n border: none;\n }\n &::-moz-color-swatch {\n border: none;\n }\n"])),(function(e){return e.borderRadius})),Rt=function(e){var t=Wt();return l.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[l.jsx(Nt,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),l.jsx("div",{style:{width:10}}),l.jsx(It,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};Rt.propTypes={color:ie.default.string,handleChange:ie.default.func};var Bt=function(e){return l.jsxs(fe.default,{variant:"settingsRow",children:[l.jsx(ut,{children:e.settingsLabel}),"checkbox"===e.settingsType&&l.jsx(ce.default,et({},e)),"text"===e.settingsType&&l.jsx(ct,et({},e)),"radio"===e.settingsType&&l.jsx(ot,et({location:"inSettings"},e)),"boolean"===e.settingsType&&l.jsx(ft,et({},e)),"color"===e.settingsType&&l.jsx(Rt,et({},e))]})};Bt.propTypes={type:ie.default.oneOf(["checkbox","text","radio","boolean","color"]),helperText:ie.default.string};var zt=function(e){var t,r="ar"===e.lang,n="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":n=l.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":n=l.jsx(je.default,{});break;case"twitter":n=l.jsx(ye.default,{});break;case"mada":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":n=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":n=l.jsx(be.default,{})}return l.jsxs(le.default,et(et({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[n,l.jsx("div",{style:{width:10}}),l.jsx(xe.default,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};zt.propTypes={lang:ie.default.string,logo:ie.default.string,buttonText:ie.default.string};var Et=function(e){return l.jsxs("div",{style:{width:"100%"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[l.jsx(me.default,{children:e.label}),e.helperText&&l.jsx(xe.default,{variant:"validation",children:e.helperText})]}),l.jsx(we.default,et(et({},e),{},{children:e.children}))]})},Dt=function(e){return l.jsxs(de.default,{severity:e.severity,icon:e.hideIcon,children:[e.title&&l.jsx(se.default,{children:e.title}),e.text]})};Dt.propTypes={severity:ie.default.string,title:ie.default.string,text:ie.default.string,hideIcon:ie.default.bool};var Ft=function(e){var t="ar"===e.lang;return l.jsx(ke.default,{style:{direction:t?"rtl":"ltr"},children:l.jsxs(Ce.default,{"aria-label":"a dense table",children:[l.jsx(Se.default,{children:l.jsx(qe.default,{children:e.columns.map((function(e,r){return l.jsx(Pe.default,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})}),l.jsx(Te.default,{children:e.rows.map((function(e,r){return l.jsx(qe.default,{children:e.map((function(e,r){return l.jsx(Pe.default,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))},r)}))}),e.end&&l.jsx(qe.default,{children:e.end.map((function(e,r){return l.jsx(Pe.default,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})},Mt=function(t){var r=lt(e.useState(!1),2),n=r[0],a=r[1],i=S.useForm(),o=i.formState.errors,s=i.handleSubmit,d=i.control;return l.jsxs(fe.default,{maxWidth:"xs",variant:"auth",children:[n&&l.jsx(Dt,{text:t.texts.passwordMatchError,severity:"error"}),t.passwordChanged?l.jsx(ut,{style:{textAlign:"center",margin:5},children:t.texts.passwordChanged}):l.jsx(S.FormProvider,et(et({},i),{},{children:l.jsxs("form",{onSubmit:s((function(e){console.log("handling subb",e),e.password===e.confirmPassword?t.handleNewPassword():a(!0)})),children:[l.jsx(S.Controller,{control:d,name:"password",render:function(e){var r,n,a=e.field;return l.jsx(ct,et({fullWidth:!0,type:"password",value:null!==(r=a.value)&&void 0!==r?r:"",label:t.texts.passwordLabel,placeholder:t.texts.passwordPlaceholder,helperText:null===(n=o.password)||void 0===n?void 0:n.message,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(We.default,{})})},a))},rules:{required:t.texts.passwordRequiredText}}),l.jsx(S.Controller,{control:d,name:"confirmPassword",render:function(e){var r,n,a=e.field;return l.jsx(ct,et({fullWidth:!0,type:"password",value:null!==(r=a.value)&&void 0!==r?r:"",label:t.texts.confirmPasswordLabel,placeholder:t.texts.confirmPasswordPlaceholder,helperText:null===(n=o.confirmPassword)||void 0===n?void 0:n.message,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(We.default,{})})},a))},rules:{required:t.texts.confirmPasswordRequiredText}}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",children:t.texts.updatePassword})]})}))]})};Mt.propTypes={texts:ie.default.object,handleNewPassword:ie.default.func};var Gt=function(e){var t=S.useForm(),r=t.formState.errors,n=t.handleSubmit;t.register;var a=t.control;return l.jsx(fe.default,{maxWidth:"xs",variant:"auth",children:e.sent?l.jsx(ut,{style:{textAlign:"center",margin:5},children:e.emailSentText}):l.jsxs("form",{onSubmit:n(e.handleResetPassword),children:[l.jsx(S.Controller,{control:a,name:"email",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(a=r.email)||void 0===a?void 0:a.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(Le.default,{})})},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};Gt.propTypes={texts:ie.default.object,emailSentText:ie.default.string,handleResetPassword:ie.default.func};var $t=function(e){var t=S.useForm(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return l.jsxs(fe.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.error&&l.jsxs(de.default,{severity:"error",variant:"inContainer",children:[e.errorTitle&&l.jsx(se.default,{children:e.errorTitle}),e.errorText]}),l.jsx(S.FormProvider,et(et({},t),{},{children:l.jsxs("form",{onSubmit:n(e.handleSignUp),children:[l.jsx(S.Controller,{control:a,name:"fullName",render:function(t){var n,a,i=t.field;return l.jsx(ct,{fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(a=r.fullName)||void 0===a?void 0:a.message,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(Ae.default,{})})})},rules:{required:e.texts.fullNameRequiredText}}),l.jsx(S.Controller,{control:a,name:"email",render:function(t){var n,a,i=t.field;return l.jsx(ct,{fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(a=r.email)||void 0===a?void 0:a.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(Le.default,{})})})},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(S.Controller,{control:a,name:"password",render:function(t){var n,a,i,o=t.field;return l.jsx(ct,et({fullWidth:!0,type:"password",defaultValue:null!==(n=o.value)&&void 0!==n?n:"",value:null!==(a=o.value)&&void 0!==a?a:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(We.default,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(le.default,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l.jsxs(xe.default,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",l.jsx("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),l.jsx(Ie.default,{}),l.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&l.jsx(zt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&l.jsx(zt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&l.jsx(zt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};$t.propTypes={texts:ie.default.object,viaGoogle:ie.default.bool,viaGithub:ie.default.bool,viaTwitter:ie.default.bool,handleSignUp:ie.default.func,handleRouteToSignIn:ie.default.func,handleGoogleSignUp:ie.default.func,handleGithubSignUp:ie.default.func,handleTwitterSignUp:ie.default.func};var Ht=function(e){var t=S.useForm(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return l.jsxs(fe.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&l.jsx(Dt,{title:e.errorTitle,text:e.errorText,severity:"error"}),l.jsxs("form",{onSubmit:n(e.handleSignIn),children:[l.jsx(S.Controller,{control:a,name:"email",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(a=r.email)||void 0===a?void 0:a.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(Le.default,{})})},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(S.Controller,{control:a,name:"password",render:function(t){var n,a,i,o=t.field;return l.jsx(ct,et({fullWidth:!0,type:"password",defaultValue:null!==(n=o.value)&&void 0!==n?n:"",value:null!==(a=o.value)&&void 0!==a?a:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message,startAdornment:l.jsx(Oe.default,{position:"start",children:l.jsx(We.default,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(xe.default,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),l.jsxs(xe.default,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",l.jsx("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),l.jsx(Ie.default,{}),l.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&l.jsx(zt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&l.jsx(zt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&l.jsx(zt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};Ht.propTypes={texts:ie.default.object,viaGoogle:ie.default.bool,viaGithub:ie.default.bool,viaTwitter:ie.default.bool,handleSignIn:ie.default.func,handleRouteToSignUp:ie.default.func,handleGoogleSignIn:ie.default.func,handleGithubSignIn:ie.default.func,handleTwitterSignIn:ie.default.func};var Ut=function(e){return l.jsxs(fe.default,{maxWidth:"xs",children:[l.jsx(ut,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&l.jsx(zt,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&l.jsx(zt,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&l.jsx(zt,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&l.jsx(zt,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&l.jsx(zt,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&l.jsx(zt,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&l.jsx(zt,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};Ut.propTypes={viaMada:ie.default.bool,viaWallet:ie.default.bool,viaSTCPay:ie.default.bool,viaPayPal:ie.default.bool,viaApplePay:ie.default.bool,viaCreditCard:ie.default.bool,madaLabel:ie.default.string,stcPayLabel:ie.default.string,paypalLabel:ie.default.string,walletLabel:ie.default.string,applePayLabel:ie.default.string,visaMasterLabel:ie.default.string,handleMada:ie.default.func,handleWallet:ie.default.func,handleSTCPay:ie.default.func,handlePayPal:ie.default.func,handleApplePay:ie.default.func,handleCreditCard:ie.default.func};var _t=function(t){var r=lt(e.useState(0),2),n=r[0],a=r[1],i=S.useForm();i.formState.errors;var o=i.handleSubmit,s=i.control;return l.jsxs(fe.default,{maxWidth:"xs",children:[l.jsxs(xe.default,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(n).toLocaleString("en")||"0",l.jsx(xe.default,{children:t.currency||"SAR"})]}),l.jsx(S.FormProvider,et(et({},i),{},{children:l.jsxs("form",{onSubmit:o(t.handleChargeWallet),children:[l.jsx(S.Controller,{control:s,name:"amount",render:function(e){var r,n=e.field;return l.jsx(ct,et(et({fullWidth:!0,placeholder:t.texts.amountLabel,type:"number",value:null!==(r=n.value)&&void 0!==r?r:""},n),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){n.onChange(parseFloat(e.target.value)),a(e.target.value)}}))}}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",onClick:t.handleSignIn,children:t.texts.chargeWallet})]})}))]})};_t.propTypes={texts:ie.default.object,handleChargeWallet:ie.default.func};var Vt=function(e){var t,r,n,a,i,o,s,d,u,c,f="ar"===e.lang,x=S.useForm(),p=x.formState.errors,h=x.handleSubmit;x.register;var m=x.control,v={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return l.jsxs(fe.default,{maxWidth:"sm",style:{direction:f?"rtl":"ltr"},children:[l.jsx(xe.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),l.jsx(Ft,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),l.jsx(Ie.default,{variant:"middle"}),l.jsx(xe.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),l.jsx(S.FormProvider,et(et({},x),{},{children:l.jsxs("form",{onSubmit:h(e.handlePayNow),children:[l.jsxs(fe.default,{sx:v,children:[l.jsx(S.Controller,{control:m,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.firstNameLabel)+" *",helperText:null===(a=p.firstName)||void 0===a?void 0:a.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(S.Controller,{control:m,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.lastNameLabel)+" *",helperText:null===(a=p.lastName)||void 0===a?void 0:a.message},i))}})]}),l.jsx(S.Controller,{control:m,name:"email",render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.emailLabel)+" *",helperText:null===(a=p.email)||void 0===a?void 0:a.message},i))},rules:{required:null===(n=e.texts)||void 0===n?void 0:n.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:null===(a=e.texts)||void 0===a?void 0:a.emailInvalidText}}}),l.jsxs(fe.default,{sx:v,children:[l.jsx(S.Controller,{control:m,name:"streetAddress",rules:{required:null===(i=e.texts)||void 0===i?void 0:i.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.streetAddressLabel)+" *",helperText:null===(a=p.streetAddress)||void 0===a?void 0:a.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(S.Controller,{control:m,name:"buildingNumber",rules:{required:null===(o=e.texts)||void 0===o?void 0:o.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.buildingNumberLabel)+" *",helperText:null===(a=p.buildingNumber)||void 0===a?void 0:a.message},i))}})]}),l.jsxs(fe.default,{sx:v,children:[l.jsx(S.Controller,{control:m,name:"province",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.stateLabel)+" *",helperText:null===(a=p.province)||void 0===a?void 0:a.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(S.Controller,{control:m,name:"city",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.cityLabel)+" *",helperText:null===(a=p.city)||void 0===a?void 0:a.message},i))}})]}),l.jsxs(fe.default,{sx:v,children:[l.jsx(S.Controller,{control:m,name:"zipCode",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,n,a,i=t.field;return l.jsx(ct,et({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(n=e.texts)||void 0===n?void 0:n.zipCodeLabel)+" *",helperText:null===(a=p.zipCode)||void 0===a?void 0:a.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(S.Controller,{control:m,name:"country",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,n,a,i=t.field;return l.jsxs(Et,et(et({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(n=i.value)&&void 0!==n?n:"",helperText:null===(a=p.country)||void 0===a?void 0:a.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},i),{},{children:[l.jsx("option",{}),e.countriesList.map((function(e,t){return l.jsx("option",{children:e},t)}))]}))}})]}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};Vt.propTypes={texts:ie.default.object,lang:ie.default.string,countriesList:ie.default.array,products:ie.default.array,total:ie.default.string,handlePayNow:ie.default.func};var Zt=function(e){var t="ar"===e.lang;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l.jsxs(fe.default,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[l.jsx(xe.default,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),l.jsx(Ie.default,{variant:"middle"}),l.jsxs(xe.default,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",l.jsx("strong",{children:e.userEmail})]}),l.jsx(xe.default,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),l.jsx(xe.default,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),l.jsx(Ie.default,{variant:"middle"}),e.products&&l.jsxs(l.Fragment,{children:[l.jsx(xe.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),l.jsx(Ft,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),l.jsx(Ie.default,{variant:"middle"})]}),l.jsx(le.default,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),l.jsx(le.default,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),l.jsx(le.default,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),l.jsx(xe.default,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),l.jsx("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:l.jsx(xe.default,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};Zt.propTypes={texts:ie.default.object,products:ie.default.array,countriesList:ie.default.array,lang:ie.default.string,total:ie.default.string,userEmail:ie.default.string,orderNumber:ie.default.string,confirmationTitle:ie.default.string,handleHome:ie.default.func,handlePrint:ie.default.func,handleHistory:ie.default.func,handleRefundPolicyLink:ie.default.func};var Xt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},Yt=function(e){return tt({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(7)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},Jt=I.styled("div")((function(e){var t=e.theme;return et({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),Kt=I.styled(Be.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return et({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:240,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),Qt=I.styled(Re.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return et(et({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&et(et({},Xt(t)),{},{"& .MuiDrawer-paper":Xt(t)})),!r&&et(et({},Yt(t)),{},{"& .MuiDrawer-paper":Yt(t)}))}));var er=["children","onClose","hideClose"],tr=function(e){var t=e.children,r=e.onClose,n=e.hideClose,a=rt(e,er);return l.jsxs(Ke.default,et(et({sx:{m:0,p:2}},a),{},{children:[t,n?null:l.jsx(De.default,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:l.jsx(Ze.default,{})})]}))};var rr=function(e){var t=Q.useTheme();return l.jsx(Q.Menu,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:e.anchor,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(e.anchor),onClose:e.handleClose,variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.menuItems.map((function(e){return l.jsxs(Q.MenuItem,{onClick:e.action,children:[e.icon&&l.jsx(e.icon,{}),l.jsx("div",{style:{width:10}}),l.jsx(Q.Typography,{textAlign:"center",children:e.label})]},e.label)}))})};rr.propTypes={handleClose:ie.default.func,menuItems:ie.default.array};var nr=["Products","Pricing","Blog"];exports.ActionButton=function(e){return l.jsx(le.default,et(et({},e),{},{children:e.text}))},exports.AdaptiveButton=it,exports.Box=function(e){return l.jsx("div",{children:e.children})},exports.ChargeWalletForm=_t,exports.CheckoutForm=Vt,exports.ConfirmationPage=Zt,exports.CreditCardForm=function(e){var t,r=S.useForm(),n=r.formState.errors,a=r.handleSubmit,i=r.control;return l.jsx(fe.default,{maxWidth:"xs",children:l.jsxs("form",{onSubmit:a(e.handle),children:[l.jsx(ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message}),l.jsx(S.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),l.jsx(S.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),l.jsx(S.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message})}}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},exports.HawaAlert=Dt,exports.HawaAppBar=function(e){var t=Q.useTheme(),r=lt(re.default.useState(null),2),n=r[0],a=r[1],i=lt(re.default.useState(null),2),o=i[0],s=i[1],d=function(){a(null)};return console.log("theme is ",t),l.jsx(Be.default,{position:"static",variant:"appbar",children:l.jsx(fe.default,{maxWidth:"xl",variant:"appbar",children:l.jsxs(ze.default,{disableGutters:!0,children:[l.jsx(xe.default,{variant:"h6",noWrap:!0,component:"div",sx:{mr:2,display:{xs:"none",md:"flex"}},children:"LOGO"}),l.jsxs(Ne.default,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[l.jsx(De.default,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e.handleOpenSideMenu,color:"inherit",children:l.jsx(Fe.default,{})}),l.jsx(Ue.default,{id:"menu-appbar",anchorEl:n,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(n),onClose:d,sx:{display:{xs:"block",md:"none"}},children:nr.map((function(e){return l.jsx(Ve.default,{onClick:d,children:l.jsx(xe.default,{textAlign:"center",children:e})},e)}))})]}),l.jsx(xe.default,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:"LOGO"}),l.jsx(Ne.default,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:nr.map((function(e){return l.jsx(le.default,{onClick:d,sx:{my:2,display:"block"},children:e},e)}))}),l.jsxs(Ne.default,{sx:{flexGrow:0},children:[l.jsx(ae.default,{title:"Open settings",children:l.jsx(De.default,{onClick:function(e){s(e.currentTarget)},sx:{p:0},children:l.jsx(_e.default,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),l.jsx(rr,{anchor:o,handleClose:function(e){return s(null)},menuItems:e.accountMenu})]})]})})})},exports.HawaAppLayout=function(e){var t=I.useTheme(),r=lt(re.default.useState(!0),2),n=r[0],a=r[1],i=lt(re.default.useState(null),2);i[0],i[1];var o=lt(re.default.useState(null),2),s=o[0],d=o[1];return l.jsxs(Ne.default,{sx:{display:"flex"},children:[l.jsx(Kt,{variant:"appbar",position:"fixed",open:n,children:l.jsxs(ze.default,{variant:"appbar",children:[l.jsx(De.default,{color:"inherit","aria-label":"open drawer",onClick:function(){a(!0)},edge:"start",sx:et({marginRight:5},n&&{display:"none"}),children:l.jsx(Fe.default,{})}),l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[l.jsx(xe.default,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),l.jsxs(Ne.default,{children:[l.jsx(ae.default,{title:"Open settings",children:l.jsx(De.default,{onClick:function(e){d(e.currentTarget)},sx:{p:0},children:l.jsx(_e.default,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),l.jsx(Ue.default,{sx:{mt:"45px"},id:"menu-appbar",anchorEl:s,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(s),onClose:function(){d(null)},variant:"themed",PaperProps:{style:{boxShadow:"none",borderRadius:t.allBorderRadius,border:"1px solid ".concat(t.primaryActionColor)}},children:e.accountMenu.map((function(e){return l.jsxs(Ve.default,{onClick:e.action,children:[e.icon&&l.jsx(e.icon,{}),l.jsx(xe.default,{textAlign:"center",children:e.label})]},e.label)}))})]})]})]})}),l.jsxs(Qt,{variant:"permanent",open:n,children:[l.jsxs(Jt,{children:[e.logo,l.jsx(De.default,{onClick:function(){a(!1)},children:"rtl"===t.direction?l.jsx(Ge.default,{}):l.jsx(Me.default,{})})]}),l.jsx(Ie.default,{}),l.jsx(Ee.default,{children:e.pages.map((function(t,r){var a,i;return l.jsx(ae.default,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:n?0:1}},children:l.jsxs($e.default,{variant:(null===(a=e.pageName)||void 0===a?void 0:a.toLowerCase())===(null===(i=t.slug)||void 0===i?void 0:i.toLowerCase())&&"clicked",onClick:t.action,sx:{minHeight:48,justifyContent:n?"initial":"center",px:2.5},children:[l.jsx(t.icon,{}),l.jsx("div",{style:{width:20}}),l.jsx(He.default,{primary:t.text,sx:{opacity:n?1:0}})]},t.text)},r)}))})]}),l.jsxs(Ne.default,{sx:{flexGrow:1,p:3},children:[l.jsx(Jt,{}),e.children]})]})},exports.HawaButton=function(e){return l.jsx(le.default,et(et({},e),{},{children:e.children}))},exports.HawaCheckbox=function(e){return console.log("props : ",e),l.jsx(re.default.Fragment,{children:l.jsx(ue.default,{label:e.label,control:l.jsx(ce.default,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},exports.HawaColorPicker=Rt,exports.HawaDialog=function(t){var r=lt(e.useState(!1),2);return r[0],r[1],l.jsxs(Xe.default,et(et({},t),{},{variant:"main",children:[l.jsx(tr,{onClose:t.onClose,hideClose:t.hideClose,children:t.title}),l.jsx(Je.default,{children:t.children}),l.jsx(Ye.default,{children:t.actions})]}))},exports.HawaInputLabel=function(e){return l.jsx(me.default,{children:l.jsx("div",{style:{fontSize:15},children:e.label})})},exports.HawaItemCard=st,exports.HawaLogoButton=zt,exports.HawaPricingCard=dt,exports.HawaRadio=ot,exports.HawaSelect=Et,exports.HawaSettingsRow=Bt,exports.HawaTable=Ft,exports.HawaTextArea=function(e){var t=Wt();return console.log("theme is ",t),l.jsx("label",{children:l.jsx("textarea",{style:{color:"black",backgroundColor:e.bgColor||"white",borderBottom:"none",border:"none",width:"100%",padding:0,margin:0,marginBottom:0,resize:e.resize||"vertical"}})})},exports.HawaTextField=ct,exports.HawaTypography=ut,exports.NewPasswordForm=Mt,exports.OfflineBanner=function(e){return l.jsx(oe.default,{variant:"danger",open:e.open,onClose:e.handleClose,children:l.jsxs(de.default,{icon:!1,severity:"error",variant:"offline",children:[e.title&&l.jsx(se.default,{children:e.title}),e.text]})})},exports.PayWithWallet=function(e){return l.jsxs(fe.default,{maxWidth:"xs",children:[l.jsx(xe.default,{align:"center",children:"Wallet Balance"}),l.jsxs(xe.default,{align:"center",variant:"h1",children:[e.walletBalance||"0",l.jsx(xe.default,{children:e.currency||"SAR"})]}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},exports.ResetPasswordForm=Gt,exports.SelectPayment=Ut,exports.SignInForm=Ht,exports.SignUpForm=$t,exports.UserProfileForm=function(e){var t=S.useForm(),r=t.formState.errors,n=t.handleSubmit,a=t.control;return l.jsx(fe.default,{maxWidth:"sm",children:l.jsx(S.FormProvider,et(et({},t),{},{children:l.jsxs("form",{onSubmit:n(e.handleUpdateProfile),children:[l.jsx(S.Controller,{control:a,name:"fullName",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(a=r.fullName)||void 0===a?void 0:a.message},i))}}),l.jsx(S.Controller,{control:a,name:"phoneNumber",render:function(e){var t=e.field;return l.jsx(ct,et({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),l.jsx(S.Controller,{control:a,name:"email",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"text",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.emailLabel,helperText:null===(a=r.email)||void 0===a?void 0:a.message,placeholder:e.texts.emailPlaceholder},i))},rules:{required:e.texts.emailRequiredText,pattern:{value:/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,message:e.texts.emailInvalidText}}}),l.jsx(S.Controller,{control:a,name:"password",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"password",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(a=r.password)||void 0===a?void 0:a.message},i))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(S.Controller,{control:a,name:"confirmPassword",render:function(t){var n,a,i=t.field;return l.jsx(ct,et({fullWidth:!0,type:"password",value:null!==(n=i.value)&&void 0!==n?n:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(a=r.confirmPassword)||void 0===a?void 0:a.message},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},exports.UserSettingsForm=function(e){return l.jsxs(fe.default,{maxWidth:"sm",children:[e.children,l.jsx(le.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})};
|