@sikka/hawa 0.0.4 → 0.0.7

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.
Files changed (123) hide show
  1. package/es/index.es.js +1 -1
  2. package/lib/index.js +1 -1
  3. package/package.json +9 -8
  4. package/src/blocks/Account/UserProfile.js +61 -11
  5. package/src/blocks/Account/UserSettings.js +11 -11
  6. package/src/blocks/AuthForms/NewPasswordForm.js +85 -11
  7. package/src/blocks/AuthForms/ResetPasswordForm.js +47 -8
  8. package/src/blocks/AuthForms/SignInForm.js +91 -13
  9. package/src/blocks/AuthForms/SignUpForm.js +119 -12
  10. package/src/blocks/Payment/ChargeWalletForm.js +53 -0
  11. package/src/blocks/Payment/CreditCardForm.js +60 -0
  12. package/src/blocks/Payment/Form/CForm.js +10 -8
  13. package/src/blocks/Payment/Gateway/Wallet.js +5 -5
  14. package/src/blocks/Payment/PayWithWallet.js +14 -0
  15. package/src/blocks/Payment/PaymentMethod.js +2 -2
  16. package/src/blocks/Payment/SelectPayment.js +76 -0
  17. package/src/blocks/Payment/index.js +18 -0
  18. package/src/index.js +3 -1
  19. package/src/layout/Box.js +31 -18
  20. package/src/stories/BlocksStories/AuthForm.stories.js +103 -0
  21. package/src/stories/BlocksStories/PaymentForm.stories.js +86 -0
  22. package/src/stories/BlocksStories/UserForm.stories.js +41 -0
  23. package/src/stories/GlobalVariables.stories.js +33 -90
  24. package/src/stories/HawaProvider.stories.js +0 -1
  25. package/src/stories/Introduction.stories.js +132 -110
  26. package/src/stories/LayoutStories/Box.stories.js +56 -0
  27. package/src/stories/UIStories/ActionButton.stories.js +53 -0
  28. package/src/stories/{AdaptiveButton.stories.js → UIStories/AdaptiveButton.stories.js} +3 -3
  29. package/src/stories/UIStories/Alert.stories.js +42 -0
  30. package/src/stories/{CheckBox.stories.js → UIStories/CheckBox.stories.js} +3 -4
  31. package/src/stories/UIStories/InputLabel.stories.js +13 -0
  32. package/src/stories/UIStories/RadioSelector.stories.js +53 -0
  33. package/src/stories/UIStories/SettingsRow.stories.js +64 -0
  34. package/src/stories/{TextField.stories.js → UIStories/TextField.stories.js} +4 -5
  35. package/src/themes/HawaProvider.js +151 -18
  36. package/src/ui/ActionButton.js +38 -10
  37. package/src/ui/AdaptiveButton.js +29 -29
  38. package/src/ui/ApplePayButton.js +26 -0
  39. package/src/ui/AutoCompleteField.js +0 -1
  40. package/src/ui/DragDropImages.js +2 -2
  41. package/src/ui/GithubButton.js +24 -0
  42. package/src/ui/GoogleButton.js +23 -0
  43. package/src/ui/GooglePayButton.js +26 -0
  44. package/src/ui/HawaAlert.js +37 -0
  45. package/src/ui/HawaButton.js +48 -0
  46. package/src/ui/{Checkbox.js → HawaCheckbox.js} +3 -3
  47. package/src/ui/HawaInputLabel.js +32 -0
  48. package/src/ui/HawaLogoButton.js +43 -0
  49. package/src/ui/HawaRadio.js +73 -0
  50. package/src/ui/HawaSettingsRow.js +71 -0
  51. package/src/ui/{TextArea.js → HawaTextArea.js} +2 -2
  52. package/src/ui/HawaTextField.js +110 -0
  53. package/src/ui/HawaTypography.js +29 -0
  54. package/src/ui/MadaButton.js +26 -0
  55. package/src/ui/PayPalButton.js +26 -0
  56. package/src/ui/RadioBox.js +2 -2
  57. package/src/ui/STCPayButton.js +26 -0
  58. package/src/ui/SelectedField.js +4 -4
  59. package/src/ui/StyledTooltip.js +1 -1
  60. package/src/ui/TabPanel.js +1 -1
  61. package/src/ui/TwitterButton.js +27 -0
  62. package/src/ui/VisaMasterButton.js +26 -0
  63. package/src/ui/WalletButton.js +24 -0
  64. package/src/ui/index.js +23 -11
  65. package/storybook-static/0.0d994c92.iframe.bundle.js +3 -0
  66. package/storybook-static/{1.4e43f671.iframe.bundle.js.LICENSE.txt → 0.0d994c92.iframe.bundle.js.LICENSE.txt} +0 -0
  67. package/storybook-static/0.0d994c92.iframe.bundle.js.map +1 -0
  68. package/storybook-static/0.f47eb24a4893a96ec307.manager.bundle.js +1 -0
  69. package/storybook-static/1.aabc3f3a.iframe.bundle.js +1 -0
  70. package/storybook-static/{3.c1dc7159.iframe.bundle.js → 2.430bf1e3.iframe.bundle.js} +1 -1
  71. package/storybook-static/4.0fcda1281dc1961dbe94.manager.bundle.js +2 -0
  72. package/storybook-static/{4.8c311a6b48cad9f29317.manager.bundle.js.LICENSE.txt → 4.0fcda1281dc1961dbe94.manager.bundle.js.LICENSE.txt} +0 -0
  73. package/storybook-static/{5.88fe62ee92ff5ca67829.manager.bundle.js → 5.63ab4f94d50a3acf080d.manager.bundle.js} +1 -1
  74. package/storybook-static/{7.69d2e532.iframe.bundle.js → 6.704d1e8d.iframe.bundle.js} +1 -1
  75. package/storybook-static/{6.96d184f368dea006cb52.manager.bundle.js → 6.a6d45262f7e98f3f18d3.manager.bundle.js} +2 -2
  76. package/storybook-static/{6.96d184f368dea006cb52.manager.bundle.js.LICENSE.txt → 6.a6d45262f7e98f3f18d3.manager.bundle.js.LICENSE.txt} +0 -0
  77. package/storybook-static/{7.5ec31f3702b08ab0b71c.manager.bundle.js → 7.097710753af9a1c41b80.manager.bundle.js} +1 -1
  78. package/storybook-static/{8.68cd1217.iframe.bundle.js → 7.9ce807e3.iframe.bundle.js} +3 -3
  79. package/storybook-static/{8.68cd1217.iframe.bundle.js.LICENSE.txt → 7.9ce807e3.iframe.bundle.js.LICENSE.txt} +0 -0
  80. package/storybook-static/7.9ce807e3.iframe.bundle.js.map +1 -0
  81. package/storybook-static/{8.5ce13be7612bd3a6b864.manager.bundle.js → 8.76c3cbf398692028e834.manager.bundle.js} +1 -1
  82. package/storybook-static/{9.488e3969.iframe.bundle.js → 8.c4cb6081.iframe.bundle.js} +1 -1
  83. package/storybook-static/iframe.html +1 -1
  84. package/storybook-static/index.html +1 -1
  85. package/storybook-static/main.ac6e4b72b033097dad76.manager.bundle.js +1 -0
  86. package/storybook-static/main.b7ffaed0.iframe.bundle.js +1 -0
  87. package/storybook-static/{runtime~main.cc29f4c2175f187a3707.manager.bundle.js → runtime~main.c8dac23bc753439736f0.manager.bundle.js} +1 -1
  88. package/storybook-static/runtime~main.cfefe972.iframe.bundle.js +1 -0
  89. package/storybook-static/vendors~main.8ebae370.iframe.bundle.js +76 -0
  90. package/storybook-static/{vendors~main.d144d840.iframe.bundle.js.LICENSE.txt → vendors~main.8ebae370.iframe.bundle.js.LICENSE.txt} +3 -30
  91. package/storybook-static/vendors~main.8ebae370.iframe.bundle.js.map +1 -0
  92. package/storybook-static/vendors~main.a697e07137d366f95f76.manager.bundle.js +2 -0
  93. package/storybook-static/{vendors~main.f228d62e92b69563cefb.manager.bundle.js.LICENSE.txt → vendors~main.a697e07137d366f95f76.manager.bundle.js.LICENSE.txt} +0 -0
  94. package/src/blocks/AuthForms/viaFacebook.js +0 -0
  95. package/src/blocks/AuthForms/viaGithub.js +0 -0
  96. package/src/blocks/AuthForms/viaGoogle.js +0 -0
  97. package/src/blocks/AuthForms/viaTwitter.js +0 -0
  98. package/src/blocks/index.js +0 -13
  99. package/src/stories/ActionButton.stories.js +0 -49
  100. package/src/stories/Alert.stories.js +0 -41
  101. package/src/stories/AuthForm.stories.js +0 -79
  102. package/src/stories/Box.stories.js +0 -64
  103. package/src/stories/InputLabel.stories.js +0 -92
  104. package/src/stories/RadioSelector.stories.js +0 -69
  105. package/src/stories/UserAccount.stories.js +0 -46
  106. package/src/ui/RadioSelector.js +0 -51
  107. package/src/ui/StyledAlert.js +0 -30
  108. package/src/ui/StyledInputLabel.js +0 -19
  109. package/src/ui/TextField.js +0 -62
  110. package/storybook-static/0.d3bc3395610cf5d3ee94.manager.bundle.js +0 -1
  111. package/storybook-static/0.dd3d47f5.iframe.bundle.js +0 -1
  112. package/storybook-static/1.4e43f671.iframe.bundle.js +0 -3
  113. package/storybook-static/1.4e43f671.iframe.bundle.js.map +0 -1
  114. package/storybook-static/2.9a757207.iframe.bundle.js +0 -1
  115. package/storybook-static/4.8c311a6b48cad9f29317.manager.bundle.js +0 -2
  116. package/storybook-static/8.68cd1217.iframe.bundle.js.map +0 -1
  117. package/storybook-static/main.65cb2769.iframe.bundle.js +0 -1
  118. package/storybook-static/main.7e391cf7bf72b0d18ea5.manager.bundle.js +0 -1
  119. package/storybook-static/runtime~main.6e2e1544.iframe.bundle.js +0 -1
  120. package/storybook-static/vendors~main.d144d840.iframe.bundle.js +0 -3
  121. package/storybook-static/vendors~main.d144d840.iframe.bundle.js.map +0 -1
  122. package/storybook-static/vendors~main.f228d62e92b69563cefb.manager.bundle.js +0 -2
  123. package/yarn-error.log +0 -10910
