@sikka/hawa 0.0.31 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/es/index.es.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/rollup.config.js +2 -2
- package/src/blocks/AuthForms/NewPasswordForm.js +4 -0
- package/src/blocks/AuthForms/ResetPasswordForm.js +6 -2
- package/src/blocks/AuthForms/SignUpForm.js +7 -28
- package/src/blocks/Payment/ChargeWalletForm.js +18 -8
- package/src/blocks/Payment/Confirmation.js +3 -0
- package/src/blocks/Payment/CreditCardForm.js +0 -23
- package/src/blocks/Pricing/PricingPlans.js +3 -0
- package/src/blocks/Pricing/index.js +1 -0
- package/src/blocks/index.js +4 -0
- package/src/elements/HawaPopMenu.js +6 -2
- package/src/elements/HawaPricingCard.js +18 -1
- package/src/elements/HawaRange.js +9 -4
- package/src/elements/HawaTextField.js +6 -2
- package/src/index.js +1 -3
- package/src/layout/HawaAppBar.js +37 -64
- package/src/layout/HawaAppLayout.js +32 -14
- package/src/layout/HawaPageControls.js +61 -0
- package/src/layout/index.js +1 -0
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/main.e9b7f5c4.iframe.bundle.js +1 -0
- package/storybook-static/vendors~main.a7262b49.iframe.bundle.js +76 -0
- package/storybook-static/{vendors~main.6c796c97.iframe.bundle.js.LICENSE.txt → vendors~main.a7262b49.iframe.bundle.js.LICENSE.txt} +0 -0
- package/storybook-static/vendors~main.a7262b49.iframe.bundle.js.map +1 -0
- package/storybook-static/main.4bd34158.iframe.bundle.js +0 -1
- package/storybook-static/vendors~main.6c796c97.iframe.bundle.js +0 -76
- package/storybook-static/vendors~main.6c796c97.iframe.bundle.js.map +0 -1
package/README.md
CHANGED
package/es/index.es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
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 s}from"react/jsx-runtime";import d from"@mui/material/Snackbar";import c from"@mui/material/AlertTitle";import u from"@mui/material/Alert";import m from"@mui/material/FormControlLabel";import p from"@mui/material/Checkbox";import h from"@mui/material/Container";import g from"@mui/material/Typography";import f from"@mui/icons-material/CheckCircleOutlined";import v 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/material/Slider";import T from"@mui/material/Stack";import C from"@mui/icons-material/GitHub";import P from"@mui/icons-material/Twitter";import k from"@mui/icons-material/AccountBalanceWallet";import L from"@mui/material/Select";import S from"@mui/material/Table";import W from"@mui/material/TableBody";import O from"@mui/material/TableCell";import N from"@mui/material/TableContainer";import I from"@mui/material/TableHead";import A from"@mui/material/TableRow";import{Button as q,InputAdornment as R,useTheme as j,Menu as z,MenuItem as E,Typography as B}from"@mui/material";import{Search as D}from"@mui/icons-material";import M from"@mui/icons-material/ExpandMore";import G from"@mui/material/Accordion";import U from"@mui/material/AccordionSummary";import $ from"@mui/material/AccordionDetails";import{useForm as _,FormProvider as V,Controller as F}from"react-hook-form";import Z from"@mui/material/InputAdornment";import H from"@mui/icons-material/HttpsOutlined";import X from"@mui/icons-material/MailOutline";import Y from"@mui/icons-material/PermIdentityOutlined";import J from"@mui/material/Divider";import{styled as K,useTheme as Q}from"@mui/material/styles";import ee from"@mui/material/Box";import te from"@mui/material/Drawer";import re from"@mui/material/AppBar";import ne from"@mui/material/Toolbar";import ie from"@mui/material/List";import ae from"@mui/material/IconButton";import le from"@mui/icons-material/Menu";import oe from"@mui/icons-material/ChevronLeft";import se from"@mui/icons-material/ChevronRight";import de from"@mui/material/ListItemButton";import ce from"@mui/material/ListItemText";import ue from"@mui/material/Avatar";import me from"@mui/icons-material/Close";import pe from"@mui/material/Dialog";import he from"@mui/material/DialogActions";import ge from"@mui/material/DialogContent";import fe from"@mui/material/DialogTitle";import ve from"@mui/material/Menu";import xe from"@mui/material/MenuItem";function be(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 ye(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){we(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function we(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Te(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 Ce(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Pe(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 ke(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 ke(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 ke(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 Le=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})})};Le.propTypes={buttonText:a.string,onClick:a.func,showText:a.bool};var Se=function(e){return o(n,ye(ye({},e),{},{children:e.text}))},We=function(e){return o(d,{open:e.open,onClose:e.handleClose,children:l(u,{icon:!1,severity:e.severity,children:[e.title&&o(c,{children:e.title}),e.text]})})},Oe=function(e){return console.log("props : ",e),o(t.Fragment,{children:o(m,{label:e.label,control:o(p,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},Ne=function(e){var t=Pe(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)}))})};Ne.propTypes={lang:a.string,options:a.arrayOf(a.shape({label:a.string,value:a.string})),defaultValue:a.string,handleChange:a.func,location:a.string};var Ie=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})]})};Ie.propTypes={lang:a.string,onCardClick:a.func};var Ae=function(e){var t,r,i="ar"===e.lang,a={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},s={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},d={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(g,{variant:"h3",fontWeight:500,children:i?e.title_ar:e.title}),o(g,{variant:"caption",children:i?e.subtitle_ar:e.subtitle}),o("br",{}),o(g,{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(g,{children:d[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),o(g,{style:{fontSize:14,margin:5},children:i?a[e.cycleText]:s[e.cycleText]})]}):l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[o(g,{children:d[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),o("div",{style:{width:5}}),e.price]}),o(g,{style:{fontSize:14,margin:5},children:"ar"===e.lang?a[e.cycleText]:s[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(f,{fontSize:"small"})}),o("div",{style:{width:10}}),o(g,{variant:"subtitle2",children:e})]})}))}),o(n,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};Ae.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 qe=function(e){return o(g,ye(ye({},e),{},{children:e.children}))},Re=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(g,{variant:"validation",children:e.helperText})]}),o(v,ye({disableUnderline:!0},e))]})})},je=function(e){return o(b,ye({},e))};var ze="production"!==process.env.NODE_ENV?a.oneOfType([a.number,a.string,a.object,a.array]):{};function Ee(){return Ee=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},Ee.apply(this,arguments)}function Be(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function De(e,t,r={clone:!0}){const n=r.clone?Ee({},e):e;return Be(e)&&Be(t)&&Object.keys(t).forEach((i=>{"__proto__"!==i&&(Be(t[i])&&i in e&&Be(e[i])?n[i]=De(e[i],t[i],r):n[i]=t[i])})),n}const Me=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ge=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ue=[...Me,...Ge];function $e(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 _e(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||Me.reduce(((e,t)=>(e[t]=ze,e)),{}),"production"===process.env.NODE_ENV||Ge.reduce(((e,t)=>(e[t]=ze,e)),{}),"production"===process.env.NODE_ENV||Ue.reduce(((e,t)=>(e[t]=ze,e)),{});const Ve=["values","unit","step"];function Fe(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=_e(e,Ve),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)=>Ee({},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 s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function d(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 Ee({keys:l,values:a,up:o,down:s,between:d,only:function(e){return l.indexOf(e)+1<l.length?d(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?s(l[t]):d(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},i)}var Ze={borderRadius:4};const He=["breakpoints","palette","spacing","shape"];const Xe=e.createContext(null);"production"!==process.env.NODE_ENV&&(Xe.displayName="ThemeContext");var Ye=Xe;function Je(t=null){const r=function(){const t=e.useContext(Ye);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t}();return r&&(n=r,0!==Object.keys(n).length)?r:t;var n}const Ke=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={}}=e,l=_e(e,He),o=Fe(r),s=function(e=8){if(e.mui)return e;const t=$e({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 d=De({breakpoints:o,direction:"ltr",components:{},palette:Ee({mode:"light"},n),spacing:s,shape:Ee({},Ze,a)},l);return d=t.reduce(((e,t)=>De(e,t)),d),d}();function Qe(e=Ke){return Je(e)}var et,tt,rt=y.input(et||(et=Ce(["\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=y.input(tt||(tt=Ce(["\n max-width: 70px;\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})),it=function(e){var t=Qe();return l("div",{style:{display:"flex",flexDirection:"row"},children:[o(nt,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),o("div",{style:{width:10}}),o(rt,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};it.propTypes={color:a.string,handleChange:a.func};var at=function(e){return l(T,{spacing:2,direction:"row",alignItems:"center",children:[e.startElement,o(w,{size:"small","aria-label":"Volume",value:e.value,onChange:e.handleChange}),e.endElement]})};at.propTypes={startElement:a.element,endElement:a.element,defaultValue:a.string,handleChange:a.func,location:a.string};var lt=function(e){return l(h,{variant:"settingsRow",children:[o(qe,{children:e.settingsLabel}),"checkbox"===e.settingsType&&o(p,ye({},e)),"text"===e.settingsType&&o(Re,ye({},e)),"boolean"===e.settingsType&&o(je,ye({},e)),"range"===e.settingsType&&o(at,ye({},e)),"color"===e.settingsType&&o(it,ye({},e)),"radio"===e.settingsType&&o(Ne,ye({location:"inSettings"},e))]})};lt.propTypes={settingsLabel:a.string,settingsType:a.oneOf(["checkbox","text","radio","boolean","color"])};var ot=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(C,{});break;case"twitter":i=o(P,{});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(k,{})}return l(n,ye(ye({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[i,o("div",{style:{width:10}}),o(g,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};ot.propTypes={lang:a.string,logo:a.oneOf(["google","github","twitter","wallet","googlepay","applepay","stcpay","visa/master","paypal","mada"]),buttonText:a.string};var st=function(e){return o(n,ye(ye({},e),{},{children:e.children}))},dt=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(g,{variant:"validation",children:e.helperText})]}),o(L,ye(ye({},e),{},{children:e.children}))]})},ct=function(e){var t=Qe();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"}})})},ut=function(e){return o(x,{children:o("div",{style:{fontSize:15},children:e.label})})},mt=function(e){return l(u,{severity:e.severity,icon:e.hideIcon,children:[e.title&&o(c,{children:e.title}),e.text]})};mt.propTypes={severity:a.oneOf(["error","info","success","warning"]),title:a.string,text:a.string,hideIcon:a.bool};var pt=function(e){var t="ar"===e.lang;return o(N,{style:{direction:t?"rtl":"ltr"},children:l(S,{"aria-label":"a dense table",children:[o(I,{children:l(A,{children:[e.columns.map((function(e,r){return o(O,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&o(O,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:"Actions"})]})}),o(W,{children:e.rows?e.rows.map((function(r,n){return l(A,{children:[r.map((function(e,r){return o(O,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&o(O,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:e.actions.map((function(t){return o(q,{style:{margin:2},variant:"outlined",size:"small",onClick:function(){return e.handleActionClick(r)},children:t})}))})]},n)})):o(A,{align:"center",children:o(O,{align:"center",component:"th",colSpan:6,children:e.noDataText})})}),e.end&&o(A,{children:e.end.map((function(e,r){return o(O,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})};pt.propTypes={handleActionClick:a.func,noDataText:a.string,lang:a.string,columns:a.array,rows:a.array,end:a.array};var ht=function(e){return o(Re,ye({endAdornment:o(R,{position:"start",children:o(D,{})})},e))},gt=function(e){return l(G,{elevation:0,children:[o(U,{expandIcon:o(M,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:o(g,{children:e.title})}),o($,{children:l(g,{children:[e.content," "]})})]})};gt.propTypes={title:a.string,content:a.string};var ft=function(e){var t=_(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return o(h,{maxWidth:"sm",children:o(V,ye(ye({},t),{},{children:l("form",{onSubmit:i(e.handleUpdateProfile),children:[o(F,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(Re,ye({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(F,{control:a,name:"phoneNumber",render:function(e){var t=e.field;return o(Re,ye({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),o(F,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Re,ye({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(F,{control:a,name:"password",render:function(t){var n,i,a=t.field;return o(Re,ye({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(F,{control:a,name:"confirmPassword",render:function(t){var n,i,a=t.field;return o(Re,ye({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})]})}))})},vt=function(e){return l(h,{maxWidth:"sm",children:[e.children,o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})},xt=function(e){var t=Pe(r(!1),2),i=t[0],a=t[1],s=_(),d=s.formState.errors,c=s.handleSubmit,u=s.control;return l(h,{maxWidth:"xs",variant:"auth",children:[i&&o(mt,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?o(qe,{style:{textAlign:"center",margin:5},children:e.texts.passwordChanged}):o(V,ye(ye({},s),{},{children:l("form",{onSubmit:c((function(t){console.log("handling subb",t),t.password===t.confirmPassword?e.handleNewPassword():a(!0)})),children:[o(F,{control:u,name:"password",render:function(t){var r,n,i=t.field;return o(Re,ye({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=d.password)||void 0===n?void 0:n.message,startAdornment:o(Z,{position:"start",children:o(H,{})})},i))},rules:{required:e.texts.passwordRequiredText}}),o(F,{control:u,name:"confirmPassword",render:function(t){var r,n,i=t.field;return o(Re,ye({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=d.confirmPassword)||void 0===n?void 0:n.message,startAdornment:o(Z,{position:"start",children:o(H,{})})},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updatePassword})]})}))]})};xt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,passwordPlaceholder:a.string,updatePassword:a.string,passwordRequiredText:a.string,passwordLabel:a.string,confirmPasswordPlaceholder:a.string,confirmPasswordLabel:a.string,confirmPasswordRequiredText:a.string,passwordMatchError:a.string,forgotPasswordText:a.string,passwordChanged:a.string}),handleNewPassword:a.func};var bt=function(e){var t=_(),r=t.formState.errors,i=t.handleSubmit;t.register;var a=t.control;return o(h,{maxWidth:"xs",variant:"auth",children:e.sent?o(qe,{style:{textAlign:"center",margin:5},children:e.emailSentText}):l("form",{onSubmit:i(e.handleResetPassword),children:[o(F,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Re,ye({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(Z,{position:"start",children:o(X,{})})},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})]})})};bt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,resetPassword:a.string}),emailSentText:a.string,handleResetPassword:a.func};var yt=function(e){var t=_(),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(V,ye(ye({},t),{},{children:l("form",{onSubmit:i(e.handleSignUp),children:[o(F,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(Re,{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(Z,{position:"start",children:o(Y,{})})})},rules:{required:e.texts.fullNameRequiredText}}),o(F,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Re,{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(Z,{position:"start",children:o(X,{})})})},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(F,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(Re,ye({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(Z,{position:"start",children:o(H,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(n,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l(g,{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(J,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(ot,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&o(ot,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&o(ot,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};yt.propTypes={texts:a.shape({fullNameLabel:a.string,fullNamePlaceholder:a.string,fullNameRequiredText:a.string,emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,passwordLabel:a.string,passwordPlaceholder:a.string,passwordRequiredText:a.string,passwordTooShortText:a.string,forgotPasswordText:a.string,newUserText:a.string,signUpText:a.string,signInText:a.string,existingUserText:a.string,googleButtonLabel:a.string,githubButtonLabel:a.string,twitterButtonLabel:a.string}),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 wt=function(e){var t=_(),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(mt,{title:e.errorTitle,text:e.errorText,severity:"error"}),l("form",{onSubmit:i(e.handleSignIn),children:[o(F,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Re,ye({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(Z,{position:"start",children:o(X,{})})},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(F,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(Re,ye({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(Z,{position:"start",children:o(H,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(g,{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(g,{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(J,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(ot,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&o(ot,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&o(ot,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};wt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,passwordLabel:a.string,passwordPlaceholder:a.string,passwordRequiredText:a.string,forgotPasswordText:a.string,newUserText:a.string,signUpText:a.string,signInText:a.string,googleButtonLabel:a.string,githubButtonLabel:a.string,twitterButtonLabel:a.string}),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 Tt=function(e){return l(h,{maxWidth:"xs",children:[o(qe,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&o(ot,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&o(ot,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&o(ot,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&o(ot,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&o(ot,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&o(ot,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&o(ot,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};Tt.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 Ct=function(e){var t,r=_(),i=r.formState.errors,a=r.handleSubmit,s=r.control;return o(h,{maxWidth:"xs",children:l("form",{onSubmit:a(e.handle),children:[o(Re,{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(F,{control:s,name:"cardName",render:function(e){var t;return e.field,o(Re,{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(F,{control:s,name:"cardName",render:function(e){var t;return e.field,o(Re,{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(F,{control:s,name:"cardName",render:function(e){var t;return e.field,o(Re,{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=Pe(r(0),2),i=t[0],a=t[1],s=_();s.formState.errors;var d=s.handleSubmit,c=s.control;return l(h,{maxWidth:"xs",children:[l(g,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(i).toLocaleString("en")||"0",o(g,{children:e.currency||"SAR"})]}),o(V,ye(ye({},s),{},{children:l("form",{onSubmit:d(e.handleChargeWallet),children:[o(F,{control:c,name:"amount",render:function(t){var r,n=t.field;return o(Re,ye(ye({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.shape({amountLabel:a.string,chargeWallet:a.string}),handleChargeWallet:a.func};var kt=function(e){return l(h,{maxWidth:"xs",children:[o(g,{align:"center",children:"Wallet Balance"}),l(g,{align:"center",variant:"h1",children:[e.walletBalance||"0",o(g,{children:e.currency||"SAR"})]}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},Lt=function(e){var t,r,i,a,s,d,c,u,m,p,f="ar"===e.lang,v=_(),x=v.formState.errors,b=v.handleSubmit;v.register;var y=v.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:[o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(pt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(J,{variant:"middle"}),o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),o(V,ye(ye({},v),{},{children:l("form",{onSubmit:b(e.handlePayNow),children:[l(h,{sx:w,children:[o(F,{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(Re,ye({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(F,{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(Re,ye({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(F,{control:y,name:"email",render:function(t){var r,n,i,a=t.field;return o(Re,ye({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(F,{control:y,name:"streetAddress",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(Re,ye({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(F,{control:y,name:"buildingNumber",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(Re,ye({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(F,{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(Re,ye({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(F,{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(Re,ye({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(F,{control:y,name:"zipCode",rules:{required:null===(m=e.texts)||void 0===m?void 0:m.required},render:function(t){var r,n,i,a=t.field;return o(Re,ye({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(F,{control:y,name:"country",rules:{required:null===(p=e.texts)||void 0===p?void 0:p.required},render:function(t){var r,n,i,a=t.field;return l(dt,ye(ye({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})]})}))]})};Lt.propTypes={texts:a.shape({orderDetails:a.string,billingAddress:a.string,payNow:a.string,emailLabel:a.string,emailRequiredText:a.string,emailInvalidText:a.string,firstNameLabel:a.string,required:a.string,lastNameLabel:a.string,streetAddressLabel:a.string,buildingNumberLabel:a.string,cityLabel:a.string,stateLabel:a.string,countryLabel:a.string,zipCodeLabel:a.string}),lang:a.string,countriesList:a.array,products:a.array,total:a.string,handlePayNow:a.func};var St=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(g,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),o(J,{variant:"middle"}),l(g,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",o("strong",{children:e.userEmail})]}),o(g,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),o(g,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),o(J,{variant:"middle"}),e.products&&l(s,{children:[o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(pt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(J,{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(g,{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(g,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};St.propTypes={texts:a.shape({print:a.string,history:a.string,homePage:a.string,successMessage:a.string,orderDetails:a.string,fasterPaymentNote:a.string,billingAddress:a.string,payNow:a.string,yourOrderNumber:a.string,emailLabel:a.string,emailRequiredText:a.string,emailInvalidText:a.string,firstNameLabel:a.string,required:a.string,lastNameLabel:a.string,streetAddressLabel:a.string,buildingNumberLabel:a.string,cityLabel:a.string,stateLabel:a.string,countryLabel:a.string,zipCodeLabel:a.string,refundPolicy:a.string}),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 Wt=function(e){return o("div",{children:e.children})},Ot=function(e){var t=j();return o(z,{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(E,{onClick:e.action,children:[e.icon&&o(e.icon,{}),o("div",{style:{width:10}}),o(B,{textAlign:"center",children:e.label})]},e.label)}))})};Ot.propTypes={handleClose:a.func,menuItems:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func}))};var Nt=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},It=function(e){return we({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)")})},At=K("div")((function(e){var t=e.theme;return ye({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),qt=K(re,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ye({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})})})),Rt=K(te,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ye(ye({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&ye(ye({},Nt(t)),{},{"& .MuiDrawer-paper":Nt(t)})),!r&&ye(ye({},It(t)),{},{"& .MuiDrawer-paper":It(t)}))}));function jt(e){var r=Q(),n=Pe(t.useState(!0),2),a=n[0],s=n[1],d=Pe(t.useState(null),2);d[0],d[1];var c=Pe(t.useState(null),2),u=c[0],m=c[1];return l(ee,{sx:{display:"flex"},children:[o(qt,{variant:"appbar",position:"fixed",open:a,children:l(ne,{variant:"appbar",children:[o(ae,{color:"inherit","aria-label":"open drawer",onClick:function(){return s(!0)},edge:"start",sx:ye({marginRight:5},a&&{display:"none"}),children:o(le,{})}),l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[o(g,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),l(ee,{children:[o(i,{title:"Open settings",children:o(ae,{onClick:function(e){return m(e.currentTarget)},sx:{p:0},children:o(ue,{})})}),o(Ot,{menuItems:e.accountMenu,anchor:u,handleClose:function(){return m(null)}})]})]})]})}),l(Rt,{variant:"permanent",open:a,children:[l(At,{children:[e.logo,o(ae,{onClick:function(){return s(!1)},children:"rtl"===r.direction?o(se,{}):o(oe,{})})]}),o(J,{}),o(ie,{children:e.pages.map((function(t,r){var n,s;return o(i,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:a?0:1}},children:l(de,{variant:(null===(n=e.pageName)||void 0===n?void 0:n.toLowerCase())===(null===(s=t.slug)||void 0===s?void 0:s.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(ce,{primary:t.text,sx:{opacity:a?1:0}})]},t.text)},r)}))})]}),l(ee,{sx:{flexGrow:1,p:3},children:[o(At,{}),e.children]})]})}var zt=["children","onClose","hideClose"],Et=function(e){var t=e.children,r=e.onClose,n=e.hideClose,i=Te(e,zt);return l(fe,ye(ye({sx:{m:0,p:2}},i),{},{children:[t,n?null:o(ae,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:o(me,{})})]}))};function Bt(e){var t=Pe(r(!1),2);return t[0],t[1],l(pe,ye(ye({},e),{},{variant:"main",children:[o(Et,{onClose:e.onClose,hideClose:e.hideClose,children:e.title}),o(ge,{children:e.children}),o(he,{children:e.actions})]}))}var Dt=["Products","Pricing","Blog"],Mt=function(e){var r=j(),a=Pe(t.useState(null),2),s=a[0],d=a[1],c=Pe(t.useState(null),2),u=c[0],m=c[1],p=function(){d(null)};return console.log("theme is ",r),o(re,{position:"static",variant:"appbar",children:o(h,{maxWidth:"xl",variant:"appbar",children:l(ne,{disableGutters:!0,children:[o(g,{variant:"h6",noWrap:!0,component:"div",sx:{mr:2,display:{xs:"none",md:"flex"}},children:"LOGO"}),l(ee,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[o(ae,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e.handleOpenSideMenu,color:"inherit",children:o(le,{})}),o(ve,{id:"menu-appbar",anchorEl:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(s),onClose:p,sx:{display:{xs:"block",md:"none"}},children:Dt.map((function(e){return o(xe,{onClick:p,children:o(g,{textAlign:"center",children:e})},e)}))})]}),o(g,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:"LOGO"}),o(ee,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:Dt.map((function(e){return o(n,{onClick:p,sx:{my:2,display:"block"},children:e},e)}))}),l(ee,{sx:{flexGrow:0},children:[o(i,{title:"Open settings",children:o(ae,{onClick:function(e){m(e.currentTarget)},sx:{p:0},children:o(ue,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),o(Ot,{anchor:u,handleClose:function(e){return m(null)},menuItems:e.accountMenu})]})]})})})};export{Se as ActionButton,Le as AdaptiveButton,Wt as Box,Pt as ChargeWalletForm,Lt as CheckoutForm,St as ConfirmationPage,Ct as CreditCardForm,gt as HawaAccordian,mt as HawaAlert,Mt as HawaAppBar,jt as HawaAppLayout,st as HawaButton,Oe as HawaCheckbox,it as HawaColorPicker,Bt as HawaDialog,ut as HawaInputLabel,Ie as HawaItemCard,ot as HawaLogoButton,Ae as HawaPricingCard,Ne as HawaRadio,at as HawaRange,ht as HawaSearchBar,dt as HawaSelect,lt as HawaSettingsRow,We as HawaSnackbar,pt as HawaTable,ct as HawaTextArea,Re as HawaTextField,qe as HawaTypography,xt as NewPasswordForm,kt as PayWithWallet,bt as ResetPasswordForm,Tt as SelectPayment,wt as SignInForm,yt as SignUpForm,ft as UserProfileForm,vt 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 s}from"react/jsx-runtime";import d from"@mui/material/Snackbar";import c from"@mui/material/AlertTitle";import u from"@mui/material/Alert";import m from"@mui/material/FormControlLabel";import p from"@mui/material/Checkbox";import h from"@mui/material/Container";import g from"@mui/material/Typography";import f from"@mui/icons-material/CheckCircleOutlined";import v from"@mui/material/Chip";import x from"@mui/material/Input";import b from"@mui/material/InputLabel";import y from"@mui/material/Switch";import w from"@emotion/styled";import T from"@mui/material/Slider";import C from"@mui/material/Stack";import P from"@mui/icons-material/GitHub";import k from"@mui/icons-material/Twitter";import L from"@mui/icons-material/AccountBalanceWallet";import S from"@mui/material/Select";import W from"@mui/material/Table";import O from"@mui/material/TableBody";import N from"@mui/material/TableCell";import A from"@mui/material/TableContainer";import I from"@mui/material/TableHead";import q from"@mui/material/TableRow";import{Button as R,InputAdornment as j,useTheme as B,Container as D,Stack as E}from"@mui/material";import{Search as z}from"@mui/icons-material";import M from"@mui/icons-material/ExpandMore";import U from"@mui/material/Accordion";import G from"@mui/material/AccordionSummary";import $ from"@mui/material/AccordionDetails";import{useForm as _,FormProvider as V,Controller as F}from"react-hook-form";import Z from"@mui/material/InputAdornment";import H from"@mui/icons-material/HttpsOutlined";import X from"@mui/icons-material/MailOutline";import Y from"@mui/icons-material/PermIdentityOutlined";import J from"@mui/material/Divider";import{styled as K,useTheme as Q}from"@mui/material/styles";import ee from"@mui/material/Box";import te from"@mui/material/Drawer";import re from"@mui/material/AppBar";import ne from"@mui/material/Toolbar";import ie from"@mui/material/List";import ae from"@mui/material/IconButton";import le from"@mui/icons-material/Menu";import oe from"@mui/icons-material/ChevronLeft";import se from"@mui/icons-material/ChevronRight";import de from"@mui/material/ListItemButton";import ce from"@mui/material/ListItemText";import ue from"@mui/material/Avatar";import me from"@mui/material/Menu";import pe from"@mui/material/MenuItem";import he from"@mui/icons-material/Close";import ge from"@mui/material/Dialog";import fe from"@mui/material/DialogActions";import ve from"@mui/material/DialogContent";import xe from"@mui/material/DialogTitle";function be(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 ye(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?be(Object(r),!0).forEach((function(t){we(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):be(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function we(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Te(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 Ce(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Pe(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 ke(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 ke(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 ke(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 Le=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})})};Le.propTypes={buttonText:a.string,onClick:a.func,showText:a.bool};var Se=function(e){return o(n,ye(ye({},e),{},{children:e.text}))},We=function(e){return o(d,{open:e.open,onClose:e.handleClose,children:l(u,{icon:!1,severity:e.severity,children:[e.title&&o(c,{children:e.title}),e.text]})})},Oe=function(e){return console.log("props : ",e),o(t.Fragment,{children:o(m,{label:e.label,control:o(p,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},Ne=function(e){var t=Pe(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)}))})};Ne.propTypes={lang:a.string,options:a.arrayOf(a.shape({label:a.string,value:a.string})),defaultValue:a.string,handleChange:a.func,location:a.string};var Ae=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})]})};Ae.propTypes={lang:a.string,onCardClick:a.func};var Ie=function(e){var t,r,i="ar"===e.lang,a={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},s={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},d={usd:i?"دولار":"$",sar:i?"ريال":"SAR"},c=i?e.features_ar:e.features,u=i?{left:10}:{right:10};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:[e.discount&&o(v,{label:e.discount,variant:"standard",style:ye({maxWidth:"fit-content",position:"absolute",bottom:10},u),color:"success"}),o(g,{variant:"h3",fontWeight:500,children:i?e.title_ar:e.title}),o(g,{variant:"caption",children:i?e.subtitle_ar:e.subtitle}),o("br",{}),o(g,{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(g,{children:d[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),o(g,{style:{fontSize:14,margin:5},children:i?a[e.cycleText]:s[e.cycleText]})]}):l("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[l("div",{style:{display:"flex",flexDirection:"row"},children:[o(g,{children:d[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),o("div",{style:{width:5}}),e.price]}),o(g,{style:{fontSize:14,margin:5},children:"ar"===e.lang?a[e.cycleText]:s[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(f,{fontSize:"small"})}),o("div",{style:{width:10}}),o(g,{variant:"subtitle2",children:e})]})}))}),o(n,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};Ie.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,currency:a.oneOf(["sar","usd"]),cycleText:a.oneOf(["monthly","3-months","6-months","annually"])};var qe=function(e){return o(g,ye(ye({},e),{},{children:e.children}))},Re=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(b,{children:e.label}),e.helperText&&o(g,{style:{marginBottom:!e.label&&10},variant:"validation",children:e.helperText})]}),o(x,ye({disableUnderline:!0},e))]})})},je=function(e){return o(y,ye({},e))};var Be="production"!==process.env.NODE_ENV?a.oneOfType([a.number,a.string,a.object,a.array]):{};function De(){return De=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},De.apply(this,arguments)}function Ee(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function ze(e,t,r={clone:!0}){const n=r.clone?De({},e):e;return Ee(e)&&Ee(t)&&Object.keys(t).forEach((i=>{"__proto__"!==i&&(Ee(t[i])&&i in e&&Ee(e[i])?n[i]=ze(e[i],t[i],r):n[i]=t[i])})),n}const Me=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ue=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Ge=[...Me,...Ue];function $e(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 _e(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||Me.reduce(((e,t)=>(e[t]=Be,e)),{}),"production"===process.env.NODE_ENV||Ue.reduce(((e,t)=>(e[t]=Be,e)),{}),"production"===process.env.NODE_ENV||Ge.reduce(((e,t)=>(e[t]=Be,e)),{});const Ve=["values","unit","step"];function Fe(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5}=e,i=_e(e,Ve),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)=>De({},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 s(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-n/100}${r})`}function d(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 De({keys:l,values:a,up:o,down:s,between:d,only:function(e){return l.indexOf(e)+1<l.length?d(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?s(l[t]):d(e,l[l.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},i)}var Ze={borderRadius:4};const He=["breakpoints","palette","spacing","shape"];const Xe=e.createContext(null);"production"!==process.env.NODE_ENV&&(Xe.displayName="ThemeContext");var Ye=Xe;function Je(t=null){const r=function(){const t=e.useContext(Ye);return"production"!==process.env.NODE_ENV&&e.useDebugValue(t),t}();return r&&(n=r,0!==Object.keys(n).length)?r:t;var n}const Ke=function(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={}}=e,l=_e(e,He),o=Fe(r),s=function(e=8){if(e.mui)return e;const t=$e({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 d=ze({breakpoints:o,direction:"ltr",components:{},palette:De({mode:"light"},n),spacing:s,shape:De({},Ze,a)},l);return d=t.reduce(((e,t)=>ze(e,t)),d),d}();function Qe(e=Ke){return Je(e)}var et,tt,rt=w.input(et||(et=Ce(["\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=w.input(tt||(tt=Ce(["\n max-width: 70px;\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})),it=function(e){var t=Qe();return l("div",{style:{display:"flex",flexDirection:"row"},children:[o(nt,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),o("div",{style:{width:10}}),o(rt,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};it.propTypes={color:a.string,handleChange:a.func};var at=function(e){return l(C,{spacing:2,direction:"row",alignItems:"center",style:e.style,children:[e.startElement,o(T,{size:"small","aria-label":"Volume",value:e.value,onChange:e.handleChange}),e.endElement]})};at.propTypes={startElement:a.element,endElement:a.element,handleChange:a.func};var lt=function(e){return l(h,{variant:"settingsRow",children:[o(qe,{children:e.settingsLabel}),"checkbox"===e.settingsType&&o(p,ye({},e)),"text"===e.settingsType&&o(Re,ye({},e)),"boolean"===e.settingsType&&o(je,ye({},e)),"range"===e.settingsType&&o(at,ye({},e)),"color"===e.settingsType&&o(it,ye({},e)),"radio"===e.settingsType&&o(Ne,ye({location:"inSettings"},e))]})};lt.propTypes={settingsLabel:a.string,settingsType:a.oneOf(["checkbox","text","radio","boolean","color"])};var ot=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(P,{});break;case"twitter":i=o(k,{});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(L,{})}return l(n,ye(ye({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[i,o("div",{style:{width:10}}),o(g,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};ot.propTypes={lang:a.string,logo:a.oneOf(["google","github","twitter","wallet","googlepay","applepay","stcpay","visa/master","paypal","mada"]),buttonText:a.string};var st=function(e){return o(n,ye(ye({},e),{},{children:e.children}))},dt=function(e){return l("div",{style:{width:"100%"},children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[o(b,{children:e.label}),e.helperText&&o(g,{variant:"validation",children:e.helperText})]}),o(S,ye(ye({},e),{},{children:e.children}))]})},ct=function(e){var t=Qe();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"}})})},ut=function(e){return o(b,{children:o("div",{style:{fontSize:15},children:e.label})})},mt=function(e){return l(u,{severity:e.severity,icon:e.hideIcon,children:[e.title&&o(c,{children:e.title}),e.text]})};mt.propTypes={severity:a.oneOf(["error","info","success","warning"]),title:a.string,text:a.string,hideIcon:a.bool};var pt=function(e){var t="ar"===e.lang;return o(A,{style:{direction:t?"rtl":"ltr"},children:l(W,{"aria-label":"a dense table",children:[o(I,{children:l(q,{children:[e.columns.map((function(e,r){return o(N,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&o(N,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:"Actions"})]})}),o(O,{children:e.rows?e.rows.map((function(r,n){return l(q,{children:[r.map((function(e,r){return o(N,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&o(N,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:e.actions.map((function(t){return o(R,{style:{margin:2},variant:"outlined",size:"small",onClick:function(){return e.handleActionClick(r)},children:t})}))})]},n)})):o(q,{align:"center",children:o(N,{align:"center",component:"th",colSpan:6,children:e.noDataText})})}),e.end&&o(q,{children:e.end.map((function(e,r){return o(N,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})};pt.propTypes={handleActionClick:a.func,noDataText:a.string,lang:a.string,columns:a.array,rows:a.array,end:a.array};var ht=function(e){return o(Re,ye({endAdornment:o(j,{position:"start",children:o(z,{})})},e))},gt=function(e){return l(U,{elevation:0,children:[o(G,{expandIcon:o(M,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:o(g,{children:e.title})}),o($,{children:l(g,{children:[e.content," "]})})]})};gt.propTypes={title:a.string,content:a.string};var ft=function(e){var t=_(),r=t.formState.errors,i=t.handleSubmit,a=t.control;return o(h,{maxWidth:"sm",children:o(V,ye(ye({},t),{},{children:l("form",{onSubmit:i(e.handleUpdateProfile),children:[o(F,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(Re,ye({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(F,{control:a,name:"phoneNumber",render:function(e){var t=e.field;return o(Re,ye({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),o(F,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Re,ye({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(F,{control:a,name:"password",render:function(t){var n,i,a=t.field;return o(Re,ye({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(F,{control:a,name:"confirmPassword",render:function(t){var n,i,a=t.field;return o(Re,ye({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})]})}))})},vt=function(e){return l(h,{maxWidth:"sm",children:[e.children,o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})},xt=function(e){var t=Pe(r(!1),2),i=t[0],a=t[1],s=_(),d=s.formState.errors,c=s.handleSubmit,u=s.control;return l(h,{maxWidth:"xs",variant:"auth",children:[i&&o(mt,{text:e.texts.passwordMatchError,severity:"error"}),e.passwordChanged?o(qe,{style:{textAlign:"center",margin:5},children:e.texts.passwordChanged}):o(V,ye(ye({},s),{},{children:l("form",{onSubmit:c((function(t){console.log("handling subb",t),t.password===t.confirmPassword?e.handleNewPassword():a(!0)})),children:[o(F,{control:u,name:"password",render:function(t){var r,n,i=t.field;return o(Re,ye({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(n=d.password)||void 0===n?void 0:n.message,startAdornment:o(Z,{position:"start",children:o(H,{})})},i))},rules:{required:e.texts.passwordRequiredText}}),o(F,{control:u,name:"confirmPassword",render:function(t){var r,n,i=t.field;return o(Re,ye({fullWidth:!0,type:"password",value:null!==(r=i.value)&&void 0!==r?r:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(n=d.confirmPassword)||void 0===n?void 0:n.message,startAdornment:o(Z,{position:"start",children:o(H,{})})},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updatePassword})]})}))]})};xt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,passwordPlaceholder:a.string,updatePassword:a.string,passwordRequiredText:a.string,passwordLabel:a.string,confirmPasswordPlaceholder:a.string,confirmPasswordLabel:a.string,confirmPasswordRequiredText:a.string,passwordMatchError:a.string,forgotPasswordText:a.string,passwordChanged:a.string}),passwordChanged:a.bool,handleNewPassword:a.func};var bt=function(e){var t=_(),r=t.formState.errors,i=t.handleSubmit;t.register;var a=t.control;return o(h,{maxWidth:"xs",variant:"auth",children:e.sent?o(qe,{style:{textAlign:"center",margin:5},children:e.texts.emailSentText}):l("form",{onSubmit:i(e.handleResetPassword),children:[o(F,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Re,ye({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(Z,{position:"start",children:o(X,{})})},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})]})})};bt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,emailSentText:a.string,resetPassword:a.string}),sent:a.bool,handleResetPassword:a.func};var yt=function(e){var t=_(),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(mt,{title:e.errorTitle,text:e.errorText,severity:"error"}),o(V,ye(ye({},t),{},{children:l("form",{onSubmit:i(e.handleSignUp),children:[o(F,{control:a,name:"fullName",render:function(t){var n,i,a=t.field;return o(Re,{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(Z,{position:"start",children:o(Y,{})})})},rules:{required:e.texts.fullNameRequiredText}}),o(F,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Re,{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(Z,{position:"start",children:o(X,{})})})},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(F,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(Re,ye({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(Z,{position:"start",children:o(H,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(n,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l(g,{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(J,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(ot,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&o(ot,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&o(ot,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};yt.propTypes={texts:a.shape({fullNameLabel:a.string,fullNamePlaceholder:a.string,fullNameRequiredText:a.string,emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,passwordLabel:a.string,passwordPlaceholder:a.string,passwordRequiredText:a.string,passwordTooShortText:a.string,forgotPasswordText:a.string,newUserText:a.string,signUpText:a.string,signInText:a.string,existingUserText:a.string,googleButtonLabel:a.string,githubButtonLabel:a.string,twitterButtonLabel:a.string}),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 wt=function(e){var t=_(),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(mt,{title:e.errorTitle,text:e.errorText,severity:"error"}),l("form",{onSubmit:i(e.handleSignIn),children:[o(F,{control:a,name:"email",render:function(t){var n,i,a=t.field;return o(Re,ye({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(Z,{position:"start",children:o(X,{})})},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(F,{control:a,name:"password",render:function(t){var n,i,a,l=t.field;return o(Re,ye({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(Z,{position:"start",children:o(H,{})})},l))},rules:{required:e.texts.passwordRequiredText}}),o(g,{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(g,{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(J,{}),l("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&o(ot,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&o(ot,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&o(ot,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};wt.propTypes={texts:a.shape({emailLabel:a.string,emailPlaceholder:a.string,emailRequiredText:a.string,emailInvalidText:a.string,passwordLabel:a.string,passwordPlaceholder:a.string,passwordRequiredText:a.string,forgotPasswordText:a.string,newUserText:a.string,signUpText:a.string,signInText:a.string,googleButtonLabel:a.string,githubButtonLabel:a.string,twitterButtonLabel:a.string}),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 Tt=function(e){return l(h,{maxWidth:"xs",children:[o(qe,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&o(ot,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&o(ot,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&o(ot,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&o(ot,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&o(ot,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&o(ot,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&o(ot,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};Tt.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 Ct=function(e){var t,r=_(),i=r.formState.errors,a=r.handleSubmit,s=r.control;return o(h,{maxWidth:"xs",children:l("form",{onSubmit:a(e.handle),children:[o(Re,{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(F,{control:s,name:"cardName",render:function(e){var t;return e.field,o(Re,{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(F,{control:s,name:"cardName",render:function(e){var t;return e.field,o(Re,{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(F,{control:s,name:"cardName",render:function(e){var t;return e.field,o(Re,{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=Pe(r(0),2),i=t[0],a=t[1],s=_(),d=s.formState.errors,c=s.handleSubmit,u=s.control;return l(h,{maxWidth:"xs",children:[l(g,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(i).toLocaleString("en")||"0",o(g,{children:e.currency||"SAR"})]}),o(V,ye(ye({},s),{},{children:l("form",{onSubmit:c(e.handleChargeWallet),children:[o(F,{control:u,name:"amount",render:function(t){var r,n,i=t.field;return o(Re,ye(ye({fullWidth:!0,placeholder:e.texts.amountLabel,type:"number",value:null!==(r=i.value)&&void 0!==r?r:""},i),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){i.onChange(parseFloat(e.target.value)),a(e.target.value)},helperText:null===(n=d.amount)||void 0===n?void 0:n.message}))},rules:{required:e.texts.amountRequired}}),o(n,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.chargeWallet})]})}))]})};Pt.propTypes={texts:a.shape({amountLabel:a.string,chargeWallet:a.string,amountRequired:a.string}),handleChargeWallet:a.func,currency:a.string};var kt=function(e){return l(h,{maxWidth:"xs",children:[o(g,{align:"center",children:"Wallet Balance"}),l(g,{align:"center",variant:"h1",children:[e.walletBalance||"0",o(g,{children:e.currency||"SAR"})]}),o(n,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},Lt=function(e){var t,r,i,a,s,d,c,u,m,p,f="ar"===e.lang,v=_(),x=v.formState.errors,b=v.handleSubmit;v.register;var y=v.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:[o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(pt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(J,{variant:"middle"}),o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),o(V,ye(ye({},v),{},{children:l("form",{onSubmit:b(e.handlePayNow),children:[l(h,{sx:w,children:[o(F,{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(Re,ye({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(F,{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(Re,ye({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(F,{control:y,name:"email",render:function(t){var r,n,i,a=t.field;return o(Re,ye({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(F,{control:y,name:"streetAddress",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(Re,ye({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(F,{control:y,name:"buildingNumber",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(Re,ye({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(F,{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(Re,ye({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(F,{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(Re,ye({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(F,{control:y,name:"zipCode",rules:{required:null===(m=e.texts)||void 0===m?void 0:m.required},render:function(t){var r,n,i,a=t.field;return o(Re,ye({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(F,{control:y,name:"country",rules:{required:null===(p=e.texts)||void 0===p?void 0:p.required},render:function(t){var r,n,i,a=t.field;return l(dt,ye(ye({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})]})}))]})};Lt.propTypes={texts:a.shape({orderDetails:a.string,billingAddress:a.string,payNow:a.string,emailLabel:a.string,emailRequiredText:a.string,emailInvalidText:a.string,firstNameLabel:a.string,required:a.string,lastNameLabel:a.string,streetAddressLabel:a.string,buildingNumberLabel:a.string,cityLabel:a.string,stateLabel:a.string,countryLabel:a.string,zipCodeLabel:a.string}),lang:a.string,countriesList:a.array,products:a.array,total:a.string,handlePayNow:a.func};var St=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(g,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),o(J,{variant:"middle"}),l(g,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",o("strong",{children:e.userEmail})]}),o(g,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),o(g,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),o(J,{variant:"middle"}),e.products&&l(s,{children:[o(g,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),o(pt,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),o(J,{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(g,{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(g,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};St.propTypes={texts:a.shape({print:a.string,history:a.string,homePage:a.string,successMessage:a.string,orderDetails:a.string,fasterPaymentNote:a.string,billingAddress:a.string,payNow:a.string,yourOrderNumber:a.string,emailLabel:a.string,emailRequiredText:a.string,emailInvalidText:a.string,firstNameLabel:a.string,required:a.string,lastNameLabel:a.string,streetAddressLabel:a.string,buildingNumberLabel:a.string,cityLabel:a.string,stateLabel:a.string,countryLabel:a.string,zipCodeLabel:a.string,refundPolicy:a.string}),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 Wt=function(e){var t=Pe(r("sar"),2),n=t[0],i=t[1],a=Pe(r("monthly"),2),s=a[0],d=a[1];return l(h,{style:{width:"fit-content"},variant:"plain",children:[l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:10},children:[o(Ne,{location:"inPricing",handleChange:function(e){return d(e)},defaultValue:"monthly",options:[{label:"Monthly",value:"monthly"},{label:"3 Months",value:"3-months"},{label:"6 Months",value:"6-months"},{label:"Annually",value:"annually"}]}),o(Ne,{location:"inPricing",handleChange:function(e){i(e)},defaultValue:"sar",options:[{label:"USD",value:"usd"},{label:"SAR",value:"sar"}]})]}),o(h,{variant:"pricing",children:e.plans.map((function(t){return o(Ie,ye(ye({lang:e.lang},t),{},{currency:n,cycleText:s}))}))})]})};Wt.propTypes={plans:a.arrayOf(a.shape({title:a.string,title_ar:a.string,subtitle:a.string,subtitle_ar:a.string,price:a.number,currency:a.string,cycleText:a.string,buttonText:a.string,features:a.array,features_ar:a.array,selectedPlan:a.bool})),lang:a.string};var Ot=function(e){return o("div",{children:e.children})},Nt=function(e){var t=B();return o(me,{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(pe,{onClick:e.action,children:[e.icon&&o(e.icon,{}),e.icon&&o("div",{style:{width:10}}),o(g,{textAlign:"center",children:e.label})]},e.label)}))})};Nt.propTypes={anchor:a.any,handleClose:a.func,menuItems:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func}))};var At=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},It=function(e){return we({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(8)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},qt=K("div")((function(e){var t=e.theme;return ye({display:"flex",alignItems:"center",justifyContent:"rtl"===e.direction?"flex-start":"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),Rt=K(re,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open,n=e.direction;return ye({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:"rtl"===n?0:240,marginRight:"rtl"===n?240:0,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),jt=K(te,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ye(ye({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&ye(ye({},At(t)),{},{"& .MuiDrawer-paper":At(t)})),!r&&ye(ye({},It(t)),{},{"& .MuiDrawer-paper":It(t)}))}));function Bt(e){var r=Q(),n=Pe(t.useState(!0),2),a=n[0],s=n[1],d="ar"===e.lang,c=Pe(t.useState(null),2);c[0],c[1];var u=Pe(t.useState(null),2),m=u[0],p=u[1];return l(ee,{sx:{display:"flex",direction:d?"rtl":"ltr"},children:[o(Rt,{variant:"appbar",position:"fixed",open:a,direction:d?"rtl":"ltr",children:l(ne,{variant:"appbar",sx:{paddingLeft:{xs:3},paddingRight:{xs:3}},children:[o(ae,{color:"inherit","aria-label":"open drawer",onClick:function(){return s(!0)},edge:"start",s:!0,sx:ye({marginRight:5},a&&{display:"none"}),children:o(le,{})}),l("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[o(g,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),l(ee,{children:[o(i,{title:"Open settings",children:o(ae,{onClick:function(e){return p(e.currentTarget)},sx:{p:0},size:"small",children:o(ue,{})})}),o(Nt,{menuItems:e.accountMenu,anchor:m,handleClose:function(){return p(null)}})]})]})]})}),l(jt,{variant:"permanent",open:a,children:[l(qt,{direction:d?"rtl":"ltr",children:[e.logo,o(ae,{onClick:function(){return s(!1)},children:"rtl"===r.direction?o(se,{}):o(oe,{})})]}),o(J,{}),o(ie,{children:e.pages.map((function(t,r){var n,s;return o(i,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:a?0:1}},children:l(de,{variant:(null===(n=e.pageName)||void 0===n?void 0:n.toLowerCase())===(null===(s=t.slug)||void 0===s?void 0:s.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(ce,{primary:t.text,sx:{opacity:a?1:0}})]},t.text)},r)}))})]}),l(ee,{sx:{flexGrow:1,p:3},children:[o(qt,{}),e.children]})]})}var Dt=["children","onClose","hideClose"],Et=function(e){var t=e.children,r=e.onClose,n=e.hideClose,i=Te(e,Dt);return l(xe,ye(ye({sx:{m:0,p:2}},i),{},{children:[t,n?null:o(ae,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:o(he,{})})]}))};function zt(e){var t=Pe(r(!1),2);return t[0],t[1],l(ge,ye(ye({},e),{},{variant:"main",children:[o(Et,{onClose:e.onClose,hideClose:e.hideClose,children:e.title}),o(ve,{children:e.children}),o(fe,{children:e.actions})]}))}var Mt=function(e){var r=B(),a=Pe(t.useState(null),2),s=a[0],d=a[1],c=Pe(t.useState(null),2),u=c[0],m=c[1],p=function(){return d(null)};return console.log("theme is ",r),o(re,{position:"static",variant:"appbar",children:o(h,{variant:"appbar",children:l(ne,{disableGutters:!0,children:[o(ee,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.logo}),l(ee,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[o(ae,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:function(e){return d(e.currentTarget)},color:"inherit",children:o(le,{})}),o(Nt,{anchor:s,handleClose:p,menuItems:e.pages})]}),o(ee,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:e.logo}),o(ee,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.pages.map((function(e){return o(n,{onClick:p,sx:{my:2,display:"block"},children:e.label},e)}))}),l(ee,{sx:{flexGrow:0},children:[o(i,{title:"Open settings",children:o(ae,{onClick:function(e){return m(e.currentTarget)},sx:{p:0},children:o(ue,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),o(Nt,{anchor:u,handleClose:function(e){return m(null)},menuItems:e.accountMenu})]})]})})})};Mt.propTypes={pages:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func})),accountMenu:a.arrayOf(a.shape({icon:a.element,label:a.string,action:a.func}))};var Ut=function(e){var r=Pe(t.useState(null),2),n=r[0],i=r[1];return l(D,ye(ye({variant:"page-controls"},e),{},{style:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[o(R,{variant:"layout",onClick:e.backAction,children:e.backText}),o(E,{direction:"row",spacing:1,sx:{display:{xs:"none",md:"flex"}},children:e.actionButtons.map((function(e){return o(R,{variant:"layout",children:e.label})}))}),l(E,{direction:"row",spacing:1,sx:{display:{xs:"flex",md:"none"}},children:[o(R,{variant:"layout",onClick:function(e){return i(e.currentTarget)},children:o(le,{})}),o(Nt,{handleClose:function(e){return i(null)},anchor:n,menuItems:e.actionButtons})]})]}))};Ut.propTypes={backText:a.string,backAction:a.func,actionButtons:a.arrayOf(a.shape({label:a.string,action:a.func}))};export{Se as ActionButton,Le as AdaptiveButton,Ot as Box,Pt as ChargeWalletForm,Lt as CheckoutForm,St as ConfirmationPage,Ct as CreditCardForm,gt as HawaAccordian,mt as HawaAlert,Mt as HawaAppBar,Bt as HawaAppLayout,st as HawaButton,Oe as HawaCheckbox,it as HawaColorPicker,zt as HawaDialog,ut as HawaInputLabel,Ae as HawaItemCard,ot as HawaLogoButton,Ut as HawaPageControls,Ie as HawaPricingCard,Ne as HawaRadio,at as HawaRange,ht as HawaSearchBar,dt as HawaSelect,lt as HawaSettingsRow,We as HawaSnackbar,pt as HawaTable,ct as HawaTextArea,Re as HawaTextField,qe as HawaTypography,xt as NewPasswordForm,kt as PayWithWallet,Wt as PricingPlans,bt as ResetPasswordForm,Tt as SelectPayment,wt as SignInForm,yt as SignUpForm,ft as UserProfileForm,vt 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"),a=require("prop-types"),n=require("react/jsx-runtime"),l=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"),g=require("@mui/material/Slider"),v=require("@mui/material/Stack"),b=require("@mui/icons-material/GitHub"),j=require("@mui/icons-material/Twitter"),y=require("@mui/icons-material/AccountBalanceWallet"),w=require("@mui/material/Select"),T=require("@mui/material/Table"),C=require("@mui/material/TableBody"),P=require("@mui/material/TableCell"),q=require("@mui/material/TableContainer"),k=require("@mui/material/TableHead"),S=require("@mui/material/TableRow"),L=require("@mui/material"),O=require("@mui/icons-material"),W=require("@mui/icons-material/ExpandMore"),A=require("@mui/material/Accordion"),I=require("@mui/material/AccordionSummary"),N=require("@mui/material/AccordionDetails"),R=require("react-hook-form"),B=require("@mui/material/InputAdornment"),z=require("@mui/icons-material/HttpsOutlined"),E=require("@mui/icons-material/MailOutline"),D=require("@mui/icons-material/PermIdentityOutlined"),F=require("@mui/material/Divider"),M=require("@mui/material/styles"),U=require("@mui/material/Box"),H=require("@mui/material/Drawer"),G=require("@mui/material/AppBar"),$=require("@mui/material/Toolbar"),_=require("@mui/material/List"),V=require("@mui/material/IconButton"),Z=require("@mui/icons-material/Menu"),X=require("@mui/icons-material/ChevronLeft"),Y=require("@mui/icons-material/ChevronRight"),J=require("@mui/material/ListItemButton"),K=require("@mui/material/ListItemText"),Q=require("@mui/material/Avatar"),ee=require("@mui/icons-material/Close"),te=require("@mui/material/Dialog"),re=require("@mui/material/DialogActions"),ae=require("@mui/material/DialogContent"),ne=require("@mui/material/DialogTitle"),le=require("@mui/material/Menu"),ie=require("@mui/material/MenuItem");function oe(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function se(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var de=oe(e),ue=se(e),ce=oe(t),fe=oe(r),xe=oe(a),pe=oe(l),he=oe(i),me=oe(o),ge=oe(s),ve=oe(d),be=oe(u),je=oe(c),ye=oe(f),we=oe(x),Te=oe(p),Ce=oe(h),Pe=oe(m),qe=oe(g),ke=oe(v),Se=oe(b),Le=oe(j),Oe=oe(y),We=oe(w),Ae=oe(T),Ie=oe(C),Ne=oe(P),Re=oe(q),Be=oe(k),ze=oe(S),Ee=oe(W),De=oe(A),Fe=oe(I),Me=oe(N),Ue=oe(B),He=oe(z),Ge=oe(E),$e=oe(D),_e=oe(F),Ve=oe(U),Ze=oe(H),Xe=oe(G),Ye=oe($),Je=oe(_),Ke=oe(V),Qe=oe(Z),et=oe(X),tt=oe(Y),rt=oe(J),at=oe(K),nt=oe(Q),lt=oe(ee),it=oe(te),ot=oe(re),st=oe(ae),dt=oe(ne),ut=oe(le),ct=oe(ie);function ft(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function xt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ft(Object(r),!0).forEach((function(t){pt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ft(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function pt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ht(e,t){if(null==e)return{};var r,a,n=function(e,t){if(null==e)return{};var r,a,n={},l=Object.keys(e);for(a=0;a<l.length;a++)r=l[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)r=l[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function gt(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 a,n,l=[],i=!0,o=!1;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(l.push(a.value),!t||l.length!==t);i=!0);}catch(e){o=!0,n=e}finally{try{i||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 vt(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 vt(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 vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var bt=function(e){return e.showText?n.jsxs(ce.default,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,n.jsx("div",{style:{width:10}}),e.buttonText]}):n.jsx(fe.default,{title:e.buttonText,placement:"top",children:n.jsx(ce.default,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};bt.propTypes={buttonText:xe.default.string,onClick:xe.default.func,showText:xe.default.bool};var jt=function(t){var r=gt(e.useState(t.defaultValue),2),a=r[0],l=r[1];return n.jsx(be.default,{variant:t.location||"panelTabs",children:t.options.map((function(e,r){var i;return n.jsx(ce.default,{onClick:function(){t.handleChange(e.value),l(e.value)},fullWidth:!0,variant:(null==a?void 0:a.toLowerCase())===(null===(i=e.value)||void 0===i?void 0:i.toLowerCase())?"selected":"unselected",children:e.label},r)}))})};jt.propTypes={lang:xe.default.string,options:xe.default.arrayOf(xe.default.shape({label:xe.default.string,value:xe.default.string})),defaultValue:xe.default.string,handleChange:xe.default.func,location:xe.default.string};var yt=function(e){var t="ar"===e.lang;return n.jsxs(be.default,{onClick:function(t){t.stopPropagation(),e.onCardClick()},maxWidth:"xs",variant:"card-container",dataValue:"parent",style:{direction:t?"rtl":"ltr"},children:[e.header&&n.jsxs(be.default,{style:{zIndex:20},variant:"card-header",children:[e.headerActions&&n.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&&n.jsx(be.default,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&n.jsx(be.default,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};yt.propTypes={lang:xe.default.string,onCardClick:xe.default.func};var wt=function(e){var t,r,a="ar"===e.lang,l={monthly:"شهرياً","3-months":"كل 3 أشهر","6-months":"كل 6 أشهر",annually:"سنوياً"},i={monthly:"Monthly","3-months":"3 Months","6-months":"6 Months",annually:"Annually"},o={usd:a?"دولار":"$",sar:a?"ريال":"SAR"},s=a?e.features_ar:e.features;return n.jsxs(be.default,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:a?"rtl":"ltr"},children:[n.jsxs(be.default,{variant:"plan-header",children:[n.jsx(je.default,{variant:"h3",fontWeight:500,children:a?e.title_ar:e.title}),n.jsx(je.default,{variant:"caption",children:a?e.subtitle_ar:e.subtitle}),n.jsx("br",{}),n.jsx(je.default,{variant:"h4",fontWeight:500,style:{display:"flex",alignItems:"center"},children:"ar"===e.lang?n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[e.price,n.jsx("div",{style:{width:5}}),n.jsx(je.default,{children:o[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),n.jsx(je.default,{style:{fontSize:14,margin:5},children:a?l[e.cycleText]:i[e.cycleText]})]}):n.jsxs("div",{style:{width:"100%",display:"flex",flexDirection:"column",justifyContent:"center"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[n.jsx(je.default,{children:o[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),n.jsx("div",{style:{width:5}}),e.price]}),n.jsx(je.default,{style:{fontSize:14,margin:5},children:"ar"===e.lang?l[e.cycleText]:i[e.cycleText]})]})})]}),n.jsx("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==s?void 0:s.map((function(e){return n.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"flex-start",marginTop:10,width:"100%"},children:[n.jsx("div",{style:{display:"flex",flexDirection:"row",justifyContent:"flex-end",width:"10%"},children:n.jsx(ye.default,{fontSize:"small"})}),n.jsx("div",{style:{width:10}}),n.jsx(je.default,{variant:"subtitle2",children:e})]})}))}),n.jsx(ce.default,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};wt.propTypes={lang:xe.default.string,buttonText:xe.default.string,selectedPlan:xe.default.string,title:xe.default.string,title_ar:xe.default.string,subtitle:xe.default.string,subtitle_ar:xe.default.string,features:xe.default.array,features_ar:xe.default.array};var Tt=function(e){return n.jsx(je.default,xt(xt({},e),{},{children:e.children}))},Ct=function(e){return n.jsx("div",{style:e.inForm&&{width:"100%"},children:n.jsxs("div",{style:{width:e.fullWidth?"100%":"fit-content"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[e.label&&n.jsx(Te.default,{children:e.label}),e.helperText&&n.jsx(je.default,{variant:"validation",children:e.helperText})]}),n.jsx(we.default,xt({disableUnderline:!0},e))]})})},Pt=function(e){return n.jsx(Ce.default,xt({},e))};var qt="production"!==process.env.NODE_ENV?xe.default.oneOfType([xe.default.number,xe.default.string,xe.default.object,xe.default.array]):{};function kt(){return kt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},kt.apply(this,arguments)}function St(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function Lt(e,t,r={clone:!0}){const a=r.clone?kt({},e):e;return St(e)&&St(t)&&Object.keys(t).forEach((n=>{"__proto__"!==n&&(St(t[n])&&n in e&&St(e[n])?a[n]=Lt(e[n],t[n],r):a[n]=t[n])})),a}const Ot=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Wt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],At=[...Ot,...Wt];function It(e){return function(e,t,r,a){const n=(l=e,((i=t)&&"string"==typeof i?i.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),l):null)||r);var l,i;return"number"==typeof n?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${a} argument to be a number or a string, got ${e}.`),n*e):Array.isArray(n)?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&(Number.isInteger(e)?e>n.length-1&&console.error([`MUI: The value provided (${e}) overflows.`,`The supported values are: ${JSON.stringify(n)}.`,`${e} > ${n.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"))),n[e]):"function"==typeof n?n:("production"!==process.env.NODE_ENV&&console.error([`MUI: The \`theme.${t}\` value (${n}) is invalid.`,"It should be a number, an array or a function."].join("\n")),()=>{})}(e,"spacing",8,"spacing")}function Nt(e,t){if(null==e)return{};var r,a,n={},l=Object.keys(e);for(a=0;a<l.length;a++)r=l[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}"production"===process.env.NODE_ENV||Ot.reduce(((e,t)=>(e[t]=qt,e)),{}),"production"===process.env.NODE_ENV||Wt.reduce(((e,t)=>(e[t]=qt,e)),{}),"production"===process.env.NODE_ENV||At.reduce(((e,t)=>(e[t]=qt,e)),{});const Rt=["values","unit","step"];function Bt(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:a=5}=e,n=Nt(e,Rt),l=(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)=>kt({},e,{[t.key]:t.val})),{})})(t),i=Object.keys(l);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)-a/100}${r})`}function d(e,n){const l=i.indexOf(n);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==l&&"number"==typeof t[i[l]]?t[i[l]]:n)-a/100}${r})`}return kt({keys:i,values:l,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},n)}var zt={borderRadius:4};const Et=["breakpoints","palette","spacing","shape"];const Dt=ue.createContext(null);"production"!==process.env.NODE_ENV&&(Dt.displayName="ThemeContext");var Ft=Dt;function Mt(e=null){const t=function(){const e=ue.useContext(Ft);return"production"!==process.env.NODE_ENV&&ue.useDebugValue(e),e}();return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}const Ut=function(e={},...t){const{breakpoints:r={},palette:a={},spacing:n,shape:l={}}=e,i=Nt(e,Et),o=Bt(r),s=function(e=8){if(e.mui)return e;const t=It({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}(n);let d=Lt({breakpoints:o,direction:"ltr",components:{},palette:kt({mode:"light"},a),spacing:s,shape:kt({},zt,l)},i);return d=t.reduce(((e,t)=>Lt(e,t)),d),d}();function Ht(e=Ut){return Mt(e)}var Gt,$t,_t=Pe.default.input(Gt||(Gt=mt(["\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})),Vt=Pe.default.input($t||($t=mt(["\n max-width: 70px;\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})),Zt=function(e){var t=Ht();return n.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[n.jsx(Vt,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),n.jsx("div",{style:{width:10}}),n.jsx(_t,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};Zt.propTypes={color:xe.default.string,handleChange:xe.default.func};var Xt=function(e){return n.jsxs(ke.default,{spacing:2,direction:"row",alignItems:"center",children:[e.startElement,n.jsx(qe.default,{size:"small","aria-label":"Volume",value:e.value,onChange:e.handleChange}),e.endElement]})};Xt.propTypes={startElement:xe.default.element,endElement:xe.default.element,defaultValue:xe.default.string,handleChange:xe.default.func,location:xe.default.string};var Yt=function(e){return n.jsxs(be.default,{variant:"settingsRow",children:[n.jsx(Tt,{children:e.settingsLabel}),"checkbox"===e.settingsType&&n.jsx(ve.default,xt({},e)),"text"===e.settingsType&&n.jsx(Ct,xt({},e)),"boolean"===e.settingsType&&n.jsx(Pt,xt({},e)),"range"===e.settingsType&&n.jsx(Xt,xt({},e)),"color"===e.settingsType&&n.jsx(Zt,xt({},e)),"radio"===e.settingsType&&n.jsx(jt,xt({location:"inSettings"},e))]})};Yt.propTypes={settingsLabel:xe.default.string,settingsType:xe.default.oneOf(["checkbox","text","radio","boolean","color"])};var Jt=function(e){var t,r="ar"===e.lang,a="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":a=n.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":a=n.jsx(Se.default,{});break;case"twitter":a=n.jsx(Le.default,{});break;case"mada":a=n.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":a=n.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":a=n.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":a=n.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":a=n.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":a=n.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":a=n.jsx(Oe.default,{})}return n.jsxs(ce.default,xt(xt({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[a,n.jsx("div",{style:{width:10}}),n.jsx(je.default,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};Jt.propTypes={lang:xe.default.string,logo:xe.default.oneOf(["google","github","twitter","wallet","googlepay","applepay","stcpay","visa/master","paypal","mada"]),buttonText:xe.default.string};var Kt=function(e){return n.jsxs("div",{style:{width:"100%"},children:[n.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center"},children:[n.jsx(Te.default,{children:e.label}),e.helperText&&n.jsx(je.default,{variant:"validation",children:e.helperText})]}),n.jsx(We.default,xt(xt({},e),{},{children:e.children}))]})},Qt=function(e){return n.jsxs(me.default,{severity:e.severity,icon:e.hideIcon,children:[e.title&&n.jsx(he.default,{children:e.title}),e.text]})};Qt.propTypes={severity:xe.default.oneOf(["error","info","success","warning"]),title:xe.default.string,text:xe.default.string,hideIcon:xe.default.bool};var er=function(e){var t="ar"===e.lang;return n.jsx(Re.default,{style:{direction:t?"rtl":"ltr"},children:n.jsxs(Ae.default,{"aria-label":"a dense table",children:[n.jsx(Be.default,{children:n.jsxs(ze.default,{children:[e.columns.map((function(e,r){return n.jsx(Ne.default,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&n.jsx(Ne.default,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:"Actions"})]})}),n.jsx(Ie.default,{children:e.rows?e.rows.map((function(r,a){return n.jsxs(ze.default,{children:[r.map((function(e,r){return n.jsx(Ne.default,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&n.jsx(Ne.default,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:e.actions.map((function(t){return n.jsx(L.Button,{style:{margin:2},variant:"outlined",size:"small",onClick:function(){return e.handleActionClick(r)},children:t})}))})]},a)})):n.jsx(ze.default,{align:"center",children:n.jsx(Ne.default,{align:"center",component:"th",colSpan:6,children:e.noDataText})})}),e.end&&n.jsx(ze.default,{children:e.end.map((function(e,r){return n.jsx(Ne.default,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})};er.propTypes={handleActionClick:xe.default.func,noDataText:xe.default.string,lang:xe.default.string,columns:xe.default.array,rows:xe.default.array,end:xe.default.array};var tr=function(e){return n.jsxs(De.default,{elevation:0,children:[n.jsx(Fe.default,{expandIcon:n.jsx(Ee.default,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:n.jsx(je.default,{children:e.title})}),n.jsx(Me.default,{children:n.jsxs(je.default,{children:[e.content," "]})})]})};tr.propTypes={title:xe.default.string,content:xe.default.string};var rr=function(t){var r=gt(e.useState(!1),2),a=r[0],l=r[1],i=R.useForm(),o=i.formState.errors,s=i.handleSubmit,d=i.control;return n.jsxs(be.default,{maxWidth:"xs",variant:"auth",children:[a&&n.jsx(Qt,{text:t.texts.passwordMatchError,severity:"error"}),t.passwordChanged?n.jsx(Tt,{style:{textAlign:"center",margin:5},children:t.texts.passwordChanged}):n.jsx(R.FormProvider,xt(xt({},i),{},{children:n.jsxs("form",{onSubmit:s((function(e){console.log("handling subb",e),e.password===e.confirmPassword?t.handleNewPassword():l(!0)})),children:[n.jsx(R.Controller,{control:d,name:"password",render:function(e){var r,a,l=e.field;return n.jsx(Ct,xt({fullWidth:!0,type:"password",value:null!==(r=l.value)&&void 0!==r?r:"",label:t.texts.passwordLabel,placeholder:t.texts.passwordPlaceholder,helperText:null===(a=o.password)||void 0===a?void 0:a.message,startAdornment:n.jsx(Ue.default,{position:"start",children:n.jsx(He.default,{})})},l))},rules:{required:t.texts.passwordRequiredText}}),n.jsx(R.Controller,{control:d,name:"confirmPassword",render:function(e){var r,a,l=e.field;return n.jsx(Ct,xt({fullWidth:!0,type:"password",value:null!==(r=l.value)&&void 0!==r?r:"",label:t.texts.confirmPasswordLabel,placeholder:t.texts.confirmPasswordPlaceholder,helperText:null===(a=o.confirmPassword)||void 0===a?void 0:a.message,startAdornment:n.jsx(Ue.default,{position:"start",children:n.jsx(He.default,{})})},l))},rules:{required:t.texts.confirmPasswordRequiredText}}),n.jsx(ce.default,{type:"submit",fullWidth:!0,variant:"last",children:t.texts.updatePassword})]})}))]})};rr.propTypes={texts:xe.default.shape({emailLabel:xe.default.string,emailPlaceholder:xe.default.string,emailRequiredText:xe.default.string,passwordPlaceholder:xe.default.string,updatePassword:xe.default.string,passwordRequiredText:xe.default.string,passwordLabel:xe.default.string,confirmPasswordPlaceholder:xe.default.string,confirmPasswordLabel:xe.default.string,confirmPasswordRequiredText:xe.default.string,passwordMatchError:xe.default.string,forgotPasswordText:xe.default.string,passwordChanged:xe.default.string}),handleNewPassword:xe.default.func};var ar=function(e){var t=R.useForm(),r=t.formState.errors,a=t.handleSubmit;t.register;var l=t.control;return n.jsx(be.default,{maxWidth:"xs",variant:"auth",children:e.sent?n.jsx(Tt,{style:{textAlign:"center",margin:5},children:e.emailSentText}):n.jsxs("form",{onSubmit:a(e.handleResetPassword),children:[n.jsx(R.Controller,{control:l,name:"email",render:function(t){var a,l,i=t.field;return n.jsx(Ct,xt({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(l=r.email)||void 0===l?void 0:l.message,placeholder:e.texts.emailPlaceholder,startAdornment:n.jsx(Ue.default,{position:"start",children:n.jsx(Ge.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}}}),n.jsx(ce.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};ar.propTypes={texts:xe.default.shape({emailLabel:xe.default.string,emailPlaceholder:xe.default.string,emailRequiredText:xe.default.string,emailInvalidText:xe.default.string,resetPassword:xe.default.string}),emailSentText:xe.default.string,handleResetPassword:xe.default.func};var nr=function(e){var t=R.useForm(),r=t.formState.errors,a=t.handleSubmit,l=t.control;return n.jsxs(be.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.error&&n.jsxs(me.default,{severity:"error",variant:"inContainer",children:[e.errorTitle&&n.jsx(he.default,{children:e.errorTitle}),e.errorText]}),n.jsx(R.FormProvider,xt(xt({},t),{},{children:n.jsxs("form",{onSubmit:a(e.handleSignUp),children:[n.jsx(R.Controller,{control:l,name:"fullName",render:function(t){var a,l,i=t.field;return n.jsx(Ct,{fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(l=r.fullName)||void 0===l?void 0:l.message,startAdornment:n.jsx(Ue.default,{position:"start",children:n.jsx($e.default,{})})})},rules:{required:e.texts.fullNameRequiredText}}),n.jsx(R.Controller,{control:l,name:"email",render:function(t){var a,l,i=t.field;return n.jsx(Ct,{fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(l=r.email)||void 0===l?void 0:l.message,placeholder:e.texts.emailPlaceholder,startAdornment:n.jsx(Ue.default,{position:"start",children:n.jsx(Ge.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}}}),n.jsx(R.Controller,{control:l,name:"password",render:function(t){var a,l,i,o=t.field;return n.jsx(Ct,xt({fullWidth:!0,type:"password",defaultValue:null!==(a=o.value)&&void 0!==a?a:"",value:null!==(l=o.value)&&void 0!==l?l:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message,startAdornment:n.jsx(Ue.default,{position:"start",children:n.jsx(He.default,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),n.jsx(ce.default,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),n.jsxs(je.default,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.existingUserText," ",n.jsx("span",{onClick:e.handleRouteToSignIn,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signInText})]}),n.jsx(_e.default,{}),n.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&n.jsx(Jt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&n.jsx(Jt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&n.jsx(Jt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};nr.propTypes={texts:xe.default.shape({fullNameLabel:xe.default.string,fullNamePlaceholder:xe.default.string,fullNameRequiredText:xe.default.string,emailLabel:xe.default.string,emailPlaceholder:xe.default.string,emailRequiredText:xe.default.string,emailInvalidText:xe.default.string,passwordLabel:xe.default.string,passwordPlaceholder:xe.default.string,passwordRequiredText:xe.default.string,passwordTooShortText:xe.default.string,forgotPasswordText:xe.default.string,newUserText:xe.default.string,signUpText:xe.default.string,signInText:xe.default.string,existingUserText:xe.default.string,googleButtonLabel:xe.default.string,githubButtonLabel:xe.default.string,twitterButtonLabel:xe.default.string}),viaGoogle:xe.default.bool,viaGithub:xe.default.bool,viaTwitter:xe.default.bool,handleSignUp:xe.default.func,handleRouteToSignIn:xe.default.func,handleGoogleSignUp:xe.default.func,handleGithubSignUp:xe.default.func,handleTwitterSignUp:xe.default.func};var lr=function(e){var t=R.useForm(),r=t.formState.errors,a=t.handleSubmit,l=t.control;return n.jsxs(be.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&n.jsx(Qt,{title:e.errorTitle,text:e.errorText,severity:"error"}),n.jsxs("form",{onSubmit:a(e.handleSignIn),children:[n.jsx(R.Controller,{control:l,name:"email",render:function(t){var a,l,i=t.field;return n.jsx(Ct,xt({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(l=r.email)||void 0===l?void 0:l.message,placeholder:e.texts.emailPlaceholder,startAdornment:n.jsx(Ue.default,{position:"start",children:n.jsx(Ge.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}}}),n.jsx(R.Controller,{control:l,name:"password",render:function(t){var a,l,i,o=t.field;return n.jsx(Ct,xt({fullWidth:!0,type:"password",defaultValue:null!==(a=o.value)&&void 0!==a?a:"",value:null!==(l=o.value)&&void 0!==l?l:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(i=r.password)||void 0===i?void 0:i.message,startAdornment:n.jsx(Ue.default,{position:"start",children:n.jsx(He.default,{})})},o))},rules:{required:e.texts.passwordRequiredText}}),n.jsx(je.default,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),n.jsx(ce.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),n.jsxs(je.default,{variant:"subtitle2",style:{marginTop:5,textAlign:"center",padding:5},children:[e.texts.newUserText," ",n.jsx("span",{onClick:e.handleRouteToSignUp,style:{cursor:"pointer",color:"blue",textAlign:"center"},children:e.texts.signUpText})]}),n.jsx(_e.default,{}),n.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&n.jsx(Jt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&n.jsx(Jt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&n.jsx(Jt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};lr.propTypes={texts:xe.default.shape({emailLabel:xe.default.string,emailPlaceholder:xe.default.string,emailRequiredText:xe.default.string,emailInvalidText:xe.default.string,passwordLabel:xe.default.string,passwordPlaceholder:xe.default.string,passwordRequiredText:xe.default.string,forgotPasswordText:xe.default.string,newUserText:xe.default.string,signUpText:xe.default.string,signInText:xe.default.string,googleButtonLabel:xe.default.string,githubButtonLabel:xe.default.string,twitterButtonLabel:xe.default.string}),viaGoogle:xe.default.bool,viaGithub:xe.default.bool,viaTwitter:xe.default.bool,handleSignIn:xe.default.func,handleRouteToSignUp:xe.default.func,handleGoogleSignIn:xe.default.func,handleGithubSignIn:xe.default.func,handleTwitterSignIn:xe.default.func};var ir=function(e){return n.jsxs(be.default,{maxWidth:"xs",children:[n.jsx(Tt,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&n.jsx(Jt,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&n.jsx(Jt,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&n.jsx(Jt,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&n.jsx(Jt,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&n.jsx(Jt,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&n.jsx(Jt,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&n.jsx(Jt,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};ir.propTypes={viaMada:xe.default.bool,viaWallet:xe.default.bool,viaSTCPay:xe.default.bool,viaPayPal:xe.default.bool,viaApplePay:xe.default.bool,viaCreditCard:xe.default.bool,madaLabel:xe.default.string,stcPayLabel:xe.default.string,paypalLabel:xe.default.string,walletLabel:xe.default.string,applePayLabel:xe.default.string,visaMasterLabel:xe.default.string,handleMada:xe.default.func,handleWallet:xe.default.func,handleSTCPay:xe.default.func,handlePayPal:xe.default.func,handleApplePay:xe.default.func,handleCreditCard:xe.default.func};var or=function(t){var r=gt(e.useState(0),2),a=r[0],l=r[1],i=R.useForm();i.formState.errors;var o=i.handleSubmit,s=i.control;return n.jsxs(be.default,{maxWidth:"xs",children:[n.jsxs(je.default,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(a).toLocaleString("en")||"0",n.jsx(je.default,{children:t.currency||"SAR"})]}),n.jsx(R.FormProvider,xt(xt({},i),{},{children:n.jsxs("form",{onSubmit:o(t.handleChargeWallet),children:[n.jsx(R.Controller,{control:s,name:"amount",render:function(e){var r,a=e.field;return n.jsx(Ct,xt(xt({fullWidth:!0,placeholder:t.texts.amountLabel,type:"number",value:null!==(r=a.value)&&void 0!==r?r:""},a),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){a.onChange(parseFloat(e.target.value)),l(e.target.value)}}))}}),n.jsx(ce.default,{type:"submit",fullWidth:!0,variant:"last",onClick:t.handleSignIn,children:t.texts.chargeWallet})]})}))]})};or.propTypes={texts:xe.default.shape({amountLabel:xe.default.string,chargeWallet:xe.default.string}),handleChargeWallet:xe.default.func};var sr=function(e){var t,r,a,l,i,o,s,d,u,c,f="ar"===e.lang,x=R.useForm(),p=x.formState.errors,h=x.handleSubmit;x.register;var m=x.control,g={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return n.jsxs(be.default,{maxWidth:"sm",style:{direction:f?"rtl":"ltr"},children:[n.jsx(je.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),n.jsx(er,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),n.jsx(_e.default,{variant:"middle"}),n.jsx(je.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),n.jsx(R.FormProvider,xt(xt({},x),{},{children:n.jsxs("form",{onSubmit:h(e.handlePayNow),children:[n.jsxs(be.default,{sx:g,children:[n.jsx(R.Controller,{control:m,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,a,l,i=t.field;return n.jsx(Ct,xt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.firstNameLabel)+" *",helperText:null===(l=p.firstName)||void 0===l?void 0:l.message},i))}}),n.jsx("div",{style:{width:20}}),n.jsx(R.Controller,{control:m,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,a,l,i=t.field;return n.jsx(Ct,xt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.lastNameLabel)+" *",helperText:null===(l=p.lastName)||void 0===l?void 0:l.message},i))}})]}),n.jsx(R.Controller,{control:m,name:"email",render:function(t){var r,a,l,i=t.field;return n.jsx(Ct,xt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.emailLabel)+" *",helperText:null===(l=p.email)||void 0===l?void 0:l.message},i))},rules:{required:null===(a=e.texts)||void 0===a?void 0:a.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===(l=e.texts)||void 0===l?void 0:l.emailInvalidText}}}),n.jsxs(be.default,{sx:g,children:[n.jsx(R.Controller,{control:m,name:"streetAddress",rules:{required:null===(i=e.texts)||void 0===i?void 0:i.required},render:function(t){var r,a,l,i=t.field;return n.jsx(Ct,xt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.streetAddressLabel)+" *",helperText:null===(l=p.streetAddress)||void 0===l?void 0:l.message},i))}}),n.jsx("div",{style:{width:20}}),n.jsx(R.Controller,{control:m,name:"buildingNumber",rules:{required:null===(o=e.texts)||void 0===o?void 0:o.required},render:function(t){var r,a,l,i=t.field;return n.jsx(Ct,xt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.buildingNumberLabel)+" *",helperText:null===(l=p.buildingNumber)||void 0===l?void 0:l.message},i))}})]}),n.jsxs(be.default,{sx:g,children:[n.jsx(R.Controller,{control:m,name:"province",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,a,l,i=t.field;return n.jsx(Ct,xt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.stateLabel)+" *",helperText:null===(l=p.province)||void 0===l?void 0:l.message},i))}}),n.jsx("div",{style:{width:20}}),n.jsx(R.Controller,{control:m,name:"city",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,a,l,i=t.field;return n.jsx(Ct,xt({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.cityLabel)+" *",helperText:null===(l=p.city)||void 0===l?void 0:l.message},i))}})]}),n.jsxs(be.default,{sx:g,children:[n.jsx(R.Controller,{control:m,name:"zipCode",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,a,l,i=t.field;return n.jsx(Ct,xt({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.zipCodeLabel)+" *",helperText:null===(l=p.zipCode)||void 0===l?void 0:l.message},i))}}),n.jsx("div",{style:{width:20}}),n.jsx(R.Controller,{control:m,name:"country",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,a,l,i=t.field;return n.jsxs(Kt,xt(xt({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(a=i.value)&&void 0!==a?a:"",helperText:null===(l=p.country)||void 0===l?void 0:l.message,displayEmpty:!0,disableUnderline:!0,validators:["required"]},i),{},{children:[n.jsx("option",{}),e.countriesList.map((function(e,t){return n.jsx("option",{children:e},t)}))]}))}})]}),n.jsx(ce.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};sr.propTypes={texts:xe.default.shape({orderDetails:xe.default.string,billingAddress:xe.default.string,payNow:xe.default.string,emailLabel:xe.default.string,emailRequiredText:xe.default.string,emailInvalidText:xe.default.string,firstNameLabel:xe.default.string,required:xe.default.string,lastNameLabel:xe.default.string,streetAddressLabel:xe.default.string,buildingNumberLabel:xe.default.string,cityLabel:xe.default.string,stateLabel:xe.default.string,countryLabel:xe.default.string,zipCodeLabel:xe.default.string}),lang:xe.default.string,countriesList:xe.default.array,products:xe.default.array,total:xe.default.string,handlePayNow:xe.default.func};var dr=function(e){var t="ar"===e.lang;return n.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[n.jsxs(be.default,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[n.jsx(je.default,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),n.jsx(_e.default,{variant:"middle"}),n.jsxs(je.default,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",n.jsx("strong",{children:e.userEmail})]}),n.jsx(je.default,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),n.jsx(je.default,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),n.jsx(_e.default,{variant:"middle"}),e.products&&n.jsxs(n.Fragment,{children:[n.jsx(je.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),n.jsx(er,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),n.jsx(_e.default,{variant:"middle"})]}),n.jsx(ce.default,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),n.jsx(ce.default,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),n.jsx(ce.default,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),n.jsx(je.default,{align:"center",variant:"body2",style:{marginTop:10},children:e.texts.fasterPaymentNote})]}),n.jsx("a",{style:{marginTop:10,paddingTop:10,padding:5,cursor:"pointer"},onClick:e.handleRefundPolicyLink,children:n.jsx(je.default,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};dr.propTypes={texts:xe.default.shape({print:xe.default.string,history:xe.default.string,homePage:xe.default.string,successMessage:xe.default.string,orderDetails:xe.default.string,fasterPaymentNote:xe.default.string,billingAddress:xe.default.string,payNow:xe.default.string,yourOrderNumber:xe.default.string,emailLabel:xe.default.string,emailRequiredText:xe.default.string,emailInvalidText:xe.default.string,firstNameLabel:xe.default.string,required:xe.default.string,lastNameLabel:xe.default.string,streetAddressLabel:xe.default.string,buildingNumberLabel:xe.default.string,cityLabel:xe.default.string,stateLabel:xe.default.string,countryLabel:xe.default.string,zipCodeLabel:xe.default.string,refundPolicy:xe.default.string}),products:xe.default.array,countriesList:xe.default.array,lang:xe.default.string,total:xe.default.string,userEmail:xe.default.string,orderNumber:xe.default.string,confirmationTitle:xe.default.string,handleHome:xe.default.func,handlePrint:xe.default.func,handleHistory:xe.default.func,handleRefundPolicyLink:xe.default.func};var ur=function(e){var t=L.useTheme();return n.jsx(L.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 n.jsxs(L.MenuItem,{onClick:e.action,children:[e.icon&&n.jsx(e.icon,{}),n.jsx("div",{style:{width:10}}),n.jsx(L.Typography,{textAlign:"center",children:e.label})]},e.label)}))})};ur.propTypes={handleClose:xe.default.func,menuItems:xe.default.arrayOf(xe.default.shape({icon:xe.default.element,label:xe.default.string,action:xe.default.func}))};var cr=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},fr=function(e){return pt({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)")})},xr=M.styled("div")((function(e){var t=e.theme;return xt({display:"flex",alignItems:"center",justifyContent:"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),pr=M.styled(Xe.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return xt({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})})})),hr=M.styled(Ze.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return xt(xt({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&xt(xt({},cr(t)),{},{"& .MuiDrawer-paper":cr(t)})),!r&&xt(xt({},fr(t)),{},{"& .MuiDrawer-paper":fr(t)}))}));var mr=["children","onClose","hideClose"],gr=function(e){var t=e.children,r=e.onClose,a=e.hideClose,l=ht(e,mr);return n.jsxs(dt.default,xt(xt({sx:{m:0,p:2}},l),{},{children:[t,a?null:n.jsx(Ke.default,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:n.jsx(lt.default,{})})]}))};var vr=["Products","Pricing","Blog"];exports.ActionButton=function(e){return n.jsx(ce.default,xt(xt({},e),{},{children:e.text}))},exports.AdaptiveButton=bt,exports.Box=function(e){return n.jsx("div",{children:e.children})},exports.ChargeWalletForm=or,exports.CheckoutForm=sr,exports.ConfirmationPage=dr,exports.CreditCardForm=function(e){var t,r=R.useForm(),a=r.formState.errors,l=r.handleSubmit,i=r.control;return n.jsx(be.default,{maxWidth:"xs",children:n.jsxs("form",{onSubmit:l(e.handle),children:[n.jsx(Ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message}),n.jsx(R.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,n.jsx(Ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message})}}),n.jsx(R.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,n.jsx(Ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message})}}),n.jsx(R.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,n.jsx(Ct,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message})}}),n.jsx(ce.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},exports.HawaAccordian=tr,exports.HawaAlert=Qt,exports.HawaAppBar=function(e){var t=L.useTheme(),r=gt(de.default.useState(null),2),a=r[0],l=r[1],i=gt(de.default.useState(null),2),o=i[0],s=i[1],d=function(){l(null)};return console.log("theme is ",t),n.jsx(Xe.default,{position:"static",variant:"appbar",children:n.jsx(be.default,{maxWidth:"xl",variant:"appbar",children:n.jsxs(Ye.default,{disableGutters:!0,children:[n.jsx(je.default,{variant:"h6",noWrap:!0,component:"div",sx:{mr:2,display:{xs:"none",md:"flex"}},children:"LOGO"}),n.jsxs(Ve.default,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[n.jsx(Ke.default,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:e.handleOpenSideMenu,color:"inherit",children:n.jsx(Qe.default,{})}),n.jsx(ut.default,{id:"menu-appbar",anchorEl:a,anchorOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"left"},open:Boolean(a),onClose:d,sx:{display:{xs:"block",md:"none"}},children:vr.map((function(e){return n.jsx(ct.default,{onClick:d,children:n.jsx(je.default,{textAlign:"center",children:e})},e)}))})]}),n.jsx(je.default,{variant:"h6",noWrap:!0,component:"div",sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:"LOGO"}),n.jsx(Ve.default,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:vr.map((function(e){return n.jsx(ce.default,{onClick:d,sx:{my:2,display:"block"},children:e},e)}))}),n.jsxs(Ve.default,{sx:{flexGrow:0},children:[n.jsx(fe.default,{title:"Open settings",children:n.jsx(Ke.default,{onClick:function(e){s(e.currentTarget)},sx:{p:0},children:n.jsx(nt.default,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),n.jsx(ur,{anchor:o,handleClose:function(e){return s(null)},menuItems:e.accountMenu})]})]})})})},exports.HawaAppLayout=function(e){var t=M.useTheme(),r=gt(de.default.useState(!0),2),a=r[0],l=r[1],i=gt(de.default.useState(null),2);i[0],i[1];var o=gt(de.default.useState(null),2),s=o[0],d=o[1];return n.jsxs(Ve.default,{sx:{display:"flex"},children:[n.jsx(pr,{variant:"appbar",position:"fixed",open:a,children:n.jsxs(Ye.default,{variant:"appbar",children:[n.jsx(Ke.default,{color:"inherit","aria-label":"open drawer",onClick:function(){return l(!0)},edge:"start",sx:xt({marginRight:5},a&&{display:"none"}),children:n.jsx(Qe.default,{})}),n.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[n.jsx(je.default,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),n.jsxs(Ve.default,{children:[n.jsx(fe.default,{title:"Open settings",children:n.jsx(Ke.default,{onClick:function(e){return d(e.currentTarget)},sx:{p:0},children:n.jsx(nt.default,{})})}),n.jsx(ur,{menuItems:e.accountMenu,anchor:s,handleClose:function(){return d(null)}})]})]})]})}),n.jsxs(hr,{variant:"permanent",open:a,children:[n.jsxs(xr,{children:[e.logo,n.jsx(Ke.default,{onClick:function(){return l(!1)},children:"rtl"===t.direction?n.jsx(tt.default,{}):n.jsx(et.default,{})})]}),n.jsx(_e.default,{}),n.jsx(Je.default,{children:e.pages.map((function(t,r){var l,i;return n.jsx(fe.default,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:a?0:1}},children:n.jsxs(rt.default,{variant:(null===(l=e.pageName)||void 0===l?void 0:l.toLowerCase())===(null===(i=t.slug)||void 0===i?void 0:i.toLowerCase())&&"clicked",onClick:t.action,sx:{minHeight:48,justifyContent:a?"initial":"center",px:2.5},children:[n.jsx(t.icon,{}),n.jsx("div",{style:{width:20}}),n.jsx(at.default,{primary:t.text,sx:{opacity:a?1:0}})]},t.text)},r)}))})]}),n.jsxs(Ve.default,{sx:{flexGrow:1,p:3},children:[n.jsx(xr,{}),e.children]})]})},exports.HawaButton=function(e){return n.jsx(ce.default,xt(xt({},e),{},{children:e.children}))},exports.HawaCheckbox=function(e){return console.log("props : ",e),n.jsx(de.default.Fragment,{children:n.jsx(ge.default,{label:e.label,control:n.jsx(ve.default,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},exports.HawaColorPicker=Zt,exports.HawaDialog=function(t){var r=gt(e.useState(!1),2);return r[0],r[1],n.jsxs(it.default,xt(xt({},t),{},{variant:"main",children:[n.jsx(gr,{onClose:t.onClose,hideClose:t.hideClose,children:t.title}),n.jsx(st.default,{children:t.children}),n.jsx(ot.default,{children:t.actions})]}))},exports.HawaInputLabel=function(e){return n.jsx(Te.default,{children:n.jsx("div",{style:{fontSize:15},children:e.label})})},exports.HawaItemCard=yt,exports.HawaLogoButton=Jt,exports.HawaPricingCard=wt,exports.HawaRadio=jt,exports.HawaRange=Xt,exports.HawaSearchBar=function(e){return n.jsx(Ct,xt({endAdornment:n.jsx(L.InputAdornment,{position:"start",children:n.jsx(O.Search,{})})},e))},exports.HawaSelect=Kt,exports.HawaSettingsRow=Yt,exports.HawaSnackbar=function(e){return n.jsx(pe.default,{open:e.open,onClose:e.handleClose,children:n.jsxs(me.default,{icon:!1,severity:e.severity,children:[e.title&&n.jsx(he.default,{children:e.title}),e.text]})})},exports.HawaTable=er,exports.HawaTextArea=function(e){var t=Ht();return console.log("theme is ",t),n.jsx("label",{children:n.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=Tt,exports.NewPasswordForm=rr,exports.PayWithWallet=function(e){return n.jsxs(be.default,{maxWidth:"xs",children:[n.jsx(je.default,{align:"center",children:"Wallet Balance"}),n.jsxs(je.default,{align:"center",variant:"h1",children:[e.walletBalance||"0",n.jsx(je.default,{children:e.currency||"SAR"})]}),n.jsx(ce.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},exports.ResetPasswordForm=ar,exports.SelectPayment=ir,exports.SignInForm=lr,exports.SignUpForm=nr,exports.UserProfileForm=function(e){var t=R.useForm(),r=t.formState.errors,a=t.handleSubmit,l=t.control;return n.jsx(be.default,{maxWidth:"sm",children:n.jsx(R.FormProvider,xt(xt({},t),{},{children:n.jsxs("form",{onSubmit:a(e.handleUpdateProfile),children:[n.jsx(R.Controller,{control:l,name:"fullName",render:function(t){var a,l,i=t.field;return n.jsx(Ct,xt({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(l=r.fullName)||void 0===l?void 0:l.message},i))}}),n.jsx(R.Controller,{control:l,name:"phoneNumber",render:function(e){var t=e.field;return n.jsx(Ct,xt({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),n.jsx(R.Controller,{control:l,name:"email",render:function(t){var a,l,i=t.field;return n.jsx(Ct,xt({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(l=r.email)||void 0===l?void 0:l.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}}}),n.jsx(R.Controller,{control:l,name:"password",render:function(t){var a,l,i=t.field;return n.jsx(Ct,xt({fullWidth:!0,type:"password",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.passwordLabel,placeholder:e.texts.passwordPlaceholder,helperText:null===(l=r.password)||void 0===l?void 0:l.message},i))},rules:{required:e.texts.passwordRequiredText}}),n.jsx(R.Controller,{control:l,name:"confirmPassword",render:function(t){var a,l,i=t.field;return n.jsx(Ct,xt({fullWidth:!0,type:"password",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.confirmPasswordLabel,placeholder:e.texts.confirmPasswordPlaceholder,helperText:null===(l=r.confirmPassword)||void 0===l?void 0:l.message},i))},rules:{required:e.texts.confirmPasswordRequiredText}}),n.jsx(ce.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},exports.UserSettingsForm=function(e){return n.jsxs(be.default,{maxWidth:"sm",children:[e.children,n.jsx(ce.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"),a=require("prop-types"),l=require("react/jsx-runtime"),n=require("@mui/material/Snackbar"),i=require("@mui/material/AlertTitle"),s=require("@mui/material/Alert"),o=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/Chip"),p=require("@mui/material/Input"),h=require("@mui/material/InputLabel"),m=require("@mui/material/Switch"),g=require("@emotion/styled"),v=require("@mui/material/Slider"),b=require("@mui/material/Stack"),y=require("@mui/icons-material/GitHub"),j=require("@mui/icons-material/Twitter"),w=require("@mui/icons-material/AccountBalanceWallet"),T=require("@mui/material/Select"),C=require("@mui/material/Table"),P=require("@mui/material/TableBody"),q=require("@mui/material/TableCell"),k=require("@mui/material/TableContainer"),S=require("@mui/material/TableHead"),L=require("@mui/material/TableRow"),O=require("@mui/material"),W=require("@mui/icons-material"),A=require("@mui/icons-material/ExpandMore"),I=require("@mui/material/Accordion"),N=require("@mui/material/AccordionSummary"),R=require("@mui/material/AccordionDetails"),B=require("react-hook-form"),D=require("@mui/material/InputAdornment"),E=require("@mui/icons-material/HttpsOutlined"),z=require("@mui/icons-material/MailOutline"),F=require("@mui/icons-material/PermIdentityOutlined"),M=require("@mui/material/Divider"),U=require("@mui/material/styles"),H=require("@mui/material/Box"),_=require("@mui/material/Drawer"),G=require("@mui/material/AppBar"),$=require("@mui/material/Toolbar"),V=require("@mui/material/List"),Z=require("@mui/material/IconButton"),X=require("@mui/icons-material/Menu"),Y=require("@mui/icons-material/ChevronLeft"),J=require("@mui/icons-material/ChevronRight"),K=require("@mui/material/ListItemButton"),Q=require("@mui/material/ListItemText"),ee=require("@mui/material/Avatar"),te=require("@mui/material/Menu"),re=require("@mui/material/MenuItem"),ae=require("@mui/icons-material/Close"),le=require("@mui/material/Dialog"),ne=require("@mui/material/DialogActions"),ie=require("@mui/material/DialogContent"),se=require("@mui/material/DialogTitle");function oe(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function de(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var ue=oe(e),ce=de(e),fe=oe(t),xe=oe(r),pe=oe(a),he=oe(n),me=oe(i),ge=oe(s),ve=oe(o),be=oe(d),ye=oe(u),je=oe(c),we=oe(f),Te=oe(x),Ce=oe(p),Pe=oe(h),qe=oe(m),ke=oe(g),Se=oe(v),Le=oe(b),Oe=oe(y),We=oe(j),Ae=oe(w),Ie=oe(T),Ne=oe(C),Re=oe(P),Be=oe(q),De=oe(k),Ee=oe(S),ze=oe(L),Fe=oe(A),Me=oe(I),Ue=oe(N),He=oe(R),_e=oe(D),Ge=oe(E),$e=oe(z),Ve=oe(F),Ze=oe(M),Xe=oe(H),Ye=oe(_),Je=oe(G),Ke=oe($),Qe=oe(V),et=oe(Z),tt=oe(X),rt=oe(Y),at=oe(J),lt=oe(K),nt=oe(Q),it=oe(ee),st=oe(te),ot=oe(re),dt=oe(ae),ut=oe(le),ct=oe(ne),ft=oe(ie),xt=oe(se);function pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,a)}return r}function ht(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(r),!0).forEach((function(t){mt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function mt(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gt(e,t){if(null==e)return{};var r,a,l=function(e,t){if(null==e)return{};var r,a,l={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(l[r]=e[r]);return l}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(l[r]=e[r])}return l}function vt(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function bt(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 a,l,n=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(a=r.next()).done)&&(n.push(a.value),!t||n.length!==t);i=!0);}catch(e){s=!0,l=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw l}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return yt(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 yt(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 yt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,a=new Array(t);r<t;r++)a[r]=e[r];return a}var jt=function(e){return e.showText?l.jsxs(fe.default,{variant:"adaptive-dark",onClick:e.onClick,children:[e.icon,l.jsx("div",{style:{width:10}}),e.buttonText]}):l.jsx(xe.default,{title:e.buttonText,placement:"top",children:l.jsx(fe.default,{variant:"adaptive-dark",onClick:e.onClick,children:e.icon})})};jt.propTypes={buttonText:pe.default.string,onClick:pe.default.func,showText:pe.default.bool};var wt=function(t){var r=bt(e.useState(t.defaultValue),2),a=r[0],n=r[1];return l.jsx(ye.default,{variant:t.location||"panelTabs",children:t.options.map((function(e,r){var i;return l.jsx(fe.default,{onClick:function(){t.handleChange(e.value),n(e.value)},fullWidth:!0,variant:(null==a?void 0:a.toLowerCase())===(null===(i=e.value)||void 0===i?void 0:i.toLowerCase())?"selected":"unselected",children:e.label},r)}))})};wt.propTypes={lang:pe.default.string,options:pe.default.arrayOf(pe.default.shape({label:pe.default.string,value:pe.default.string})),defaultValue:pe.default.string,handleChange:pe.default.func,location:pe.default.string};var Tt=function(e){var t="ar"===e.lang;return l.jsxs(ye.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(ye.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(ye.default,{style:{zIndex:20},variant:"card-content",children:e.content}),e.actions&&l.jsx(ye.default,{style:{zIndex:20},variant:"card-actions",children:e.actions})]})};Tt.propTypes={lang:pe.default.string,onCardClick:pe.default.func};var Ct=function(e){var t,r,a="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"},s={usd:a?"دولار":"$",sar:a?"ريال":"SAR"},o=a?e.features_ar:e.features,d=a?{left:10}:{right:10};return l.jsxs(ye.default,{maxWidth:"xs",variant:e.selectedPlan?"selected-plan-card":"plan-card",style:{direction:a?"rtl":"ltr"},children:[l.jsxs(ye.default,{variant:"plan-header",children:[e.discount&&l.jsx(Te.default,{label:e.discount,variant:"standard",style:ht({maxWidth:"fit-content",position:"absolute",bottom:10},d),color:"success"}),l.jsx(je.default,{variant:"h3",fontWeight:500,children:a?e.title_ar:e.title}),l.jsx(je.default,{variant:"caption",children:a?e.subtitle_ar:e.subtitle}),l.jsx("br",{}),l.jsx(je.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(je.default,{children:s[null===(t=e.currency)||void 0===t?void 0:t.toLowerCase()]})]}),l.jsx(je.default,{style:{fontSize:14,margin:5},children:a?n[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(je.default,{children:s[null===(r=e.currency)||void 0===r?void 0:r.toLowerCase()]}),l.jsx("div",{style:{width:5}}),e.price]}),l.jsx(je.default,{style:{fontSize:14,margin:5},children:"ar"===e.lang?n[e.cycleText]:i[e.cycleText]})]})})]}),l.jsx("div",{style:{padding:20,color:e.selectedPlan?"white":"black"},children:null==o?void 0:o.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(we.default,{fontSize:"small"})}),l.jsx("div",{style:{width:10}}),l.jsx(je.default,{variant:"subtitle2",children:e})]})}))}),l.jsx(fe.default,{onClick:e.selectPlan,variant:e.selectedPlan?"outlined":"contained",style:{margin:20},children:e.buttonText})]})};Ct.propTypes={lang:pe.default.string,buttonText:pe.default.string,selectedPlan:pe.default.string,title:pe.default.string,title_ar:pe.default.string,subtitle:pe.default.string,subtitle_ar:pe.default.string,features:pe.default.array,features_ar:pe.default.array,currency:pe.default.oneOf(["sar","usd"]),cycleText:pe.default.oneOf(["monthly","3-months","6-months","annually"])};var Pt=function(e){return l.jsx(je.default,ht(ht({},e),{},{children:e.children}))},qt=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(Pe.default,{children:e.label}),e.helperText&&l.jsx(je.default,{style:{marginBottom:!e.label&&10},variant:"validation",children:e.helperText})]}),l.jsx(Ce.default,ht({disableUnderline:!0},e))]})})},kt=function(e){return l.jsx(qe.default,ht({},e))};var St="production"!==process.env.NODE_ENV?pe.default.oneOfType([pe.default.number,pe.default.string,pe.default.object,pe.default.array]):{};function Lt(){return Lt=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},Lt.apply(this,arguments)}function Ot(e){return null!==e&&"object"==typeof e&&e.constructor===Object}function Wt(e,t,r={clone:!0}){const a=r.clone?Lt({},e):e;return Ot(e)&&Ot(t)&&Object.keys(t).forEach((l=>{"__proto__"!==l&&(Ot(t[l])&&l in e&&Ot(e[l])?a[l]=Wt(e[l],t[l],r):a[l]=t[l])})),a}const At=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],It=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],Nt=[...At,...It];function Rt(e){return function(e,t,r,a){const l=(n=e,((i=t)&&"string"==typeof i?i.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),n):null)||r);var n,i;return"number"==typeof l?e=>"string"==typeof e?e:("production"!==process.env.NODE_ENV&&"number"!=typeof e&&console.error(`MUI: Expected ${a} 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,a,l={},n=Object.keys(e);for(a=0;a<n.length;a++)r=n[a],t.indexOf(r)>=0||(l[r]=e[r]);return l}"production"===process.env.NODE_ENV||At.reduce(((e,t)=>(e[t]=St,e)),{}),"production"===process.env.NODE_ENV||It.reduce(((e,t)=>(e[t]=St,e)),{}),"production"===process.env.NODE_ENV||Nt.reduce(((e,t)=>(e[t]=St,e)),{});const Dt=["values","unit","step"];function Et(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:a=5}=e,l=Bt(e,Dt),n=(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)=>Lt({},e,{[t.key]:t.val})),{})})(t),i=Object.keys(n);function s(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r})`}function o(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-a/100}${r})`}function d(e,l){const n=i.indexOf(l);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${r}) and (max-width:${(-1!==n&&"number"==typeof t[i[n]]?t[i[n]]:l)-a/100}${r})`}return Lt({keys:i,values:n,up:s,down:o,between:d,only:function(e){return i.indexOf(e)+1<i.length?d(e,i[i.indexOf(e)+1]):s(e)},not:function(e){const t=i.indexOf(e);return 0===t?s(i[1]):t===i.length-1?o(i[t]):d(e,i[i.indexOf(e)+1]).replace("@media","@media not all and")},unit:r},l)}var zt={borderRadius:4};const Ft=["breakpoints","palette","spacing","shape"];const Mt=ce.createContext(null);"production"!==process.env.NODE_ENV&&(Mt.displayName="ThemeContext");var Ut=Mt;function Ht(e=null){const t=function(){const e=ce.useContext(Ut);return"production"!==process.env.NODE_ENV&&ce.useDebugValue(e),e}();return t&&(r=t,0!==Object.keys(r).length)?t:e;var r}const _t=function(e={},...t){const{breakpoints:r={},palette:a={},spacing:l,shape:n={}}=e,i=Bt(e,Ft),s=Et(r),o=function(e=8){if(e.mui)return e;const t=Rt({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=Wt({breakpoints:s,direction:"ltr",components:{},palette:Lt({mode:"light"},a),spacing:o,shape:Lt({},zt,n)},i);return d=t.reduce(((e,t)=>Wt(e,t)),d),d}();function Gt(e=_t){return Ht(e)}var $t,Vt,Zt=ke.default.input($t||($t=vt(["\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})),Xt=ke.default.input(Vt||(Vt=vt(["\n max-width: 70px;\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})),Yt=function(e){var t=Gt();return l.jsxs("div",{style:{display:"flex",flexDirection:"row"},children:[l.jsx(Xt,{type:"text",value:e.color,borderRadius:t.allBorderRadius,onChange:e.handleChange}),l.jsx("div",{style:{width:10}}),l.jsx(Zt,{type:"color",value:e.color,onChange:e.handleChange,borderRadius:t.allBorderRadius})]})};Yt.propTypes={color:pe.default.string,handleChange:pe.default.func};var Jt=function(e){return l.jsxs(Le.default,{spacing:2,direction:"row",alignItems:"center",style:e.style,children:[e.startElement,l.jsx(Se.default,{size:"small","aria-label":"Volume",value:e.value,onChange:e.handleChange}),e.endElement]})};Jt.propTypes={startElement:pe.default.element,endElement:pe.default.element,handleChange:pe.default.func};var Kt=function(e){return l.jsxs(ye.default,{variant:"settingsRow",children:[l.jsx(Pt,{children:e.settingsLabel}),"checkbox"===e.settingsType&&l.jsx(be.default,ht({},e)),"text"===e.settingsType&&l.jsx(qt,ht({},e)),"boolean"===e.settingsType&&l.jsx(kt,ht({},e)),"range"===e.settingsType&&l.jsx(Jt,ht({},e)),"color"===e.settingsType&&l.jsx(Yt,ht({},e)),"radio"===e.settingsType&&l.jsx(wt,ht({location:"inSettings"},e))]})};Kt.propTypes={settingsLabel:pe.default.string,settingsType:pe.default.oneOf(["checkbox","text","radio","boolean","color"])};var Qt=function(e){var t,r="ar"===e.lang,a="";switch(null===(t=e.logo)||void 0===t?void 0:t.toLowerCase()){case"google":a=l.jsx("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"});break;case"github":a=l.jsx(Oe.default,{});break;case"twitter":a=l.jsx(We.default,{});break;case"mada":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20});break;case"stcpay":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20});break;case"visa/master":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30});break;case"paypal":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25});break;case"googlepay":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20});break;case"applepay":a=l.jsx("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40});break;case"wallet":a=l.jsx(Ae.default,{})}return l.jsxs(fe.default,ht(ht({style:{direction:r?"rtl":"ltr"}},e),{},{variant:"withLogo",children:[a,l.jsx("div",{style:{width:10}}),l.jsx(je.default,{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))};Qt.propTypes={lang:pe.default.string,logo:pe.default.oneOf(["google","github","twitter","wallet","googlepay","applepay","stcpay","visa/master","paypal","mada"]),buttonText:pe.default.string};var er=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(Pe.default,{children:e.label}),e.helperText&&l.jsx(je.default,{variant:"validation",children:e.helperText})]}),l.jsx(Ie.default,ht(ht({},e),{},{children:e.children}))]})},tr=function(e){return l.jsxs(ge.default,{severity:e.severity,icon:e.hideIcon,children:[e.title&&l.jsx(me.default,{children:e.title}),e.text]})};tr.propTypes={severity:pe.default.oneOf(["error","info","success","warning"]),title:pe.default.string,text:pe.default.string,hideIcon:pe.default.bool};var rr=function(e){var t="ar"===e.lang;return l.jsx(De.default,{style:{direction:t?"rtl":"ltr"},children:l.jsxs(Ne.default,{"aria-label":"a dense table",children:[l.jsx(Ee.default,{children:l.jsxs(ze.default,{children:[e.columns.map((function(e,r){return l.jsx(Be.default,{align:t?"right":"left",style:{fontWeight:700},variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&l.jsx(Be.default,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:"Actions"})]})}),l.jsx(Re.default,{children:e.rows?e.rows.map((function(r,a){return l.jsxs(ze.default,{children:[r.map((function(e,r){return l.jsx(Be.default,{align:t?"right":"left",component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)})),e.actions&&l.jsx(Be.default,{align:t?"right":"left",style:{fontWeight:700},variant:t?"borderedRight":"borderedLeft",children:e.actions.map((function(t){return l.jsx(O.Button,{style:{margin:2},variant:"outlined",size:"small",onClick:function(){return e.handleActionClick(r)},children:t})}))})]},a)})):l.jsx(ze.default,{align:"center",children:l.jsx(Be.default,{align:"center",component:"th",colSpan:6,children:e.noDataText})})}),e.end&&l.jsx(ze.default,{children:e.end.map((function(e,r){return l.jsx(Be.default,{align:t?"right":"left",style:{fontWeight:700},component:"th",scope:"row",variant:r>0?t?"borderedRight":"borderedLeft":"body",children:e},r)}))})]})})};rr.propTypes={handleActionClick:pe.default.func,noDataText:pe.default.string,lang:pe.default.string,columns:pe.default.array,rows:pe.default.array,end:pe.default.array};var ar=function(e){return l.jsxs(Me.default,{elevation:0,children:[l.jsx(Ue.default,{expandIcon:l.jsx(Fe.default,{}),"aria-controls":"panel1a-content",id:"panel1a-header",children:l.jsx(je.default,{children:e.title})}),l.jsx(He.default,{children:l.jsxs(je.default,{children:[e.content," "]})})]})};ar.propTypes={title:pe.default.string,content:pe.default.string};var lr=function(t){var r=bt(e.useState(!1),2),a=r[0],n=r[1],i=B.useForm(),s=i.formState.errors,o=i.handleSubmit,d=i.control;return l.jsxs(ye.default,{maxWidth:"xs",variant:"auth",children:[a&&l.jsx(tr,{text:t.texts.passwordMatchError,severity:"error"}),t.passwordChanged?l.jsx(Pt,{style:{textAlign:"center",margin:5},children:t.texts.passwordChanged}):l.jsx(B.FormProvider,ht(ht({},i),{},{children:l.jsxs("form",{onSubmit:o((function(e){console.log("handling subb",e),e.password===e.confirmPassword?t.handleNewPassword():n(!0)})),children:[l.jsx(B.Controller,{control:d,name:"password",render:function(e){var r,a,n=e.field;return l.jsx(qt,ht({fullWidth:!0,type:"password",value:null!==(r=n.value)&&void 0!==r?r:"",label:t.texts.passwordLabel,placeholder:t.texts.passwordPlaceholder,helperText:null===(a=s.password)||void 0===a?void 0:a.message,startAdornment:l.jsx(_e.default,{position:"start",children:l.jsx(Ge.default,{})})},n))},rules:{required:t.texts.passwordRequiredText}}),l.jsx(B.Controller,{control:d,name:"confirmPassword",render:function(e){var r,a,n=e.field;return l.jsx(qt,ht({fullWidth:!0,type:"password",value:null!==(r=n.value)&&void 0!==r?r:"",label:t.texts.confirmPasswordLabel,placeholder:t.texts.confirmPasswordPlaceholder,helperText:null===(a=s.confirmPassword)||void 0===a?void 0:a.message,startAdornment:l.jsx(_e.default,{position:"start",children:l.jsx(Ge.default,{})})},n))},rules:{required:t.texts.confirmPasswordRequiredText}}),l.jsx(fe.default,{type:"submit",fullWidth:!0,variant:"last",children:t.texts.updatePassword})]})}))]})};lr.propTypes={texts:pe.default.shape({emailLabel:pe.default.string,emailPlaceholder:pe.default.string,emailRequiredText:pe.default.string,passwordPlaceholder:pe.default.string,updatePassword:pe.default.string,passwordRequiredText:pe.default.string,passwordLabel:pe.default.string,confirmPasswordPlaceholder:pe.default.string,confirmPasswordLabel:pe.default.string,confirmPasswordRequiredText:pe.default.string,passwordMatchError:pe.default.string,forgotPasswordText:pe.default.string,passwordChanged:pe.default.string}),passwordChanged:pe.default.bool,handleNewPassword:pe.default.func};var nr=function(e){var t=B.useForm(),r=t.formState.errors,a=t.handleSubmit;t.register;var n=t.control;return l.jsx(ye.default,{maxWidth:"xs",variant:"auth",children:e.sent?l.jsx(Pt,{style:{textAlign:"center",margin:5},children:e.texts.emailSentText}):l.jsxs("form",{onSubmit:a(e.handleResetPassword),children:[l.jsx(B.Controller,{control:n,name:"email",render:function(t){var a,n,i=t.field;return l.jsx(qt,ht({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx(_e.default,{position:"start",children:l.jsx($e.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(fe.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.resetPassword})]})})};nr.propTypes={texts:pe.default.shape({emailLabel:pe.default.string,emailPlaceholder:pe.default.string,emailRequiredText:pe.default.string,emailInvalidText:pe.default.string,emailSentText:pe.default.string,resetPassword:pe.default.string}),sent:pe.default.bool,handleResetPassword:pe.default.func};var ir=function(e){var t=B.useForm(),r=t.formState.errors,a=t.handleSubmit,n=t.control;return l.jsxs(ye.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&l.jsx(tr,{title:e.errorTitle,text:e.errorText,severity:"error"}),l.jsx(B.FormProvider,ht(ht({},t),{},{children:l.jsxs("form",{onSubmit:a(e.handleSignUp),children:[l.jsx(B.Controller,{control:n,name:"fullName",render:function(t){var a,n,i=t.field;return l.jsx(qt,{fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(n=r.fullName)||void 0===n?void 0:n.message,startAdornment:l.jsx(_e.default,{position:"start",children:l.jsx(Ve.default,{})})})},rules:{required:e.texts.fullNameRequiredText}}),l.jsx(B.Controller,{control:n,name:"email",render:function(t){var a,n,i=t.field;return l.jsx(qt,{fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx(_e.default,{position:"start",children:l.jsx($e.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(B.Controller,{control:n,name:"password",render:function(t){var a,n,i,s=t.field;return l.jsx(qt,ht({fullWidth:!0,type:"password",defaultValue:null!==(a=s.value)&&void 0!==a?a:"",value:null!==(n=s.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:l.jsx(_e.default,{position:"start",children:l.jsx(Ge.default,{})})},s))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(fe.default,{fullWidth:!0,variant:"last",type:"submit",children:e.texts.signUpText})]})})),l.jsxs(je.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(Ze.default,{}),l.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&l.jsx(Qt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignUp}),e.viaGithub&&l.jsx(Qt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignUp}),e.viaTwitter&&l.jsx(Qt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignUp})]})]})};ir.propTypes={texts:pe.default.shape({fullNameLabel:pe.default.string,fullNamePlaceholder:pe.default.string,fullNameRequiredText:pe.default.string,emailLabel:pe.default.string,emailPlaceholder:pe.default.string,emailRequiredText:pe.default.string,emailInvalidText:pe.default.string,passwordLabel:pe.default.string,passwordPlaceholder:pe.default.string,passwordRequiredText:pe.default.string,passwordTooShortText:pe.default.string,forgotPasswordText:pe.default.string,newUserText:pe.default.string,signUpText:pe.default.string,signInText:pe.default.string,existingUserText:pe.default.string,googleButtonLabel:pe.default.string,githubButtonLabel:pe.default.string,twitterButtonLabel:pe.default.string}),viaGoogle:pe.default.bool,viaGithub:pe.default.bool,viaTwitter:pe.default.bool,handleSignUp:pe.default.func,handleRouteToSignIn:pe.default.func,handleGoogleSignUp:pe.default.func,handleGithubSignUp:pe.default.func,handleTwitterSignUp:pe.default.func};var sr=function(e){var t=B.useForm(),r=t.formState.errors,a=t.handleSubmit,n=t.control;return l.jsxs(ye.default,{maxWidth:"xs",variant:"auth",style:{direction:"ar"===e.lang?"rtl":"ltr"},children:[e.showError&&l.jsx(tr,{title:e.errorTitle,text:e.errorText,severity:"error"}),l.jsxs("form",{onSubmit:a(e.handleSignIn),children:[l.jsx(B.Controller,{control:n,name:"email",render:function(t){var a,n,i=t.field;return l.jsx(qt,ht({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.emailLabel,helperText:null===(n=r.email)||void 0===n?void 0:n.message,placeholder:e.texts.emailPlaceholder,startAdornment:l.jsx(_e.default,{position:"start",children:l.jsx($e.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(B.Controller,{control:n,name:"password",render:function(t){var a,n,i,s=t.field;return l.jsx(qt,ht({fullWidth:!0,type:"password",defaultValue:null!==(a=s.value)&&void 0!==a?a:"",value:null!==(n=s.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:l.jsx(_e.default,{position:"start",children:l.jsx(Ge.default,{})})},s))},rules:{required:e.texts.passwordRequiredText}}),l.jsx(je.default,{style:{cursor:"pointer",marginTop:5,width:"max-content",fontSize:15,padding:5},onClick:e.handleForgotPassword,children:e.texts.forgotPasswordText}),l.jsx(fe.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.signInText})]}),l.jsxs(je.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(Ze.default,{}),l.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.viaGoogle&&l.jsx(Qt,{logo:"google",buttonText:e.texts.googleButtonLabel,onClick:e.handleGoogleSignIn}),e.viaGithub&&l.jsx(Qt,{logo:"github",buttonText:e.texts.githubButtonLabel,onClick:e.handleGithubSignIn}),e.viaTwitter&&l.jsx(Qt,{logo:"twitter",buttonText:e.texts.twitterButtonLabel,onClick:e.handleTwitterSignIn})]})]})};sr.propTypes={texts:pe.default.shape({emailLabel:pe.default.string,emailPlaceholder:pe.default.string,emailRequiredText:pe.default.string,emailInvalidText:pe.default.string,passwordLabel:pe.default.string,passwordPlaceholder:pe.default.string,passwordRequiredText:pe.default.string,forgotPasswordText:pe.default.string,newUserText:pe.default.string,signUpText:pe.default.string,signInText:pe.default.string,googleButtonLabel:pe.default.string,githubButtonLabel:pe.default.string,twitterButtonLabel:pe.default.string}),viaGoogle:pe.default.bool,viaGithub:pe.default.bool,viaTwitter:pe.default.bool,handleSignIn:pe.default.func,handleRouteToSignUp:pe.default.func,handleGoogleSignIn:pe.default.func,handleGithubSignIn:pe.default.func,handleTwitterSignIn:pe.default.func};var or=function(e){return l.jsxs(ye.default,{maxWidth:"xs",children:[l.jsx(Pt,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&l.jsx(Qt,{logo:"wallet",buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&l.jsx(Qt,{logo:"visa/master",buttonText:e.visaMasterLabel,onClick:e.handleCreditCard}),e.viaMada&&l.jsx(Qt,{logo:"mada",buttonText:e.madaLabel,onClick:e.handleMada}),e.viaSTCPay&&l.jsx(Qt,{logo:"stcpay",buttonText:e.stcPayLabel,onClick:e.handleSTCPay}),e.viaPayPal&&l.jsx(Qt,{logo:"paypal",buttonText:e.paypalLabel,onClick:e.handlePayPal}),e.viaGooglePay&&l.jsx(Qt,{logo:"googlepay",buttonText:e.googlePayLabel,onClick:e.handleGooglePay}),e.viaApplePay&&l.jsx(Qt,{logo:"applepay",buttonText:e.applePayLabel,onClick:e.handleApplePay})]})};or.propTypes={viaMada:pe.default.bool,viaWallet:pe.default.bool,viaSTCPay:pe.default.bool,viaPayPal:pe.default.bool,viaApplePay:pe.default.bool,viaCreditCard:pe.default.bool,madaLabel:pe.default.string,stcPayLabel:pe.default.string,paypalLabel:pe.default.string,walletLabel:pe.default.string,applePayLabel:pe.default.string,visaMasterLabel:pe.default.string,handleMada:pe.default.func,handleWallet:pe.default.func,handleSTCPay:pe.default.func,handlePayPal:pe.default.func,handleApplePay:pe.default.func,handleCreditCard:pe.default.func};var dr=function(t){var r=bt(e.useState(0),2),a=r[0],n=r[1],i=B.useForm(),s=i.formState.errors,o=i.handleSubmit,d=i.control;return l.jsxs(ye.default,{maxWidth:"xs",children:[l.jsxs(je.default,{align:"center",variant:"h2",fontWeight:500,style:{marginBottom:20},children:[Number(a).toLocaleString("en")||"0",l.jsx(je.default,{children:t.currency||"SAR"})]}),l.jsx(B.FormProvider,ht(ht({},i),{},{children:l.jsxs("form",{onSubmit:o(t.handleChargeWallet),children:[l.jsx(B.Controller,{control:d,name:"amount",render:function(e){var r,a,i=e.field;return l.jsx(qt,ht(ht({fullWidth:!0,placeholder:t.texts.amountLabel,type:"number",value:null!==(r=i.value)&&void 0!==r?r:""},i),{},{inputProps:{inputMode:"numeric",min:"1",max:"9999999",step:"0.01"},onChange:function(e){i.onChange(parseFloat(e.target.value)),n(e.target.value)},helperText:null===(a=s.amount)||void 0===a?void 0:a.message}))},rules:{required:t.texts.amountRequired}}),l.jsx(fe.default,{type:"submit",fullWidth:!0,variant:"last",children:t.texts.chargeWallet})]})}))]})};dr.propTypes={texts:pe.default.shape({amountLabel:pe.default.string,chargeWallet:pe.default.string,amountRequired:pe.default.string}),handleChargeWallet:pe.default.func,currency:pe.default.string};var ur=function(e){var t,r,a,n,i,s,o,d,u,c,f="ar"===e.lang,x=B.useForm(),p=x.formState.errors,h=x.handleSubmit;x.register;var m=x.control,g={display:"flex",padding:0,paddingRight:"0px !important",paddingLeft:"0px !important",flexDirection:{xs:"column",sm:"row",md:"row",lg:"row",xl:"row"}};return l.jsxs(ye.default,{maxWidth:"sm",style:{direction:f?"rtl":"ltr"},children:[l.jsx(je.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),l.jsx(rr,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),l.jsx(Ze.default,{variant:"middle"}),l.jsx(je.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.billingAddress}),l.jsx(B.FormProvider,ht(ht({},x),{},{children:l.jsxs("form",{onSubmit:h(e.handlePayNow),children:[l.jsxs(ye.default,{sx:g,children:[l.jsx(B.Controller,{control:m,name:"firstName",rules:{required:null===(t=e.texts)||void 0===t?void 0:t.required},render:function(t){var r,a,n,i=t.field;return l.jsx(qt,ht({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.firstNameLabel)+" *",helperText:null===(n=p.firstName)||void 0===n?void 0:n.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(B.Controller,{control:m,name:"lastName",rules:{required:null===(r=e.texts)||void 0===r?void 0:r.required},render:function(t){var r,a,n,i=t.field;return l.jsx(qt,ht({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.lastNameLabel)+" *",helperText:null===(n=p.lastName)||void 0===n?void 0:n.message},i))}})]}),l.jsx(B.Controller,{control:m,name:"email",render:function(t){var r,a,n,i=t.field;return l.jsx(qt,ht({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.emailLabel)+" *",helperText:null===(n=p.email)||void 0===n?void 0:n.message},i))},rules:{required:null===(a=e.texts)||void 0===a?void 0:a.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}}}),l.jsxs(ye.default,{sx:g,children:[l.jsx(B.Controller,{control:m,name:"streetAddress",rules:{required:null===(i=e.texts)||void 0===i?void 0:i.required},render:function(t){var r,a,n,i=t.field;return l.jsx(qt,ht({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.streetAddressLabel)+" *",helperText:null===(n=p.streetAddress)||void 0===n?void 0:n.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(B.Controller,{control:m,name:"buildingNumber",rules:{required:null===(s=e.texts)||void 0===s?void 0:s.required},render:function(t){var r,a,n,i=t.field;return l.jsx(qt,ht({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.buildingNumberLabel)+" *",helperText:null===(n=p.buildingNumber)||void 0===n?void 0:n.message},i))}})]}),l.jsxs(ye.default,{sx:g,children:[l.jsx(B.Controller,{control:m,name:"province",rules:{required:null===(o=e.texts)||void 0===o?void 0:o.required},render:function(t){var r,a,n,i=t.field;return l.jsx(qt,ht({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.stateLabel)+" *",helperText:null===(n=p.province)||void 0===n?void 0:n.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(B.Controller,{control:m,name:"city",rules:{required:null===(d=e.texts)||void 0===d?void 0:d.required},render:function(t){var r,a,n,i=t.field;return l.jsx(qt,ht({inForm:!0,fullWidth:!0,type:"text",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.cityLabel)+" *",helperText:null===(n=p.city)||void 0===n?void 0:n.message},i))}})]}),l.jsxs(ye.default,{sx:g,children:[l.jsx(B.Controller,{control:m,name:"zipCode",rules:{required:null===(u=e.texts)||void 0===u?void 0:u.required},render:function(t){var r,a,n,i=t.field;return l.jsx(qt,ht({inForm:!0,fullWidth:!0,type:"number",variant:"unscrollable",value:null!==(r=i.value)&&void 0!==r?r:"",label:(null===(a=e.texts)||void 0===a?void 0:a.zipCodeLabel)+" *",helperText:null===(n=p.zipCode)||void 0===n?void 0:n.message},i))}}),l.jsx("div",{style:{width:20}}),l.jsx(B.Controller,{control:m,name:"country",rules:{required:null===(c=e.texts)||void 0===c?void 0:c.required},render:function(t){var r,a,n,i=t.field;return l.jsxs(er,ht(ht({fullWidth:!0,native:!0,label:(null===(r=e.texts)||void 0===r?void 0:r.countryLabel)+" *",variant:"standard",value:null!==(a=i.value)&&void 0!==a?a:"",helperText:null===(n=p.country)||void 0===n?void 0:n.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(fe.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.payNow})]})}))]})};ur.propTypes={texts:pe.default.shape({orderDetails:pe.default.string,billingAddress:pe.default.string,payNow:pe.default.string,emailLabel:pe.default.string,emailRequiredText:pe.default.string,emailInvalidText:pe.default.string,firstNameLabel:pe.default.string,required:pe.default.string,lastNameLabel:pe.default.string,streetAddressLabel:pe.default.string,buildingNumberLabel:pe.default.string,cityLabel:pe.default.string,stateLabel:pe.default.string,countryLabel:pe.default.string,zipCodeLabel:pe.default.string}),lang:pe.default.string,countriesList:pe.default.array,products:pe.default.array,total:pe.default.string,handlePayNow:pe.default.func};var cr=function(e){var t="ar"===e.lang;return l.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[l.jsxs(ye.default,{maxWidth:"sm",style:{direction:t?"rtl":"ltr"},children:[l.jsx(je.default,{align:"center",variant:"h3",fontWeight:400,style:{marginBottom:10},children:e.confirmationTitle}),l.jsx(Ze.default,{variant:"middle"}),l.jsxs(je.default,{align:"center",variant:"body1",style:{marginBottom:10},children:[e.texts.successMessage," ",l.jsx("strong",{children:e.userEmail})]}),l.jsx(je.default,{align:"center",variant:"body1",children:e.texts.yourOrderNumber}),l.jsx(je.default,{align:"center",variant:"body1",fontWeight:700,style:{marginBottom:10},children:e.orderNumber}),l.jsx(Ze.default,{variant:"middle"}),e.products&&l.jsxs(l.Fragment,{children:[l.jsx(je.default,{align:"center",variant:"h5",fontWeight:500,style:{marginBottom:10},children:e.texts.orderDetails}),l.jsx(rr,{lang:e.lang,columns:["Product","Price"],rows:e.products,end:["Total",e.total]}),l.jsx(Ze.default,{variant:"middle"})]}),l.jsx(fe.default,{onClick:e.handlePrint,variant:"contained",children:e.texts.print}),l.jsx(fe.default,{onClick:e.handleHistory,variant:"last",children:e.texts.history}),l.jsx(fe.default,{onClick:e.handleHome,variant:"last",children:e.texts.homePage}),l.jsx(je.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(je.default,{align:"center",variant:"caption",fontWeight:500,children:e.texts.refundPolicy})})]})};cr.propTypes={texts:pe.default.shape({print:pe.default.string,history:pe.default.string,homePage:pe.default.string,successMessage:pe.default.string,orderDetails:pe.default.string,fasterPaymentNote:pe.default.string,billingAddress:pe.default.string,payNow:pe.default.string,yourOrderNumber:pe.default.string,emailLabel:pe.default.string,emailRequiredText:pe.default.string,emailInvalidText:pe.default.string,firstNameLabel:pe.default.string,required:pe.default.string,lastNameLabel:pe.default.string,streetAddressLabel:pe.default.string,buildingNumberLabel:pe.default.string,cityLabel:pe.default.string,stateLabel:pe.default.string,countryLabel:pe.default.string,zipCodeLabel:pe.default.string,refundPolicy:pe.default.string}),products:pe.default.array,countriesList:pe.default.array,lang:pe.default.string,total:pe.default.string,userEmail:pe.default.string,orderNumber:pe.default.string,confirmationTitle:pe.default.string,handleHome:pe.default.func,handlePrint:pe.default.func,handleHistory:pe.default.func,handleRefundPolicyLink:pe.default.func};var fr=function(t){var r=bt(e.useState("sar"),2),a=r[0],n=r[1],i=bt(e.useState("monthly"),2),s=i[0],o=i[1];return l.jsxs(ye.default,{style:{width:"fit-content"},variant:"plain",children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",marginBottom:10},children:[l.jsx(wt,{location:"inPricing",handleChange:function(e){return o(e)},defaultValue:"monthly",options:[{label:"Monthly",value:"monthly"},{label:"3 Months",value:"3-months"},{label:"6 Months",value:"6-months"},{label:"Annually",value:"annually"}]}),l.jsx(wt,{location:"inPricing",handleChange:function(e){n(e)},defaultValue:"sar",options:[{label:"USD",value:"usd"},{label:"SAR",value:"sar"}]})]}),l.jsx(ye.default,{variant:"pricing",children:t.plans.map((function(e){return l.jsx(Ct,ht(ht({lang:t.lang},e),{},{currency:a,cycleText:s}))}))})]})};fr.propTypes={plans:pe.default.arrayOf(pe.default.shape({title:pe.default.string,title_ar:pe.default.string,subtitle:pe.default.string,subtitle_ar:pe.default.string,price:pe.default.number,currency:pe.default.string,cycleText:pe.default.string,buttonText:pe.default.string,features:pe.default.array,features_ar:pe.default.array,selectedPlan:pe.default.bool})),lang:pe.default.string};var xr=function(e){var t=O.useTheme();return l.jsx(st.default,{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(ot.default,{onClick:e.action,children:[e.icon&&l.jsx(e.icon,{}),e.icon&&l.jsx("div",{style:{width:10}}),l.jsx(je.default,{textAlign:"center",children:e.label})]},e.label)}))})};xr.propTypes={anchor:pe.default.any,handleClose:pe.default.func,menuItems:pe.default.arrayOf(pe.default.shape({icon:pe.default.element,label:pe.default.string,action:pe.default.func}))};var pr=function(e){return{width:240,transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.enteringScreen}),overflowX:"hidden"}},hr=function(e){return mt({transition:e.transitions.create("width",{easing:e.transitions.easing.sharp,duration:e.transitions.duration.leavingScreen}),overflowX:"hidden",width:"calc(".concat(e.spacing(8)," + 1px)")},e.breakpoints.up("sm"),{width:"calc(".concat(e.spacing(8)," + 1px)")})},mr=U.styled("div")((function(e){var t=e.theme;return ht({display:"flex",alignItems:"center",justifyContent:"rtl"===e.direction?"flex-start":"flex-end",padding:t.spacing(0,1)},t.mixins.toolbar)})),gr=U.styled(Je.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open,a=e.direction;return ht({zIndex:t.zIndex.drawer+1,transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen})},r&&{marginLeft:"rtl"===a?0:240,marginRight:"rtl"===a?240:0,width:"calc(100% - ".concat(240,"px)"),transition:t.transitions.create(["width","margin"],{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen})})})),vr=U.styled(Ye.default,{shouldForwardProp:function(e){return"open"!==e}})((function(e){var t=e.theme,r=e.open;return ht(ht({width:240,flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box"},r&&ht(ht({},pr(t)),{},{"& .MuiDrawer-paper":pr(t)})),!r&&ht(ht({},hr(t)),{},{"& .MuiDrawer-paper":hr(t)}))}));var br=["children","onClose","hideClose"],yr=function(e){var t=e.children,r=e.onClose,a=e.hideClose,n=gt(e,br);return l.jsxs(xt.default,ht(ht({sx:{m:0,p:2}},n),{},{children:[t,a?null:l.jsx(et.default,{"aria-label":"close",onClick:r,sx:{position:"absolute",right:8,top:8,color:function(e){return e.palette.grey[500]}},children:l.jsx(dt.default,{})})]}))};var jr=function(e){var t=O.useTheme(),r=bt(ue.default.useState(null),2),a=r[0],n=r[1],i=bt(ue.default.useState(null),2),s=i[0],o=i[1],d=function(){return n(null)};return console.log("theme is ",t),l.jsx(Je.default,{position:"static",variant:"appbar",children:l.jsx(ye.default,{variant:"appbar",children:l.jsxs(Ke.default,{disableGutters:!0,children:[l.jsx(Xe.default,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.logo}),l.jsxs(Xe.default,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:[l.jsx(et.default,{size:"large","aria-label":"account of current user","aria-controls":"menu-appbar","aria-haspopup":"true",onClick:function(e){return n(e.currentTarget)},color:"inherit",children:l.jsx(tt.default,{})}),l.jsx(xr,{anchor:a,handleClose:d,menuItems:e.pages})]}),l.jsx(Xe.default,{sx:{flexGrow:1,display:{xs:"flex",md:"none"}},children:e.logo}),l.jsx(Xe.default,{sx:{flexGrow:1,display:{xs:"none",md:"flex"}},children:e.pages.map((function(e){return l.jsx(fe.default,{onClick:d,sx:{my:2,display:"block"},children:e.label},e)}))}),l.jsxs(Xe.default,{sx:{flexGrow:0},children:[l.jsx(xe.default,{title:"Open settings",children:l.jsx(et.default,{onClick:function(e){return o(e.currentTarget)},sx:{p:0},children:l.jsx(it.default,{alt:"Remy Sharp",src:"/static/images/avatar/2.jpg"})})}),l.jsx(xr,{anchor:s,handleClose:function(e){return o(null)},menuItems:e.accountMenu})]})]})})})};jr.propTypes={pages:pe.default.arrayOf(pe.default.shape({icon:pe.default.element,label:pe.default.string,action:pe.default.func})),accountMenu:pe.default.arrayOf(pe.default.shape({icon:pe.default.element,label:pe.default.string,action:pe.default.func}))};var wr=function(e){var t=bt(ue.default.useState(null),2),r=t[0],a=t[1];return l.jsxs(O.Container,ht(ht({variant:"page-controls"},e),{},{style:{display:"flex",flexDirection:"row",justifyContent:"space-between"},children:[l.jsx(O.Button,{variant:"layout",onClick:e.backAction,children:e.backText}),l.jsx(O.Stack,{direction:"row",spacing:1,sx:{display:{xs:"none",md:"flex"}},children:e.actionButtons.map((function(e){return l.jsx(O.Button,{variant:"layout",children:e.label})}))}),l.jsxs(O.Stack,{direction:"row",spacing:1,sx:{display:{xs:"flex",md:"none"}},children:[l.jsx(O.Button,{variant:"layout",onClick:function(e){return a(e.currentTarget)},children:l.jsx(tt.default,{})}),l.jsx(xr,{handleClose:function(e){return a(null)},anchor:r,menuItems:e.actionButtons})]})]}))};wr.propTypes={backText:pe.default.string,backAction:pe.default.func,actionButtons:pe.default.arrayOf(pe.default.shape({label:pe.default.string,action:pe.default.func}))},exports.ActionButton=function(e){return l.jsx(fe.default,ht(ht({},e),{},{children:e.text}))},exports.AdaptiveButton=jt,exports.Box=function(e){return l.jsx("div",{children:e.children})},exports.ChargeWalletForm=dr,exports.CheckoutForm=ur,exports.ConfirmationPage=cr,exports.CreditCardForm=function(e){var t,r=B.useForm(),a=r.formState.errors,n=r.handleSubmit,i=r.control;return l.jsx(ye.default,{maxWidth:"xs",children:l.jsxs("form",{onSubmit:n(e.handle),children:[l.jsx(qt,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"tel",label:"Card Number",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message}),l.jsx(B.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(qt,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Name On Card",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message})}}),l.jsx(B.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(qt,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"Expiry Date",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message})}}),l.jsx(B.Controller,{control:i,name:"cardName",render:function(e){var t;return e.field,l.jsx(qt,{fullWidth:!0,name:"password",placeholder:"Enter password",type:"password",label:"CCV",rules:{required:"Password is rquired"},helperText:null===(t=a.password)||void 0===t?void 0:t.message})}}),l.jsx(fe.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithCreditCard,children:"Pay with Credit Card"})]})})},exports.HawaAccordian=ar,exports.HawaAlert=tr,exports.HawaAppBar=jr,exports.HawaAppLayout=function(e){var t=U.useTheme(),r=bt(ue.default.useState(!0),2),a=r[0],n=r[1],i="ar"===e.lang,s=bt(ue.default.useState(null),2);s[0],s[1];var o=bt(ue.default.useState(null),2),d=o[0],u=o[1];return l.jsxs(Xe.default,{sx:{display:"flex",direction:i?"rtl":"ltr"},children:[l.jsx(gr,{variant:"appbar",position:"fixed",open:a,direction:i?"rtl":"ltr",children:l.jsxs(Ke.default,{variant:"appbar",sx:{paddingLeft:{xs:3},paddingRight:{xs:3}},children:[l.jsx(et.default,{color:"inherit","aria-label":"open drawer",onClick:function(){return n(!0)},edge:"start",s:!0,sx:ht({marginRight:5},a&&{display:"none"}),children:l.jsx(tt.default,{})}),l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",width:"100%",margin:0},children:[l.jsx(je.default,{variant:"h6",noWrap:!0,component:"div",children:e.pageTitle}),l.jsxs(Xe.default,{children:[l.jsx(xe.default,{title:"Open settings",children:l.jsx(et.default,{onClick:function(e){return u(e.currentTarget)},sx:{p:0},size:"small",children:l.jsx(it.default,{})})}),l.jsx(xr,{menuItems:e.accountMenu,anchor:d,handleClose:function(){return u(null)}})]})]})]})}),l.jsxs(vr,{variant:"permanent",open:a,children:[l.jsxs(mr,{direction:i?"rtl":"ltr",children:[e.logo,l.jsx(et.default,{onClick:function(){return n(!1)},children:"rtl"===t.direction?l.jsx(at.default,{}):l.jsx(rt.default,{})})]}),l.jsx(Ze.default,{}),l.jsx(Qe.default,{children:e.pages.map((function(t,r){var n,i;return l.jsx(xe.default,{title:t.text,placement:"right",arrow:!0,PopperProps:{style:{opacity:a?0:1}},children:l.jsxs(lt.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:a?"initial":"center",px:2.5},children:[l.jsx(t.icon,{}),l.jsx("div",{style:{width:20}}),l.jsx(nt.default,{primary:t.text,sx:{opacity:a?1:0}})]},t.text)},r)}))})]}),l.jsxs(Xe.default,{sx:{flexGrow:1,p:3},children:[l.jsx(mr,{}),e.children]})]})},exports.HawaButton=function(e){return l.jsx(fe.default,ht(ht({},e),{},{children:e.children}))},exports.HawaCheckbox=function(e){return console.log("props : ",e),l.jsx(ue.default.Fragment,{children:l.jsx(ve.default,{label:e.label,control:l.jsx(be.default,{style:{color:e.color||null},defaultChecked:e.defaultValue})})})},exports.HawaColorPicker=Yt,exports.HawaDialog=function(t){var r=bt(e.useState(!1),2);return r[0],r[1],l.jsxs(ut.default,ht(ht({},t),{},{variant:"main",children:[l.jsx(yr,{onClose:t.onClose,hideClose:t.hideClose,children:t.title}),l.jsx(ft.default,{children:t.children}),l.jsx(ct.default,{children:t.actions})]}))},exports.HawaInputLabel=function(e){return l.jsx(Pe.default,{children:l.jsx("div",{style:{fontSize:15},children:e.label})})},exports.HawaItemCard=Tt,exports.HawaLogoButton=Qt,exports.HawaPageControls=wr,exports.HawaPricingCard=Ct,exports.HawaRadio=wt,exports.HawaRange=Jt,exports.HawaSearchBar=function(e){return l.jsx(qt,ht({endAdornment:l.jsx(O.InputAdornment,{position:"start",children:l.jsx(W.Search,{})})},e))},exports.HawaSelect=er,exports.HawaSettingsRow=Kt,exports.HawaSnackbar=function(e){return l.jsx(he.default,{open:e.open,onClose:e.handleClose,children:l.jsxs(ge.default,{icon:!1,severity:e.severity,children:[e.title&&l.jsx(me.default,{children:e.title}),e.text]})})},exports.HawaTable=rr,exports.HawaTextArea=function(e){var t=Gt();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=qt,exports.HawaTypography=Pt,exports.NewPasswordForm=lr,exports.PayWithWallet=function(e){return l.jsxs(ye.default,{maxWidth:"xs",children:[l.jsx(je.default,{align:"center",children:"Wallet Balance"}),l.jsxs(je.default,{align:"center",variant:"h1",children:[e.walletBalance||"0",l.jsx(je.default,{children:e.currency||"SAR"})]}),l.jsx(fe.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handlePayWithWallet,children:"Pay Now"})]})},exports.PricingPlans=fr,exports.ResetPasswordForm=nr,exports.SelectPayment=or,exports.SignInForm=sr,exports.SignUpForm=ir,exports.UserProfileForm=function(e){var t=B.useForm(),r=t.formState.errors,a=t.handleSubmit,n=t.control;return l.jsx(ye.default,{maxWidth:"sm",children:l.jsx(B.FormProvider,ht(ht({},t),{},{children:l.jsxs("form",{onSubmit:a(e.handleUpdateProfile),children:[l.jsx(B.Controller,{control:n,name:"fullName",render:function(t){var a,n,i=t.field;return l.jsx(qt,ht({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",label:e.texts.fullNameLabel,placeholder:e.texts.fullNamePlaceholder,helperText:null===(n=r.fullName)||void 0===n?void 0:n.message},i))}}),l.jsx(B.Controller,{control:n,name:"phoneNumber",render:function(e){var t=e.field;return l.jsx(qt,ht({fullWidth:!0,type:"tel",label:"Phone Number",placeholder:"+966"},t))}}),l.jsx(B.Controller,{control:n,name:"email",render:function(t){var a,n,i=t.field;return l.jsx(qt,ht({fullWidth:!0,type:"text",value:null!==(a=i.value)&&void 0!==a?a:"",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}}}),l.jsx(B.Controller,{control:n,name:"password",render:function(t){var a,n,i=t.field;return l.jsx(qt,ht({fullWidth:!0,type:"password",value:null!==(a=i.value)&&void 0!==a?a:"",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}}),l.jsx(B.Controller,{control:n,name:"confirmPassword",render:function(t){var a,n,i=t.field;return l.jsx(qt,ht({fullWidth:!0,type:"password",value:null!==(a=i.value)&&void 0!==a?a:"",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}}),l.jsx(fe.default,{type:"submit",fullWidth:!0,variant:"last",children:e.texts.updateProfile})]})}))})},exports.UserSettingsForm=function(e){return l.jsxs(ye.default,{maxWidth:"sm",children:[e.children,l.jsx(fe.default,{type:"submit",fullWidth:!0,variant:"last",onClick:e.handleSaveSettings,children:e.saveSettingsText})]})};
|