package/es/index.es.js CHANGED
@@ -1 +1 @@
1
- import e from"http";import t from"https";import r from"url";import n from"stream";import o from"assert";import a from"zlib";import i from"util";import s,{createContext as c,useContext as l,useState as u,useEffect as p,useRef as d,useMemo as f,useCallback as h,useReducer as m}from"react";import{jsxs as y,Fragment as g,jsx as v}from"react/jsx-runtime";import _ from"crypto-js/sha256";import b from"@material-ui/core/Button";import w from"@material-ui/core/CircularProgress";import{TransitionGroup as E,CSSTransition as P,SwitchTransition as S}from"react-transition-group";import O from"@material-ui/core/Grid";import R from"@material-ui/core/Paper";import{makeStyles as N}from"@material-ui/core/styles";import A from"@material-ui/core/Chip";function x(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})})),t}var j={};function C(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 T(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function I(e,t,r,n,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,o)}function L(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function i(e){I(a,n,o,i,s,"next",e)}function s(e){I(a,n,o,i,s,"throw",e)}i(void 0)}))}}function M(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k(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,o,a=[],i=!0,s=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);i=!0);}catch(e){s=!0,o=e}finally{try{i||null==r.return||r.return()}finally{if(s)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return D(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 D(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 D(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 U={exports:{}},$=function(e,t){return function(){for(var r=new Array(arguments.length),n=0;n<r.length;n++)r[n]=arguments[n];return e.apply(t,r)}},B=$,F=Object.prototype.toString;function q(e){return Array.isArray(e)}function W(e){return void 0===e}function H(e){return"[object ArrayBuffer]"===F.call(e)}function z(e){return null!==e&&"object"==typeof e}function V(e){if("[object Object]"!==F.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function G(e){return"[object Function]"===F.call(e)}function X(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),q(e))for(var r=0,n=e.length;r<n;r++)t.call(null,e[r],r,e);else for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.call(null,e[o],o,e)}var Y={isArray:q,isArrayBuffer:H,isBuffer:function(e){return null!==e&&!W(e)&&null!==e.constructor&&!W(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){return"[object FormData]"===F.call(e)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&H(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:z,isPlainObject:V,isUndefined:W,isDate:function(e){return"[object Date]"===F.call(e)},isFile:function(e){return"[object File]"===F.call(e)},isBlob:function(e){return"[object Blob]"===F.call(e)},isFunction:G,isStream:function(e){return z(e)&&G(e.pipe)},isURLSearchParams:function(e){return"[object URLSearchParams]"===F.call(e)},isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:X,merge:function e(){var t={};function r(r,n){V(t[n])&&V(r)?t[n]=e(t[n],r):V(r)?t[n]=e({},r):q(r)?t[n]=r.slice():t[n]=r}for(var n=0,o=arguments.length;n<o;n++)X(arguments[n],r);return t},extend:function(e,t,r){return X(t,(function(t,n){e[n]=r&&"function"==typeof t?B(t,r):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e}},Q=Y;function J(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var K=function(e,t,r){if(!t)return e;var n;if(r)n=r(t);else if(Q.isURLSearchParams(t))n=t.toString();else{var o=[];Q.forEach(t,(function(e,t){null!=e&&(Q.isArray(e)?t+="[]":e=[e],Q.forEach(e,(function(e){Q.isDate(e)?e=e.toISOString():Q.isObject(e)&&(e=JSON.stringify(e)),o.push(J(t)+"="+J(e))})))})),n=o.join("&")}if(n){var a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},Z=Y;function ee(){this.handlers=[]}ee.prototype.use=function(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},ee.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},ee.prototype.forEach=function(e){Z.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var te=ee,re=Y,ne=function(e,t,r,n,o){return e.config=t,r&&(e.code=r),e.request=n,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e},oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ae=ne,ie=function(e,t,r,n,o){var a=new Error(e);return ae(a,t,r,n,o)},se=ie,ce=function(e,t,r){var n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(se("Request failed with status code "+r.status,r.config,null,r.request,r)):e(r)},le=Y,ue=le.isStandardBrowserEnv()?{write:function(e,t,r,n,o,a){var i=[];i.push(e+"="+encodeURIComponent(t)),le.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),le.isString(n)&&i.push("path="+n),le.isString(o)&&i.push("domain="+o),!0===a&&i.push("secure"),document.cookie=i.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}},pe=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},de=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},fe=function(e,t){return e&&!pe(t)?de(e,t):t},he=Y,me=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"],ye=Y,ge=ye.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function n(e){var n=e;return t&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:"/"===r.pathname.charAt(0)?r.pathname:"/"+r.pathname}}return e=n(window.location.href),function(t){var r=ye.isString(t)?n(t):t;return r.protocol===e.protocol&&r.host===e.host}}():function(){return!0};function ve(e){this.message=e}ve.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},ve.prototype.__CANCEL__=!0;var _e,be=ve,we=Y,Ee=ce,Pe=ue,Se=K,Oe=fe,Re=function(e){var t,r,n,o={};return e?(he.forEach(e.split("\n"),(function(e){if(n=e.indexOf(":"),t=he.trim(e.substr(0,n)).toLowerCase(),r=he.trim(e.substr(n+1)),t){if(o[t]&&me.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([r]):o[t]?o[t]+", "+r:r}})),o):o},Ne=ge,Ae=ie,xe=oe,je=be,Ce=function(e){return new Promise((function(t,r){var n,o=e.data,a=e.headers,i=e.responseType;function s(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}we.isFormData(o)&&delete a["Content-Type"];var c=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",u=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(l+":"+u)}var p=Oe(e.baseURL,e.url);function d(){if(c){var n="getAllResponseHeaders"in c?Re(c.getAllResponseHeaders()):null,o={data:i&&"text"!==i&&"json"!==i?c.response:c.responseText,status:c.status,statusText:c.statusText,headers:n,config:e,request:c};Ee((function(e){t(e),s()}),(function(e){r(e),s()}),o),c=null}}if(c.open(e.method.toUpperCase(),Se(p,e.params,e.paramsSerializer),!0),c.timeout=e.timeout,"onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){c&&4===c.readyState&&(0!==c.status||c.responseURL&&0===c.responseURL.indexOf("file:"))&&setTimeout(d)},c.onabort=function(){c&&(r(Ae("Request aborted",e,"ECONNABORTED",c)),c=null)},c.onerror=function(){r(Ae("Network Error",e,null,c)),c=null},c.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",n=e.transitional||xe;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(Ae(t,e,n.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",c)),c=null},we.isStandardBrowserEnv()){var f=(e.withCredentials||Ne(p))&&e.xsrfCookieName?Pe.read(e.xsrfCookieName):void 0;f&&(a[e.xsrfHeaderName]=f)}"setRequestHeader"in c&&we.forEach(a,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete a[t]:c.setRequestHeader(t,e)})),we.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),i&&"json"!==i&&(c.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&c.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&c.upload&&c.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(n=function(e){c&&(r(!e||e&&e.type?new je("canceled"):e),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),o||(o=null),c.send(o)}))},Te={exports:{}},Ie=r,Le=Ie.URL,Me=e,ke=t,De=n.Writable,Ue=o,$e=function(){if(!_e){try{_e=require("debug")("follow-redirects")}catch(e){}"function"!=typeof _e&&(_e=function(){})}_e.apply(null,arguments)},Be=["abort","aborted","connect","error","socket","timeout"],Fe=Object.create(null);Be.forEach((function(e){Fe[e]=function(t,r,n){this._redirectable.emit(e,t,r,n)}}));var qe=Je("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),We=Je("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded"),He=Je("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),ze=Je("ERR_STREAM_WRITE_AFTER_END","write after end");function Ve(e,t){De.call(this),this._sanitizeOptions(e),this._options=e,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],t&&this.on("response",t);var r=this;this._onNativeResponse=function(e){r._processResponse(e)},this._performRequest()}function Ge(e){var t={maxRedirects:21,maxBodyLength:10485760},r={};return Object.keys(e).forEach((function(n){var o=n+":",a=r[o]=e[n],i=t[n]=Object.create(a);Object.defineProperties(i,{request:{value:function(e,n,a){if("string"==typeof e){var i=e;try{e=Ye(new Le(i))}catch(t){e=Ie.parse(i)}}else Le&&e instanceof Le?e=Ye(e):(a=n,n=e,e={protocol:o});return"function"==typeof n&&(a=n,n=null),(n=Object.assign({maxRedirects:t.maxRedirects,maxBodyLength:t.maxBodyLength},e,n)).nativeProtocols=r,Ue.equal(n.protocol,o,"protocol mismatch"),$e("options",n),new Ve(n,a)},configurable:!0,enumerable:!0,writable:!0},get:{value:function(e,t,r){var n=i.request(e,t,r);return n.end(),n},configurable:!0,enumerable:!0,writable:!0}})})),t}function Xe(){}function Ye(e){var t={protocol:e.protocol,hostname:e.hostname.startsWith("[")?e.hostname.slice(1,-1):e.hostname,hash:e.hash,search:e.search,pathname:e.pathname,path:e.pathname+e.search,href:e.href};return""!==e.port&&(t.port=Number(e.port)),t}function Qe(e,t){var r;for(var n in t)e.test(n)&&(r=t[n],delete t[n]);return null==r?void 0:String(r).trim()}function Je(e,t){function r(e){Error.captureStackTrace(this,this.constructor),e?(this.message=t+": "+e.message,this.cause=e):this.message=t}return r.prototype=new Error,r.prototype.constructor=r,r.prototype.name="Error ["+e+"]",r.prototype.code=e,r}function Ke(e){for(var t=0;t<Be.length;t++)e.removeListener(Be[t],Fe[Be[t]]);e.on("error",Xe),e.abort()}Ve.prototype=Object.create(De.prototype),Ve.prototype.abort=function(){Ke(this._currentRequest),this.emit("abort")},Ve.prototype.write=function(e,t,r){if(this._ending)throw new ze;if(!("string"==typeof e||"object"==typeof e&&"length"in e))throw new TypeError("data should be a string, Buffer or Uint8Array");"function"==typeof t&&(r=t,t=null),0!==e.length?this._requestBodyLength+e.length<=this._options.maxBodyLength?(this._requestBodyLength+=e.length,this._requestBodyBuffers.push({data:e,encoding:t}),this._currentRequest.write(e,t,r)):(this.emit("error",new He),this.abort()):r&&r()},Ve.prototype.end=function(e,t,r){if("function"==typeof e?(r=e,e=t=null):"function"==typeof t&&(r=t,t=null),e){var n=this,o=this._currentRequest;this.write(e,t,(function(){n._ended=!0,o.end(null,null,r)})),this._ending=!0}else this._ended=this._ending=!0,this._currentRequest.end(null,null,r)},Ve.prototype.setHeader=function(e,t){this._options.headers[e]=t,this._currentRequest.setHeader(e,t)},Ve.prototype.removeHeader=function(e){delete this._options.headers[e],this._currentRequest.removeHeader(e)},Ve.prototype.setTimeout=function(e,t){var r=this;function n(t){t.setTimeout(e),t.removeListener("timeout",t.destroy),t.addListener("timeout",t.destroy)}function o(t){r._timeout&&clearTimeout(r._timeout),r._timeout=setTimeout((function(){r.emit("timeout"),a()}),e),n(t)}function a(){r._timeout&&(clearTimeout(r._timeout),r._timeout=null),r.removeListener("abort",a),r.removeListener("error",a),r.removeListener("response",a),t&&r.removeListener("timeout",t),r.socket||r._currentRequest.removeListener("socket",o)}return t&&this.on("timeout",t),this.socket?o(this.socket):this._currentRequest.once("socket",o),this.on("socket",n),this.on("abort",a),this.on("error",a),this.on("response",a),this},["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach((function(e){Ve.prototype[e]=function(t,r){return this._currentRequest[e](t,r)}})),["aborted","connection","socket"].forEach((function(e){Object.defineProperty(Ve.prototype,e,{get:function(){return this._currentRequest[e]}})})),Ve.prototype._sanitizeOptions=function(e){if(e.headers||(e.headers={}),e.host&&(e.hostname||(e.hostname=e.host),delete e.host),!e.pathname&&e.path){var t=e.path.indexOf("?");t<0?e.pathname=e.path:(e.pathname=e.path.substring(0,t),e.search=e.path.substring(t))}},Ve.prototype._performRequest=function(){var e=this._options.protocol,t=this._options.nativeProtocols[e];if(t){if(this._options.agents){var r=e.substr(0,e.length-1);this._options.agent=this._options.agents[r]}var n=this._currentRequest=t.request(this._options,this._onNativeResponse);this._currentUrl=Ie.format(this._options),n._redirectable=this;for(var o=0;o<Be.length;o++)n.on(Be[o],Fe[Be[o]]);if(this._isRedirect){var a=0,i=this,s=this._requestBodyBuffers;!function e(t){if(n===i._currentRequest)if(t)i.emit("error",t);else if(a<s.length){var r=s[a++];n.finished||n.write(r.data,r.encoding,e)}else i._ended&&n.end()}()}}else this.emit("error",new TypeError("Unsupported protocol "+e))},Ve.prototype._processResponse=function(e){var t=e.statusCode;this._options.trackRedirects&&this._redirects.push({url:this._currentUrl,headers:e.headers,statusCode:t});var r=e.headers.location;if(!r||!1===this._options.followRedirects||t<300||t>=400)return e.responseUrl=this._currentUrl,e.redirects=this._redirects,this.emit("response",e),void(this._requestBodyBuffers=[]);if(Ke(this._currentRequest),e.destroy(),++this._redirectCount>this._options.maxRedirects)this.emit("error",new We);else{((301===t||302===t)&&"POST"===this._options.method||303===t&&!/^(?:GET|HEAD)$/.test(this._options.method))&&(this._options.method="GET",this._requestBodyBuffers=[],Qe(/^content-/i,this._options.headers));var n,o=Qe(/^host$/i,this._options.headers),a=Ie.parse(this._currentUrl),i=o||a.host,s=/^\w+:/.test(r)?this._currentUrl:Ie.format(Object.assign(a,{host:i}));try{n=Ie.resolve(s,r)}catch(e){return void this.emit("error",new qe(e))}$e("redirecting to",n),this._isRedirect=!0;var c=Ie.parse(n);if(Object.assign(this._options,c),(c.protocol!==a.protocol&&"https:"!==c.protocol||c.host!==i&&!function(e,t){const r=e.length-t.length-1;return r>0&&"."===e[r]&&e.endsWith(t)}(c.host,i))&&Qe(/^(?:authorization|cookie)$/i,this._options.headers),"function"==typeof this._options.beforeRedirect){var l={headers:e.headers};try{this._options.beforeRedirect.call(null,this._options,l)}catch(e){return void this.emit("error",e)}this._sanitizeOptions(this._options)}try{this._performRequest()}catch(e){this.emit("error",new qe(e))}}},Te.exports=Ge({http:Me,https:ke}),Te.exports.wrap=Ge;var Ze="0.26.1",et=Y,tt=ce,rt=fe,nt=K,ot=e,at=t,it=Te.exports.http,st=Te.exports.https,ct=r,lt=a,ut=Ze,pt=ie,dt=ne,ft=oe,ht=be,mt=/https:?/;function yt(e,t,r){if(e.hostname=t.host,e.host=t.host,e.port=t.port,e.path=r,t.auth){var n=Buffer.from(t.auth.username+":"+t.auth.password,"utf8").toString("base64");e.headers["Proxy-Authorization"]="Basic "+n}e.beforeRedirect=function(e){e.headers.host=e.host,yt(e,t,e.href)}}var gt=function(e){return new Promise((function(t,r){var n;function o(){e.cancelToken&&e.cancelToken.unsubscribe(n),e.signal&&e.signal.removeEventListener("abort",n)}var a=function(e){o(),t(e)},i=!1,s=function(e){o(),i=!0,r(e)},c=e.data,l=e.headers,u={};if(Object.keys(l).forEach((function(e){u[e.toLowerCase()]=e})),"user-agent"in u?l[u["user-agent"]]||delete l[u["user-agent"]]:l["User-Agent"]="axios/"+ut,c&&!et.isStream(c)){if(Buffer.isBuffer(c));else if(et.isArrayBuffer(c))c=Buffer.from(new Uint8Array(c));else{if(!et.isString(c))return s(pt("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",e));c=Buffer.from(c,"utf-8")}if(e.maxBodyLength>-1&&c.length>e.maxBodyLength)return s(pt("Request body larger than maxBodyLength limit",e));u["content-length"]||(l["Content-Length"]=c.length)}var p=void 0;e.auth&&(p=(e.auth.username||"")+":"+(e.auth.password||""));var d=rt(e.baseURL,e.url),f=ct.parse(d),h=f.protocol||"http:";if(!p&&f.auth){var m=f.auth.split(":");p=(m[0]||"")+":"+(m[1]||"")}p&&u.authorization&&delete l[u.authorization];var y=mt.test(h),g=y?e.httpsAgent:e.httpAgent;try{nt(f.path,e.params,e.paramsSerializer).replace(/^\?/,"")}catch(t){var v=new Error(t.message);v.config=e,v.url=e.url,v.exists=!0,s(v)}var _={path:nt(f.path,e.params,e.paramsSerializer).replace(/^\?/,""),method:e.method.toUpperCase(),headers:l,agent:g,agents:{http:e.httpAgent,https:e.httpsAgent},auth:p};e.socketPath?_.socketPath=e.socketPath:(_.hostname=f.hostname,_.port=f.port);var b,w=e.proxy;if(!w&&!1!==w){var E=h.slice(0,-1)+"_proxy",P=process.env[E]||process.env[E.toUpperCase()];if(P){var S=ct.parse(P),O=process.env.no_proxy||process.env.NO_PROXY,R=!0;if(O)R=!O.split(",").map((function(e){return e.trim()})).some((function(e){return!!e&&("*"===e||("."===e[0]&&f.hostname.substr(f.hostname.length-e.length)===e||f.hostname===e))}));if(R&&(w={host:S.hostname,port:S.port,protocol:S.protocol},S.auth)){var N=S.auth.split(":");w.auth={username:N[0],password:N[1]}}}}w&&(_.headers.host=f.hostname+(f.port?":"+f.port:""),yt(_,w,h+"//"+f.hostname+(f.port?":"+f.port:"")+_.path));var A=y&&(!w||mt.test(w.protocol));e.transport?b=e.transport:0===e.maxRedirects?b=A?at:ot:(e.maxRedirects&&(_.maxRedirects=e.maxRedirects),b=A?st:it),e.maxBodyLength>-1&&(_.maxBodyLength=e.maxBodyLength),e.insecureHTTPParser&&(_.insecureHTTPParser=e.insecureHTTPParser);var x=b.request(_,(function(t){if(!x.aborted){var r=t,n=t.req||x;if(204!==t.statusCode&&"HEAD"!==n.method&&!1!==e.decompress)switch(t.headers["content-encoding"]){case"gzip":case"compress":case"deflate":r=r.pipe(lt.createUnzip()),delete t.headers["content-encoding"]}var o={status:t.statusCode,statusText:t.statusMessage,headers:t.headers,config:e,request:n};if("stream"===e.responseType)o.data=r,tt(a,s,o);else{var c=[],l=0;r.on("data",(function(t){c.push(t),l+=t.length,e.maxContentLength>-1&&l>e.maxContentLength&&(i=!0,r.destroy(),s(pt("maxContentLength size of "+e.maxContentLength+" exceeded",e,null,n)))})),r.on("aborted",(function(){i||(r.destroy(),s(pt("error request aborted",e,"ERR_REQUEST_ABORTED",n)))})),r.on("error",(function(t){x.aborted||s(dt(t,e,null,n))})),r.on("end",(function(){try{var t=1===c.length?c[0]:Buffer.concat(c);"arraybuffer"!==e.responseType&&(t=t.toString(e.responseEncoding),e.responseEncoding&&"utf8"!==e.responseEncoding||(t=et.stripBOM(t))),o.data=t}catch(t){s(dt(t,e,t.code,o.request,o))}tt(a,s,o)}))}}}));if(x.on("error",(function(t){x.aborted&&"ERR_FR_TOO_MANY_REDIRECTS"!==t.code||s(dt(t,e,null,x))})),x.on("socket",(function(e){e.setKeepAlive(!0,6e4)})),e.timeout){var j=parseInt(e.timeout,10);if(isNaN(j))return void s(pt("error trying to parse `config.timeout` to int",e,"ERR_PARSE_TIMEOUT",x));x.setTimeout(j,(function(){x.abort();var t="";t=e.timeoutErrorMessage?e.timeoutErrorMessage:"timeout of "+e.timeout+"ms exceeded";var r=e.transitional||ft;s(pt(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",x))}))}(e.cancelToken||e.signal)&&(n=function(e){x.aborted||(x.abort(),s(!e||e&&e.type?new ht("canceled"):e))},e.cancelToken&&e.cancelToken.subscribe(n),e.signal&&(e.signal.aborted?n():e.signal.addEventListener("abort",n))),et.isStream(c)?c.on("error",(function(t){s(dt(t,e,null,x))})).pipe(x):x.end(c)}))},vt=Y,_t=function(e,t){re.forEach(e,(function(r,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=r,delete e[n])}))},bt=ne,wt={"Content-Type":"application/x-www-form-urlencoded"};function Et(e,t){!vt.isUndefined(e)&&vt.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var Pt,St={transitional:oe,adapter:("undefined"!=typeof XMLHttpRequest?Pt=Ce:"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process)&&(Pt=gt),Pt),transformRequest:[function(e,t){return _t(t,"Accept"),_t(t,"Content-Type"),vt.isFormData(e)||vt.isArrayBuffer(e)||vt.isBuffer(e)||vt.isStream(e)||vt.isFile(e)||vt.isBlob(e)?e:vt.isArrayBufferView(e)?e.buffer:vt.isURLSearchParams(e)?(Et(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):vt.isObject(e)||t&&"application/json"===t["Content-Type"]?(Et(t,"application/json"),function(e,t,r){if(vt.isString(e))try{return(t||JSON.parse)(e),vt.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||St.transitional,r=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,o=!r&&"json"===this.responseType;if(o||n&&vt.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw bt(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};vt.forEach(["delete","get","head"],(function(e){St.headers[e]={}})),vt.forEach(["post","put","patch"],(function(e){St.headers[e]=vt.merge(wt)}));var Ot=St,Rt=Y,Nt=Ot,At=function(e){return!(!e||!e.__CANCEL__)},xt=Y,jt=function(e,t,r){var n=this||Nt;return Rt.forEach(r,(function(r){e=r.call(n,e,t)})),e},Ct=At,Tt=Ot,It=be;function Lt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new It("canceled")}var Mt=Y,kt=function(e,t){t=t||{};var r={};function n(e,t){return Mt.isPlainObject(e)&&Mt.isPlainObject(t)?Mt.merge(e,t):Mt.isPlainObject(t)?Mt.merge({},t):Mt.isArray(t)?t.slice():t}function o(r){return Mt.isUndefined(t[r])?Mt.isUndefined(e[r])?void 0:n(void 0,e[r]):n(e[r],t[r])}function a(e){if(!Mt.isUndefined(t[e]))return n(void 0,t[e])}function i(r){return Mt.isUndefined(t[r])?Mt.isUndefined(e[r])?void 0:n(void 0,e[r]):n(void 0,t[r])}function s(r){return r in t?n(e[r],t[r]):r in e?n(void 0,e[r]):void 0}var c={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:s};return Mt.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,n=t(e);Mt.isUndefined(n)&&t!==s||(r[e]=n)})),r},Dt=Ze,Ut={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){Ut[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));var $t={};Ut.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Dt+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return function(r,o,a){if(!1===e)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!$t[o]&&($t[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,a)}};var Bt={assertOptions:function(e,t,r){if("object"!=typeof e)throw new TypeError("options must be an object");for(var n=Object.keys(e),o=n.length;o-- >0;){var a=n[o],i=t[a];if(i){var s=e[a],c=void 0===s||i(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==r)throw Error("Unknown option "+a)}},validators:Ut},Ft=Y,qt=K,Wt=te,Ht=function(e){return Lt(e),e.headers=e.headers||{},e.data=jt.call(e,e.data,e.headers,e.transformRequest),e.headers=xt.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),xt.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||Tt.adapter)(e).then((function(t){return Lt(e),t.data=jt.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return Ct(t)||(Lt(e),t&&t.response&&(t.response.data=jt.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},zt=kt,Vt=Bt,Gt=Vt.validators;function Xt(e){this.defaults=e,this.interceptors={request:new Wt,response:new Wt}}Xt.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=zt(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var r=t.transitional;void 0!==r&&Vt.assertOptions(r,{silentJSONParsing:Gt.transitional(Gt.boolean),forcedJSONParsing:Gt.transitional(Gt.boolean),clarifyTimeoutError:Gt.transitional(Gt.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var a,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!o){var s=[Ht,void 0];for(Array.prototype.unshift.apply(s,n),s=s.concat(i),a=Promise.resolve(t);s.length;)a=a.then(s.shift(),s.shift());return a}for(var c=t;n.length;){var l=n.shift(),u=n.shift();try{c=l(c)}catch(e){u(e);break}}try{a=Ht(c)}catch(e){return Promise.reject(e)}for(;i.length;)a=a.then(i.shift(),i.shift());return a},Xt.prototype.getUri=function(e){return e=zt(this.defaults,e),qt(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},Ft.forEach(["delete","get","head","options"],(function(e){Xt.prototype[e]=function(t,r){return this.request(zt(r||{},{method:e,url:t,data:(r||{}).data}))}})),Ft.forEach(["post","put","patch"],(function(e){Xt.prototype[e]=function(t,r,n){return this.request(zt(n||{},{method:e,url:t,data:r}))}}));var Yt=Xt,Qt=be;function Jt(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var r=this;this.promise.then((function(e){if(r._listeners){var t,n=r._listeners.length;for(t=0;t<n;t++)r._listeners[t](e);r._listeners=null}})),this.promise.then=function(e){var t,n=new Promise((function(e){r.subscribe(e),t=e})).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e((function(e){r.reason||(r.reason=new Qt(e),t(r.reason))}))}Jt.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},Jt.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},Jt.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},Jt.source=function(){var e;return{token:new Jt((function(t){e=t})),cancel:e}};var Kt=Jt,Zt=Y,er=Y,tr=$,rr=Yt,nr=kt;var or=function e(t){var r=new rr(t),n=tr(rr.prototype.request,r);return er.extend(n,rr.prototype,r),er.extend(n,r),n.create=function(r){return e(nr(t,r))},n}(Ot);or.Axios=rr,or.Cancel=be,or.CancelToken=Kt,or.isCancel=At,or.VERSION=Ze,or.all=function(e){return Promise.all(e)},or.spread=function(e){return function(t){return e.apply(null,t)}},or.isAxiosError=function(e){return Zt.isObject(e)&&!0===e.isAxiosError},U.exports=or,U.exports.default=or;var ar=U.exports,ir="undefined"!=typeof Symbol&&Symbol,sr=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},cr="Function.prototype.bind called on incompatible ",lr=Array.prototype.slice,ur=Object.prototype.toString,pr=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==ur.call(t))throw new TypeError(cr+t);for(var r,n=lr.call(arguments,1),o=function(){if(this instanceof r){var o=t.apply(this,n.concat(lr.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(lr.call(arguments)))},a=Math.max(0,t.length-n.length),i=[],s=0;s<a;s++)i.push("$"+s);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(o),t.prototype){var c=function(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},dr=Function.prototype.bind||pr,fr=dr.call(Function.call,Object.prototype.hasOwnProperty),hr=SyntaxError,mr=Function,yr=TypeError,gr=function(e){try{return mr('"use strict"; return ('+e+").constructor;")()}catch(e){}},vr=Object.getOwnPropertyDescriptor;if(vr)try{vr({},"")}catch(e){vr=null}var _r=function(){throw new yr},br=vr?function(){try{return _r}catch(e){try{return vr(arguments,"callee").get}catch(e){return _r}}}():_r,wr="function"==typeof ir&&"function"==typeof Symbol&&"symbol"==typeof ir("foo")&&"symbol"==typeof Symbol("bar")&&sr(),Er=Object.getPrototypeOf||function(e){return e.__proto__},Pr={},Sr="undefined"==typeof Uint8Array?undefined:Er(Uint8Array),Or={"%AggregateError%":"undefined"==typeof AggregateError?undefined:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?undefined:ArrayBuffer,"%ArrayIteratorPrototype%":wr?Er([][Symbol.iterator]()):undefined,"%AsyncFromSyncIteratorPrototype%":undefined,"%AsyncFunction%":Pr,"%AsyncGenerator%":Pr,"%AsyncGeneratorFunction%":Pr,"%AsyncIteratorPrototype%":Pr,"%Atomics%":"undefined"==typeof Atomics?undefined:Atomics,"%BigInt%":"undefined"==typeof BigInt?undefined:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?undefined:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?undefined:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?undefined:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?undefined:FinalizationRegistry,"%Function%":mr,"%GeneratorFunction%":Pr,"%Int8Array%":"undefined"==typeof Int8Array?undefined:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?undefined:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?undefined:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":wr?Er(Er([][Symbol.iterator]())):undefined,"%JSON%":"object"==typeof JSON?JSON:undefined,"%Map%":"undefined"==typeof Map?undefined:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&wr?Er((new Map)[Symbol.iterator]()):undefined,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?undefined:Promise,"%Proxy%":"undefined"==typeof Proxy?undefined:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?undefined:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?undefined:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&wr?Er((new Set)[Symbol.iterator]()):undefined,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?undefined:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":wr?Er(""[Symbol.iterator]()):undefined,"%Symbol%":wr?Symbol:undefined,"%SyntaxError%":hr,"%ThrowTypeError%":br,"%TypedArray%":Sr,"%TypeError%":yr,"%Uint8Array%":"undefined"==typeof Uint8Array?undefined:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?undefined:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?undefined:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?undefined:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?undefined:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?undefined:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?undefined:WeakSet},Rr=function e(t){var r;if("%AsyncFunction%"===t)r=gr("async function () {}");else if("%GeneratorFunction%"===t)r=gr("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=gr("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(r=Er(o.prototype))}return Or[t]=r,r},Nr={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ar=dr,xr=fr,jr=Ar.call(Function.call,Array.prototype.concat),Cr=Ar.call(Function.apply,Array.prototype.splice),Tr=Ar.call(Function.call,String.prototype.replace),Ir=Ar.call(Function.call,String.prototype.slice),Lr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Mr=/\\(\\)?/g,kr=function(e){var t=Ir(e,0,1),r=Ir(e,-1);if("%"===t&&"%"!==r)throw new hr("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new hr("invalid intrinsic syntax, expected opening `%`");var n=[];return Tr(e,Lr,(function(e,t,r,o){n[n.length]=r?Tr(o,Mr,"$1"):t||e})),n},Dr=function(e,t){var r,n=e;if(xr(Nr,n)&&(n="%"+(r=Nr[n])[0]+"%"),xr(Or,n)){var o=Or[n];if(o===Pr&&(o=Rr(n)),void 0===o&&!t)throw new yr("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new hr("intrinsic "+e+" does not exist!")},Ur=function(e,t){if("string"!=typeof e||0===e.length)throw new yr("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new yr('"allowMissing" argument must be a boolean');var r=kr(e),n=r.length>0?r[0]:"",o=Dr("%"+n+"%",t),a=o.name,i=o.value,s=!1,c=o.alias;c&&(n=c[0],Cr(r,jr([0,1],c)));for(var l=1,u=!0;l<r.length;l+=1){var p=r[l],d=Ir(p,0,1),f=Ir(p,-1);if(('"'===d||"'"===d||"`"===d||'"'===f||"'"===f||"`"===f)&&d!==f)throw new hr("property names with quotes must have matching quotes");if("constructor"!==p&&u||(s=!0),xr(Or,a="%"+(n+="."+p)+"%"))i=Or[a];else if(null!=i){if(!(p in i)){if(!t)throw new yr("base intrinsic for "+e+" exists, but the property is not available.");return}if(vr&&l+1>=r.length){var h=vr(i,p);i=(u=!!h)&&"get"in h&&!("originalValue"in h.get)?h.get:i[p]}else u=xr(i,p),i=i[p];u&&!s&&(Or[a]=i)}}return i},$r={exports:{}};!function(e){var t=dr,r=Ur,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||t.call(o,n),i=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var r=a(t,o,arguments);if(i&&s){var n=i(r,"length");n.configurable&&s(r,"length",{value:1+c(0,e.length-(arguments.length-1))})}return r};var l=function(){return a(t,n,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l}($r);var Br=Ur,Fr=$r.exports,qr=Fr(Br("String.prototype.indexOf")),Wr=i.inspect,Hr="function"==typeof Map&&Map.prototype,zr=Object.getOwnPropertyDescriptor&&Hr?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Vr=Hr&&zr&&"function"==typeof zr.get?zr.get:null,Gr=Hr&&Map.prototype.forEach,Xr="function"==typeof Set&&Set.prototype,Yr=Object.getOwnPropertyDescriptor&&Xr?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Qr=Xr&&Yr&&"function"==typeof Yr.get?Yr.get:null,Jr=Xr&&Set.prototype.forEach,Kr="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Zr="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,en="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,tn=Boolean.prototype.valueOf,rn=Object.prototype.toString,nn=Function.prototype.toString,on=String.prototype.match,an="function"==typeof BigInt?BigInt.prototype.valueOf:null,sn=Object.getOwnPropertySymbols,cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,ln="function"==typeof Symbol&&"object"==typeof Symbol.iterator,un=Object.prototype.propertyIsEnumerable,pn=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),dn=Wr.custom,fn=dn&&vn(dn)?dn:null,hn="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function mn(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function yn(e){return String(e).replace(/"/g,"&quot;")}function gn(e){return!("[object Array]"!==wn(e)||hn&&"object"==typeof e&&hn in e)}function vn(e){if(ln)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!cn)return!1;try{return cn.call(e),!0}catch(e){}return!1}var _n=Object.prototype.hasOwnProperty||function(e){return e in this};function bn(e,t){return _n.call(e,t)}function wn(e){return rn.call(e)}function En(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function Pn(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return Pn(e.slice(0,t.maxStringLength),t)+n}return mn(e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,Sn),"single",t)}function Sn(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function On(e){return"Object("+e+")"}function Rn(e){return e+" { ? }"}function Nn(e,t,r,n){return e+" ("+t+") {"+(n?An(r,n):r.join(", "))+"}"}function An(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+e.join(","+r)+"\n"+t.prev}function xn(e,t){var r=gn(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=bn(e,o)?t(e[o],e):""}var a,i="function"==typeof sn?sn(e):[];if(ln){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var c in e)bn(e,c)&&(r&&String(Number(c))===c&&c<e.length||ln&&a["$"+c]instanceof Symbol||(/[^\w$]/.test(c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if("function"==typeof sn)for(var l=0;l<i.length;l++)un.call(e,i[l])&&n.push("["+t(i[l])+"]: "+t(e[i[l]],e));return n}var jn=Ur,Cn=function(e,t){var r=Br(e,!!t);return"function"==typeof r&&qr(e,".prototype.")>-1?Fr(r):r},Tn=function e(t,r,n,o){var a=r||{};if(bn(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(bn(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!bn(a,"customInspect")||a.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(bn(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Pn(t,a);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var s=void 0===a.depth?5:a.depth;if(void 0===n&&(n=0),n>=s&&s>0&&"object"==typeof t)return gn(t)?"[Array]":"[Object]";var c=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Array(e.indent+1).join(" ")}return{base:r,prev:Array(t+1).join(r)}}(a,n);if(void 0===o)o=[];else if(En(o,t)>=0)return"[Circular]";function l(t,r,i){if(r&&(o=o.slice()).push(r),i){var s={depth:a.depth};return bn(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,n+1,o)}return e(t,a,n+1,o)}if("function"==typeof t){var u=function(e){if(e.name)return e.name;var t=on.call(nn.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),p=xn(t,l);return"[Function"+(u?": "+u:" (anonymous)")+"]"+(p.length>0?" { "+p.join(", ")+" }":"")}if(vn(t)){var d=ln?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):cn.call(t);return"object"!=typeof t||ln?d:On(d)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var f="<"+String(t.nodeName).toLowerCase(),h=t.attributes||[],m=0;m<h.length;m++)f+=" "+h[m].name+"="+mn(yn(h[m].value),"double",a);return f+=">",t.childNodes&&t.childNodes.length&&(f+="..."),f+="</"+String(t.nodeName).toLowerCase()+">"}if(gn(t)){if(0===t.length)return"[]";var y=xn(t,l);return c&&!function(e){for(var t=0;t<e.length;t++)if(En(e[t],"\n")>=0)return!1;return!0}(y)?"["+An(y,c)+"]":"[ "+y.join(", ")+" ]"}if(function(e){return!("[object Error]"!==wn(e)||hn&&"object"==typeof e&&hn in e)}(t)){var g=xn(t,l);return 0===g.length?"["+String(t)+"]":"{ ["+String(t)+"] "+g.join(", ")+" }"}if("object"==typeof t&&i){if(fn&&"function"==typeof t[fn])return t[fn]();if("symbol"!==i&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!Vr||!e||"object"!=typeof e)return!1;try{Vr.call(e);try{Qr.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var v=[];return Gr.call(t,(function(e,r){v.push(l(r,t,!0)+" => "+l(e,t))})),Nn("Map",Vr.call(t),v,c)}if(function(e){if(!Qr||!e||"object"!=typeof e)return!1;try{Qr.call(e);try{Vr.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var _=[];return Jr.call(t,(function(e){_.push(l(e,t))})),Nn("Set",Qr.call(t),_,c)}if(function(e){if(!Kr||!e||"object"!=typeof e)return!1;try{Kr.call(e,Kr);try{Zr.call(e,Zr)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Rn("WeakMap");if(function(e){if(!Zr||!e||"object"!=typeof e)return!1;try{Zr.call(e,Zr);try{Kr.call(e,Kr)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Rn("WeakSet");if(function(e){if(!en||!e||"object"!=typeof e)return!1;try{return en.call(e),!0}catch(e){}return!1}(t))return Rn("WeakRef");if(function(e){return!("[object Number]"!==wn(e)||hn&&"object"==typeof e&&hn in e)}(t))return On(l(Number(t)));if(function(e){if(!e||"object"!=typeof e||!an)return!1;try{return an.call(e),!0}catch(e){}return!1}(t))return On(l(an.call(t)));if(function(e){return!("[object Boolean]"!==wn(e)||hn&&"object"==typeof e&&hn in e)}(t))return On(tn.call(t));if(function(e){return!("[object String]"!==wn(e)||hn&&"object"==typeof e&&hn in e)}(t))return On(l(String(t)));if(!function(e){return!("[object Date]"!==wn(e)||hn&&"object"==typeof e&&hn in e)}(t)&&!function(e){return!("[object RegExp]"!==wn(e)||hn&&"object"==typeof e&&hn in e)}(t)){var b=xn(t,l),w=pn?pn(t)===Object.prototype:t instanceof Object||t.constructor===Object,E=t instanceof Object?"":"null prototype",P=!w&&hn&&Object(t)===t&&hn in t?wn(t).slice(8,-1):E?"Object":"",S=(w||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(P||E?"["+[].concat(P||[],E||[]).join(": ")+"] ":"");return 0===b.length?S+"{}":c?S+"{"+An(b,c)+"}":S+"{ "+b.join(", ")+" }"}return String(t)},In=jn("%TypeError%"),Ln=jn("%WeakMap%",!0),Mn=jn("%Map%",!0),kn=Cn("WeakMap.prototype.get",!0),Dn=Cn("WeakMap.prototype.set",!0),Un=Cn("WeakMap.prototype.has",!0),$n=Cn("Map.prototype.get",!0),Bn=Cn("Map.prototype.set",!0),Fn=Cn("Map.prototype.has",!0),qn=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Wn=String.prototype.replace,Hn=/%20/g,zn="RFC3986",Vn={default:zn,formatters:{RFC1738:function(e){return Wn.call(e,Hn,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:zn},Gn=Vn,Xn=Object.prototype.hasOwnProperty,Yn=Array.isArray,Qn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Jn=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},Kn={arrayToObject:Jn,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],a=o.obj[o.prop],i=Object.keys(a),s=0;s<i.length;++s){var c=i[s],l=a[c];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:a,prop:c}),r.push(l))}return function(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Yn(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r,n,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var i="",s=0;s<a.length;++s){var c=a.charCodeAt(s);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===Gn.RFC1738&&(40===c||41===c)?i+=a.charAt(s):c<128?i+=Qn[c]:c<2048?i+=Qn[192|c>>6]+Qn[128|63&c]:c<55296||c>=57344?i+=Qn[224|c>>12]+Qn[128|c>>6&63]+Qn[128|63&c]:(s+=1,c=65536+((1023&c)<<10|1023&a.charCodeAt(s)),i+=Qn[240|c>>18]+Qn[128|c>>12&63]+Qn[128|c>>6&63]+Qn[128|63&c])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(Yn(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,n){if(!r)return t;if("object"!=typeof r){if(Yn(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(n&&(n.plainObjects||n.allowPrototypes)||!Xn.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var o=t;return Yn(t)&&!Yn(r)&&(o=Jn(t,n)),Yn(t)&&Yn(r)?(r.forEach((function(r,o){if(Xn.call(t,o)){var a=t[o];a&&"object"==typeof a&&r&&"object"==typeof r?t[o]=e(a,r,n):t.push(r)}else t[o]=r})),t):Object.keys(r).reduce((function(t,o){var a=r[o];return Xn.call(t,o)?t[o]=e(t[o],a,n):t[o]=a,t}),o)}},Zn=function(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new In("Side channel does not contain "+Tn(e))},get:function(n){if(Ln&&n&&("object"==typeof n||"function"==typeof n)){if(e)return kn(e,n)}else if(Mn){if(t)return $n(t,n)}else if(r)return function(e,t){var r=qn(e,t);return r&&r.value}(r,n)},has:function(n){if(Ln&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Un(e,n)}else if(Mn){if(t)return Fn(t,n)}else if(r)return function(e,t){return!!qn(e,t)}(r,n);return!1},set:function(n,o){Ln&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new Ln),Dn(e,n,o)):Mn?(t||(t=new Mn),Bn(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=qn(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},eo=Kn,to=Vn,ro=Object.prototype.hasOwnProperty,no={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},oo=Array.isArray,ao=String.prototype.split,io=Array.prototype.push,so=function(e,t){io.apply(e,oo(t)?t:[t])},co=Date.prototype.toISOString,lo=to.default,uo={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:eo.encode,encodeValuesOnly:!1,format:lo,formatter:to.formatters[lo],indices:!1,serializeDate:function(e){return co.call(e)},skipNulls:!1,strictNullHandling:!1},po={},fo=function e(t,r,n,o,a,i,s,c,l,u,p,d,f,h,m){for(var y,g=t,v=m,_=0,b=!1;void 0!==(v=v.get(po))&&!b;){var w=v.get(t);if(_+=1,void 0!==w){if(w===_)throw new RangeError("Cyclic object value");b=!0}void 0===v.get(po)&&(_=0)}if("function"==typeof s?g=s(r,g):g instanceof Date?g=u(g):"comma"===n&&oo(g)&&(g=eo.maybeMap(g,(function(e){return e instanceof Date?u(e):e}))),null===g){if(o)return i&&!f?i(r,uo.encoder,h,"key",p):r;g=""}if("string"==typeof(y=g)||"number"==typeof y||"boolean"==typeof y||"symbol"==typeof y||"bigint"==typeof y||eo.isBuffer(g)){if(i){var E=f?r:i(r,uo.encoder,h,"key",p);if("comma"===n&&f){for(var P=ao.call(String(g),","),S="",O=0;O<P.length;++O)S+=(0===O?"":",")+d(i(P[O],uo.encoder,h,"value",p));return[d(E)+"="+S]}return[d(E)+"="+d(i(g,uo.encoder,h,"value",p))]}return[d(r)+"="+d(String(g))]}var R,N=[];if(void 0===g)return N;if("comma"===n&&oo(g))R=[{value:g.length>0?g.join(",")||null:void 0}];else if(oo(s))R=s;else{var A=Object.keys(g);R=c?A.sort(c):A}for(var x=0;x<R.length;++x){var j=R[x],C="object"==typeof j&&void 0!==j.value?j.value:g[j];if(!a||null!==C){var T=oo(g)?"function"==typeof n?n(r,j):r:r+(l?"."+j:"["+j+"]");m.set(t,_);var I=Zn();I.set(po,m),so(N,e(C,T,n,o,a,i,s,c,l,u,p,d,f,h,I))}}return N},ho=Kn,mo=Object.prototype.hasOwnProperty,yo=Array.isArray,go={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ho.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},vo=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},_o=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},bo=function(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,i=r.depth>0&&/(\[[^[\]]*])/.exec(o),s=i?o.slice(0,i.index):o,c=[];if(s){if(!r.plainObjects&&mo.call(Object.prototype,s)&&!r.allowPrototypes)return;c.push(s)}for(var l=0;r.depth>0&&null!==(i=a.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&mo.call(Object.prototype,i[1].slice(1,-1))&&!r.allowPrototypes)return;c.push(i[1])}return i&&c.push("["+o.slice(i.index)+"]"),function(e,t,r,n){for(var o=n?t:_o(t,r),a=e.length-1;a>=0;--a){var i,s=e[a];if("[]"===s&&r.parseArrays)i=[].concat(o);else{i=r.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,l=parseInt(c,10);r.parseArrays||""!==c?!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(i=[])[l]=o:"__proto__"!==c&&(i[c]=o):i={0:o}}o=i}return o}(c,t,r,n)}},wo=function(e,t){var r,n=e,o=function(e){if(!e)return uo;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||uo.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=to.default;if(void 0!==e.format){if(!ro.call(to.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=to.formatters[r],o=uo.filter;return("function"==typeof e.filter||oo(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:uo.addQueryPrefix,allowDots:void 0===e.allowDots?uo.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:uo.charsetSentinel,delimiter:void 0===e.delimiter?uo.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:uo.encode,encoder:"function"==typeof e.encoder?e.encoder:uo.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:uo.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:uo.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:uo.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:uo.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):oo(o.filter)&&(r=o.filter);var a,i=[];if("object"!=typeof n||null===n)return"";a=t&&t.arrayFormat in no?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=no[a];r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var c=Zn(),l=0;l<r.length;++l){var u=r[l];o.skipNulls&&null===n[u]||so(i,fo(n[u],u,s,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var p=i.join(o.delimiter),d=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),p.length>0?d+p:""},Eo=function(e,t){var r=function(e){if(!e)return go;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?go.charset:e.charset;return{allowDots:void 0===e.allowDots?go.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:go.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:go.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:go.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:go.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:go.comma,decoder:"function"==typeof e.decoder?e.decoder:go.decoder,delimiter:"string"==typeof e.delimiter||ho.isRegExp(e.delimiter)?e.delimiter:go.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:go.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:go.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:go.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:go.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:go.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,i=o.split(t.delimiter,a),s=-1,c=t.charset;if(t.charsetSentinel)for(r=0;r<i.length;++r)0===i[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===i[r]?c="utf-8":"utf8=%26%2310003%3B"===i[r]&&(c="iso-8859-1"),s=r,r=i.length);for(r=0;r<i.length;++r)if(r!==s){var l,u,p=i[r],d=p.indexOf("]="),f=-1===d?p.indexOf("="):d+1;-1===f?(l=t.decoder(p,go.decoder,c,"key"),u=t.strictNullHandling?null:""):(l=t.decoder(p.slice(0,f),go.decoder,c,"key"),u=ho.maybeMap(_o(p.slice(f+1),t),(function(e){return t.decoder(e,go.decoder,c,"value")}))),u&&t.interpretNumericEntities&&"iso-8859-1"===c&&(u=vo(u)),p.indexOf("[]=")>-1&&(u=yo(u)?[u]:u),mo.call(n,l)?n[l]=ho.combine(n[l],u):n[l]=u}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},a=Object.keys(n),i=0;i<a.length;++i){var s=a[i],c=bo(s,n[s],r,"string"==typeof e);o=ho.merge(o,c,r)}return!0===r.allowSparse?o:ho.compact(o)},Po={formats:Vn,parse:Eo,stringify:wo},So={},Oo={},Ro={};function No(e){return e.endsWith("/")&&"/"!==e?e.slice(0,-1):e}Object.defineProperty(Ro,"__esModule",{value:!0}),Ro.removePathTrailingSlash=No,Ro.normalizePathTrailingSlash=void 0;const Ao=process.env.__NEXT_TRAILING_SLASH?e=>/\.[^/]+\/?$/.test(e)?No(e):e.endsWith("/")?e:e+"/":No;Ro.normalizePathTrailingSlash=Ao;var xo={},jo={};Object.defineProperty(jo,"__esModule",{value:!0}),jo.default=function(e,t=""){return("/"===e?"/index":/^\/index(\/|$)/.test(e)?`/index${e}`:`${e}`)+t};var Co={};Object.defineProperty(Co,"__esModule",{value:!0}),Co.cancelIdleCallback=Co.requestIdleCallback=void 0;const To="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)};Co.requestIdleCallback=To;const Io="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};Co.cancelIdleCallback=Io,Object.defineProperty(xo,"__esModule",{value:!0}),xo.markAssetError=Bo,xo.isAssetError=function(e){return e&&$o in e},xo.getClientBuildManifest=Ho,xo.getMiddlewareManifest=function(){if(self.__MIDDLEWARE_MANIFEST)return Promise.resolve(self.__MIDDLEWARE_MANIFEST);return Wo(new Promise((e=>{const t=self.__MIDDLEWARE_MANIFEST_CB;self.__MIDDLEWARE_MANIFEST_CB=()=>{e(self.__MIDDLEWARE_MANIFEST),t&&t()}})),3800,Bo(new Error("Failed to load client middleware manifest")))},xo.createRouteLoader=function(e){const t=new Map,r=new Map,n=new Map,o=new Map;function a(e){if("development"!==process.env.NODE_ENV){let t=r.get(e);return t||(document.querySelector(`script[src^="${e}"]`)?Promise.resolve():(r.set(e,t=Fo(e)),t))}return Fo(e)}function i(e){let t=n.get(e);return t||(n.set(e,t=fetch(e).then((t=>{if(!t.ok)throw new Error(`Failed to load stylesheet: ${e}`);return t.text().then((t=>({href:e,content:t})))})).catch((e=>{throw Bo(e)}))),t)}return{whenEntrypoint:e=>Do(e,t),onEntrypoint(e,r){(r?Promise.resolve().then((()=>r())).then((e=>({component:e&&e.default||e,exports:e})),(e=>({error:e}))):Promise.resolve(void 0)).then((r=>{const n=t.get(e);n&&"resolve"in n?r&&(t.set(e,r),n.resolve(r)):(r?t.set(e,r):t.delete(e),o.delete(e))}))},loadRoute(r,n){return Do(r,o,(()=>{let o;return"development"===process.env.NODE_ENV&&(qo=new Promise((e=>{o=e}))),Wo(zo(e,r).then((({scripts:e,css:n})=>Promise.all([t.has(r)?[]:Promise.all(e.map(a)),Promise.all(n.map(i))]))).then((e=>this.whenEntrypoint(r).then((t=>({entrypoint:t,styles:e[1]}))))),3800,Bo(new Error(`Route did not complete loading: ${r}`))).then((({entrypoint:e,styles:t})=>{const r=Object.assign({styles:t},e);return"error"in e?e:r})).catch((e=>{if(n)throw e;return{error:e}})).finally((()=>null==o?void 0:o()))}))},prefetch(t){let r;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():zo(e,t).then((e=>Promise.all(Uo?e.scripts.map((e=>{return t=e,r="script",new Promise(((e,o)=>{const a=`\n link[rel="prefetch"][href^="${t}"],\n link[rel="preload"][href^="${t}"],\n script[src^="${t}"]`;if(document.querySelector(a))return e();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=process.env.__NEXT_CROSS_ORIGIN,n.onload=e,n.onerror=o,n.href=t,document.head.appendChild(n)}));var t,r,n})):[]))).then((()=>{ko.requestIdleCallback((()=>this.loadRoute(t,!0).catch((()=>{}))))})).catch((()=>{}))}}};var Lo,Mo=(Lo=jo)&&Lo.__esModule?Lo:{default:Lo},ko=Co;function Do(e,t,r){let n,o=t.get(e);if(o)return"future"in o?o.future:Promise.resolve(o);const a=new Promise((e=>{n=e}));return t.set(e,o={resolve:n,future:a}),r?r().then((e=>(n(e),e))).catch((r=>{throw t.delete(e),r})):a}const Uo=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}();const $o=Symbol("ASSET_LOAD_ERROR");function Bo(e){return Object.defineProperty(e,$o,{})}function Fo(e,t){return new Promise(((r,n)=>{(t=document.createElement("script")).onload=r,t.onerror=()=>n(Bo(new Error(`Failed to load script: ${e}`))),t.crossOrigin=process.env.__NEXT_CROSS_ORIGIN,t.src=e,document.body.appendChild(t)}))}let qo;function Wo(e,t,r){return new Promise(((n,o)=>{let a=!1;e.then((e=>{a=!0,n(e)})).catch(o),"development"===process.env.NODE_ENV&&(qo||Promise.resolve()).then((()=>{ko.requestIdleCallback((()=>setTimeout((()=>{a||o(r)}),t)))})),"development"!==process.env.NODE_ENV&&ko.requestIdleCallback((()=>setTimeout((()=>{a||o(r)}),t)))}))}function Ho(){if(self.__BUILD_MANIFEST)return Promise.resolve(self.__BUILD_MANIFEST);return Wo(new Promise((e=>{const t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}})),3800,Bo(new Error("Failed to load client build manifest")))}function zo(e,t){return"development"===process.env.NODE_ENV?Promise.resolve({scripts:[e+"/_next/static/chunks/pages"+encodeURI(Mo.default(t,".js"))],css:[]}):Ho().then((r=>{if(!(t in r))throw Bo(new Error(`Failed to lookup route: ${t}`));const n=r[t].map((t=>e+"/_next/"+encodeURI(t)));return{scripts:n.filter((e=>e.endsWith(".js"))),css:n.filter((e=>e.endsWith(".css")))}}))}var Vo={},Go={};function Xo(e){return Object.prototype.toString.call(e)}Object.defineProperty(Go,"__esModule",{value:!0}),Go.getObjectClassLabel=Xo,Go.isPlainObject=function(e){if("[object Object]"!==Xo(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype},Object.defineProperty(Vo,"__esModule",{value:!0}),Vo.default=Qo,Vo.getProperError=function(e){if(Qo(e))return e;if("development"===process.env.NODE_ENV){if(void 0===e)return new Error("An undefined error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined");if(null===e)return new Error("A null error was thrown, see here for more info: https://nextjs.org/docs/messages/threw-undefined")}return new Error(Yo.isPlainObject(e)?JSON.stringify(e):e+"")};var Yo=Go;function Qo(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}var Jo={},Ko={},Zo={},ea={};function ta(e){return e.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")}function ra(e){const t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));const r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function na(e){const t=(e.replace(/\/$/,"")||"/").slice(1).split("/"),r={};let n=1;const o=t.map((e=>{if(e.startsWith("[")&&e.endsWith("]")){const{key:t,optional:o,repeat:a}=ra(e.slice(1,-1));return r[t]={pos:n++,repeat:a,optional:o},a?o?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}return`/${ta(e)}`})).join("");if("undefined"==typeof window){let e=97,n=1;const a=()=>{let t="";for(let r=0;r<n;r++)t+=String.fromCharCode(e),e++,e>122&&(n++,e=97);return t},i={};return{parameterizedRoute:o,namedParameterizedRoute:t.map((e=>{if(e.startsWith("[")&&e.endsWith("]")){const{key:t,optional:r,repeat:n}=ra(e.slice(1,-1));let o=t.replace(/\W/g,""),s=!1;return(0===o.length||o.length>30)&&(s=!0),isNaN(parseInt(o.substr(0,1)))||(s=!0),s&&(o=a()),i[o]=t,n?r?`(?:/(?<${o}>.+?))?`:`/(?<${o}>.+?)`:`/(?<${o}>[^/]+?)`}return`/${ta(e)}`})).join(""),groups:r,routeKeys:i}}return{parameterizedRoute:o,groups:r}}Object.defineProperty(ea,"__esModule",{value:!0}),ea.getParametrizedRoute=na,ea.getRouteRegex=function(e){const t=na(e);if("routeKeys"in t)return{re:new RegExp(`^${t.parameterizedRoute}(?:/)?$`),groups:t.groups,routeKeys:t.routeKeys,namedRegex:`^${t.namedParameterizedRoute}(?:/)?$`};return{re:new RegExp(`^${t.parameterizedRoute}(?:/)?$`),groups:t.groups}},Object.defineProperty(Zo,"__esModule",{value:!0}),Zo.getMiddlewareRegex=function(e,t=!0){const r=oa.getParametrizedRoute(e);let n=t?"(?!_next).*":"",o=t?"(?:(/.*)?)":"";if("routeKeys"in r)return"/"===r.parameterizedRoute?{groups:{},namedRegex:`^/${n}$`,re:new RegExp(`^/${n}$`),routeKeys:{}}:{groups:r.groups,namedRegex:`^${r.namedParameterizedRoute}${o}$`,re:new RegExp(`^${r.parameterizedRoute}${o}$`),routeKeys:r.routeKeys};if("/"===r.parameterizedRoute)return{groups:{},re:new RegExp(`^/${n}$`)};return{groups:{},re:new RegExp(`^${r.parameterizedRoute}${o}$`)}};var oa=ea;var aa={},ia={},sa={},ca={};function la(e){return"string"==typeof e||"number"==typeof e&&!isNaN(e)||"boolean"==typeof e?String(e):""}Object.defineProperty(ca,"__esModule",{value:!0}),ca.searchParamsToUrlQuery=function(e){const t={};return e.forEach(((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]})),t},ca.urlQueryToSearchParams=function(e){const t=new URLSearchParams;return Object.entries(e).forEach((([e,r])=>{Array.isArray(r)?r.forEach((r=>t.append(e,la(r)))):t.set(e,la(r))})),t},ca.assign=function(e,...t){return t.forEach((t=>{Array.from(t.keys()).forEach((t=>e.delete(t))),t.forEach(((t,r)=>e.append(r,t)))})),e},Object.defineProperty(sa,"__esModule",{value:!0}),sa.formatUrl=function(e){let{auth:t,hostname:r}=e,n=e.protocol||"",o=e.pathname||"",a=e.hash||"",i=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(s+=":"+e.port));i&&"object"==typeof i&&(i=String(ua.urlQueryToSearchParams(i)));let c=e.search||i&&`?${i}`||"";n&&":"!==n.substr(-1)&&(n+=":");e.slashes||(!n||pa.test(n))&&!1!==s?(s="//"+(s||""),o&&"/"!==o[0]&&(o="/"+o)):s||(s="");a&&"#"!==a[0]&&(a="#"+a);c&&"?"!==c[0]&&(c="?"+c);return o=o.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${s}${o}${c}${a}`};var ua=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(ca);const pa=/https?|ftp|gopher|file/;Object.defineProperty(ia,"__esModule",{value:!0}),ia.execOnce=function(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)},ia.getLocationOrigin=ha,ia.getURL=function(){const{href:e}=window.location,t=ha();return e.substring(t.length)},ia.getDisplayName=ma,ia.isResSent=ya,ia.normalizeRepeatedSlashes=function(e){const t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")},ia.loadGetInitialProps=async function e(t,r){var n;if("production"!==process.env.NODE_ENV&&(null===(n=t.prototype)||void 0===n?void 0:n.getInitialProps)){const e=`"${ma(t)}.getInitialProps()" is defined as an instance method - visit https://nextjs.org/docs/messages/get-initial-props-as-an-instance-method for more information.`;throw new Error(e)}const o=r.res||r.ctx&&r.ctx.res;if(!t.getInitialProps)return r.ctx&&r.Component?{pageProps:await e(r.Component,r.ctx)}:{};const a=await t.getInitialProps(r);if(o&&ya(o))return a;if(!a){const e=`"${ma(t)}.getInitialProps()" should resolve to an object. But found "${a}" instead.`;throw new Error(e)}"production"!==process.env.NODE_ENV&&(0!==Object.keys(a).length||r.ctx||console.warn(`${ma(t)} returned an empty object from \`getInitialProps\`. This de-optimizes and prevents automatic static optimization. https://nextjs.org/docs/messages/empty-object-getInitialProps`));return a},ia.formatWithValidation=function(e){"development"===process.env.NODE_ENV&&null!==e&&"object"==typeof e&&Object.keys(e).forEach((e=>{-1===ga.indexOf(e)&&console.warn(`Unknown key passed via urlObject into url.format: ${e}`)}));return fa.formatUrl(e)},ia.HtmlContext=ia.ST=ia.SP=ia.urlObjectKeys=void 0;var da=s,fa=sa;function ha(){const{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function ma(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function ya(e){return e.finished||e.headersSent}const ga=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];ia.urlObjectKeys=ga;const va="undefined"!=typeof performance;ia.SP=va;const _a=va&&"function"==typeof performance.mark&&"function"==typeof performance.measure;ia.ST=_a;class ba extends Error{}ia.DecodeError=ba;const wa=da.createContext(null);ia.HtmlContext=wa,"production"!==process.env.NODE_ENV&&(wa.displayName="HtmlContext"),Object.defineProperty(aa,"__esModule",{value:!0}),aa.getRouteMatcher=function(e){const{re:t,groups:r}=e;return e=>{const n=t.exec(e);if(!n)return!1;const o=e=>{try{return decodeURIComponent(e)}catch(e){throw new Ea.DecodeError("failed to decode param")}},a={};return Object.keys(r).forEach((e=>{const t=r[e],i=n[t.pos];void 0!==i&&(a[e]=~i.indexOf("/")?i.split("/").map((e=>o(e))):t.repeat?[o(i)]:o(i))})),a}};var Ea=ia;var Pa={};Object.defineProperty(Pa,"__esModule",{value:!0}),Pa.getSortedRoutes=function(e){const t=new Sa;return e.forEach((e=>t.insert(e))),t.smoosh()};class Sa{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e="/"){const t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);const r=t.map((t=>this.children.get(t)._smoosh(`${e}${t}/`))).reduce(((e,t)=>[...e,...t]),[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(`${e}[${this.slugName}]/`)),!this.placeholder){const t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw new Error(`You cannot define a route with the same specificity as a optional catch-all route ("${t}" and "${t}[[...${this.optionalRestSlugName}]]").`);r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(`${e}[...${this.restSlugName}]/`)),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(`${e}[[...${this.optionalRestSlugName}]]/`)),r}_insert(e,t,r){if(0===e.length)return void(this.placeholder=!1);if(r)throw new Error("Catch-all must be the last part of the URL.");let n=e[0];if(n.startsWith("[")&&n.endsWith("]")){let o=n.slice(1,-1),a=!1;if(o.startsWith("[")&&o.endsWith("]")&&(o=o.slice(1,-1),a=!0),o.startsWith("...")&&(o=o.substring(3),r=!0),o.startsWith("[")||o.endsWith("]"))throw new Error(`Segment names may not start or end with extra brackets ('${o}').`);if(o.startsWith("."))throw new Error(`Segment names may not start with erroneous periods ('${o}').`);function i(e,r){if(null!==e&&e!==r)throw new Error(`You cannot use different slug names for the same dynamic path ('${e}' !== '${r}').`);t.forEach((e=>{if(e===r)throw new Error(`You cannot have the same slug name "${r}" repeat within a single dynamic path`);if(e.replace(/\W/g,"")===n.replace(/\W/g,""))throw new Error(`You cannot have the slug names "${e}" and "${r}" differ only by non-word symbols within a single dynamic path`)})),t.push(r)}if(r)if(a){if(null!=this.restSlugName)throw new Error(`You cannot use both an required and optional catch-all route at the same level ("[...${this.restSlugName}]" and "${e[0]}" ).`);i(this.optionalRestSlugName,o),this.optionalRestSlugName=o,n="[[...]]"}else{if(null!=this.optionalRestSlugName)throw new Error(`You cannot use both an optional and required catch-all route at the same level ("[[...${this.optionalRestSlugName}]]" and "${e[0]}").`);i(this.restSlugName,o),this.restSlugName=o,n="[...]"}else{if(a)throw new Error(`Optional route parameters are not yet supported ("${e[0]}").`);i(this.slugName,o),this.slugName=o,n="[]"}}this.children.has(n)||this.children.set(n,new Sa),this.children.get(n)._insert(e.slice(1),t,r)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}var Oa={};Object.defineProperty(Oa,"__esModule",{value:!0}),Oa.isDynamicRoute=function(e){return Ra.test(e)};const Ra=/\/\[[^/]+?\](?=\/|$)/;!function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"getMiddlewareRegex",{enumerable:!0,get:function(){return t.getMiddlewareRegex}}),Object.defineProperty(e,"getRouteMatcher",{enumerable:!0,get:function(){return r.getRouteMatcher}}),Object.defineProperty(e,"getRouteRegex",{enumerable:!0,get:function(){return n.getRouteRegex}}),Object.defineProperty(e,"getSortedRoutes",{enumerable:!0,get:function(){return o.getSortedRoutes}}),Object.defineProperty(e,"isDynamicRoute",{enumerable:!0,get:function(){return a.isDynamicRoute}});var t=Zo,r=aa,n=ea,o=Pa,a=Oa}(Ko),Object.defineProperty(Jo,"__esModule",{value:!0}),Jo.normalizePathSep=Aa,Jo.denormalizePagePath=function(e){(e=Aa(e)).startsWith("/index/")&&!Na.isDynamicRoute(e)?e=e.slice(6):"/index"===e&&(e="/");return e};var Na=Ko;function Aa(e){return e.replace(/\\/g,"/")}var xa={};Object.defineProperty(xa,"__esModule",{value:!0}),xa.normalizeLocalePath=function(e,t){let r;const n=e.split("/");return(t||[]).some((t=>!(!n[1]||n[1].toLowerCase()!==t.toLowerCase())&&(r=t,n.splice(1,1),e=n.join("/")||"/",!0))),{pathname:e,detectedLocale:r}};var ja={};Object.defineProperty(ja,"__esModule",{value:!0}),ja.default=function(){const e=Object.create(null);return{on(t,r){(e[t]||(e[t]=[])).push(r)},off(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit(t,...r){(e[t]||[]).slice().map((e=>{e(...r)}))}}};var Ca={};Object.defineProperty(Ca,"__esModule",{value:!0}),Ca.parseRelativeUrl=function(e,t){const r=new URL("undefined"==typeof window?"http://n":Ta.getLocationOrigin()),n=t?new URL(t,r):r,{pathname:o,searchParams:a,search:i,hash:s,href:c,origin:l}=new URL(e,n);if(l!==r.origin)throw new Error(`invariant: invalid relative URL, router received ${e}`);return{pathname:o,query:Ia.searchParamsToUrlQuery(a),search:i,hash:s,href:c.slice(r.origin.length)}};var Ta=ia,Ia=ca;var La={},Ma={},ka={};function Da(e,t){void 0===t&&(t={});for(var r=function(e){for(var t=[],r=0;r<e.length;){var n=e[r];if("*"!==n&&"+"!==n&&"?"!==n)if("\\"!==n)if("{"!==n)if("}"!==n)if(":"!==n)if("("!==n)t.push({type:"CHAR",index:r,value:e[r++]});else{var o=1,a="";if("?"===e[s=r+1])throw new TypeError('Pattern cannot start with "?" at '+s);for(;s<e.length;)if("\\"!==e[s]){if(")"===e[s]){if(0==--o){s++;break}}else if("("===e[s]&&(o++,"?"!==e[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);a+=e[s++]}else a+=e[s++]+e[s++];if(o)throw new TypeError("Unbalanced pattern at "+r);if(!a)throw new TypeError("Missing pattern at "+r);t.push({type:"PATTERN",index:r,value:a}),r=s}else{for(var i="",s=r+1;s<e.length;){var c=e.charCodeAt(s);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;i+=e[s++]}if(!i)throw new TypeError("Missing parameter name at "+r);t.push({type:"NAME",index:r,value:i}),r=s}else t.push({type:"CLOSE",index:r,value:e[r++]});else t.push({type:"OPEN",index:r,value:e[r++]});else t.push({type:"ESCAPED_CHAR",index:r++,value:e[r++]});else t.push({type:"MODIFIER",index:r,value:e[r++]})}return t.push({type:"END",index:r,value:""}),t}(e),n=t.prefixes,o=void 0===n?"./":n,a="[^"+Ba(t.delimiter||"/#?")+"]+?",i=[],s=0,c=0,l="",u=function(e){if(c<r.length&&r[c].type===e)return r[c++].value},p=function(e){var t=u(e);if(void 0!==t)return t;var n=r[c],o=n.type,a=n.index;throw new TypeError("Unexpected "+o+" at "+a+", expected "+e)},d=function(){for(var e,t="";e=u("CHAR")||u("ESCAPED_CHAR");)t+=e;return t};c<r.length;){var f=u("CHAR"),h=u("NAME"),m=u("PATTERN");if(h||m){var y=f||"";-1===o.indexOf(y)&&(l+=y,y=""),l&&(i.push(l),l=""),i.push({name:h||s++,prefix:y,suffix:"",pattern:m||a,modifier:u("MODIFIER")||""})}else{var g=f||u("ESCAPED_CHAR");if(g)l+=g;else if(l&&(i.push(l),l=""),u("OPEN")){y=d();var v=u("NAME")||"",_=u("PATTERN")||"",b=d();p("CLOSE"),i.push({name:v||(_?s++:""),pattern:v&&!_?a:_,prefix:y,suffix:b,modifier:u("MODIFIER")||""})}else p("END")}}return i}function Ua(e,t){void 0===t&&(t={});var r=Fa(t),n=t.encode,o=void 0===n?function(e){return e}:n,a=t.validate,i=void 0===a||a,s=e.map((function(e){if("object"==typeof e)return new RegExp("^(?:"+e.pattern+")$",r)}));return function(t){for(var r="",n=0;n<e.length;n++){var a=e[n];if("string"!=typeof a){var c=t?t[a.name]:void 0,l="?"===a.modifier||"*"===a.modifier,u="*"===a.modifier||"+"===a.modifier;if(Array.isArray(c)){if(!u)throw new TypeError('Expected "'+a.name+'" to not repeat, but got an array');if(0===c.length){if(l)continue;throw new TypeError('Expected "'+a.name+'" to not be empty')}for(var p=0;p<c.length;p++){var d=o(c[p],a);if(i&&!s[n].test(d))throw new TypeError('Expected all "'+a.name+'" to match "'+a.pattern+'", but got "'+d+'"');r+=a.prefix+d+a.suffix}}else if("string"!=typeof c&&"number"!=typeof c){if(!l){var f=u?"an array":"a string";throw new TypeError('Expected "'+a.name+'" to be '+f)}}else{d=o(String(c),a);if(i&&!s[n].test(d))throw new TypeError('Expected "'+a.name+'" to match "'+a.pattern+'", but got "'+d+'"');r+=a.prefix+d+a.suffix}}else r+=a}return r}}function $a(e,t,r){void 0===r&&(r={});var n=r.decode,o=void 0===n?function(e){return e}:n;return function(r){var n=e.exec(r);if(!n)return!1;for(var a=n[0],i=n.index,s=Object.create(null),c=function(e){if(void 0===n[e])return"continue";var r=t[e-1];"*"===r.modifier||"+"===r.modifier?s[r.name]=n[e].split(r.prefix+r.suffix).map((function(e){return o(e,r)})):s[r.name]=o(n[e],r)},l=1;l<n.length;l++)c(l);return{path:a,index:i,params:s}}}function Ba(e){return e.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function Fa(e){return e&&e.sensitive?"":"i"}function qa(e,t,r){void 0===r&&(r={});for(var n=r.strict,o=void 0!==n&&n,a=r.start,i=void 0===a||a,s=r.end,c=void 0===s||s,l=r.encode,u=void 0===l?function(e){return e}:l,p="["+Ba(r.endsWith||"")+"]|$",d="["+Ba(r.delimiter||"/#?")+"]",f=i?"^":"",h=0,m=e;h<m.length;h++){var y=m[h];if("string"==typeof y)f+=Ba(u(y));else{var g=Ba(u(y.prefix)),v=Ba(u(y.suffix));if(y.pattern)if(t&&t.push(y),g||v)if("+"===y.modifier||"*"===y.modifier){var _="*"===y.modifier?"?":"";f+="(?:"+g+"((?:"+y.pattern+")(?:"+v+g+"(?:"+y.pattern+"))*)"+v+")"+_}else f+="(?:"+g+"("+y.pattern+")"+v+")"+y.modifier;else f+="("+y.pattern+")"+y.modifier;else f+="(?:"+g+v+")"+y.modifier}}if(c)o||(f+=d+"?"),f+=r.endsWith?"(?="+p+")":"$";else{var b=e[e.length-1],w="string"==typeof b?d.indexOf(b[b.length-1])>-1:void 0===b;o||(f+="(?:"+d+"(?="+p+"))?"),w||(f+="(?="+d+"|"+p+")")}return new RegExp(f,Fa(r))}function Wa(e,t,r){return e instanceof RegExp?function(e,t){if(!t)return e;var r=e.source.match(/\((?!\?)/g);if(r)for(var n=0;n<r.length;n++)t.push({name:n,prefix:"",suffix:"",modifier:"",pattern:""});return e}(e,t):Array.isArray(e)?function(e,t,r){var n=e.map((function(e){return Wa(e,t,r).source}));return new RegExp("(?:"+n.join("|")+")",Fa(r))}(e,t,r):function(e,t,r){return qa(Da(e,r),t,r)}(e,t,r)}Object.defineProperty(ka,"__esModule",{value:!0}),ka.parse=Da,ka.compile=function(e,t){return Ua(Da(e,t),t)},ka.tokensToFunction=Ua,ka.match=function(e,t){var r=[];return $a(Wa(e,r,t),r,t)},ka.regexpToFunction=$a,ka.tokensToRegexp=qa,ka.pathToRegexp=Wa,Object.defineProperty(Ma,"__esModule",{value:!0}),Ma.default=Ma.customRouteMatcherOptions=Ma.matcherOptions=Ma.pathToRegexp=void 0;var Ha=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(ka);Ma.pathToRegexp=Ha;const za={sensitive:!1,delimiter:"/"};Ma.matcherOptions=za;const Va={...za,strict:!0};Ma.customRouteMatcherOptions=Va;Ma.default=(e=!1)=>(t,r)=>{const n=[];let o=Ha.pathToRegexp(t,n,e?Va:za);if(r){const e=r(o.source);o=new RegExp(e,o.flags)}const a=Ha.regexpToFunction(o,n);return(t,r)=>{const o=null!=t&&a(t);if(!o)return!1;if(e)for(const e of n)"number"==typeof e.name&&delete o.params[e.name];return{...r,...o.params}}};var Ga={},Xa={};Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.escapeStringRegexp=function(e){return e.replace(/[|\\{}()[\]^$+*?.-]/g,"\\$&")};var Ya={};Object.defineProperty(Ya,"__esModule",{value:!0}),Ya.parseUrl=function(e){if(e.startsWith("/"))return Ja.parseRelativeUrl(e);const t=new URL(e);return{hash:t.hash,hostname:t.hostname,href:t.href,pathname:t.pathname,port:t.port,protocol:t.protocol,query:Qa.searchParamsToUrlQuery(t.searchParams),search:t.search}};var Qa=ca,Ja=Ca;Object.defineProperty(Ga,"__esModule",{value:!0}),Ga.matchHas=function(e,t,r){const n={};if(t.every((t=>{let o,a=t.key;switch(t.type){case"header":a=a.toLowerCase(),o=e.headers[a];break;case"cookie":o=e.cookies[t.key];break;case"query":o=r[a];break;case"host":{const{host:t}=(null==e?void 0:e.headers)||{};o=null==t?void 0:t.split(":")[0].toLowerCase();break}}if(!t.value&&o)return n[function(e){let t="";for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);(n>64&&n<91||n>96&&n<123)&&(t+=e[r])}return t}(a)]=o,!0;if(o){const e=new RegExp(`^${t.value}$`),r=Array.isArray(o)?o.slice(-1)[0].match(e):o.match(e);if(r)return Array.isArray(r)&&(r.groups?Object.keys(r.groups).forEach((e=>{n[e]=r.groups[e]})):"host"===t.type&&r[0]&&(n.host=r[0])),!0}return!1})))return n;return!1},Ga.compileNonPath=ti,Ga.prepareDestination=function(e){const t=Object.assign({},e.query);delete t.__nextLocale,delete t.__nextDefaultLocale;let r=e.destination;for(const o of Object.keys({...e.params,...t}))n=o,r=r.replace(new RegExp(`:${Za.escapeStringRegexp(n)}`,"g"),`__ESC_COLON_${n}`);var n;const o=ei.parseUrl(r),a=o.query,i=ri(`${o.pathname}${o.hash||""}`),s=ri(o.hostname||""),c=[],l=[];Ka.pathToRegexp(i,c),Ka.pathToRegexp(s,l);const u=[];c.forEach((e=>u.push(e.name))),l.forEach((e=>u.push(e.name)));const p=Ka.compile(i,{validate:!1}),d=Ka.compile(s,{validate:!1});for(const[t,r]of Object.entries(a))Array.isArray(r)?a[t]=r.map((t=>ti(ri(t),e.params))):a[t]=ti(ri(r),e.params);let f,h=Object.keys(e.params).filter((e=>"nextInternalLocale"!==e));if(e.appendParamsToQuery&&!h.some((e=>u.includes(e))))for(const t of h)t in a||(a[t]=e.params[t]);try{f=p(e.params);const[t,r]=f.split("#");o.hostname=d(e.params),o.pathname=t,o.hash=`${r?"#":""}${r||""}`,delete o.search}catch(e){if(e.message.match(/Expected .*? to not repeat, but got an array/))throw new Error("To use a multi-match in the destination you must add `*` at the end of the param name to signify it should repeat. https://nextjs.org/docs/messages/invalid-multi-match");throw e}return o.query={...t,...o.query},{newUrl:f,parsedDestination:o}};var Ka=ka,Za=Xa,ei=Ya;function ti(e,t){if(!e.includes(":"))return e;for(const r of Object.keys(t))e.includes(`:${r}`)&&(e=e.replace(new RegExp(`:${r}\\*`,"g"),`:${r}--ESCAPED_PARAM_ASTERISKS`).replace(new RegExp(`:${r}\\?`,"g"),`:${r}--ESCAPED_PARAM_QUESTION`).replace(new RegExp(`:${r}\\+`,"g"),`:${r}--ESCAPED_PARAM_PLUS`).replace(new RegExp(`:${r}(?!\\w)`,"g"),`--ESCAPED_PARAM_COLON${r}`));return e=e.replace(/(:|\*|\?|\+|\(|\)|\{|\})/g,"\\$1").replace(/--ESCAPED_PARAM_PLUS/g,"+").replace(/--ESCAPED_PARAM_COLON/g,":").replace(/--ESCAPED_PARAM_QUESTION/g,"?").replace(/--ESCAPED_PARAM_ASTERISKS/g,"*"),Ka.compile(`/${e}`,{validate:!1})(t).substr(1)}function ri(e){return e.replace(/__ESC_COLON_/gi,":")}Object.defineProperty(La,"__esModule",{value:!0}),La.default=function(e,t,r,n,o,a){let i,s=!1,c=!1,l=si.parseRelativeUrl(e),u=ai.removePathTrailingSlash(ii.normalizeLocalePath(ci.delBasePath(l.pathname),a).pathname);const p=r=>{let p=li(r.source)(l.pathname);if(r.has&&p){const e=oi.matchHas({headers:{host:document.location.hostname},cookies:document.cookie.split("; ").reduce(((e,t)=>{const[r,...n]=t.split("=");return e[r]=n.join("="),e}),{})},r.has,l.query);e?Object.assign(p,e):p=!1}if(p){if(!r.destination)return c=!0,!0;const d=oi.prepareDestination({appendParamsToQuery:!0,destination:r.destination,params:p,query:n});if(l=d.parsedDestination,e=d.newUrl,Object.assign(n,d.parsedDestination.query),u=ai.removePathTrailingSlash(ii.normalizeLocalePath(ci.delBasePath(e),a).pathname),t.includes(u))return s=!0,i=u,!0;if(i=o(u),i!==e&&t.includes(i))return s=!0,!0}};let d=!1;for(let e=0;e<r.beforeFiles.length;e++)d=p(r.beforeFiles[e])||!1;if(s=t.includes(u),!s){if(!d)for(let e=0;e<r.afterFiles.length;e++)if(p(r.afterFiles[e])){d=!0;break}if(d||(i=o(u),s=t.includes(i),d=s),!d)for(let e=0;e<r.fallback.length;e++)if(p(r.fallback[e])){d=!0;break}}return{asPath:e,parsedAs:l,matchedPage:s,resolvedHref:i,externalDest:c}};var ni=function(e){return e&&e.__esModule?e:{default:e}}(Ma),oi=Ga,ai=Ro,ii=xa,si=Ca,ci=Oo;const li=ni.default(!0);var ui={};Object.defineProperty(ui,"__esModule",{value:!0}),ui.detectDomainLocale=function(e,t,r){let n;if(e){r&&(r=r.toLowerCase());for(const i of e){var o,a;const e=null===(o=i.domain)||void 0===o?void 0:o.split(":")[0].toLowerCase();if(t===e||r===i.defaultLocale.toLowerCase()||(null===(a=i.locales)||void 0===a?void 0:a.some((e=>e.toLowerCase()===r)))){n=i;break}}}return n},Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.getDomainLocale=function(e,t,r,n){if(process.env.__NEXT_I18N_SUPPORT){t=t||mi.normalizeLocalePath(e,r).detectedLocale;const o=Ri(n,void 0,t);return!!o&&`http${o.http?"":"s"}://${o.domain}${Ni||""}${t===o.defaultLocale?"":`/${t}`}${e}`}return!1},Oo.addLocale=ji,Oo.delLocale=Ci,Oo.hasBasePath=Ii,Oo.addBasePath=Li,Oo.delBasePath=Mi,Oo.isLocalURL=ki,Oo.interpolateAs=Di,Oo.resolveHref=$i,Oo.default=void 0;var pi=Ro,di=xo,fi=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(Vo),hi=Jo,mi=xa,yi=Oi(ja),gi=ia,vi=Oa,_i=Ca,bi=ca,wi=Oi(La),Ei=aa,Pi=ea,Si=Zo;function Oi(e){return e&&e.__esModule?e:{default:e}}let Ri;process.env.__NEXT_I18N_SUPPORT&&(Ri=ui.detectDomainLocale);const Ni=process.env.__NEXT_ROUTER_BASEPATH||"";function Ai(){return Object.assign(new Error("Route Cancelled"),{cancelled:!0})}function xi(e,t){if(!e.startsWith("/")||!t)return e;const r=Ti(e);return pi.normalizePathTrailingSlash(`${t}${r}`)+e.substr(r.length)}function ji(e,t,r){if(process.env.__NEXT_I18N_SUPPORT){const n=Ti(e).toLowerCase(),o=t&&t.toLowerCase();return t&&t!==r&&!n.startsWith("/"+o+"/")&&n!=="/"+o?xi(e,"/"+t):e}return e}function Ci(e,t){if(process.env.__NEXT_I18N_SUPPORT){const r=Ti(e),n=r.toLowerCase(),o=t&&t.toLowerCase();return t&&(n.startsWith("/"+o+"/")||n==="/"+o)?(r.length===t.length+1?"/":"")+e.substr(t.length+1):e}return e}function Ti(e){const t=e.indexOf("?"),r=e.indexOf("#");return(t>-1||r>-1)&&(e=e.substring(0,t>-1?t:r)),e}function Ii(e){return(e=Ti(e))===Ni||e.startsWith(Ni+"/")}function Li(e){return xi(e,Ni)}function Mi(e){return(e=e.slice(Ni.length)).startsWith("/")||(e=`/${e}`),e}function ki(e){if(e.startsWith("/")||e.startsWith("#")||e.startsWith("?"))return!0;try{const t=gi.getLocationOrigin(),r=new URL(e,t);return r.origin===t&&Ii(r.pathname)}catch(e){return!1}}function Di(e,t,r){let n="";const o=Pi.getRouteRegex(e),a=o.groups,i=(t!==e?Ei.getRouteMatcher(o)(t):"")||r;n=e;const s=Object.keys(a);return s.every((e=>{let t=i[e]||"";const{repeat:r,optional:o}=a[e];let s=`[${r?"...":""}${e}]`;return o&&(s=`${t?"":"/"}[${s}]`),r&&!Array.isArray(t)&&(t=[t]),(o||e in i)&&(n=n.replace(s,r?t.map((e=>encodeURIComponent(e))).join("/"):encodeURIComponent(t))||"/")}))||(n=""),{params:s,result:n}}function Ui(e,t){const r={};return Object.keys(e).forEach((n=>{t.includes(n)||(r[n]=e[n])})),r}function $i(e,t,r){let n,o="string"==typeof t?t:gi.formatWithValidation(t);const a=o.match(/^[a-zA-Z]{1,}:\/\//),i=a?o.substr(a[0].length):o;if((i.split("?")[0]||"").match(/(\/\/|\\)/)){console.error(`Invalid href passed to next/router: ${o}, repeated forward-slashes (//) or backslashes \\ are not valid in the href`);const e=gi.normalizeRepeatedSlashes(i);o=(a?a[0]:"")+e}if(!ki(o))return r?[o]:o;try{n=new URL(o.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){n=new URL("/","http://n")}try{const e=new URL(o,n);e.pathname=pi.normalizePathTrailingSlash(e.pathname);let t="";if(vi.isDynamicRoute(e.pathname)&&e.searchParams&&r){const r=bi.searchParamsToUrlQuery(e.searchParams),{result:n,params:o}=Di(e.pathname,e.pathname,r);n&&(t=gi.formatWithValidation({pathname:n,hash:e.hash,query:Ui(r,o)}))}const a=e.origin===n.origin?e.href.slice(e.origin.length):e.href;return r?[a,t||a]:a}catch(e){return r?[o]:o}}function Bi(e){const t=gi.getLocationOrigin();return e.startsWith(t)?e.substring(t.length):e}function Fi(e,t,r){let[n,o]=$i(e,t,!0);const a=gi.getLocationOrigin(),i=n.startsWith(a),s=o&&o.startsWith(a);n=Bi(n),o=o?Bi(o):o;const c=i?n:Li(n),l=r?Bi($i(e,r)):o||n;return{url:c,as:s?l:Li(l)}}function qi(e,t){const r=pi.removePathTrailingSlash(hi.denormalizePagePath(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some((t=>{if(vi.isDynamicRoute(t)&&Pi.getRouteRegex(t).re.test(r))return e=t,!0})),pi.removePathTrailingSlash(e))}const Wi=process.env.__NEXT_SCROLL_RESTORATION&&"undefined"!=typeof window&&"scrollRestoration"in window.history&&!!function(){try{let e="__next";return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){}}(),Hi=Symbol("SSG_DATA_NOT_FOUND");function zi(e,t,r){return fetch(e,{credentials:"same-origin"}).then((n=>{if(!n.ok){if(t>1&&n.status>=500)return zi(e,t-1,r);if(404===n.status)return n.json().then((e=>{if(e.notFound)return{notFound:Hi};throw new Error("Failed to load static props")}));throw new Error("Failed to load static props")}return r.text?n.text():n.json()}))}function Vi(e,t,r,n,o){const{href:a}=new URL(e,window.location.href);return void 0!==n[a]?n[a]:n[a]=zi(e,t?3:1,{text:r}).catch((e=>{throw t||di.markAssetError(e),e})).then((e=>(o&&"production"===process.env.NODE_ENV||delete n[a],e))).catch((e=>{throw delete n[a],e}))}class Gi{constructor(e,t,r,{initialProps:n,pageLoader:o,App:a,wrapApp:i,Component:s,err:c,subscription:l,isFallback:u,locale:p,locales:d,defaultLocale:f,domainLocales:h,isPreview:m}){this.sdc={},this.sdr={},this.sde={},this._idx=0,this.onPopState=e=>{const t=e.state;if(!t){const{pathname:e,query:t}=this;return void this.changeState("replaceState",gi.formatWithValidation({pathname:Li(e),query:t}),gi.getURL())}if(!t.__N)return;let r;const{url:n,as:o,options:a,idx:i}=t;if(process.env.__NEXT_SCROLL_RESTORATION&&Wi&&this._idx!==i){try{sessionStorage.setItem("__next_scroll_"+this._idx,JSON.stringify({x:self.pageXOffset,y:self.pageYOffset}))}catch{}try{const e=sessionStorage.getItem("__next_scroll_"+i);r=JSON.parse(e)}catch{r={x:0,y:0}}}this._idx=i;const{pathname:s}=_i.parseRelativeUrl(n);this.isSsr&&o===Li(this.asPath)&&s===Li(this.pathname)||this._bps&&!this._bps(t)||this.change("replaceState",n,o,Object.assign({},a,{shallow:a.shallow&&this._shallow,locale:a.locale||this.defaultLocale}),r)};const y=pi.removePathTrailingSlash(e);var g;(this.components={},"/_error"!==e)&&(this.components[y]={Component:s,initial:!0,props:n,err:c,__N_SSG:n&&n.__N_SSG,__N_SSP:n&&n.__N_SSP,__N_RSC:!!(null===(g=s)||void 0===g?void 0:g.__next_rsc__)});this.components["/_app"]={Component:a,styleSheets:[]},this.events=Gi.events,this.pageLoader=o;const v=vi.isDynamicRoute(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath=Ni,this.sub=l,this.clc=null,this._wrapApp=i,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!(!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp)&&(v||self.location.search||process.env.__NEXT_HAS_REWRITES)),process.env.__NEXT_I18N_SUPPORT&&(this.locales=d,this.defaultLocale=f,this.domainLocales=h,this.isLocaleDomain=!!Ri(h,self.location.hostname)),this.state={route:y,pathname:e,query:t,asPath:v?e:r,isPreview:!!m,locale:process.env.__NEXT_I18N_SUPPORT?p:void 0,isFallback:u},"undefined"!=typeof window){if("//"!==r.substr(0,2)){const n={locale:p};n._shouldResolveHref=r!==e,this.changeState("replaceState",gi.formatWithValidation({pathname:Li(e),query:t}),gi.getURL(),n)}window.addEventListener("popstate",this.onPopState),process.env.__NEXT_SCROLL_RESTORATION&&Wi&&(window.history.scrollRestoration="manual")}}reload(){window.location.reload()}back(){window.history.back()}push(e,t,r={}){if(process.env.__NEXT_SCROLL_RESTORATION&&Wi)try{sessionStorage.setItem("__next_scroll_"+this._idx,JSON.stringify({x:self.pageXOffset,y:self.pageYOffset}))}catch{}return({url:e,as:t}=Fi(this,e,t)),this.change("pushState",e,t,r)}replace(e,t,r={}){return({url:e,as:t}=Fi(this,e,t)),this.change("replaceState",e,t,r)}async change(e,t,r,n,o){if(!ki(t))return window.location.href=t,!1;const a=n._h||n._shouldResolveHref||Ti(t)===Ti(r),i={...this.state};n._h&&(this.isReady=!0);const s=i.locale;if(process.env.__NEXT_I18N_SUPPORT){i.locale=!1===n.locale?this.defaultLocale:n.locale||i.locale,void 0===n.locale&&(n.locale=i.locale);const e=_i.parseRelativeUrl(Ii(r)?Mi(r):r),o=mi.normalizeLocalePath(e.pathname,this.locales);o.detectedLocale&&(i.locale=o.detectedLocale,e.pathname=Li(e.pathname),r=gi.formatWithValidation(e),t=Li(mi.normalizeLocalePath(Ii(t)?Mi(t):t,this.locales).pathname));let a=!1;if(process.env.__NEXT_I18N_SUPPORT)(null===(b=this.locales)||void 0===b?void 0:b.includes(i.locale))||(e.pathname=ji(e.pathname,i.locale),window.location.href=gi.formatWithValidation(e),a=!0);const s=Ri(this.domainLocales,void 0,i.locale);if(process.env.__NEXT_I18N_SUPPORT&&!a&&s&&this.isLocaleDomain&&self.location.hostname!==s.domain){const e=Mi(r);window.location.href=`http${s.http?"":"s"}://${s.domain}${Li(`${i.locale===s.defaultLocale?"":`/${i.locale}`}${"/"===e?"":e}`||"/")}`,a=!0}if(a)return new Promise((()=>{}))}n._h||(this.isSsr=!1),gi.ST&&performance.mark("routeChange");const{shallow:c=!1,scroll:l=!0}=n,u={shallow:c};this._inFlightRoute&&this.abortComponentLoad(this._inFlightRoute,u),r=Li(ji(Ii(r)?Mi(r):r,n.locale,this.defaultLocale));const p=Ci(Ii(r)?Mi(r):r,i.locale);this._inFlightRoute=r;let d=s!==i.locale;if(!n._h&&this.onlyAHashChange(p)&&!d)return i.asPath=p,Gi.events.emit("hashChangeStart",r,u),this.changeState(e,t,r,{...n,scroll:!1}),l&&this.scrollToHash(p),this.set(i,this.components[i.route],null),Gi.events.emit("hashChangeComplete",r,u),!0;let f,h,m=_i.parseRelativeUrl(t),{pathname:y,query:g}=m;try{[f,{__rewrites:h}]=await Promise.all([this.pageLoader.getPageList(),di.getClientBuildManifest(),this.pageLoader.getMiddlewareList()])}catch(e){return window.location.href=r,!1}this.urlIsNew(p)||d||(e="replaceState");let v=r;if(y=y?pi.removePathTrailingSlash(Mi(y)):y,a&&"/_error"!==y)if(n._shouldResolveHref=!0,process.env.__NEXT_HAS_REWRITES&&r.startsWith("/")){const e=wi.default(Li(ji(p,i.locale)),f,h,g,(e=>qi(e,f)),this.locales);if(e.externalDest)return location.href=r,!0;v=e.asPath,e.matchedPage&&e.resolvedHref&&(y=e.resolvedHref,m.pathname=Li(y),t=gi.formatWithValidation(m))}else m.pathname=qi(y,f),m.pathname!==y&&(y=m.pathname,m.pathname=Li(y),t=gi.formatWithValidation(m));if(!ki(r)){if("production"!==process.env.NODE_ENV)throw new Error(`Invalid href: "${t}" and as: "${r}", received relative href and external as\nSee more info: https://nextjs.org/docs/messages/invalid-relative-url-external-as`);return window.location.href=r,!1}if(v=Ci(Mi(v),i.locale),1!==n._h||vi.isDynamicRoute(pi.removePathTrailingSlash(y))){const o=await this._preflightRequest({as:r,cache:"production"===process.env.NODE_ENV,pages:f,pathname:y,query:g,locale:i.locale,isPreview:i.isPreview});if("rewrite"===o.type)g={...g,...o.parsedAs.query},v=o.asPath,y=o.resolvedHref,m.pathname=o.resolvedHref,t=gi.formatWithValidation(m);else{if("redirect"===o.type&&o.newAs)return this.change(e,o.newUrl,o.newAs,n);if("redirect"===o.type&&o.destination)return window.location.href=o.destination,new Promise((()=>{}));if("refresh"===o.type&&r!==window.location.pathname)return window.location.href=r,new Promise((()=>{}))}}const _=pi.removePathTrailingSlash(y);if(vi.isDynamicRoute(_)){const e=_i.parseRelativeUrl(v),n=e.pathname,o=Pi.getRouteRegex(_),a=Ei.getRouteMatcher(o)(n),i=_===n,s=i?Di(_,n,g):{};if(!a||i&&!s.result){const e=Object.keys(o.groups).filter((e=>!g[e]));if(e.length>0)throw"production"!==process.env.NODE_ENV&&console.warn((i?"Interpolating href":"Mismatching `as` and `href`")+" failed to manually provide "+`the params: ${e.join(", ")} in the \`href\`'s \`query\``),new Error((i?`The provided \`href\` (${t}) value is missing query values (${e.join(", ")}) to be interpolated properly. `:`The provided \`as\` value (${n}) is incompatible with the \`href\` value (${_}). `)+"Read more: https://nextjs.org/docs/messages/"+(i?"href-interpolation-failed":"incompatible-href-as"))}else i?r=gi.formatWithValidation(Object.assign({},e,{pathname:s.result,query:Ui(g,s.params)})):Object.assign(g,a)}Gi.events.emit("routeChangeStart",r,u);try{var b,w;let a=await this.getRouteInfo(_,y,g,r,v,u,i.locale,i.isPreview),{error:s,props:c,__N_SSG:l,__N_SSP:d}=a;if((l||d)&&c){if(c.pageProps&&c.pageProps.__N_REDIRECT){const t=c.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==c.pageProps.__N_REDIRECT_BASE_PATH){const r=_i.parseRelativeUrl(t);r.pathname=qi(r.pathname,f);const{url:o,as:a}=Fi(this,t,t);return this.change(e,o,a,n)}return window.location.href=t,new Promise((()=>{}))}if(i.isPreview=!!c.__N_PREVIEW,c.notFound===Hi){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}a=await this.getRouteInfo(e,e,g,r,v,{shallow:!1},i.locale,i.isPreview)}}Gi.events.emit("beforeHistoryChange",r,u),this.changeState(e,t,r,n),n._h&&"/_error"===y&&500===(null===(b=self.__NEXT_DATA__.props)||void 0===b||null===(w=b.pageProps)||void 0===w?void 0:w.statusCode)&&(null==c?void 0:c.pageProps)&&(c.pageProps.statusCode=500);const h=n.shallow&&i.route===_;var E;const m=(null!==(E=n.scroll)&&void 0!==E?E:!h)?{x:0,y:0}:null;if(await this.set({...i,route:_,pathname:y,query:g,asPath:p,isFallback:!1},a,null!=o?o:m).catch((e=>{if(!e.cancelled)throw e;s=s||e})),s)throw Gi.events.emit("routeChangeError",s,p,u),s;return process.env.__NEXT_I18N_SUPPORT&&i.locale&&(document.documentElement.lang=i.locale),Gi.events.emit("routeChangeComplete",r,u),!0}catch(e){if(fi.default(e)&&e.cancelled)return!1;throw e}}changeState(e,t,r,n={}){if("production"!==process.env.NODE_ENV){if(void 0===window.history)return void console.error("Warning: window.history is not available.");if(void 0===window.history[e])return void console.error(`Warning: window.history.${e} is not available`)}"pushState"===e&&gi.getURL()===r||(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,idx:this._idx="pushState"!==e?this._idx:this._idx+1},"",r))}async handleRouteInfoError(e,t,r,n,o,a){if(e.cancelled)throw e;if(di.isAssetError(e)||a)throw Gi.events.emit("routeChangeError",e,n,o),window.location.href=n,Ai();try{let n,o,a;void 0!==n&&void 0!==o||({page:n,styleSheets:o}=await this.fetchComponent("/_error"));const i={props:a,Component:n,styleSheets:o,err:e,error:e};if(!i.props)try{i.props=await this.getInitialProps(n,{err:e,pathname:t,query:r})}catch(e){console.error("Error in error page `getInitialProps`: ",e),i.props={}}return i}catch(e){return this.handleRouteInfoError(fi.default(e)?e:new Error(e+""),t,r,n,o,!0)}}async getRouteInfo(e,t,r,n,o,a,i,s){try{const c=this.components[e];if(a.shallow&&c&&this.route===e)return c;let l;"development"!==process.env.NODE_ENV&&c&&!("initial"in c)&&(l=c);const u=l||await this.fetchComponent(e).then((e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP,__N_RSC:!!e.page.__next_rsc__}))),{Component:p,__N_SSG:d,__N_SSP:f,__N_RSC:h}=u;if("production"!==process.env.NODE_ENV){const{isValidElementType:e}=require("next/dist/compiled/react-is");if(!e(p))throw new Error(`The default export is not a React Component in page: "${t}"`)}let m;(d||f||h)&&(m=this.pageLoader.getDataHref({href:gi.formatWithValidation({pathname:t,query:r}),asPath:o,ssg:d,rsc:h,locale:i}));const y=await this._getData((()=>d||f?Vi(m,this.isSsr,!1,d?this.sdc:this.sdr,!!d&&!s):this.getInitialProps(p,{pathname:t,query:r,asPath:n,locale:i,locales:this.locales,defaultLocale:this.defaultLocale})));if(h){const{fresh:e,data:t}=await this._getData((()=>this._getFlightData(m)));y.pageProps=Object.assign(y.pageProps,{__flight_serialized__:t,__flight_fresh__:e})}return u.props=y,this.components[e]=u,u}catch(e){return this.handleRouteInfoError(fi.getProperError(e),t,r,n,a)}}set(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;const[t,r]=this.asPath.split("#"),[n,o]=e.split("#");return!(!o||t!==n||r!==o)||t===n&&r!==o}scrollToHash(e){const[,t=""]=e.split("#");if(""===t||"top"===t)return void window.scrollTo(0,0);const r=document.getElementById(t);if(r)return void r.scrollIntoView();const n=document.getElementsByName(t)[0];n&&n.scrollIntoView()}urlIsNew(e){return this.asPath!==e}async prefetch(e,t=e,r={}){let n=_i.parseRelativeUrl(e),{pathname:o,query:a}=n;if(process.env.__NEXT_I18N_SUPPORT&&!1===r.locale){o=mi.normalizeLocalePath(o,this.locales).pathname,n.pathname=o,e=gi.formatWithValidation(n);let a=_i.parseRelativeUrl(t);const i=mi.normalizeLocalePath(a.pathname,this.locales);a.pathname=i.pathname,r.locale=i.detectedLocale||this.defaultLocale,t=gi.formatWithValidation(a)}const i=await this.pageLoader.getPageList();let s=t;if(process.env.__NEXT_HAS_REWRITES&&t.startsWith("/")){let r;({__rewrites:r}=await di.getClientBuildManifest());const a=wi.default(Li(ji(t,this.locale)),i,r,n.query,(e=>qi(e,i)),this.locales);if(a.externalDest)return;s=Ci(Mi(a.asPath),this.locale),a.matchedPage&&a.resolvedHref&&(o=a.resolvedHref,n.pathname=o,e=gi.formatWithValidation(n))}else n.pathname=qi(n.pathname,i),n.pathname!==o&&(o=n.pathname,n.pathname=o,e=gi.formatWithValidation(n));if("production"!==process.env.NODE_ENV)return;const c=await this._preflightRequest({as:Li(t),cache:!0,pages:i,pathname:o,query:a,locale:this.locale,isPreview:this.isPreview});"rewrite"===c.type&&(n.pathname=c.resolvedHref,o=c.resolvedHref,a={...a,...c.parsedAs.query},s=c.asPath,e=gi.formatWithValidation(n));const l=pi.removePathTrailingSlash(o);await Promise.all([this.pageLoader._isSsg(l).then((t=>!!t&&Vi(this.pageLoader.getDataHref({href:e,asPath:s,ssg:!0,locale:void 0!==r.locale?r.locale:this.locale}),!1,!1,this.sdc,!0))),this.pageLoader[r.priority?"loadPage":"prefetch"](l)])}async fetchComponent(e){let t=!1;const r=this.clc=()=>{t=!0},n=()=>{if(t){const t=new Error(`Abort fetching component for route: "${e}"`);throw t.cancelled=!0,t}r===this.clc&&(this.clc=null)};try{const t=await this.pageLoader.loadPage(e);return n(),t}catch(e){throw n(),e}}_getData(e){let t=!1;const r=()=>{t=!0};return this.clc=r,e().then((e=>{if(r===this.clc&&(this.clc=null),t){const e=new Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e}))}_getFlightData(e){return Vi(e,!0,!0,this.sdc,!1).then((e=>({fresh:!0,data:e})))}async _preflightRequest(e){const t=Ci(Ii(e.as)?Mi(e.as):e.as,e.locale);if(!(await this.pageLoader.getMiddlewareList()).some((([e,r])=>Ei.getRouteMatcher(Si.getMiddlewareRegex(e,!r))(t))))return{type:"next"};const r=await this._getPreflightData({preflightHref:e.as,shouldCache:e.cache,isPreview:e.isPreview});if(r.rewrite){if(!r.rewrite.startsWith("/"))return{type:"redirect",destination:e.as};const t=_i.parseRelativeUrl(mi.normalizeLocalePath(Ii(r.rewrite)?Mi(r.rewrite):r.rewrite,this.locales).pathname),n=pi.removePathTrailingSlash(t.pathname);let o,a;return e.pages.includes(n)?(o=!0,a=n):(a=qi(n,e.pages),a!==t.pathname&&e.pages.includes(a)&&(o=!0)),{type:"rewrite",asPath:t.pathname,parsedAs:t,matchedPage:o,resolvedHref:a}}if(r.redirect){if(r.redirect.startsWith("/")){const e=pi.removePathTrailingSlash(mi.normalizeLocalePath(Ii(r.redirect)?Mi(r.redirect):r.redirect,this.locales).pathname),{url:t,as:n}=Fi(this,e,e);return{type:"redirect",newUrl:t,newAs:n}}return{type:"redirect",destination:r.redirect}}return r.refresh&&!r.ssr?{type:"refresh"}:{type:"next"}}_getPreflightData(e){const{preflightHref:t,shouldCache:r=!1,isPreview:n}=e,{href:o}=new URL(t,window.location.href);return"production"===process.env.NODE_ENV&&!n&&r&&this.sde[o]?Promise.resolve(this.sde[o]):fetch(t,{method:"HEAD",credentials:"same-origin",headers:{"x-middleware-preflight":"1"}}).then((e=>{if(!e.ok)throw new Error("Failed to preflight request");return{cache:e.headers.get("x-middleware-cache"),redirect:e.headers.get("Location"),refresh:e.headers.has("x-middleware-refresh"),rewrite:e.headers.get("x-middleware-rewrite"),ssr:!!e.headers.get("x-middleware-ssr")}})).then((e=>(r&&"no-cache"!==e.cache&&(this.sde[o]=e),e))).catch((e=>{throw delete this.sde[o],e}))}getInitialProps(e,t){const{Component:r}=this.components["/_app"],n=this._wrapApp(r);return t.AppTree=n,gi.loadGetInitialProps(r,{AppTree:n,Component:e,router:this,ctx:t})}abortComponentLoad(e,t){this.clc&&(Gi.events.emit("routeChangeError",Ai(),e,t),this.clc(),this.clc=null)}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}}Gi.events=yi.default(),Oo.default=Gi;var Xi={};Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.RouterContext=void 0;var Yi=function(e){return e&&e.__esModule?e:{default:e}}(s);const Qi=Yi.default.createContext(null);Xi.RouterContext=Qi,"production"!==process.env.NODE_ENV&&(Qi.displayName="RouterContext");var Ji={};Object.defineProperty(Ji,"__esModule",{value:!0}),Ji.default=function(e){function t(t){return Ki.default.createElement(e,Object.assign({router:Zi.useRouter()},t))}if(t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,"production"!==process.env.NODE_ENV){const r=e.displayName||e.name||"Unknown";t.displayName=`withRouter(${r})`}return t};var Ki=function(e){return e&&e.__esModule?e:{default:e}}(s),Zi=So;!function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"withRouter",{enumerable:!0,get:function(){return a.default}}),e.useRouter=function(){return t.default.useContext(n.RouterContext)},e.createRouter=function(...e){return c.router=new r.default(...e),c.readyCallbacks.forEach((e=>e())),c.readyCallbacks=[],c.router},e.makePublicRouterInstance=function(e){const t=e,n={};for(const e of l)"object"!=typeof t[e]?n[e]=t[e]:n[e]=Object.assign(Array.isArray(t[e])?[]:{},t[e]);return n.events=r.default.events,u.forEach((e=>{n[e]=(...r)=>t[e](...r)})),n},e.default=void 0;var t=i(s),r=i(Oo),n=Xi,o=i(Vo),a=i(Ji);function i(e){return e&&e.__esModule?e:{default:e}}const c={router:null,readyCallbacks:[],ready(e){if(this.router)return e();"undefined"!=typeof window&&this.readyCallbacks.push(e)}},l=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],u=["push","replace","reload","back","prefetch","beforePopState"];function p(){if(!c.router){throw new Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n')}return c.router}Object.defineProperty(c,"events",{get:()=>r.default.events}),l.forEach((e=>{Object.defineProperty(c,e,{get:()=>p()[e]})})),u.forEach((e=>{c[e]=(...t)=>p()[e](...t)})),["routeChangeStart","beforeHistoryChange","routeChangeComplete","routeChangeError","hashChangeStart","hashChangeComplete"].forEach((e=>{c.ready((()=>{r.default.events.on(e,((...t)=>{const r=`on${e.charAt(0).toUpperCase()}${e.substring(1)}`,n=c;if(n[r])try{n[r](...t)}catch(e){console.error(`Error when running the Router event: ${r}`),console.error(o.default(e)?`${e.message}\n${e.stack}`:e+"")}}))}))}));var d=c;e.default=d}(So);var es=So,ts=function(){return ts=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ts.apply(this,arguments)};function rs(e,t){if("string"!=typeof t)return e;return function(r,n,o){return e(r,n,ts({ns:t},o))}}var ns=c({t:function(e){return Array.isArray(e)?e[0]:e},lang:""}),os=function(){return os=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},os.apply(this,arguments)};function as(e){var t=l(ns);return os(os({},t),{t:rs(t.t,e)})}var is={},ss={};Object.defineProperty(ss,"__esModule",{value:!0}),ss.HeadManagerContext=void 0;var cs=function(e){return e&&e.__esModule?e:{default:e}}(s);const ls=cs.default.createContext({});ss.HeadManagerContext=ls,"production"!==process.env.NODE_ENV&&(ls.displayName="HeadManagerContext");var us={};Object.defineProperty(us,"__esModule",{value:!0}),us.isEqualNode=fs,us.default=function(){let e=null;return{mountedInstances:new Set,updateHead:t=>{const r=e=Promise.resolve().then((()=>{if(r!==e)return;e=null;const n={};t.forEach((e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector(`style[data-href="${e.props["data-href"]}"]`))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}const t=n[e.type]||[];t.push(e),n[e.type]=t}));const o=n.title?n.title[0]:null;let a="";if(o){const{children:e}=o.props;a="string"==typeof e?e:Array.isArray(e)?e.join(""):""}a!==document.title&&(document.title=a),["meta","base","link","style","script"].forEach((e=>{!function(e,t){const r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]");if("production"!==process.env.NODE_ENV&&!n)return void console.error("Warning: next-head-count is missing. https://nextjs.org/docs/messages/next-head-count-missing");const o=Number(n.content),a=[];for(let t=0,r=n.previousElementSibling;t<o;t++,r=(null==r?void 0:r.previousElementSibling)||null){var i;(null==r||null===(i=r.tagName)||void 0===i?void 0:i.toLowerCase())===e&&a.push(r)}const s=t.map(ds).filter((e=>{for(let t=0,r=a.length;t<r;t++){if(fs(a[t],e))return a.splice(t,1),!1}return!0}));a.forEach((e=>{var t;return null===(t=e.parentNode)||void 0===t?void 0:t.removeChild(e)})),s.forEach((e=>r.insertBefore(e,n))),n.content=(o-a.length+s.length).toString()}(e,n[e]||[])}))}))}}},us.DOMAttributeNames=void 0;const ps={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function ds({type:e,props:t}){const r=document.createElement(e);for(const n in t){if(!t.hasOwnProperty(n))continue;if("children"===n||"dangerouslySetInnerHTML"===n)continue;if(void 0===t[n])continue;const o=ps[n]||n.toLowerCase();"script"!==e||"async"!==o&&"defer"!==o&&"noModule"!==o?r.setAttribute(o,t[n]):r[o]=!!t[n]}const{children:n,dangerouslySetInnerHTML:o}=t;return o?r.innerHTML=o.__html||"":n&&(r.textContent="string"==typeof n?n:Array.isArray(n)?n.join(""):""),r}function fs(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){const r=t.getAttribute("nonce");if(r&&!e.getAttribute("nonce")){const n=t.cloneNode(!0);return n.setAttribute("nonce",""),n.nonce=r,r===e.nonce&&e.isEqualNode(n)}}return e.isEqualNode(t)}us.DOMAttributeNames=ps,Object.defineProperty(is,"__esModule",{value:!0}),is.initScriptLoader=function(e){e.forEach(Os)},is.default=void 0;var hs=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,r):{};n.get||n.set?Object.defineProperty(t,r,n):t[r]=e[r]}return t.default=e,t}(s),ms=ss,ys=us,gs=Co;function vs(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),n.forEach((function(t){vs(e,t,r[t])}))}return e}function bs(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(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)&&(o[r]=e[r])}return o}const ws=new Map,Es=new Set,Ps=["onLoad","dangerouslySetInnerHTML","children","onError","strategy"],Ss=e=>{const{src:t,id:r,onLoad:n=(()=>{}),dangerouslySetInnerHTML:o,children:a="",strategy:i="afterInteractive",onError:s}=e,c=r||t;if(c&&Es.has(c))return;if(ws.has(t))return Es.add(c),void ws.get(t).then(n,s);const l=document.createElement("script"),u=new Promise(((e,t)=>{l.addEventListener("load",(function(t){e(),n&&n.call(this,t)})),l.addEventListener("error",(function(e){t(e)}))})).catch((function(e){s&&s(e)}));t&&ws.set(t,u),Es.add(c),o?l.innerHTML=o.__html||"":a?l.textContent="string"==typeof a?a:Array.isArray(a)?a.join(""):"":t&&(l.src=t);for(const[t,r]of Object.entries(e)){if(void 0===r||Ps.includes(t))continue;const e=ys.DOMAttributeNames[t]||t.toLowerCase();l.setAttribute(e,r)}l.setAttribute("data-nscript",i),document.body.appendChild(l)};function Os(e){const{strategy:t="afterInteractive"}=e;"afterInteractive"===t?Ss(e):"lazyOnload"===t&&window.addEventListener("load",(()=>{gs.requestIdleCallback((()=>Ss(e)))}))}var Rs=function(e){const{src:t="",onLoad:r=(()=>{}),dangerouslySetInnerHTML:n,strategy:o="afterInteractive",onError:a}=e,i=bs(e,["src","onLoad","dangerouslySetInnerHTML","strategy","onError"]),{updateScripts:s,scripts:c,getIsSsr:l}=hs.useContext(ms.HeadManagerContext);return hs.useEffect((()=>{"afterInteractive"===o?Ss(e):"lazyOnload"===o&&function(e){"complete"===document.readyState?gs.requestIdleCallback((()=>Ss(e))):window.addEventListener("load",(()=>{gs.requestIdleCallback((()=>Ss(e)))}))}(e)}),[e,o]),"beforeInteractive"===o&&(s?(c.beforeInteractive=(c.beforeInteractive||[]).concat([_s({src:t,onLoad:r,onError:a},i)]),s(c)):l&&l()?Es.add(i.id||t):l&&!l()&&Ss(e)),null};is.default=Rs;var Ns=is,As=Object.freeze({__proto__:null,default:function(e){var t=e.currenttransactiongpay,r=es.useRouter();console.log("transaction=",t);var n=as("common");n.t;var o,a=n.lang,i=k(u(!1),2),s=i[0],c=i[1],l=k(u(!1),2),d=l[0],f=l[1],h=k(u(!1),2),m=h[0],_=h[1],b=k(u(!1),2),w=b[0],E=b[1],P=k(u(!1),2),S=P[0],O=P[1];p((function(){!s&&d&&S&&m&&w&&(console.log("okkkk"),N())}),[d,m,w,S,s]);var R=function(e,n,a){var i=n.createPaymentDataRequest({merchantInfo:{merchantId:"".concat(process.env.NEXT_PUBLIC_QAWAIM_GOOGLE_MERCHANT_ID),merchantName:"".concat(process.env.NEXT_PUBLIC_QAWAIM_GOOGLEPAY_MERCHANT_NAME)},transactionInfo:{displayItems:[{label:"Subtotal",type:"SUBTOTAL",price:"".concat(t.amount)}],currencyCode:"".concat(t.currency),totalPriceStatus:"FINAL",totalPrice:"".concat(t.amount),totalPriceLabel:"Total"}}),s=i.allowedPaymentMethods[0];s.parameters.billingAddressRequired=!0,s.parameters.billingAddressParameters={format:"FULL",phoneNumberRequired:!0},o.loadPaymentData(i).then((function(e){n.parseResponse(e,(function(e,n){e&&(console.log(e),r.push("/payment/error")),braintree.dataCollector.create({client:a},function(){var e=L(regeneratorRuntime.mark((function e(o,a){var i,s,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o){e.next=2;break}return e.abrupt("return");case 2:return s=a.deviceData,c={deviceDataClient:s,nonce:n.nonce,billing_address:t.billing_address,amount:"".concat(t.amount),currency:null===(i=token.SelectedCurrency)||void 0===i?void 0:i.toUpperCase(),transaction_id:"".concat(t._id)},e.next=6,ar.post("".concat(process.env.NEXT_PUBLIC_QAWAIM_API_URL,"/braintreegateway/googlepay"),Po.stringify(c));case 6:!0===(l=e.sent).data.ok?(r.push("/confirmation/".concat(t._id)),r.push("/confirmation/".concat(l.data.data.transaction._id))):r.push("/payment/error");case 8:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}())}))})).catch((function(e){console.log(e),r.push("/payment/error")}))},N=function(){o=new google.payments.api.PaymentsClient({environment:process.env.NEXT_PUBLIC_QAWAIM_GOOGLEPAY_ENVIRONMENT}),c(!0),braintree.client.create({authorization:"".concat(process.env.NEXT_PUBLIC_QAWAIM_BRAINTREE_TOKENIZATION_KEY)},(function(e,t){console.log("clientErr=",e),console.log("clientInstance=",t),braintree.googlePayment.create({client:t,googlePayVersion:2,googleMerchantId:"".concat(process.env.NEXT_PUBLIC_QAWAIM_GOOGLE_MERCHANT_ID)},(function(e,n){console.log("googlePaymentErr=",e),console.log("googlePaymentInstance=",n),o.isReadyToPay({apiVersion:2,apiVersionMinor:0,allowedPaymentMethods:n.createPaymentDataRequest().allowedPaymentMethods,existingPaymentMethodRequired:!0}).then((function(e){e.result&&function(e,t){var r=o.createButton({onClick:function(r){return R(r,e,t)},buttonLocale:a});document.getElementById("qawaim-googlepay").appendChild(r)}(n,t)})).catch((function(e){console.log(e),r.push("/payment/error")}))}))}))};return y(g,{children:[v(Ns,{id:"googlepay",src:"https://pay.google.com/gp/p/js/pay.js",onLoad:function(){f(!0)}}),v(Ns,{id:"braintreegateway-client",src:"https://js.braintreegateway.com/web/3.82.0/js/client.min.js",onLoad:function(){_(!0)}}),v(Ns,{id:"braintreegateway-data-collector",src:"https://js.braintreegateway.com/web/3.82.0/js/data-collector.min.js",onLoad:function(){O(!0)}}),v(Ns,{id:"braintreegateway-google-payment",src:"https://js.braintreegateway.com/web/3.82.0/js/google-payment.min.js",onLoad:function(){E(!0)}}),v("div",{id:"qawaim-googlepay"})]})}}),xs=x(As),js=(new Date).getFullYear(),Cs=Array.from({length:12},(function(e,t){var r=t+1;return r<=9?"0"+r:r})),Ts=Array.from({length:9},(function(e,t){return js+t}));function Is(e){var t,r,n=e.cardHolder,o=e.cardMonth,a=e.cardYear,i=e.cardCvv,s=e.onUpdateState,c=e.cardNumberRef,l=e.cardHolderRef,f=e.cardDateRef,h=e.cardCvvRef,m=e.onCardInputFocus,g=e.onCardInputBlur,E=e.children,P=e.selectedPaymentMethod,S=e.transaction,O=d(),R=k(u(!1),2),N=R[0];R[1];var A=k(u(""),2),x=A[0],j=A[1],C=k(u(""),2),T=C[0];C[1];var I=k(u(""),2),M=I[0];I[1];var D=k(u(""),2),U=D[0];D[1];var $=k(u(""),2),B=$[0],F=$[1],q=k(u(""),2),W=q[0],H=q[1],z=k(u(""),2);z[0];var V=z[1],G=as("common"),X=G.t,Y=G.lang,Q=function(e){var t=e.target,r=t.name,n=t.value;s(r,n)},J=function(){var e=L(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ar.get("https://geolocation-db.com/json/");case 2:t=e.sent,console.log(t.data),V(t.data.IPv4);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();p((function(){P&&"APPLEPAY"!==P&&(J(),function(){var e,t,r="",n={access_code:process.env.NEXT_PUBLIC_QAWAIM_SOFTWARE_PAYFOR_ACCESS_TOKEN,language:Y,merchant_identifier:process.env.NEXT_PUBLIC_QAWAIM_SOFTWARE_PAYFOR_MERCHANT_ID,merchant_reference:"",return_url:"".concat(process.env.NEXT_PUBLIC_QAWAIM_USER_PORTAL_URL,"/aps_online/response"),service_command:"TOKENIZATION"};S&&null!=S&&null!==(e=S.getTransactionByIDInvoice)&&void 0!==e&&e.transaction_payment_token&&(n.token_name=null==S||null===(t=S.getTransactionByIDInvoice)||void 0===t?void 0:t.transaction_payment_token),console.log("arrData=",n),r="".concat(process.env.NEXT_PUBLIC_QAWAIM_SOFTWARE_PAYFOR_SHA_REQUEST_PHRASE).concat(r);for(var o=0,a=Object.entries(n);o<a.length;o++){var i=k(a[o],2),s=i[0],c=i[1];r="".concat(r).concat(s,"=").concat(c)}r="".concat(r).concat(process.env.NEXT_PUBLIC_QAWAIM_SOFTWARE_PAYFOR_SHA_REQUEST_PHRASE),console.log("shaString=",r);var l=_(r);console.log("signature=",l),H(l)}())}),[P,T,U]),p((function(){o&&a&&F("".concat(a.substring(2)).concat(o))}),[o,a]);return y("div",{className:"card-form",children:[v("div",{className:"card-list",children:E}),y("div",{className:"card-form__inner",children:[y("div",{className:"card-input",children:[v("label",{htmlFor:"cardNumber",className:"card-input__label",children:X("cardNumber")}),v("input",{type:"tel",name:"cardNumber",className:"card-input__input",autoComplete:"off",onChange:function(e){var t=e.target,r=t.value,n=t.name,o=r;r=r.replace(/\D/g,""),/^3[47]\d{0,13}$/.test(r)||/^3(?:0[0-5]|[68]\d)\d{0,11}$/.test(r)?o=r.replace(/(\d{4})/,"$1 ").replace(/(\d{4}) (\d{6})/,"$1 $2 "):/^\d{0,16}$/.test(r)&&(o=r.replace(/(\d{4})/,"$1 ").replace(/(\d{4}) (\d{4})/,"$1 $2 ").replace(/(\d{4}) (\d{4}) (\d{4})/,"$1 $2 $3 ")),j(o.trimRight()),s(n,o)},maxLength:"19",ref:c,onFocus:function(e){return m(e,"cardNumber")},onBlur:g,value:x})]}),y("div",{className:"card-input",children:[v("label",{htmlFor:"cardName",className:"card-input__label",children:X("cardHolder")}),v("input",{type:"text",className:"card-input__input",autoComplete:"off",name:"cardHolder",onChange:Q,ref:l,onFocus:function(e){return m(e,"cardHolder")},onBlur:g})]}),y("div",{className:"card-form__row",children:[v("div",{className:"card-form__col",children:y("div",{className:"card-form__group",children:[v("label",{htmlFor:"cardMonth",className:"card-input__label",children:X("cardExpiration")}),y("select",{className:"card-input__input -select",value:o,name:"cardMonth",onChange:Q,ref:f,onFocus:function(e){return m(e,"cardDate")},onBlur:g,children:[v("option",{value:"",disabled:!0,children:X("cardMonth")}),Cs.map((function(e,t){return v("option",{value:e,children:e},t)}))]}),y("select",{name:"cardYear",className:"card-input__input -select",value:a,onChange:Q,onFocus:function(e){return m(e,"cardDate")},onBlur:g,children:[v("option",{value:"",disabled:!0,children:X("cardYear")}),Ts.map((function(e,t){return v("option",{value:e,children:e},t)}))]})]})}),v("div",{className:"card-form__col -cvv",children:y("div",{className:"card-input",children:[v("label",{htmlFor:"cardCvv",className:"card-input__label",children:X("cvv")}),v("input",{type:"tel",className:"card-input__input",maxLength:"4",autoComplete:"off",name:"cardCvv",onChange:Q,onFocus:function(e){s("isCardFlipped",!0)},onBlur:function(e){s("isCardFlipped",!1)},ref:h})]})})]}),y("div",{className:"card-input",style:{marginTop:"20px"},children:[y("form",{ref:O,action:"".concat(process.env.NEXT_PUBLIC_QAWAIM_SOFTWARE_PAYFOR_ENVIRONMENT_URL),method:"POST",children:[v("input",{type:"hidden",name:"access_code",value:"".concat(T)}),v("input",{type:"hidden",name:"card_holder_name",value:n}),v("input",{type:"hidden",name:"card_number",value:x.replace(/\s/g,"")}),v("input",{type:"hidden",name:"card_security_code",value:i}),v("input",{type:"hidden",name:"expiry_date",value:B}),v("input",{type:"hidden",name:"language",value:Y}),v("input",{type:"hidden",name:"merchant_identifier",value:"".concat(M)}),v("input",{type:"hidden",name:"merchant_reference",value:""}),v("input",{type:"hidden",name:"remember_me",value:"NO"}),v("input",{type:"hidden",name:"return_url",value:"".concat(process.env.NEXT_PUBLIC_QAWAIM_USER_PORTAL_URL,"/aps_online/register")}),v("input",{type:"hidden",name:"service_command",value:"TOKENIZATION"}),v("input",{type:"hidden",name:"signature",value:W}),S&&(null==S||null===(t=S.getTransactionByIDInvoice)||void 0===t?void 0:t.transaction_payment_token)&&v("input",{type:"hidden",name:"token_name",value:null==S||null===(r=S.getTransactionByIDInvoice)||void 0===r?void 0:r.transaction_payment_token})]}),v(b,{variant:"contained",color:"primary",fullWidth:!0,onClick:function(e){},children:N?v(w,{variant:"indeterminate",style:{color:"white",display:"none"},size:25}):v("span",{className:"pay-new-btn-txt",children:X("pay-now")})})]})]})]})}var Ls,Ms,ks,Ds,Us={visa:"^4",amex:"^(34|37)",mastercard:"^5[1-5]",discover:"^6011",unionpay:"^62",troy:"^9792",diners:"^(30[0-5]|36)"},$s=(Ls=Math.floor(25*Math.random()+1),"".concat(Ls,".jpeg")),Bs=function(e){var t=e.cardHolder,r=e.cardNumber,n=e.cardMonth,o=e.cardYear,a=e.cardCvv,i=e.isCardFlipped,s=e.currentFocusedElm,c=e.onCardElementClick,l=e.cardNumberRef,d=e.cardHolderRef,h=e.cardDateRef,m=k(u(null),2),g=m[0],_=m[1],b=f((function(){return function(e){for(var t,r=e,n=0,o=Object.entries(Us);n<o.length;n++){var a=k(o[n],2),i=a[0],s=a[1];if(t=new RegExp(s),null!=r.match(t))return i}return"visa"}(r)}),[r]);p((function(){if(s){var e=(t=s.current)?{width:"".concat(t.offsetWidth,"px"),height:"".concat(t.offsetHeight,"px"),transform:"translateX(".concat(t.offsetLeft,"px) translateY(").concat(t.offsetTop,"px)")}:null;_(e)}var t}),[s]);return y("div",{className:"card-item "+(i?"-active":""),children:[y("div",{className:"card-item__side -front",children:[v("div",{className:"card-item__focus ".concat(s?"-active":""),style:g}),v("div",{className:"card-item__cover",children:v("img",{alt:"",src:"/card-background/".concat($s),className:"card-item__bg"})}),y("div",{className:"card-item__wrapper",children:[y("div",{className:"card-item__top",children:[v("img",{src:"/chip.png",alt:"",className:"card-item__chip"}),v("div",{className:"card-item__type",children:v("img",{alt:b,src:"/card-type/".concat(b,".png"),className:"card-item__typeImg"})})]}),v("label",{className:"card-item__number",ref:l,onClick:function(){return c("cardNumber")},children:v(E,{className:"slide-fade-up",component:"div",children:r?function(e){var t=e.split("");return t.forEach((function(e,r){r>4&&r<14&&" "!==t[r]&&(t[r]="*")})),t}(r).map((function(e,t){return v(P,{classNames:"slide-fade-up",timeout:250,children:v("div",{className:"card-item__numberItem",children:e})},t)})):v(P,{classNames:"slide-fade-up",timeout:250,children:v("div",{className:"card-item__numberItem",children:"#"})})})}),y("div",{className:"card-item__content",children:[y("label",{className:"card-item__info",onClick:function(){return c("cardHolder")},ref:d,children:[v("div",{className:"card-item__holder",children:"Card Holder"}),v("div",{className:"card-item__name",children:v(E,{component:"div",className:"slide-fade-up",children:"FULL NAME"===t?v(P,{classNames:"slide-fade-up",timeout:250,children:v("div",{children:"FULL NAME"})}):t.split("").map((function(e,t){return v(P,{timeout:250,classNames:"slide-fade-right",children:v("span",{className:"card-item__nameItem",children:e})},t)}))})})]}),y("div",{className:"card-item__date",onClick:function(){return c("cardDate")},ref:h,children:[v("label",{className:"card-item__dateTitle",children:"Expires"}),v("label",{className:"card-item__dateItem",children:v(S,{"in-out":!0,children:v(P,{classNames:"slide-fade-up",timeout:200,children:y("span",{children:[n||"MM"," "]})},n)})}),"/",v("label",{htmlFor:"cardYear",className:"card-item__dateItem",children:v(S,{"out-in":!0,children:v(P,{classNames:"slide-fade-up",timeout:250,children:v("span",{children:o?o.toString().substr(-2):"YY"})},o)})})]}),v("div",{className:"card-item__date",onClick:function(){return c("cardDate")},ref:h})]})]})]}),y("div",{className:"card-item__side -back",children:[v("div",{className:"card-item__cover",children:v("img",{alt:"",src:"/card-background/".concat($s),className:"card-item__bg"})}),v("div",{className:"card-item__band"}),y("div",{className:"card-item__cvv",children:[v("div",{className:"card-item__cvvTitle",children:"CVV"}),v("div",{className:"card-item__cvvBand",children:v(E,{children:a.split("").map((function(e,t){return v(P,{classNames:"zoom-in-out",timeout:250,children:v("span",{children:"*"})},t)}))})}),v("div",{className:"card-item__type",children:v("img",{alt:"card-type",src:"/card-type/visa.png",className:"card-item__typeImg"})})]})]})]})},Fs={cardNumber:"#### #### #### ####",cardHolder:"FULL NAME",cardMonth:"",cardYear:"",cardCvv:"",isCardFlipped:!1},qs=x(Object.freeze({__proto__:null,default:function(e){var t=k(u(Fs),2),r=t[0],n=t[1],o=k(u(null),2),a=o[0],i=o[1],s=h((function(e,t){n(T(T({},r),{},M({},e,t||Fs[e])))}),[r]),c={cardNumber:d(),cardHolder:d(),cardDate:d(),cardCvv:d()},l=h((function(e){c[e].current.focus()})),p={cardNumber:d(),cardHolder:d(),cardDate:d()},f=h((function(){i(null)}),[]);return v(Is,{cardNumber:r.cardNumber,cardHolder:r.cardHolder,cardMonth:r.cardMonth,cardYear:r.cardYear,cardCvv:r.cardCvv,onUpdateState:s,cardNumberRef:c.cardNumber,cardHolderRef:c.cardHolder,cardDateRef:c.cardDate,cardCvvRef:c.cardCvv,onCardInputFocus:function(e,t){i(p[t])},onCardInputBlur:f,handlePaymentPayfort:e.handlePaymentPayfort,paymentMethod:e.paymentMethod,register:e.register,children:v(Bs,{cardNumber:r.cardNumber,cardHolder:r.cardHolder,cardMonth:r.cardMonth,cardYear:r.cardYear,cardCvv:r.cardCvv,isCardFlipped:r.isCardFlipped,currentFocusedElm:a,onCardElementClick:l,cardNumberRef:p.cardNumber,cardHolderRef:p.cardHolder,cardDateRef:p.cardDate})})}}));!function(e){e.INITIAL="initial",e.PENDING="pending",e.REJECTED="rejected",e.RESOLVED="resolved"}(Ms||(Ms={})),function(e){e.LOADING_STATUS="setLoadingStatus",e.RESET_OPTIONS="resetOptions",e.SET_BRAINTREE_INSTANCE="braintreeInstance"}(ks||(ks={})),function(e){e.NUMBER="number",e.CVV="cvv",e.EXPIRATION_DATE="expirationDate",e.EXPIRATION_MONTH="expirationMonth",e.EXPIRATION_YEAR="expirationYear",e.POSTAL_CODE="postalCode"}(Ds||(Ds={}));var Ws="data-react-paypal-script-id",Hs="data-sdk-integration-source",zs="react-paypal-js",Vs="data-namespace",Gs=function(){return Gs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Gs.apply(this,arguments)};function Xs(e,t,r){if(r||2===arguments.length)for(var n,o=0,a=t.length;o<a;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))}function Ys(e){return"react-paypal-js-".concat(function(e){for(var t="",r=0;r<e.length;r++){var n=e[r].charCodeAt(0)*r;e[r+1]&&(n+=e[r+1].charCodeAt(0)*(r-1)),t+=String.fromCharCode(97+Math.abs(n)%26)}return t}(JSON.stringify(e)))}function Qs(e,t){var r,n,o;switch(t.type){case ks.LOADING_STATUS:return Gs(Gs({},e),{loadingStatus:t.value});case ks.RESET_OPTIONS:return n=e.options[Ws],(null==(o=self.document.querySelector("script[".concat(Ws,'="').concat(n,'"]')))?void 0:o.parentNode)&&o.parentNode.removeChild(o),delete t.value[Ws],Gs(Gs({},e),{loadingStatus:Ms.PENDING,options:Gs(Gs({},t.value),(r={},r[Ws]="".concat(Ys(t.value)),r[Hs]=zs,r))});case ks.SET_BRAINTREE_INSTANCE:return Gs(Gs({},e),{braintreePayPalCheckoutInstance:t.value});default:return e}}var Js=c(null);function Ks(){var e=function(e){if("function"==typeof(null==e?void 0:e.dispatch)&&0!==e.dispatch.length)return e;throw new Error("usePayPalScriptReducer must be used within a PayPalScriptProvider")}(l(Js));return[Gs(Gs({},e),{isInitial:e.loadingStatus===Ms.INITIAL,isPending:e.loadingStatus===Ms.PENDING,isResolved:e.loadingStatus===Ms.RESOLVED,isRejected:e.loadingStatus===Ms.REJECTED}),e.dispatch]}c({});var Zs=function(e){var t=e.className,r=void 0===t?"":t,n=e.disabled,o=void 0!==n&&n,a=e.children,i=e.forceReRender,c=void 0===i?[]:i,l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["className","disabled","children","forceReRender"]),f=o?{opacity:.38}:{},h="".concat(r," ").concat(o?"paypal-buttons-disabled":"").trim(),m=d(null),y=d(null),g=Ks()[0],v=g.isResolved,_=g.options,b=u(null),w=b[0],E=b[1],P=u(!0),S=P[0],O=P[1],R=u(null)[1];function N(){null!==y.current&&y.current.close().catch((function(){}))}return p((function(){if(!1===v)return N;var e,t=(void 0===(e=_[Vs])&&(e="paypal"),window[e]);if(void 0===t||void 0===t.Buttons)return R((function(){throw new Error(function(e){var t=e.reactComponentName,r=e.sdkComponentKey,n=e.sdkRequestedComponents,o=void 0===n?"":n,a=e.sdkDataNamespace,i=void 0===a?"paypal":a,s=r.charAt(0).toUpperCase().concat(r.substring(1)),c="Unable to render <".concat(t," /> because window.").concat(i,".").concat(s," is undefined.");if(!o.includes(r)){var l=[o,r].filter(Boolean).join();c+="\nTo fix the issue, add '".concat(r,"' to the list of components passed to the parent PayPalScriptProvider:")+"\n`<PayPalScriptProvider options={{ components: '".concat(l,"'}}>`.")}return c}({reactComponentName:Zs.displayName,sdkComponentKey:"buttons",sdkRequestedComponents:_.components,sdkDataNamespace:_[Vs]}))})),N;try{y.current=t.Buttons(Gs(Gs({},l),{onInit:function(e,t){E(t),"function"==typeof l.onInit&&l.onInit(e,t)}}))}catch(e){return R((function(){throw new Error("Failed to render <PayPalButtons /> component. Failed to initialize: ".concat(e))}))}return!1===y.current.isEligible()?(O(!1),N):m.current?(y.current.render(m.current).catch((function(e){null!==m.current&&0!==m.current.children.length&&R((function(){throw new Error("Failed to render <PayPalButtons /> component. ".concat(e))}))})),N):N}),Xs(Xs([v],c,!0),[l.fundingSource],!1)),p((function(){null!==w&&(!0===o?w.disable().catch((function(){})):w.enable().catch((function(){})))}),[o,w]),s.createElement(s.Fragment,null,S?s.createElement("div",{ref:m,style:f,className:h}):a)};function ec(e){var t="https://www.paypal.com/sdk/js";e.sdkBaseURL&&(t=e.sdkBaseURL,delete e.sdkBaseURL),function(e){var t=e["merchant-id"],r=e["data-merchant-id"],n="",o="";Array.isArray(t)?t.length>1?(n="*",o=t.toString()):n=t.toString():"string"==typeof t&&t.length>0?n=t:"string"==typeof r&&r.length>0&&(n="*",o=r);e["merchant-id"]=n,e["data-merchant-id"]=o}(e);var r=Object.keys(e).filter((function(t){return void 0!==e[t]&&null!==e[t]&&""!==e[t]})).reduce((function(t,r){var n=e[r].toString();return"data-"===r.substring(0,5)?t.dataAttributes[r]=n:t.queryParams[r]=n,t}),{queryParams:{},dataAttributes:{}}),n=r.queryParams,o=r.dataAttributes;return{url:"".concat(t,"?").concat(tc(n)),dataAttributes:o}}function tc(e){var t="";return Object.keys(e).forEach((function(r){0!==t.length&&(t+="&"),t+=r+"="+e[r]})),t}function rc(e,t){void 0===t&&(t={});var r=document.createElement("script");return r.src=e,Object.keys(t).forEach((function(e){r.setAttribute(e,t[e]),"data-csp-nonce"===e&&r.setAttribute("nonce",t["data-csp-nonce"])})),r}function nc(e,t){if(void 0===t&&(t=oc()),ic(e,t),"undefined"==typeof window)return t.resolve(null);var r=ec(e),n=r.url,o=r.dataAttributes,a=o["data-namespace"]||"paypal",i=ac(a);return function(e,t){var r=document.querySelector('script[src="'.concat(e,'"]'));if(null===r)return null;var n=rc(e,t),o=r.cloneNode();if(delete o.dataset.uidAuto,Object.keys(o.dataset).length!==Object.keys(n.dataset).length)return null;var a=!0;return Object.keys(o.dataset).forEach((function(e){o.dataset[e]!==n.dataset[e]&&(a=!1)})),a?r:null}(n,o)&&i?t.resolve(i):function(e,t){void 0===t&&(t=oc());ic(e,t);var r=e.url,n=e.attributes;if("string"!=typeof r||0===r.length)throw new Error("Invalid url.");if(void 0!==n&&"object"!=typeof n)throw new Error("Expected attributes to be an object.");return new t((function(e,t){if("undefined"==typeof window)return e();!function(e){var t=e.url,r=e.attributes,n=e.onSuccess,o=e.onError,a=rc(t,r);a.onerror=o,a.onload=n,document.head.insertBefore(a,document.head.firstElementChild)}({url:r,attributes:n,onSuccess:function(){return e()},onError:function(){var e=new Error('The script "'.concat(r,'" failed to load.'));return window.fetch?fetch(r).then((function(r){return 200===r.status&&t(e),r.text()})).then((function(e){var r=function(e){var t=e.split("/* Original Error:")[1];return t?t.replace(/\n/g,"").replace("*/","").trim():e}(e);t(new Error(r))})).catch((function(e){t(e)})):t(e)}})}))}({url:n,attributes:o},t).then((function(){var e=ac(a);if(e)return e;throw new Error("The window.".concat(a," global variable is not available."))}))}function oc(){if("undefined"==typeof Promise)throw new Error("Promise is undefined. To resolve the issue, use a Promise polyfill.");return Promise}function ac(e){return window[e]}function ic(e,t){if("object"!=typeof e||null===e)throw new Error("Expected an options object.");if(void 0!==t&&"function"!=typeof t)throw new Error("Expected PromisePonyfill to be a function.")}Zs.displayName="PayPalButtons";var sc=function(e){var t,r=e.options,n=void 0===r?{"client-id":"test"}:r,o=e.children,a=e.deferLoading,i=void 0!==a&&a,c=m(Qs,{options:Gs(Gs({},n),(t={},t[Ws]="".concat(Ys(n)),t[Hs]=zs,t)),loadingStatus:i?Ms.INITIAL:Ms.PENDING}),l=c[0],u=c[1];return p((function(){if(!1===i&&l.loadingStatus===Ms.INITIAL)return u({type:ks.LOADING_STATUS,value:Ms.PENDING});if(l.loadingStatus===Ms.PENDING){var e=!0;return nc(l.options).then((function(){e&&u({type:ks.LOADING_STATUS,value:Ms.RESOLVED})})).catch((function(t){console.error("".concat("Failed to load the PayPal JS SDK script."," ").concat(t)),e&&u({type:ks.LOADING_STATUS,value:Ms.REJECTED})})),function(){e=!1}}}),[l.options,i,l.loadingStatus]),s.createElement(Js.Provider,{value:Gs(Gs({},l),{dispatch:u})},o)},cc={layout:"vertical",color:"blue",shape:"rect",label:"paypal"},lc=function(e){var t=e.amount,r=e.currency,n=e.showSpinner,o=e.lang,a=e.invoiceObject,i=e.router,s=k(Ks(),2),c=s[0],l=c.options,u=c.isPending,d=s[1];return console.log("amount=",t),p((function(){d({type:"resetOptions",value:T(T({},l),{},{currency:r})})}),[r,n]),y("div",{style:{padding:"10px",marginTop:"10px",fontSize:"17px",width:"100%"},children:[n&&u&&v("div",{className:"spinner"}),v(Zs,{style:cc,disabled:!1,fundingSource:void 0,createOrder:function(e,n){return console.log("lang=",t),n.order.create({purchase_units:[{amount:{currency_code:r,value:t},reference_id:a._id}],application_context:{locale:"ar"===o?"ar-SA":"en-US"}}).then((function(e){return e}))},onApprove:function(){var e=L(regeneratorRuntime.mark((function e(t,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.order.capture().then(function(){var e=L(regeneratorRuntime.mark((function e(t){var r,n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data=",t),t.language=o,e.next=4,ar.post("".concat(process.env.NEXT_PUBLIC_SIKKA_API_URL,"/paypal/payment/finalize"),Po.stringify(t));case 4:n=e.sent,!0===(null===(r=n.data)||void 0===r?void 0:r.ok)?i.push({pathname:"/confirmation/"+n.data.transaction._id}):i.push({pathname:"/payment/error/"+props.data.merchant_reference,query:{code:74}});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(t,r){return e.apply(this,arguments)}}()})]})},uc=x(Object.freeze({__proto__:null,default:function(e){var t;return v(sc,{deferLoading:!0,options:{"client-id":"".concat(process.env.NEXT_PUBLIC_PAYPAL_CLIENT_ID),locale:"ar"===lang?"ar_SA":"en_US"},children:v(lc,{currency:"USD",showSpinner:!1,amount:getFinalPricePaypal("sar"==(null===(t=invoice.currency)||void 0===t?void 0:t.toLowerCase())?invoice.invoice_discount:invoice.invoice_discount_usd),lang:lang,invoiceObject:invoiceObject,router:router})})}})),pc=N((function(e){return{root:{flexGrow:1},paper:{padding:e.spacing(2),textAlign:"center",color:e.palette.text.secondary}}})),dc=function(e){return y(b,{disabled:!(null==e||!e.chip),fullWidth:!0,variant:"contained",color:"secondary",style:{backgroundColor:"white",opacity:e.chip?.7:1,padding:20,width:"90%",margin:10,borderRadius:"var(--borderR)"},onClick:function(t){return e.handlePaymentMethod(t,e.methodCode)},children:[e.imageURL?v("div",{style:{width:"50%",textAlign:"right",paddingRight:20},children:v("img",{src:e.imageURL,style:{maxWidth:70,maxHeight:70,height:"auto"}})}):null,y("div",{style:{width:"50%",textAlign:e.imageURL?"left":"center"},children:[e.methodLabel,e.chip?v(A,{size:"small",color:"primary",label:e.chip,style:{marginRight:10,marginLeft:10}}):null]})]})},fc=xs,hc=qs,mc=uc,yc=x(Object.freeze({__proto__:null,default:function(e){var t=as("common").t,r=pc();return v("div",{className:"block-pay-content",style:{padding:20},children:v("div",{children:v(g,{children:y(O,{container:!0,spacing:3,alignContent:"center",alignItems:"center",style:{width:"100%",margin:0},children:[v(O,{item:!0,xs:4,children:y(R,{className:r.paper,style:{boxShadow:"none",fontWeight:"bold"},children:[t("payment-made")," ",v("br",{}),e.amount," ",t(e.SelectedCurrency)]})}),v(O,{item:!0,style:{padding:0,margin:"-5px"},children:v(R,{className:r.paper,style:{backgroundColor:"transparent",boxShadow:"none",fontSize:"18px",fontWeight:"bold",padding:0},children:"-"})}),v(O,{item:!0,xs:4,children:y(R,{className:r.paper,style:{boxShadow:"none",fontWeight:"bold"},children:[t("amount-in-wallet")," ",v("br",{}),e.total_wallet.toFixed(2)," ",t(e.SelectedCurrency)]})}),v(O,{item:!0,style:{padding:0,margin:"-5px"},children:v(R,{className:r.paper,style:{backgroundColor:"transparent",boxShadow:"none",fontSize:"18px",fontWeight:"bold",padding:0},children:"="})}),v(O,{item:!0,xs:4,children:y(R,{className:r.paper,style:{boxShadow:"none",fontWeight:"bold"},children:[t("left-amount-wallet")," ",v("br",{}),e.leftAmount.toFixed(2)," ",t(e.SelectedCurrency)]})}),v(O,{item:!0,xs:12,children:y(R,{className:r.paper,style:{boxShadow:"none",fontWeight:"bold"},children:[t("remaining-amount"),": ",e.remainingAmount.toFixed(2)," ",t(e.SelectedCurrency)]})}),!e.leftAmount&&v(O,{item:!0,xs:12,children:v(b,{variant:"contained",color:"primary",fullWidth:!0,type:"submit",onClick:function(t){return e.handleWalletPayNow(t)},children:e.loading?v(w,{variant:"indeterminate",style:{color:"white"},size:25}):t("pay-now")})})]})})},"Payment")})}})),gc=x(Object.freeze({__proto__:null,default:function(e){var t=as("common").t,r=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);return y(g,{children:[e.wallet?v(dc,{imageURL:"/wallet.png",methodCode:"wallet",methodLabel:t("current-wallet"),handlePaymentMethod:e.handlePaymentMethod}):null,e.creditcard?v(dc,{imageURL:"/visa-master.png",methodCode:"creditcard",methodLabel:t("credit-card"),handlePaymentMethod:e.handlePaymentMethod}):null,e.mada?v(dc,{imageURL:"/mada.png",methodCode:"mada",methodLabel:t("mada"),handlePaymentMethod:e.handlePaymentMethod}):null,e.stcpay?v(dc,{methodCode:"stcpay",methodLabel:"STC Pay",chip:t("soon"),handlePaymentMethod:e.handlePaymentMethod}):null,e.paypal?v(dc,{methodCode:"paypal",methodLabel:t("paypal"),handlePaymentMethod:e.handlePaymentMethod}):null,r&&applepay&&v(dc,{methodCode:"applepay",methodLabel:t("applepay"),handlePaymentMethod:e.handlePaymentMethod}),e.googlepay?v(dc,{methodCode:"googlepay",chip:t("soon"),methodLabel:t("googlepay"),handlePaymentMethod:e.handlePaymentMethod}):null]})}})),vc=j.GooglePay=fc.default,_c=j.Payfort=hc.default,bc=j.Paypal=mc.default,wc=j.Wallet=yc.default,Ec=j.PaymentMethod=gc.default;export{vc as GooglePay,_c as Payfort,Ec as PaymentMethod,bc as Paypal,wc as Wallet,j as __moduleExports};
1
+ import{createContext as e,useContext as r,useState as t}from"react";import o from"@mui/material/Button";import"@mui/material/Tooltip";import n from"prop-types";import{jsx as a,jsxs as i,Fragment as l}from"react/jsx-runtime";import{darken as d,styled as s}from"@mui/material/styles";import"@mui/material/FormControlLabel";import"@mui/material/Checkbox";import"@mui/material";import"@mui/material/TextField";import u from"@mui/material/InputBase";import c from"@mui/material/Typography";import m from"@mui/material/InputLabel";import{useFormContext as p,Controller as h,useForm as g,FormProvider as b}from"react-hook-form";import"@mui/icons-material";import f from"@mui/material/Alert";import y from"@mui/material/AlertTitle";import w from"@mui/icons-material/GitHub";import v from"@mui/icons-material/Twitter";import x from"@mui/icons-material/AccountBalanceWallet";import C from"@mui/material/InputAdornment";import k from"@mui/icons-material/HttpsOutlined";import T from"@mui/icons-material/MailOutline";import S from"@mui/icons-material/PermIdentityOutlined";function P(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function L(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?P(Object(t),!0).forEach((function(r){A(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):P(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function A(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function W(e,r){return function(e){if(Array.isArray(e))return e}(e)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==t)return;var o,n,a=[],i=!0,l=!1;try{for(t=t.call(e);!(i=(o=t.next()).done)&&(a.push(o.value),!r||a.length!==r);i=!0);}catch(e){l=!0,n=e}finally{try{i||null==t.return||t.return()}finally{if(l)throw n}}return a}(e,r)||function(e,r){if(!e)return;if("string"==typeof e)return R(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return R(e,r)}(e,r)||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 R(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,o=new Array(r);t<r;t++)o[t]=e[t];return o}var B=e({allPrimaryBG:"#f90900",allPrimaryAction:"#138A36",allBorderRadius:10,borderRadius:10,primaryColor:"blue",secondaryColor:"grey",primaryActionColor:"grey",secondaryActionColor:"#4cc9f0",layoutColor:"#d3d4d9",textColor:"black",inputColor:"white",lightBackground:"#FBF5F3",darkBackground:"#0F0E0E",testcolor:"green",margins:10,paddings:10,typography:{primary:{color:"black"},secondary:{color:"white"}},logoButton:{primary:{borderRadius:10,backgroundColor:"#B20D30",marginTop:10,padding:10,border:"1px solid #ced4da",height:50,"&:focus":{borderColor:"#B20D30"}},secondary:{borderRadius:10,backgroundColor:"#f90900",marginTop:10,padding:10,border:"1px solid #ced4da",height:50,"&:focus":{borderColor:"green"}}},actionButton:{primary:{borderRadius:10,backgroundColor:"#B20D30",color:"white",margin:10,padding:10,border:"1px solid #ced4da",fontSize:16,height:50,"&:focus":{borderColor:"red"}},secondary:{borderRadius:10,margin:10,padding:10,backgroundColor:"#FF8811",color:"black"}},layout:{primary:{backgroundColor:"#d3d4d9",color:"black",margin:10,padding:10,borderRadius:10},secondary:{backgroundColor:"#001E3C",color:"white",margin:10,padding:10,borderRadius:10}},inputFields:{primary:{backgroundColor:"white",borderRadius:10,"&:focus":{borderColor:"red",borderWidth:1,border:"1px solid black"},"&:hover":{borderColor:"red",borderWidth:1,border:"1px solid black"}},secondary:{backgroundColor:"white",borderRadius:10}},alerts:{primary:{marginBottom:10,padding:10,borderRadius:10},secondary:{marginBottom:10,padding:10,borderRadius:10}},settingsRow:{primary:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"#F5F5F5",margin:0,padding:10,borderRadius:10},secondary:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"center",backgroundColor:"blue",margin:0,padding:5,borderRadius:10}},radioSelector:{primary:{padding:10,borderRadius:10},secondary:{padding:10,borderRadius:10}}});n.string,n.bool,n.bool,n.bool;var F=function(e){var t,n=r(B),i=n.hawaTheme,l=n.themeName,u=Object.keys(i.actionButton).find((function(e){return e.toLowerCase()===(null==l?void 0:l.toLowerCase())})),c={};u?c=L(L({},i.actionButton[u]),{},{margin:e.last?0:i.actionButton[u].margin,marginTop:e.last?2*i.actionButton[u].margin:0,"&:hover":{backgroundColor:d(null===(t=i.actionButton[u])||void 0===t?void 0:t.backgroundColor,.1)}}):c={backgroundColor:"black",color:"white",padding:10,marginTop:e.last?20:0,borderRadius:0};var m=s(o)((function(e){return e.theme,L({},c)}));return a(m,L(L({},e),{},{children:e.text}))},O=function(e){var t=r(B),o=t.hawaTheme,n=t.themeName,i={},l=Object.keys(o.layout).find((function(e){return e.toLowerCase()===(null==n?void 0:n.toLowerCase())}));return i=l?L(L({display:"flex",flexDirection:e.horizontal?"row":"column"},o.layout[l]),{},{backgroundColor:e.noColor?"none":o.layout[l].backgroundColor,padding:e.noPadding?0:o.layout[l].padding,margin:e.noMargin?0:o.layout[l].margin,maxWidth:e.maxWidth}):{display:"flex",flexDirection:e.horizontal?"row":"column",color:"white",marginTop:e.last?20:0,backgroundColor:e.noColor?"none":"lightGrey",padding:e.noPadding?0:10,margin:e.noMargin?0:10,maxWidth:e.maxWidth,borderRadius:0},a("div",{style:i,children:e.children})};n.oneOf(["text","number","password"]),n.string;var q=function(e){var t=r(B),n=t.hawaTheme,i=t.themeName,l={},u=Object.keys(n.logoButton).find((function(e){return e.toLowerCase()===(null==i?void 0:i.toLowerCase())}));l=u?L(L({},n.logoButton[u]),{},{backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}}):{cursor:"pointer",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",marginTop:10,height:50,border:"1px solid #ced4da",backgroundColor:"white","&:hover":{backgroundColor:d("#ffffff",.1)}};var c=s(o)((function(e){return e.theme,L({},l)}));return a(c,L(L({},e),{},{children:e.children}))},z=function(e){var t=r(B),o=t.hawaTheme,n=t.themeName,i={},l=Object.keys(o.actionButton).find((function(e){return e.toLowerCase()===(null==n?void 0:n.toLowerCase())}));return i=l?{margin:15,marginRight:5,marginLeft:5,color:o.layout[l].color}:{margin:15,marginRight:0,marginLeft:0,color:"black"},a(m,{style:i,children:a("div",{style:{fontSize:15},children:e.label})})},E=function(e){var t=p(),o=t.control,n=t.register,d=r(B),m=d.hawaTheme,g=d.themeName,b=Object.keys(m.inputFields).find((function(e){return e.toLowerCase()===(null==g?void 0:g.toLowerCase())})),f={};f=b?L(L({},m.inputFields[b]),{},{margin:e.last?0:m.inputFields[b].margin,marginTop:e.last?2*m.inputFields[b].margin:0}):{backgroundColor:"white"};var y=s(u)((function(r){return L({"& .MuiInputBase-input":{transition:r.theme.transitions.create(["border-color","background-color","box-shadow"])},border:"1px solid #ced4da",fontSize:16,padding:"10px 12px",marginBottom:e.helperText?5:0,paddingLeft:10,paddingRight:10},f)}));return a(h,{render:function(r){var t;return r.field,i(l,{children:[e.inputLabel&&a(z,{label:e.inputLabel}),a(y,L(L({fullWidth:!0,type:null!==(t=e.type)&&void 0!==t?t:"text",defaultValue:e.defaultValue&&"",value:e.value&&""},e),n(e.name))),a(c,{variant:"caption",style:{margin:5,marginBottom:0,color:"red"},children:e.helperText})]})},name:e.name,rules:e.rules,control:o,shouldUnregister:e.shouldUnregister})};E.propTypes={type:n.oneOf(["text","number","password"]),helperText:n.string};var M=function(e){var t=r(B),o=t.hawaTheme,n=t.themeName,i=Object.keys(o.typography).find((function(e){return e.toLowerCase()===(null==n?void 0:n.toLowerCase())})),l={};l=i?L({},o.typography[i]):{color:"black"};var d=s(c)((function(e){return e.theme,L({},l)}));return a(d,L(L({},e),{},{children:e.children}))},j=function(e){var t=r(B),o=t.hawaTheme,n=t.themeName,l=Object.keys(o.alerts).find((function(e){return e.toLowerCase()===(null==n?void 0:n.toLowerCase())})),d={};d=l?L({},o.alerts[l]):{marginBottom:10};var u=s(f)((function(e){return e.theme,L({},d)}));return i(u,L(L({},e),{},{children:[e.title&&a(y,{children:e.title}),e.text]}))},I=function(e){return i(q,L(L({},e),{},{children:[a("img",{src:"https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg"}),a("div",{style:{width:10}}),a("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},N=function(e){return i(q,L(L({},e),{},{children:[a(w,{}),a("div",{style:{width:10}}),a("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},G=function(e){return i(q,L(L({},e),{},{children:[a(v,{}),a("div",{style:{width:10}}),a("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},D=function(e){return i(q,L(L({},e),{},{children:[a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/visa-master.png",height:30})," ",a("div",{style:{width:10}}),a("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},V=function(e){return i(q,L(L({},e),{},{children:[a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/mada.png",height:20})," ",a("div",{style:{width:10}}),a("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},U=function(e){return i(q,L(L({},e),{},{children:[a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/stc-pay.png",height:20}),a("div",{style:{width:10}}),a("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},Z=function(e){return i(q,L(L({},e),{},{children:[a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/paypal.png",height:25})," ",a("div",{style:{width:10}}),a("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},$=function(e){return i(q,L(L({},e),{},{children:[a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/apple-pay.png",height:40})," ",a("div",{style:{width:10}}),a("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},H=function(e){return i(q,L(L({},e),{},{children:[a("img",{src:"https://sikka-images.s3.ap-southeast-1.amazonaws.com/payments/google-pay.png",height:20}),a("div",{style:{width:10}}),a("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},_=function(e){return i(q,L(L({},e),{},{children:[a(x,{}),a("div",{style:{width:10}}),a("p",{style:{color:"black",fontSize:14,textAlign:"center",letterSpacing:.4,fontFamily:"Roboto",fontWeight:500},children:e.buttonText})]}))},J=function(e){var r,t,o,n,l=g(),d=l.formState.errors;return l.handleSubmit,a(O,{maxWidth:400,noMargin:!0,children:a(O,{noMargin:!0,noColor:!0,children:a(b,L(L({},l),{},{children:i("form",{children:[a(E,{type:"text",name:"fullName",inputLabel:"Full Name",placeholder:"Fulan AlFulani",rules:{required:"Email is required"},helperText:null===(r=d.fullName)||void 0===r?void 0:r.message}),a(E,{type:"text",name:"email",inputLabel:"New Email",placeholder:"Enter your new email",rules:{required:"Email is required"},helperText:null===(t=d.email)||void 0===t?void 0:t.message}),a(E,{type:"password",name:"password",inputLabel:"New password",placeholder:"Enter your new password",rules:{required:"Email is required"},helperText:null===(o=d.password)||void 0===o?void 0:o.message}),a(E,{type:"password",name:"confirmPassword",inputLabel:"Confirm new password",placeholder:"Confirm new password",rules:{required:"Email is required"},helperText:null===(n=d.confirmPassword)||void 0===n?void 0:n.message}),a(F,{fullWidth:!0,last:!0,text:"Update Account"})]})}))})})},K=function(e){return i(O,{maxWidth:400,children:[a(E,{type:"text",inputLabel:"First Name"}),a(E,{type:"text",inputLabel:"Last Name"}),a(E,{type:"email",inputLabel:"Email"}),a(E,{type:"password",inputLabel:"Password"}),a(F,{last:!0,text:"Update Account"})]})},Q=function(e){var r,o,n=W(t(""),2),l=n[0],d=n[1],s=W(t(""),2);s[0],s[1];var u=W(t(!1),2);u[0],u[1];var c=W(t(""),2);c[0],c[1];var m=W(t(!0),2);m[0],m[1];var p=g(),h=p.formState.errors,f=p.handleSubmit;return p.getValues,p.register,p.watch,p.reset,p.setValue,a(O,{maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:i(O,{noMargin:!0,children:[e.error&&a(j,{text:"This is a new password alert",severity:"error"}),a(b,L(L({},p),{},{children:i("form",{onSubmit:f(e.handleNewPassword),children:[a(E,{name:"password",type:"password",inputLabel:"Choose new password",placeholder:"Enter password",onChange:function(e){return d(e.target.value)},value:l,startAdornment:a(C,{position:"start",children:a(k,{})}),rules:{required:"Password is rquired"},helperText:null===(r=h.password)||void 0===r?void 0:r.message}),a(E,{name:"confirmPassword",type:"password",placeholder:"Confirm Password",inputLabel:"Confirm",startAdornment:a(C,{position:"start",children:a(k,{})}),rules:{required:"Password is rquired"},helperText:null===(o=h.confirmPassword)||void 0===o?void 0:o.message}),a(F,{fullWidth:!0,type:"submit",last:!0,text:"Reset Password"})]})}))]})})},X=function(e){var r,t=g(),o=t.formState.errors,n=t.handleSubmit;return t.getValues,t.register,t.watch,t.reset,t.setValue,a(O,{maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:i(O,{noMargin:!0,children:[e.error&&a(j,{text:"This is a reset password alert",severity:"error"}),a(b,L(L({},t),{},{children:i("form",{onSubmit:n(e.handleResetPassword),children:[a(E,{type:"text",name:"email",inputLabel:"Email",placeholder:"Enter your email",startAdornment:a(C,{position:"start",children:a(T,{})}),rules:{required:"Email is required",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:"Invalid email address"}},helperText:null===(r=o.email)||void 0===r?void 0:r.message}),a(F,{fullWidth:!0,last:!0,type:"submit",text:"Reset Password"})]})}))," "]})})},Y=function(e){var r,t,o,n=g(),l=n.formState.errors,d=n.handleSubmit;return n.getValues,n.register,n.watch,n.reset,n.setValue,i(O,{maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:[i(O,{noMargin:!0,children:[e.error&&a(j,{text:"This is a sign in alert",severity:"error"}),a(b,L(L({},n),{},{children:i("form",{onSubmit:d(e.handleSignUp),children:[a(E,{name:"fullName",placeholder:"Fulan AlFulani",type:"text",inputLabel:"Full Name",startAdornment:a(C,{position:"start",children:a(S,{})}),rules:{required:"Full name rquired"},helperText:null===(r=l.fullName)||void 0===r?void 0:r.message}),a(E,{type:"text",inputLabel:"Email",placeholder:"Enter your email",name:"email",startAdornment:a(C,{position:"start",children:a(T,{})}),rules:{required:"Email required",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:"Invalid email address"}},helperText:null===(t=l.email)||void 0===t?void 0:t.message}),a(E,{name:"password",placeholder:"Minimum 8 characters",type:"password",inputLabel:"Password",startAdornment:a(C,{position:"start",children:a(k,{})}),rules:{required:"Password rquired",minLength:{value:8,message:"Password too short"}},helperText:null===(o=l.password)||void 0===o?void 0:o.message}),a(F,{fullWidth:!0,type:"submit",text:"Sign Up",last:!0})]})}))]}),e.viaGoogle&&a(I,{buttonText:e.googleButtonLabel,handleClick:e.handleGoogleSignIn}),e.viaGithub&&a(N,{buttonText:e.githubButtonLabel,handleClick:e.handleGithubSignUp}),e.viaTwitter&&a(G,{buttonText:e.twitterButtonLabel,handleClick:e.handleTwitterSignIn})]})};Y.propTypes={theme:n.oneOf(["secondary","primary"])};var ee=function(e){var r,t,o=g(),n=o.formState.errors,l=o.handleSubmit;return i(O,{maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:[i(O,{noMargin:!0,children:[e.error&&a(j,{text:"This is a sign in alert",severity:"error"}),a(b,L(L({},o),{},{children:i("form",{onSubmit:l(e.handleSignIn),children:[a(E,{type:"text",name:"email",inputLabel:"Email",placeholder:"Enter your email",startAdornment:a(C,{position:"start",children:a(T,{})}),rules:{required:"Email is required",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:"Invalid email address"}},helperText:null===(r=n.email)||void 0===r?void 0:r.message}),a(E,{name:"password",placeholder:"Enter password",type:"password",inputLabel:"Password",startAdornment:a(C,{position:"start",children:a(k,{})}),rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message}),a(F,{type:"submit",fullWidth:!0,last:"true",text:"Sign In"})]})}))]}),e.viaGoogle&&a(I,{buttonText:e.googleButtonLabel,handleClick:e.handleGoogleSignIn}),e.viaGithub&&a(N,{buttonText:e.githubButtonLabel,handleClick:e.handleGithubSignIn}),e.viaTwitter&&a(G,{buttonText:e.twitterButtonLabel,handleClick:e.handleTwitterSignIn})]})},re=function(e){return a(O,{maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:i(O,{noMargin:!0,children:[a(M,{align:"center",children:"Choose Payment Method"}),e.viaWallet&&a(_,{buttonText:e.walletLabel,onClick:e.handleWallet}),e.viaCreditCard&&a(D,{buttonText:e.visaMasterLabel,handleClick:e.handleCreditCard}),e.viaMada&&a(V,{buttonText:e.madaLabel,handleClick:e.handleMada}),e.viaSTCPay&&a(U,{buttonText:e.stcPayLabel,handleClick:e.handleSTCPay}),e.viaPayPal&&a(Z,{buttonText:e.paypalLabel,handleClick:e.handlePayPal}),e.viaGooglePay&&a(H,{buttonText:e.googlePayLabel,handleClick:e.handleGooglePay}),e.viaApplePay&&a($,{buttonText:e.applePayLabel,handleClick:e.handleApplePay})]})})};E.propTypes={theme:n.oneOf(["secondary","primary"]),viaApplePay:n.bool,viaGooglePay:n.bool,viaSTCPay:n.bool,viaCreditCard:n.bool,viaPayPal:n.bool,handleApplePay:n.func};var te=function(e){var r,t,o=g(),n=o.formState.errors,l=o.handleSubmit;return a(O,{maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:a(O,{noMargin:!0,children:a(b,L(L({},o),{},{children:i("form",{onSubmit:l(e.handle),children:[a(E,{name:"password",placeholder:"Enter password",type:"password",inputLabel:"Password",rules:{required:"Password is rquired"},helperText:null===(r=n.password)||void 0===r?void 0:r.message}),a(E,{name:"password",placeholder:"Enter password",type:"password",inputLabel:"Password",rules:{required:"Password is rquired"},helperText:null===(t=n.password)||void 0===t?void 0:t.message}),a(F,{last:!0,fullWidth:!0,text:"Sign In",onClick:e.handleSignIn})]})}))})})},oe=function(e){var r,o=W(t(0),2),n=o[0],l=o[1],d=g(),s=d.formState.errors,u=d.handleSubmit;return a(O,{maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:i(O,{noMargin:!0,children:[i(M,{variant:"h2",align:"center",children:[Number(n).toLocaleString("en")," ",a("span",{style:{fontSize:20,letterSpacing:1},children:e.currency})]}),a(b,L(L({},d),{},{children:i("form",{onChange:function(e){e.preventDefault(),l(d.getValues().amount)},style:{marginTop:10},onSubmit:u(e.handleChargeWallet),children:[a(E,{name:"amount",placeholder:"Enter amount",type:"number",value:n,rules:{required:"Password is rquired"},helperText:null===(r=s.amount)||void 0===r?void 0:r.message}),a(F,{last:!0,fullWidth:!0,text:"Charge Wallet",onClick:e.handleSignIn})]})}))]})})},ne=function(e){return a(O,{maxWidth:400,noColor:!0,noMargin:!0,noPadding:!0,children:i(O,{noMargin:!0,children:[a("div",{children:"Wallet Balance"}),a(F,{text:"Pay now"})]})})};export{oe as ChargeWalletForm,te as CreditCardForm,Q as NewPasswordForm,ne as PayWithWallet,X as ResetPasswordForm,re as SelectPayment,ee as SignInForm,Y as SignUpForm,J as UserProfile,K as UserSettings};