From 5c6230ec3d980663002977e405c855eb35f2e06f Mon Sep 17 00:00:00 2001 From: Maksim-Mirkin Date: Thu, 20 Jun 2024 18:26:08 +0300 Subject: [PATCH] Updates --- .../{index-DLNjxMlT.js => index-CfO6zdQj.js} | 68 +++++++++---------- index.html | 2 +- 2 files changed, 35 insertions(+), 35 deletions(-) rename assets/{index-DLNjxMlT.js => index-CfO6zdQj.js} (58%) diff --git a/assets/index-DLNjxMlT.js b/assets/index-CfO6zdQj.js similarity index 58% rename from assets/index-DLNjxMlT.js rename to assets/index-CfO6zdQj.js index 477e8af..b5aae1d 100644 --- a/assets/index-DLNjxMlT.js +++ b/assets/index-CfO6zdQj.js @@ -1,4 +1,4 @@ -function HS(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var zr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function yp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ui(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Av={exports:{}},Nc={},Rv={exports:{}},Ne={};/** +function BS(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var zr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ui(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var $v={exports:{}},Nc={},Av={exports:{}},Ne={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function HS(e,t){for(var n=0;n>>1,ue=A[ce];if(0>>1;cei(Le,te))_ei(Ae,Le)?(A[ce]=Ae,A[_e]=te,ce=_e):(A[ce]=Le,A[he]=te,ce=he);else if(_ei(Ae,te))A[ce]=Ae,A[_e]=te,ce=_e;else break e}}return Y}function i(A,Y){var te=A.sortIndex-Y.sortIndex;return te!==0?te:A.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],d=[],f=1,h=null,v=3,C=!1,w=!1,S=!1,P=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var Y=n(d);Y!==null;){if(Y.callback===null)r(d);else if(Y.startTime<=A)r(d),Y.sortIndex=Y.expirationTime,t(l,Y);else break;Y=n(d)}}function E(A){if(S=!1,y(A),!w)if(n(l)!==null)w=!0,q(j);else{var Y=n(d);Y!==null&&ee(E,Y.startTime-A)}}function j(A,Y){w=!1,S&&(S=!1,m(O),O=-1),C=!0;var te=v;try{for(y(Y),h=n(l);h!==null&&(!(h.expirationTime>Y)||A&&!B());){var ce=h.callback;if(typeof ce=="function"){h.callback=null,v=h.priorityLevel;var ue=ce(h.expirationTime<=Y);Y=e.unstable_now(),typeof ue=="function"?h.callback=ue:h===n(l)&&r(l),y(Y)}else r(l);h=n(l)}if(h!==null)var F=!0;else{var he=n(d);he!==null&&ee(E,he.startTime-Y),F=!1}return F}finally{h=null,v=te,C=!1}}var L=!1,M=null,O=-1,I=5,_=-1;function B(){return!(e.unstable_now()-_A||125ce?(A.sortIndex=te,t(d,A),n(l)===null&&A===n(d)&&(S?(m(O),O=-1):S=!0,ee(E,te-ce))):(A.sortIndex=ue,t(l,A),w||C||(w=!0,q(j))),A},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(A){var Y=v;return function(){var te=v;v=Y;try{return A.apply(this,arguments)}finally{v=te}}}})(Kv);qv.exports=Kv;var d4=qv.exports;/** + */(function(e){function t(A,Y){var te=A.length;A.push(Y);e:for(;0>>1,ue=A[ce];if(0>>1;cei(Le,te))_ei(Ae,Le)?(A[ce]=Ae,A[_e]=te,ce=_e):(A[ce]=Le,A[he]=te,ce=he);else if(_ei(Ae,te))A[ce]=Ae,A[_e]=te,ce=_e;else break e}}return Y}function i(A,Y){var te=A.sortIndex-Y.sortIndex;return te!==0?te:A.id-Y.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],d=[],f=1,h=null,v=3,C=!1,w=!1,S=!1,P=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(A){for(var Y=n(d);Y!==null;){if(Y.callback===null)r(d);else if(Y.startTime<=A)r(d),Y.sortIndex=Y.expirationTime,t(l,Y);else break;Y=n(d)}}function E(A){if(S=!1,y(A),!w)if(n(l)!==null)w=!0,q(j);else{var Y=n(d);Y!==null&&ee(E,Y.startTime-A)}}function j(A,Y){w=!1,S&&(S=!1,m(O),O=-1),C=!0;var te=v;try{for(y(Y),h=n(l);h!==null&&(!(h.expirationTime>Y)||A&&!B());){var ce=h.callback;if(typeof ce=="function"){h.callback=null,v=h.priorityLevel;var ue=ce(h.expirationTime<=Y);Y=e.unstable_now(),typeof ue=="function"?h.callback=ue:h===n(l)&&r(l),y(Y)}else r(l);h=n(l)}if(h!==null)var F=!0;else{var he=n(d);he!==null&&ee(E,he.startTime-Y),F=!1}return F}finally{h=null,v=te,C=!1}}var L=!1,M=null,O=-1,I=5,_=-1;function B(){return!(e.unstable_now()-_A||125ce?(A.sortIndex=te,t(d,A),n(l)===null&&A===n(d)&&(S?(m(O),O=-1):S=!0,ee(E,te-ce))):(A.sortIndex=ue,t(l,A),w||C||(w=!0,q(j))),A},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(A){var Y=v;return function(){var te=v;v=Y;try{return A.apply(this,arguments)}finally{v=te}}}})(qv);Gv.exports=qv;var c4=Gv.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ function HS(e,t){for(var n=0;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kd=Object.prototype.hasOwnProperty,f4=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,rg={},ig={};function p4(e){return Kd.call(ig,e)?!0:Kd.call(rg,e)?!1:f4.test(e)?ig[e]=!0:(rg[e]=!0,!1)}function h4(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function m4(e,t,n,r){if(t===null||typeof t>"u"||h4(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function sn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ft[e]=new sn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ft[t]=new sn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ft[e]=new sn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ft[e]=new sn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ft[e]=new sn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ft[e]=new sn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ft[e]=new sn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ft[e]=new sn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ft[e]=new sn(e,5,!1,e.toLowerCase(),null,!1,!1)});var Cp=/[\-:]([a-z])/g;function kp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Cp,kp);Ft[t]=new sn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Cp,kp);Ft[t]=new sn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Cp,kp);Ft[t]=new sn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ft[e]=new sn(e,1,!1,e.toLowerCase(),null,!1,!1)});Ft.xlinkHref=new sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ft[e]=new sn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ep(e,t,n,r){var i=Ft.hasOwnProperty(t)?Ft[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Kd=Object.prototype.hasOwnProperty,u4=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ng={},rg={};function d4(e){return Kd.call(rg,e)?!0:Kd.call(ng,e)?!1:u4.test(e)?rg[e]=!0:(ng[e]=!0,!1)}function f4(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function p4(e,t,n,r){if(t===null||typeof t>"u"||f4(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function on(e,t,n,r,i,s,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=o}var Ft={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ft[e]=new on(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ft[t]=new on(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ft[e]=new on(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ft[e]=new on(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ft[e]=new on(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ft[e]=new on(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ft[e]=new on(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ft[e]=new on(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ft[e]=new on(e,5,!1,e.toLowerCase(),null,!1,!1)});var Sp=/[\-:]([a-z])/g;function Cp(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Sp,Cp);Ft[t]=new on(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Sp,Cp);Ft[t]=new on(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Sp,Cp);Ft[t]=new on(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ft[e]=new on(e,1,!1,e.toLowerCase(),null,!1,!1)});Ft.xlinkHref=new on("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ft[e]=new on(e,1,!1,e.toLowerCase(),null,!0,!0)});function kp(e,t,n,r){var i=Ft.hasOwnProperty(t)?Ft[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` -`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{td=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Es(e):""}function g4(e){switch(e.tag){case 5:return Es(e.type);case 16:return Es("Lazy");case 13:return Es("Suspense");case 19:return Es("SuspenseList");case 0:case 2:case 15:return e=nd(e.type,!1),e;case 11:return e=nd(e.type.render,!1),e;case 1:return e=nd(e.type,!0),e;default:return""}}function Zd(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ho:return"Fragment";case po:return"Portal";case Yd:return"Profiler";case Pp:return"StrictMode";case Xd:return"Suspense";case Qd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Zv:return(e.displayName||"Context")+".Consumer";case Qv:return(e._context.displayName||"Context")+".Provider";case jp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Tp:return t=e.displayName||null,t!==null?t:Zd(e.type)||"Memo";case Br:t=e._payload,e=e._init;try{return Zd(e(t))}catch{}}return null}function v4(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Zd(t);case 8:return t===Pp?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function li(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ey(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function y4(e){var t=ey(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ua(e){e._valueTracker||(e._valueTracker=y4(e))}function ty(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ey(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Dl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Jd(e,t){var n=t.checked;return it({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function sg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=li(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ny(e,t){t=t.checked,t!=null&&Ep(e,"checked",t,!1)}function ef(e,t){ny(e,t);var n=li(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?tf(e,t.type,n):t.hasOwnProperty("defaultValue")&&tf(e,t.type,li(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ag(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function tf(e,t,n){(t!=="number"||Dl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ps=Array.isArray;function jo(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ks(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _s={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},w4=["Webkit","ms","Moz","O"];Object.keys(_s).forEach(function(e){w4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_s[t]=_s[e]})});function sy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_s.hasOwnProperty(e)&&_s[e]?(""+t).trim():t+"px"}function ay(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=sy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var x4=it({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function of(e,t){if(t){if(x4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(J(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(J(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(J(61))}if(t.style!=null&&typeof t.style!="object")throw Error(J(62))}}function sf(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var af=null;function Np(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var lf=null,To=null,No=null;function ug(e){if(e=Sa(e)){if(typeof lf!="function")throw Error(J(280));var t=e.stateNode;t&&(t=Ic(t),lf(e.stateNode,e.type,t))}}function ly(e){To?No?No.push(e):No=[e]:To=e}function cy(){if(To){var e=To,t=No;if(No=To=null,ug(e),t)for(e=0;e>>=0,e===0?32:31-(_4(e)/M4|0)|0}var Ga=64,qa=4194304;function js(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=js(a):(o&=s,o!==0&&(r=js(o)))}else s=n&~i,s!==0?r=js(s):o!==0&&(r=js(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function xa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-er(t),e[t]=n}function A4(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Os),wg=" ",xg=!1;function Ny(e,t){switch(e){case"keyup":return uC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ly(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var mo=!1;function fC(e,t){switch(e){case"compositionend":return Ly(t);case"keypress":return t.which!==32?null:(xg=!0,wg);case"textInput":return e=t.data,e===wg&&xg?null:e;default:return null}}function pC(e,t){if(mo)return e==="compositionend"||!Rp&&Ny(e,t)?(e=jy(),xl=Ip=Gr=null,mo=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=kg(n)}}function Iy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Iy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function $y(){for(var e=window,t=Dl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dl(e.document)}return t}function Dp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function SC(e){var t=$y(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Iy(n.ownerDocument.documentElement,n)){if(r!==null&&Dp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Eg(n,o);var s=Eg(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,go=null,hf=null,$s=null,mf=!1;function Pg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mf||go==null||go!==Dl(r)||(r=go,"selectionStart"in r&&Dp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$s&&ea($s,r)||($s=r,r=Wl(hf,"onSelect"),0wo||(e.current=bf[wo],bf[wo]=null,wo--)}function qe(e,t){wo++,bf[wo]=e.current,e.current=t}var ci={},Qt=fi(ci),fn=fi(!1),$i=ci;function zo(e,t){var n=e.type.contextTypes;if(!n)return ci;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function pn(e){return e=e.childContextTypes,e!=null}function ql(){Ye(fn),Ye(Qt)}function Og(e,t,n){if(Qt.current!==ci)throw Error(J(168));qe(Qt,t),qe(fn,n)}function Uy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(J(108,v4(e)||"Unknown",i));return it({},n,r)}function Kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ci,$i=Qt.current,qe(Qt,e),qe(fn,fn.current),!0}function Ig(e,t,n){var r=e.stateNode;if(!r)throw Error(J(169));n?(e=Uy(e,t,$i),r.__reactInternalMemoizedMergedChildContext=e,Ye(fn),Ye(Qt),qe(Qt,e)):Ye(fn),qe(fn,n)}var Er=null,$c=!1,gd=!1;function Wy(e){Er===null?Er=[e]:Er.push(e)}function IC(e){$c=!0,Wy(e)}function pi(){if(!gd&&Er!==null){gd=!0;var e=0,t=ze;try{var n=Er;for(ze=1;e>=s,i-=s,jr=1<<32-er(t)+i|n<O?(I=M,M=null):I=M.sibling;var _=v(m,M,y[O],E);if(_===null){M===null&&(M=I);break}e&&M&&_.alternate===null&&t(m,M),g=o(_,g,O),L===null?j=_:L.sibling=_,L=_,M=I}if(O===y.length)return n(m,M),Ze&&bi(m,O),j;if(M===null){for(;OO?(I=M,M=null):I=M.sibling;var B=v(m,M,_.value,E);if(B===null){M===null&&(M=I);break}e&&M&&B.alternate===null&&t(m,M),g=o(B,g,O),L===null?j=B:L.sibling=B,L=B,M=I}if(_.done)return n(m,M),Ze&&bi(m,O),j;if(M===null){for(;!_.done;O++,_=y.next())_=h(m,_.value,E),_!==null&&(g=o(_,g,O),L===null?j=_:L.sibling=_,L=_);return Ze&&bi(m,O),j}for(M=r(m,M);!_.done;O++,_=y.next())_=C(M,m,O,_.value,E),_!==null&&(e&&_.alternate!==null&&M.delete(_.key===null?O:_.key),g=o(_,g,O),L===null?j=_:L.sibling=_,L=_);return e&&M.forEach(function(z){return t(m,z)}),Ze&&bi(m,O),j}function P(m,g,y,E){if(typeof y=="object"&&y!==null&&y.type===ho&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ha:e:{for(var j=y.key,L=g;L!==null;){if(L.key===j){if(j=y.type,j===ho){if(L.tag===7){n(m,L.sibling),g=i(L,y.props.children),g.return=m,m=g;break e}}else if(L.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Br&&Bg(j)===L.type){n(m,L.sibling),g=i(L,y.props),g.ref=hs(m,L,y),g.return=m,m=g;break e}n(m,L);break}else t(m,L);L=L.sibling}y.type===ho?(g=Oi(y.props.children,m.mode,E,y.key),g.return=m,m=g):(E=Tl(y.type,y.key,y.props,null,m.mode,E),E.ref=hs(m,g,y),E.return=m,m=E)}return s(m);case po:e:{for(L=y.key;g!==null;){if(g.key===L)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(m,g.sibling),g=i(g,y.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=kd(y,m.mode,E),g.return=m,m=g}return s(m);case Br:return L=y._init,P(m,g,L(y._payload),E)}if(Ps(y))return w(m,g,y,E);if(cs(y))return S(m,g,y,E);el(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(m,g.sibling),g=i(g,y),g.return=m,m=g):(n(m,g),g=Cd(y,m.mode,E),g.return=m,m=g),s(m)):n(m,g)}return P}var Bo=Jy(!0),e1=Jy(!1),Ca={},mr=fi(Ca),ia=fi(Ca),oa=fi(Ca);function Ni(e){if(e===Ca)throw Error(J(174));return e}function qp(e,t){switch(qe(oa,t),qe(ia,e),qe(mr,Ca),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:rf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=rf(t,e)}Ye(mr),qe(mr,t)}function Vo(){Ye(mr),Ye(ia),Ye(oa)}function t1(e){Ni(oa.current);var t=Ni(mr.current),n=rf(t,e.type);t!==n&&(qe(ia,e),qe(mr,n))}function Kp(e){ia.current===e&&(Ye(mr),Ye(ia))}var nt=fi(0);function ec(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vd=[];function Yp(){for(var e=0;en?n:4,e(!0);var r=yd.transition;yd.transition={};try{e(!1),t()}finally{ze=n,yd.transition=r}}function v1(){return Vn().memoizedState}function DC(e,t,n){var r=oi(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},y1(e))w1(t,n);else if(n=Yy(e,t,n,r),n!==null){var i=rn();tr(n,e,r,i),x1(n,t,r)}}function zC(e,t,n){var r=oi(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(y1(e))w1(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,nr(a,s)){var l=t.interleaved;l===null?(i.next=i,Wp(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Yy(e,t,i,r),n!==null&&(i=rn(),tr(n,e,r,i),x1(n,t,r))}}function y1(e){var t=e.alternate;return e===rt||t!==null&&t===rt}function w1(e,t){As=tc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function x1(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,_p(e,n)}}var nc={readContext:Bn,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useInsertionEffect:Gt,useLayoutEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useMutableSource:Gt,useSyncExternalStore:Gt,useId:Gt,unstable_isNewReconciler:!1},FC={readContext:Bn,useCallback:function(e,t){return lr().memoizedState=[e,t===void 0?null:t],e},useContext:Bn,useEffect:Hg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,kl(4194308,4,f1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return kl(4194308,4,e,t)},useInsertionEffect:function(e,t){return kl(4,2,e,t)},useMemo:function(e,t){var n=lr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=DC.bind(null,rt,e),[r.memoizedState,e]},useRef:function(e){var t=lr();return e={current:e},t.memoizedState=e},useState:Vg,useDebugValue:eh,useDeferredValue:function(e){return lr().memoizedState=e},useTransition:function(){var e=Vg(!1),t=e[0];return e=RC.bind(null,e[1]),lr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=rt,i=lr();if(Ze){if(n===void 0)throw Error(J(407));n=n()}else{if(n=t(),Mt===null)throw Error(J(349));Ri&30||i1(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Hg(s1.bind(null,r,o,e),[e]),r.flags|=2048,la(9,o1.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=lr(),t=Mt.identifierPrefix;if(Ze){var n=Tr,r=jr;n=(r&~(1<<32-er(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=sa++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[dr]=t,e[ra]=r,N1(e,t,!1,!1),t.stateNode=e;e:{switch(s=sf(n,r),n){case"dialog":Ke("cancel",e),Ke("close",e),i=r;break;case"iframe":case"object":case"embed":Ke("load",e),i=r;break;case"video":case"audio":for(i=0;iUo&&(t.flags|=128,r=!0,ms(o,!1),t.lanes=4194304)}else{if(!r)if(e=ec(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ms(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ze)return qt(t),null}else 2*gt()-o.renderingStartTime>Uo&&n!==1073741824&&(t.flags|=128,r=!0,ms(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=gt(),t.sibling=null,n=nt.current,qe(nt,r?n&1|2:n&1),t):(qt(t),null);case 22:case 23:return sh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?xn&1073741824&&(qt(t),t.subtreeFlags&6&&(t.flags|=8192)):qt(t),null;case 24:return null;case 25:return null}throw Error(J(156,t.tag))}function KC(e,t){switch(Fp(t),t.tag){case 1:return pn(t.type)&&ql(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vo(),Ye(fn),Ye(Qt),Yp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Kp(t),null;case 13:if(Ye(nt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(J(340));Fo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ye(nt),null;case 4:return Vo(),null;case 10:return Up(t.type._context),null;case 22:case 23:return sh(),null;case 24:return null;default:return null}}var nl=!1,Yt=!1,YC=typeof WeakSet=="function"?WeakSet:Set,le=null;function Co(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){lt(e,t,r)}else n.current=null}function Of(e,t,n){try{n()}catch(r){lt(e,t,r)}}var Zg=!1;function XC(e,t){if(gf=Hl,e=$y(),Dp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,d=0,f=0,h=e,v=null;t:for(;;){for(var C;h!==n||i!==0&&h.nodeType!==3||(a=s+i),h!==o||r!==0&&h.nodeType!==3||(l=s+r),h.nodeType===3&&(s+=h.nodeValue.length),(C=h.firstChild)!==null;)v=h,h=C;for(;;){if(h===e)break t;if(v===n&&++d===i&&(a=s),v===o&&++f===r&&(l=s),(C=h.nextSibling)!==null)break;h=v,v=h.parentNode}h=C}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(vf={focusedElem:e,selectionRange:n},Hl=!1,le=t;le!==null;)if(t=le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,le=e;else for(;le!==null;){t=le;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,P=w.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?S:Yn(t.type,S),P);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(J(163))}}catch(E){lt(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return w=Zg,Zg=!1,w}function Rs(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Of(t,n,o)}i=i.next}while(i!==r)}}function Dc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function If(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function M1(e){var t=e.alternate;t!==null&&(e.alternate=null,M1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[dr],delete t[ra],delete t[xf],delete t[MC],delete t[OC])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function O1(e){return e.tag===5||e.tag===3||e.tag===4}function Jg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||O1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $f(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gl));else if(r!==4&&(e=e.child,e!==null))for($f(e,t,n),e=e.sibling;e!==null;)$f(e,t,n),e=e.sibling}function Af(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Af(e,t,n),e=e.sibling;e!==null;)Af(e,t,n),e=e.sibling}var Rt=null,Xn=!1;function Fr(e,t,n){for(n=n.child;n!==null;)I1(e,t,n),n=n.sibling}function I1(e,t,n){if(hr&&typeof hr.onCommitFiberUnmount=="function")try{hr.onCommitFiberUnmount(Lc,n)}catch{}switch(n.tag){case 5:Yt||Co(n,t);case 6:var r=Rt,i=Xn;Rt=null,Fr(e,t,n),Rt=r,Xn=i,Rt!==null&&(Xn?(e=Rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Rt.removeChild(n.stateNode));break;case 18:Rt!==null&&(Xn?(e=Rt,n=n.stateNode,e.nodeType===8?md(e.parentNode,n):e.nodeType===1&&md(e,n),Zs(e)):md(Rt,n.stateNode));break;case 4:r=Rt,i=Xn,Rt=n.stateNode.containerInfo,Xn=!0,Fr(e,t,n),Rt=r,Xn=i;break;case 0:case 11:case 14:case 15:if(!Yt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&Of(n,t,s),i=i.next}while(i!==r)}Fr(e,t,n);break;case 1:if(!Yt&&(Co(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){lt(n,t,a)}Fr(e,t,n);break;case 21:Fr(e,t,n);break;case 22:n.mode&1?(Yt=(r=Yt)||n.memoizedState!==null,Fr(e,t,n),Yt=r):Fr(e,t,n);break;default:Fr(e,t,n)}}function e0(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new YC),t.forEach(function(r){var i=o3.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Kn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=gt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*ZC(r/1960))-r,10e?16:e,qr===null)var r=!1;else{if(e=qr,qr=null,oc=0,$e&6)throw Error(J(331));var i=$e;for($e|=4,le=e.current;le!==null;){var o=le,s=o.child;if(le.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lgt()-ih?Mi(e,0):rh|=n),hn(e,t)}function V1(e,t){t===0&&(e.mode&1?(t=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):t=1);var n=rn();e=Or(e,t),e!==null&&(xa(e,t,n),hn(e,n))}function i3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),V1(e,n)}function o3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(J(314))}r!==null&&r.delete(t),V1(e,n)}var H1;H1=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fn.current)dn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dn=!1,GC(e,t,n);dn=!!(e.flags&131072)}else dn=!1,Ze&&t.flags&1048576&&Gy(t,Xl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;El(e,t),e=t.pendingProps;var i=zo(t,Qt.current);_o(t,n),i=Qp(null,t,r,e,i,n);var o=Zp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pn(r)?(o=!0,Kl(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Gp(t),i.updater=Ac,t.stateNode=i,i._reactInternals=t,Pf(t,r,e,n),t=Nf(null,t,r,!0,o,n)):(t.tag=0,Ze&&o&&zp(t),tn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(El(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=a3(r),e=Yn(r,e),i){case 0:t=Tf(null,t,r,e,n);break e;case 1:t=Yg(null,t,r,e,n);break e;case 11:t=qg(null,t,r,e,n);break e;case 14:t=Kg(null,t,r,Yn(r.type,e),n);break e}throw Error(J(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yn(r,i),Tf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yn(r,i),Yg(e,t,r,i,n);case 3:e:{if(P1(t),e===null)throw Error(J(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Xy(e,t),Jl(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Ho(Error(J(423)),t),t=Xg(e,t,r,n,i);break e}else if(r!==i){i=Ho(Error(J(424)),t),t=Xg(e,t,r,n,i);break e}else for(Cn=ni(t.stateNode.containerInfo.firstChild),kn=t,Ze=!0,Qn=null,n=e1(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Fo(),r===i){t=Ir(e,t,n);break e}tn(e,t,r,n)}t=t.child}return t;case 5:return t1(t),e===null&&Cf(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,yf(r,i)?s=null:o!==null&&yf(r,o)&&(t.flags|=32),E1(e,t),tn(e,t,s,n),t.child;case 6:return e===null&&Cf(t),null;case 13:return j1(e,t,n);case 4:return qp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Bo(t,null,r,n):tn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yn(r,i),qg(e,t,r,i,n);case 7:return tn(e,t,t.pendingProps,n),t.child;case 8:return tn(e,t,t.pendingProps.children,n),t.child;case 12:return tn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,qe(Ql,r._currentValue),r._currentValue=s,o!==null)if(nr(o.value,s)){if(o.children===i.children&&!fn.current){t=Ir(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Lr(-1,n&-n),l.tag=2;var d=o.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?l.next=l:(l.next=f.next,f.next=l),d.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),kf(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(J(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),kf(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}tn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,_o(t,n),i=Bn(i),r=r(i),t.flags|=1,tn(e,t,r,n),t.child;case 14:return r=t.type,i=Yn(r,t.pendingProps),i=Yn(r.type,i),Kg(e,t,r,i,n);case 15:return C1(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yn(r,i),El(e,t),t.tag=1,pn(r)?(e=!0,Kl(t)):e=!1,_o(t,n),Zy(t,r,i),Pf(t,r,i,n),Nf(null,t,r,!0,e,n);case 19:return T1(e,t,n);case 22:return k1(e,t,n)}throw Error(J(156,t.tag))};function U1(e,t){return gy(e,t)}function s3(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(e,t,n,r){return new s3(e,t,n,r)}function lh(e){return e=e.prototype,!(!e||!e.isReactComponent)}function a3(e){if(typeof e=="function")return lh(e)?1:0;if(e!=null){if(e=e.$$typeof,e===jp)return 11;if(e===Tp)return 14}return 2}function si(e,t){var n=e.alternate;return n===null?(n=Dn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tl(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")lh(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ho:return Oi(n.children,i,o,t);case Pp:s=8,i|=8;break;case Yd:return e=Dn(12,n,t,i|2),e.elementType=Yd,e.lanes=o,e;case Xd:return e=Dn(13,n,t,i),e.elementType=Xd,e.lanes=o,e;case Qd:return e=Dn(19,n,t,i),e.elementType=Qd,e.lanes=o,e;case Jv:return Fc(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Qv:s=10;break e;case Zv:s=9;break e;case jp:s=11;break e;case Tp:s=14;break e;case Br:s=16,r=null;break e}throw Error(J(130,e==null?e:typeof e,""))}return t=Dn(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Oi(e,t,n,r){return e=Dn(7,e,r,t),e.lanes=n,e}function Fc(e,t,n,r){return e=Dn(22,e,r,t),e.elementType=Jv,e.lanes=n,e.stateNode={isHidden:!1},e}function Cd(e,t,n){return e=Dn(6,e,null,t),e.lanes=n,e}function kd(e,t,n){return t=Dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function l3(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=id(0),this.expirationTimes=id(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=id(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ch(e,t,n,r,i,o,s,a,l){return e=new l3(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Dn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gp(o),e}function c3(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(K1)}catch(e){console.error(e)}}K1(),Gv.exports=jn;var ph=Gv.exports;const ol=yp(ph);var Y1,l0=ph;Y1=l0.createRoot,l0.hydrateRoot;/** +`),s=r.stack.split(` +`),o=i.length-1,a=s.length-1;1<=o&&0<=a&&i[o]!==s[a];)a--;for(;1<=o&&0<=a;o--,a--)if(i[o]!==s[a]){if(o!==1||a!==1)do if(o--,a--,0>a||i[o]!==s[a]){var l=` +`+i[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{td=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Eo(e):""}function h4(e){switch(e.tag){case 5:return Eo(e.type);case 16:return Eo("Lazy");case 13:return Eo("Suspense");case 19:return Eo("SuspenseList");case 0:case 2:case 15:return e=nd(e.type,!1),e;case 11:return e=nd(e.type.render,!1),e;case 1:return e=nd(e.type,!0),e;default:return""}}function Zd(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ps:return"Fragment";case fs:return"Portal";case Yd:return"Profiler";case Ep:return"StrictMode";case Xd:return"Suspense";case Qd:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Qv:return(e.displayName||"Context")+".Consumer";case Xv:return(e._context.displayName||"Context")+".Provider";case Pp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case jp:return t=e.displayName||null,t!==null?t:Zd(e.type)||"Memo";case Br:t=e._payload,e=e._init;try{return Zd(e(t))}catch{}}return null}function m4(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Zd(t);case 8:return t===Ep?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function li(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Jv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function g4(e){var t=Jv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){r=""+o,s.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ua(e){e._valueTracker||(e._valueTracker=g4(e))}function ey(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Jv(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Dl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Jd(e,t){var n=t.checked;return rt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function sg(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=li(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ty(e,t){t=t.checked,t!=null&&kp(e,"checked",t,!1)}function ef(e,t){ty(e,t);var n=li(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?tf(e,t.type,n):t.hasOwnProperty("defaultValue")&&tf(e,t.type,li(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function og(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function tf(e,t,n){(t!=="number"||Dl(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Po=Array.isArray;function Ps(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Wa.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ko(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var _o={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},v4=["Webkit","ms","Moz","O"];Object.keys(_o).forEach(function(e){v4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),_o[t]=_o[e]})});function sy(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||_o.hasOwnProperty(e)&&_o[e]?(""+t).trim():t+"px"}function oy(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=sy(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var y4=rt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function sf(e,t){if(t){if(y4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(J(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(J(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(J(61))}if(t.style!=null&&typeof t.style!="object")throw Error(J(62))}}function of(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var af=null;function Tp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var lf=null,js=null,Ts=null;function cg(e){if(e=Sa(e)){if(typeof lf!="function")throw Error(J(280));var t=e.stateNode;t&&(t=Ic(t),lf(e.stateNode,e.type,t))}}function ay(e){js?Ts?Ts.push(e):Ts=[e]:js=e}function ly(){if(js){var e=js,t=Ts;if(Ts=js=null,cg(e),t)for(e=0;e>>=0,e===0?32:31-(N4(e)/L4|0)|0}var Ga=64,qa=4194304;function jo(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Vl(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~i;a!==0?r=jo(a):(s&=o,s!==0&&(r=jo(s)))}else o=n&~i,o!==0?r=jo(o):s!==0&&(r=jo(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function xa(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-er(t),e[t]=n}function I4(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Oo),yg=" ",wg=!1;function Ty(e,t){switch(e){case"keyup":return lC.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ny(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var hs=!1;function uC(e,t){switch(e){case"compositionend":return Ny(t);case"keypress":return t.which!==32?null:(wg=!0,yg);case"textInput":return e=t.data,e===yg&&wg?null:e;default:return null}}function dC(e,t){if(hs)return e==="compositionend"||!Ap&&Ty(e,t)?(e=Py(),xl=Op=Gr=null,hs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Cg(n)}}function Oy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Oy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Iy(){for(var e=window,t=Dl();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Dl(e.document)}return t}function Rp(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function xC(e){var t=Iy(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Oy(n.ownerDocument.documentElement,n)){if(r!==null&&Rp(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=kg(n,s);var o=kg(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ms=null,hf=null,$o=null,mf=!1;function Eg(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;mf||ms==null||ms!==Dl(r)||(r=ms,"selectionStart"in r&&Rp(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$o&&ea($o,r)||($o=r,r=Wl(hf,"onSelect"),0ys||(e.current=bf[ys],bf[ys]=null,ys--)}function qe(e,t){ys++,bf[ys]=e.current,e.current=t}var ci={},Qt=fi(ci),fn=fi(!1),$i=ci;function Ds(e,t){var n=e.type.contextTypes;if(!n)return ci;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function pn(e){return e=e.childContextTypes,e!=null}function ql(){Ye(fn),Ye(Qt)}function Mg(e,t,n){if(Qt.current!==ci)throw Error(J(168));qe(Qt,t),qe(fn,n)}function Hy(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(J(108,m4(e)||"Unknown",i));return rt({},n,r)}function Kl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ci,$i=Qt.current,qe(Qt,e),qe(fn,fn.current),!0}function Og(e,t,n){var r=e.stateNode;if(!r)throw Error(J(169));n?(e=Hy(e,t,$i),r.__reactInternalMemoizedMergedChildContext=e,Ye(fn),Ye(Qt),qe(Qt,e)):Ye(fn),qe(fn,n)}var Er=null,$c=!1,gd=!1;function Uy(e){Er===null?Er=[e]:Er.push(e)}function MC(e){$c=!0,Uy(e)}function pi(){if(!gd&&Er!==null){gd=!0;var e=0,t=ze;try{var n=Er;for(ze=1;e>=o,i-=o,jr=1<<32-er(t)+i|n<O?(I=M,M=null):I=M.sibling;var _=v(m,M,y[O],E);if(_===null){M===null&&(M=I);break}e&&M&&_.alternate===null&&t(m,M),g=s(_,g,O),L===null?j=_:L.sibling=_,L=_,M=I}if(O===y.length)return n(m,M),Ze&&bi(m,O),j;if(M===null){for(;OO?(I=M,M=null):I=M.sibling;var B=v(m,M,_.value,E);if(B===null){M===null&&(M=I);break}e&&M&&B.alternate===null&&t(m,M),g=s(B,g,O),L===null?j=B:L.sibling=B,L=B,M=I}if(_.done)return n(m,M),Ze&&bi(m,O),j;if(M===null){for(;!_.done;O++,_=y.next())_=h(m,_.value,E),_!==null&&(g=s(_,g,O),L===null?j=_:L.sibling=_,L=_);return Ze&&bi(m,O),j}for(M=r(m,M);!_.done;O++,_=y.next())_=C(M,m,O,_.value,E),_!==null&&(e&&_.alternate!==null&&M.delete(_.key===null?O:_.key),g=s(_,g,O),L===null?j=_:L.sibling=_,L=_);return e&&M.forEach(function(z){return t(m,z)}),Ze&&bi(m,O),j}function P(m,g,y,E){if(typeof y=="object"&&y!==null&&y.type===ps&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ha:e:{for(var j=y.key,L=g;L!==null;){if(L.key===j){if(j=y.type,j===ps){if(L.tag===7){n(m,L.sibling),g=i(L,y.props.children),g.return=m,m=g;break e}}else if(L.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Br&&Fg(j)===L.type){n(m,L.sibling),g=i(L,y.props),g.ref=ho(m,L,y),g.return=m,m=g;break e}n(m,L);break}else t(m,L);L=L.sibling}y.type===ps?(g=Oi(y.props.children,m.mode,E,y.key),g.return=m,m=g):(E=Tl(y.type,y.key,y.props,null,m.mode,E),E.ref=ho(m,g,y),E.return=m,m=E)}return o(m);case fs:e:{for(L=y.key;g!==null;){if(g.key===L)if(g.tag===4&&g.stateNode.containerInfo===y.containerInfo&&g.stateNode.implementation===y.implementation){n(m,g.sibling),g=i(g,y.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=kd(y,m.mode,E),g.return=m,m=g}return o(m);case Br:return L=y._init,P(m,g,L(y._payload),E)}if(Po(y))return w(m,g,y,E);if(lo(y))return S(m,g,y,E);el(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,g!==null&&g.tag===6?(n(m,g.sibling),g=i(g,y),g.return=m,m=g):(n(m,g),g=Cd(y,m.mode,E),g.return=m,m=g),o(m)):n(m,g)}return P}var Fs=Zy(!0),Jy=Zy(!1),Ca={},mr=fi(Ca),ia=fi(Ca),sa=fi(Ca);function Ni(e){if(e===Ca)throw Error(J(174));return e}function Gp(e,t){switch(qe(sa,t),qe(ia,e),qe(mr,Ca),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:rf(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=rf(t,e)}Ye(mr),qe(mr,t)}function Bs(){Ye(mr),Ye(ia),Ye(sa)}function e1(e){Ni(sa.current);var t=Ni(mr.current),n=rf(t,e.type);t!==n&&(qe(ia,e),qe(mr,n))}function qp(e){ia.current===e&&(Ye(mr),Ye(ia))}var tt=fi(0);function ec(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var vd=[];function Kp(){for(var e=0;en?n:4,e(!0);var r=yd.transition;yd.transition={};try{e(!1),t()}finally{ze=n,yd.transition=r}}function g1(){return Vn().memoizedState}function AC(e,t,n){var r=si(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},v1(e))y1(t,n);else if(n=Ky(e,t,n,r),n!==null){var i=rn();tr(n,e,r,i),w1(n,t,r)}}function RC(e,t,n){var r=si(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(v1(e))y1(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var o=t.lastRenderedState,a=s(o,n);if(i.hasEagerState=!0,i.eagerState=a,nr(a,o)){var l=t.interleaved;l===null?(i.next=i,Up(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Ky(e,t,i,r),n!==null&&(i=rn(),tr(n,e,r,i),w1(n,t,r))}}function v1(e){var t=e.alternate;return e===nt||t!==null&&t===nt}function y1(e,t){Ao=tc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function w1(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lp(e,n)}}var nc={readContext:Bn,useCallback:Gt,useContext:Gt,useEffect:Gt,useImperativeHandle:Gt,useInsertionEffect:Gt,useLayoutEffect:Gt,useMemo:Gt,useReducer:Gt,useRef:Gt,useState:Gt,useDebugValue:Gt,useDeferredValue:Gt,useTransition:Gt,useMutableSource:Gt,useSyncExternalStore:Gt,useId:Gt,unstable_isNewReconciler:!1},DC={readContext:Bn,useCallback:function(e,t){return lr().memoizedState=[e,t===void 0?null:t],e},useContext:Bn,useEffect:Vg,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,kl(4194308,4,d1.bind(null,t,e),n)},useLayoutEffect:function(e,t){return kl(4194308,4,e,t)},useInsertionEffect:function(e,t){return kl(4,2,e,t)},useMemo:function(e,t){var n=lr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=lr();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=AC.bind(null,nt,e),[r.memoizedState,e]},useRef:function(e){var t=lr();return e={current:e},t.memoizedState=e},useState:Bg,useDebugValue:Jp,useDeferredValue:function(e){return lr().memoizedState=e},useTransition:function(){var e=Bg(!1),t=e[0];return e=$C.bind(null,e[1]),lr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=nt,i=lr();if(Ze){if(n===void 0)throw Error(J(407));n=n()}else{if(n=t(),Mt===null)throw Error(J(349));Ri&30||r1(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Vg(s1.bind(null,r,s,e),[e]),r.flags|=2048,la(9,i1.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=lr(),t=Mt.identifierPrefix;if(Ze){var n=Tr,r=jr;n=(r&~(1<<32-er(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=oa++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[dr]=t,e[ra]=r,T1(e,t,!1,!1),t.stateNode=e;e:{switch(o=of(n,r),n){case"dialog":Ke("cancel",e),Ke("close",e),i=r;break;case"iframe":case"object":case"embed":Ke("load",e),i=r;break;case"video":case"audio":for(i=0;iHs&&(t.flags|=128,r=!0,mo(s,!1),t.lanes=4194304)}else{if(!r)if(e=ec(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),mo(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!Ze)return qt(t),null}else 2*mt()-s.renderingStartTime>Hs&&n!==1073741824&&(t.flags|=128,r=!0,mo(s,!1),t.lanes=4194304);s.isBackwards?(o.sibling=t.child,t.child=o):(n=s.last,n!==null?n.sibling=o:t.child=o,s.last=o)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=mt(),t.sibling=null,n=tt.current,qe(tt,r?n&1|2:n&1),t):(qt(t),null);case 22:case 23:return sh(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?xn&1073741824&&(qt(t),t.subtreeFlags&6&&(t.flags|=8192)):qt(t),null;case 24:return null;case 25:return null}throw Error(J(156,t.tag))}function GC(e,t){switch(zp(t),t.tag){case 1:return pn(t.type)&&ql(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Bs(),Ye(fn),Ye(Qt),Kp(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qp(t),null;case 13:if(Ye(tt),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(J(340));zs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ye(tt),null;case 4:return Bs(),null;case 10:return Hp(t.type._context),null;case 22:case 23:return sh(),null;case 24:return null;default:return null}}var nl=!1,Yt=!1,qC=typeof WeakSet=="function"?WeakSet:Set,le=null;function Ss(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){at(e,t,r)}else n.current=null}function Of(e,t,n){try{n()}catch(r){at(e,t,r)}}var Qg=!1;function KC(e,t){if(gf=Hl,e=Iy(),Rp(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,d=0,f=0,h=e,v=null;t:for(;;){for(var C;h!==n||i!==0&&h.nodeType!==3||(a=o+i),h!==s||r!==0&&h.nodeType!==3||(l=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(C=h.firstChild)!==null;)v=h,h=C;for(;;){if(h===e)break t;if(v===n&&++d===i&&(a=o),v===s&&++f===r&&(l=o),(C=h.nextSibling)!==null)break;h=v,v=h.parentNode}h=C}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(vf={focusedElem:e,selectionRange:n},Hl=!1,le=t;le!==null;)if(t=le,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,le=e;else for(;le!==null;){t=le;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,P=w.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?S:Yn(t.type,S),P);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(J(163))}}catch(E){at(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,le=e;break}le=t.return}return w=Qg,Qg=!1,w}function Ro(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Of(t,n,s)}i=i.next}while(i!==r)}}function Dc(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function If(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function _1(e){var t=e.alternate;t!==null&&(e.alternate=null,_1(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[dr],delete t[ra],delete t[xf],delete t[LC],delete t[_C])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function M1(e){return e.tag===5||e.tag===3||e.tag===4}function Zg(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||M1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function $f(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Gl));else if(r!==4&&(e=e.child,e!==null))for($f(e,t,n),e=e.sibling;e!==null;)$f(e,t,n),e=e.sibling}function Af(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Af(e,t,n),e=e.sibling;e!==null;)Af(e,t,n),e=e.sibling}var Rt=null,Xn=!1;function Fr(e,t,n){for(n=n.child;n!==null;)O1(e,t,n),n=n.sibling}function O1(e,t,n){if(hr&&typeof hr.onCommitFiberUnmount=="function")try{hr.onCommitFiberUnmount(Lc,n)}catch{}switch(n.tag){case 5:Yt||Ss(n,t);case 6:var r=Rt,i=Xn;Rt=null,Fr(e,t,n),Rt=r,Xn=i,Rt!==null&&(Xn?(e=Rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Rt.removeChild(n.stateNode));break;case 18:Rt!==null&&(Xn?(e=Rt,n=n.stateNode,e.nodeType===8?md(e.parentNode,n):e.nodeType===1&&md(e,n),Zo(e)):md(Rt,n.stateNode));break;case 4:r=Rt,i=Xn,Rt=n.stateNode.containerInfo,Xn=!0,Fr(e,t,n),Rt=r,Xn=i;break;case 0:case 11:case 14:case 15:if(!Yt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Of(n,t,o),i=i.next}while(i!==r)}Fr(e,t,n);break;case 1:if(!Yt&&(Ss(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){at(n,t,a)}Fr(e,t,n);break;case 21:Fr(e,t,n);break;case 22:n.mode&1?(Yt=(r=Yt)||n.memoizedState!==null,Fr(e,t,n),Yt=r):Fr(e,t,n);break;default:Fr(e,t,n)}}function Jg(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new qC),t.forEach(function(r){var i=r3.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Kn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=o),r&=~s}if(r=i,r=mt()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*XC(r/1960))-r,10e?16:e,qr===null)var r=!1;else{if(e=qr,qr=null,sc=0,$e&6)throw Error(J(331));var i=$e;for($e|=4,le=e.current;le!==null;){var s=le,o=s.child;if(le.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lmt()-rh?Mi(e,0):nh|=n),hn(e,t)}function B1(e,t){t===0&&(e.mode&1?(t=qa,qa<<=1,!(qa&130023424)&&(qa=4194304)):t=1);var n=rn();e=Or(e,t),e!==null&&(xa(e,t,n),hn(e,n))}function n3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),B1(e,n)}function r3(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(J(314))}r!==null&&r.delete(t),B1(e,n)}var V1;V1=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fn.current)dn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dn=!1,UC(e,t,n);dn=!!(e.flags&131072)}else dn=!1,Ze&&t.flags&1048576&&Wy(t,Xl,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;El(e,t),e=t.pendingProps;var i=Ds(t,Qt.current);Ls(t,n),i=Xp(null,t,r,e,i,n);var s=Qp();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pn(r)?(s=!0,Kl(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Wp(t),i.updater=Ac,t.stateNode=i,i._reactInternals=t,Pf(t,r,e,n),t=Nf(null,t,r,!0,s,n)):(t.tag=0,Ze&&s&&Dp(t),tn(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(El(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=s3(r),e=Yn(r,e),i){case 0:t=Tf(null,t,r,e,n);break e;case 1:t=Kg(null,t,r,e,n);break e;case 11:t=Gg(null,t,r,e,n);break e;case 14:t=qg(null,t,r,Yn(r.type,e),n);break e}throw Error(J(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yn(r,i),Tf(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yn(r,i),Kg(e,t,r,i,n);case 3:e:{if(E1(t),e===null)throw Error(J(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Yy(e,t),Jl(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=Vs(Error(J(423)),t),t=Yg(e,t,r,n,i);break e}else if(r!==i){i=Vs(Error(J(424)),t),t=Yg(e,t,r,n,i);break e}else for(Cn=ni(t.stateNode.containerInfo.firstChild),kn=t,Ze=!0,Qn=null,n=Jy(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zs(),r===i){t=Ir(e,t,n);break e}tn(e,t,r,n)}t=t.child}return t;case 5:return e1(t),e===null&&Cf(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,o=i.children,yf(r,i)?o=null:s!==null&&yf(r,s)&&(t.flags|=32),k1(e,t),tn(e,t,o,n),t.child;case 6:return e===null&&Cf(t),null;case 13:return P1(e,t,n);case 4:return Gp(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fs(t,null,r,n):tn(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yn(r,i),Gg(e,t,r,i,n);case 7:return tn(e,t,t.pendingProps,n),t.child;case 8:return tn(e,t,t.pendingProps.children,n),t.child;case 12:return tn(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,qe(Ql,r._currentValue),r._currentValue=o,s!==null)if(nr(s.value,o)){if(s.children===i.children&&!fn.current){t=Ir(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Lr(-1,n&-n),l.tag=2;var d=s.updateQueue;if(d!==null){d=d.shared;var f=d.pending;f===null?l.next=l:(l.next=f.next,f.next=l),d.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),kf(s.return,n,t),a.lanes|=n;break}l=l.next}}else if(s.tag===10)o=s.type===t.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(J(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),kf(o,n,t),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===t){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}tn(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Ls(t,n),i=Bn(i),r=r(i),t.flags|=1,tn(e,t,r,n),t.child;case 14:return r=t.type,i=Yn(r,t.pendingProps),i=Yn(r.type,i),qg(e,t,r,i,n);case 15:return S1(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Yn(r,i),El(e,t),t.tag=1,pn(r)?(e=!0,Kl(t)):e=!1,Ls(t,n),Qy(t,r,i),Pf(t,r,i,n),Nf(null,t,r,!0,e,n);case 19:return j1(e,t,n);case 22:return C1(e,t,n)}throw Error(J(156,t.tag))};function H1(e,t){return my(e,t)}function i3(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(e,t,n,r){return new i3(e,t,n,r)}function ah(e){return e=e.prototype,!(!e||!e.isReactComponent)}function s3(e){if(typeof e=="function")return ah(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pp)return 11;if(e===jp)return 14}return 2}function oi(e,t){var n=e.alternate;return n===null?(n=Dn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tl(e,t,n,r,i,s){var o=2;if(r=e,typeof e=="function")ah(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case ps:return Oi(n.children,i,s,t);case Ep:o=8,i|=8;break;case Yd:return e=Dn(12,n,t,i|2),e.elementType=Yd,e.lanes=s,e;case Xd:return e=Dn(13,n,t,i),e.elementType=Xd,e.lanes=s,e;case Qd:return e=Dn(19,n,t,i),e.elementType=Qd,e.lanes=s,e;case Zv:return Fc(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xv:o=10;break e;case Qv:o=9;break e;case Pp:o=11;break e;case jp:o=14;break e;case Br:o=16,r=null;break e}throw Error(J(130,e==null?e:typeof e,""))}return t=Dn(o,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Oi(e,t,n,r){return e=Dn(7,e,r,t),e.lanes=n,e}function Fc(e,t,n,r){return e=Dn(22,e,r,t),e.elementType=Zv,e.lanes=n,e.stateNode={isHidden:!1},e}function Cd(e,t,n){return e=Dn(6,e,null,t),e.lanes=n,e}function kd(e,t,n){return t=Dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function o3(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=id(0),this.expirationTimes=id(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=id(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function lh(e,t,n,r,i,s,o,a,l){return e=new o3(e,t,n,a,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=Dn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Wp(s),e}function a3(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(q1)}catch(e){console.error(e)}}q1(),Wv.exports=jn;var fh=Wv.exports;const sl=vp(fh);var K1,a0=fh;K1=a0.createRoot,a0.hydrateRoot;/** * @remix-run/router v1.15.3 * * Copyright (c) Remix Software Inc. @@ -46,7 +46,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ua(){return ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function hh(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function m3(){return Math.random().toString(36).substr(2,8)}function u0(e,t){return{usr:e.state,key:e.key,idx:t}}function Bf(e,t,n,r){return n===void 0&&(n=null),ua({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Wi(t):t,{state:n,key:t&&t.key||r||m3()})}function lc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Wi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function g3(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Kr.Pop,l=null,d=f();d==null&&(d=0,s.replaceState(ua({},s.state,{idx:d}),""));function f(){return(s.state||{idx:null}).idx}function h(){a=Kr.Pop;let P=f(),m=P==null?null:P-d;d=P,l&&l({action:a,location:S.location,delta:m})}function v(P,m){a=Kr.Push;let g=Bf(S.location,P,m);n&&n(g,P),d=f()+1;let y=u0(g,d),E=S.createHref(g);try{s.pushState(y,"",E)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(E)}o&&l&&l({action:a,location:S.location,delta:1})}function C(P,m){a=Kr.Replace;let g=Bf(S.location,P,m);n&&n(g,P),d=f();let y=u0(g,d),E=S.createHref(g);s.replaceState(y,"",E),o&&l&&l({action:a,location:S.location,delta:0})}function w(P){let m=i.location.origin!=="null"?i.location.origin:i.location.href,g=typeof P=="string"?P:lc(P);return g=g.replace(/ $/,"%20"),et(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let S={get action(){return a},get location(){return e(i,s)},listen(P){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(c0,h),l=P,()=>{i.removeEventListener(c0,h),l=null}},createHref(P){return t(i,P)},createURL:w,encodeLocation(P){let m=w(P);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:v,replace:C,go(P){return s.go(P)}};return S}var d0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(d0||(d0={}));function v3(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Wi(t):t,i=Fi(r.pathname||"/",n);if(i==null)return null;let o=X1(e);w3(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(et(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let d=ai([r,l.relativePath]),f=n.concat(l);o.children&&o.children.length>0&&(et(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),X1(o.children,t,f,d)),!(o.path==null&&!o.index)&&t.push({path:d,score:P3(d,o.index),routesMeta:f})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of Q1(o.path))i(o,s,l)}),t}function Q1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=Q1(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function w3(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:j3(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const x3=/^:[\w-]+$/,b3=3,S3=2,C3=1,k3=10,E3=-2,f0=e=>e==="*";function P3(e,t){let n=e.split("/"),r=n.length;return n.some(f0)&&(r+=E3),t&&(r+=S3),n.filter(i=>!f0(i)).reduce((i,o)=>i+(x3.test(o)?b3:o===""?C3:k3),r)}function j3(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function T3(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{let{paramName:v,isOptional:C}=f;if(v==="*"){let S=a[h]||"";s=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const w=a[h];return C&&!w?d[v]=void 0:d[v]=(w||"").replace(/%2F/g,"/"),d},{}),pathname:o,pathnameBase:s,pattern:e}}function N3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),hh(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function L3(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return hh(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Fi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function _3(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Wi(e):e;return{pathname:n?n.startsWith("/")?n:M3(n,t):t,search:$3(r),hash:A3(i)}}function M3(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ed(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function O3(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function mh(e,t){let n=O3(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function gh(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Wi(e):(i=ua({},e),et(!i.pathname||!i.pathname.includes("?"),Ed("?","pathname","search",i)),et(!i.pathname||!i.pathname.includes("#"),Ed("#","pathname","hash",i)),et(!i.search||!i.search.includes("#"),Ed("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let h=t.length-1;if(!r&&s.startsWith("..")){let v=s.split("/");for(;v[0]==="..";)v.shift(),h-=1;i.pathname=v.join("/")}a=h>=0?t[h]:"/"}let l=_3(i,a),d=s&&s!=="/"&&s.endsWith("/"),f=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(d||f)&&(l.pathname+="/"),l}const ai=e=>e.join("/").replace(/\/\/+/g,"/"),I3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$3=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,A3=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Wc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Z1=["post","put","patch","delete"];new Set(Z1);const R3=["get",...Z1];new Set(R3);/** + */function ua(){return ua=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ph(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function p3(){return Math.random().toString(36).substr(2,8)}function c0(e,t){return{usr:e.state,key:e.key,idx:t}}function Bf(e,t,n,r){return n===void 0&&(n=null),ua({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Wi(t):t,{state:n,key:t&&t.key||r||p3()})}function lc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Wi(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function h3(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,a=Kr.Pop,l=null,d=f();d==null&&(d=0,o.replaceState(ua({},o.state,{idx:d}),""));function f(){return(o.state||{idx:null}).idx}function h(){a=Kr.Pop;let P=f(),m=P==null?null:P-d;d=P,l&&l({action:a,location:S.location,delta:m})}function v(P,m){a=Kr.Push;let g=Bf(S.location,P,m);n&&n(g,P),d=f()+1;let y=c0(g,d),E=S.createHref(g);try{o.pushState(y,"",E)}catch(j){if(j instanceof DOMException&&j.name==="DataCloneError")throw j;i.location.assign(E)}s&&l&&l({action:a,location:S.location,delta:1})}function C(P,m){a=Kr.Replace;let g=Bf(S.location,P,m);n&&n(g,P),d=f();let y=c0(g,d),E=S.createHref(g);o.replaceState(y,"",E),s&&l&&l({action:a,location:S.location,delta:0})}function w(P){let m=i.location.origin!=="null"?i.location.origin:i.location.href,g=typeof P=="string"?P:lc(P);return g=g.replace(/ $/,"%20"),gt(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let S={get action(){return a},get location(){return e(i,o)},listen(P){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(l0,h),l=P,()=>{i.removeEventListener(l0,h),l=null}},createHref(P){return t(i,P)},createURL:w,encodeLocation(P){let m=w(P);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:v,replace:C,go(P){return o.go(P)}};return S}var u0;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(u0||(u0={}));function m3(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Wi(t):t,i=Fi(r.pathname||"/",n);if(i==null)return null;let s=Y1(e);v3(s);let o=null;for(let a=0;o==null&&a{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(gt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let d=ai([r,l.relativePath]),f=n.concat(l);s.children&&s.children.length>0&&(gt(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),Y1(s.children,t,f,d)),!(s.path==null&&!s.index)&&t.push({path:d,score:k3(d,s.index),routesMeta:f})};return e.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))i(s,o);else for(let l of X1(s.path))i(s,o,l)}),t}function X1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=X1(r.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),i&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function v3(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:E3(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const y3=/^:[\w-]+$/,w3=3,x3=2,b3=1,S3=10,C3=-2,d0=e=>e==="*";function k3(e,t){let n=e.split("/"),r=n.length;return n.some(d0)&&(r+=C3),t&&(r+=x3),n.filter(i=>!d0(i)).reduce((i,s)=>i+(y3.test(s)?w3:s===""?b3:S3),r)}function E3(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function P3(e,t){let{routesMeta:n}=e,r={},i="/",s=[];for(let o=0;o{let{paramName:v,isOptional:C}=f;if(v==="*"){let S=a[h]||"";o=s.slice(0,s.length-S.length).replace(/(.)\/+$/,"$1")}const w=a[h];return C&&!w?d[v]=void 0:d[v]=(w||"").replace(/%2F/g,"/"),d},{}),pathname:s,pathnameBase:o,pattern:e}}function j3(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ph(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function T3(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ph(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Fi(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function N3(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Wi(e):e;return{pathname:n?n.startsWith("/")?n:L3(n,t):t,search:O3(r),hash:I3(i)}}function L3(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ed(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function _3(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function hh(e,t){let n=_3(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function mh(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Wi(e):(i=ua({},e),gt(!i.pathname||!i.pathname.includes("?"),Ed("?","pathname","search",i)),gt(!i.pathname||!i.pathname.includes("#"),Ed("#","pathname","hash",i)),gt(!i.search||!i.search.includes("#"),Ed("#","search","hash",i)));let s=e===""||i.pathname==="",o=s?"/":i.pathname,a;if(o==null)a=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let v=o.split("/");for(;v[0]==="..";)v.shift(),h-=1;i.pathname=v.join("/")}a=h>=0?t[h]:"/"}let l=N3(i,a),d=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(d||f)&&(l.pathname+="/"),l}const ai=e=>e.join("/").replace(/\/\/+/g,"/"),M3=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),O3=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,I3=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Wc(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Q1=["post","put","patch","delete"];new Set(Q1);const $3=["get",...Q1];new Set($3);/** * React Router v6.22.3 * * Copyright (c) Remix Software Inc. @@ -55,7 +55,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function da(){return da=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),k.useCallback(function(d,f){if(f===void 0&&(f={}),!a.current)return;if(typeof d=="number"){r.go(d);return}let h=gh(d,JSON.parse(s),o,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:ai([t,h.pathname])),(f.replace?r.replace:r.push)(h,f.state,f)},[t,r,s,o,e])}const F3=k.createContext(null);function B3(e){let t=k.useContext(xr).outlet;return t&&k.createElement(F3.Provider,{value:e},t)}function V3(){let{matches:e}=k.useContext(xr),t=e[e.length-1];return t?t.params:{}}function Kc(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=k.useContext(wr),{matches:i}=k.useContext(xr),{pathname:o}=vn(),s=JSON.stringify(mh(i,r.v7_relativeSplatPath));return k.useMemo(()=>gh(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function H3(e,t){return U3(e,t)}function U3(e,t,n,r){Zo()||et(!1);let{navigator:i}=k.useContext(wr),{matches:o}=k.useContext(xr),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let d=vn(),f;if(t){var h;let P=typeof t=="string"?Wi(t):t;l==="/"||(h=P.pathname)!=null&&h.startsWith(l)||et(!1),f=P}else f=d;let v=f.pathname||"/",C=v;if(l!=="/"){let P=l.replace(/^\//,"").split("/");C="/"+v.replace(/^\//,"").split("/").slice(P.length).join("/")}let w=v3(e,{pathname:C}),S=Y3(w&&w.map(P=>Object.assign({},P,{params:Object.assign({},a,P.params),pathname:ai([l,i.encodeLocation?i.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?l:ai([l,i.encodeLocation?i.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),o,n,r);return t&&S?k.createElement(qc.Provider,{value:{location:da({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Kr.Pop}},S):S}function W3(){let e=Yc(),t=Wc(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:i},n):null,null)}const G3=k.createElement(W3,null);class q3 extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?k.createElement(xr.Provider,{value:this.props.routeContext},k.createElement(J1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function K3(e){let{routeContext:t,match:n,children:r}=e,i=k.useContext(Gc);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(xr.Provider,{value:t},r)}function Y3(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let f=s.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id]));f>=0||et(!1),s=s.slice(0,Math.min(s.length,f+1))}let l=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((f,h,v)=>{let C,w=!1,S=null,P=null;n&&(C=a&&h.route.id?a[h.route.id]:void 0,S=h.route.errorElement||G3,l&&(d<0&&v===0?(tk("route-fallback",!1),w=!0,P=null):d===v&&(w=!0,P=h.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,v+1)),g=()=>{let y;return C?y=S:w?y=P:h.route.Component?y=k.createElement(h.route.Component,null):h.route.element?y=h.route.element:y=f,k.createElement(K3,{match:h,routeContext:{outlet:f,matches:m,isDataRoute:n!=null},children:y})};return n&&(h.route.ErrorBoundary||h.route.errorElement||v===0)?k.createElement(q3,{location:n.location,revalidation:n.revalidation,component:S,error:C,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var t2=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(t2||{}),Wo=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Wo||{});function X3(e){let t=k.useContext(Gc);return t||et(!1),t}function yh(e){let t=k.useContext(vh);return t||et(!1),t}function Q3(e){let t=k.useContext(xr);return t||et(!1),t}function n2(e){let t=Q3(),n=t.matches[t.matches.length-1];return n.route.id||et(!1),n.route.id}function Z3(){return yh(Wo.UseNavigation).navigation}function J3(){let{matches:e,loaderData:t}=yh(Wo.UseMatches);return k.useMemo(()=>e.map(n=>y3(n,t)),[e,t])}function Yc(){var e;let t=k.useContext(J1),n=yh(Wo.UseRouteError),r=n2(Wo.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function ek(){let{router:e}=X3(t2.UseNavigateStable),t=n2(Wo.UseNavigateStable),n=k.useRef(!1);return e2(()=>{n.current=!0}),k.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,da({fromRouteId:t},o)))},[e,t])}const p0={};function tk(e,t,n){!t&&!p0[e]&&(p0[e]=!0)}function wh(e){let{to:t,replace:n,state:r,relative:i}=e;Zo()||et(!1);let{future:o,static:s}=k.useContext(wr),{matches:a}=k.useContext(xr),{pathname:l}=vn(),d=ut(),f=gh(t,mh(a,o.v7_relativeSplatPath),l,i==="path"),h=JSON.stringify(f);return k.useEffect(()=>d(JSON.parse(h),{replace:n,state:r,relative:i}),[d,h,i,n,r]),null}function Xc(e){return B3(e.context)}function r2(e){et(!1)}function nk(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Kr.Pop,navigator:o,static:s=!1,future:a}=e;Zo()&&et(!1);let l=t.replace(/^\/*/,"/"),d=k.useMemo(()=>({basename:l,navigator:o,static:s,future:da({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=Wi(r));let{pathname:f="/",search:h="",hash:v="",state:C=null,key:w="default"}=r,S=k.useMemo(()=>{let P=Fi(f,l);return P==null?null:{location:{pathname:P,search:h,hash:v,state:C,key:w},navigationType:i}},[l,f,h,v,C,w,i]);return S==null?null:k.createElement(wr.Provider,{value:d},k.createElement(qc.Provider,{children:n,value:S}))}function rk(e){let{children:t,location:n}=e;return H3(Hf(t),n)}new Promise(()=>{});function Hf(e,t){t===void 0&&(t=[]);let n=[];return k.Children.forEach(e,(r,i)=>{if(!k.isValidElement(r))return;let o=[...t,i];if(r.type===k.Fragment){n.push.apply(n,Hf(r.props.children,o));return}r.type!==r2&&et(!1),!r.props.index||!r.props.children||et(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Hf(r.props.children,o)),n.push(s)}),n}/** + */function da(){return da=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),k.useCallback(function(d,f){if(f===void 0&&(f={}),!a.current)return;if(typeof d=="number"){r.go(d);return}let h=mh(d,JSON.parse(o),s,f.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:ai([t,h.pathname])),(f.replace?r.replace:r.push)(h,f.state,f)},[t,r,o,s,e])}const D3=k.createContext(null);function z3(e){let t=k.useContext(xr).outlet;return t&&k.createElement(D3.Provider,{value:e},t)}function F3(){let{matches:e}=k.useContext(xr),t=e[e.length-1];return t?t.params:{}}function Kc(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=k.useContext(wr),{matches:i}=k.useContext(xr),{pathname:s}=vn(),o=JSON.stringify(hh(i,r.v7_relativeSplatPath));return k.useMemo(()=>mh(e,JSON.parse(o),s,n==="path"),[e,o,s,n])}function B3(e,t){return V3(e,t)}function V3(e,t,n,r){Qs()||gt(!1);let{navigator:i}=k.useContext(wr),{matches:s}=k.useContext(xr),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let d=vn(),f;if(t){var h;let P=typeof t=="string"?Wi(t):t;l==="/"||(h=P.pathname)!=null&&h.startsWith(l)||gt(!1),f=P}else f=d;let v=f.pathname||"/",C=v;if(l!=="/"){let P=l.replace(/^\//,"").split("/");C="/"+v.replace(/^\//,"").split("/").slice(P.length).join("/")}let w=m3(e,{pathname:C}),S=q3(w&&w.map(P=>Object.assign({},P,{params:Object.assign({},a,P.params),pathname:ai([l,i.encodeLocation?i.encodeLocation(P.pathname).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?l:ai([l,i.encodeLocation?i.encodeLocation(P.pathnameBase).pathname:P.pathnameBase])})),s,n,r);return t&&S?k.createElement(qc.Provider,{value:{location:da({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Kr.Pop}},S):S}function H3(){let e=Yc(),t=Wc(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:i},n):null,null)}const U3=k.createElement(H3,null);class W3 extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?k.createElement(xr.Provider,{value:this.props.routeContext},k.createElement(Z1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function G3(e){let{routeContext:t,match:n,children:r}=e,i=k.useContext(Gc);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement(xr.Provider,{value:t},r)}function q3(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var s;if((s=n)!=null&&s.errors)e=n.matches;else return null}let o=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let f=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id]));f>=0||gt(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?o=o.slice(0,d+1):o=[o[0]];break}}}return o.reduceRight((f,h,v)=>{let C,w=!1,S=null,P=null;n&&(C=a&&h.route.id?a[h.route.id]:void 0,S=h.route.errorElement||U3,l&&(d<0&&v===0?(J3("route-fallback",!1),w=!0,P=null):d===v&&(w=!0,P=h.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,v+1)),g=()=>{let y;return C?y=S:w?y=P:h.route.Component?y=k.createElement(h.route.Component,null):h.route.element?y=h.route.element:y=f,k.createElement(G3,{match:h,routeContext:{outlet:f,matches:m,isDataRoute:n!=null},children:y})};return n&&(h.route.ErrorBoundary||h.route.errorElement||v===0)?k.createElement(W3,{location:n.location,revalidation:n.revalidation,component:S,error:C,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var e2=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(e2||{}),Us=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Us||{});function K3(e){let t=k.useContext(Gc);return t||gt(!1),t}function vh(e){let t=k.useContext(gh);return t||gt(!1),t}function Y3(e){let t=k.useContext(xr);return t||gt(!1),t}function t2(e){let t=Y3(),n=t.matches[t.matches.length-1];return n.route.id||gt(!1),n.route.id}function X3(){return vh(Us.UseNavigation).navigation}function Q3(){let{matches:e,loaderData:t}=vh(Us.UseMatches);return k.useMemo(()=>e.map(n=>g3(n,t)),[e,t])}function Yc(){var e;let t=k.useContext(Z1),n=vh(Us.UseRouteError),r=t2(Us.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Z3(){let{router:e}=K3(e2.UseNavigateStable),t=t2(Us.UseNavigateStable),n=k.useRef(!1);return J1(()=>{n.current=!0}),k.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,da({fromRouteId:t},s)))},[e,t])}const f0={};function J3(e,t,n){!t&&!f0[e]&&(f0[e]=!0)}function yh(e){let{to:t,replace:n,state:r,relative:i}=e;Qs()||gt(!1);let{future:s,static:o}=k.useContext(wr),{matches:a}=k.useContext(xr),{pathname:l}=vn(),d=ct(),f=mh(t,hh(a,s.v7_relativeSplatPath),l,i==="path"),h=JSON.stringify(f);return k.useEffect(()=>d(JSON.parse(h),{replace:n,state:r,relative:i}),[d,h,i,n,r]),null}function Xc(e){return z3(e.context)}function ek(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Kr.Pop,navigator:s,static:o=!1,future:a}=e;Qs()&>(!1);let l=t.replace(/^\/*/,"/"),d=k.useMemo(()=>({basename:l,navigator:s,static:o,future:da({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof r=="string"&&(r=Wi(r));let{pathname:f="/",search:h="",hash:v="",state:C=null,key:w="default"}=r,S=k.useMemo(()=>{let P=Fi(f,l);return P==null?null:{location:{pathname:P,search:h,hash:v,state:C,key:w},navigationType:i}},[l,f,h,v,C,w,i]);return S==null?null:k.createElement(wr.Provider,{value:d},k.createElement(qc.Provider,{children:n,value:S}))}new Promise(()=>{});/** * React Router DOM v6.22.3 * * Copyright (c) Remix Software Inc. @@ -64,12 +64,12 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function ik(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ok(e,t){return e.button===0&&(!t||t==="_self")&&!ik(e)}function Uf(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function sk(e,t){let n=Uf(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const ak=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],lk=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],ck="6";try{window.__reactRouterVersion=ck}catch{}const uk=k.createContext({isTransitioning:!1}),dk="startTransition",h0=Rl[dk];function fk(e){let{basename:t,children:n,future:r,window:i}=e,o=k.useRef();o.current==null&&(o.current=h3({window:i,v5Compat:!0}));let s=o.current,[a,l]=k.useState({action:s.action,location:s.location}),{v7_startTransition:d}=r||{},f=k.useCallback(h=>{d&&h0?h0(()=>l(h)):l(h)},[l,d]);return k.useLayoutEffect(()=>s.listen(f),[s,f]),k.createElement(nk,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const pk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",hk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Je=k.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:d,preventScrollReset:f,unstable_viewTransition:h}=t,v=i2(t,ak),{basename:C}=k.useContext(wr),w,S=!1;if(typeof d=="string"&&hk.test(d)&&(w=d,pk))try{let y=new URL(window.location.href),E=d.startsWith("//")?new URL(y.protocol+d):new URL(d),j=Fi(E.pathname,C);E.origin===y.origin&&j!=null?d=j+E.search+E.hash:S=!0}catch{}let P=D3(d,{relative:i}),m=vk(d,{replace:s,state:a,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:h});function g(y){r&&r(y),y.defaultPrevented||m(y)}return k.createElement("a",fa({},v,{href:w||P,onClick:S||o?r:g,ref:n,target:l}))}),sl=k.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,unstable_viewTransition:d,children:f}=t,h=i2(t,lk),v=Kc(l,{relative:h.relative}),C=vn(),w=k.useContext(vh),{navigator:S,basename:P}=k.useContext(wr),m=w!=null&&bk(v)&&d===!0,g=S.encodeLocation?S.encodeLocation(v).pathname:v.pathname,y=C.pathname,E=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;i||(y=y.toLowerCase(),E=E?E.toLowerCase():null,g=g.toLowerCase()),E&&P&&(E=Fi(E,P)||E);const j=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let L=y===g||!s&&y.startsWith(g)&&y.charAt(j)==="/",M=E!=null&&(E===g||!s&&E.startsWith(g)&&E.charAt(g.length)==="/"),O={isActive:L,isPending:M,isTransitioning:m},I=L?r:void 0,_;typeof o=="function"?_=o(O):_=[o,L?"active":null,M?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let B=typeof a=="function"?a(O):a;return k.createElement(Je,fa({},h,{"aria-current":I,className:_,ref:n,style:B,to:l,unstable_viewTransition:d}),typeof f=="function"?f(O):f)});function mk(e){let{getKey:t,storageKey:n}=e;return wk({getKey:t,storageKey:n}),null}var cc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(cc||(cc={}));var Wf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Wf||(Wf={}));function o2(e){let t=k.useContext(Gc);return t||et(!1),t}function gk(e){let t=k.useContext(vh);return t||et(!1),t}function vk(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=t===void 0?{}:t,l=ut(),d=vn(),f=Kc(e,{relative:s});return k.useCallback(h=>{if(ok(h,n)){h.preventDefault();let v=r!==void 0?r:lc(d)===lc(f);l(e,{replace:v,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[d,l,f,r,i,n,e,o,s,a])}function yk(e){let t=k.useRef(Uf(e)),n=k.useRef(!1),r=vn(),i=k.useMemo(()=>sk(r.search,n.current?null:t.current),[r.search]),o=ut(),s=k.useCallback((a,l)=>{const d=Uf(typeof a=="function"?a(i):a);n.current=!0,o("?"+d,l)},[o,i]);return[i,s]}const m0="react-router-scroll-positions";let al={};function wk(e){let{getKey:t,storageKey:n}=e===void 0?{}:e,{router:r}=o2(cc.UseScrollRestoration),{restoreScrollPosition:i,preventScrollReset:o}=gk(Wf.UseScrollRestoration),{basename:s}=k.useContext(wr),a=vn(),l=J3(),d=Z3();k.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),xk(k.useCallback(()=>{if(d.state==="idle"){let f=(t?t(a,l):null)||a.key;al[f]=window.scrollY}try{sessionStorage.setItem(n||m0,JSON.stringify(al))}catch{}window.history.scrollRestoration="auto"},[n,t,d.state,a,l])),typeof document<"u"&&(k.useLayoutEffect(()=>{try{let f=sessionStorage.getItem(n||m0);f&&(al=JSON.parse(f))}catch{}},[n]),k.useLayoutEffect(()=>{let f=t&&s!=="/"?(v,C)=>t(fa({},v,{pathname:Fi(v.pathname,s)||v.pathname}),C):t,h=r==null?void 0:r.enableScrollRestoration(al,()=>window.scrollY,f);return()=>h&&h()},[r,s,t]),k.useLayoutEffect(()=>{if(i!==!1){if(typeof i=="number"){window.scrollTo(0,i);return}if(a.hash){let f=document.getElementById(decodeURIComponent(a.hash.slice(1)));if(f){f.scrollIntoView();return}}o!==!0&&window.scrollTo(0,0)}},[a,i,o]))}function xk(e,t){let{capture:n}=t||{};k.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,n])}function bk(e,t){t===void 0&&(t={});let n=k.useContext(uk);n==null&&et(!1);let{basename:r}=o2(cc.useViewTransitionState),i=Kc(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=Fi(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Fi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Vf(i.pathname,s)!=null||Vf(i.pathname,o)!=null}async function Sk(e){const t=await fetch(`${jt}/auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();if(!t.ok)throw n;return n}async function Ck(e){const t=await fetch(`${jt}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();if(!t.ok)throw n;return n}async function kk(){const e=Zt(),t=await fetch(`${jt}/auth/current-user`,{method:"GET",headers:{Authorization:`Bearer ${e}`}}),n=await t.json();if(!t.ok)throw n;return n}async function Ek(e){const t=Zt(),n=await fetch(`${jt}/auth/update-data`,{method:"PUT",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await n.json();if(!n.ok)throw r;return r}async function Pk(e){const t=Zt(),n=await fetch(`${jt}/auth/update-password`,{method:"PUT",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await n.json();if(!n.ok)throw r;return r}const Go={register:Sk,login:Ck,getUserDetails:kk,updateUserDetails:Ek,changePassword:Pk},jk=e=>{const t=s2(e);return`${jt}/filter/products?${t}`},Tk=async(e={})=>{const t=Zt(),n=jk(e),r=await fetch(n,{method:"GET",headers:{Authorization:`Bearer ${t}`}}),i=await r.json();if(!r.ok)throw i;return i},Nk={fetchProductFilterOption:Tk},Lk=async e=>{const t=Zt(),n=`${jt}/orders`,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(e)}),i=await r.json();if(!r.ok)throw i;return i},_k=async(e={})=>{const t=Zt(),n=xh(e),r=`${jt}/orders?${n}`,i=await fetch(r,{headers:{Authorization:`Bearer ${t}`}}),o=await i.json();if(!i.ok)throw o;return o},Mk=async(e={})=>{const t=Zt(),n=xh(e),r=`${jt}/orders/all?${n}`,i=await fetch(r,{headers:{Authorization:`Bearer ${t}`}}),o=await i.json();if(!i.ok)throw o;return o},Ok=async e=>{const t=Zt(),n=`${jt}/orders/${e.orderId}`,r=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(e)}),i=await r.json();if(!r.ok)throw i;return i},ka={createOrder:Lk,fetchCustomerOrders:_k,fetchAllOrders:Mk,updateOrderStatus:Ok},Ik=e=>{const t=xh(e),n=s2(e);return`${jt}/products?${t}&${n}`},$k=async(e={})=>{const t=Zt(),n=Ik(e),r=await fetch(n,{method:"GET",headers:{Authorization:`Bearer ${t}`}}),i=await r.json();if(!r.ok)throw i;return i},Ak=async()=>{const e=`${jt}/products?pageSize=8&sortBy=ratings&sortDir=desc`,t=await fetch(e,{method:"GET"}),n=await t.json();if(!t.ok)throw n;return n},Rk=async e=>{const t=Zt(),n=`${jt}/products/${e}`,r=await fetch(n,{method:"GET",headers:{Authorization:`Bearer ${t}`}}),i=await r.json();if(!r.ok)throw i;return i},Dk=async e=>{const t=Zt(),n=`${jt}/products`,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(e)}),i=await r.json();if(!r.ok)throw new Error(i.message||"Failed to add product");return i},zk=async(e,t)=>{const n=Zt(),r=`${jt}/products/${e}`,i=await fetch(r,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify(t)}),o=await i.json();if(!i.ok)throw new Error(o.message||"Failed to update product");return o},Fk=async e=>{const t=Zt(),n=`${jt}/products/${e}`,r=await fetch(n,{method:"DELETE",headers:{Authorization:`Bearer ${t}`}}),i=await r.json();if(!r.ok)throw new Error(i.message||"Failed to delete product");return i},rr={fetchProducts:$k,fetchProductsByRating:Ak,fetchProduct:Rk,addProduct:Dk,updateProduct:zk,deleteProduct:Fk},Bk=async e=>{const t=Zt(),n=`${jt}/products/${e.productId}/ratings`,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(e)}),i=await r.json();if(!r.ok)throw i;return i},Vk=async e=>{const t=Zt(),n=`${jt}/products/${e.productId}/ratings`,r=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(e)}),i=await r.json();if(!r.ok)throw i;return i},Hk=async e=>{const t=Zt(),n=`${jt}/products/${e}/ratings`,r=await fetch(n,{headers:{Authorization:`Bearer ${t}`}}),i=await r.json();if(!r.ok)throw i;return i},Pd={postRating:Bk,updateRating:Vk,fetchRatingByProductId:Hk},jt="https://ecommerce-store-e805668c131b.herokuapp.com/api/v1",xh=e=>{const t=new URLSearchParams;return e.pageNumber!==void 0&&t.set("pageNumber",String(e.pageNumber)),e.pageSize!==void 0&&t.set("pageSize",String(e.pageSize)),e.sortDir&&t.set("sortDir",e.sortDir),e.sortBy&&t.set("sortBy",e.sortBy),t.toString()},s2=e=>{const t=new URLSearchParams;return e.name&&t.append("name",e.name),e.brand&&t.append("brand",e.brand.join(",")),e.minPrice!==void 0&&t.append("minPrice",String(e.minPrice)),e.maxPrice!==void 0&&t.append("maxPrice",String(e.maxPrice)),e.color&&t.append("color",e.color.join(",")),e.memory&&t.append("memory",e.memory.join(",")),e.screenSize!==void 0&&t.append("screenSize",String(e.screenSize)),e.batteryCapacity&&t.append("batteryCapacity",e.batteryCapacity.join(",")),e.category&&t.append("category",e.category.join(",")),t.toString()},Zt=()=>{const e=localStorage.getItem("token")??"";if(!e)throw new Error("Must be logged in");return e};var a2={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g0=ie.createContext&&ie.createContext(a2),Uk=["attr","size","title"];function Wk(e,t){if(e==null)return{};var n=Gk(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Gk(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function uc(){return uc=Object.assign?Object.assign.bind():function(e){for(var t=1;tie.createElement(t.tag,dc({key:n},t.attr),l2(t.child)))}function dt(e){return t=>ie.createElement(Xk,uc({attr:dc({},e.attr)},t),l2(e.child))}function Xk(e){var t=n=>{var{attr:r,size:i,title:o}=e,s=Wk(e,Uk),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),ie.createElement("svg",uc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,s,{className:l,style:dc(dc({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),o&&ie.createElement("title",null,o),e.children)};return g0!==void 0?ie.createElement(g0.Consumer,null,n=>t(n)):t(a2)}function c2(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Remove"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M9.525,13.765a.5.5,0,0,0,.71.71c.59-.59,1.175-1.18,1.765-1.76l1.765,1.76a.5.5,0,0,0,.71-.71c-.59-.58-1.18-1.175-1.76-1.765.41-.42.82-.825,1.23-1.235.18-.18.35-.36.53-.53a.5.5,0,0,0-.71-.71L12,11.293,10.235,9.525a.5.5,0,0,0-.71.71L11.293,12Z"},child:[]},{tag:"path",attr:{d:"M12,21.933A9.933,9.933,0,1,1,21.934,12,9.945,9.945,0,0,1,12,21.933ZM12,3.067A8.933,8.933,0,1,0,20.934,12,8.944,8.944,0,0,0,12,3.067Z"},child:[]}]}]}]})(e)}function y0(e){return dt({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Lock"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M17.44,9.33h-1.1V6.4a4.34,4.34,0,0,0-8.68,0V9.33H6.56a2.5,2.5,0,0,0-2.5,2.5v7.61a2.507,2.507,0,0,0,2.5,2.5H17.44a2.507,2.507,0,0,0,2.5-2.5V11.83A2.5,2.5,0,0,0,17.44,9.33ZM8.66,6.4a3.34,3.34,0,0,1,6.68,0V9.33H8.66ZM18.94,19.44a1.511,1.511,0,0,1-1.5,1.5H6.56a1.511,1.511,0,0,1-1.5-1.5V11.83a1.5,1.5,0,0,1,1.5-1.5H17.44a1.5,1.5,0,0,1,1.5,1.5Z"},child:[]},{tag:"path",attr:{d:"M13,14.95a.984.984,0,0,1-.5.86v1.5a.5.5,0,0,1-1,0v-1.5a.984.984,0,0,1-.5-.86,1,1,0,0,1,2,0Z"},child:[]}]}]}]})(e)}function u2(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M368.5 240H272v-96.5c0-8.8-7.2-16-16-16s-16 7.2-16 16V240h-96.5c-8.8 0-16 7.2-16 16 0 4.4 1.8 8.4 4.7 11.3 2.9 2.9 6.9 4.7 11.3 4.7H240v96.5c0 4.4 1.8 8.4 4.7 11.3 2.9 2.9 6.9 4.7 11.3 4.7 8.8 0 16-7.2 16-16V272h96.5c8.8 0 16-7.2 16-16s-7.2-16-16-16z"},child:[]}]})(e)}function d2(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M368.5 240h-225c-8.8 0-16 7.2-16 16 0 4.4 1.8 8.4 4.7 11.3 2.9 2.9 6.9 4.7 11.3 4.7h225c8.8 0 16-7.2 16-16s-7.2-16-16-16z"},child:[]}]})(e)}function Ea(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"},child:[]}]})(e)}const f2=({quantity:e,decrease:t,increase:n})=>{const[r,i]=k.useState(!1),[o,s]=k.useState(!1);return k.useEffect(()=>{i(e<=1),s(e>=5)},[e]),c.jsxs("div",{className:"flex items-center border border-black rounded-md bg-transparent w-16",children:[c.jsx("button",{className:`h-full py-2 rounded-l-md hover:bg-transparent/10 transition-all duration-300 ease-in-out ${r?"bg-slate-300 dark:bg-gray-400 hover:bg-slate-300/100 dark:hover:bg-slate-400/100":""}`,onClick:t,disabled:r,children:c.jsx(d2,{className:"text-secondary-regular dark:text-secondary-light h-full"})}),c.jsx("div",{className:"w-8 text-center dark:text-white",children:e}),c.jsx("button",{className:`h-full py-2 rounded-r-md hover:bg-transparent/10 transition-all duration-300 ease-in-out ${o?"bg-slate-300 dark:bg-gray-400 hover:bg-slate-300/100 dark:hover:bg-slate-400/100":""}`,onClick:n,disabled:o,children:c.jsx(u2,{className:"text-secondary-regular dark:text-secondary-light h-full"})})]})};function Qk(e,t){const[n,r]=k.useState(()=>{const i=localStorage.getItem(e);return i!=null?JSON.parse(i):typeof t=="function"?t():t});return k.useEffect(()=>{localStorage.setItem(e,JSON.stringify(n))},[e,n]),[n,r]}const Zk={openCart:()=>{},closeCart:()=>{},getItemQuantity:()=>0,increaseItemQuantity:()=>{},decreaseItemQuantity:()=>{},removeItem:()=>{},cartQuantity:0,cartItems:[],isCartOpen:!1},p2=k.createContext(Zk),Jk=({children:e})=>{const[t,n]=k.useState(!1),[r,i]=Qk("shopping-cart",[]),o=r.reduce((v,C)=>v+C.quantity,0),s=()=>{n(!0)},a=()=>{n(!1)},l=v=>{var C;return((C=r.find(w=>w.id===v))==null?void 0:C.quantity)??0},d=v=>{i(C=>C.find(w=>w.id===v)==null?[...C,{id:v,quantity:1}]:C.map(w=>w.id===v?{...w,quantity:w.quantity+1}:w))},f=v=>{i(C=>{var w;return((w=C.find(S=>S.id===v))==null?void 0:w.quantity)===1?C.filter(S=>S.id!==v):C.map(S=>S.id===v?{...S,quantity:S.quantity-1}:S)})},h=v=>{i(C=>C.filter(w=>w.id!==v))};return c.jsx(p2.Provider,{value:{openCart:s,closeCart:a,getItemQuantity:l,increaseItemQuantity:d,decreaseItemQuantity:f,removeItem:h,cartQuantity:o,cartItems:r,isCartOpen:t},children:e})},hi=()=>k.useContext(p2),ve="/ECommerceStore-Frontend/",e5=()=>c.jsx("div",{className:"w-64 sm:w-[37rem] md:w-[45rem] lg:w-[50rem] h-[26rem] lg:h-48 bg-slate-300 animate-pulse rounded-2xl mx-auto"}),t5=({id:e,quantity:t})=>{const{removeItem:n,decreaseItemQuantity:r,increaseItemQuantity:i}=hi(),[o,s]=k.useState(null),[a,l]=k.useState(!0),d=ut(),f=()=>{d(`${ve}products/${e}`)},h=()=>{r(e)},v=()=>{i(e)};return k.useEffect(()=>{(async()=>{try{l(!0);const w=await rr.fetchProduct(e);s(w)}catch(w){console.error("Failed to fetch product:",w)}finally{l(!1)}})()},[e]),a?c.jsx(e5,{}):o===null?null:c.jsxs("div",{className:"flex flex-col justify-between items-center border border-black relative rounded-xl mx-4 lg:mr-4",children:[c.jsxs("div",{className:"flex flex-col lg:flex-row lg:justify-around lg:w-full items-center gap-2",children:[c.jsxs("div",{className:"flex flex-col lg:flex-row hover:scale-105",onClick:f,children:[c.jsx("img",{src:o.image,alt:o.name,className:"h-48 w-48"}),c.jsxs("div",{className:"flex flex-col items-center self-center text-center w-48",children:[c.jsx("h2",{children:o.name}),c.jsx("p",{children:o.category})]})]}),c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsx("p",{className:"lg:hidden",children:"Quantity:"}),c.jsx(f2,{quantity:t,decrease:h,increase:v})]}),c.jsxs("div",{className:"flex gap-2 w-16 justify-center",children:[c.jsx("p",{className:"lg:hidden",children:"Price:"}),c.jsx("p",{children:o.price})]}),c.jsxs("div",{className:"flex gap-2 w-16 justify-center",children:[c.jsx("p",{className:"lg:hidden",children:"Subtotal:"}),c.jsx("p",{children:(o.price*t).toFixed(2)})]})]}),c.jsx("button",{onClick:()=>n(e),children:c.jsx(c2,{className:"text-red-500 h-8 w-8 absolute right-1 top-1 hover:scale-125 transition-all duration-300 ease-in-out"})})]})};function Gf(){return Gf=Object.assign||function(e){for(var t=1;tc.jsx("div",{className:"w-[33rem] h-96 bg-gray-300 rounded-3xl animate-pulse mx-auto"}),i5=()=>c.jsx(r5,{}),o5=({id:e,quantity:t})=>{const{removeItem:n,decreaseItemQuantity:r,increaseItemQuantity:i}=hi(),[o,s]=k.useState(null),[a,l]=k.useState(!0),d=ut(),f=()=>{d(`${ve}products/${e}`)},h=()=>{r(e)},v=()=>{i(e)};return k.useEffect(()=>{(async()=>{try{const w=await rr.fetchProduct(e);s(w)}catch(w){console.error("Failed to fetch product:",w)}finally{l(!1)}})()},[e]),a?c.jsx(i5,{}):o===null?null:c.jsxs("div",{className:"flex flex-col justify-between items-center border relative border-black rounded-xl mx-4",children:[c.jsxs("div",{className:"flex flex-col items-center gap-2 ",children:[c.jsxs("div",{className:"flex flex-col hover:scale-105 hover:my-2 transition-all duration-300 ease-in-out cursor-pointer",onClick:f,children:[c.jsx("img",{src:o.image,alt:o.name,className:"h-48 w-48"}),c.jsxs("div",{className:"flex flex-col items-center self-center text-center w-48",children:[c.jsx("h2",{children:o.name}),c.jsx("p",{children:o.category})]})]}),c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsx("p",{children:"Quantity:"}),c.jsx(f2,{quantity:t,decrease:h,increase:v})]}),c.jsxs("div",{className:"flex gap-2 w-16 justify-center",children:[c.jsx("p",{children:"Price:"}),c.jsx("p",{children:o.price})]}),c.jsxs("div",{className:"flex gap-2 w-16 justify-center",children:[c.jsx("p",{children:"Subtotal:"}),c.jsx("p",{children:(o.price*t).toFixed(2)})]})]}),c.jsx("button",{onClick:()=>n(e),children:c.jsx(c2,{className:"text-red-500 h-8 w-8 absolute right-1 top-1 hover:scale-125 transition-all duration-300 ease-in-out"})})]})},s5=()=>{const{closeCart:e,cartItems:t,isCartOpen:n}=hi(),[r,i]=k.useState(0);return k.useEffect(()=>{(async()=>{const s=await Promise.all(t.map(async a=>(await rr.fetchProduct(a.id)).price*a.quantity)).then(a=>a.reduce((l,d)=>l+d,0));i(s)})()},[t]),c.jsxs(bh,{open:n,onClose:e,direction:"right",lockBackgroundScroll:!0,className:"w-full flex flex-col overflow-y-auto overflow-x-hidden sm:w-3/4 lg:w-1/2 xl:w-1/3",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("div",{className:"flex justify-between items-center w-full mt-2 mx-1",children:[c.jsx("h2",{children:"Cart"}),c.jsx(Ea,{className:"h-8 w-8 hover:scale-125 transition-all duration-300 ease-in-out cursor-pointer",onClick:e})]}),c.jsx("div",{className:"flex flex-col gap-4",children:t.length!==0?t.map(o=>c.jsx(o5,{...o},o.id)):c.jsx("h1",{className:"text-center mt-16",children:"Cart is empty"})})]}),c.jsxs("div",{className:"flex flex-col border-t-2 border-black my-2",children:[c.jsxs("div",{className:"flex gap-2 ml-1 my-2",children:[c.jsx("h1",{children:"Total:"}),c.jsxs("h1",{children:[r.toFixed(2),"$"]})]}),c.jsx(Je,{to:`${ve}cart`,className:"action-button w-11/12 mt-2 self-center text-center",onClick:e,children:"Checkout"})]})]})};function a5(e){return dt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"},child:[]}]})(e)}function l5(e){return dt({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"},child:[]}]})(e)}function c5(e){return dt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M504.717 320H211.572l6.545 32h268.418c15.401 0 26.816 14.301 23.403 29.319l-5.517 24.276C523.112 414.668 536 433.828 536 456c0 31.202-25.519 56.444-56.824 55.994-29.823-.429-54.35-24.631-55.155-54.447-.44-16.287 6.085-31.049 16.803-41.548H231.176C241.553 426.165 248 440.326 248 456c0 31.813-26.528 57.431-58.67 55.938-28.54-1.325-51.751-24.385-53.251-52.917-1.158-22.034 10.436-41.455 28.051-51.586L93.883 64H24C10.745 64 0 53.255 0 40V24C0 10.745 10.745 0 24 0h102.529c11.401 0 21.228 8.021 23.513 19.19L159.208 64H551.99c15.401 0 26.816 14.301 23.403 29.319l-47.273 208C525.637 312.246 515.923 320 504.717 320zM403.029 192H360v-60c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v60h-43.029c-10.691 0-16.045 12.926-8.485 20.485l67.029 67.029c4.686 4.686 12.284 4.686 16.971 0l67.029-67.029c7.559-7.559 2.205-20.485-8.486-20.485z"},child:[]}]})(e)}function u5(e){return dt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M504.717 320H211.572l6.545 32h268.418c15.401 0 26.816 14.301 23.403 29.319l-5.517 24.276C523.112 414.668 536 433.828 536 456c0 31.202-25.519 56.444-56.824 55.994-29.823-.429-54.35-24.631-55.155-54.447-.44-16.287 6.085-31.049 16.803-41.548H231.176C241.553 426.165 248 440.326 248 456c0 31.813-26.528 57.431-58.67 55.938-28.54-1.325-51.751-24.385-53.251-52.917-1.158-22.034 10.436-41.455 28.051-51.586L93.883 64H24C10.745 64 0 53.255 0 40V24C0 10.745 10.745 0 24 0h102.529c11.401 0 21.228 8.021 23.513 19.19L159.208 64H551.99c15.401 0 26.816 14.301 23.403 29.319l-47.273 208C525.637 312.246 515.923 320 504.717 320zM408 168h-48v-40c0-8.837-7.163-16-16-16h-16c-8.837 0-16 7.163-16 16v40h-48c-8.837 0-16 7.163-16 16v16c0 8.837 7.163 16 16 16h48v40c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-40h48c8.837 0 16-7.163 16-16v-16c0-8.837-7.163-16-16-16z"},child:[]}]})(e)}function h2(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"},child:[]}]})(e)}function d5(e){return dt({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(e)}function f5(e){return dt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(e)}function p5(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function h5(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"},child:[]}]})(e)}function m2(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function fc(e){return dt({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41zm255-105L177 64c-9.4-9.4-24.6-9.4-33.9 0L24 183c-15.1 15.1-4.4 41 17 41h238c21.4 0 32.1-25.9 17-41z"},child:[]}]})(e)}function g2(e){return dt({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"},child:[]}]})(e)}function m5(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"},child:[]}]})(e)}function Sh(e){return dt({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function g5(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M48 256c0 114.87 93.13 208 208 208s208-93.13 208-208S370.87 48 256 48 48 141.13 48 256zm212.65-91.36a16 16 0 0 1 .09 22.63L208.42 240H342a16 16 0 0 1 0 32H208.42l52.32 52.73A16 16 0 1 1 238 347.27l-79.39-80a16 16 0 0 1 0-22.54l79.39-80a16 16 0 0 1 22.65-.09z"},child:[]}]})(e)}function v5(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M454.66 169.4A31.86 31.86 0 0 0 432 160h-64v-16a112 112 0 0 0-224 0v16H80a32 32 0 0 0-32 32v216c0 39 33 72 72 72h272a72.22 72.22 0 0 0 50.48-20.55 69.48 69.48 0 0 0 21.52-50.2V192a31.78 31.78 0 0 0-9.34-22.6zM320 336h-48v48a16 16 0 0 1-32 0v-48h-48a16 16 0 0 1 0-32h48v-48a16 16 0 0 1 32 0v48h48a16 16 0 0 1 0 32zm16-176H176v-16a80 80 0 0 1 160 0z"},child:[]}]})(e)}function Qc(e){return dt({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"circle",attr:{cx:"176",cy:"416",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"400",cy:"416",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M48 80h64l48 272h256"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M160 288h249.44a8 8 0 0 0 7.85-6.43l28.8-144a8 8 0 0 0-7.85-9.57H128"},child:[]}]})(e)}const Eo=({id:e,onClick:t,ariaLabel:n,isHidden:r,ref:i,children:o})=>{const s=r?"sm:hidden":"";return c.jsx("button",{id:e,"aria-label":n,onClick:t,className:`${s} cursor-pointer transition-all duration-300 ease-in-out hover:scale-125 relative`,ref:i,children:o})},y5={isLoggedIn:!1,jwt:"",login:()=>{},logout:()=>{},user:null,isAdmin:!1},Nn=k.createContext(y5),w5=({children:e})=>{const[t,n]=k.useState(!0),[r,i]=k.useState(""),[o,s]=k.useState(null),[a,l]=k.useState(!1);k.useEffect(()=>{const C=localStorage.getItem("token");C?(i(C),n(!0),d()):(i(null),n(!1))},[]);const d=async()=>{try{const C=await Go.getUserDetails();s(C),C.roles.some(w=>w.roleName==="ROLE_ADMIN")&&l(!0)}catch(C){console.error("Failed to fetch user details",C)}},v={isLoggedIn:t,jwt:r,login:C=>{i(C),n(!0),localStorage.setItem("token",C)},logout:()=>{i(null),n(!1),localStorage.removeItem("token")},user:o,isAdmin:a};return c.jsx(Nn.Provider,{value:v,children:e})},x5={isDark:!1,toggleTheme:()=>{}},Ch=k.createContext(x5),b5=e=>{const[t,n]=k.useState(!1);k.useEffect(()=>{const o=localStorage.getItem("theme")==="dark";n(o),o&&document.body.classList.add("dark")},[]);const i={toggleTheme:()=>{n(o=>{const s=!o;return s?(localStorage.setItem("theme","dark"),document.body.classList.add("dark")):(localStorage.setItem("theme","light"),document.body.classList.remove("dark")),s})},isDark:t};return c.jsx(Ch.Provider,{value:i,children:e.children})};var v2={exports:{}};/*! + */function fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function tk(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function nk(e,t){return e.button===0&&(!t||t==="_self")&&!tk(e)}function Hf(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function rk(e,t){let n=Hf(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(s=>{n.append(i,s)})}),n}const ik=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],sk=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],ok="6";try{window.__reactRouterVersion=ok}catch{}const ak=k.createContext({isTransitioning:!1}),lk="startTransition",p0=Rl[lk];function ck(e){let{basename:t,children:n,future:r,window:i}=e,s=k.useRef();s.current==null&&(s.current=f3({window:i,v5Compat:!0}));let o=s.current,[a,l]=k.useState({action:o.action,location:o.location}),{v7_startTransition:d}=r||{},f=k.useCallback(h=>{d&&p0?p0(()=>l(h)):l(h)},[l,d]);return k.useLayoutEffect(()=>o.listen(f),[o,f]),k.createElement(ek,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const uk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Je=k.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:a,target:l,to:d,preventScrollReset:f,unstable_viewTransition:h}=t,v=n2(t,ik),{basename:C}=k.useContext(wr),w,S=!1;if(typeof d=="string"&&dk.test(d)&&(w=d,uk))try{let y=new URL(window.location.href),E=d.startsWith("//")?new URL(y.protocol+d):new URL(d),j=Fi(E.pathname,C);E.origin===y.origin&&j!=null?d=j+E.search+E.hash:S=!0}catch{}let P=A3(d,{relative:i}),m=hk(d,{replace:o,state:a,target:l,preventScrollReset:f,relative:i,unstable_viewTransition:h});function g(y){r&&r(y),y.defaultPrevented||m(y)}return k.createElement("a",fa({},v,{href:w||P,onClick:S||s?r:g,ref:n,target:l}))}),ol=k.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:a,to:l,unstable_viewTransition:d,children:f}=t,h=n2(t,sk),v=Kc(l,{relative:h.relative}),C=vn(),w=k.useContext(gh),{navigator:S,basename:P}=k.useContext(wr),m=w!=null&&yk(v)&&d===!0,g=S.encodeLocation?S.encodeLocation(v).pathname:v.pathname,y=C.pathname,E=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;i||(y=y.toLowerCase(),E=E?E.toLowerCase():null,g=g.toLowerCase()),E&&P&&(E=Fi(E,P)||E);const j=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let L=y===g||!o&&y.startsWith(g)&&y.charAt(j)==="/",M=E!=null&&(E===g||!o&&E.startsWith(g)&&E.charAt(g.length)==="/"),O={isActive:L,isPending:M,isTransitioning:m},I=L?r:void 0,_;typeof s=="function"?_=s(O):_=[s,L?"active":null,M?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let B=typeof a=="function"?a(O):a;return k.createElement(Je,fa({},h,{"aria-current":I,className:_,ref:n,style:B,to:l,unstable_viewTransition:d}),typeof f=="function"?f(O):f)});function fk(e){let{getKey:t,storageKey:n}=e;return gk({getKey:t,storageKey:n}),null}var cc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(cc||(cc={}));var Uf;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Uf||(Uf={}));function r2(e){let t=k.useContext(Gc);return t||gt(!1),t}function pk(e){let t=k.useContext(gh);return t||gt(!1),t}function hk(e,t){let{target:n,replace:r,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a}=t===void 0?{}:t,l=ct(),d=vn(),f=Kc(e,{relative:o});return k.useCallback(h=>{if(nk(h,n)){h.preventDefault();let v=r!==void 0?r:lc(d)===lc(f);l(e,{replace:v,state:i,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[d,l,f,r,i,n,e,s,o,a])}function mk(e){let t=k.useRef(Hf(e)),n=k.useRef(!1),r=vn(),i=k.useMemo(()=>rk(r.search,n.current?null:t.current),[r.search]),s=ct(),o=k.useCallback((a,l)=>{const d=Hf(typeof a=="function"?a(i):a);n.current=!0,s("?"+d,l)},[s,i]);return[i,o]}const h0="react-router-scroll-positions";let al={};function gk(e){let{getKey:t,storageKey:n}=e===void 0?{}:e,{router:r}=r2(cc.UseScrollRestoration),{restoreScrollPosition:i,preventScrollReset:s}=pk(Uf.UseScrollRestoration),{basename:o}=k.useContext(wr),a=vn(),l=Q3(),d=X3();k.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),vk(k.useCallback(()=>{if(d.state==="idle"){let f=(t?t(a,l):null)||a.key;al[f]=window.scrollY}try{sessionStorage.setItem(n||h0,JSON.stringify(al))}catch{}window.history.scrollRestoration="auto"},[n,t,d.state,a,l])),typeof document<"u"&&(k.useLayoutEffect(()=>{try{let f=sessionStorage.getItem(n||h0);f&&(al=JSON.parse(f))}catch{}},[n]),k.useLayoutEffect(()=>{let f=t&&o!=="/"?(v,C)=>t(fa({},v,{pathname:Fi(v.pathname,o)||v.pathname}),C):t,h=r==null?void 0:r.enableScrollRestoration(al,()=>window.scrollY,f);return()=>h&&h()},[r,o,t]),k.useLayoutEffect(()=>{if(i!==!1){if(typeof i=="number"){window.scrollTo(0,i);return}if(a.hash){let f=document.getElementById(decodeURIComponent(a.hash.slice(1)));if(f){f.scrollIntoView();return}}s!==!0&&window.scrollTo(0,0)}},[a,i,s]))}function vk(e,t){let{capture:n}=t||{};k.useEffect(()=>{let r=n!=null?{capture:n}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,n])}function yk(e,t){t===void 0&&(t={});let n=k.useContext(ak);n==null&>(!1);let{basename:r}=r2(cc.useViewTransitionState),i=Kc(e,{relative:t.relative});if(!n.isTransitioning)return!1;let s=Fi(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Fi(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Vf(i.pathname,o)!=null||Vf(i.pathname,s)!=null}async function wk(e){const t=await fetch(`${jt}/auth/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();if(!t.ok)throw n;return n}async function xk(e){const t=await fetch(`${jt}/auth/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),n=await t.json();if(!t.ok)throw n;return n}async function bk(){const e=Zt(),t=await fetch(`${jt}/auth/current-user`,{method:"GET",headers:{Authorization:`Bearer ${e}`}}),n=await t.json();if(!t.ok)throw n;return n}async function Sk(e){const t=Zt(),n=await fetch(`${jt}/auth/update-data`,{method:"PUT",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await n.json();if(!n.ok)throw r;return r}async function Ck(e){const t=Zt(),n=await fetch(`${jt}/auth/update-password`,{method:"PUT",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await n.json();if(!n.ok)throw r;return r}const Ws={register:wk,login:xk,getUserDetails:bk,updateUserDetails:Sk,changePassword:Ck},kk=e=>{const t=i2(e);return`${jt}/filter/products?${t}`},Ek=async(e={})=>{const t=Zt(),n=kk(e),r=await fetch(n,{method:"GET",headers:{Authorization:`Bearer ${t}`}}),i=await r.json();if(!r.ok)throw i;return i},Pk={fetchProductFilterOption:Ek},jk=async e=>{const t=Zt(),n=`${jt}/orders`,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(e)}),i=await r.json();if(!r.ok)throw i;return i},Tk=async(e={})=>{const t=Zt(),n=wh(e),r=`${jt}/orders?${n}`,i=await fetch(r,{headers:{Authorization:`Bearer ${t}`}}),s=await i.json();if(!i.ok)throw s;return s},Nk=async(e={})=>{const t=Zt(),n=wh(e),r=`${jt}/orders/all?${n}`,i=await fetch(r,{headers:{Authorization:`Bearer ${t}`}}),s=await i.json();if(!i.ok)throw s;return s},Lk=async e=>{const t=Zt(),n=`${jt}/orders/${e.orderId}`,r=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(e)}),i=await r.json();if(!r.ok)throw i;return i},ka={createOrder:jk,fetchCustomerOrders:Tk,fetchAllOrders:Nk,updateOrderStatus:Lk},_k=e=>{const t=wh(e),n=i2(e);return`${jt}/products?${t}&${n}`},Mk=async(e={})=>{const t=Zt(),n=_k(e),r=await fetch(n,{method:"GET",headers:{Authorization:`Bearer ${t}`}}),i=await r.json();if(!r.ok)throw i;return i},Ok=async()=>{const e=`${jt}/products?pageSize=8&sortBy=ratings&sortDir=desc`,t=await fetch(e,{method:"GET"}),n=await t.json();if(!t.ok)throw n;return n},Ik=async e=>{const t=Zt(),n=`${jt}/products/${e}`,r=await fetch(n,{method:"GET",headers:{Authorization:`Bearer ${t}`}}),i=await r.json();if(!r.ok)throw i;return i},$k=async e=>{const t=Zt(),n=`${jt}/products`,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(e)}),i=await r.json();if(!r.ok)throw new Error(i.message||"Failed to add product");return i},Ak=async(e,t)=>{const n=Zt(),r=`${jt}/products/${e}`,i=await fetch(r,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${n}`},body:JSON.stringify(t)}),s=await i.json();if(!i.ok)throw new Error(s.message||"Failed to update product");return s},Rk=async e=>{const t=Zt(),n=`${jt}/products/${e}`,r=await fetch(n,{method:"DELETE",headers:{Authorization:`Bearer ${t}`}}),i=await r.json();if(!r.ok)throw new Error(i.message||"Failed to delete product");return i},rr={fetchProducts:Mk,fetchProductsByRating:Ok,fetchProduct:Ik,addProduct:$k,updateProduct:Ak,deleteProduct:Rk},Dk=async e=>{const t=Zt(),n=`${jt}/products/${e.productId}/ratings`,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(e)}),i=await r.json();if(!r.ok)throw i;return i},zk=async e=>{const t=Zt(),n=`${jt}/products/${e.productId}/ratings`,r=await fetch(n,{method:"PUT",headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},body:JSON.stringify(e)}),i=await r.json();if(!r.ok)throw i;return i},Fk=async e=>{const t=Zt(),n=`${jt}/products/${e}/ratings`,r=await fetch(n,{headers:{Authorization:`Bearer ${t}`}}),i=await r.json();if(!r.ok)throw i;return i},Pd={postRating:Dk,updateRating:zk,fetchRatingByProductId:Fk},jt="https://ecommerce-store-e805668c131b.herokuapp.com/api/v1",wh=e=>{const t=new URLSearchParams;return e.pageNumber!==void 0&&t.set("pageNumber",String(e.pageNumber)),e.pageSize!==void 0&&t.set("pageSize",String(e.pageSize)),e.sortDir&&t.set("sortDir",e.sortDir),e.sortBy&&t.set("sortBy",e.sortBy),t.toString()},i2=e=>{const t=new URLSearchParams;return e.name&&t.append("name",e.name),e.brand&&t.append("brand",e.brand.join(",")),e.minPrice!==void 0&&t.append("minPrice",String(e.minPrice)),e.maxPrice!==void 0&&t.append("maxPrice",String(e.maxPrice)),e.color&&t.append("color",e.color.join(",")),e.memory&&t.append("memory",e.memory.join(",")),e.screenSize!==void 0&&t.append("screenSize",String(e.screenSize)),e.batteryCapacity&&t.append("batteryCapacity",e.batteryCapacity.join(",")),e.category&&t.append("category",e.category.join(",")),t.toString()},Zt=()=>{const e=localStorage.getItem("token")??"";if(!e)throw new Error("Must be logged in");return e};var s2={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},m0=ie.createContext&&ie.createContext(s2),Bk=["attr","size","title"];function Vk(e,t){if(e==null)return{};var n=Hk(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Hk(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,s;for(s=0;s=0)&&(n[i]=e[i]);return n}function uc(){return uc=Object.assign?Object.assign.bind():function(e){for(var t=1;tie.createElement(t.tag,dc({key:n},t.attr),o2(t.child)))}function ut(e){return t=>ie.createElement(qk,uc({attr:dc({},e.attr)},t),o2(e.child))}function qk(e){var t=n=>{var{attr:r,size:i,title:s}=e,o=Vk(e,Bk),a=i||n.size||"1em",l;return n.className&&(l=n.className),e.className&&(l=(l?l+" ":"")+e.className),ie.createElement("svg",uc({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:l,style:dc(dc({color:e.color||n.color},n.style),e.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&ie.createElement("title",null,s),e.children)};return m0!==void 0?ie.createElement(m0.Consumer,null,n=>t(n)):t(s2)}function a2(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Remove"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M9.525,13.765a.5.5,0,0,0,.71.71c.59-.59,1.175-1.18,1.765-1.76l1.765,1.76a.5.5,0,0,0,.71-.71c-.59-.58-1.18-1.175-1.76-1.765.41-.42.82-.825,1.23-1.235.18-.18.35-.36.53-.53a.5.5,0,0,0-.71-.71L12,11.293,10.235,9.525a.5.5,0,0,0-.71.71L11.293,12Z"},child:[]},{tag:"path",attr:{d:"M12,21.933A9.933,9.933,0,1,1,21.934,12,9.945,9.945,0,0,1,12,21.933ZM12,3.067A8.933,8.933,0,1,0,20.934,12,8.944,8.944,0,0,0,12,3.067Z"},child:[]}]}]}]})(e)}function v0(e){return ut({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Lock"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M17.44,9.33h-1.1V6.4a4.34,4.34,0,0,0-8.68,0V9.33H6.56a2.5,2.5,0,0,0-2.5,2.5v7.61a2.507,2.507,0,0,0,2.5,2.5H17.44a2.507,2.507,0,0,0,2.5-2.5V11.83A2.5,2.5,0,0,0,17.44,9.33ZM8.66,6.4a3.34,3.34,0,0,1,6.68,0V9.33H8.66ZM18.94,19.44a1.511,1.511,0,0,1-1.5,1.5H6.56a1.511,1.511,0,0,1-1.5-1.5V11.83a1.5,1.5,0,0,1,1.5-1.5H17.44a1.5,1.5,0,0,1,1.5,1.5Z"},child:[]},{tag:"path",attr:{d:"M13,14.95a.984.984,0,0,1-.5.86v1.5a.5.5,0,0,1-1,0v-1.5a.984.984,0,0,1-.5-.86,1,1,0,0,1,2,0Z"},child:[]}]}]}]})(e)}function l2(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M368.5 240H272v-96.5c0-8.8-7.2-16-16-16s-16 7.2-16 16V240h-96.5c-8.8 0-16 7.2-16 16 0 4.4 1.8 8.4 4.7 11.3 2.9 2.9 6.9 4.7 11.3 4.7H240v96.5c0 4.4 1.8 8.4 4.7 11.3 2.9 2.9 6.9 4.7 11.3 4.7 8.8 0 16-7.2 16-16V272h96.5c8.8 0 16-7.2 16-16s-7.2-16-16-16z"},child:[]}]})(e)}function c2(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M368.5 240h-225c-8.8 0-16 7.2-16 16 0 4.4 1.8 8.4 4.7 11.3 2.9 2.9 6.9 4.7 11.3 4.7h225c8.8 0 16-7.2 16-16s-7.2-16-16-16z"},child:[]}]})(e)}function Ea(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M405 136.798L375.202 107 256 226.202 136.798 107 107 136.798 226.202 256 107 375.202 136.798 405 256 285.798 375.202 405 405 375.202 285.798 256z"},child:[]}]})(e)}const u2=({quantity:e,decrease:t,increase:n})=>{const[r,i]=k.useState(!1),[s,o]=k.useState(!1);return k.useEffect(()=>{i(e<=1),o(e>=5)},[e]),c.jsxs("div",{className:"flex items-center border border-black rounded-md bg-transparent w-16",children:[c.jsx("button",{className:`h-full py-2 rounded-l-md hover:bg-transparent/10 transition-all duration-300 ease-in-out ${r?"bg-slate-300 dark:bg-gray-400 hover:bg-slate-300/100 dark:hover:bg-slate-400/100":""}`,onClick:t,disabled:r,children:c.jsx(c2,{className:"text-secondary-regular dark:text-secondary-light h-full"})}),c.jsx("div",{className:"w-8 text-center dark:text-white",children:e}),c.jsx("button",{className:`h-full py-2 rounded-r-md hover:bg-transparent/10 transition-all duration-300 ease-in-out ${s?"bg-slate-300 dark:bg-gray-400 hover:bg-slate-300/100 dark:hover:bg-slate-400/100":""}`,onClick:n,disabled:s,children:c.jsx(l2,{className:"text-secondary-regular dark:text-secondary-light h-full"})})]})};function Kk(e,t){const[n,r]=k.useState(()=>{const i=localStorage.getItem(e);return i!=null?JSON.parse(i):typeof t=="function"?t():t});return k.useEffect(()=>{localStorage.setItem(e,JSON.stringify(n))},[e,n]),[n,r]}const Yk={openCart:()=>{},closeCart:()=>{},getItemQuantity:()=>0,increaseItemQuantity:()=>{},decreaseItemQuantity:()=>{},removeItem:()=>{},cartQuantity:0,cartItems:[],isCartOpen:!1},d2=k.createContext(Yk),Xk=({children:e})=>{const[t,n]=k.useState(!1),[r,i]=Kk("shopping-cart",[]),s=r.reduce((v,C)=>v+C.quantity,0),o=()=>{n(!0)},a=()=>{n(!1)},l=v=>{var C;return((C=r.find(w=>w.id===v))==null?void 0:C.quantity)??0},d=v=>{i(C=>C.find(w=>w.id===v)==null?[...C,{id:v,quantity:1}]:C.map(w=>w.id===v?{...w,quantity:w.quantity+1}:w))},f=v=>{i(C=>{var w;return((w=C.find(S=>S.id===v))==null?void 0:w.quantity)===1?C.filter(S=>S.id!==v):C.map(S=>S.id===v?{...S,quantity:S.quantity-1}:S)})},h=v=>{i(C=>C.filter(w=>w.id!==v))};return c.jsx(d2.Provider,{value:{openCart:o,closeCart:a,getItemQuantity:l,increaseItemQuantity:d,decreaseItemQuantity:f,removeItem:h,cartQuantity:s,cartItems:r,isCartOpen:t},children:e})},hi=()=>k.useContext(d2),ve="/ECommerceStore-Frontend/",Qk=()=>c.jsx("div",{className:"w-64 sm:w-[37rem] md:w-[45rem] lg:w-[50rem] h-[26rem] lg:h-48 bg-slate-300 animate-pulse rounded-2xl mx-auto"}),Zk=({id:e,quantity:t})=>{const{removeItem:n,decreaseItemQuantity:r,increaseItemQuantity:i}=hi(),[s,o]=k.useState(null),[a,l]=k.useState(!0),d=ct(),f=()=>{d(`${ve}products/${e}`)},h=()=>{r(e)},v=()=>{i(e)};return k.useEffect(()=>{(async()=>{try{l(!0);const w=await rr.fetchProduct(e);o(w)}catch(w){console.error("Failed to fetch product:",w)}finally{l(!1)}})()},[e]),a?c.jsx(Qk,{}):s===null?null:c.jsxs("div",{className:"flex flex-col justify-between items-center border border-black relative rounded-xl mx-4 lg:mr-4",children:[c.jsxs("div",{className:"flex flex-col lg:flex-row lg:justify-around lg:w-full items-center gap-2",children:[c.jsxs("div",{className:"flex flex-col lg:flex-row hover:scale-105",onClick:f,children:[c.jsx("img",{src:s.image,alt:s.name,className:"h-48 w-48"}),c.jsxs("div",{className:"flex flex-col items-center self-center text-center w-48",children:[c.jsx("h2",{children:s.name}),c.jsx("p",{children:s.category})]})]}),c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsx("p",{className:"lg:hidden",children:"Quantity:"}),c.jsx(u2,{quantity:t,decrease:h,increase:v})]}),c.jsxs("div",{className:"flex gap-2 w-16 justify-center",children:[c.jsx("p",{className:"lg:hidden",children:"Price:"}),c.jsx("p",{children:s.price})]}),c.jsxs("div",{className:"flex gap-2 w-16 justify-center",children:[c.jsx("p",{className:"lg:hidden",children:"Subtotal:"}),c.jsx("p",{children:(s.price*t).toFixed(2)})]})]}),c.jsx("button",{onClick:()=>n(e),children:c.jsx(a2,{className:"text-red-500 h-8 w-8 absolute right-1 top-1 hover:scale-125 transition-all duration-300 ease-in-out"})})]})};function Wf(){return Wf=Object.assign||function(e){for(var t=1;tc.jsx("div",{className:"w-[33rem] h-96 bg-gray-300 rounded-3xl animate-pulse mx-auto"}),t5=()=>c.jsx(e5,{}),n5=({id:e,quantity:t})=>{const{removeItem:n,decreaseItemQuantity:r,increaseItemQuantity:i}=hi(),[s,o]=k.useState(null),[a,l]=k.useState(!0),d=ct(),f=()=>{d(`${ve}products/${e}`)},h=()=>{r(e)},v=()=>{i(e)};return k.useEffect(()=>{(async()=>{try{const w=await rr.fetchProduct(e);o(w)}catch(w){console.error("Failed to fetch product:",w)}finally{l(!1)}})()},[e]),a?c.jsx(t5,{}):s===null?null:c.jsxs("div",{className:"flex flex-col justify-between items-center border relative border-black rounded-xl mx-4",children:[c.jsxs("div",{className:"flex flex-col items-center gap-2 ",children:[c.jsxs("div",{className:"flex flex-col hover:scale-105 hover:my-2 transition-all duration-300 ease-in-out cursor-pointer",onClick:f,children:[c.jsx("img",{src:s.image,alt:s.name,className:"h-48 w-48"}),c.jsxs("div",{className:"flex flex-col items-center self-center text-center w-48",children:[c.jsx("h2",{children:s.name}),c.jsx("p",{children:s.category})]})]}),c.jsxs("div",{className:"flex gap-2 items-center",children:[c.jsx("p",{children:"Quantity:"}),c.jsx(u2,{quantity:t,decrease:h,increase:v})]}),c.jsxs("div",{className:"flex gap-2 w-16 justify-center",children:[c.jsx("p",{children:"Price:"}),c.jsx("p",{children:s.price})]}),c.jsxs("div",{className:"flex gap-2 w-16 justify-center",children:[c.jsx("p",{children:"Subtotal:"}),c.jsx("p",{children:(s.price*t).toFixed(2)})]})]}),c.jsx("button",{onClick:()=>n(e),children:c.jsx(a2,{className:"text-red-500 h-8 w-8 absolute right-1 top-1 hover:scale-125 transition-all duration-300 ease-in-out"})})]})},r5=()=>{const{closeCart:e,cartItems:t,isCartOpen:n}=hi(),[r,i]=k.useState(0);return k.useEffect(()=>{(async()=>{const o=await Promise.all(t.map(async a=>(await rr.fetchProduct(a.id)).price*a.quantity)).then(a=>a.reduce((l,d)=>l+d,0));i(o)})()},[t]),c.jsxs(xh,{open:n,onClose:e,direction:"right",lockBackgroundScroll:!0,className:"w-full flex flex-col overflow-y-auto overflow-x-hidden sm:w-3/4 lg:w-1/2 xl:w-1/3",children:[c.jsxs("div",{className:"flex-1",children:[c.jsxs("div",{className:"flex justify-between items-center w-full mt-2 mx-1",children:[c.jsx("h2",{children:"Cart"}),c.jsx(Ea,{className:"h-8 w-8 hover:scale-125 transition-all duration-300 ease-in-out cursor-pointer",onClick:e})]}),c.jsx("div",{className:"flex flex-col gap-4",children:t.length!==0?t.map(s=>c.jsx(n5,{...s},s.id)):c.jsx("h1",{className:"text-center mt-16",children:"Cart is empty"})})]}),c.jsxs("div",{className:"flex flex-col border-t-2 border-black my-2",children:[c.jsxs("div",{className:"flex gap-2 ml-1 my-2",children:[c.jsx("h1",{children:"Total:"}),c.jsxs("h1",{children:[r.toFixed(2),"$"]})]}),c.jsx(Je,{to:`${ve}cart`,className:"action-button w-11/12 mt-2 self-center text-center",onClick:e,children:"Checkout"})]})]})};function i5(e){return ut({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M31.7 239l136-136c9.4-9.4 24.6-9.4 33.9 0l22.6 22.6c9.4 9.4 9.4 24.6 0 33.9L127.9 256l96.4 96.4c9.4 9.4 9.4 24.6 0 33.9L201.7 409c-9.4 9.4-24.6 9.4-33.9 0l-136-136c-9.5-9.4-9.5-24.6-.1-34z"},child:[]}]})(e)}function s5(e){return ut({tag:"svg",attr:{viewBox:"0 0 256 512"},child:[{tag:"path",attr:{d:"M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z"},child:[]}]})(e)}function o5(e){return ut({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M504.717 320H211.572l6.545 32h268.418c15.401 0 26.816 14.301 23.403 29.319l-5.517 24.276C523.112 414.668 536 433.828 536 456c0 31.202-25.519 56.444-56.824 55.994-29.823-.429-54.35-24.631-55.155-54.447-.44-16.287 6.085-31.049 16.803-41.548H231.176C241.553 426.165 248 440.326 248 456c0 31.813-26.528 57.431-58.67 55.938-28.54-1.325-51.751-24.385-53.251-52.917-1.158-22.034 10.436-41.455 28.051-51.586L93.883 64H24C10.745 64 0 53.255 0 40V24C0 10.745 10.745 0 24 0h102.529c11.401 0 21.228 8.021 23.513 19.19L159.208 64H551.99c15.401 0 26.816 14.301 23.403 29.319l-47.273 208C525.637 312.246 515.923 320 504.717 320zM403.029 192H360v-60c0-6.627-5.373-12-12-12h-24c-6.627 0-12 5.373-12 12v60h-43.029c-10.691 0-16.045 12.926-8.485 20.485l67.029 67.029c4.686 4.686 12.284 4.686 16.971 0l67.029-67.029c7.559-7.559 2.205-20.485-8.486-20.485z"},child:[]}]})(e)}function a5(e){return ut({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M504.717 320H211.572l6.545 32h268.418c15.401 0 26.816 14.301 23.403 29.319l-5.517 24.276C523.112 414.668 536 433.828 536 456c0 31.202-25.519 56.444-56.824 55.994-29.823-.429-54.35-24.631-55.155-54.447-.44-16.287 6.085-31.049 16.803-41.548H231.176C241.553 426.165 248 440.326 248 456c0 31.813-26.528 57.431-58.67 55.938-28.54-1.325-51.751-24.385-53.251-52.917-1.158-22.034 10.436-41.455 28.051-51.586L93.883 64H24C10.745 64 0 53.255 0 40V24C0 10.745 10.745 0 24 0h102.529c11.401 0 21.228 8.021 23.513 19.19L159.208 64H551.99c15.401 0 26.816 14.301 23.403 29.319l-47.273 208C525.637 312.246 515.923 320 504.717 320zM408 168h-48v-40c0-8.837-7.163-16-16-16h-16c-8.837 0-16 7.163-16 16v40h-48c-8.837 0-16 7.163-16 16v16c0 8.837 7.163 16 16 16h48v40c0 8.837 7.163 16 16 16h16c8.837 0 16-7.163 16-16v-40h48c8.837 0 16-7.163 16-16v-16c0-8.837-7.163-16-16-16z"},child:[]}]})(e)}function f2(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z"},child:[]}]})(e)}function l5(e){return ut({tag:"svg",attr:{viewBox:"0 0 640 512"},child:[{tag:"path",attr:{d:"M320 400c-75.85 0-137.25-58.71-142.9-133.11L72.2 185.82c-13.79 17.3-26.48 35.59-36.72 55.59a32.35 32.35 0 0 0 0 29.19C89.71 376.41 197.07 448 320 448c26.91 0 52.87-4 77.89-10.46L346 397.39a144.13 144.13 0 0 1-26 2.61zm313.82 58.1l-110.55-85.44a331.25 331.25 0 0 0 81.25-102.07 32.35 32.35 0 0 0 0-29.19C550.29 135.59 442.93 64 320 64a308.15 308.15 0 0 0-147.32 37.7L45.46 3.37A16 16 0 0 0 23 6.18L3.37 31.45A16 16 0 0 0 6.18 53.9l588.36 454.73a16 16 0 0 0 22.46-2.81l19.64-25.27a16 16 0 0 0-2.82-22.45zm-183.72-142l-39.3-30.38A94.75 94.75 0 0 0 416 256a94.76 94.76 0 0 0-121.31-92.21A47.65 47.65 0 0 1 304 192a46.64 46.64 0 0 1-1.54 10l-73.61-56.89A142.31 142.31 0 0 1 320 112a143.92 143.92 0 0 1 144 144c0 21.63-5.29 41.79-13.9 60.11z"},child:[]}]})(e)}function c5(e){return ut({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M572.52 241.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400a144 144 0 1 1 144-144 143.93 143.93 0 0 1-144 144zm0-240a95.31 95.31 0 0 0-25.31 3.79 47.85 47.85 0 0 1-66.9 66.9A95.78 95.78 0 1 0 288 160z"},child:[]}]})(e)}function u5(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M487.976 0H24.028C2.71 0-8.047 25.866 7.058 40.971L192 225.941V432c0 7.831 3.821 15.17 10.237 19.662l80 55.98C298.02 518.69 320 507.493 320 487.98V225.941l184.947-184.97C520.021 25.896 509.338 0 487.976 0z"},child:[]}]})(e)}function d5(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M283.211 512c78.962 0 151.079-35.925 198.857-94.792 7.068-8.708-.639-21.43-11.562-19.35-124.203 23.654-238.262-71.576-238.262-196.954 0-72.222 38.662-138.635 101.498-174.394 9.686-5.512 7.25-20.197-3.756-22.23A258.156 258.156 0 0 0 283.211 0c-141.309 0-256 114.511-256 256 0 141.309 114.511 256 256 256z"},child:[]}]})(e)}function p2(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z"},child:[]}]})(e)}function fc(e){return ut({tag:"svg",attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M41 288h238c21.4 0 32.1 25.9 17 41L177 448c-9.4 9.4-24.6 9.4-33.9 0L24 329c-15.1-15.1-4.4-41 17-41zm255-105L177 64c-9.4-9.4-24.6-9.4-33.9 0L24 183c-15.1 15.1-4.4 41 17 41h238c21.4 0 32.1-25.9 17-41z"},child:[]}]})(e)}function h2(e){return ut({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z"},child:[]}]})(e)}function f5(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256 160c-52.9 0-96 43.1-96 96s43.1 96 96 96 96-43.1 96-96-43.1-96-96-96zm246.4 80.5l-94.7-47.3 33.5-100.4c4.5-13.6-8.4-26.5-21.9-21.9l-100.4 33.5-47.4-94.8c-6.4-12.8-24.6-12.8-31 0l-47.3 94.7L92.7 70.8c-13.6-4.5-26.5 8.4-21.9 21.9l33.5 100.4-94.7 47.4c-12.8 6.4-12.8 24.6 0 31l94.7 47.3-33.5 100.5c-4.5 13.6 8.4 26.5 21.9 21.9l100.4-33.5 47.3 94.7c6.4 12.8 24.6 12.8 31 0l47.3-94.7 100.4 33.5c13.6 4.5 26.5-8.4 21.9-21.9l-33.5-100.4 94.7-47.3c13-6.5 13-24.7.2-31.1zm-155.9 106c-49.9 49.9-131.1 49.9-181 0-49.9-49.9-49.9-131.1 0-181 49.9-49.9 131.1-49.9 181 0 49.9 49.9 49.9 131.1 0 181z"},child:[]}]})(e)}function bh(e){return ut({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"},child:[]}]})(e)}function p5(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M48 256c0 114.87 93.13 208 208 208s208-93.13 208-208S370.87 48 256 48 48 141.13 48 256zm212.65-91.36a16 16 0 0 1 .09 22.63L208.42 240H342a16 16 0 0 1 0 32H208.42l52.32 52.73A16 16 0 1 1 238 347.27l-79.39-80a16 16 0 0 1 0-22.54l79.39-80a16 16 0 0 1 22.65-.09z"},child:[]}]})(e)}function h5(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M454.66 169.4A31.86 31.86 0 0 0 432 160h-64v-16a112 112 0 0 0-224 0v16H80a32 32 0 0 0-32 32v216c0 39 33 72 72 72h272a72.22 72.22 0 0 0 50.48-20.55 69.48 69.48 0 0 0 21.52-50.2V192a31.78 31.78 0 0 0-9.34-22.6zM320 336h-48v48a16 16 0 0 1-32 0v-48h-48a16 16 0 0 1 0-32h48v-48a16 16 0 0 1 32 0v48h48a16 16 0 0 1 0 32zm16-176H176v-16a80 80 0 0 1 160 0z"},child:[]}]})(e)}function Qc(e){return ut({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"circle",attr:{cx:"176",cy:"416",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"circle",attr:{cx:"400",cy:"416",r:"16",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M48 80h64l48 272h256"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M160 288h249.44a8 8 0 0 0 7.85-6.43l28.8-144a8 8 0 0 0-7.85-9.57H128"},child:[]}]})(e)}const ks=({id:e,onClick:t,ariaLabel:n,isHidden:r,ref:i,children:s})=>{const o=r?"sm:hidden":"";return c.jsx("button",{id:e,"aria-label":n,onClick:t,className:`${o} cursor-pointer transition-all duration-300 ease-in-out hover:scale-125 relative`,ref:i,children:s})},m5={isLoggedIn:!1,jwt:"",login:()=>{},logout:()=>{},user:null,isAdmin:!1},Nn=k.createContext(m5),g5=({children:e})=>{const[t,n]=k.useState(!0),[r,i]=k.useState(""),[s,o]=k.useState(null),[a,l]=k.useState(!1);k.useEffect(()=>{const C=localStorage.getItem("token");C?(i(C),n(!0),d()):(i(null),n(!1))},[]);const d=async()=>{try{const C=await Ws.getUserDetails();o(C),C.roles.some(w=>w.roleName==="ROLE_ADMIN")&&l(!0)}catch(C){console.error("Failed to fetch user details",C)}},v={isLoggedIn:t,jwt:r,login:C=>{i(C),n(!0),localStorage.setItem("token",C)},logout:()=>{i(null),n(!1),localStorage.removeItem("token")},user:s,isAdmin:a};return c.jsx(Nn.Provider,{value:v,children:e})},v5={isDark:!1,toggleTheme:()=>{}},Sh=k.createContext(v5),y5=e=>{const[t,n]=k.useState(!1);k.useEffect(()=>{const s=localStorage.getItem("theme")==="dark";n(s),s&&document.body.classList.add("dark")},[]);const i={toggleTheme:()=>{n(s=>{const o=!s;return o?(localStorage.setItem("theme","dark"),document.body.classList.add("dark")):(localStorage.setItem("theme","light"),document.body.classList.remove("dark")),o})},isDark:t};return c.jsx(Sh.Provider,{value:i,children:e.children})};var m2={exports:{}};/*! * sweetalert2 v11.10.8 * Released under the MIT License. -*/(function(e,t){(function(n,r){e.exports=r()})(zr,function(){function n(b,u,p){if(typeof b=="function"?b===u:b.has(u))return arguments.length<3?u:p;throw new TypeError("Private element is not present on this object")}function r(b,u,p){return u=P(u),y(b,a()?Reflect.construct(u,p||[],P(b).constructor):u.apply(b,p))}function i(b,u){return b.get(n(b,u))}function o(b,u,p){return b.set(n(b,u),p),p}function s(b,u,p){if(a())return Reflect.construct.apply(null,arguments);var x=[null];x.push.apply(x,u);var T=new(b.bind.apply(b,x));return p&&m(T,p.prototype),T}function a(){try{var b=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(a=function(){return!!b})()}function l(b,u){var p=b==null?null:typeof Symbol<"u"&&b[Symbol.iterator]||b["@@iterator"];if(p!=null){var x,T,W,oe,Ee=[],Te=!0,ot=!1;try{if(W=(p=p.call(b)).next,u===0){if(Object(p)!==p)return;Te=!1}else for(;!(Te=(x=W.call(p)).done)&&(Ee.push(x.value),Ee.length!==u);Te=!0);}catch(ls){ot=!0,T=ls}finally{try{if(!Te&&p.return!=null&&(oe=p.return(),Object(oe)!==oe))return}finally{if(ot)throw T}}return Ee}}function d(b,u){if(typeof b!="object"||!b)return b;var p=b[Symbol.toPrimitive];if(p!==void 0){var x=p.call(b,u||"default");if(typeof x!="object")return x;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(b)}function f(b){var u=d(b,"string");return typeof u=="symbol"?u:u+""}function h(b){"@babel/helpers - typeof";return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},h(b)}function v(b,u){if(!(b instanceof u))throw new TypeError("Cannot call a class as a function")}function C(b,u){for(var p=0;pb.length)&&(u=b.length);for(var p=0,x=new Array(u);pb.length)&&(u=b.length);for(var p=0,x=new Array(u);pot?1:Te .").concat(F[p]));case"checkbox":return u.querySelector(".".concat(F.popup," > .").concat(F.checkbox," input"));case"radio":return u.querySelector(".".concat(F.popup," > .").concat(F.radio," input:checked"))||u.querySelector(".".concat(F.popup," > .").concat(F.radio," input:first-child"));case"range":return u.querySelector(".".concat(F.popup," > .").concat(F.range," input"));default:return u.querySelector(".".concat(F.popup," > .").concat(F.input))}},Ki=function(u){if(u.focus(),u.type!=="file"){var p=u.value;u.value="",u.value=p}},Yi=function(u,p,x){!u||!p||(typeof p=="string"&&(p=p.split(/\s+/).filter(Boolean)),p.forEach(function(T){Array.isArray(u)?u.forEach(function(W){x?W.classList.add(T):W.classList.remove(T)}):x?u.classList.add(T):u.classList.remove(T)}))},je=function(u,p){Yi(u,p,!0)},Mn=function(u,p){Yi(u,p,!1)},or=function(u,p){for(var x=Array.from(u.children),T=0;T1&&arguments[1]!==void 0?arguments[1]:"flex";u&&(u.style.display=p)},Nt=function(u){u&&(u.style.display="none")},rs=function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"block";u&&new MutationObserver(function(){gi(u,u.innerHTML,p)}).observe(u,{childList:!0,subtree:!0})},Xi=function(u,p,x,T){var W=u.querySelector(p);W&&W.style.setProperty(x,T)},gi=function(u,p){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";p?wt(u,x):Nt(u)},At=function(u){return!!(u&&(u.offsetWidth||u.offsetHeight||u.getClientRects().length))},is=function(){return!At(X())&&!At(ae())&&!At(G())},$a=function(u){return u.scrollHeight>u.clientHeight},tt=function(u){var p=window.getComputedStyle(u),x=parseFloat(p.getPropertyValue("animation-duration")||"0"),T=parseFloat(p.getPropertyValue("transition-duration")||"0");return x>0||T>0},pt=function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=Tt();x&&At(x)&&(p&&(x.style.transition="none",x.style.width="100%"),setTimeout(function(){x.style.transition="width ".concat(u/1e3,"s linear"),x.style.width="0%"},10))},os=function(){var u=Tt();if(u){var p=parseInt(window.getComputedStyle(u).width);u.style.removeProperty("transition"),u.style.width="100%";var x=parseInt(window.getComputedStyle(u).width),T=p/x*100;u.style.width="".concat(T,"%")}},vi=function(){return typeof window>"u"||typeof document>"u"},qn=` +`,ir=function(){var u=$();if(!u)return[];var p=u.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),x=Array.from(p).sort(function(se,Ee){var Te=parseInt(se.getAttribute("tabindex")||"0"),it=parseInt(Ee.getAttribute("tabindex")||"0");return Te>it?1:Te .").concat(F[p]));case"checkbox":return u.querySelector(".".concat(F.popup," > .").concat(F.checkbox," input"));case"radio":return u.querySelector(".".concat(F.popup," > .").concat(F.radio," input:checked"))||u.querySelector(".".concat(F.popup," > .").concat(F.radio," input:first-child"));case"range":return u.querySelector(".".concat(F.popup," > .").concat(F.range," input"));default:return u.querySelector(".".concat(F.popup," > .").concat(F.input))}},Ki=function(u){if(u.focus(),u.type!=="file"){var p=u.value;u.value="",u.value=p}},Yi=function(u,p,x){!u||!p||(typeof p=="string"&&(p=p.split(/\s+/).filter(Boolean)),p.forEach(function(T){Array.isArray(u)?u.forEach(function(W){x?W.classList.add(T):W.classList.remove(T)}):x?u.classList.add(T):u.classList.remove(T)}))},je=function(u,p){Yi(u,p,!0)},Mn=function(u,p){Yi(u,p,!1)},sr=function(u,p){for(var x=Array.from(u.children),T=0;T1&&arguments[1]!==void 0?arguments[1]:"flex";u&&(u.style.display=p)},Nt=function(u){u&&(u.style.display="none")},no=function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"block";u&&new MutationObserver(function(){gi(u,u.innerHTML,p)}).observe(u,{childList:!0,subtree:!0})},Xi=function(u,p,x,T){var W=u.querySelector(p);W&&W.style.setProperty(x,T)},gi=function(u,p){var x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";p?wt(u,x):Nt(u)},At=function(u){return!!(u&&(u.offsetWidth||u.offsetHeight||u.getClientRects().length))},ro=function(){return!At(X())&&!At(ae())&&!At(G())},$a=function(u){return u.scrollHeight>u.clientHeight},et=function(u){var p=window.getComputedStyle(u),x=parseFloat(p.getPropertyValue("animation-duration")||"0"),T=parseFloat(p.getPropertyValue("transition-duration")||"0");return x>0||T>0},ft=function(u){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,x=Tt();x&&At(x)&&(p&&(x.style.transition="none",x.style.width="100%"),setTimeout(function(){x.style.transition="width ".concat(u/1e3,"s linear"),x.style.width="0%"},10))},io=function(){var u=Tt();if(u){var p=parseInt(window.getComputedStyle(u).width);u.style.removeProperty("transition"),u.style.width="100%";var x=parseInt(window.getComputedStyle(u).width),T=p/x*100;u.style.width="".concat(T,"%")}},vi=function(){return typeof window>"u"||typeof document>"u"},qn=`
    @@ -117,27 +117,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
    -`).replace(/(^|\n)\s*/g,""),Cx=function(){var u=me();return u?(u.remove(),Mn([document.documentElement,document.body],[F["no-backdrop"],F["toast-shown"],F["has-column"]]),!0):!1},yi=function(){A.currentInstance.resetValidationMessage()},kx=function(){var u=$(),p=or(u,F.input),x=or(u,F.file),T=u.querySelector(".".concat(F.range," input")),W=u.querySelector(".".concat(F.range," output")),oe=or(u,F.select),Ee=u.querySelector(".".concat(F.checkbox," input")),Te=or(u,F.textarea);p.oninput=yi,x.onchange=yi,oe.onchange=yi,Ee.onchange=yi,Te.oninput=yi,T.oninput=function(){yi(),W.value=T.value},T.onchange=function(){yi(),W.value=T.value}},Ex=function(u){return typeof u=="string"?document.querySelector(u):u},Px=function(u){var p=$();p.setAttribute("role",u.toast?"alert":"dialog"),p.setAttribute("aria-live",u.toast?"polite":"assertive"),u.toast||p.setAttribute("aria-modal","true")},jx=function(u){window.getComputedStyle(u).direction==="rtl"&&je(me(),F.rtl)},Tx=function(u){var p=Cx();if(vi()){be("SweetAlert2 requires document to initialize");return}var x=document.createElement("div");x.className=F.container,p&&je(x,F["no-transition"]),$t(x,qn);var T=Ex(u.target);T.appendChild(x),Px(u),jx(T),kx()},Wu=function(u,p){u instanceof HTMLElement?p.appendChild(u):h(u)==="object"?Nx(u,p):u&&$t(p,u)},Nx=function(u,p){u.jquery?Lx(p,u):$t(p,u.toString())},Lx=function(u,p){if(u.textContent="",0 in p)for(var x=0;x in p;x++)u.appendChild(p[x].cloneNode(!0));else u.appendChild(p.cloneNode(!0))},wi=function(){if(vi())return!1;var b=document.createElement("div");return typeof b.style.webkitAnimation<"u"?"webkitAnimationEnd":typeof b.style.animation<"u"?"animationend":!1}(),_x=function(u,p){var x=ge(),T=ye();!x||!T||(!p.showConfirmButton&&!p.showDenyButton&&!p.showCancelButton?Nt(x):wt(x),Wt(x,p,"actions"),Mx(x,T,p),$t(T,p.loaderHtml||""),Wt(T,p,"loader"))};function Mx(b,u,p){var x=X(),T=ae(),W=G();!x||!T||!W||(Gu(x,"confirm",p),Gu(T,"deny",p),Gu(W,"cancel",p),Ox(x,T,W,p),p.reverseButtons&&(p.toast?(b.insertBefore(W,x),b.insertBefore(T,x)):(b.insertBefore(W,u),b.insertBefore(T,u),b.insertBefore(x,u))))}function Ox(b,u,p,x){if(!x.buttonsStyling){Mn([b,u,p],F.styled);return}je([b,u,p],F.styled),x.confirmButtonColor&&(b.style.backgroundColor=x.confirmButtonColor,je(b,F["default-outline"])),x.denyButtonColor&&(u.style.backgroundColor=x.denyButtonColor,je(u,F["default-outline"])),x.cancelButtonColor&&(p.style.backgroundColor=x.cancelButtonColor,je(p,F["default-outline"]))}function Gu(b,u,p){var x=Ae(u);gi(b,p["show".concat(x,"Button")],"inline-block"),$t(b,p["".concat(u,"ButtonText")]||""),b.setAttribute("aria-label",p["".concat(u,"ButtonAriaLabel")]||""),b.className=F[u],Wt(b,p,"".concat(u,"Button"))}var Ix=function(u,p){var x=Ie();x&&($t(x,p.closeButtonHtml||""),Wt(x,p,"closeButton"),gi(x,p.showCloseButton),x.setAttribute("aria-label",p.closeButtonAriaLabel||""))},$x=function(u,p){var x=me();x&&(Ax(x,p.backdrop),Rx(x,p.position),Dx(x,p.grow),Wt(x,p,"container"))};function Ax(b,u){typeof u=="string"?b.style.background=u:u||je([document.documentElement,document.body],F["no-backdrop"])}function Rx(b,u){u&&(u in F?je(b,F[u]):(Pe('The "position" parameter is not valid, defaulting to "center"'),je(b,F.center)))}function Dx(b,u){u&&je(b,F["grow-".concat(u)])}var Ge={innerParams:new WeakMap,domCache:new WeakMap},zx=["input","file","range","select","radio","checkbox","textarea"],Fx=function(u,p){var x=$();if(x){var T=Ge.innerParams.get(u),W=!T||p.input!==T.input;zx.forEach(function(oe){var Ee=or(x,F[oe]);Ee&&(Hx(oe,p.inputAttributes),Ee.className=F[oe],W&&Nt(Ee))}),p.input&&(W&&Bx(p),Ux(p))}},Bx=function(u){if(u.input){if(!ht[u.input]){be("Unexpected type of input! Expected ".concat(Object.keys(ht).join(" | "),', got "').concat(u.input,'"'));return}var p=fm(u.input),x=ht[u.input](p,u);wt(p),u.inputAutoFocus&&setTimeout(function(){Ki(x)})}},Vx=function(u){for(var p=0;px?$().style.width="".concat(oe,"px"):br($(),"width",u.width)}};new MutationObserver(T).observe(b,{attributes:!0,attributeFilter:["style"]})}}),b};var Wx=function(u,p){var x=ne();x&&(rs(x),Wt(x,p,"htmlContainer"),p.html?(Wu(p.html,x),wt(x,"block")):p.text?(x.textContent=p.text,wt(x,"block")):Nt(x),Fx(u,p))},Gx=function(u,p){var x=Ut();x&&(rs(x),gi(x,p.footer,"block"),p.footer&&Wu(p.footer,x),Wt(x,p,"footer"))},qx=function(u,p){var x=Ge.innerParams.get(u),T=Q();if(T){if(x&&p.icon===x.icon){hm(T,p),pm(T,p);return}if(!p.icon&&!p.iconHtml){Nt(T);return}if(p.icon&&Object.keys(Le).indexOf(p.icon)===-1){be('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(p.icon,'"')),Nt(T);return}wt(T),hm(T,p),pm(T,p),je(T,p.showClass&&p.showClass.icon)}},pm=function(u,p){for(var x=0,T=Object.entries(Le);xx?$().style.width="".concat(se,"px"):br($(),"width",u.width)}};new MutationObserver(T).observe(b,{attributes:!0,attributeFilter:["style"]})}}),b};var Hx=function(u,p){var x=ne();x&&(no(x),Wt(x,p,"htmlContainer"),p.html?(Wu(p.html,x),wt(x,"block")):p.text?(x.textContent=p.text,wt(x,"block")):Nt(x),Dx(u,p))},Ux=function(u,p){var x=Ut();x&&(no(x),gi(x,p.footer,"block"),p.footer&&Wu(p.footer,x),Wt(x,p,"footer"))},Wx=function(u,p){var x=Ge.innerParams.get(u),T=Q();if(T){if(x&&p.icon===x.icon){pm(T,p),fm(T,p);return}if(!p.icon&&!p.iconHtml){Nt(T);return}if(p.icon&&Object.keys(Le).indexOf(p.icon)===-1){be('Unknown icon! Expected "success", "error", "warning", "info" or "question", got "'.concat(p.icon,'"')),Nt(T);return}wt(T),pm(T,p),fm(T,p),je(T,p.showClass&&p.showClass.icon)}},fm=function(u,p){for(var x=0,T=Object.entries(Le);x
    -`,Xx=` +`,Kx=` -`,hm=function(u,p){if(!(!p.icon&&!p.iconHtml)){var x=u.innerHTML,T="";if(p.iconHtml)T=mm(p.iconHtml);else if(p.icon==="success")T=Yx,x=x.replace(/ style=".*?"/g,"");else if(p.icon==="error")T=Xx;else if(p.icon){var W={question:"?",warning:"!",info:"i"};T=mm(W[p.icon])}x.trim()!==T.trim()&&$t(u,T)}},Qx=function(u,p){if(p.iconColor){u.style.color=p.iconColor,u.style.borderColor=p.iconColor;for(var x=0,T=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];x').concat(u,"")},Zx=function(u,p){var x=xe();if(x){if(!p.imageUrl){Nt(x);return}wt(x,""),x.setAttribute("src",p.imageUrl),x.setAttribute("alt",p.imageAlt||""),br(x,"width",p.imageWidth),br(x,"height",p.imageHeight),x.className=F.image,Wt(x,p,"image")}},Jx=function(u,p){var x=me(),T=$();if(!(!x||!T)){if(p.toast){br(x,"width",p.width),T.style.width="100%";var W=ye();W&&T.insertBefore(W,Q())}else br(T,"width",p.width);br(T,"padding",p.padding),p.color&&(T.style.color=p.color),p.background&&(T.style.background=p.background),Nt(Ue()),eb(T,p)}},eb=function(u,p){var x=p.showClass||{};u.className="".concat(F.popup," ").concat(At(u)?x.popup:""),p.toast?(je([document.documentElement,document.body],F["toast-shown"]),je(u,F.toast)):je(u,F.modal),Wt(u,p,"popup"),typeof p.customClass=="string"&&je(u,p.customClass),p.icon&&je(u,F["icon-".concat(p.icon)])},tb=function(u,p){var x=Ve();if(x){var T=p.progressSteps,W=p.currentProgressStep;if(!T||T.length===0||W===void 0){Nt(x);return}wt(x),x.textContent="",W>=T.length&&Pe("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),T.forEach(function(oe,Ee){var Te=nb(oe);if(x.appendChild(Te),Ee===W&&je(Te,F["active-progress-step"]),Ee!==T.length-1){var ot=rb(p);x.appendChild(ot)}})}},nb=function(u){var p=document.createElement("li");return je(p,F["progress-step"]),$t(p,u),p},rb=function(u){var p=document.createElement("li");return je(p,F["progress-step-line"]),u.progressStepsDistance&&br(p,"width",u.progressStepsDistance),p},ib=function(u,p){var x=K();x&&(rs(x),gi(x,p.title||p.titleText,"block"),p.title&&Wu(p.title,x),p.titleText&&(x.innerText=p.titleText),Wt(x,p,"title"))},gm=function(u,p){Jx(u,p),$x(u,p),tb(u,p),qx(u,p),Zx(u,p),ib(u,p),Ix(u,p),Wx(u,p),_x(u,p),Gx(u,p);var x=$();typeof p.didRender=="function"&&x&&p.didRender(x)},ob=function(){return At($())},vm=function(){var u;return(u=X())===null||u===void 0?void 0:u.click()},sb=function(){var u;return(u=ae())===null||u===void 0?void 0:u.click()},ab=function(){var u;return(u=G())===null||u===void 0?void 0:u.click()},Qi=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),ym=function(u){u.keydownTarget&&u.keydownHandlerAdded&&(u.keydownTarget.removeEventListener("keydown",u.keydownHandler,{capture:u.keydownListenerCapture}),u.keydownHandlerAdded=!1)},lb=function(u,p,x){ym(u),p.toast||(u.keydownHandler=function(T){return ub(p,T,x)},u.keydownTarget=p.keydownListenerCapture?window:$(),u.keydownListenerCapture=p.keydownListenerCapture,u.keydownTarget.addEventListener("keydown",u.keydownHandler,{capture:u.keydownListenerCapture}),u.keydownHandlerAdded=!0)},Ku=function(u,p){var x,T=ir();if(T.length){u=u+p,u===T.length?u=0:u===-1&&(u=T.length-1),T[u].focus();return}(x=$())===null||x===void 0||x.focus()},wm=["ArrowRight","ArrowDown"],cb=["ArrowLeft","ArrowUp"],ub=function(u,p,x){u&&(p.isComposing||p.keyCode===229||(u.stopKeydownPropagation&&p.stopPropagation(),p.key==="Enter"?db(p,u):p.key==="Tab"?fb(p):[].concat(wm,cb).includes(p.key)?pb(p.key):p.key==="Escape"&&hb(p,u,x)))},db=function(u,p){if(pe(p.allowEnterKey)){var x=qi($(),p.input);if(u.target&&x&&u.target instanceof HTMLElement&&u.target.outerHTML===x.outerHTML){if(["textarea","file"].includes(p.input))return;vm(),u.preventDefault()}}},fb=function(u){for(var p=u.target,x=ir(),T=-1,W=0;W1},bb=function(){if(yn(document.body,F.iosfix)){var u=parseInt(document.body.style.top,10);Mn(document.body,F.iosfix),document.body.style.top="",document.body.scrollTop=u*-1}},Sb=function(){var u=document.createElement("div");u.className=F["scrollbar-measure"],document.body.appendChild(u);var p=u.getBoundingClientRect().width-u.clientWidth;return document.body.removeChild(u),p},Ji=null,Cb=function(u){Ji===null&&(document.body.scrollHeight>window.innerHeight||u==="scroll")&&(Ji=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(Ji+Sb(),"px"))},kb=function(){Ji!==null&&(document.body.style.paddingRight="".concat(Ji,"px"),Ji=null)};function Sm(b,u,p,x){mi()?km(b,x):(te(p).then(function(){return km(b,x)}),ym(A)),bm?(u.setAttribute("style","display:none !important"),u.removeAttribute("class"),u.innerHTML=""):u.remove(),Gi()&&(kb(),bb(),xm()),Eb()}function Eb(){Mn([document.documentElement,document.body],[F.shown,F["height-auto"],F["no-backdrop"],F["toast-shown"]])}function Dr(b){b=jb(b);var u=Zi.swalPromiseResolve.get(this),p=Pb(this);this.isAwaitingPromise?b.isDismissed||(as(this),u(b)):p&&u(b)}var Pb=function(u){var p=$();if(!p)return!1;var x=Ge.innerParams.get(u);if(!x||yn(p,x.hideClass.popup))return!1;Mn(p,x.showClass.popup),je(p,x.hideClass.popup);var T=me();return Mn(T,x.showClass.backdrop),je(T,x.hideClass.backdrop),Tb(u,p,x),!0};function Cm(b){var u=Zi.swalPromiseReject.get(this);as(this),u&&u(b)}var as=function(u){u.isAwaitingPromise&&(delete u.isAwaitingPromise,Ge.innerParams.get(u)||u._destroy())},jb=function(u){return typeof u>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},u)},Tb=function(u,p,x){var T=me(),W=wi&&tt(p);typeof x.willClose=="function"&&x.willClose(p),W?Nb(u,p,T,x.returnFocus,x.didClose):Sm(u,T,x.returnFocus,x.didClose)},Nb=function(u,p,x,T,W){wi&&(A.swalCloseEventFinishedCallback=Sm.bind(null,u,x,T,W),p.addEventListener(wi,function(oe){oe.target===p&&(A.swalCloseEventFinishedCallback(),delete A.swalCloseEventFinishedCallback)}))},km=function(u,p){setTimeout(function(){typeof p=="function"&&p.bind(u.params)(),u._destroy&&u._destroy()})},eo=function(u){var p=$();if(p||new Ba,p=$(),!!p){var x=ye();mi()?Nt(Q()):Lb(p,u),wt(x),p.setAttribute("data-loading","true"),p.setAttribute("aria-busy","true"),p.focus()}},Lb=function(u,p){var x=ge(),T=ye();!x||!T||(!p&&At(X())&&(p=X()),wt(x),p&&(Nt(p),T.setAttribute("data-button-to-replace",p.className),x.insertBefore(T,p)),je([u,x],F.loading))},_b=function(u,p){p.input==="select"||p.input==="radio"?Ab(u,p):["text","email","number","tel","textarea"].some(function(x){return x===p.input})&&(de(p.inputValue)||ke(p.inputValue))&&(eo(X()),Rb(u,p))},Mb=function(u,p){var x=u.getInput();if(!x)return null;switch(p.input){case"checkbox":return Ob(x);case"radio":return Ib(x);case"file":return $b(x);default:return p.inputAutoTrim?x.value.trim():x.value}},Ob=function(u){return u.checked?1:0},Ib=function(u){return u.checked?u.value:null},$b=function(u){return u.files&&u.files.length?u.getAttribute("multiple")!==null?u.files:u.files[0]:null},Ab=function(u,p){var x=$();if(x){var T=function(oe){p.input==="select"?Db(x,Em(oe),p):p.input==="radio"&&zb(x,Em(oe),p)};de(p.inputOptions)||ke(p.inputOptions)?(eo(X()),se(p.inputOptions).then(function(W){u.hideLoading(),T(W)})):h(p.inputOptions)==="object"?T(p.inputOptions):be("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(h(p.inputOptions)))}},Rb=function(u,p){var x=u.getInput();x&&(Nt(x),se(p.inputValue).then(function(T){x.value=p.input==="number"?"".concat(parseFloat(T)||0):"".concat(T),wt(x),x.focus(),u.hideLoading()}).catch(function(T){be("Error in inputValue promise: ".concat(T)),x.value="",wt(x),x.focus(),u.hideLoading()}))};function Db(b,u,p){var x=or(b,F.select);if(x){var T=function(oe,Ee,Te){var ot=document.createElement("option");ot.value=Te,$t(ot,Ee),ot.selected=Pm(Te,p.inputValue),oe.appendChild(ot)};u.forEach(function(W){var oe=W[0],Ee=W[1];if(Array.isArray(Ee)){var Te=document.createElement("optgroup");Te.label=oe,Te.disabled=!1,x.appendChild(Te),Ee.forEach(function(ot){return T(Te,ot[1],ot[0])})}else T(x,Ee,oe)}),x.focus()}}function zb(b,u,p){var x=or(b,F.radio);if(x){u.forEach(function(W){var oe=W[0],Ee=W[1],Te=document.createElement("input"),ot=document.createElement("label");Te.type="radio",Te.name=F.radio,Te.value=oe,Pm(oe,p.inputValue)&&(Te.checked=!0);var ls=document.createElement("span");$t(ls,Ee),ls.className=F.label,ot.appendChild(Te),ot.appendChild(ls),x.appendChild(ot)});var T=x.querySelectorAll("input");T.length&&T[0].focus()}}var Em=function b(u){var p=[];return u instanceof Map?u.forEach(function(x,T){var W=x;h(W)==="object"&&(W=b(W)),p.push([T,W])}):Object.keys(u).forEach(function(x){var T=u[x];h(T)==="object"&&(T=b(T)),p.push([x,T])}),p},Pm=function(u,p){return!!p&&p.toString()===u.toString()},Ra=void 0,Fb=function(u){var p=Ge.innerParams.get(u);u.disableButtons(),p.input?jm(u,"confirm"):Xu(u,!0)},Bb=function(u){var p=Ge.innerParams.get(u);u.disableButtons(),p.returnInputValueOnDeny?jm(u,"deny"):Yu(u,!1)},Vb=function(u,p){u.disableButtons(),p(Qi.cancel)},jm=function(u,p){var x=Ge.innerParams.get(u);if(!x.input){be('The "input" parameter is needed to be set when using returnInputValueOn'.concat(Ae(p)));return}var T=u.getInput(),W=Mb(u,x);x.inputValidator?Hb(u,W,p):T&&!T.checkValidity()?(u.enableButtons(),u.showValidationMessage(x.validationMessage||T.validationMessage)):p==="deny"?Yu(u,W):Xu(u,W)},Hb=function(u,p,x){var T=Ge.innerParams.get(u);u.disableInput();var W=Promise.resolve().then(function(){return se(T.inputValidator(p,T.validationMessage))});W.then(function(oe){u.enableButtons(),u.enableInput(),oe?u.showValidationMessage(oe):x==="deny"?Yu(u,p):Xu(u,p)})},Yu=function(u,p){var x=Ge.innerParams.get(u||Ra);if(x.showLoaderOnDeny&&eo(ae()),x.preDeny){u.isAwaitingPromise=!0;var T=Promise.resolve().then(function(){return se(x.preDeny(p,x.validationMessage))});T.then(function(W){W===!1?(u.hideLoading(),as(u)):u.close({isDenied:!0,value:typeof W>"u"?p:W})}).catch(function(W){return Nm(u||Ra,W)})}else u.close({isDenied:!0,value:p})},Tm=function(u,p){u.close({isConfirmed:!0,value:p})},Nm=function(u,p){u.rejectPromise(p)},Xu=function(u,p){var x=Ge.innerParams.get(u||Ra);if(x.showLoaderOnConfirm&&eo(),x.preConfirm){u.resetValidationMessage(),u.isAwaitingPromise=!0;var T=Promise.resolve().then(function(){return se(x.preConfirm(p,x.validationMessage))});T.then(function(W){At(Ue())||W===!1?(u.hideLoading(),as(u)):Tm(u,typeof W>"u"?p:W)}).catch(function(W){return Nm(u||Ra,W)})}else Tm(u,p)};function Da(){var b=Ge.innerParams.get(this);if(b){var u=Ge.domCache.get(this);Nt(u.loader),mi()?b.icon&&wt(Q()):Ub(u),Mn([u.popup,u.actions],F.loading),u.popup.removeAttribute("aria-busy"),u.popup.removeAttribute("data-loading"),u.confirmButton.disabled=!1,u.denyButton.disabled=!1,u.cancelButton.disabled=!1}}var Ub=function(u){var p=u.popup.getElementsByClassName(u.loader.getAttribute("data-button-to-replace"));p.length?wt(p[0],"inline-block"):is()&&Nt(u.actions)};function Lm(){var b=Ge.innerParams.get(this),u=Ge.domCache.get(this);return u?qi(u.popup,b.input):null}function _m(b,u,p){var x=Ge.domCache.get(b);u.forEach(function(T){x[T].disabled=p})}function Mm(b,u){var p=$();if(!(!p||!b))if(b.type==="radio")for(var x=p.querySelectorAll('[name="'.concat(F.radio,'"]')),T=0;T0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Zu[b]=this,Km||(document.body.addEventListener("click",gS),Km=!0)}var gS=function(u){for(var p=u.target;p&&p!==document;p=p.parentNode)for(var x in Zu){var T=p.getAttribute(x);if(T){Zu[x].fire({template:T});return}}},vS=Object.freeze({__proto__:null,argsToParams:lS,bindClickHandler:mS,clickCancel:ab,clickConfirm:vm,clickDeny:sb,enableLoading:eo,fire:cS,getActions:ge,getCancelButton:G,getCloseButton:Ie,getConfirmButton:X,getContainer:me,getDenyButton:ae,getFocusableElements:ir,getFooter:Ut,getHtmlContainer:ne,getIcon:Q,getIconContent:Z,getImage:xe,getInputLabel:Se,getLoader:ye,getPopup:$,getProgressSteps:Ve,getTimerLeft:dS,getTimerProgressBar:Tt,getTitle:K,getValidationMessage:Ue,increaseTimer:pS,isDeprecatedParameter:Bm,isLoading:Oa,isTimerRunning:hS,isUpdatableParameter:Fm,isValidParameter:zm,isVisible:ob,mixin:uS,resumeTimer:qm,showLoading:eo,stopTimer:Gm,toggleTimer:fS}),yS=function(){function b(u,p){v(this,b),this.callback=u,this.remaining=p,this.running=!1,this.start()}return w(b,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}},{key:"increase",value:function(p){var x=this.running;return x&&this.stop(),this.remaining+=p,x&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}])}(),Ym=["swal-title","swal-html","swal-footer"],wS=function(u){var p=typeof u.template=="string"?document.querySelector(u.template):u.template;if(!p)return{};var x=p.content;jS(x);var T=Object.assign(xS(x),bS(x),SS(x),CS(x),kS(x),ES(x),PS(x,Ym));return T},xS=function(u){var p={},x=Array.from(u.querySelectorAll("swal-param"));return x.forEach(function(T){xi(T,["name","value"]);var W=T.getAttribute("name"),oe=T.getAttribute("value");typeof to[W]=="boolean"?p[W]=oe!=="false":h(to[W])==="object"?p[W]=JSON.parse(oe):p[W]=oe}),p},bS=function(u){var p={},x=Array.from(u.querySelectorAll("swal-function-param"));return x.forEach(function(T){var W=T.getAttribute("name"),oe=T.getAttribute("value");p[W]=new Function("return ".concat(oe))()}),p},SS=function(u){var p={},x=Array.from(u.querySelectorAll("swal-button"));return x.forEach(function(T){xi(T,["type","color","aria-label"]);var W=T.getAttribute("type");p["".concat(W,"ButtonText")]=T.innerHTML,p["show".concat(Ae(W),"Button")]=!0,T.hasAttribute("color")&&(p["".concat(W,"ButtonColor")]=T.getAttribute("color")),T.hasAttribute("aria-label")&&(p["".concat(W,"ButtonAriaLabel")]=T.getAttribute("aria-label"))}),p},CS=function(u){var p={},x=u.querySelector("swal-image");return x&&(xi(x,["src","width","height","alt"]),x.hasAttribute("src")&&(p.imageUrl=x.getAttribute("src")),x.hasAttribute("width")&&(p.imageWidth=x.getAttribute("width")),x.hasAttribute("height")&&(p.imageHeight=x.getAttribute("height")),x.hasAttribute("alt")&&(p.imageAlt=x.getAttribute("alt"))),p},kS=function(u){var p={},x=u.querySelector("swal-icon");return x&&(xi(x,["type","color"]),x.hasAttribute("type")&&(p.icon=x.getAttribute("type")),x.hasAttribute("color")&&(p.iconColor=x.getAttribute("color")),p.iconHtml=x.innerHTML),p},ES=function(u){var p={},x=u.querySelector("swal-input");x&&(xi(x,["type","label","placeholder","value"]),p.input=x.getAttribute("type")||"text",x.hasAttribute("label")&&(p.inputLabel=x.getAttribute("label")),x.hasAttribute("placeholder")&&(p.inputPlaceholder=x.getAttribute("placeholder")),x.hasAttribute("value")&&(p.inputValue=x.getAttribute("value")));var T=Array.from(u.querySelectorAll("swal-input-option"));return T.length&&(p.inputOptions={},T.forEach(function(W){xi(W,["value"]);var oe=W.getAttribute("value"),Ee=W.innerHTML;p.inputOptions[oe]=Ee})),p},PS=function(u,p){var x={};for(var T in p){var W=p[T],oe=u.querySelector(W);oe&&(xi(oe,[]),x[W.replace(/^swal-/,"")]=oe.innerHTML.trim())}return x},jS=function(u){var p=Ym.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(u.children).forEach(function(x){var T=x.tagName.toLowerCase();p.includes(T)||Pe("Unrecognized element <".concat(T,">"))})},xi=function(u,p){Array.from(u.attributes).forEach(function(x){p.indexOf(x.name)===-1&&Pe(['Unrecognized attribute "'.concat(x.name,'" on <').concat(u.tagName.toLowerCase(),">."),"".concat(p.length?"Allowed attributes are: ".concat(p.join(", ")):"To set the value, use HTML within the element.")])})},Xm=10,TS=function(u){var p=me(),x=$();typeof u.willOpen=="function"&&u.willOpen(x);var T=window.getComputedStyle(document.body),W=T.overflowY;MS(p,x,u),setTimeout(function(){LS(p,x)},Xm),Gi()&&(_S(p,u.scrollbarPadding,W),mb()),!mi()&&!A.previousActiveElement&&(A.previousActiveElement=document.activeElement),typeof u.didOpen=="function"&&setTimeout(function(){return u.didOpen(x)}),Mn(p,F["no-transition"])},NS=function b(u){var p=$();if(!(u.target!==p||!wi)){var x=me();p.removeEventListener(wi,b),x.style.overflowY="auto"}},LS=function(u,p){wi&&tt(p)?(u.style.overflowY="hidden",p.addEventListener(wi,NS)):u.style.overflowY="auto"},_S=function(u,p,x){gb(),p&&x!=="hidden"&&Cb(x),setTimeout(function(){u.scrollTop=0})},MS=function(u,p,x){je(u,x.showClass.backdrop),x.animation?(p.style.setProperty("opacity","0","important"),wt(p,"grid"),setTimeout(function(){je(p,x.showClass.popup),p.style.removeProperty("opacity")},Xm)):wt(p,"grid"),je([document.documentElement,document.body],F.shown),x.heightAuto&&x.backdrop&&!x.toast&&je([document.documentElement,document.body],F["height-auto"])},Qm={email:function(u,p){return/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(u)?Promise.resolve():Promise.resolve(p||"Invalid email address")},url:function(u,p){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(u)?Promise.resolve():Promise.resolve(p||"Invalid URL")}};function OS(b){b.inputValidator||(b.input==="email"&&(b.inputValidator=Qm.email),b.input==="url"&&(b.inputValidator=Qm.url))}function IS(b){(!b.target||typeof b.target=="string"&&!document.querySelector(b.target)||typeof b.target!="string"&&!b.target.appendChild)&&(Pe('Target parameter is not valid, defaulting to "body"'),b.target="body")}function $S(b){OS(b),b.showLoaderOnConfirm&&!b.preConfirm&&Pe(`showLoaderOnConfirm is set to true, but preConfirm is not defined. +`,pm=function(u,p){if(!(!p.icon&&!p.iconHtml)){var x=u.innerHTML,T="";if(p.iconHtml)T=hm(p.iconHtml);else if(p.icon==="success")T=qx,x=x.replace(/ style=".*?"/g,"");else if(p.icon==="error")T=Kx;else if(p.icon){var W={question:"?",warning:"!",info:"i"};T=hm(W[p.icon])}x.trim()!==T.trim()&&$t(u,T)}},Yx=function(u,p){if(p.iconColor){u.style.color=p.iconColor,u.style.borderColor=p.iconColor;for(var x=0,T=[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"];x').concat(u,"")},Xx=function(u,p){var x=xe();if(x){if(!p.imageUrl){Nt(x);return}wt(x,""),x.setAttribute("src",p.imageUrl),x.setAttribute("alt",p.imageAlt||""),br(x,"width",p.imageWidth),br(x,"height",p.imageHeight),x.className=F.image,Wt(x,p,"image")}},Qx=function(u,p){var x=me(),T=$();if(!(!x||!T)){if(p.toast){br(x,"width",p.width),T.style.width="100%";var W=ye();W&&T.insertBefore(W,Q())}else br(T,"width",p.width);br(T,"padding",p.padding),p.color&&(T.style.color=p.color),p.background&&(T.style.background=p.background),Nt(Ue()),Zx(T,p)}},Zx=function(u,p){var x=p.showClass||{};u.className="".concat(F.popup," ").concat(At(u)?x.popup:""),p.toast?(je([document.documentElement,document.body],F["toast-shown"]),je(u,F.toast)):je(u,F.modal),Wt(u,p,"popup"),typeof p.customClass=="string"&&je(u,p.customClass),p.icon&&je(u,F["icon-".concat(p.icon)])},Jx=function(u,p){var x=Ve();if(x){var T=p.progressSteps,W=p.currentProgressStep;if(!T||T.length===0||W===void 0){Nt(x);return}wt(x),x.textContent="",W>=T.length&&Pe("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),T.forEach(function(se,Ee){var Te=eb(se);if(x.appendChild(Te),Ee===W&&je(Te,F["active-progress-step"]),Ee!==T.length-1){var it=tb(p);x.appendChild(it)}})}},eb=function(u){var p=document.createElement("li");return je(p,F["progress-step"]),$t(p,u),p},tb=function(u){var p=document.createElement("li");return je(p,F["progress-step-line"]),u.progressStepsDistance&&br(p,"width",u.progressStepsDistance),p},nb=function(u,p){var x=K();x&&(no(x),gi(x,p.title||p.titleText,"block"),p.title&&Wu(p.title,x),p.titleText&&(x.innerText=p.titleText),Wt(x,p,"title"))},mm=function(u,p){Qx(u,p),Ox(u,p),Jx(u,p),Wx(u,p),Xx(u,p),nb(u,p),Mx(u,p),Hx(u,p),Nx(u,p),Ux(u,p);var x=$();typeof p.didRender=="function"&&x&&p.didRender(x)},rb=function(){return At($())},gm=function(){var u;return(u=X())===null||u===void 0?void 0:u.click()},ib=function(){var u;return(u=ae())===null||u===void 0?void 0:u.click()},sb=function(){var u;return(u=G())===null||u===void 0?void 0:u.click()},Qi=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),vm=function(u){u.keydownTarget&&u.keydownHandlerAdded&&(u.keydownTarget.removeEventListener("keydown",u.keydownHandler,{capture:u.keydownListenerCapture}),u.keydownHandlerAdded=!1)},ob=function(u,p,x){vm(u),p.toast||(u.keydownHandler=function(T){return lb(p,T,x)},u.keydownTarget=p.keydownListenerCapture?window:$(),u.keydownListenerCapture=p.keydownListenerCapture,u.keydownTarget.addEventListener("keydown",u.keydownHandler,{capture:u.keydownListenerCapture}),u.keydownHandlerAdded=!0)},Ku=function(u,p){var x,T=ir();if(T.length){u=u+p,u===T.length?u=0:u===-1&&(u=T.length-1),T[u].focus();return}(x=$())===null||x===void 0||x.focus()},ym=["ArrowRight","ArrowDown"],ab=["ArrowLeft","ArrowUp"],lb=function(u,p,x){u&&(p.isComposing||p.keyCode===229||(u.stopKeydownPropagation&&p.stopPropagation(),p.key==="Enter"?cb(p,u):p.key==="Tab"?ub(p):[].concat(ym,ab).includes(p.key)?db(p.key):p.key==="Escape"&&fb(p,u,x)))},cb=function(u,p){if(pe(p.allowEnterKey)){var x=qi($(),p.input);if(u.target&&x&&u.target instanceof HTMLElement&&u.target.outerHTML===x.outerHTML){if(["textarea","file"].includes(p.input))return;gm(),u.preventDefault()}}},ub=function(u){for(var p=u.target,x=ir(),T=-1,W=0;W1},wb=function(){if(yn(document.body,F.iosfix)){var u=parseInt(document.body.style.top,10);Mn(document.body,F.iosfix),document.body.style.top="",document.body.scrollTop=u*-1}},xb=function(){var u=document.createElement("div");u.className=F["scrollbar-measure"],document.body.appendChild(u);var p=u.getBoundingClientRect().width-u.clientWidth;return document.body.removeChild(u),p},Ji=null,bb=function(u){Ji===null&&(document.body.scrollHeight>window.innerHeight||u==="scroll")&&(Ji=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight="".concat(Ji+xb(),"px"))},Sb=function(){Ji!==null&&(document.body.style.paddingRight="".concat(Ji,"px"),Ji=null)};function bm(b,u,p,x){mi()?Cm(b,x):(te(p).then(function(){return Cm(b,x)}),vm(A)),xm?(u.setAttribute("style","display:none !important"),u.removeAttribute("class"),u.innerHTML=""):u.remove(),Gi()&&(Sb(),wb(),wm()),Cb()}function Cb(){Mn([document.documentElement,document.body],[F.shown,F["height-auto"],F["no-backdrop"],F["toast-shown"]])}function Dr(b){b=Eb(b);var u=Zi.swalPromiseResolve.get(this),p=kb(this);this.isAwaitingPromise?b.isDismissed||(oo(this),u(b)):p&&u(b)}var kb=function(u){var p=$();if(!p)return!1;var x=Ge.innerParams.get(u);if(!x||yn(p,x.hideClass.popup))return!1;Mn(p,x.showClass.popup),je(p,x.hideClass.popup);var T=me();return Mn(T,x.showClass.backdrop),je(T,x.hideClass.backdrop),Pb(u,p,x),!0};function Sm(b){var u=Zi.swalPromiseReject.get(this);oo(this),u&&u(b)}var oo=function(u){u.isAwaitingPromise&&(delete u.isAwaitingPromise,Ge.innerParams.get(u)||u._destroy())},Eb=function(u){return typeof u>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},u)},Pb=function(u,p,x){var T=me(),W=wi&&et(p);typeof x.willClose=="function"&&x.willClose(p),W?jb(u,p,T,x.returnFocus,x.didClose):bm(u,T,x.returnFocus,x.didClose)},jb=function(u,p,x,T,W){wi&&(A.swalCloseEventFinishedCallback=bm.bind(null,u,x,T,W),p.addEventListener(wi,function(se){se.target===p&&(A.swalCloseEventFinishedCallback(),delete A.swalCloseEventFinishedCallback)}))},Cm=function(u,p){setTimeout(function(){typeof p=="function"&&p.bind(u.params)(),u._destroy&&u._destroy()})},es=function(u){var p=$();if(p||new Ba,p=$(),!!p){var x=ye();mi()?Nt(Q()):Tb(p,u),wt(x),p.setAttribute("data-loading","true"),p.setAttribute("aria-busy","true"),p.focus()}},Tb=function(u,p){var x=ge(),T=ye();!x||!T||(!p&&At(X())&&(p=X()),wt(x),p&&(Nt(p),T.setAttribute("data-button-to-replace",p.className),x.insertBefore(T,p)),je([u,x],F.loading))},Nb=function(u,p){p.input==="select"||p.input==="radio"?Ib(u,p):["text","email","number","tel","textarea"].some(function(x){return x===p.input})&&(de(p.inputValue)||ke(p.inputValue))&&(es(X()),$b(u,p))},Lb=function(u,p){var x=u.getInput();if(!x)return null;switch(p.input){case"checkbox":return _b(x);case"radio":return Mb(x);case"file":return Ob(x);default:return p.inputAutoTrim?x.value.trim():x.value}},_b=function(u){return u.checked?1:0},Mb=function(u){return u.checked?u.value:null},Ob=function(u){return u.files&&u.files.length?u.getAttribute("multiple")!==null?u.files:u.files[0]:null},Ib=function(u,p){var x=$();if(x){var T=function(se){p.input==="select"?Ab(x,km(se),p):p.input==="radio"&&Rb(x,km(se),p)};de(p.inputOptions)||ke(p.inputOptions)?(es(X()),oe(p.inputOptions).then(function(W){u.hideLoading(),T(W)})):h(p.inputOptions)==="object"?T(p.inputOptions):be("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(h(p.inputOptions)))}},$b=function(u,p){var x=u.getInput();x&&(Nt(x),oe(p.inputValue).then(function(T){x.value=p.input==="number"?"".concat(parseFloat(T)||0):"".concat(T),wt(x),x.focus(),u.hideLoading()}).catch(function(T){be("Error in inputValue promise: ".concat(T)),x.value="",wt(x),x.focus(),u.hideLoading()}))};function Ab(b,u,p){var x=sr(b,F.select);if(x){var T=function(se,Ee,Te){var it=document.createElement("option");it.value=Te,$t(it,Ee),it.selected=Em(Te,p.inputValue),se.appendChild(it)};u.forEach(function(W){var se=W[0],Ee=W[1];if(Array.isArray(Ee)){var Te=document.createElement("optgroup");Te.label=se,Te.disabled=!1,x.appendChild(Te),Ee.forEach(function(it){return T(Te,it[1],it[0])})}else T(x,Ee,se)}),x.focus()}}function Rb(b,u,p){var x=sr(b,F.radio);if(x){u.forEach(function(W){var se=W[0],Ee=W[1],Te=document.createElement("input"),it=document.createElement("label");Te.type="radio",Te.name=F.radio,Te.value=se,Em(se,p.inputValue)&&(Te.checked=!0);var ao=document.createElement("span");$t(ao,Ee),ao.className=F.label,it.appendChild(Te),it.appendChild(ao),x.appendChild(it)});var T=x.querySelectorAll("input");T.length&&T[0].focus()}}var km=function b(u){var p=[];return u instanceof Map?u.forEach(function(x,T){var W=x;h(W)==="object"&&(W=b(W)),p.push([T,W])}):Object.keys(u).forEach(function(x){var T=u[x];h(T)==="object"&&(T=b(T)),p.push([x,T])}),p},Em=function(u,p){return!!p&&p.toString()===u.toString()},Ra=void 0,Db=function(u){var p=Ge.innerParams.get(u);u.disableButtons(),p.input?Pm(u,"confirm"):Xu(u,!0)},zb=function(u){var p=Ge.innerParams.get(u);u.disableButtons(),p.returnInputValueOnDeny?Pm(u,"deny"):Yu(u,!1)},Fb=function(u,p){u.disableButtons(),p(Qi.cancel)},Pm=function(u,p){var x=Ge.innerParams.get(u);if(!x.input){be('The "input" parameter is needed to be set when using returnInputValueOn'.concat(Ae(p)));return}var T=u.getInput(),W=Lb(u,x);x.inputValidator?Bb(u,W,p):T&&!T.checkValidity()?(u.enableButtons(),u.showValidationMessage(x.validationMessage||T.validationMessage)):p==="deny"?Yu(u,W):Xu(u,W)},Bb=function(u,p,x){var T=Ge.innerParams.get(u);u.disableInput();var W=Promise.resolve().then(function(){return oe(T.inputValidator(p,T.validationMessage))});W.then(function(se){u.enableButtons(),u.enableInput(),se?u.showValidationMessage(se):x==="deny"?Yu(u,p):Xu(u,p)})},Yu=function(u,p){var x=Ge.innerParams.get(u||Ra);if(x.showLoaderOnDeny&&es(ae()),x.preDeny){u.isAwaitingPromise=!0;var T=Promise.resolve().then(function(){return oe(x.preDeny(p,x.validationMessage))});T.then(function(W){W===!1?(u.hideLoading(),oo(u)):u.close({isDenied:!0,value:typeof W>"u"?p:W})}).catch(function(W){return Tm(u||Ra,W)})}else u.close({isDenied:!0,value:p})},jm=function(u,p){u.close({isConfirmed:!0,value:p})},Tm=function(u,p){u.rejectPromise(p)},Xu=function(u,p){var x=Ge.innerParams.get(u||Ra);if(x.showLoaderOnConfirm&&es(),x.preConfirm){u.resetValidationMessage(),u.isAwaitingPromise=!0;var T=Promise.resolve().then(function(){return oe(x.preConfirm(p,x.validationMessage))});T.then(function(W){At(Ue())||W===!1?(u.hideLoading(),oo(u)):jm(u,typeof W>"u"?p:W)}).catch(function(W){return Tm(u||Ra,W)})}else jm(u,p)};function Da(){var b=Ge.innerParams.get(this);if(b){var u=Ge.domCache.get(this);Nt(u.loader),mi()?b.icon&&wt(Q()):Vb(u),Mn([u.popup,u.actions],F.loading),u.popup.removeAttribute("aria-busy"),u.popup.removeAttribute("data-loading"),u.confirmButton.disabled=!1,u.denyButton.disabled=!1,u.cancelButton.disabled=!1}}var Vb=function(u){var p=u.popup.getElementsByClassName(u.loader.getAttribute("data-button-to-replace"));p.length?wt(p[0],"inline-block"):ro()&&Nt(u.actions)};function Nm(){var b=Ge.innerParams.get(this),u=Ge.domCache.get(this);return u?qi(u.popup,b.input):null}function Lm(b,u,p){var x=Ge.domCache.get(b);u.forEach(function(T){x[T].disabled=p})}function _m(b,u){var p=$();if(!(!p||!b))if(b.type==="radio")for(var x=p.querySelectorAll('[name="'.concat(F.radio,'"]')),T=0;T0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Zu[b]=this,qm||(document.body.addEventListener("click",hS),qm=!0)}var hS=function(u){for(var p=u.target;p&&p!==document;p=p.parentNode)for(var x in Zu){var T=p.getAttribute(x);if(T){Zu[x].fire({template:T});return}}},mS=Object.freeze({__proto__:null,argsToParams:oS,bindClickHandler:pS,clickCancel:sb,clickConfirm:gm,clickDeny:ib,enableLoading:es,fire:aS,getActions:ge,getCancelButton:G,getCloseButton:Ie,getConfirmButton:X,getContainer:me,getDenyButton:ae,getFocusableElements:ir,getFooter:Ut,getHtmlContainer:ne,getIcon:Q,getIconContent:Z,getImage:xe,getInputLabel:Se,getLoader:ye,getPopup:$,getProgressSteps:Ve,getTimerLeft:cS,getTimerProgressBar:Tt,getTitle:K,getValidationMessage:Ue,increaseTimer:dS,isDeprecatedParameter:Fm,isLoading:Oa,isTimerRunning:fS,isUpdatableParameter:zm,isValidParameter:Dm,isVisible:rb,mixin:lS,resumeTimer:Gm,showLoading:es,stopTimer:Wm,toggleTimer:uS}),gS=function(){function b(u,p){v(this,b),this.callback=u,this.remaining=p,this.running=!1,this.start()}return w(b,[{key:"start",value:function(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}},{key:"stop",value:function(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}},{key:"increase",value:function(p){var x=this.running;return x&&this.stop(),this.remaining+=p,x&&this.start(),this.remaining}},{key:"getTimerLeft",value:function(){return this.running&&(this.stop(),this.start()),this.remaining}},{key:"isRunning",value:function(){return this.running}}])}(),Km=["swal-title","swal-html","swal-footer"],vS=function(u){var p=typeof u.template=="string"?document.querySelector(u.template):u.template;if(!p)return{};var x=p.content;ES(x);var T=Object.assign(yS(x),wS(x),xS(x),bS(x),SS(x),CS(x),kS(x,Km));return T},yS=function(u){var p={},x=Array.from(u.querySelectorAll("swal-param"));return x.forEach(function(T){xi(T,["name","value"]);var W=T.getAttribute("name"),se=T.getAttribute("value");typeof ts[W]=="boolean"?p[W]=se!=="false":h(ts[W])==="object"?p[W]=JSON.parse(se):p[W]=se}),p},wS=function(u){var p={},x=Array.from(u.querySelectorAll("swal-function-param"));return x.forEach(function(T){var W=T.getAttribute("name"),se=T.getAttribute("value");p[W]=new Function("return ".concat(se))()}),p},xS=function(u){var p={},x=Array.from(u.querySelectorAll("swal-button"));return x.forEach(function(T){xi(T,["type","color","aria-label"]);var W=T.getAttribute("type");p["".concat(W,"ButtonText")]=T.innerHTML,p["show".concat(Ae(W),"Button")]=!0,T.hasAttribute("color")&&(p["".concat(W,"ButtonColor")]=T.getAttribute("color")),T.hasAttribute("aria-label")&&(p["".concat(W,"ButtonAriaLabel")]=T.getAttribute("aria-label"))}),p},bS=function(u){var p={},x=u.querySelector("swal-image");return x&&(xi(x,["src","width","height","alt"]),x.hasAttribute("src")&&(p.imageUrl=x.getAttribute("src")),x.hasAttribute("width")&&(p.imageWidth=x.getAttribute("width")),x.hasAttribute("height")&&(p.imageHeight=x.getAttribute("height")),x.hasAttribute("alt")&&(p.imageAlt=x.getAttribute("alt"))),p},SS=function(u){var p={},x=u.querySelector("swal-icon");return x&&(xi(x,["type","color"]),x.hasAttribute("type")&&(p.icon=x.getAttribute("type")),x.hasAttribute("color")&&(p.iconColor=x.getAttribute("color")),p.iconHtml=x.innerHTML),p},CS=function(u){var p={},x=u.querySelector("swal-input");x&&(xi(x,["type","label","placeholder","value"]),p.input=x.getAttribute("type")||"text",x.hasAttribute("label")&&(p.inputLabel=x.getAttribute("label")),x.hasAttribute("placeholder")&&(p.inputPlaceholder=x.getAttribute("placeholder")),x.hasAttribute("value")&&(p.inputValue=x.getAttribute("value")));var T=Array.from(u.querySelectorAll("swal-input-option"));return T.length&&(p.inputOptions={},T.forEach(function(W){xi(W,["value"]);var se=W.getAttribute("value"),Ee=W.innerHTML;p.inputOptions[se]=Ee})),p},kS=function(u,p){var x={};for(var T in p){var W=p[T],se=u.querySelector(W);se&&(xi(se,[]),x[W.replace(/^swal-/,"")]=se.innerHTML.trim())}return x},ES=function(u){var p=Km.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(u.children).forEach(function(x){var T=x.tagName.toLowerCase();p.includes(T)||Pe("Unrecognized element <".concat(T,">"))})},xi=function(u,p){Array.from(u.attributes).forEach(function(x){p.indexOf(x.name)===-1&&Pe(['Unrecognized attribute "'.concat(x.name,'" on <').concat(u.tagName.toLowerCase(),">."),"".concat(p.length?"Allowed attributes are: ".concat(p.join(", ")):"To set the value, use HTML within the element.")])})},Ym=10,PS=function(u){var p=me(),x=$();typeof u.willOpen=="function"&&u.willOpen(x);var T=window.getComputedStyle(document.body),W=T.overflowY;LS(p,x,u),setTimeout(function(){TS(p,x)},Ym),Gi()&&(NS(p,u.scrollbarPadding,W),pb()),!mi()&&!A.previousActiveElement&&(A.previousActiveElement=document.activeElement),typeof u.didOpen=="function"&&setTimeout(function(){return u.didOpen(x)}),Mn(p,F["no-transition"])},jS=function b(u){var p=$();if(!(u.target!==p||!wi)){var x=me();p.removeEventListener(wi,b),x.style.overflowY="auto"}},TS=function(u,p){wi&&et(p)?(u.style.overflowY="hidden",p.addEventListener(wi,jS)):u.style.overflowY="auto"},NS=function(u,p,x){hb(),p&&x!=="hidden"&&bb(x),setTimeout(function(){u.scrollTop=0})},LS=function(u,p,x){je(u,x.showClass.backdrop),x.animation?(p.style.setProperty("opacity","0","important"),wt(p,"grid"),setTimeout(function(){je(p,x.showClass.popup),p.style.removeProperty("opacity")},Ym)):wt(p,"grid"),je([document.documentElement,document.body],F.shown),x.heightAuto&&x.backdrop&&!x.toast&&je([document.documentElement,document.body],F["height-auto"])},Xm={email:function(u,p){return/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(u)?Promise.resolve():Promise.resolve(p||"Invalid email address")},url:function(u,p){return/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(u)?Promise.resolve():Promise.resolve(p||"Invalid URL")}};function _S(b){b.inputValidator||(b.input==="email"&&(b.inputValidator=Xm.email),b.input==="url"&&(b.inputValidator=Xm.url))}function MS(b){(!b.target||typeof b.target=="string"&&!document.querySelector(b.target)||typeof b.target!="string"&&!b.target.appendChild)&&(Pe('Target parameter is not valid, defaulting to "body"'),b.target="body")}function OS(b){_S(b),b.showLoaderOnConfirm&&!b.preConfirm&&Pe(`showLoaderOnConfirm is set to true, but preConfirm is not defined. showLoaderOnConfirm should be used together with preConfirm, see usage example: -https://sweetalert2.github.io/#ajax-request`),IS(b),typeof b.title=="string"&&(b.title=b.title.split(` -`).join("
    ")),Tx(b)}var sr,Fa=new WeakMap,mt=function(){function b(){if(v(this,b),q(this,Fa,void 0),!(typeof window>"u")){sr=this;for(var u=arguments.length,p=new Array(u),x=0;x1&&arguments[1]!==void 0?arguments[1]:{};if(Qb(Object.assign({},x,p)),A.currentInstance){var T=Zi.swalPromiseResolve.get(A.currentInstance),W=A.currentInstance.isAwaitingPromise;A.currentInstance._destroy(),W||T({isDismissed:!0}),Gi()&&xm()}A.currentInstance=sr;var oe=RS(p,x);$S(oe),Object.freeze(oe),A.timeout&&(A.timeout.stop(),delete A.timeout),clearTimeout(A.restoreFocusTimeout);var Ee=DS(sr);return gm(sr,oe),Ge.innerParams.set(sr,oe),AS(sr,Ee,oe)}},{key:"then",value:function(p){return i(Fa,this).then(p)}},{key:"finally",value:function(p){return i(Fa,this).finally(p)}}])}(),AS=function(u,p,x){return new Promise(function(T,W){var oe=function(Te){u.close({isDismissed:!0,dismiss:Te})};Zi.swalPromiseResolve.set(u,T),Zi.swalPromiseReject.set(u,W),p.confirmButton.onclick=function(){Fb(u)},p.denyButton.onclick=function(){Bb(u)},p.cancelButton.onclick=function(){Vb(u,oe)},p.closeButton.onclick=function(){oe(Qi.close)},tS(x,p,oe),lb(A,x,oe),_b(u,x),TS(x),zS(A,x,oe),FS(p,x),setTimeout(function(){p.container.scrollTop=0})})},RS=function(u,p){var x=wS(u),T=Object.assign({},to,p,x,u);return T.showClass=Object.assign({},to.showClass,T.showClass),T.hideClass=Object.assign({},to.hideClass,T.hideClass),T.animation===!1&&(T.showClass={backdrop:"swal2-noanimation"},T.hideClass={}),T},DS=function(u){var p={popup:$(),container:me(),actions:ge(),confirmButton:X(),denyButton:ae(),cancelButton:G(),loader:ye(),closeButton:Ie(),validationMessage:Ue(),progressSteps:Ve()};return Ge.domCache.set(u,p),p},zS=function(u,p,x){var T=Tt();Nt(T),p.timer&&(u.timeout=new yS(function(){x("timer"),delete u.timeout},p.timer),p.timerProgressBar&&(wt(T),Wt(T,p,"timerProgressBar"),setTimeout(function(){u.timeout&&u.timeout.running&&pt(p.timer)})))},FS=function(u,p){if(!p.toast){if(!pe(p.allowEnterKey)){VS();return}BS(u,p)||Ku(-1,1)}},BS=function(u,p){return p.focusDeny&&At(u.denyButton)?(u.denyButton.focus(),!0):p.focusCancel&&At(u.cancelButton)?(u.cancelButton.focus(),!0):p.focusConfirm&&At(u.confirmButton)?(u.confirmButton.focus(),!0):!1},VS=function(){document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var Zm=new Date,Jm=localStorage.getItem("swal-initiation");Jm?(Zm.getTime()-Date.parse(Jm))/(1e3*60*60*24)>3&&setTimeout(function(){document.body.style.pointerEvents="none";var b=document.createElement("audio");b.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",b.loop=!0,document.body.appendChild(b),setTimeout(function(){b.play().catch(function(){})},2500)},500):localStorage.setItem("swal-initiation","".concat(Zm))}mt.prototype.disableButtons=Im,mt.prototype.enableButtons=Om,mt.prototype.getInput=Lm,mt.prototype.disableInput=Am,mt.prototype.enableInput=$m,mt.prototype.hideLoading=Da,mt.prototype.disableLoading=Da,mt.prototype.showValidationMessage=Rm,mt.prototype.resetValidationMessage=Dm,mt.prototype.close=Dr,mt.prototype.closePopup=Dr,mt.prototype.closeModal=Dr,mt.prototype.closeToast=Dr,mt.prototype.rejectPromise=Cm,mt.prototype.update=Vm,mt.prototype._destroy=Hm,Object.assign(mt,vS),Object.keys(eS).forEach(function(b){mt[b]=function(){if(sr&&sr[b]){var u;return(u=sr)[b].apply(u,arguments)}return null}}),mt.DismissReason=Qi,mt.version="11.10.8";var Ba=mt;return Ba.default=Ba,Ba}),typeof zr<"u"&&zr.Sweetalert2&&(zr.swal=zr.sweetAlert=zr.Swal=zr.SweetAlert=zr.Sweetalert2),typeof document<"u"&&function(n,r){var i=n.createElement("style");if(n.getElementsByTagName("head")[0].appendChild(i),i.styleSheet)i.styleSheet.disabled||(i.styleSheet.cssText=r);else try{i.innerHTML=r}catch{i.innerText=r}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}')})(v2);var S5=v2.exports;const Zc=yp(S5);function C5(e){return Zc.fire({title:"Success!",text:e,icon:"success",showConfirmButton:!0})}function k5(e="something went wrong"){let t="something went wrong";return e!=null&&typeof e=="object"&&"message"in e&&typeof e.message=="string"&&(t=e.message),typeof e=="string"&&(t=e),Zc.fire({icon:"error",title:"Error!",text:t,showConfirmButton:!0})}function E5(e){return Zc.fire({icon:"warning",title:"Warning!",text:e,showConfirmButton:!0})}function P5(e,t,n){return Zc.fire({title:"Are you sure?",text:e,icon:"warning",showDenyButton:!0,confirmButtonText:"Let's do it!",denyButtonText:"Cancel"}).then(r=>{r.isConfirmed?t():r.isDenied&&n()})}const fe={success:C5,error:k5,warning:E5,confirm:P5},j5={black:"#000",white:"#fff"},pa=j5,T5={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},ro=T5,N5={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},io=N5,L5={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},oo=L5,_5={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},so=_5,M5={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},ao=M5,O5={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},vs=O5,I5={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},$5=I5;function ha(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n=0)&&(n[i]=e[i]);return n}function y2(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var R5=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,D5=y2(function(e){return R5.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function z5(e){if(e.sheet)return e.sheet;for(var t=0;t0?Dt(Jo,--mn):0,qo--,xt===10&&(qo=1,eu--),xt}function En(){return xt=mn2||ga(xt)>3?"":" "}function Z5(e,t){for(;--t&&En()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return Pa(e,Nl()+(t<6&&gr()==32&&En()==32))}function Kf(e){for(;En();)switch(xt){case e:return mn;case 34:case 39:e!==34&&e!==39&&Kf(xt);break;case 40:e===41&&Kf(e);break;case 92:En();break}return mn}function J5(e,t){for(;En()&&e+xt!==57;)if(e+xt===84&&gr()===47)break;return"/*"+Pa(t,mn-1)+"*"+Jc(e===47?e:En())}function eE(e){for(;!ga(gr());)En();return Pa(e,mn)}function tE(e){return k2(_l("",null,null,null,[""],e=C2(e),0,[0],e))}function _l(e,t,n,r,i,o,s,a,l){for(var d=0,f=0,h=s,v=0,C=0,w=0,S=1,P=1,m=1,g=0,y="",E=i,j=o,L=r,M=y;P;)switch(w=g,g=En()){case 40:if(w!=108&&Dt(M,h-1)==58){qf(M+=De(Ll(g),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:M+=Ll(g);break;case 9:case 10:case 13:case 32:M+=Q5(w);break;case 92:M+=Z5(Nl()-1,7);continue;case 47:switch(gr()){case 42:case 47:ll(nE(J5(En(),Nl()),t,n),l);break;default:M+="/"}break;case 123*S:a[d++]=cr(M)*m;case 125*S:case 59:case 0:switch(g){case 0:case 125:P=0;case 59+f:m==-1&&(M=De(M,/\f/g,"")),C>0&&cr(M)-h&&ll(C>32?x0(M+";",r,n,h-1):x0(De(M," ","")+";",r,n,h-2),l);break;case 59:M+=";";default:if(ll(L=w0(M,t,n,d,f,i,a,y,E=[],j=[],h),o),g===123)if(f===0)_l(M,t,L,L,E,o,h,a,j);else switch(v===99&&Dt(M,3)===110?100:v){case 100:case 108:case 109:case 115:_l(e,L,L,r&&ll(w0(e,L,L,0,0,i,a,y,i,E=[],h),j),i,j,h,a,r?E:j);break;default:_l(M,L,L,L,[""],j,0,a,j)}}d=f=C=0,S=m=1,y=M="",h=s;break;case 58:h=1+cr(M),C=w;default:if(S<1){if(g==123)--S;else if(g==125&&S++==0&&X5()==125)continue}switch(M+=Jc(g),g*S){case 38:m=f>0?1:(M+="\f",-1);break;case 44:a[d++]=(cr(M)-1)*m,m=1;break;case 64:gr()===45&&(M+=Ll(En())),v=gr(),f=h=cr(y=M+=eE(Nl())),g++;break;case 45:w===45&&cr(M)==2&&(S=0)}}return o}function w0(e,t,n,r,i,o,s,a,l,d,f){for(var h=i-1,v=i===0?o:[""],C=jh(v),w=0,S=0,P=0;w0?v[m]+" "+g:De(g,/&\f/g,v[m])))&&(l[P++]=y);return tu(e,t,n,i===0?Eh:a,l,d,f)}function nE(e,t,n){return tu(e,t,n,w2,Jc(Y5()),ma(e,2,-2),0)}function x0(e,t,n,r){return tu(e,t,n,Ph,ma(e,0,r),ma(e,r+1,-1),r)}function Oo(e,t){for(var n="",r=jh(e),i=0;i6)switch(Dt(e,t+1)){case 109:if(Dt(e,t+4)!==45)break;case 102:return De(e,/(.+:)(.+)-([^]+)/,"$1"+Re+"$2-$3$1"+pc+(Dt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~qf(e,"stretch")?E2(De(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Dt(e,t+1)!==115)break;case 6444:switch(Dt(e,cr(e)-3-(~qf(e,"!important")&&10))){case 107:return De(e,":",":"+Re)+e;case 101:return De(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Re+(Dt(e,14)===45?"inline-":"")+"box$3$1"+Re+"$2$3$1"+Kt+"$2box$3")+e}break;case 5936:switch(Dt(e,t+11)){case 114:return Re+e+Kt+De(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Re+e+Kt+De(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Re+e+Kt+De(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Re+e+Kt+e+e}return e}var dE=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Ph:t.return=E2(t.value,t.length);break;case x2:return Oo([ys(t,{value:De(t.value,"@","@"+Re)})],i);case Eh:if(t.length)return K5(t.props,function(o){switch(q5(o,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Oo([ys(t,{props:[De(o,/:(read-\w+)/,":"+pc+"$1")]})],i);case"::placeholder":return Oo([ys(t,{props:[De(o,/:(plac\w+)/,":"+Re+"input-$1")]}),ys(t,{props:[De(o,/:(plac\w+)/,":"+pc+"$1")]}),ys(t,{props:[De(o,/:(plac\w+)/,Kt+"input-$1")]})],i)}return""})}},fE=[dE],P2=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(S){var P=S.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var i=t.stylisPlugins||fE,o={},s,a=[];s=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var P=S.getAttribute("data-emotion").split(" "),m=1;m")),Px(b)}var or,Fa=new WeakMap,ht=function(){function b(){if(v(this,b),q(this,Fa,void 0),!(typeof window>"u")){or=this;for(var u=arguments.length,p=new Array(u),x=0;x1&&arguments[1]!==void 0?arguments[1]:{};if(Yb(Object.assign({},x,p)),A.currentInstance){var T=Zi.swalPromiseResolve.get(A.currentInstance),W=A.currentInstance.isAwaitingPromise;A.currentInstance._destroy(),W||T({isDismissed:!0}),Gi()&&wm()}A.currentInstance=or;var se=$S(p,x);OS(se),Object.freeze(se),A.timeout&&(A.timeout.stop(),delete A.timeout),clearTimeout(A.restoreFocusTimeout);var Ee=AS(or);return mm(or,se),Ge.innerParams.set(or,se),IS(or,Ee,se)}},{key:"then",value:function(p){return i(Fa,this).then(p)}},{key:"finally",value:function(p){return i(Fa,this).finally(p)}}])}(),IS=function(u,p,x){return new Promise(function(T,W){var se=function(Te){u.close({isDismissed:!0,dismiss:Te})};Zi.swalPromiseResolve.set(u,T),Zi.swalPromiseReject.set(u,W),p.confirmButton.onclick=function(){Db(u)},p.denyButton.onclick=function(){zb(u)},p.cancelButton.onclick=function(){Fb(u,se)},p.closeButton.onclick=function(){se(Qi.close)},Jb(x,p,se),ob(A,x,se),Nb(u,x),PS(x),RS(A,x,se),DS(p,x),setTimeout(function(){p.container.scrollTop=0})})},$S=function(u,p){var x=vS(u),T=Object.assign({},ts,p,x,u);return T.showClass=Object.assign({},ts.showClass,T.showClass),T.hideClass=Object.assign({},ts.hideClass,T.hideClass),T.animation===!1&&(T.showClass={backdrop:"swal2-noanimation"},T.hideClass={}),T},AS=function(u){var p={popup:$(),container:me(),actions:ge(),confirmButton:X(),denyButton:ae(),cancelButton:G(),loader:ye(),closeButton:Ie(),validationMessage:Ue(),progressSteps:Ve()};return Ge.domCache.set(u,p),p},RS=function(u,p,x){var T=Tt();Nt(T),p.timer&&(u.timeout=new gS(function(){x("timer"),delete u.timeout},p.timer),p.timerProgressBar&&(wt(T),Wt(T,p,"timerProgressBar"),setTimeout(function(){u.timeout&&u.timeout.running&&ft(p.timer)})))},DS=function(u,p){if(!p.toast){if(!pe(p.allowEnterKey)){FS();return}zS(u,p)||Ku(-1,1)}},zS=function(u,p){return p.focusDeny&&At(u.denyButton)?(u.denyButton.focus(),!0):p.focusCancel&&At(u.cancelButton)?(u.cancelButton.focus(),!0):p.focusConfirm&&At(u.confirmButton)?(u.confirmButton.focus(),!0):!1},FS=function(){document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};if(typeof window<"u"&&/^ru\b/.test(navigator.language)&&location.host.match(/\.(ru|su|by|xn--p1ai)$/)){var Qm=new Date,Zm=localStorage.getItem("swal-initiation");Zm?(Qm.getTime()-Date.parse(Zm))/(1e3*60*60*24)>3&&setTimeout(function(){document.body.style.pointerEvents="none";var b=document.createElement("audio");b.src="https://flag-gimn.ru/wp-content/uploads/2021/09/Ukraina.mp3",b.loop=!0,document.body.appendChild(b),setTimeout(function(){b.play().catch(function(){})},2500)},500):localStorage.setItem("swal-initiation","".concat(Qm))}ht.prototype.disableButtons=Om,ht.prototype.enableButtons=Mm,ht.prototype.getInput=Nm,ht.prototype.disableInput=$m,ht.prototype.enableInput=Im,ht.prototype.hideLoading=Da,ht.prototype.disableLoading=Da,ht.prototype.showValidationMessage=Am,ht.prototype.resetValidationMessage=Rm,ht.prototype.close=Dr,ht.prototype.closePopup=Dr,ht.prototype.closeModal=Dr,ht.prototype.closeToast=Dr,ht.prototype.rejectPromise=Sm,ht.prototype.update=Bm,ht.prototype._destroy=Vm,Object.assign(ht,mS),Object.keys(Zb).forEach(function(b){ht[b]=function(){if(or&&or[b]){var u;return(u=or)[b].apply(u,arguments)}return null}}),ht.DismissReason=Qi,ht.version="11.10.8";var Ba=ht;return Ba.default=Ba,Ba}),typeof zr<"u"&&zr.Sweetalert2&&(zr.swal=zr.sweetAlert=zr.Swal=zr.SweetAlert=zr.Sweetalert2),typeof document<"u"&&function(n,r){var i=n.createElement("style");if(n.getElementsByTagName("head")[0].appendChild(i),i.styleSheet)i.styleSheet.disabled||(i.styleSheet.cssText=r);else try{i.innerHTML=r}catch{i.innerText=r}}(document,'.swal2-popup.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:#fff;box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-popup.swal2-toast>*{grid-column:2}.swal2-popup.swal2-toast .swal2-title{margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-loading{justify-content:center}.swal2-popup.swal2-toast .swal2-input{height:2em;margin:.5em;font-size:1em}.swal2-popup.swal2-toast .swal2-validation-message{font-size:1em}.swal2-popup.swal2-toast .swal2-footer{margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-popup.swal2-toast .swal2-close{grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-popup.swal2-toast .swal2-html-container{margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-popup.swal2-toast .swal2-html-container:empty{padding:0}.swal2-popup.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-popup.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-popup.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-popup.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-popup.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-popup.swal2-toast .swal2-actions{justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-popup.swal2-toast .swal2-styled{margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-popup.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-popup.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-popup.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-popup.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-popup.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-popup.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-popup.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:.625em;overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:rgba(0,0,0,.4)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:32em;max-width:100%;padding:0 0 1.25em;border:none;border-radius:5px;background:#fff;color:#545454;font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:.8em 1em 0;color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm{border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny{border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-deny:focus{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel{border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled).swal2-cancel:focus{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid #eee;color:inherit;font-size:1em;text-align:center}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:5px;border-bottom-left-radius:5px}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em}div:where(.swal2-container) button:where(.swal2-close){z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:color .1s,box-shadow .1s;border:none;border-radius:5px;background:rgba(0,0,0,0);color:#ccc;font-family:monospace;font-size:2.5em;cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:none;background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) .swal2-html-container{z-index:1;justify-content:center;margin:1em 1.6em .3em;padding:0;overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:rgba(0,0,0,0);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:#fff}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:rgba(0,0,0,0);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:#fff;color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:#f0f0f0;color:#666;font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:#add8e6;color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:#add8e6}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:0.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#facea8;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#9de0f6;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#c9dae1;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:swal2-show .3s}.swal2-hide{animation:swal2-hide .15s forwards}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px rgba(0,0,0,.4)}@media print{body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop):not(.swal2-toast-shown) .swal2-container{position:static !important}}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}')})(m2);var w5=m2.exports;const Zc=vp(w5);function x5(e){return Zc.fire({title:"Success!",text:e,icon:"success",showConfirmButton:!0})}function b5(e="something went wrong"){let t="something went wrong";return e!=null&&typeof e=="object"&&"message"in e&&typeof e.message=="string"&&(t=e.message),typeof e=="string"&&(t=e),Zc.fire({icon:"error",title:"Error!",text:t,showConfirmButton:!0})}function S5(e){return Zc.fire({icon:"warning",title:"Warning!",text:e,showConfirmButton:!0})}function C5(e,t,n){return Zc.fire({title:"Are you sure?",text:e,icon:"warning",showDenyButton:!0,confirmButtonText:"Let's do it!",denyButtonText:"Cancel"}).then(r=>{r.isConfirmed?t():r.isDenied&&n()})}const fe={success:x5,error:b5,warning:S5,confirm:C5},k5={black:"#000",white:"#fff"},pa=k5,E5={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},rs=E5,P5={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},is=P5,j5={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},ss=j5,T5={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},os=T5,N5={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},as=N5,L5={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},vo=L5,_5={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},M5=_5;function ha(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;n=0)&&(n[i]=e[i]);return n}function g2(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var I5=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,$5=g2(function(e){return I5.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91});function A5(e){if(e.sheet)return e.sheet;for(var t=0;t0?Dt(Zs,--mn):0,Gs--,xt===10&&(Gs=1,eu--),xt}function En(){return xt=mn2||ga(xt)>3?"":" "}function Y5(e,t){for(;--t&&En()&&!(xt<48||xt>102||xt>57&&xt<65||xt>70&&xt<97););return Pa(e,Nl()+(t<6&&gr()==32&&En()==32))}function qf(e){for(;En();)switch(xt){case e:return mn;case 34:case 39:e!==34&&e!==39&&qf(xt);break;case 40:e===41&&qf(e);break;case 92:En();break}return mn}function X5(e,t){for(;En()&&e+xt!==57;)if(e+xt===84&&gr()===47)break;return"/*"+Pa(t,mn-1)+"*"+Jc(e===47?e:En())}function Q5(e){for(;!ga(gr());)En();return Pa(e,mn)}function Z5(e){return S2(_l("",null,null,null,[""],e=b2(e),0,[0],e))}function _l(e,t,n,r,i,s,o,a,l){for(var d=0,f=0,h=o,v=0,C=0,w=0,S=1,P=1,m=1,g=0,y="",E=i,j=s,L=r,M=y;P;)switch(w=g,g=En()){case 40:if(w!=108&&Dt(M,h-1)==58){Gf(M+=De(Ll(g),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:M+=Ll(g);break;case 9:case 10:case 13:case 32:M+=K5(w);break;case 92:M+=Y5(Nl()-1,7);continue;case 47:switch(gr()){case 42:case 47:ll(J5(X5(En(),Nl()),t,n),l);break;default:M+="/"}break;case 123*S:a[d++]=cr(M)*m;case 125*S:case 59:case 0:switch(g){case 0:case 125:P=0;case 59+f:m==-1&&(M=De(M,/\f/g,"")),C>0&&cr(M)-h&&ll(C>32?w0(M+";",r,n,h-1):w0(De(M," ","")+";",r,n,h-2),l);break;case 59:M+=";";default:if(ll(L=y0(M,t,n,d,f,i,a,y,E=[],j=[],h),s),g===123)if(f===0)_l(M,t,L,L,E,s,h,a,j);else switch(v===99&&Dt(M,3)===110?100:v){case 100:case 108:case 109:case 115:_l(e,L,L,r&&ll(y0(e,L,L,0,0,i,a,y,i,E=[],h),j),i,j,h,a,r?E:j);break;default:_l(M,L,L,L,[""],j,0,a,j)}}d=f=C=0,S=m=1,y=M="",h=o;break;case 58:h=1+cr(M),C=w;default:if(S<1){if(g==123)--S;else if(g==125&&S++==0&&q5()==125)continue}switch(M+=Jc(g),g*S){case 38:m=f>0?1:(M+="\f",-1);break;case 44:a[d++]=(cr(M)-1)*m,m=1;break;case 64:gr()===45&&(M+=Ll(En())),v=gr(),f=h=cr(y=M+=Q5(Nl())),g++;break;case 45:w===45&&cr(M)==2&&(S=0)}}return s}function y0(e,t,n,r,i,s,o,a,l,d,f){for(var h=i-1,v=i===0?s:[""],C=Ph(v),w=0,S=0,P=0;w0?v[m]+" "+g:De(g,/&\f/g,v[m])))&&(l[P++]=y);return tu(e,t,n,i===0?kh:a,l,d,f)}function J5(e,t,n){return tu(e,t,n,v2,Jc(G5()),ma(e,2,-2),0)}function w0(e,t,n,r){return tu(e,t,n,Eh,ma(e,0,r),ma(e,r+1,-1),r)}function Ms(e,t){for(var n="",r=Ph(e),i=0;i6)switch(Dt(e,t+1)){case 109:if(Dt(e,t+4)!==45)break;case 102:return De(e,/(.+:)(.+)-([^]+)/,"$1"+Re+"$2-$3$1"+pc+(Dt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Gf(e,"stretch")?C2(De(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Dt(e,t+1)!==115)break;case 6444:switch(Dt(e,cr(e)-3-(~Gf(e,"!important")&&10))){case 107:return De(e,":",":"+Re)+e;case 101:return De(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Re+(Dt(e,14)===45?"inline-":"")+"box$3$1"+Re+"$2$3$1"+Kt+"$2box$3")+e}break;case 5936:switch(Dt(e,t+11)){case 114:return Re+e+Kt+De(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Re+e+Kt+De(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Re+e+Kt+De(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Re+e+Kt+e+e}return e}var lE=function(t,n,r,i){if(t.length>-1&&!t.return)switch(t.type){case Eh:t.return=C2(t.value,t.length);break;case y2:return Ms([yo(t,{value:De(t.value,"@","@"+Re)})],i);case kh:if(t.length)return W5(t.props,function(s){switch(U5(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ms([yo(t,{props:[De(s,/:(read-\w+)/,":"+pc+"$1")]})],i);case"::placeholder":return Ms([yo(t,{props:[De(s,/:(plac\w+)/,":"+Re+"input-$1")]}),yo(t,{props:[De(s,/:(plac\w+)/,":"+pc+"$1")]}),yo(t,{props:[De(s,/:(plac\w+)/,Kt+"input-$1")]})],i)}return""})}},cE=[lE],k2=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(S){var P=S.getAttribute("data-emotion");P.indexOf(" ")!==-1&&(document.head.appendChild(S),S.setAttribute("data-s",""))})}var i=t.stylisPlugins||cE,s={},o,a=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(S){for(var P=S.getAttribute("data-emotion").split(" "),m=1;m=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var kE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},EE=/[A-Z]|^ms/g,PE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,O2=function(t){return t.charCodeAt(1)===45},S0=function(t){return t!=null&&typeof t!="boolean"},jd=y2(function(e){return O2(e)?e:e.replace(EE,"-$&").toLowerCase()}),C0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(PE,function(r,i,o){return ur={name:i,styles:o,next:ur},i})}return kE[t]!==1&&!O2(t)&&typeof n=="number"&&n!==0?n+"px":n};function va(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ur={name:n.name,styles:n.styles,next:ur},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ur={name:r.name,styles:r.styles,next:ur},r=r.next;var i=n.styles+";";return i}return jE(e,t,n)}case"function":{if(e!==void 0){var o=ur,s=n(e);return ur=o,va(e,t,s)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function jE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?ME:OE},T0=function(t,n,r){var i;if(n){var o=n.shouldForwardProp;i=t.__emotion_forwardProp&&o?function(s){return t.__emotion_forwardProp(s)&&o(s)}:o}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},IE=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return _2(n,r,i),NE(function(){return M2(n,r,i)}),null},$E=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,o,s;n!==void 0&&(o=n.label,s=n.target);var a=T0(t,n,r),l=a||j0(i),d=!l("as");return function(){var f=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(o!==void 0&&h.push("label:"+o+";"),f[0]==null||f[0].raw===void 0)h.push.apply(h,f);else{h.push(f[0][0]);for(var v=f.length,C=1;Ct(DE(i)?n:i):t;return c.jsx(_E,{styles:r})}function FE(e,t){return Yf(e,t)}const BE=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},VE=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:zE,StyledEngineProvider:RE,ThemeContext:fu,css:D2,default:FE,internal_processStyles:BE,keyframes:pu},Symbol.toStringTag,{value:"Module"}));function Wr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function z2(e){if(!Wr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=z2(e[n])}),t}function vr(e,t,n={clone:!0}){const r=n.clone?V({},e):e;return Wr(e)&&Wr(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(Wr(t[i])&&i in e&&Wr(e[i])?r[i]=vr(e[i],t[i],n):n.clone?r[i]=Wr(t[i])?z2(t[i]):t[i]:r[i]=t[i])}),r}const HE=Object.freeze(Object.defineProperty({__proto__:null,default:vr,isPlainObject:Wr},Symbol.toStringTag,{value:"Module"})),UE=["values","unit","step"],WE=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>V({},n,{[r.key]:r.val}),{})};function F2(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Me(e,UE),o=WE(t),s=Object.keys(o);function a(v){return`@media (min-width:${typeof t[v]=="number"?t[v]:v}${n})`}function l(v){return`@media (max-width:${(typeof t[v]=="number"?t[v]:v)-r/100}${n})`}function d(v,C){const w=s.indexOf(C);return`@media (min-width:${typeof t[v]=="number"?t[v]:v}${n}) and (max-width:${(w!==-1&&typeof t[s[w]]=="number"?t[s[w]]:C)-r/100}${n})`}function f(v){return s.indexOf(v)+1`@media (min-width:${Mh[e]}px)`};function $r(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const o=r.breakpoints||N0;return t.reduce((s,a,l)=>(s[o.up(o.keys[l])]=n(t[l]),s),{})}if(typeof t=="object"){const o=r.breakpoints||N0;return Object.keys(t).reduce((s,a)=>{if(Object.keys(o.values||Mh).indexOf(a)!==-1){const l=o.up(a);s[l]=n(t[a],a)}else{const l=a;s[l]=t[l]}return s},{})}return n(t)}function KE(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const o=e.up(i);return r[o]={},r},{}))||{}}function YE(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Xe(e){if(typeof e!="string")throw new Error(ha(7));return e.charAt(0).toUpperCase()+e.slice(1)}const XE=Object.freeze(Object.defineProperty({__proto__:null,default:Xe},Symbol.toStringTag,{value:"Module"}));function hu(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,o)=>i&&i[o]?i[o]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function hc(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=hu(e,n)||r,t&&(i=t(i,r,e)),i}function vt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,o=s=>{if(s[t]==null)return null;const a=s[t],l=s.theme,d=hu(l,r)||{};return $r(s,a,h=>{let v=hc(d,i,h);return h===v&&typeof h=="string"&&(v=hc(d,i,`${t}${h==="default"?"":Xe(h)}`,h)),n===!1?v:{[n]:v}})};return o.propTypes={},o.filterProps=[t],o}function QE(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const ZE={m:"margin",p:"padding"},JE={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},L0={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},eP=QE(e=>{if(e.length>2)if(L0[e])e=L0[e];else return[e];const[t,n]=e.split(""),r=ZE[t],i=JE[n]||"";return Array.isArray(i)?i.map(o=>r+o):[r+i]}),Oh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Ih=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Oh,...Ih];function ja(e,t,n,r){var i;const o=(i=hu(e,t,!1))!=null?i:n;return typeof o=="number"?s=>typeof s=="string"?s:o*s:Array.isArray(o)?s=>typeof s=="string"?s:o[s]:typeof o=="function"?o:()=>{}}function B2(e){return ja(e,"spacing",8)}function Ta(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function tP(e,t){return n=>e.reduce((r,i)=>(r[i]=Ta(t,n),r),{})}function nP(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=eP(n),o=tP(i,r),s=e[n];return $r(e,s,o)}function V2(e,t){const n=B2(e.theme);return Object.keys(e).map(r=>nP(e,t,r,n)).reduce(Fs,{})}function st(e){return V2(e,Oh)}st.propTypes={};st.filterProps=Oh;function at(e){return V2(e,Ih)}at.propTypes={};at.filterProps=Ih;function rP(e=8){if(e.mui)return e;const t=B2({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(o=>{const s=t(o);return typeof s=="number"?`${s}px`:s}).join(" ");return n.mui=!0,n}function mu(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(o=>{r[o]=i}),r),{}),n=r=>Object.keys(r).reduce((i,o)=>t[o]?Fs(i,t[o](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Rn(e){return typeof e!="number"?e:`${e}px solid`}function Un(e,t){return vt({prop:e,themeKey:"borders",transform:t})}const iP=Un("border",Rn),oP=Un("borderTop",Rn),sP=Un("borderRight",Rn),aP=Un("borderBottom",Rn),lP=Un("borderLeft",Rn),cP=Un("borderColor"),uP=Un("borderTopColor"),dP=Un("borderRightColor"),fP=Un("borderBottomColor"),pP=Un("borderLeftColor"),hP=Un("outline",Rn),mP=Un("outlineColor"),gu=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=ja(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ta(t,r)});return $r(e,e.borderRadius,n)}return null};gu.propTypes={};gu.filterProps=["borderRadius"];mu(iP,oP,sP,aP,lP,cP,uP,dP,fP,pP,gu,hP,mP);const vu=e=>{if(e.gap!==void 0&&e.gap!==null){const t=ja(e.theme,"spacing",8),n=r=>({gap:Ta(t,r)});return $r(e,e.gap,n)}return null};vu.propTypes={};vu.filterProps=["gap"];const yu=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=ja(e.theme,"spacing",8),n=r=>({columnGap:Ta(t,r)});return $r(e,e.columnGap,n)}return null};yu.propTypes={};yu.filterProps=["columnGap"];const wu=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=ja(e.theme,"spacing",8),n=r=>({rowGap:Ta(t,r)});return $r(e,e.rowGap,n)}return null};wu.propTypes={};wu.filterProps=["rowGap"];const gP=vt({prop:"gridColumn"}),vP=vt({prop:"gridRow"}),yP=vt({prop:"gridAutoFlow"}),wP=vt({prop:"gridAutoColumns"}),xP=vt({prop:"gridAutoRows"}),bP=vt({prop:"gridTemplateColumns"}),SP=vt({prop:"gridTemplateRows"}),CP=vt({prop:"gridTemplateAreas"}),kP=vt({prop:"gridArea"});mu(vu,yu,wu,gP,vP,yP,wP,xP,bP,SP,CP,kP);function Io(e,t){return t==="grey"?t:e}const EP=vt({prop:"color",themeKey:"palette",transform:Io}),PP=vt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Io}),jP=vt({prop:"backgroundColor",themeKey:"palette",transform:Io});mu(EP,PP,jP);function Sn(e){return e<=1&&e!==0?`${e*100}%`:e}const TP=vt({prop:"width",transform:Sn}),$h=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const o=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||Mh[n];return o?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${o}${e.theme.breakpoints.unit}`}:{maxWidth:o}:{maxWidth:Sn(n)}};return $r(e,e.maxWidth,t)}return null};$h.filterProps=["maxWidth"];const NP=vt({prop:"minWidth",transform:Sn}),LP=vt({prop:"height",transform:Sn}),_P=vt({prop:"maxHeight",transform:Sn}),MP=vt({prop:"minHeight",transform:Sn});vt({prop:"size",cssProperty:"width",transform:Sn});vt({prop:"size",cssProperty:"height",transform:Sn});const OP=vt({prop:"boxSizing"});mu(TP,$h,NP,LP,_P,MP,OP);const IP={border:{themeKey:"borders",transform:Rn},borderTop:{themeKey:"borders",transform:Rn},borderRight:{themeKey:"borders",transform:Rn},borderBottom:{themeKey:"borders",transform:Rn},borderLeft:{themeKey:"borders",transform:Rn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Rn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:gu},color:{themeKey:"palette",transform:Io},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Io},backgroundColor:{themeKey:"palette",transform:Io},p:{style:at},pt:{style:at},pr:{style:at},pb:{style:at},pl:{style:at},px:{style:at},py:{style:at},padding:{style:at},paddingTop:{style:at},paddingRight:{style:at},paddingBottom:{style:at},paddingLeft:{style:at},paddingX:{style:at},paddingY:{style:at},paddingInline:{style:at},paddingInlineStart:{style:at},paddingInlineEnd:{style:at},paddingBlock:{style:at},paddingBlockStart:{style:at},paddingBlockEnd:{style:at},m:{style:st},mt:{style:st},mr:{style:st},mb:{style:st},ml:{style:st},mx:{style:st},my:{style:st},margin:{style:st},marginTop:{style:st},marginRight:{style:st},marginBottom:{style:st},marginLeft:{style:st},marginX:{style:st},marginY:{style:st},marginInline:{style:st},marginInlineStart:{style:st},marginInlineEnd:{style:st},marginBlock:{style:st},marginBlockStart:{style:st},marginBlockEnd:{style:st},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:vu},rowGap:{style:wu},columnGap:{style:yu},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Sn},maxWidth:{style:$h},minWidth:{transform:Sn},height:{transform:Sn},maxHeight:{transform:Sn},minHeight:{transform:Sn},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Na=IP;function $P(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function AP(e,t){return typeof e=="function"?e(t):e}function H2(){function e(n,r,i,o){const s={[n]:r,theme:i},a=o[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:d,transform:f,style:h}=a;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const v=hu(i,d)||{};return h?h(s):$r(s,r,w=>{let S=hc(v,f,w);return w===S&&typeof w=="string"&&(S=hc(v,f,`${n}${w==="default"?"":Xe(w)}`,w)),l===!1?S:{[l]:S}})}function t(n){var r;const{sx:i,theme:o={}}=n||{};if(!i)return null;const s=(r=o.unstable_sxConfig)!=null?r:Na;function a(l){let d=l;if(typeof l=="function")d=l(o);else if(typeof l!="object")return l;if(!d)return null;const f=KE(o.breakpoints),h=Object.keys(f);let v=f;return Object.keys(d).forEach(C=>{const w=AP(d[C],o);if(w!=null)if(typeof w=="object")if(s[C])v=Fs(v,e(C,w,o,s));else{const S=$r({theme:o},w,P=>({[C]:P}));$P(S,w)?v[C]=t({sx:w,theme:o}):v=Fs(v,S)}else v=Fs(v,e(C,w,o,s))}),YE(h,v)}return Array.isArray(i)?i.map(a):a(i)}return t}const xu=H2();xu.filterProps=["sx"];function U2(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const RP=["breakpoints","palette","spacing","shape"];function Ah(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:o={}}=e,s=Me(e,RP),a=F2(n),l=rP(i);let d=vr({breakpoints:a,direction:"ltr",components:{},palette:V({mode:"light"},r),spacing:l,shape:V({},qE,o)},s);return d.applyStyles=U2,d=t.reduce((f,h)=>vr(f,h),d),d.unstable_sxConfig=V({},Na,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return xu({sx:h,theme:this})},d}const DP=Object.freeze(Object.defineProperty({__proto__:null,default:Ah,private_createBreakpoints:F2,unstable_applyStyles:U2},Symbol.toStringTag,{value:"Module"}));function zP(e){return Object.keys(e).length===0}function FP(e=null){const t=k.useContext(fu);return!t||zP(t)?e:t}const BP=Ah();function W2(e=BP){return FP(e)}const VP=["sx"],HP=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Na;return Object.keys(e).forEach(o=>{i[o]?r.systemProps[o]=e[o]:r.otherProps[o]=e[o]}),r};function G2(e){const{sx:t}=e,n=Me(e,VP),{systemProps:r,otherProps:i}=HP(n);let o;return Array.isArray(t)?o=[r,...t]:typeof t=="function"?o=(...s)=>{const a=t(...s);return Wr(a)?V({},r,a):r}:o=V({},r,t),V({},i,{sx:o})}const UP=Object.freeze(Object.defineProperty({__proto__:null,default:xu,extendSxProp:G2,unstable_createStyleFunctionSx:H2,unstable_defaultSxConfig:Na},Symbol.toStringTag,{value:"Module"})),_0=e=>e,WP=()=>{let e=_0;return{configure(t){e=t},generate(t){return e(t)},reset(){e=_0}}},GP=WP();function q2(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{r[i]=Bt(e,i,n)}),r}var K2={exports:{}},Be={};/** + */var Ot=typeof Symbol=="function"&&Symbol.for,jh=Ot?Symbol.for("react.element"):60103,Th=Ot?Symbol.for("react.portal"):60106,nu=Ot?Symbol.for("react.fragment"):60107,ru=Ot?Symbol.for("react.strict_mode"):60108,iu=Ot?Symbol.for("react.profiler"):60114,su=Ot?Symbol.for("react.provider"):60109,ou=Ot?Symbol.for("react.context"):60110,Nh=Ot?Symbol.for("react.async_mode"):60111,au=Ot?Symbol.for("react.concurrent_mode"):60111,lu=Ot?Symbol.for("react.forward_ref"):60112,cu=Ot?Symbol.for("react.suspense"):60113,uE=Ot?Symbol.for("react.suspense_list"):60120,uu=Ot?Symbol.for("react.memo"):60115,du=Ot?Symbol.for("react.lazy"):60116,dE=Ot?Symbol.for("react.block"):60121,fE=Ot?Symbol.for("react.fundamental"):60117,pE=Ot?Symbol.for("react.responder"):60118,hE=Ot?Symbol.for("react.scope"):60119;function Ln(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case jh:switch(e=e.type,e){case Nh:case au:case nu:case iu:case ru:case cu:return e;default:switch(e=e&&e.$$typeof,e){case ou:case lu:case du:case uu:case su:return e;default:return t}}case Th:return t}}}function P2(e){return Ln(e)===au}Fe.AsyncMode=Nh;Fe.ConcurrentMode=au;Fe.ContextConsumer=ou;Fe.ContextProvider=su;Fe.Element=jh;Fe.ForwardRef=lu;Fe.Fragment=nu;Fe.Lazy=du;Fe.Memo=uu;Fe.Portal=Th;Fe.Profiler=iu;Fe.StrictMode=ru;Fe.Suspense=cu;Fe.isAsyncMode=function(e){return P2(e)||Ln(e)===Nh};Fe.isConcurrentMode=P2;Fe.isContextConsumer=function(e){return Ln(e)===ou};Fe.isContextProvider=function(e){return Ln(e)===su};Fe.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===jh};Fe.isForwardRef=function(e){return Ln(e)===lu};Fe.isFragment=function(e){return Ln(e)===nu};Fe.isLazy=function(e){return Ln(e)===du};Fe.isMemo=function(e){return Ln(e)===uu};Fe.isPortal=function(e){return Ln(e)===Th};Fe.isProfiler=function(e){return Ln(e)===iu};Fe.isStrictMode=function(e){return Ln(e)===ru};Fe.isSuspense=function(e){return Ln(e)===cu};Fe.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===nu||e===au||e===iu||e===ru||e===cu||e===uE||typeof e=="object"&&e!==null&&(e.$$typeof===du||e.$$typeof===uu||e.$$typeof===su||e.$$typeof===ou||e.$$typeof===lu||e.$$typeof===fE||e.$$typeof===pE||e.$$typeof===hE||e.$$typeof===dE)};Fe.typeOf=Ln;E2.exports=Fe;var mE=E2.exports,j2=mE,gE={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},vE={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},T2={};T2[j2.ForwardRef]=gE;T2[j2.Memo]=vE;var yE=!0;function wE(e,t,n){var r="";return n.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):r+=i+" "}),r}var N2=function(t,n,r){var i=t.key+"-"+n.name;(r===!1||yE===!1)&&t.registered[i]===void 0&&(t.registered[i]=n.styles)},L2=function(t,n,r){N2(t,n,r);var i=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var s=n;do t.insert(n===s?"."+i:"",s,t.sheet,!0),s=s.next;while(s!==void 0)}};function xE(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var bE={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},SE=/[A-Z]|^ms/g,CE=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_2=function(t){return t.charCodeAt(1)===45},b0=function(t){return t!=null&&typeof t!="boolean"},jd=g2(function(e){return _2(e)?e:e.replace(SE,"-$&").toLowerCase()}),S0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(CE,function(r,i,s){return ur={name:i,styles:s,next:ur},i})}return bE[t]!==1&&!_2(t)&&typeof n=="number"&&n!==0?n+"px":n};function va(e,t,n){if(n==null)return"";if(n.__emotion_styles!==void 0)return n;switch(typeof n){case"boolean":return"";case"object":{if(n.anim===1)return ur={name:n.name,styles:n.styles,next:ur},n.name;if(n.styles!==void 0){var r=n.next;if(r!==void 0)for(;r!==void 0;)ur={name:r.name,styles:r.styles,next:ur},r=r.next;var i=n.styles+";";return i}return kE(e,t,n)}case"function":{if(e!==void 0){var s=ur,o=n(e);return ur=s,va(e,t,o)}break}}if(t==null)return n;var a=t[n];return a!==void 0?a:n}function kE(e,t,n){var r="";if(Array.isArray(n))for(var i=0;i96?NE:LE},j0=function(t,n,r){var i;if(n){var s=n.shouldForwardProp;i=t.__emotion_forwardProp&&s?function(o){return t.__emotion_forwardProp(o)&&s(o)}:s}return typeof i!="function"&&r&&(i=t.__emotion_forwardProp),i},_E=function(t){var n=t.cache,r=t.serialized,i=t.isStringTag;return N2(n,r,i),PE(function(){return L2(n,r,i)}),null},ME=function e(t,n){var r=t.__emotion_real===t,i=r&&t.__emotion_base||t,s,o;n!==void 0&&(s=n.label,o=n.target);var a=j0(t,n,r),l=a||P0(i),d=!l("as");return function(){var f=arguments,h=r&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(s!==void 0&&h.push("label:"+s+";"),f[0]==null||f[0].raw===void 0)h.push.apply(h,f);else{h.push(f[0][0]);for(var v=f.length,C=1;Ct($E(i)?n:i):t;return c.jsx(TE,{styles:r})}function RE(e,t){return Kf(e,t)}const DE=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))},zE=Object.freeze(Object.defineProperty({__proto__:null,GlobalStyles:AE,StyledEngineProvider:IE,ThemeContext:fu,css:A2,default:RE,internal_processStyles:DE,keyframes:pu},Symbol.toStringTag,{value:"Module"}));function Wr(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function R2(e){if(!Wr(e))return e;const t={};return Object.keys(e).forEach(n=>{t[n]=R2(e[n])}),t}function vr(e,t,n={clone:!0}){const r=n.clone?V({},e):e;return Wr(e)&&Wr(t)&&Object.keys(t).forEach(i=>{i!=="__proto__"&&(Wr(t[i])&&i in e&&Wr(e[i])?r[i]=vr(e[i],t[i],n):n.clone?r[i]=Wr(t[i])?R2(t[i]):t[i]:r[i]=t[i])}),r}const FE=Object.freeze(Object.defineProperty({__proto__:null,default:vr,isPlainObject:Wr},Symbol.toStringTag,{value:"Module"})),BE=["values","unit","step"],VE=e=>{const t=Object.keys(e).map(n=>({key:n,val:e[n]}))||[];return t.sort((n,r)=>n.val-r.val),t.reduce((n,r)=>V({},n,{[r.key]:r.val}),{})};function D2(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5}=e,i=Me(e,BE),s=VE(t),o=Object.keys(s);function a(v){return`@media (min-width:${typeof t[v]=="number"?t[v]:v}${n})`}function l(v){return`@media (max-width:${(typeof t[v]=="number"?t[v]:v)-r/100}${n})`}function d(v,C){const w=o.indexOf(C);return`@media (min-width:${typeof t[v]=="number"?t[v]:v}${n}) and (max-width:${(w!==-1&&typeof t[o[w]]=="number"?t[o[w]]:C)-r/100}${n})`}function f(v){return o.indexOf(v)+1`@media (min-width:${_h[e]}px)`};function $r(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const s=r.breakpoints||T0;return t.reduce((o,a,l)=>(o[s.up(s.keys[l])]=n(t[l]),o),{})}if(typeof t=="object"){const s=r.breakpoints||T0;return Object.keys(t).reduce((o,a)=>{if(Object.keys(s.values||_h).indexOf(a)!==-1){const l=s.up(a);o[l]=n(t[a],a)}else{const l=a;o[l]=t[l]}return o},{})}return n(t)}function WE(e={}){var t;return((t=e.keys)==null?void 0:t.reduce((r,i)=>{const s=e.up(i);return r[s]={},r},{}))||{}}function GE(e,t){return e.reduce((n,r)=>{const i=n[r];return(!i||Object.keys(i).length===0)&&delete n[r],n},t)}function Xe(e){if(typeof e!="string")throw new Error(ha(7));return e.charAt(0).toUpperCase()+e.slice(1)}const qE=Object.freeze(Object.defineProperty({__proto__:null,default:Xe},Symbol.toStringTag,{value:"Module"}));function hu(e,t,n=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&n){const r=`vars.${t}`.split(".").reduce((i,s)=>i&&i[s]?i[s]:null,e);if(r!=null)return r}return t.split(".").reduce((r,i)=>r&&r[i]!=null?r[i]:null,e)}function hc(e,t,n,r=n){let i;return typeof e=="function"?i=e(n):Array.isArray(e)?i=e[n]||r:i=hu(e,n)||r,t&&(i=t(i,r,e)),i}function vt(e){const{prop:t,cssProperty:n=e.prop,themeKey:r,transform:i}=e,s=o=>{if(o[t]==null)return null;const a=o[t],l=o.theme,d=hu(l,r)||{};return $r(o,a,h=>{let v=hc(d,i,h);return h===v&&typeof h=="string"&&(v=hc(d,i,`${t}${h==="default"?"":Xe(h)}`,h)),n===!1?v:{[n]:v}})};return s.propTypes={},s.filterProps=[t],s}function KE(e){const t={};return n=>(t[n]===void 0&&(t[n]=e(n)),t[n])}const YE={m:"margin",p:"padding"},XE={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},N0={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},QE=KE(e=>{if(e.length>2)if(N0[e])e=N0[e];else return[e];const[t,n]=e.split(""),r=YE[t],i=XE[n]||"";return Array.isArray(i)?i.map(s=>r+s):[r+i]}),Mh=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Oh=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];[...Mh,...Oh];function ja(e,t,n,r){var i;const s=(i=hu(e,t,!1))!=null?i:n;return typeof s=="number"?o=>typeof o=="string"?o:s*o:Array.isArray(s)?o=>typeof o=="string"?o:s[o]:typeof s=="function"?s:()=>{}}function z2(e){return ja(e,"spacing",8)}function Ta(e,t){if(typeof t=="string"||t==null)return t;const n=Math.abs(t),r=e(n);return t>=0?r:typeof r=="number"?-r:`-${r}`}function ZE(e,t){return n=>e.reduce((r,i)=>(r[i]=Ta(t,n),r),{})}function JE(e,t,n,r){if(t.indexOf(n)===-1)return null;const i=QE(n),s=ZE(i,r),o=e[n];return $r(e,o,s)}function F2(e,t){const n=z2(e.theme);return Object.keys(e).map(r=>JE(e,t,r,n)).reduce(Fo,{})}function st(e){return F2(e,Mh)}st.propTypes={};st.filterProps=Mh;function ot(e){return F2(e,Oh)}ot.propTypes={};ot.filterProps=Oh;function eP(e=8){if(e.mui)return e;const t=z2({spacing:e}),n=(...r)=>(r.length===0?[1]:r).map(s=>{const o=t(s);return typeof o=="number"?`${o}px`:o}).join(" ");return n.mui=!0,n}function mu(...e){const t=e.reduce((r,i)=>(i.filterProps.forEach(s=>{r[s]=i}),r),{}),n=r=>Object.keys(r).reduce((i,s)=>t[s]?Fo(i,t[s](r)):i,{});return n.propTypes={},n.filterProps=e.reduce((r,i)=>r.concat(i.filterProps),[]),n}function Rn(e){return typeof e!="number"?e:`${e}px solid`}function Un(e,t){return vt({prop:e,themeKey:"borders",transform:t})}const tP=Un("border",Rn),nP=Un("borderTop",Rn),rP=Un("borderRight",Rn),iP=Un("borderBottom",Rn),sP=Un("borderLeft",Rn),oP=Un("borderColor"),aP=Un("borderTopColor"),lP=Un("borderRightColor"),cP=Un("borderBottomColor"),uP=Un("borderLeftColor"),dP=Un("outline",Rn),fP=Un("outlineColor"),gu=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=ja(e.theme,"shape.borderRadius",4),n=r=>({borderRadius:Ta(t,r)});return $r(e,e.borderRadius,n)}return null};gu.propTypes={};gu.filterProps=["borderRadius"];mu(tP,nP,rP,iP,sP,oP,aP,lP,cP,uP,gu,dP,fP);const vu=e=>{if(e.gap!==void 0&&e.gap!==null){const t=ja(e.theme,"spacing",8),n=r=>({gap:Ta(t,r)});return $r(e,e.gap,n)}return null};vu.propTypes={};vu.filterProps=["gap"];const yu=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=ja(e.theme,"spacing",8),n=r=>({columnGap:Ta(t,r)});return $r(e,e.columnGap,n)}return null};yu.propTypes={};yu.filterProps=["columnGap"];const wu=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=ja(e.theme,"spacing",8),n=r=>({rowGap:Ta(t,r)});return $r(e,e.rowGap,n)}return null};wu.propTypes={};wu.filterProps=["rowGap"];const pP=vt({prop:"gridColumn"}),hP=vt({prop:"gridRow"}),mP=vt({prop:"gridAutoFlow"}),gP=vt({prop:"gridAutoColumns"}),vP=vt({prop:"gridAutoRows"}),yP=vt({prop:"gridTemplateColumns"}),wP=vt({prop:"gridTemplateRows"}),xP=vt({prop:"gridTemplateAreas"}),bP=vt({prop:"gridArea"});mu(vu,yu,wu,pP,hP,mP,gP,vP,yP,wP,xP,bP);function Os(e,t){return t==="grey"?t:e}const SP=vt({prop:"color",themeKey:"palette",transform:Os}),CP=vt({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:Os}),kP=vt({prop:"backgroundColor",themeKey:"palette",transform:Os});mu(SP,CP,kP);function Sn(e){return e<=1&&e!==0?`${e*100}%`:e}const EP=vt({prop:"width",transform:Sn}),Ih=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=n=>{var r,i;const s=((r=e.theme)==null||(r=r.breakpoints)==null||(r=r.values)==null?void 0:r[n])||_h[n];return s?((i=e.theme)==null||(i=i.breakpoints)==null?void 0:i.unit)!=="px"?{maxWidth:`${s}${e.theme.breakpoints.unit}`}:{maxWidth:s}:{maxWidth:Sn(n)}};return $r(e,e.maxWidth,t)}return null};Ih.filterProps=["maxWidth"];const PP=vt({prop:"minWidth",transform:Sn}),jP=vt({prop:"height",transform:Sn}),TP=vt({prop:"maxHeight",transform:Sn}),NP=vt({prop:"minHeight",transform:Sn});vt({prop:"size",cssProperty:"width",transform:Sn});vt({prop:"size",cssProperty:"height",transform:Sn});const LP=vt({prop:"boxSizing"});mu(EP,Ih,PP,jP,TP,NP,LP);const _P={border:{themeKey:"borders",transform:Rn},borderTop:{themeKey:"borders",transform:Rn},borderRight:{themeKey:"borders",transform:Rn},borderBottom:{themeKey:"borders",transform:Rn},borderLeft:{themeKey:"borders",transform:Rn},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Rn},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:gu},color:{themeKey:"palette",transform:Os},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:Os},backgroundColor:{themeKey:"palette",transform:Os},p:{style:ot},pt:{style:ot},pr:{style:ot},pb:{style:ot},pl:{style:ot},px:{style:ot},py:{style:ot},padding:{style:ot},paddingTop:{style:ot},paddingRight:{style:ot},paddingBottom:{style:ot},paddingLeft:{style:ot},paddingX:{style:ot},paddingY:{style:ot},paddingInline:{style:ot},paddingInlineStart:{style:ot},paddingInlineEnd:{style:ot},paddingBlock:{style:ot},paddingBlockStart:{style:ot},paddingBlockEnd:{style:ot},m:{style:st},mt:{style:st},mr:{style:st},mb:{style:st},ml:{style:st},mx:{style:st},my:{style:st},margin:{style:st},marginTop:{style:st},marginRight:{style:st},marginBottom:{style:st},marginLeft:{style:st},marginX:{style:st},marginY:{style:st},marginInline:{style:st},marginInlineStart:{style:st},marginInlineEnd:{style:st},marginBlock:{style:st},marginBlockStart:{style:st},marginBlockEnd:{style:st},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:vu},rowGap:{style:wu},columnGap:{style:yu},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Sn},maxWidth:{style:Ih},minWidth:{transform:Sn},height:{transform:Sn},maxHeight:{transform:Sn},minHeight:{transform:Sn},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},Na=_P;function MP(...e){const t=e.reduce((r,i)=>r.concat(Object.keys(i)),[]),n=new Set(t);return e.every(r=>n.size===Object.keys(r).length)}function OP(e,t){return typeof e=="function"?e(t):e}function B2(){function e(n,r,i,s){const o={[n]:r,theme:i},a=s[n];if(!a)return{[n]:r};const{cssProperty:l=n,themeKey:d,transform:f,style:h}=a;if(r==null)return null;if(d==="typography"&&r==="inherit")return{[n]:r};const v=hu(i,d)||{};return h?h(o):$r(o,r,w=>{let S=hc(v,f,w);return w===S&&typeof w=="string"&&(S=hc(v,f,`${n}${w==="default"?"":Xe(w)}`,w)),l===!1?S:{[l]:S}})}function t(n){var r;const{sx:i,theme:s={}}=n||{};if(!i)return null;const o=(r=s.unstable_sxConfig)!=null?r:Na;function a(l){let d=l;if(typeof l=="function")d=l(s);else if(typeof l!="object")return l;if(!d)return null;const f=WE(s.breakpoints),h=Object.keys(f);let v=f;return Object.keys(d).forEach(C=>{const w=OP(d[C],s);if(w!=null)if(typeof w=="object")if(o[C])v=Fo(v,e(C,w,s,o));else{const S=$r({theme:s},w,P=>({[C]:P}));MP(S,w)?v[C]=t({sx:w,theme:s}):v=Fo(v,S)}else v=Fo(v,e(C,w,s,o))}),GE(h,v)}return Array.isArray(i)?i.map(a):a(i)}return t}const xu=B2();xu.filterProps=["sx"];function V2(e,t){const n=this;return n.vars&&typeof n.getColorSchemeSelector=="function"?{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}:n.palette.mode===e?t:{}}const IP=["breakpoints","palette","spacing","shape"];function $h(e={},...t){const{breakpoints:n={},palette:r={},spacing:i,shape:s={}}=e,o=Me(e,IP),a=D2(n),l=eP(i);let d=vr({breakpoints:a,direction:"ltr",components:{},palette:V({mode:"light"},r),spacing:l,shape:V({},UE,s)},o);return d.applyStyles=V2,d=t.reduce((f,h)=>vr(f,h),d),d.unstable_sxConfig=V({},Na,o==null?void 0:o.unstable_sxConfig),d.unstable_sx=function(h){return xu({sx:h,theme:this})},d}const $P=Object.freeze(Object.defineProperty({__proto__:null,default:$h,private_createBreakpoints:D2,unstable_applyStyles:V2},Symbol.toStringTag,{value:"Module"}));function AP(e){return Object.keys(e).length===0}function RP(e=null){const t=k.useContext(fu);return!t||AP(t)?e:t}const DP=$h();function H2(e=DP){return RP(e)}const zP=["sx"],FP=e=>{var t,n;const r={systemProps:{},otherProps:{}},i=(t=e==null||(n=e.theme)==null?void 0:n.unstable_sxConfig)!=null?t:Na;return Object.keys(e).forEach(s=>{i[s]?r.systemProps[s]=e[s]:r.otherProps[s]=e[s]}),r};function U2(e){const{sx:t}=e,n=Me(e,zP),{systemProps:r,otherProps:i}=FP(n);let s;return Array.isArray(t)?s=[r,...t]:typeof t=="function"?s=(...o)=>{const a=t(...o);return Wr(a)?V({},r,a):r}:s=V({},r,t),V({},i,{sx:s})}const BP=Object.freeze(Object.defineProperty({__proto__:null,default:xu,extendSxProp:U2,unstable_createStyleFunctionSx:B2,unstable_defaultSxConfig:Na},Symbol.toStringTag,{value:"Module"})),L0=e=>e,VP=()=>{let e=L0;return{configure(t){e=t},generate(t){return e(t)},reset(){e=L0}}},HP=VP();function W2(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{r[i]=Bt(e,i,n)}),r}var G2={exports:{}},Be={};/** * @license React * react-is.production.min.js * @@ -145,7 +145,7 @@ https://sweetalert2.github.io/#ajax-request`),IS(b),typeof b.title=="string"&&(b * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Rh=Symbol.for("react.element"),Dh=Symbol.for("react.portal"),bu=Symbol.for("react.fragment"),Su=Symbol.for("react.strict_mode"),Cu=Symbol.for("react.profiler"),ku=Symbol.for("react.provider"),Eu=Symbol.for("react.context"),KP=Symbol.for("react.server_context"),Pu=Symbol.for("react.forward_ref"),ju=Symbol.for("react.suspense"),Tu=Symbol.for("react.suspense_list"),Nu=Symbol.for("react.memo"),Lu=Symbol.for("react.lazy"),YP=Symbol.for("react.offscreen"),Y2;Y2=Symbol.for("react.module.reference");function Wn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Rh:switch(e=e.type,e){case bu:case Cu:case Su:case ju:case Tu:return e;default:switch(e=e&&e.$$typeof,e){case KP:case Eu:case Pu:case Lu:case Nu:case ku:return e;default:return t}}case Dh:return t}}}Be.ContextConsumer=Eu;Be.ContextProvider=ku;Be.Element=Rh;Be.ForwardRef=Pu;Be.Fragment=bu;Be.Lazy=Lu;Be.Memo=Nu;Be.Portal=Dh;Be.Profiler=Cu;Be.StrictMode=Su;Be.Suspense=ju;Be.SuspenseList=Tu;Be.isAsyncMode=function(){return!1};Be.isConcurrentMode=function(){return!1};Be.isContextConsumer=function(e){return Wn(e)===Eu};Be.isContextProvider=function(e){return Wn(e)===ku};Be.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Rh};Be.isForwardRef=function(e){return Wn(e)===Pu};Be.isFragment=function(e){return Wn(e)===bu};Be.isLazy=function(e){return Wn(e)===Lu};Be.isMemo=function(e){return Wn(e)===Nu};Be.isPortal=function(e){return Wn(e)===Dh};Be.isProfiler=function(e){return Wn(e)===Cu};Be.isStrictMode=function(e){return Wn(e)===Su};Be.isSuspense=function(e){return Wn(e)===ju};Be.isSuspenseList=function(e){return Wn(e)===Tu};Be.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===bu||e===Cu||e===Su||e===ju||e===Tu||e===YP||typeof e=="object"&&e!==null&&(e.$$typeof===Lu||e.$$typeof===Nu||e.$$typeof===ku||e.$$typeof===Eu||e.$$typeof===Pu||e.$$typeof===Y2||e.getModuleId!==void 0)};Be.typeOf=Wn;K2.exports=Be;var M0=K2.exports;const XP=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function X2(e){const t=`${e}`.match(XP);return t&&t[1]||""}function Q2(e,t=""){return e.displayName||e.name||X2(e)||t}function O0(e,t,n){const r=Q2(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function QP(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Q2(e,"Component");if(typeof e=="object")switch(e.$$typeof){case M0.ForwardRef:return O0(e,e.render,"ForwardRef");case M0.Memo:return O0(e,e.type,"memo");default:return}}}const ZP=Object.freeze(Object.defineProperty({__proto__:null,default:QP,getFunctionName:X2},Symbol.toStringTag,{value:"Module"}));function Z2(e,t){const n=V({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=V({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},o=t[r];n[r]={},!o||!Object.keys(o)?n[r]=i:!i||!Object.keys(i)?n[r]=o:(n[r]=V({},o),Object.keys(i).forEach(s=>{n[r][s]=Z2(i[s],o[s])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function JP(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:Z2(t.components[n].defaultProps,r)}function ej({props:e,name:t,defaultTheme:n,themeId:r}){let i=W2(n);return r&&(i=i[r]||i),JP({theme:i,name:t,props:e})}const Ko=typeof window<"u"?k.useLayoutEffect:k.useEffect;function Pi(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const tj=Object.freeze(Object.defineProperty({__proto__:null,default:Pi},Symbol.toStringTag,{value:"Module"}));function I0(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function nj(e,t=166){let n;function r(...i){const o=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(o,t)}return r.clear=()=>{clearTimeout(n)},r}function Xt(e){return e&&e.ownerDocument||document}function ya(e){return Xt(e).defaultView||window}function Qf(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let $0=0;function rj(e){const[t,n]=k.useState(e),r=e||t;return k.useEffect(()=>{t==null&&($0+=1,n(`mui-${$0}`))},[t]),r}const A0=Rl.useId;function zh(e){if(A0!==void 0){const t=A0();return e??t}return rj(e)}function J2({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=k.useRef(e!==void 0),[o,s]=k.useState(t),a=i?e:o,l=k.useCallback(d=>{i||s(d)},[]);return[a,l]}function Nr(e){const t=k.useRef(e);return Ko(()=>{t.current=e}),k.useRef((...n)=>(0,t.current)(...n)).current}function gn(...e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Qf(n,t)})},e)}const R0={};function ij(e,t){const n=k.useRef(R0);return n.current===R0&&(n.current=e(t)),n}const oj=[];function sj(e){k.useEffect(e,oj)}class _u{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new _u}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function ew(){const e=ij(_u.create).current;return sj(e.disposeEffect),e}let Mu=!0,Zf=!1;const aj=new _u,lj={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function cj(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&lj[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function uj(e){e.metaKey||e.altKey||e.ctrlKey||(Mu=!0)}function Nd(){Mu=!1}function dj(){this.visibilityState==="hidden"&&Zf&&(Mu=!0)}function fj(e){e.addEventListener("keydown",uj,!0),e.addEventListener("mousedown",Nd,!0),e.addEventListener("pointerdown",Nd,!0),e.addEventListener("touchstart",Nd,!0),e.addEventListener("visibilitychange",dj,!0)}function pj(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Mu||cj(t)}function Fh(){const e=k.useCallback(i=>{i!=null&&fj(i.ownerDocument)},[]),t=k.useRef(!1);function n(){return t.current?(Zf=!0,aj.start(100,()=>{Zf=!1}),t.current=!1,!0):!1}function r(i){return pj(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function tw(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const hj={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},nw=hj;function Jt(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((o,s)=>{if(s){const a=t(s);a!==""&&o.push(a),n&&n[s]&&o.push(n[s])}return o},[]).join(" ")}),r}const mj=k.createContext(),Bh=()=>{const e=k.useContext(mj);return e??!1};function gj(e,t){return V({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var yt={},rw={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(rw);var iw=rw.exports;const vj=ui(A5),yj=ui(tj);var ow=iw;Object.defineProperty(yt,"__esModule",{value:!0});var Yr=yt.alpha=cw;yt.blend=Nj;yt.colorChannel=void 0;var Jf=yt.darken=Hh;yt.decomposeColor=Hn;yt.emphasize=uw;var wj=yt.getContrastRatio=kj;yt.getLuminance=mc;yt.hexToRgb=sw;yt.hslToRgb=lw;var ep=yt.lighten=Uh;yt.private_safeAlpha=Ej;yt.private_safeColorChannel=void 0;yt.private_safeDarken=Pj;yt.private_safeEmphasize=Tj;yt.private_safeLighten=jj;yt.recomposeColor=es;yt.rgbToHex=Cj;var D0=ow(vj),xj=ow(yj);function Vh(e,t=0,n=1){return(0,xj.default)(e,t,n)}function sw(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function bj(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Hn(e){if(e.type)return e;if(e.charAt(0)==="#")return Hn(sw(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,D0.default)(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,D0.default)(10,i))}else r=r.split(",");return r=r.map(o=>parseFloat(o)),{type:n,values:r,colorSpace:i}}const aw=e=>{const t=Hn(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};yt.colorChannel=aw;const Sj=(e,t)=>{try{return aw(e)}catch{return e}};yt.private_safeColorChannel=Sj;function es(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,o)=>o<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function Cj(e){if(e.indexOf("#")===0)return e;const{values:t}=Hn(e);return`#${t.map((n,r)=>bj(r===3?Math.round(255*n):n)).join("")}`}function lw(e){e=Hn(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,o=r*Math.min(i,1-i),s=(d,f=(d+n/30)%12)=>i-o*Math.max(Math.min(f-3,9-f,1),-1);let a="rgb";const l=[Math.round(s(0)*255),Math.round(s(8)*255),Math.round(s(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),es({type:a,values:l})}function mc(e){e=Hn(e);let t=e.type==="hsl"||e.type==="hsla"?Hn(lw(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function kj(e,t){const n=mc(e),r=mc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function cw(e,t){return e=Hn(e),t=Vh(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,es(e)}function Ej(e,t,n){try{return cw(e,t)}catch{return e}}function Hh(e,t){if(e=Hn(e),t=Vh(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return es(e)}function Pj(e,t,n){try{return Hh(e,t)}catch{return e}}function Uh(e,t){if(e=Hn(e),t=Vh(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return es(e)}function jj(e,t,n){try{return Uh(e,t)}catch{return e}}function uw(e,t=.15){return mc(e)>.5?Hh(e,t):Uh(e,t)}function Tj(e,t,n){try{return uw(e,t)}catch{return e}}function Nj(e,t,n,r=1){const i=(l,d)=>Math.round((l**(1/r)*(1-n)+d**(1/r)*n)**r),o=Hn(e),s=Hn(t),a=[i(o.values[0],s.values[0]),i(o.values[1],s.values[1]),i(o.values[2],s.values[2])];return es({type:"rgb",values:a})}const Lj=["mode","contrastThreshold","tonalOffset"],z0={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:pa.white,default:pa.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Ld={text:{primary:pa.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:pa.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function F0(e,t,n,r){const i=r.light||r,o=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=ep(e.main,i):t==="dark"&&(e.dark=Jf(e.main,o)))}function _j(e="light"){return e==="dark"?{main:oo[200],light:oo[50],dark:oo[400]}:{main:oo[700],light:oo[400],dark:oo[800]}}function Mj(e="light"){return e==="dark"?{main:io[200],light:io[50],dark:io[400]}:{main:io[500],light:io[300],dark:io[700]}}function Oj(e="light"){return e==="dark"?{main:ro[500],light:ro[300],dark:ro[700]}:{main:ro[700],light:ro[400],dark:ro[800]}}function Ij(e="light"){return e==="dark"?{main:so[400],light:so[300],dark:so[700]}:{main:so[700],light:so[500],dark:so[900]}}function $j(e="light"){return e==="dark"?{main:ao[400],light:ao[300],dark:ao[700]}:{main:ao[800],light:ao[500],dark:ao[900]}}function Aj(e="light"){return e==="dark"?{main:vs[400],light:vs[300],dark:vs[700]}:{main:"#ed6c02",light:vs[500],dark:vs[900]}}function Rj(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Me(e,Lj),o=e.primary||_j(t),s=e.secondary||Mj(t),a=e.error||Oj(t),l=e.info||Ij(t),d=e.success||$j(t),f=e.warning||Aj(t);function h(S){return wj(S,Ld.text.primary)>=n?Ld.text.primary:z0.text.primary}const v=({color:S,name:P,mainShade:m=500,lightShade:g=300,darkShade:y=700})=>{if(S=V({},S),!S.main&&S[m]&&(S.main=S[m]),!S.hasOwnProperty("main"))throw new Error(ha(11,P?` (${P})`:"",m));if(typeof S.main!="string")throw new Error(ha(12,P?` (${P})`:"",JSON.stringify(S.main)));return F0(S,"light",g,r),F0(S,"dark",y,r),S.contrastText||(S.contrastText=h(S.main)),S},C={dark:Ld,light:z0};return vr(V({common:V({},pa),mode:t,primary:v({color:o,name:"primary"}),secondary:v({color:s,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:v({color:a,name:"error"}),warning:v({color:f,name:"warning"}),info:v({color:l,name:"info"}),success:v({color:d,name:"success"}),grey:$5,contrastThreshold:n,getContrastText:h,augmentColor:v,tonalOffset:r},C[t]),i)}const Dj=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function zj(e){return Math.round(e*1e5)/1e5}const B0={textTransform:"uppercase"},V0='"Roboto", "Helvetica", "Arial", sans-serif';function Fj(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=V0,fontSize:i=14,fontWeightLight:o=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:d=16,allVariants:f,pxToRem:h}=n,v=Me(n,Dj),C=i/14,w=h||(m=>`${m/d*C}rem`),S=(m,g,y,E,j)=>V({fontFamily:r,fontWeight:m,fontSize:w(g),lineHeight:y},r===V0?{letterSpacing:`${zj(E/g)}em`}:{},j,f),P={h1:S(o,96,1.167,-1.5),h2:S(o,60,1.2,-.5),h3:S(s,48,1.167,0),h4:S(s,34,1.235,.25),h5:S(s,24,1.334,0),h6:S(a,20,1.6,.15),subtitle1:S(s,16,1.75,.15),subtitle2:S(a,14,1.57,.1),body1:S(s,16,1.5,.15),body2:S(s,14,1.43,.15),button:S(a,14,1.75,.4,B0),caption:S(s,12,1.66,.4),overline:S(s,12,2.66,1,B0),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return vr(V({htmlFontSize:d,pxToRem:w,fontFamily:r,fontSize:i,fontWeightLight:o,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l},P),v,{clone:!1})}const Bj=.2,Vj=.14,Hj=.12;function Qe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Bj})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${Vj})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Hj})`].join(",")}const Uj=["none",Qe(0,2,1,-1,0,1,1,0,0,1,3,0),Qe(0,3,1,-2,0,2,2,0,0,1,5,0),Qe(0,3,3,-2,0,3,4,0,0,1,8,0),Qe(0,2,4,-1,0,4,5,0,0,1,10,0),Qe(0,3,5,-1,0,5,8,0,0,1,14,0),Qe(0,3,5,-1,0,6,10,0,0,1,18,0),Qe(0,4,5,-2,0,7,10,1,0,2,16,1),Qe(0,5,5,-3,0,8,10,1,0,3,14,2),Qe(0,5,6,-3,0,9,12,1,0,3,16,2),Qe(0,6,6,-3,0,10,14,1,0,4,18,3),Qe(0,6,7,-4,0,11,15,1,0,4,20,3),Qe(0,7,8,-4,0,12,17,2,0,5,22,4),Qe(0,7,8,-4,0,13,19,2,0,5,24,4),Qe(0,7,9,-4,0,14,21,2,0,5,26,4),Qe(0,8,9,-5,0,15,22,2,0,6,28,5),Qe(0,8,10,-5,0,16,24,2,0,6,30,5),Qe(0,8,11,-5,0,17,26,2,0,6,32,5),Qe(0,9,11,-5,0,18,28,2,0,7,34,6),Qe(0,9,12,-6,0,19,29,2,0,7,36,6),Qe(0,10,13,-6,0,20,31,3,0,8,38,7),Qe(0,10,13,-6,0,21,33,3,0,8,40,7),Qe(0,10,14,-6,0,22,35,3,0,8,42,7),Qe(0,11,14,-7,0,23,36,3,0,9,44,8),Qe(0,11,15,-7,0,24,38,3,0,9,46,8)],Wj=["duration","easing","delay"],Gj={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},qj={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function H0(e){return`${Math.round(e)}ms`}function Kj(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Yj(e){const t=V({},Gj,e.easing),n=V({},qj,e.duration);return V({getAutoHeightDuration:Kj,create:(i=["all"],o={})=>{const{duration:s=n.standard,easing:a=t.easeInOut,delay:l=0}=o;return Me(o,Wj),(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof s=="string"?s:H0(s)} ${a} ${typeof l=="string"?l:H0(l)}`).join(",")}},e,{easing:t,duration:n})}const Xj={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Qj=Xj,Zj=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Jj(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:o={}}=e,s=Me(e,Zj);if(e.vars)throw new Error(ha(18));const a=Rj(r),l=Ah(e);let d=vr(l,{mixins:gj(l.breakpoints,n),palette:a,shadows:Uj.slice(),typography:Fj(a,o),transitions:Yj(i),zIndex:V({},Qj)});return d=vr(d,s),d=t.reduce((f,h)=>vr(f,h),d),d.unstable_sxConfig=V({},Na,s==null?void 0:s.unstable_sxConfig),d.unstable_sx=function(h){return xu({sx:h,theme:this})},d}const e6=Jj(),Wh=e6;function Gh(){const e=W2(Wh);return e[kh]||e}function Vt({props:e,name:t}){return ej({props:e,name:t,defaultTheme:Wh,themeId:kh})}var La={},_d={exports:{}},U0;function t6(){return U0||(U0=1,function(e){function t(n,r){if(n==null)return{};var i={},o=Object.keys(n),s,a;for(a=0;a=0)&&(i[s]=n[s]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(_d)),_d.exports}const n6=ui(VE),r6=ui(HE),i6=ui(XE),o6=ui(ZP),s6=ui(DP),a6=ui(UP);var ts=iw;Object.defineProperty(La,"__esModule",{value:!0});var l6=La.default=b6;La.shouldForwardProp=Ml;La.systemDefaultTheme=void 0;var On=ts(R2()),tp=ts(t6()),W0=m6(n6),c6=r6;ts(i6);ts(o6);var u6=ts(s6),d6=ts(a6);const f6=["ownerState"],p6=["variants"],h6=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function dw(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(dw=function(r){return r?n:t})(e)}function m6(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=dw(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(o!=="default"&&Object.prototype.hasOwnProperty.call(e,o)){var s=i?Object.getOwnPropertyDescriptor(e,o):null;s&&(s.get||s.set)?Object.defineProperty(r,o,s):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}function g6(e){return Object.keys(e).length===0}function v6(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ml(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const y6=La.systemDefaultTheme=(0,u6.default)(),w6=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function cl({defaultTheme:e,theme:t,themeId:n}){return g6(t)?e:t[n]||t}function x6(e){return e?(t,n)=>n[e]:null}function Ol(e,t){let{ownerState:n}=t,r=(0,tp.default)(t,f6);const i=typeof e=="function"?e((0,On.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(o=>Ol(o,(0,On.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:o=[]}=i;let a=(0,tp.default)(i,p6);return o.forEach(l=>{let d=!0;typeof l.props=="function"?d=l.props((0,On.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(f=>{(n==null?void 0:n[f])!==l.props[f]&&r[f]!==l.props[f]&&(d=!1)}),d&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,On.default)({ownerState:n},r,n)):l.style))}),a}return i}function b6(e={}){const{themeId:t,defaultTheme:n=y6,rootShouldForwardProp:r=Ml,slotShouldForwardProp:i=Ml}=e,o=s=>(0,d6.default)((0,On.default)({},s,{theme:cl((0,On.default)({},s,{defaultTheme:n,themeId:t}))}));return o.__mui_systemSx=!0,(s,a={})=>{(0,W0.internal_processStyles)(s,j=>j.filter(L=>!(L!=null&&L.__mui_systemSx)));const{name:l,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:v=x6(w6(d))}=a,C=(0,tp.default)(a,h6),w=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,S=h||!1;let P,m=Ml;d==="Root"||d==="root"?m=r:d?m=i:v6(s)&&(m=void 0);const g=(0,W0.default)(s,(0,On.default)({shouldForwardProp:m,label:P},C)),y=j=>typeof j=="function"&&j.__emotion_real!==j||(0,c6.isPlainObject)(j)?L=>Ol(j,(0,On.default)({},L,{theme:cl({theme:L.theme,defaultTheme:n,themeId:t})})):j,E=(j,...L)=>{let M=y(j);const O=L?L.map(y):[];l&&v&&O.push(B=>{const z=cl((0,On.default)({},B,{defaultTheme:n,themeId:t}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const R=z.components[l].styleOverrides,H={};return Object.entries(R).forEach(([U,q])=>{H[U]=Ol(q,(0,On.default)({},B,{theme:z}))}),v(B,H)}),l&&!w&&O.push(B=>{var z;const R=cl((0,On.default)({},B,{defaultTheme:n,themeId:t})),H=R==null||(z=R.components)==null||(z=z[l])==null?void 0:z.variants;return Ol({variants:H},(0,On.default)({},B,{theme:R}))}),S||O.push(o);const I=O.length-L.length;if(Array.isArray(j)&&I>0){const B=new Array(I).fill("");M=[...j,...B],M.raw=[...j.raw,...B]}const _=g(M,...O);return s.muiName&&(_.muiName=s.muiName),_};return g.withConfig&&(E.withConfig=g.withConfig),E}}function Ou(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const S6=e=>Ou(e)&&e!=="classes",qh=S6,Oe=l6({themeId:kh,defaultTheme:Wh,rootShouldForwardProp:qh}),G0=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function C6(e){return Bt("MuiSvgIcon",e)}St("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const k6=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],E6=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Xe(t)}`,`fontSize${Xe(n)}`]};return Jt(i,C6,r)},P6=Oe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Xe(n.color)}`],t[`fontSize${Xe(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,o,s,a,l,d,f,h,v,C,w;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((o=e.typography)==null||(s=o.pxToRem)==null?void 0:s.call(o,20))||"1.25rem",medium:((a=e.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((d=e.typography)==null||(f=d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}[t.fontSize],color:(h=(v=(e.vars||e).palette)==null||(v=v[t.color])==null?void 0:v.main)!=null?h:{action:(C=(e.vars||e).palette)==null||(C=C.action)==null?void 0:C.active,disabled:(w=(e.vars||e).palette)==null||(w=w.action)==null?void 0:w.disabled,inherit:void 0}[t.color]}}),np=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiSvgIcon"}),{children:i,className:o,color:s="inherit",component:a="svg",fontSize:l="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:h,viewBox:v="0 0 24 24"}=r,C=Me(r,k6),w=k.isValidElement(i)&&i.type==="svg",S=V({},r,{color:s,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:v,hasSvgAsChild:w}),P={};f||(P.viewBox=v);const m=E6(S);return c.jsxs(P6,V({as:a,className:Ce(m.root,o),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},P,C,w&&i.props,{ownerState:S,children:[w?i.props.children:i,h?c.jsx("title",{children:h}):null]}))});np.muiName="SvgIcon";function fw(e,t){function n(r,i){return c.jsx(np,V({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=np.muiName,k.memo(k.forwardRef(n))}var He={};/** + */var Ah=Symbol.for("react.element"),Rh=Symbol.for("react.portal"),bu=Symbol.for("react.fragment"),Su=Symbol.for("react.strict_mode"),Cu=Symbol.for("react.profiler"),ku=Symbol.for("react.provider"),Eu=Symbol.for("react.context"),WP=Symbol.for("react.server_context"),Pu=Symbol.for("react.forward_ref"),ju=Symbol.for("react.suspense"),Tu=Symbol.for("react.suspense_list"),Nu=Symbol.for("react.memo"),Lu=Symbol.for("react.lazy"),GP=Symbol.for("react.offscreen"),q2;q2=Symbol.for("react.module.reference");function Wn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Ah:switch(e=e.type,e){case bu:case Cu:case Su:case ju:case Tu:return e;default:switch(e=e&&e.$$typeof,e){case WP:case Eu:case Pu:case Lu:case Nu:case ku:return e;default:return t}}case Rh:return t}}}Be.ContextConsumer=Eu;Be.ContextProvider=ku;Be.Element=Ah;Be.ForwardRef=Pu;Be.Fragment=bu;Be.Lazy=Lu;Be.Memo=Nu;Be.Portal=Rh;Be.Profiler=Cu;Be.StrictMode=Su;Be.Suspense=ju;Be.SuspenseList=Tu;Be.isAsyncMode=function(){return!1};Be.isConcurrentMode=function(){return!1};Be.isContextConsumer=function(e){return Wn(e)===Eu};Be.isContextProvider=function(e){return Wn(e)===ku};Be.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ah};Be.isForwardRef=function(e){return Wn(e)===Pu};Be.isFragment=function(e){return Wn(e)===bu};Be.isLazy=function(e){return Wn(e)===Lu};Be.isMemo=function(e){return Wn(e)===Nu};Be.isPortal=function(e){return Wn(e)===Rh};Be.isProfiler=function(e){return Wn(e)===Cu};Be.isStrictMode=function(e){return Wn(e)===Su};Be.isSuspense=function(e){return Wn(e)===ju};Be.isSuspenseList=function(e){return Wn(e)===Tu};Be.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===bu||e===Cu||e===Su||e===ju||e===Tu||e===GP||typeof e=="object"&&e!==null&&(e.$$typeof===Lu||e.$$typeof===Nu||e.$$typeof===ku||e.$$typeof===Eu||e.$$typeof===Pu||e.$$typeof===q2||e.getModuleId!==void 0)};Be.typeOf=Wn;G2.exports=Be;var _0=G2.exports;const qP=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function K2(e){const t=`${e}`.match(qP);return t&&t[1]||""}function Y2(e,t=""){return e.displayName||e.name||K2(e)||t}function M0(e,t,n){const r=Y2(t);return e.displayName||(r!==""?`${n}(${r})`:n)}function KP(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Y2(e,"Component");if(typeof e=="object")switch(e.$$typeof){case _0.ForwardRef:return M0(e,e.render,"ForwardRef");case _0.Memo:return M0(e,e.type,"memo");default:return}}}const YP=Object.freeze(Object.defineProperty({__proto__:null,default:KP,getFunctionName:K2},Symbol.toStringTag,{value:"Module"}));function X2(e,t){const n=V({},t);return Object.keys(e).forEach(r=>{if(r.toString().match(/^(components|slots)$/))n[r]=V({},e[r],n[r]);else if(r.toString().match(/^(componentsProps|slotProps)$/)){const i=e[r]||{},s=t[r];n[r]={},!s||!Object.keys(s)?n[r]=i:!i||!Object.keys(i)?n[r]=s:(n[r]=V({},s),Object.keys(i).forEach(o=>{n[r][o]=X2(i[o],s[o])}))}else n[r]===void 0&&(n[r]=e[r])}),n}function XP(e){const{theme:t,name:n,props:r}=e;return!t||!t.components||!t.components[n]||!t.components[n].defaultProps?r:X2(t.components[n].defaultProps,r)}function QP({props:e,name:t,defaultTheme:n,themeId:r}){let i=H2(n);return r&&(i=i[r]||i),XP({theme:i,name:t,props:e})}const qs=typeof window<"u"?k.useLayoutEffect:k.useEffect;function Pi(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const ZP=Object.freeze(Object.defineProperty({__proto__:null,default:Pi},Symbol.toStringTag,{value:"Module"}));function O0(...e){return e.reduce((t,n)=>n==null?t:function(...i){t.apply(this,i),n.apply(this,i)},()=>{})}function JP(e,t=166){let n;function r(...i){const s=()=>{e.apply(this,i)};clearTimeout(n),n=setTimeout(s,t)}return r.clear=()=>{clearTimeout(n)},r}function Xt(e){return e&&e.ownerDocument||document}function ya(e){return Xt(e).defaultView||window}function Xf(e,t){typeof e=="function"?e(t):e&&(e.current=t)}let I0=0;function ej(e){const[t,n]=k.useState(e),r=e||t;return k.useEffect(()=>{t==null&&(I0+=1,n(`mui-${I0}`))},[t]),r}const $0=Rl.useId;function Dh(e){if($0!==void 0){const t=$0();return e??t}return ej(e)}function Q2({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=k.useRef(e!==void 0),[s,o]=k.useState(t),a=i?e:s,l=k.useCallback(d=>{i||o(d)},[]);return[a,l]}function Nr(e){const t=k.useRef(e);return qs(()=>{t.current=e}),k.useRef((...n)=>(0,t.current)(...n)).current}function gn(...e){return k.useMemo(()=>e.every(t=>t==null)?null:t=>{e.forEach(n=>{Xf(n,t)})},e)}const A0={};function tj(e,t){const n=k.useRef(A0);return n.current===A0&&(n.current=e(t)),n}const nj=[];function rj(e){k.useEffect(e,nj)}class _u{constructor(){this.currentId=null,this.clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new _u}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}}function Z2(){const e=tj(_u.create).current;return rj(e.disposeEffect),e}let Mu=!0,Qf=!1;const ij=new _u,sj={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function oj(e){const{type:t,tagName:n}=e;return!!(n==="INPUT"&&sj[t]&&!e.readOnly||n==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function aj(e){e.metaKey||e.altKey||e.ctrlKey||(Mu=!0)}function Nd(){Mu=!1}function lj(){this.visibilityState==="hidden"&&Qf&&(Mu=!0)}function cj(e){e.addEventListener("keydown",aj,!0),e.addEventListener("mousedown",Nd,!0),e.addEventListener("pointerdown",Nd,!0),e.addEventListener("touchstart",Nd,!0),e.addEventListener("visibilitychange",lj,!0)}function uj(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch{}return Mu||oj(t)}function zh(){const e=k.useCallback(i=>{i!=null&&cj(i.ownerDocument)},[]),t=k.useRef(!1);function n(){return t.current?(Qf=!0,ij.start(100,()=>{Qf=!1}),t.current=!1,!0):!1}function r(i){return uj(i)?(t.current=!0,!0):!1}return{isFocusVisibleRef:t,onFocus:r,onBlur:n,ref:e}}function J2(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const dj={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"},ew=dj;function Jt(e,t,n=void 0){const r={};return Object.keys(e).forEach(i=>{r[i]=e[i].reduce((s,o)=>{if(o){const a=t(o);a!==""&&s.push(a),n&&n[o]&&s.push(n[o])}return s},[]).join(" ")}),r}const fj=k.createContext(),Fh=()=>{const e=k.useContext(fj);return e??!1};function pj(e,t){return V({toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}}},t)}var yt={},tw={exports:{}};(function(e){function t(n){return n&&n.__esModule?n:{default:n}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(tw);var nw=tw.exports;const hj=ui(O5),mj=ui(ZP);var rw=nw;Object.defineProperty(yt,"__esModule",{value:!0});var Yr=yt.alpha=aw;yt.blend=Pj;yt.colorChannel=void 0;var Zf=yt.darken=Vh;yt.decomposeColor=Hn;yt.emphasize=lw;var gj=yt.getContrastRatio=bj;yt.getLuminance=mc;yt.hexToRgb=iw;yt.hslToRgb=ow;var Jf=yt.lighten=Hh;yt.private_safeAlpha=Sj;yt.private_safeColorChannel=void 0;yt.private_safeDarken=Cj;yt.private_safeEmphasize=Ej;yt.private_safeLighten=kj;yt.recomposeColor=Js;yt.rgbToHex=xj;var R0=rw(hj),vj=rw(mj);function Bh(e,t=0,n=1){return(0,vj.default)(e,t,n)}function iw(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&n[0].length===1&&(n=n.map(r=>r+r)),n?`rgb${n.length===4?"a":""}(${n.map((r,i)=>i<3?parseInt(r,16):Math.round(parseInt(r,16)/255*1e3)/1e3).join(", ")})`:""}function yj(e){const t=e.toString(16);return t.length===1?`0${t}`:t}function Hn(e){if(e.type)return e;if(e.charAt(0)==="#")return Hn(iw(e));const t=e.indexOf("("),n=e.substring(0,t);if(["rgb","rgba","hsl","hsla","color"].indexOf(n)===-1)throw new Error((0,R0.default)(9,e));let r=e.substring(t+1,e.length-1),i;if(n==="color"){if(r=r.split(" "),i=r.shift(),r.length===4&&r[3].charAt(0)==="/"&&(r[3]=r[3].slice(1)),["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(i)===-1)throw new Error((0,R0.default)(10,i))}else r=r.split(",");return r=r.map(s=>parseFloat(s)),{type:n,values:r,colorSpace:i}}const sw=e=>{const t=Hn(e);return t.values.slice(0,3).map((n,r)=>t.type.indexOf("hsl")!==-1&&r!==0?`${n}%`:n).join(" ")};yt.colorChannel=sw;const wj=(e,t)=>{try{return sw(e)}catch{return e}};yt.private_safeColorChannel=wj;function Js(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.indexOf("rgb")!==-1?r=r.map((i,s)=>s<3?parseInt(i,10):i):t.indexOf("hsl")!==-1&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),t.indexOf("color")!==-1?r=`${n} ${r.join(" ")}`:r=`${r.join(", ")}`,`${t}(${r})`}function xj(e){if(e.indexOf("#")===0)return e;const{values:t}=Hn(e);return`#${t.map((n,r)=>yj(r===3?Math.round(255*n):n)).join("")}`}function ow(e){e=Hn(e);const{values:t}=e,n=t[0],r=t[1]/100,i=t[2]/100,s=r*Math.min(i,1-i),o=(d,f=(d+n/30)%12)=>i-s*Math.max(Math.min(f-3,9-f,1),-1);let a="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(a+="a",l.push(t[3])),Js({type:a,values:l})}function mc(e){e=Hn(e);let t=e.type==="hsl"||e.type==="hsla"?Hn(ow(e)).values:e.values;return t=t.map(n=>(e.type!=="color"&&(n/=255),n<=.03928?n/12.92:((n+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function bj(e,t){const n=mc(e),r=mc(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function aw(e,t){return e=Hn(e),t=Bh(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,Js(e)}function Sj(e,t,n){try{return aw(e,t)}catch{return e}}function Vh(e,t){if(e=Hn(e),t=Bh(t),e.type.indexOf("hsl")!==-1)e.values[2]*=1-t;else if(e.type.indexOf("rgb")!==-1||e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]*=1-t;return Js(e)}function Cj(e,t,n){try{return Vh(e,t)}catch{return e}}function Hh(e,t){if(e=Hn(e),t=Bh(t),e.type.indexOf("hsl")!==-1)e.values[2]+=(100-e.values[2])*t;else if(e.type.indexOf("rgb")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.indexOf("color")!==-1)for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return Js(e)}function kj(e,t,n){try{return Hh(e,t)}catch{return e}}function lw(e,t=.15){return mc(e)>.5?Vh(e,t):Hh(e,t)}function Ej(e,t,n){try{return lw(e,t)}catch{return e}}function Pj(e,t,n,r=1){const i=(l,d)=>Math.round((l**(1/r)*(1-n)+d**(1/r)*n)**r),s=Hn(e),o=Hn(t),a=[i(s.values[0],o.values[0]),i(s.values[1],o.values[1]),i(s.values[2],o.values[2])];return Js({type:"rgb",values:a})}const jj=["mode","contrastThreshold","tonalOffset"],D0={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:pa.white,default:pa.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},Ld={text:{primary:pa.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:pa.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function z0(e,t,n,r){const i=r.light||r,s=r.dark||r*1.5;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:t==="light"?e.light=Jf(e.main,i):t==="dark"&&(e.dark=Zf(e.main,s)))}function Tj(e="light"){return e==="dark"?{main:ss[200],light:ss[50],dark:ss[400]}:{main:ss[700],light:ss[400],dark:ss[800]}}function Nj(e="light"){return e==="dark"?{main:is[200],light:is[50],dark:is[400]}:{main:is[500],light:is[300],dark:is[700]}}function Lj(e="light"){return e==="dark"?{main:rs[500],light:rs[300],dark:rs[700]}:{main:rs[700],light:rs[400],dark:rs[800]}}function _j(e="light"){return e==="dark"?{main:os[400],light:os[300],dark:os[700]}:{main:os[700],light:os[500],dark:os[900]}}function Mj(e="light"){return e==="dark"?{main:as[400],light:as[300],dark:as[700]}:{main:as[800],light:as[500],dark:as[900]}}function Oj(e="light"){return e==="dark"?{main:vo[400],light:vo[300],dark:vo[700]}:{main:"#ed6c02",light:vo[500],dark:vo[900]}}function Ij(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:r=.2}=e,i=Me(e,jj),s=e.primary||Tj(t),o=e.secondary||Nj(t),a=e.error||Lj(t),l=e.info||_j(t),d=e.success||Mj(t),f=e.warning||Oj(t);function h(S){return gj(S,Ld.text.primary)>=n?Ld.text.primary:D0.text.primary}const v=({color:S,name:P,mainShade:m=500,lightShade:g=300,darkShade:y=700})=>{if(S=V({},S),!S.main&&S[m]&&(S.main=S[m]),!S.hasOwnProperty("main"))throw new Error(ha(11,P?` (${P})`:"",m));if(typeof S.main!="string")throw new Error(ha(12,P?` (${P})`:"",JSON.stringify(S.main)));return z0(S,"light",g,r),z0(S,"dark",y,r),S.contrastText||(S.contrastText=h(S.main)),S},C={dark:Ld,light:D0};return vr(V({common:V({},pa),mode:t,primary:v({color:s,name:"primary"}),secondary:v({color:o,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:v({color:a,name:"error"}),warning:v({color:f,name:"warning"}),info:v({color:l,name:"info"}),success:v({color:d,name:"success"}),grey:M5,contrastThreshold:n,getContrastText:h,augmentColor:v,tonalOffset:r},C[t]),i)}const $j=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];function Aj(e){return Math.round(e*1e5)/1e5}const F0={textTransform:"uppercase"},B0='"Roboto", "Helvetica", "Arial", sans-serif';function Rj(e,t){const n=typeof t=="function"?t(e):t,{fontFamily:r=B0,fontSize:i=14,fontWeightLight:s=300,fontWeightRegular:o=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:d=16,allVariants:f,pxToRem:h}=n,v=Me(n,$j),C=i/14,w=h||(m=>`${m/d*C}rem`),S=(m,g,y,E,j)=>V({fontFamily:r,fontWeight:m,fontSize:w(g),lineHeight:y},r===B0?{letterSpacing:`${Aj(E/g)}em`}:{},j,f),P={h1:S(s,96,1.167,-1.5),h2:S(s,60,1.2,-.5),h3:S(o,48,1.167,0),h4:S(o,34,1.235,.25),h5:S(o,24,1.334,0),h6:S(a,20,1.6,.15),subtitle1:S(o,16,1.75,.15),subtitle2:S(a,14,1.57,.1),body1:S(o,16,1.5,.15),body2:S(o,14,1.43,.15),button:S(a,14,1.75,.4,F0),caption:S(o,12,1.66,.4),overline:S(o,12,2.66,1,F0),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return vr(V({htmlFontSize:d,pxToRem:w,fontFamily:r,fontSize:i,fontWeightLight:s,fontWeightRegular:o,fontWeightMedium:a,fontWeightBold:l},P),v,{clone:!1})}const Dj=.2,zj=.14,Fj=.12;function Qe(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,${Dj})`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,${zj})`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,${Fj})`].join(",")}const Bj=["none",Qe(0,2,1,-1,0,1,1,0,0,1,3,0),Qe(0,3,1,-2,0,2,2,0,0,1,5,0),Qe(0,3,3,-2,0,3,4,0,0,1,8,0),Qe(0,2,4,-1,0,4,5,0,0,1,10,0),Qe(0,3,5,-1,0,5,8,0,0,1,14,0),Qe(0,3,5,-1,0,6,10,0,0,1,18,0),Qe(0,4,5,-2,0,7,10,1,0,2,16,1),Qe(0,5,5,-3,0,8,10,1,0,3,14,2),Qe(0,5,6,-3,0,9,12,1,0,3,16,2),Qe(0,6,6,-3,0,10,14,1,0,4,18,3),Qe(0,6,7,-4,0,11,15,1,0,4,20,3),Qe(0,7,8,-4,0,12,17,2,0,5,22,4),Qe(0,7,8,-4,0,13,19,2,0,5,24,4),Qe(0,7,9,-4,0,14,21,2,0,5,26,4),Qe(0,8,9,-5,0,15,22,2,0,6,28,5),Qe(0,8,10,-5,0,16,24,2,0,6,30,5),Qe(0,8,11,-5,0,17,26,2,0,6,32,5),Qe(0,9,11,-5,0,18,28,2,0,7,34,6),Qe(0,9,12,-6,0,19,29,2,0,7,36,6),Qe(0,10,13,-6,0,20,31,3,0,8,38,7),Qe(0,10,13,-6,0,21,33,3,0,8,40,7),Qe(0,10,14,-6,0,22,35,3,0,8,42,7),Qe(0,11,14,-7,0,23,36,3,0,9,44,8),Qe(0,11,15,-7,0,24,38,3,0,9,46,8)],Vj=["duration","easing","delay"],Hj={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Uj={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function V0(e){return`${Math.round(e)}ms`}function Wj(e){if(!e)return 0;const t=e/36;return Math.round((4+15*t**.25+t/5)*10)}function Gj(e){const t=V({},Hj,e.easing),n=V({},Uj,e.duration);return V({getAutoHeightDuration:Wj,create:(i=["all"],s={})=>{const{duration:o=n.standard,easing:a=t.easeInOut,delay:l=0}=s;return Me(s,Vj),(Array.isArray(i)?i:[i]).map(d=>`${d} ${typeof o=="string"?o:V0(o)} ${a} ${typeof l=="string"?l:V0(l)}`).join(",")}},e,{easing:t,duration:n})}const qj={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},Kj=qj,Yj=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function Xj(e={},...t){const{mixins:n={},palette:r={},transitions:i={},typography:s={}}=e,o=Me(e,Yj);if(e.vars)throw new Error(ha(18));const a=Ij(r),l=$h(e);let d=vr(l,{mixins:pj(l.breakpoints,n),palette:a,shadows:Bj.slice(),typography:Rj(a,s),transitions:Gj(i),zIndex:V({},Kj)});return d=vr(d,o),d=t.reduce((f,h)=>vr(f,h),d),d.unstable_sxConfig=V({},Na,o==null?void 0:o.unstable_sxConfig),d.unstable_sx=function(h){return xu({sx:h,theme:this})},d}const Qj=Xj(),Uh=Qj;function Wh(){const e=H2(Uh);return e[Ch]||e}function Vt({props:e,name:t}){return QP({props:e,name:t,defaultTheme:Uh,themeId:Ch})}var La={},_d={exports:{}},H0;function Zj(){return H0||(H0=1,function(e){function t(n,r){if(n==null)return{};var i={},s=Object.keys(n),o,a;for(a=0;a=0)&&(i[o]=n[o]);return i}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(_d)),_d.exports}const Jj=ui(zE),e6=ui(FE),t6=ui(qE),n6=ui(YP),r6=ui($P),i6=ui(BP);var eo=nw;Object.defineProperty(La,"__esModule",{value:!0});var s6=La.default=y6;La.shouldForwardProp=Ml;La.systemDefaultTheme=void 0;var On=eo($2()),ep=eo(Zj()),U0=f6(Jj),o6=e6;eo(t6);eo(n6);var a6=eo(r6),l6=eo(i6);const c6=["ownerState"],u6=["variants"],d6=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function cw(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(cw=function(r){return r?n:t})(e)}function f6(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=cw(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=i?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(r,s,o):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}function p6(e){return Object.keys(e).length===0}function h6(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Ml(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const m6=La.systemDefaultTheme=(0,a6.default)(),g6=e=>e&&e.charAt(0).toLowerCase()+e.slice(1);function cl({defaultTheme:e,theme:t,themeId:n}){return p6(t)?e:t[n]||t}function v6(e){return e?(t,n)=>n[e]:null}function Ol(e,t){let{ownerState:n}=t,r=(0,ep.default)(t,c6);const i=typeof e=="function"?e((0,On.default)({ownerState:n},r)):e;if(Array.isArray(i))return i.flatMap(s=>Ol(s,(0,On.default)({ownerState:n},r)));if(i&&typeof i=="object"&&Array.isArray(i.variants)){const{variants:s=[]}=i;let a=(0,ep.default)(i,u6);return s.forEach(l=>{let d=!0;typeof l.props=="function"?d=l.props((0,On.default)({ownerState:n},r,n)):Object.keys(l.props).forEach(f=>{(n==null?void 0:n[f])!==l.props[f]&&r[f]!==l.props[f]&&(d=!1)}),d&&(Array.isArray(a)||(a=[a]),a.push(typeof l.style=="function"?l.style((0,On.default)({ownerState:n},r,n)):l.style))}),a}return i}function y6(e={}){const{themeId:t,defaultTheme:n=m6,rootShouldForwardProp:r=Ml,slotShouldForwardProp:i=Ml}=e,s=o=>(0,l6.default)((0,On.default)({},o,{theme:cl((0,On.default)({},o,{defaultTheme:n,themeId:t}))}));return s.__mui_systemSx=!0,(o,a={})=>{(0,U0.internal_processStyles)(o,j=>j.filter(L=>!(L!=null&&L.__mui_systemSx)));const{name:l,slot:d,skipVariantsResolver:f,skipSx:h,overridesResolver:v=v6(g6(d))}=a,C=(0,ep.default)(a,d6),w=f!==void 0?f:d&&d!=="Root"&&d!=="root"||!1,S=h||!1;let P,m=Ml;d==="Root"||d==="root"?m=r:d?m=i:h6(o)&&(m=void 0);const g=(0,U0.default)(o,(0,On.default)({shouldForwardProp:m,label:P},C)),y=j=>typeof j=="function"&&j.__emotion_real!==j||(0,o6.isPlainObject)(j)?L=>Ol(j,(0,On.default)({},L,{theme:cl({theme:L.theme,defaultTheme:n,themeId:t})})):j,E=(j,...L)=>{let M=y(j);const O=L?L.map(y):[];l&&v&&O.push(B=>{const z=cl((0,On.default)({},B,{defaultTheme:n,themeId:t}));if(!z.components||!z.components[l]||!z.components[l].styleOverrides)return null;const R=z.components[l].styleOverrides,H={};return Object.entries(R).forEach(([U,q])=>{H[U]=Ol(q,(0,On.default)({},B,{theme:z}))}),v(B,H)}),l&&!w&&O.push(B=>{var z;const R=cl((0,On.default)({},B,{defaultTheme:n,themeId:t})),H=R==null||(z=R.components)==null||(z=z[l])==null?void 0:z.variants;return Ol({variants:H},(0,On.default)({},B,{theme:R}))}),S||O.push(s);const I=O.length-L.length;if(Array.isArray(j)&&I>0){const B=new Array(I).fill("");M=[...j,...B],M.raw=[...j.raw,...B]}const _=g(M,...O);return o.muiName&&(_.muiName=o.muiName),_};return g.withConfig&&(E.withConfig=g.withConfig),E}}function Ou(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const w6=e=>Ou(e)&&e!=="classes",Gh=w6,Oe=s6({themeId:Ch,defaultTheme:Uh,rootShouldForwardProp:Gh}),W0=e=>{let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,(t/100).toFixed(2)};function x6(e){return Bt("MuiSvgIcon",e)}St("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const b6=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],S6=e=>{const{color:t,fontSize:n,classes:r}=e,i={root:["root",t!=="inherit"&&`color${Xe(t)}`,`fontSize${Xe(n)}`]};return Jt(i,x6,r)},C6=Oe("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="inherit"&&t[`color${Xe(n.color)}`],t[`fontSize${Xe(n.fontSize)}`]]}})(({theme:e,ownerState:t})=>{var n,r,i,s,o,a,l,d,f,h,v,C,w;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:t.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:(n=e.transitions)==null||(r=n.create)==null?void 0:r.call(n,"fill",{duration:(i=e.transitions)==null||(i=i.duration)==null?void 0:i.shorter}),fontSize:{inherit:"inherit",small:((s=e.typography)==null||(o=s.pxToRem)==null?void 0:o.call(s,20))||"1.25rem",medium:((a=e.typography)==null||(l=a.pxToRem)==null?void 0:l.call(a,24))||"1.5rem",large:((d=e.typography)==null||(f=d.pxToRem)==null?void 0:f.call(d,35))||"2.1875rem"}[t.fontSize],color:(h=(v=(e.vars||e).palette)==null||(v=v[t.color])==null?void 0:v.main)!=null?h:{action:(C=(e.vars||e).palette)==null||(C=C.action)==null?void 0:C.active,disabled:(w=(e.vars||e).palette)==null||(w=w.action)==null?void 0:w.disabled,inherit:void 0}[t.color]}}),tp=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiSvgIcon"}),{children:i,className:s,color:o="inherit",component:a="svg",fontSize:l="medium",htmlColor:d,inheritViewBox:f=!1,titleAccess:h,viewBox:v="0 0 24 24"}=r,C=Me(r,b6),w=k.isValidElement(i)&&i.type==="svg",S=V({},r,{color:o,component:a,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:f,viewBox:v,hasSvgAsChild:w}),P={};f||(P.viewBox=v);const m=S6(S);return c.jsxs(C6,V({as:a,className:Ce(m.root,s),focusable:"false",color:d,"aria-hidden":h?void 0:!0,role:h?"img":void 0,ref:n},P,C,w&&i.props,{ownerState:S,children:[w?i.props.children:i,h?c.jsx("title",{children:h}):null]}))});tp.muiName="SvgIcon";function uw(e,t){function n(r,i){return c.jsx(tp,V({"data-testid":`${t}Icon`,ref:i},r,{children:e}))}return n.muiName=tp.muiName,k.memo(k.forwardRef(n))}var He={};/** * @license React * react-is.production.min.js * @@ -153,7 +153,7 @@ https://sweetalert2.github.io/#ajax-request`),IS(b),typeof b.title=="string"&&(b * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Kh=Symbol.for("react.element"),Yh=Symbol.for("react.portal"),Iu=Symbol.for("react.fragment"),$u=Symbol.for("react.strict_mode"),Au=Symbol.for("react.profiler"),Ru=Symbol.for("react.provider"),Du=Symbol.for("react.context"),j6=Symbol.for("react.server_context"),zu=Symbol.for("react.forward_ref"),Fu=Symbol.for("react.suspense"),Bu=Symbol.for("react.suspense_list"),Vu=Symbol.for("react.memo"),Hu=Symbol.for("react.lazy"),T6=Symbol.for("react.offscreen"),pw;pw=Symbol.for("react.module.reference");function Gn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case Kh:switch(e=e.type,e){case Iu:case Au:case $u:case Fu:case Bu:return e;default:switch(e=e&&e.$$typeof,e){case j6:case Du:case zu:case Hu:case Vu:case Ru:return e;default:return t}}case Yh:return t}}}He.ContextConsumer=Du;He.ContextProvider=Ru;He.Element=Kh;He.ForwardRef=zu;He.Fragment=Iu;He.Lazy=Hu;He.Memo=Vu;He.Portal=Yh;He.Profiler=Au;He.StrictMode=$u;He.Suspense=Fu;He.SuspenseList=Bu;He.isAsyncMode=function(){return!1};He.isConcurrentMode=function(){return!1};He.isContextConsumer=function(e){return Gn(e)===Du};He.isContextProvider=function(e){return Gn(e)===Ru};He.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===Kh};He.isForwardRef=function(e){return Gn(e)===zu};He.isFragment=function(e){return Gn(e)===Iu};He.isLazy=function(e){return Gn(e)===Hu};He.isMemo=function(e){return Gn(e)===Vu};He.isPortal=function(e){return Gn(e)===Yh};He.isProfiler=function(e){return Gn(e)===Au};He.isStrictMode=function(e){return Gn(e)===$u};He.isSuspense=function(e){return Gn(e)===Fu};He.isSuspenseList=function(e){return Gn(e)===Bu};He.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Iu||e===Au||e===$u||e===Fu||e===Bu||e===T6||typeof e=="object"&&e!==null&&(e.$$typeof===Hu||e.$$typeof===Vu||e.$$typeof===Ru||e.$$typeof===Du||e.$$typeof===zu||e.$$typeof===pw||e.getModuleId!==void 0)};He.typeOf=Gn;function N6(e){return Vt}function rp(e,t){return rp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},rp(e,t)}function hw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,rp(e,t)}const q0={disabled:!1},gc=ie.createContext(null);var L6=function(t){return t.scrollTop},Ns="unmounted",Ci="exited",ki="entering",fo="entered",ip="exiting",Rr=function(e){hw(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var s=i,a=s&&!s.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?a?(l=Ci,o.appearStatus=ki):l=fo:r.unmountOnExit||r.mountOnEnter?l=Ns:l=Ci,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var s=i.in;return s&&o.status===Ns?{status:Ci}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var s=this.state.status;this.props.in?s!==ki&&s!==fo&&(o=ki):(s===ki||s===fo)&&(o=ip)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,s,a;return o=s=a=i,i!=null&&typeof i!="number"&&(o=i.exit,s=i.enter,a=i.appear!==void 0?i.appear:s),{exit:o,enter:s,appear:a}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===ki){if(this.props.unmountOnExit||this.props.mountOnEnter){var s=this.props.nodeRef?this.props.nodeRef.current:ol.findDOMNode(this);s&&L6(s)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ci&&this.setState({status:Ns})},n.performEnter=function(i){var o=this,s=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[ol.findDOMNode(this),a],d=l[0],f=l[1],h=this.getTimeouts(),v=a?h.appear:h.enter;if(!i&&!s||q0.disabled){this.safeSetState({status:fo},function(){o.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:ki},function(){o.props.onEntering(d,f),o.onTransitionEnd(v,function(){o.safeSetState({status:fo},function(){o.props.onEntered(d,f)})})})},n.performExit=function(){var i=this,o=this.props.exit,s=this.getTimeouts(),a=this.props.nodeRef?void 0:ol.findDOMNode(this);if(!o||q0.disabled){this.safeSetState({status:Ci},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:ip},function(){i.props.onExiting(a),i.onTransitionEnd(s.exit,function(){i.safeSetState({status:Ci},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,s=!0;return this.nextCallback=function(a){s&&(s=!1,o.nextCallback=null,i(a))},this.nextCallback.cancel=function(){s=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var s=this.props.nodeRef?this.props.nodeRef.current:ol.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!s||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[s,this.nextCallback],d=l[0],f=l[1];this.props.addEndListener(d,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===Ns)return null;var o=this.props,s=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var a=Me(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ie.createElement(gc.Provider,{value:null},typeof s=="function"?s(i,a):ie.cloneElement(ie.Children.only(s),a))},t}(ie.Component);Rr.contextType=gc;Rr.propTypes={};function lo(){}Rr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:lo,onEntering:lo,onEntered:lo,onExit:lo,onExiting:lo,onExited:lo};Rr.UNMOUNTED=Ns;Rr.EXITED=Ci;Rr.ENTERING=ki;Rr.ENTERED=fo;Rr.EXITING=ip;const mw=Rr;function _6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Xh(e,t){var n=function(o){return t&&k.isValidElement(o)?t(o):o},r=Object.create(null);return e&&k.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function M6(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var o in e)o in t?i.length&&(r[o]=i,i=[]):i.push(o);var s,a={};for(var l in t){if(r[l])for(s=0;se.scrollTop;function vc(e,t){var n,r;const{timeout:i,easing:o,style:s={}}=e;return{duration:(n=s.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=s.transitionTimingFunction)!=null?r:typeof o=="object"?o[t.mode]:o,delay:s.transitionDelay}}function D6(e){return Bt("MuiPaper",e)}St("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const z6=["className","component","elevation","square","variant"],F6=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Jt(o,D6,i)},B6=Oe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return V({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&V({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Yr("#fff",G0(t.elevation))}, ${Yr("#fff",G0(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),V6=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiPaper"}),{className:i,component:o="div",elevation:s=1,square:a=!1,variant:l="elevation"}=r,d=Me(r,z6),f=V({},r,{component:o,elevation:s,square:a,variant:l}),h=F6(f);return c.jsx(B6,V({as:o,ownerState:f,className:Ce(h.root,i),ref:n},d))}),Zh=V6;function $o(e){return typeof e=="string"}function H6(e,t,n){return e===void 0||$o(e)?t:V({},t,{ownerState:V({},t.ownerState,n)})}function U6(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}function Bs(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function W6(e,t,n){return typeof e=="function"?e(t,n):e}function K0(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function G6(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const C=Ce(n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),w=V({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),S=V({},n,i,r);return C.length>0&&(S.className=C),Object.keys(w).length>0&&(S.style=w),{props:S,internalRef:void 0}}const s=Bs(V({},i,r)),a=K0(r),l=K0(i),d=t(s),f=Ce(d==null?void 0:d.className,n==null?void 0:n.className,o,i==null?void 0:i.className,r==null?void 0:r.className),h=V({},d==null?void 0:d.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),v=V({},d,n,l,a);return f.length>0&&(v.className=f),Object.keys(h).length>0&&(v.style=h),{props:v,internalRef:d.ref}}const q6=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function cn(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:o=!1}=e,s=Me(e,q6),a=o?{}:W6(r,i),{props:l,internalRef:d}=G6(V({},s,{externalSlotProps:a})),f=gn(d,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return H6(n,V({},l,{ref:f}),i)}function K6(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:o,rippleSize:s,in:a,onExited:l,timeout:d}=e,[f,h]=k.useState(!1),v=Ce(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),C={width:s,height:s,top:-(s/2)+o,left:-(s/2)+i},w=Ce(n.child,f&&n.childLeaving,r&&n.childPulsate);return!a&&!f&&h(!0),k.useEffect(()=>{if(!a&&l!=null){const S=setTimeout(l,d);return()=>{clearTimeout(S)}}},[l,a,d]),c.jsx("span",{className:v,style:C,children:c.jsx("span",{className:w})})}const In=St("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),Y6=["center","classes","className"];let Uu=e=>e,Y0,X0,Q0,Z0;const op=550,X6=80,Q6=pu(Y0||(Y0=Uu` + */var qh=Symbol.for("react.element"),Kh=Symbol.for("react.portal"),Iu=Symbol.for("react.fragment"),$u=Symbol.for("react.strict_mode"),Au=Symbol.for("react.profiler"),Ru=Symbol.for("react.provider"),Du=Symbol.for("react.context"),k6=Symbol.for("react.server_context"),zu=Symbol.for("react.forward_ref"),Fu=Symbol.for("react.suspense"),Bu=Symbol.for("react.suspense_list"),Vu=Symbol.for("react.memo"),Hu=Symbol.for("react.lazy"),E6=Symbol.for("react.offscreen"),dw;dw=Symbol.for("react.module.reference");function Gn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case qh:switch(e=e.type,e){case Iu:case Au:case $u:case Fu:case Bu:return e;default:switch(e=e&&e.$$typeof,e){case k6:case Du:case zu:case Hu:case Vu:case Ru:return e;default:return t}}case Kh:return t}}}He.ContextConsumer=Du;He.ContextProvider=Ru;He.Element=qh;He.ForwardRef=zu;He.Fragment=Iu;He.Lazy=Hu;He.Memo=Vu;He.Portal=Kh;He.Profiler=Au;He.StrictMode=$u;He.Suspense=Fu;He.SuspenseList=Bu;He.isAsyncMode=function(){return!1};He.isConcurrentMode=function(){return!1};He.isContextConsumer=function(e){return Gn(e)===Du};He.isContextProvider=function(e){return Gn(e)===Ru};He.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===qh};He.isForwardRef=function(e){return Gn(e)===zu};He.isFragment=function(e){return Gn(e)===Iu};He.isLazy=function(e){return Gn(e)===Hu};He.isMemo=function(e){return Gn(e)===Vu};He.isPortal=function(e){return Gn(e)===Kh};He.isProfiler=function(e){return Gn(e)===Au};He.isStrictMode=function(e){return Gn(e)===$u};He.isSuspense=function(e){return Gn(e)===Fu};He.isSuspenseList=function(e){return Gn(e)===Bu};He.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Iu||e===Au||e===$u||e===Fu||e===Bu||e===E6||typeof e=="object"&&e!==null&&(e.$$typeof===Hu||e.$$typeof===Vu||e.$$typeof===Ru||e.$$typeof===Du||e.$$typeof===zu||e.$$typeof===dw||e.getModuleId!==void 0)};He.typeOf=Gn;function P6(e){return Vt}function np(e,t){return np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},np(e,t)}function fw(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,np(e,t)}const G0={disabled:!1},gc=ie.createContext(null);var j6=function(t){return t.scrollTop},No="unmounted",Ci="exited",ki="entering",ds="entered",rp="exiting",Rr=function(e){fw(t,e);function t(r,i){var s;s=e.call(this,r,i)||this;var o=i,a=o&&!o.isMounting?r.enter:r.appear,l;return s.appearStatus=null,r.in?a?(l=Ci,s.appearStatus=ki):l=ds:r.unmountOnExit||r.mountOnEnter?l=No:l=Ci,s.state={status:l},s.nextCallback=null,s}t.getDerivedStateFromProps=function(i,s){var o=i.in;return o&&s.status===No?{status:Ci}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var s=null;if(i!==this.props){var o=this.state.status;this.props.in?o!==ki&&o!==ds&&(s=ki):(o===ki||o===ds)&&(s=rp)}this.updateStatus(!1,s)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,s,o,a;return s=o=a=i,i!=null&&typeof i!="number"&&(s=i.exit,o=i.enter,a=i.appear!==void 0?i.appear:o),{exit:s,enter:o,appear:a}},n.updateStatus=function(i,s){if(i===void 0&&(i=!1),s!==null)if(this.cancelNextCallback(),s===ki){if(this.props.unmountOnExit||this.props.mountOnEnter){var o=this.props.nodeRef?this.props.nodeRef.current:sl.findDOMNode(this);o&&j6(o)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===Ci&&this.setState({status:No})},n.performEnter=function(i){var s=this,o=this.props.enter,a=this.context?this.context.isMounting:i,l=this.props.nodeRef?[a]:[sl.findDOMNode(this),a],d=l[0],f=l[1],h=this.getTimeouts(),v=a?h.appear:h.enter;if(!i&&!o||G0.disabled){this.safeSetState({status:ds},function(){s.props.onEntered(d)});return}this.props.onEnter(d,f),this.safeSetState({status:ki},function(){s.props.onEntering(d,f),s.onTransitionEnd(v,function(){s.safeSetState({status:ds},function(){s.props.onEntered(d,f)})})})},n.performExit=function(){var i=this,s=this.props.exit,o=this.getTimeouts(),a=this.props.nodeRef?void 0:sl.findDOMNode(this);if(!s||G0.disabled){this.safeSetState({status:Ci},function(){i.props.onExited(a)});return}this.props.onExit(a),this.safeSetState({status:rp},function(){i.props.onExiting(a),i.onTransitionEnd(o.exit,function(){i.safeSetState({status:Ci},function(){i.props.onExited(a)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,s){s=this.setNextCallback(s),this.setState(i,s)},n.setNextCallback=function(i){var s=this,o=!0;return this.nextCallback=function(a){o&&(o=!1,s.nextCallback=null,i(a))},this.nextCallback.cancel=function(){o=!1},this.nextCallback},n.onTransitionEnd=function(i,s){this.setNextCallback(s);var o=this.props.nodeRef?this.props.nodeRef.current:sl.findDOMNode(this),a=i==null&&!this.props.addEndListener;if(!o||a){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[o,this.nextCallback],d=l[0],f=l[1];this.props.addEndListener(d,f)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===No)return null;var s=this.props,o=s.children;s.in,s.mountOnEnter,s.unmountOnExit,s.appear,s.enter,s.exit,s.timeout,s.addEndListener,s.onEnter,s.onEntering,s.onEntered,s.onExit,s.onExiting,s.onExited,s.nodeRef;var a=Me(s,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return ie.createElement(gc.Provider,{value:null},typeof o=="function"?o(i,a):ie.cloneElement(ie.Children.only(o),a))},t}(ie.Component);Rr.contextType=gc;Rr.propTypes={};function ls(){}Rr.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:ls,onEntering:ls,onEntered:ls,onExit:ls,onExiting:ls,onExited:ls};Rr.UNMOUNTED=No;Rr.EXITED=Ci;Rr.ENTERING=ki;Rr.ENTERED=ds;Rr.EXITING=rp;const pw=Rr;function T6(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yh(e,t){var n=function(s){return t&&k.isValidElement(s)?t(s):s},r=Object.create(null);return e&&k.Children.map(e,function(i){return i}).forEach(function(i){r[i.key]=n(i)}),r}function N6(e,t){e=e||{},t=t||{};function n(f){return f in t?t[f]:e[f]}var r=Object.create(null),i=[];for(var s in e)s in t?i.length&&(r[s]=i,i=[]):i.push(s);var o,a={};for(var l in t){if(r[l])for(o=0;oe.scrollTop;function vc(e,t){var n,r;const{timeout:i,easing:s,style:o={}}=e;return{duration:(n=o.transitionDuration)!=null?n:typeof i=="number"?i:i[t.mode]||0,easing:(r=o.transitionTimingFunction)!=null?r:typeof s=="object"?s[t.mode]:s,delay:o.transitionDelay}}function $6(e){return Bt("MuiPaper",e)}St("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const A6=["className","component","elevation","square","variant"],R6=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,s={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Jt(s,$6,i)},D6=Oe("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(({theme:e,ownerState:t})=>{var n;return V({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow")},!t.square&&{borderRadius:e.shape.borderRadius},t.variant==="outlined"&&{border:`1px solid ${(e.vars||e).palette.divider}`},t.variant==="elevation"&&V({boxShadow:(e.vars||e).shadows[t.elevation]},!e.vars&&e.palette.mode==="dark"&&{backgroundImage:`linear-gradient(${Yr("#fff",W0(t.elevation))}, ${Yr("#fff",W0(t.elevation))})`},e.vars&&{backgroundImage:(n=e.vars.overlays)==null?void 0:n[t.elevation]}))}),z6=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiPaper"}),{className:i,component:s="div",elevation:o=1,square:a=!1,variant:l="elevation"}=r,d=Me(r,A6),f=V({},r,{component:s,elevation:o,square:a,variant:l}),h=R6(f);return c.jsx(D6,V({as:s,ownerState:f,className:Ce(h.root,i),ref:n},d))}),Qh=z6;function Is(e){return typeof e=="string"}function F6(e,t,n){return e===void 0||Is(e)?t:V({},t,{ownerState:V({},t.ownerState,n)})}function B6(e,t,n=(r,i)=>r===i){return e.length===t.length&&e.every((r,i)=>n(r,t[i]))}function Bo(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function V6(e,t,n){return typeof e=="function"?e(t,n):e}function q0(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function H6(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:s}=e;if(!t){const C=Ce(n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),w=V({},n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),S=V({},n,i,r);return C.length>0&&(S.className=C),Object.keys(w).length>0&&(S.style=w),{props:S,internalRef:void 0}}const o=Bo(V({},i,r)),a=q0(r),l=q0(i),d=t(o),f=Ce(d==null?void 0:d.className,n==null?void 0:n.className,s,i==null?void 0:i.className,r==null?void 0:r.className),h=V({},d==null?void 0:d.style,n==null?void 0:n.style,i==null?void 0:i.style,r==null?void 0:r.style),v=V({},d,n,l,a);return f.length>0&&(v.className=f),Object.keys(h).length>0&&(v.style=h),{props:v,internalRef:d.ref}}const U6=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function cn(e){var t;const{elementType:n,externalSlotProps:r,ownerState:i,skipResolvingSlotProps:s=!1}=e,o=Me(e,U6),a=s?{}:V6(r,i),{props:l,internalRef:d}=H6(V({},o,{externalSlotProps:a})),f=gn(d,a==null?void 0:a.ref,(t=e.additionalProps)==null?void 0:t.ref);return F6(n,V({},l,{ref:f}),i)}function W6(e){const{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:s,rippleSize:o,in:a,onExited:l,timeout:d}=e,[f,h]=k.useState(!1),v=Ce(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),C={width:o,height:o,top:-(o/2)+s,left:-(o/2)+i},w=Ce(n.child,f&&n.childLeaving,r&&n.childPulsate);return!a&&!f&&h(!0),k.useEffect(()=>{if(!a&&l!=null){const S=setTimeout(l,d);return()=>{clearTimeout(S)}}},[l,a,d]),c.jsx("span",{className:v,style:C,children:c.jsx("span",{className:w})})}const In=St("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),G6=["center","classes","className"];let Uu=e=>e,K0,Y0,X0,Q0;const ip=550,q6=80,K6=pu(K0||(K0=Uu` 0% { transform: scale(0); opacity: 0.1; @@ -163,7 +163,7 @@ https://sweetalert2.github.io/#ajax-request`),IS(b),typeof b.title=="string"&&(b transform: scale(1); opacity: 0.3; } -`)),Z6=pu(X0||(X0=Uu` +`)),Y6=pu(Y0||(Y0=Uu` 0% { opacity: 1; } @@ -171,7 +171,7 @@ https://sweetalert2.github.io/#ajax-request`),IS(b),typeof b.title=="string"&&(b 100% { opacity: 0; } -`)),J6=pu(Q0||(Q0=Uu` +`)),X6=pu(X0||(X0=Uu` 0% { transform: scale(1); } @@ -183,7 +183,7 @@ https://sweetalert2.github.io/#ajax-request`),IS(b),typeof b.title=="string"&&(b 100% { transform: scale(1); } -`)),eT=Oe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),tT=Oe(K6,{name:"MuiTouchRipple",slot:"Ripple"})(Z0||(Z0=Uu` +`)),Q6=Oe("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),Z6=Oe(W6,{name:"MuiTouchRipple",slot:"Ripple"})(Q0||(Q0=Uu` opacity: 0; position: absolute; @@ -226,7 +226,7 @@ https://sweetalert2.github.io/#ajax-request`),IS(b),typeof b.title=="string"&&(b animation-iteration-count: infinite; animation-delay: 200ms; } -`),In.rippleVisible,Q6,op,({theme:e})=>e.transitions.easing.easeInOut,In.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,In.child,In.childLeaving,Z6,op,({theme:e})=>e.transitions.easing.easeInOut,In.childPulsate,J6,({theme:e})=>e.transitions.easing.easeInOut),nT=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:o={},className:s}=r,a=Me(r,Y6),[l,d]=k.useState([]),f=k.useRef(0),h=k.useRef(null);k.useEffect(()=>{h.current&&(h.current(),h.current=null)},[l]);const v=k.useRef(!1),C=ew(),w=k.useRef(null),S=k.useRef(null),P=k.useCallback(E=>{const{pulsate:j,rippleX:L,rippleY:M,rippleSize:O,cb:I}=E;d(_=>[..._,c.jsx(tT,{classes:{ripple:Ce(o.ripple,In.ripple),rippleVisible:Ce(o.rippleVisible,In.rippleVisible),ripplePulsate:Ce(o.ripplePulsate,In.ripplePulsate),child:Ce(o.child,In.child),childLeaving:Ce(o.childLeaving,In.childLeaving),childPulsate:Ce(o.childPulsate,In.childPulsate)},timeout:op,pulsate:j,rippleX:L,rippleY:M,rippleSize:O},f.current)]),f.current+=1,h.current=I},[o]),m=k.useCallback((E={},j={},L=()=>{})=>{const{pulsate:M=!1,center:O=i||j.pulsate,fakeElement:I=!1}=j;if((E==null?void 0:E.type)==="mousedown"&&v.current){v.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(v.current=!0);const _=I?null:S.current,B=_?_.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,R,H;if(O||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)z=Math.round(B.width/2),R=Math.round(B.height/2);else{const{clientX:U,clientY:q}=E.touches&&E.touches.length>0?E.touches[0]:E;z=Math.round(U-B.left),R=Math.round(q-B.top)}if(O)H=Math.sqrt((2*B.width**2+B.height**2)/3),H%2===0&&(H+=1);else{const U=Math.max(Math.abs((_?_.clientWidth:0)-z),z)*2+2,q=Math.max(Math.abs((_?_.clientHeight:0)-R),R)*2+2;H=Math.sqrt(U**2+q**2)}E!=null&&E.touches?w.current===null&&(w.current=()=>{P({pulsate:M,rippleX:z,rippleY:R,rippleSize:H,cb:L})},C.start(X6,()=>{w.current&&(w.current(),w.current=null)})):P({pulsate:M,rippleX:z,rippleY:R,rippleSize:H,cb:L})},[i,P,C]),g=k.useCallback(()=>{m({},{pulsate:!0})},[m]),y=k.useCallback((E,j)=>{if(C.clear(),(E==null?void 0:E.type)==="touchend"&&w.current){w.current(),w.current=null,C.start(0,()=>{y(E,j)});return}w.current=null,d(L=>L.length>0?L.slice(1):L),h.current=j},[C]);return k.useImperativeHandle(n,()=>({pulsate:g,start:m,stop:y}),[g,m,y]),c.jsx(eT,V({className:Ce(In.root,o.root,s),ref:S},a,{children:c.jsx(R6,{component:null,exit:!0,children:l})}))}),rT=nT;function iT(e){return Bt("MuiButtonBase",e)}const oT=St("MuiButtonBase",["root","disabled","focusVisible"]),sT=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],aT=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,s=Jt({root:["root",t&&"disabled",n&&"focusVisible"]},iT,i);return n&&r&&(s.root+=` ${r}`),s},lT=Oe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${oT.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),cT=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:o=!1,children:s,className:a,component:l="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:v=!1,LinkComponent:C="a",onBlur:w,onClick:S,onContextMenu:P,onDragLeave:m,onFocus:g,onFocusVisible:y,onKeyDown:E,onKeyUp:j,onMouseDown:L,onMouseLeave:M,onMouseUp:O,onTouchEnd:I,onTouchMove:_,onTouchStart:B,tabIndex:z=0,TouchRippleProps:R,touchRippleRef:H,type:U}=r,q=Me(r,sT),ee=k.useRef(null),A=k.useRef(null),Y=gn(A,H),{isFocusVisibleRef:te,onFocus:ce,onBlur:ue,ref:F}=Fh(),[he,Le]=k.useState(!1);d&&he&&Le(!1),k.useImperativeHandle(i,()=>({focusVisible:()=>{Le(!0),ee.current.focus()}}),[]);const[_e,Ae]=k.useState(!1);k.useEffect(()=>{Ae(!0)},[]);const Pe=_e&&!f&&!d;k.useEffect(()=>{he&&v&&!f&&_e&&A.current.pulsate()},[f,v,he,_e]);function be(G,ae,Se=h){return Nr(ye=>(ae&&ae(ye),!Se&&A.current&&A.current[G](ye),!0))}const ft=be("start",L),Ht=be("stop",P),It=be("stop",m),pe=be("stop",O),de=be("stop",G=>{he&&G.preventDefault(),M&&M(G)}),se=be("start",B),ke=be("stop",I),me=be("stop",_),N=be("stop",G=>{ue(G),te.current===!1&&Le(!1),w&&w(G)},!1),D=Nr(G=>{ee.current||(ee.current=G.currentTarget),ce(G),te.current===!0&&(Le(!0),y&&y(G)),g&&g(G)}),$=()=>{const G=ee.current;return l&&l!=="button"&&!(G.tagName==="A"&&G.href)},Q=k.useRef(!1),Z=Nr(G=>{v&&!Q.current&&he&&A.current&&G.key===" "&&(Q.current=!0,A.current.stop(G,()=>{A.current.start(G)})),G.target===G.currentTarget&&$()&&G.key===" "&&G.preventDefault(),E&&E(G),G.target===G.currentTarget&&$()&&G.key==="Enter"&&!d&&(G.preventDefault(),S&&S(G))}),K=Nr(G=>{v&&G.key===" "&&A.current&&he&&!G.defaultPrevented&&(Q.current=!1,A.current.stop(G,()=>{A.current.pulsate(G)})),j&&j(G),S&&G.target===G.currentTarget&&$()&&G.key===" "&&!G.defaultPrevented&&S(G)});let ne=l;ne==="button"&&(q.href||q.to)&&(ne=C);const xe={};ne==="button"?(xe.type=U===void 0?"button":U,xe.disabled=d):(!q.href&&!q.to&&(xe.role="button"),d&&(xe["aria-disabled"]=d));const Ve=gn(n,F,ee),Ue=V({},r,{centerRipple:o,component:l,disabled:d,disableRipple:f,disableTouchRipple:h,focusRipple:v,tabIndex:z,focusVisible:he}),X=aT(Ue);return c.jsxs(lT,V({as:ne,className:Ce(X.root,a),ownerState:Ue,onBlur:N,onClick:S,onContextMenu:Ht,onFocus:D,onKeyDown:Z,onKeyUp:K,onMouseDown:ft,onMouseLeave:de,onMouseUp:pe,onDragLeave:It,onTouchEnd:ke,onTouchMove:me,onTouchStart:se,ref:Ve,tabIndex:d?-1:z,type:U},xe,q,{children:[s,Pe?c.jsx(rT,V({ref:Y,center:o},R)):null]}))}),uT=cT;function dT(e){return Bt("MuiTypography",e)}St("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const fT=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],pT=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:o,classes:s}=e,a={root:["root",o,e.align!=="inherit"&&`align${Xe(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Jt(a,dT,s)},hT=Oe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Xe(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>V({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),J0={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},mT={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},gT=e=>mT[e]||e,vT=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiTypography"}),i=gT(r.color),o=G2(V({},r,{color:i})),{align:s="inherit",className:a,component:l,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:v="body1",variantMapping:C=J0}=o,w=Me(o,fT),S=V({},o,{align:s,color:i,className:a,component:l,gutterBottom:d,noWrap:f,paragraph:h,variant:v,variantMapping:C}),P=l||(h?"p":C[v]||J0[v])||"span",m=pT(S);return c.jsx(hT,V({as:P,ref:n,ownerState:S,className:Ce(m.root,a)},w))}),yT=vT,wT=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function xT(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function bT(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function ST(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||bT(e))}function CT(e){const t=[],n=[];return Array.from(e.querySelectorAll(wT)).forEach((r,i)=>{const o=xT(r);o===-1||!ST(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function kT(){return!0}function ET(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=CT,isEnabled:s=kT,open:a}=e,l=k.useRef(!1),d=k.useRef(null),f=k.useRef(null),h=k.useRef(null),v=k.useRef(null),C=k.useRef(!1),w=k.useRef(null),S=gn(t.ref,w),P=k.useRef(null);k.useEffect(()=>{!a||!w.current||(C.current=!n)},[n,a]),k.useEffect(()=>{if(!a||!w.current)return;const y=Xt(w.current);return w.current.contains(y.activeElement)||(w.current.hasAttribute("tabIndex")||w.current.setAttribute("tabIndex","-1"),C.current&&w.current.focus()),()=>{i||(h.current&&h.current.focus&&(l.current=!0,h.current.focus()),h.current=null)}},[a]),k.useEffect(()=>{if(!a||!w.current)return;const y=Xt(w.current),E=M=>{P.current=M,!(r||!s()||M.key!=="Tab")&&y.activeElement===w.current&&M.shiftKey&&(l.current=!0,f.current&&f.current.focus())},j=()=>{const M=w.current;if(M===null)return;if(!y.hasFocus()||!s()||l.current){l.current=!1;return}if(M.contains(y.activeElement)||r&&y.activeElement!==d.current&&y.activeElement!==f.current)return;if(y.activeElement!==v.current)v.current=null;else if(v.current!==null)return;if(!C.current)return;let O=[];if((y.activeElement===d.current||y.activeElement===f.current)&&(O=o(w.current)),O.length>0){var I,_;const B=!!((I=P.current)!=null&&I.shiftKey&&((_=P.current)==null?void 0:_.key)==="Tab"),z=O[0],R=O[O.length-1];typeof z!="string"&&typeof R!="string"&&(B?R.focus():z.focus())}else M.focus()};y.addEventListener("focusin",j),y.addEventListener("keydown",E,!0);const L=setInterval(()=>{y.activeElement&&y.activeElement.tagName==="BODY"&&j()},50);return()=>{clearInterval(L),y.removeEventListener("focusin",j),y.removeEventListener("keydown",E,!0)}},[n,r,i,s,a,o]);const m=y=>{h.current===null&&(h.current=y.relatedTarget),C.current=!0,v.current=y.target;const E=t.props.onFocus;E&&E(y)},g=y=>{h.current===null&&(h.current=y.relatedTarget),C.current=!0};return c.jsxs(k.Fragment,{children:[c.jsx("div",{tabIndex:a?0:-1,onFocus:g,ref:d,"data-testid":"sentinelStart"}),k.cloneElement(t,{ref:S,onFocus:m}),c.jsx("div",{tabIndex:a?0:-1,onFocus:g,ref:f,"data-testid":"sentinelEnd"})]})}function PT(e){return typeof e=="function"?e():e}const jT=k.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[s,a]=k.useState(null),l=gn(k.isValidElement(r)?r.ref:null,n);if(Ko(()=>{o||a(PT(i)||document.body)},[i,o]),Ko(()=>{if(s&&!o)return Qf(n,s),()=>{Qf(n,null)}},[n,s,o]),o){if(k.isValidElement(r)){const d={ref:l};return k.cloneElement(r,d)}return c.jsx(k.Fragment,{children:r})}return c.jsx(k.Fragment,{children:s&&ph.createPortal(r,s)})});function TT(e){const t=Xt(e);return t.body===e?ya(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Vs(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function ev(e){return parseInt(ya(e).getComputedStyle(e).paddingRight,10)||0}function NT(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function tv(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,s=>{const a=o.indexOf(s)===-1,l=!NT(s);a&&l&&Vs(s,i)})}function Md(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function LT(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(TT(r)){const s=tw(Xt(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${ev(r)+s}px`;const a=Xt(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${ev(l)+s}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=Xt(r).body;else{const s=r.parentElement,a=ya(r);o=(s==null?void 0:s.nodeName)==="HTML"&&a.getComputedStyle(s).overflowY==="scroll"?s:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:s,property:a})=>{o?s.style.setProperty(a,o):s.style.removeProperty(a)})}}function _T(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class MT{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Vs(t.modalRef,!1);const i=_T(n);tv(n,t.mount,t.modalRef,i,!0);const o=Md(this.containers,s=>s.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=Md(this.containers,o=>o.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=LT(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=Md(this.containers,s=>s.modals.indexOf(t)!==-1),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&Vs(t.modalRef,n),tv(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const s=o.modals[o.modals.length-1];s.modalRef&&Vs(s.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function OT(e){return typeof e=="function"?e():e}function IT(e){return e?e.props.hasOwnProperty("in"):!1}const $T=new MT;function AT(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=$T,closeAfterTransition:o=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:d,open:f,rootRef:h}=e,v=k.useRef({}),C=k.useRef(null),w=k.useRef(null),S=gn(w,h),[P,m]=k.useState(!f),g=IT(l);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const E=()=>Xt(C.current),j=()=>(v.current.modalRef=w.current,v.current.mount=C.current,v.current),L=()=>{i.mount(j(),{disableScrollLock:r}),w.current&&(w.current.scrollTop=0)},M=Nr(()=>{const q=OT(t)||E().body;i.add(j(),q),w.current&&L()}),O=k.useCallback(()=>i.isTopModal(j()),[i]),I=Nr(q=>{C.current=q,q&&(f&&O()?L():w.current&&Vs(w.current,y))}),_=k.useCallback(()=>{i.remove(j(),y)},[y,i]);k.useEffect(()=>()=>{_()},[_]),k.useEffect(()=>{f?M():(!g||!o)&&_()},[f,_,g,o,M]);const B=q=>ee=>{var A;(A=q.onKeyDown)==null||A.call(q,ee),!(ee.key!=="Escape"||ee.which===229||!O())&&(n||(ee.stopPropagation(),d&&d(ee,"escapeKeyDown")))},z=q=>ee=>{var A;(A=q.onClick)==null||A.call(q,ee),ee.target===ee.currentTarget&&d&&d(ee,"backdropClick")};return{getRootProps:(q={})=>{const ee=Bs(e);delete ee.onTransitionEnter,delete ee.onTransitionExited;const A=V({},ee,q);return V({role:"presentation"},A,{onKeyDown:B(A),ref:S})},getBackdropProps:(q={})=>{const ee=q;return V({"aria-hidden":!0},ee,{onClick:z(ee),open:f})},getTransitionProps:()=>{const q=()=>{m(!1),s&&s()},ee=()=>{m(!0),a&&a(),o&&_()};return{onEnter:I0(q,l==null?void 0:l.props.onEnter),onExited:I0(ee,l==null?void 0:l.props.onExited)}},rootRef:S,portalRef:I,isTopModal:O,exited:P,hasTransition:g}}const RT=2;function vw(e,t){return e-t}function nv(e,t){var n;const{index:r}=(n=e.reduce((i,o,s)=>{const a=Math.abs(t-o);return i===null||a({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},VT=e=>e;let pl;function iv(){return pl===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?pl=CSS.supports("touch-action","none"):pl=!0),pl}function HT(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:o=!1,marks:s=!1,max:a=100,min:l=0,name:d,onChange:f,onChangeCommitted:h,orientation:v="horizontal",rootRef:C,scale:w=VT,step:S=1,shiftStep:P=10,tabIndex:m,value:g}=e,y=k.useRef(),[E,j]=k.useState(-1),[L,M]=k.useState(-1),[O,I]=k.useState(!1),_=k.useRef(0),[B,z]=J2({controlled:g,default:n??l,name:"Slider"}),R=f&&((X,G,ae)=>{const Se=X.nativeEvent||X,ye=new Se.constructor(Se.type,Se);Object.defineProperty(ye,"target",{writable:!0,value:{value:G,name:d}}),f(ye,G,ae)}),H=Array.isArray(B);let U=H?B.slice().sort(vw):[B];U=U.map(X=>X==null?l:Pi(X,l,a));const q=s===!0&&S!==null?[...Array(Math.floor((a-l)/S)+1)].map((X,G)=>({value:l+S*G})):s||[],ee=q.map(X=>X.value),{isFocusVisibleRef:A,onBlur:Y,onFocus:te,ref:ce}=Fh(),[ue,F]=k.useState(-1),he=k.useRef(),Le=gn(ce,he),_e=gn(C,Le),Ae=X=>G=>{var ae;const Se=Number(G.currentTarget.getAttribute("data-index"));te(G),A.current===!0&&F(Se),M(Se),X==null||(ae=X.onFocus)==null||ae.call(X,G)},Pe=X=>G=>{var ae;Y(G),A.current===!1&&F(-1),M(-1),X==null||(ae=X.onBlur)==null||ae.call(X,G)},be=(X,G)=>{const ae=Number(X.currentTarget.getAttribute("data-index")),Se=U[ae],ye=ee.indexOf(Se);let ge=G;if(q&&S==null){const Ut=ee[ee.length-1];ge>Ut?ge=Ut:geG=>{var ae;if(S!==null){const Se=Number(G.currentTarget.getAttribute("data-index")),ye=U[Se];let ge=null;(G.key==="ArrowLeft"||G.key==="ArrowDown")&&G.shiftKey||G.key==="PageDown"?ge=Math.max(ye-P,l):((G.key==="ArrowRight"||G.key==="ArrowUp")&&G.shiftKey||G.key==="PageUp")&&(ge=Math.min(ye+P,a)),ge!==null&&(be(G,ge),G.preventDefault())}X==null||(ae=X.onKeyDown)==null||ae.call(X,G)};Ko(()=>{if(r&&he.current.contains(document.activeElement)){var X;(X=document.activeElement)==null||X.blur()}},[r]),r&&E!==-1&&j(-1),r&&ue!==-1&&F(-1);const Ht=X=>G=>{var ae;(ae=X.onChange)==null||ae.call(X,G),be(G,G.target.valueAsNumber)},It=k.useRef();let pe=v;o&&v==="horizontal"&&(pe+="-reverse");const de=({finger:X,move:G=!1})=>{const{current:ae}=he,{width:Se,height:ye,bottom:ge,left:Ut}=ae.getBoundingClientRect();let Tt;pe.indexOf("vertical")===0?Tt=(ge-X.y)/ye:Tt=(X.x-Ut)/Se,pe.indexOf("-reverse")!==-1&&(Tt=1-Tt);let Ie;if(Ie=DT(Tt,l,a),S)Ie=FT(Ie,S,l);else{const ir=nv(ee,Ie);Ie=ee[ir]}Ie=Pi(Ie,l,a);let an=0;if(H){G?an=It.current:an=nv(U,Ie),i&&(Ie=Pi(Ie,U[an-1]||-1/0,U[an+1]||1/0));const ir=Ie;Ie=rv({values:U,newValue:Ie,index:an}),i&&G||(an=Ie.indexOf(ir),It.current=an)}return{newValue:Ie,activeIndex:an}},se=Nr(X=>{const G=ul(X,y);if(!G)return;if(_.current+=1,X.type==="mousemove"&&X.buttons===0){ke(X);return}const{newValue:ae,activeIndex:Se}=de({finger:G,move:!0});dl({sliderRef:he,activeIndex:Se,setActive:j}),z(ae),!O&&_.current>RT&&I(!0),R&&!fl(ae,B)&&R(X,ae,Se)}),ke=Nr(X=>{const G=ul(X,y);if(I(!1),!G)return;const{newValue:ae}=de({finger:G,move:!0});j(-1),X.type==="touchend"&&M(-1),h&&h(X,ae),y.current=void 0,N()}),me=Nr(X=>{if(r)return;iv()||X.preventDefault();const G=X.changedTouches[0];G!=null&&(y.current=G.identifier);const ae=ul(X,y);if(ae!==!1){const{newValue:ye,activeIndex:ge}=de({finger:ae});dl({sliderRef:he,activeIndex:ge,setActive:j}),z(ye),R&&!fl(ye,B)&&R(X,ye,ge)}_.current=0;const Se=Xt(he.current);Se.addEventListener("touchmove",se,{passive:!0}),Se.addEventListener("touchend",ke,{passive:!0})}),N=k.useCallback(()=>{const X=Xt(he.current);X.removeEventListener("mousemove",se),X.removeEventListener("mouseup",ke),X.removeEventListener("touchmove",se),X.removeEventListener("touchend",ke)},[ke,se]);k.useEffect(()=>{const{current:X}=he;return X.addEventListener("touchstart",me,{passive:iv()}),()=>{X.removeEventListener("touchstart",me),N()}},[N,me]),k.useEffect(()=>{r&&N()},[r,N]);const D=X=>G=>{var ae;if((ae=X.onMouseDown)==null||ae.call(X,G),r||G.defaultPrevented||G.button!==0)return;G.preventDefault();const Se=ul(G,y);if(Se!==!1){const{newValue:ge,activeIndex:Ut}=de({finger:Se});dl({sliderRef:he,activeIndex:Ut,setActive:j}),z(ge),R&&!fl(ge,B)&&R(G,ge,Ut)}_.current=0;const ye=Xt(he.current);ye.addEventListener("mousemove",se,{passive:!0}),ye.addEventListener("mouseup",ke)},$=yc(H?U[0]:l,l,a),Q=yc(U[U.length-1],l,a)-$,Z=(X={})=>{const G=Bs(X),ae={onMouseDown:D(G||{})},Se=V({},G,ae);return V({},X,{ref:_e},Se)},K=X=>G=>{var ae;(ae=X.onMouseOver)==null||ae.call(X,G);const Se=Number(G.currentTarget.getAttribute("data-index"));M(Se)},ne=X=>G=>{var ae;(ae=X.onMouseLeave)==null||ae.call(X,G),M(-1)};return{active:E,axis:pe,axisProps:BT,dragging:O,focusedThumbIndex:ue,getHiddenInputProps:(X={})=>{var G;const ae=Bs(X),Se={onChange:Ht(ae||{}),onFocus:Ae(ae||{}),onBlur:Pe(ae||{}),onKeyDown:ft(ae||{})},ye=V({},ae,Se);return V({tabIndex:m,"aria-labelledby":t,"aria-orientation":v,"aria-valuemax":w(a),"aria-valuemin":w(l),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(G=e.step)!=null?G:void 0,disabled:r},X,ye,{style:V({},nw,{direction:o?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Z,getThumbProps:(X={})=>{const G=Bs(X),ae={onMouseOver:K(G||{}),onMouseLeave:ne(G||{})};return V({},X,G,ae)},marks:q,open:L,range:H,rootRef:_e,trackLeap:Q,trackOffset:$,values:U,getThumbStyle:X=>({pointerEvents:E!==-1&&E!==X?"none":void 0})}}const UT=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],WT={entering:{opacity:1},entered:{opacity:1}},GT=k.forwardRef(function(t,n){const r=Gh(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:s=!0,children:a,easing:l,in:d,onEnter:f,onEntered:h,onEntering:v,onExit:C,onExited:w,onExiting:S,style:P,timeout:m=i,TransitionComponent:g=mw}=t,y=Me(t,UT),E=k.useRef(null),j=gn(E,a.ref,n),L=H=>U=>{if(H){const q=E.current;U===void 0?H(q):H(q,U)}},M=L(v),O=L((H,U)=>{gw(H);const q=vc({style:P,timeout:m,easing:l},{mode:"enter"});H.style.webkitTransition=r.transitions.create("opacity",q),H.style.transition=r.transitions.create("opacity",q),f&&f(H,U)}),I=L(h),_=L(S),B=L(H=>{const U=vc({style:P,timeout:m,easing:l},{mode:"exit"});H.style.webkitTransition=r.transitions.create("opacity",U),H.style.transition=r.transitions.create("opacity",U),C&&C(H)}),z=L(w),R=H=>{o&&o(E.current,H)};return c.jsx(g,V({appear:s,in:d,nodeRef:E,onEnter:O,onEntered:I,onEntering:M,onExit:B,onExited:z,onExiting:_,addEndListener:R,timeout:m},y,{children:(H,U)=>k.cloneElement(a,V({style:V({opacity:0,visibility:H==="exited"&&!d?"hidden":void 0},WT[H],P,a.props.style),ref:j},U))}))}),yw=GT;function qT(e){return Bt("MuiBackdrop",e)}St("MuiBackdrop",["root","invisible"]);const KT=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],YT=e=>{const{classes:t,invisible:n}=e;return Jt({root:["root",n&&"invisible"]},qT,t)},XT=Oe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>V({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),QT=k.forwardRef(function(t,n){var r,i,o;const s=Vt({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:d="div",components:f={},componentsProps:h={},invisible:v=!1,open:C,slotProps:w={},slots:S={},TransitionComponent:P=yw,transitionDuration:m}=s,g=Me(s,KT),y=V({},s,{component:d,invisible:v}),E=YT(y),j=(r=w.root)!=null?r:h.root;return c.jsx(P,V({in:C,timeout:m},g,{children:c.jsx(XT,V({"aria-hidden":!0},j,{as:(i=(o=S.root)!=null?o:f.Root)!=null?i:d,className:Ce(E.root,l,j==null?void 0:j.className),ownerState:V({},y,j==null?void 0:j.ownerState),classes:E,ref:n,children:a}))}))}),ww=QT;function ZT(e){return Bt("MuiModal",e)}St("MuiModal",["root","hidden","backdrop"]);const JT=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],e8=e=>{const{open:t,exited:n,classes:r}=e;return Jt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},ZT,r)},t8=Oe("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>V({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),n8=Oe(ww,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),r8=k.forwardRef(function(t,n){var r,i,o,s,a,l;const d=Vt({name:"MuiModal",props:t}),{BackdropComponent:f=n8,BackdropProps:h,className:v,closeAfterTransition:C=!1,children:w,container:S,component:P,components:m={},componentsProps:g={},disableAutoFocus:y=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:j=!1,disablePortal:L=!1,disableRestoreFocus:M=!1,disableScrollLock:O=!1,hideBackdrop:I=!1,keepMounted:_=!1,onBackdropClick:B,open:z,slotProps:R,slots:H}=d,U=Me(d,JT),q=V({},d,{closeAfterTransition:C,disableAutoFocus:y,disableEnforceFocus:E,disableEscapeKeyDown:j,disablePortal:L,disableRestoreFocus:M,disableScrollLock:O,hideBackdrop:I,keepMounted:_}),{getRootProps:ee,getBackdropProps:A,getTransitionProps:Y,portalRef:te,isTopModal:ce,exited:ue,hasTransition:F}=AT(V({},q,{rootRef:n})),he=V({},q,{exited:ue}),Le=e8(he),_e={};if(w.props.tabIndex===void 0&&(_e.tabIndex="-1"),F){const{onEnter:pe,onExited:de}=Y();_e.onEnter=pe,_e.onExited=de}const Ae=(r=(i=H==null?void 0:H.root)!=null?i:m.Root)!=null?r:t8,Pe=(o=(s=H==null?void 0:H.backdrop)!=null?s:m.Backdrop)!=null?o:f,be=(a=R==null?void 0:R.root)!=null?a:g.root,ft=(l=R==null?void 0:R.backdrop)!=null?l:g.backdrop,Ht=cn({elementType:Ae,externalSlotProps:be,externalForwardedProps:U,getSlotProps:ee,additionalProps:{ref:n,as:P},ownerState:he,className:Ce(v,be==null?void 0:be.className,Le==null?void 0:Le.root,!he.open&&he.exited&&(Le==null?void 0:Le.hidden))}),It=cn({elementType:Pe,externalSlotProps:ft,additionalProps:h,getSlotProps:pe=>A(V({},pe,{onClick:de=>{B&&B(de),pe!=null&&pe.onClick&&pe.onClick(de)}})),className:Ce(ft==null?void 0:ft.className,h==null?void 0:h.className,Le==null?void 0:Le.backdrop),ownerState:he});return!_&&!z&&(!F||ue)?null:c.jsx(jT,{ref:te,container:S,disablePortal:L,children:c.jsxs(Ae,V({},Ht,{children:[!I&&f?c.jsx(Pe,V({},It)):null,c.jsx(ET,{disableEnforceFocus:E,disableAutoFocus:y,disableRestoreFocus:M,isEnabled:ce,open:z,children:k.cloneElement(w,_e)})]}))})}),xw=r8;function i8(e){return Bt("MuiDialog",e)}const o8=St("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Od=o8,s8=k.createContext({}),bw=s8,a8=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],l8=Oe(ww,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),c8=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${Xe(n)}`],paper:["paper",`paperScroll${Xe(n)}`,`paperWidth${Xe(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return Jt(s,i8,t)},u8=Oe(xw,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),d8=Oe("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Xe(n.scroll)}`]]}})(({ownerState:e})=>V({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),f8=Oe(Zh,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Xe(n.scroll)}`],t[`paperWidth${Xe(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>V({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Od.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${Od.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Od.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),p8=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialog"}),i=Gh(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,BackdropComponent:l,BackdropProps:d,children:f,className:h,disableEscapeKeyDown:v=!1,fullScreen:C=!1,fullWidth:w=!1,maxWidth:S="sm",onBackdropClick:P,onClick:m,onClose:g,open:y,PaperComponent:E=Zh,PaperProps:j={},scroll:L="paper",TransitionComponent:M=yw,transitionDuration:O=o,TransitionProps:I}=r,_=Me(r,a8),B=V({},r,{disableEscapeKeyDown:v,fullScreen:C,fullWidth:w,maxWidth:S,scroll:L}),z=c8(B),R=k.useRef(),H=A=>{R.current=A.target===A.currentTarget},U=A=>{m&&m(A),R.current&&(R.current=null,P&&P(A),g&&g(A,"backdropClick"))},q=zh(a),ee=k.useMemo(()=>({titleId:q}),[q]);return c.jsx(u8,V({className:Ce(z.root,h),closeAfterTransition:!0,components:{Backdrop:l8},componentsProps:{backdrop:V({transitionDuration:O,as:l},d)},disableEscapeKeyDown:v,onClose:g,open:y,ref:n,onClick:U,ownerState:B},_,{children:c.jsx(M,V({appear:!0,in:y,timeout:O,role:"presentation"},I,{children:c.jsx(d8,{className:Ce(z.container),onMouseDown:H,ownerState:B,children:c.jsx(f8,V({as:E,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":q},j,{className:Ce(z.paper,j.className),ownerState:B,children:c.jsx(bw.Provider,{value:ee,children:f})}))})}))}))}),sp=p8;function h8(e){return Bt("MuiDialogActions",e)}St("MuiDialogActions",["root","spacing"]);const m8=["className","disableSpacing"],g8=e=>{const{classes:t,disableSpacing:n}=e;return Jt({root:["root",!n&&"spacing"]},h8,t)},v8=Oe("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>V({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),y8=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogActions"}),{className:i,disableSpacing:o=!1}=r,s=Me(r,m8),a=V({},r,{disableSpacing:o}),l=g8(a);return c.jsx(v8,V({className:Ce(l.root,i),ownerState:a,ref:n},s))}),ap=y8;function w8(e){return Bt("MuiDialogContent",e)}St("MuiDialogContent",["root","dividers"]);function x8(e){return Bt("MuiDialogTitle",e)}const b8=St("MuiDialogTitle",["root"]),S8=b8,C8=["className","dividers"],k8=e=>{const{classes:t,dividers:n}=e;return Jt({root:["root",n&&"dividers"]},w8,t)},E8=Oe("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>V({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${S8.root} + &`]:{paddingTop:0}})),P8=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogContent"}),{className:i,dividers:o=!1}=r,s=Me(r,C8),a=V({},r,{dividers:o}),l=k8(a);return c.jsx(E8,V({className:Ce(l.root,i),ownerState:a,ref:n},s))}),lp=P8,j8=["className","id"],T8=e=>{const{classes:t}=e;return Jt({root:["root"]},x8,t)},N8=Oe(yT,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),L8=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogTitle"}),{className:i,id:o}=r,s=Me(r,j8),a=r,l=T8(a),{titleId:d=o}=k.useContext(bw);return c.jsx(N8,V({component:"h2",className:Ce(l.root,i),ownerState:a,ref:n,variant:"h6",id:o??d},s))}),cp=L8,_8=St("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),ov=_8,M8=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function up(e){return`scale(${e}, ${e**2})`}const O8={entering:{opacity:1,transform:up(1)},entered:{opacity:1,transform:"none"}},Id=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Sw=k.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:s,in:a,onEnter:l,onEntered:d,onEntering:f,onExit:h,onExited:v,onExiting:C,style:w,timeout:S="auto",TransitionComponent:P=mw}=t,m=Me(t,M8),g=ew(),y=k.useRef(),E=Gh(),j=k.useRef(null),L=gn(j,o.ref,n),M=U=>q=>{if(U){const ee=j.current;q===void 0?U(ee):U(ee,q)}},O=M(f),I=M((U,q)=>{gw(U);const{duration:ee,delay:A,easing:Y}=vc({style:w,timeout:S,easing:s},{mode:"enter"});let te;S==="auto"?(te=E.transitions.getAutoHeightDuration(U.clientHeight),y.current=te):te=ee,U.style.transition=[E.transitions.create("opacity",{duration:te,delay:A}),E.transitions.create("transform",{duration:Id?te:te*.666,delay:A,easing:Y})].join(","),l&&l(U,q)}),_=M(d),B=M(C),z=M(U=>{const{duration:q,delay:ee,easing:A}=vc({style:w,timeout:S,easing:s},{mode:"exit"});let Y;S==="auto"?(Y=E.transitions.getAutoHeightDuration(U.clientHeight),y.current=Y):Y=q,U.style.transition=[E.transitions.create("opacity",{duration:Y,delay:ee}),E.transitions.create("transform",{duration:Id?Y:Y*.666,delay:Id?ee:ee||Y*.333,easing:A})].join(","),U.style.opacity=0,U.style.transform=up(.75),h&&h(U)}),R=M(v),H=U=>{S==="auto"&&g.start(y.current||0,U),r&&r(j.current,U)};return c.jsx(P,V({appear:i,in:a,nodeRef:j,onEnter:I,onEntered:_,onEntering:O,onExit:z,onExited:R,onExiting:B,addEndListener:H,timeout:S==="auto"?null:S},m,{children:(U,q)=>k.cloneElement(o,V({style:V({opacity:0,transform:up(.75),visibility:U==="exited"&&!a?"hidden":void 0},O8[U],w,o.props.style),ref:L},q))}))});Sw.muiSupportAuto=!0;const I8=Sw,$8=k.createContext({}),dp=$8;function A8(e){return Bt("MuiList",e)}St("MuiList",["root","padding","dense","subheader"]);const R8=["children","className","component","dense","disablePadding","subheader"],D8=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Jt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},A8,t)},z8=Oe("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>V({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),F8=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiList"}),{children:i,className:o,component:s="ul",dense:a=!1,disablePadding:l=!1,subheader:d}=r,f=Me(r,R8),h=k.useMemo(()=>({dense:a}),[a]),v=V({},r,{component:s,dense:a,disablePadding:l}),C=D8(v);return c.jsx(dp.Provider,{value:h,children:c.jsxs(z8,V({as:s,className:Ce(C.root,o),ref:n,ownerState:v},f,{children:[d,i]}))})}),B8=F8,V8=St("MuiListItemIcon",["root","alignItemsFlexStart"]),sv=V8,H8=St("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),av=H8,U8=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function $d(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function lv(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function Cw(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function ws(e,t,n,r,i,o){let s=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!Cw(a,o)||l)a=i(e,a,n);else return a.focus(),!0}return!1}const W8=k.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:s,className:a,disabledItemsFocusable:l=!1,disableListWrap:d=!1,onKeyDown:f,variant:h="selectedMenu"}=t,v=Me(t,U8),C=k.useRef(null),w=k.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});Ko(()=>{i&&C.current.focus()},[i]),k.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(y,{direction:E})=>{const j=!C.current.style.width;if(y.clientHeight{const E=C.current,j=y.key,L=Xt(E).activeElement;if(j==="ArrowDown")y.preventDefault(),ws(E,L,d,l,$d);else if(j==="ArrowUp")y.preventDefault(),ws(E,L,d,l,lv);else if(j==="Home")y.preventDefault(),ws(E,null,d,l,$d);else if(j==="End")y.preventDefault(),ws(E,null,d,l,lv);else if(j.length===1){const M=w.current,O=j.toLowerCase(),I=performance.now();M.keys.length>0&&(I-M.lastTime>500?(M.keys=[],M.repeating=!0,M.previousKeyMatched=!0):M.repeating&&O!==M.keys[0]&&(M.repeating=!1)),M.lastTime=I,M.keys.push(O);const _=L&&!M.repeating&&Cw(L,M);M.previousKeyMatched&&(_||ws(E,L,!1,l,$d,M))?y.preventDefault():M.previousKeyMatched=!1}f&&f(y)},P=gn(C,n);let m=-1;k.Children.forEach(s,(y,E)=>{if(!k.isValidElement(y)){m===E&&(m+=1,m>=s.length&&(m=-1));return}y.props.disabled||(h==="selectedMenu"&&y.props.selected||m===-1)&&(m=E),m===E&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(m+=1,m>=s.length&&(m=-1))});const g=k.Children.map(s,(y,E)=>{if(E===m){const j={};return o&&(j.autoFocus=!0),y.props.tabIndex===void 0&&h==="selectedMenu"&&(j.tabIndex=0),k.cloneElement(y,j)}return y});return c.jsx(B8,V({role:"menu",ref:P,className:a,onKeyDown:S,tabIndex:i?0:-1},v,{children:g}))}),G8=W8;function q8(e){return Bt("MuiPopover",e)}St("MuiPopover",["root","paper"]);const K8=["onEntering"],Y8=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],X8=["slotProps"];function cv(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function uv(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function dv(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Ad(e){return typeof e=="function"?e():e}const Q8=e=>{const{classes:t}=e;return Jt({root:["root"],paper:["paper"]},q8,t)},Z8=Oe(xw,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),kw=Oe(Zh,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),J8=k.forwardRef(function(t,n){var r,i,o;const s=Vt({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:h="anchorEl",children:v,className:C,container:w,elevation:S=8,marginThreshold:P=16,open:m,PaperProps:g={},slots:y,slotProps:E,transformOrigin:j={vertical:"top",horizontal:"left"},TransitionComponent:L=I8,transitionDuration:M="auto",TransitionProps:{onEntering:O}={},disableScrollLock:I=!1}=s,_=Me(s.TransitionProps,K8),B=Me(s,Y8),z=(r=E==null?void 0:E.paper)!=null?r:g,R=k.useRef(),H=gn(R,z.ref),U=V({},s,{anchorOrigin:d,anchorReference:h,elevation:S,marginThreshold:P,externalPaperSlotProps:z,transformOrigin:j,TransitionComponent:L,transitionDuration:M,TransitionProps:_}),q=Q8(U),ee=k.useCallback(()=>{if(h==="anchorPosition")return f;const pe=Ad(l),se=(pe&&pe.nodeType===1?pe:Xt(R.current).body).getBoundingClientRect();return{top:se.top+cv(se,d.vertical),left:se.left+uv(se,d.horizontal)}},[l,d.horizontal,d.vertical,f,h]),A=k.useCallback(pe=>({vertical:cv(pe,j.vertical),horizontal:uv(pe,j.horizontal)}),[j.horizontal,j.vertical]),Y=k.useCallback(pe=>{const de={width:pe.offsetWidth,height:pe.offsetHeight},se=A(de);if(h==="none")return{top:null,left:null,transformOrigin:dv(se)};const ke=ee();let me=ke.top-se.vertical,N=ke.left-se.horizontal;const D=me+de.height,$=N+de.width,Q=ya(Ad(l)),Z=Q.innerHeight-P,K=Q.innerWidth-P;if(P!==null&&meZ){const ne=D-Z;me-=ne,se.vertical+=ne}if(P!==null&&NK){const ne=$-K;N-=ne,se.horizontal+=ne}return{top:`${Math.round(me)}px`,left:`${Math.round(N)}px`,transformOrigin:dv(se)}},[l,h,ee,A,P]),[te,ce]=k.useState(m),ue=k.useCallback(()=>{const pe=R.current;if(!pe)return;const de=Y(pe);de.top!==null&&(pe.style.top=de.top),de.left!==null&&(pe.style.left=de.left),pe.style.transformOrigin=de.transformOrigin,ce(!0)},[Y]);k.useEffect(()=>(I&&window.addEventListener("scroll",ue),()=>window.removeEventListener("scroll",ue)),[l,I,ue]);const F=(pe,de)=>{O&&O(pe,de),ue()},he=()=>{ce(!1)};k.useEffect(()=>{m&&ue()}),k.useImperativeHandle(a,()=>m?{updatePosition:()=>{ue()}}:null,[m,ue]),k.useEffect(()=>{if(!m)return;const pe=nj(()=>{ue()}),de=ya(l);return de.addEventListener("resize",pe),()=>{pe.clear(),de.removeEventListener("resize",pe)}},[l,m,ue]);let Le=M;M==="auto"&&!L.muiSupportAuto&&(Le=void 0);const _e=w||(l?Xt(Ad(l)).body:void 0),Ae=(i=y==null?void 0:y.root)!=null?i:Z8,Pe=(o=y==null?void 0:y.paper)!=null?o:kw,be=cn({elementType:Pe,externalSlotProps:V({},z,{style:te?z.style:V({},z.style,{opacity:0})}),additionalProps:{elevation:S,ref:H},ownerState:U,className:Ce(q.paper,z==null?void 0:z.className)}),ft=cn({elementType:Ae,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:B,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:_e,open:m},ownerState:U,className:Ce(q.root,C)}),{slotProps:Ht}=ft,It=Me(ft,X8);return c.jsx(Ae,V({},It,!$o(Ae)&&{slotProps:Ht,disableScrollLock:I},{children:c.jsx(L,V({appear:!0,in:m,onEntering:F,onExited:he,timeout:Le},_,{children:c.jsx(Pe,V({},be,{children:v}))}))}))}),eN=J8;function tN(e){return Bt("MuiMenu",e)}St("MuiMenu",["root","paper","list"]);const nN=["onEntering"],rN=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],iN={vertical:"top",horizontal:"right"},oN={vertical:"top",horizontal:"left"},sN=e=>{const{classes:t}=e;return Jt({root:["root"],paper:["paper"],list:["list"]},tN,t)},aN=Oe(eN,{shouldForwardProp:e=>qh(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),lN=Oe(kw,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),cN=Oe(G8,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),uN=k.forwardRef(function(t,n){var r,i;const o=Vt({props:t,name:"MuiMenu"}),{autoFocus:s=!0,children:a,className:l,disableAutoFocusItem:d=!1,MenuListProps:f={},onClose:h,open:v,PaperProps:C={},PopoverClasses:w,transitionDuration:S="auto",TransitionProps:{onEntering:P}={},variant:m="selectedMenu",slots:g={},slotProps:y={}}=o,E=Me(o.TransitionProps,nN),j=Me(o,rN),L=Bh(),M=V({},o,{autoFocus:s,disableAutoFocusItem:d,MenuListProps:f,onEntering:P,PaperProps:C,transitionDuration:S,TransitionProps:E,variant:m}),O=sN(M),I=s&&!d&&v,_=k.useRef(null),B=(A,Y)=>{_.current&&_.current.adjustStyleForScrollbar(A,{direction:L?"rtl":"ltr"}),P&&P(A,Y)},z=A=>{A.key==="Tab"&&(A.preventDefault(),h&&h(A,"tabKeyDown"))};let R=-1;k.Children.map(a,(A,Y)=>{k.isValidElement(A)&&(A.props.disabled||(m==="selectedMenu"&&A.props.selected||R===-1)&&(R=Y))});const H=(r=g.paper)!=null?r:lN,U=(i=y.paper)!=null?i:C,q=cn({elementType:g.root,externalSlotProps:y.root,ownerState:M,className:[O.root,l]}),ee=cn({elementType:H,externalSlotProps:U,ownerState:M,className:O.paper});return c.jsx(aN,V({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:L?"right":"left"},transformOrigin:L?iN:oN,slots:{paper:H,root:g.root},slotProps:{root:q,paper:ee},open:v,ref:n,transitionDuration:S,TransitionProps:V({onEntering:B},E),ownerState:M},j,{classes:w,children:c.jsx(cN,V({onKeyDown:z,actions:_,autoFocus:s&&(R===-1||d),autoFocusItem:I,variant:m},f,{className:Ce(O.list,f.className),children:a}))}))}),fp=uN;function dN(e){return Bt("MuiMenuItem",e)}const fN=St("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xs=fN,pN=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],hN=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},mN=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:o,classes:s}=e,l=Jt({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",o&&"selected"]},dN,s);return V({},s,l)},gN=Oe(uT,{shouldForwardProp:e=>qh(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:hN})(({theme:e,ownerState:t})=>V({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${xs.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Yr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${xs.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Yr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${xs.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Yr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Yr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${xs.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${xs.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${ov.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${ov.inset}`]:{marginLeft:52},[`& .${av.root}`]:{marginTop:0,marginBottom:0},[`& .${av.inset}`]:{paddingLeft:36},[`& .${sv.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&V({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${sv.root} svg`]:{fontSize:"1.25rem"}}))),vN=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:o="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:d,role:f="menuitem",tabIndex:h,className:v}=r,C=Me(r,pN),w=k.useContext(dp),S=k.useMemo(()=>({dense:s||w.dense||!1,disableGutters:l}),[w.dense,s,l]),P=k.useRef(null);Ko(()=>{i&&P.current&&P.current.focus()},[i]);const m=V({},r,{dense:S.dense,divider:a,disableGutters:l}),g=mN(r),y=gn(P,n);let E;return r.disabled||(E=h!==void 0?h:-1),c.jsx(dp.Provider,{value:S,children:c.jsx(gN,V({ref:y,role:f,tabIndex:E,component:o,focusVisibleClassName:Ce(g.focusVisible,d),className:Ce(g.root,v)},C,{ownerState:m,classes:g}))})}),Ls=vN,yN=fw(c.jsx("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),wN=fw(c.jsx("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder");function xN(e){return Bt("MuiRating",e)}const bN=St("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]),bs=bN,SN=["value"],CN=["className","defaultValue","disabled","emptyIcon","emptyLabelText","getLabelText","highlightSelectedOnly","icon","IconContainerComponent","max","name","onChange","onChangeActive","onMouseLeave","onMouseMove","precision","readOnly","size","value"];function kN(e){const t=e.toString().split(".")[1];return t?t.length:0}function Rd(e,t){if(e==null)return e;const n=Math.round(e/t)*t;return Number(n.toFixed(kN(t)))}const EN=e=>{const{classes:t,size:n,readOnly:r,disabled:i,emptyValueFocused:o,focusVisible:s}=e,a={root:["root",`size${Xe(n)}`,i&&"disabled",s&&"focusVisible",r&&"readOnly"],label:["label","pristine"],labelEmptyValue:[o&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]};return Jt(a,xN,t)},PN=Oe("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${bs.visuallyHidden}`]:t.visuallyHidden},t.root,t[`size${Xe(n.size)}`],n.readOnly&&t.readOnly]}})(({theme:e,ownerState:t})=>V({display:"inline-flex",position:"relative",fontSize:e.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",width:"min-content",WebkitTapHighlightColor:"transparent",[`&.${bs.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${bs.focusVisible} .${bs.iconActive}`]:{outline:"1px solid #999"},[`& .${bs.visuallyHidden}`]:nw},t.size==="small"&&{fontSize:e.typography.pxToRem(18)},t.size==="large"&&{fontSize:e.typography.pxToRem(30)},t.readOnly&&{pointerEvents:"none"})),Ew=Oe("label",{name:"MuiRating",slot:"Label",overridesResolver:({ownerState:e},t)=>[t.label,e.emptyValueFocused&&t.labelEmptyValueActive]})(({ownerState:e})=>V({cursor:"inherit"},e.emptyValueFocused&&{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"})),jN=Oe("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.iconEmpty&&t.iconEmpty,n.iconFilled&&t.iconFilled,n.iconHover&&t.iconHover,n.iconFocus&&t.iconFocus,n.iconActive&&t.iconActive]}})(({theme:e,ownerState:t})=>V({display:"flex",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),pointerEvents:"none"},t.iconActive&&{transform:"scale(1.2)"},t.iconEmpty&&{color:(e.vars||e).palette.action.disabled})),TN=Oe("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>Ou(e)&&e!=="iconActive",overridesResolver:(e,t)=>{const{iconActive:n}=e;return[t.decimal,n&&t.iconActive]}})(({iconActive:e})=>V({position:"relative"},e&&{transform:"scale(1.2)"}));function NN(e){const t=Me(e,SN);return c.jsx("span",V({},t))}function fv(e){const{classes:t,disabled:n,emptyIcon:r,focus:i,getLabelText:o,highlightSelectedOnly:s,hover:a,icon:l,IconContainerComponent:d,isActive:f,itemValue:h,labelProps:v,name:C,onBlur:w,onChange:S,onClick:P,onFocus:m,readOnly:g,ownerState:y,ratingValue:E,ratingValueRounded:j}=e,L=s?h===E:h<=E,M=h<=a,O=h<=i,I=h===j,_=zh(),B=c.jsx(jN,{as:d,value:h,className:Ce(t.icon,L?t.iconFilled:t.iconEmpty,M&&t.iconHover,O&&t.iconFocus,f&&t.iconActive),ownerState:V({},y,{iconEmpty:!L,iconFilled:L,iconHover:M,iconFocus:O,iconActive:f}),children:r&&!L?r:l});return g?c.jsx("span",V({},v,{children:B})):c.jsxs(k.Fragment,{children:[c.jsxs(Ew,V({ownerState:V({},y,{emptyValueFocused:void 0}),htmlFor:_},v,{children:[B,c.jsx("span",{className:t.visuallyHidden,children:o(h)})]})),c.jsx("input",{className:t.visuallyHidden,onFocus:m,onBlur:w,onChange:S,onClick:P,disabled:n,value:h,id:_,type:"radio",name:C,checked:I})]})}const LN=c.jsx(yN,{fontSize:"inherit"}),_N=c.jsx(wN,{fontSize:"inherit"});function MN(e){return`${e} Star${e!==1?"s":""}`}const ON=k.forwardRef(function(t,n){const r=Vt({name:"MuiRating",props:t}),{className:i,defaultValue:o=null,disabled:s=!1,emptyIcon:a=_N,emptyLabelText:l="Empty",getLabelText:d=MN,highlightSelectedOnly:f=!1,icon:h=LN,IconContainerComponent:v=NN,max:C=5,name:w,onChange:S,onChangeActive:P,onMouseLeave:m,onMouseMove:g,precision:y=1,readOnly:E=!1,size:j="medium",value:L}=r,M=Me(r,CN),O=zh(w),[I,_]=J2({controlled:L,default:o,name:"Rating"}),B=Rd(I,y),z=Bh(),[{hover:R,focus:H},U]=k.useState({hover:-1,focus:-1});let q=B;R!==-1&&(q=R),H!==-1&&(q=H);const{isFocusVisibleRef:ee,onBlur:A,onFocus:Y,ref:te}=Fh(),[ce,ue]=k.useState(!1),F=k.useRef(),he=gn(te,F,n),Le=se=>{g&&g(se);const ke=F.current,{right:me,left:N,width:D}=ke.getBoundingClientRect();let $;z?$=(me-se.clientX)/D:$=(se.clientX-N)/D;let Q=Rd(C*$+y/2,y);Q=Pi(Q,y,C),U(Z=>Z.hover===Q&&Z.focus===Q?Z:{hover:Q,focus:Q}),ue(!1),P&&R!==Q&&P(se,Q)},_e=se=>{m&&m(se);const ke=-1;U({hover:ke,focus:ke}),P&&R!==ke&&P(se,ke)},Ae=se=>{let ke=se.target.value===""?null:parseFloat(se.target.value);R!==-1&&(ke=R),_(ke),S&&S(se,ke)},Pe=se=>{se.clientX===0&&se.clientY===0||(U({hover:-1,focus:-1}),_(null),S&&parseFloat(se.target.value)===B&&S(se,null))},be=se=>{Y(se),ee.current===!0&&ue(!0);const ke=parseFloat(se.target.value);U(me=>({hover:me.hover,focus:ke}))},ft=se=>{if(R!==-1)return;A(se),ee.current===!1&&ue(!1);const ke=-1;U(me=>({hover:me.hover,focus:ke}))},[Ht,It]=k.useState(!1),pe=V({},r,{defaultValue:o,disabled:s,emptyIcon:a,emptyLabelText:l,emptyValueFocused:Ht,focusVisible:ce,getLabelText:d,icon:h,IconContainerComponent:v,max:C,precision:y,readOnly:E,size:j}),de=EN(pe);return c.jsxs(PN,V({ref:he,onMouseMove:Le,onMouseLeave:_e,className:Ce(de.root,i,E&&"MuiRating-readOnly"),ownerState:pe,role:E?"img":null,"aria-label":E?d(q):null},M,{children:[Array.from(new Array(C)).map((se,ke)=>{const me=ke+1,N={classes:de,disabled:s,emptyIcon:a,focus:H,getLabelText:d,highlightSelectedOnly:f,hover:R,icon:h,IconContainerComponent:v,name:O,onBlur:ft,onChange:Ae,onClick:Pe,onFocus:be,ratingValue:q,ratingValueRounded:B,readOnly:E,ownerState:pe},D=me===Math.ceil(q)&&(R!==-1||H!==-1);if(y<1){const $=Array.from(new Array(1/y));return c.jsx(TN,{className:Ce(de.decimal,D&&de.iconActive),ownerState:pe,iconActive:D,children:$.map((Q,Z)=>{const K=Rd(me-1+(Z+1)*y,y);return c.jsx(fv,V({},N,{isActive:!1,itemValue:K,labelProps:{style:$.length-1===Z?{}:{width:K===q?`${(Z+1)*y*100}%`:"0%",overflow:"hidden",position:"absolute"}}}),K)})},me)}return c.jsx(fv,V({},N,{isActive:D,itemValue:me}),me)}),!E&&!s&&c.jsxs(Ew,{className:Ce(de.label,de.labelEmptyValue),ownerState:pe,children:[c.jsx("input",{className:de.visuallyHidden,value:"",id:`${O}-empty`,type:"radio",name:O,checked:B==null,onFocus:()=>It(!0),onBlur:()=>It(!1),onChange:Ae}),c.jsx("span",{className:de.visuallyHidden,children:l})]})]}))}),Pw=ON,IN=e=>!e||!$o(e);function $N(e){return Bt("MuiSlider",e)}const AN=St("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),zn=AN,RN=e=>{const{open:t}=e;return{offset:Ce(t&&zn.valueLabelOpen),circle:zn.valueLabelCircle,label:zn.valueLabelLabel}};function DN(e){const{children:t,className:n,value:r}=e,i=RN(e);return t?k.cloneElement(t,{className:Ce(t.props.className)},c.jsxs(k.Fragment,{children:[t.props.children,c.jsx("span",{className:Ce(i.offset,n),"aria-hidden":!0,children:c.jsx("span",{className:i.circle,children:c.jsx("span",{className:i.label,children:r})})})]})):null}const zN=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],FN=N6();function pv(e){return e}const BN=Oe("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Xe(n.color)}`],n.size!=="medium"&&t[`size${Xe(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${zn.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${zn.dragging}`]:{[`& .${zn.thumb}, & .${zn.track}`]:{transition:"none"}},variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),VN=Oe("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),HN=Oe("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>{var t;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n,track:"inverted"},style:V({},e.vars?{backgroundColor:e.vars.palette.Slider[`${n}Track`],borderColor:e.vars.palette.Slider[`${n}Track`]}:V({backgroundColor:ep(e.palette[n].main,.62),borderColor:ep(e.palette[n].main,.62)},e.applyStyles("dark",{backgroundColor:Jf(e.palette[n].main,.5)}),e.applyStyles("dark",{borderColor:Jf(e.palette[n].main,.5)})))}))]}}),UN=Oe("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Xe(n.color)}`],n.size!=="medium"&&t[`thumbSize${Xe(n.size)}`]]}})(({theme:e})=>{var t;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${zn.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n},style:{[`&:hover, &.${zn.focusVisible}`]:V({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Yr(e.palette[n].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${zn.active}`]:V({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[n].mainChannel} / 0.16)}`}:{boxShadow:`0px 0px 0px 14px ${Yr(e.palette[n].main,.16)}`})}}))]}}),WN=Oe(DN,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>V({zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${zn.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${zn.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),GN=Oe("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Ou(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]})),qN=Oe("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Ou(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>V({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]})),KN=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:o,classes:s,color:a,size:l}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",o==="inverted"&&"trackInverted",o===!1&&"trackFalse",a&&`color${Xe(a)}`,l&&`size${Xe(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Xe(l)}`,a&&`thumbColor${Xe(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Jt(d,$N,s)},YN=({children:e})=>e,XN=k.forwardRef(function(t,n){var r,i,o,s,a,l,d,f,h,v,C,w,S,P,m,g,y,E,j,L,M,O,I,_;const B=FN({props:t,name:"MuiSlider"}),z=Bh(),{"aria-label":R,"aria-valuetext":H,"aria-labelledby":U,component:q="span",components:ee={},componentsProps:A={},color:Y="primary",classes:te,className:ce,disableSwap:ue=!1,disabled:F=!1,getAriaLabel:he,getAriaValueText:Le,marks:_e=!1,max:Ae=100,min:Pe=0,orientation:be="horizontal",shiftStep:ft=10,size:Ht="medium",step:It=1,scale:pe=pv,slotProps:de,slots:se,track:ke="normal",valueLabelDisplay:me="off",valueLabelFormat:N=pv}=B,D=Me(B,zN),$=V({},B,{isRtl:z,max:Ae,min:Pe,classes:te,disabled:F,disableSwap:ue,orientation:be,marks:_e,color:Y,size:Ht,step:It,shiftStep:ft,scale:pe,track:ke,valueLabelDisplay:me,valueLabelFormat:N}),{axisProps:Q,getRootProps:Z,getHiddenInputProps:K,getThumbProps:ne,open:xe,active:Ve,axis:Ue,focusedThumbIndex:X,range:G,dragging:ae,marks:Se,values:ye,trackOffset:ge,trackLeap:Ut,getThumbStyle:Tt}=HT(V({},$,{rootRef:n}));$.marked=Se.length>0&&Se.some(tt=>tt.label),$.dragging=ae,$.focusedThumbIndex=X;const Ie=KN($),an=(r=(i=se==null?void 0:se.root)!=null?i:ee.Root)!=null?r:BN,ir=(o=(s=se==null?void 0:se.rail)!=null?s:ee.Rail)!=null?o:VN,Gi=(a=(l=se==null?void 0:se.track)!=null?l:ee.Track)!=null?a:HN,mi=(d=(f=se==null?void 0:se.thumb)!=null?f:ee.Thumb)!=null?d:UN,Oa=(h=(v=se==null?void 0:se.valueLabel)!=null?v:ee.ValueLabel)!=null?h:WN,$t=(C=(w=se==null?void 0:se.mark)!=null?w:ee.Mark)!=null?C:GN,yn=(S=(P=se==null?void 0:se.markLabel)!=null?P:ee.MarkLabel)!=null?S:qN,Ia=(m=(g=se==null?void 0:se.input)!=null?g:ee.Input)!=null?m:"input",Wt=(y=de==null?void 0:de.root)!=null?y:A.root,qi=(E=de==null?void 0:de.rail)!=null?E:A.rail,Ki=(j=de==null?void 0:de.track)!=null?j:A.track,Yi=(L=de==null?void 0:de.thumb)!=null?L:A.thumb,je=(M=de==null?void 0:de.valueLabel)!=null?M:A.valueLabel,Mn=(O=de==null?void 0:de.mark)!=null?O:A.mark,or=(I=de==null?void 0:de.markLabel)!=null?I:A.markLabel,br=(_=de==null?void 0:de.input)!=null?_:A.input,wt=cn({elementType:an,getSlotProps:Z,externalSlotProps:Wt,externalForwardedProps:D,additionalProps:V({},IN(an)&&{as:q}),ownerState:V({},$,Wt==null?void 0:Wt.ownerState),className:[Ie.root,ce]}),Nt=cn({elementType:ir,externalSlotProps:qi,ownerState:$,className:Ie.rail}),rs=cn({elementType:Gi,externalSlotProps:Ki,additionalProps:{style:V({},Q[Ue].offset(ge),Q[Ue].leap(Ut))},ownerState:V({},$,Ki==null?void 0:Ki.ownerState),className:Ie.track}),Xi=cn({elementType:mi,getSlotProps:ne,externalSlotProps:Yi,ownerState:V({},$,Yi==null?void 0:Yi.ownerState),className:Ie.thumb}),gi=cn({elementType:Oa,externalSlotProps:je,ownerState:V({},$,je==null?void 0:je.ownerState),className:Ie.valueLabel}),At=cn({elementType:$t,externalSlotProps:Mn,ownerState:$,className:Ie.mark}),is=cn({elementType:yn,externalSlotProps:or,ownerState:$,className:Ie.markLabel}),$a=cn({elementType:Ia,getSlotProps:K,externalSlotProps:br,ownerState:$});return c.jsxs(an,V({},wt,{children:[c.jsx(ir,V({},Nt)),c.jsx(Gi,V({},rs)),Se.filter(tt=>tt.value>=Pe&&tt.value<=Ae).map((tt,pt)=>{const os=yc(tt.value,Pe,Ae),vi=Q[Ue].offset(os);let qn;return ke===!1?qn=ye.indexOf(tt.value)!==-1:qn=ke==="normal"&&(G?tt.value>=ye[0]&&tt.value<=ye[ye.length-1]:tt.value<=ye[0])||ke==="inverted"&&(G?tt.value<=ye[0]||tt.value>=ye[ye.length-1]:tt.value>=ye[0]),c.jsxs(k.Fragment,{children:[c.jsx($t,V({"data-index":pt},At,!$o($t)&&{markActive:qn},{style:V({},vi,At.style),className:Ce(At.className,qn&&Ie.markActive)})),tt.label!=null?c.jsx(yn,V({"aria-hidden":!0,"data-index":pt},is,!$o(yn)&&{markLabelActive:qn},{style:V({},vi,is.style),className:Ce(Ie.markLabel,is.className,qn&&Ie.markLabelActive),children:tt.label})):null]},pt)}),ye.map((tt,pt)=>{const os=yc(tt,Pe,Ae),vi=Q[Ue].offset(os),qn=me==="off"?YN:Oa;return c.jsx(qn,V({},!$o(qn)&&{valueLabelFormat:N,valueLabelDisplay:me,value:typeof N=="function"?N(pe(tt),pt):N,index:pt,open:xe===pt||Ve===pt||me==="on",disabled:F},gi,{children:c.jsx(mi,V({"data-index":pt},Xi,{className:Ce(Ie.thumb,Xi.className,Ve===pt&&Ie.active,X===pt&&Ie.focusVisible),style:V({},vi,Tt(pt),Xi.style),children:c.jsx(Ia,V({"data-index":pt,"aria-label":he?he(pt):R,"aria-valuenow":pe(tt),"aria-labelledby":U,"aria-valuetext":Le?Le(pe(tt),pt):H,value:ye[pt]},$a))}))}),pt)})]}))}),QN=XN,ZN=({isLoggedIn:e,anchorMenuEl:t,open:n,handleClose:r,handleLogout:i})=>e?c.jsxs(fp,{open:n,anchorEl:t,onClose:r,sx:{".dark & .MuiMenu-list":{backgroundColor:"rgb(71 85 105)"},"& .MuiMenu-list":{backgroundColor:"rgb(241 245 249)"}},children:[c.jsx(Ls,{onClick:r,className:"p-0",children:c.jsx(Je,{to:`${ve}account/user`,className:"block px-4 py-2 text-center hover:bg-slate-200 dark:hover:bg-slate-800 w-32","aria-label":"Account",children:c.jsx("p",{children:"Account"})})}),c.jsx(Ls,{onClick:i,className:"p-0",children:c.jsx("p",{className:"block px-4 py-2 w-32 hover:bg-slate-200 dark:hover:bg-slate-800 text-center","aria-label":"Logout",children:"Logout"})})]}):c.jsxs(fp,{open:n,anchorEl:t,onClose:r,sx:{".dark & .MuiMenu-list":{backgroundColor:"rgb(71 85 105)"},"& .MuiMenu-list":{backgroundColor:"rgb(241 245 249)"}},children:[c.jsx(Ls,{onClick:r,className:"p-0",children:c.jsx(Je,{to:`${ve}login`,className:"block px-4 py-2 text-center hover:bg-slate-200 dark:hover:bg-slate-800 w-32","aria-label":"Login",children:c.jsx("p",{children:"Login"})})}),c.jsx(Ls,{onClick:r,className:"p-0",children:c.jsx(Je,{to:`${ve}register`,className:"block px-4 py-2 text-center hover:bg-slate-200 dark:hover:bg-slate-800 w-32","aria-label":"Register",children:c.jsx("p",{children:"Register"})})})]}),JN="_dark_1bzky_4",eL="_light_1bzky_7",hv={"toggle-button":"_toggle-button_1bzky_1",dark:JN,light:eL},tL=()=>{const{isDark:e}=k.useContext(Ch),t=e?"dark":"light";return c.jsx("div",{className:`${hv["toggle-button"]} ${hv[t]}`,"aria-label":`Switch to ${e?"light":"dark"} mode`,children:e?c.jsx(h5,{className:"h-6 w-6 text-blue-200"}):c.jsx(m5,{className:"h-8 w-8 pt-2 -translate-y-[0.2rem] text-yellow-200"})})},nL=({onClick:e})=>{const{toggleTheme:t}=k.useContext(Ch),{isLoggedIn:n,logout:r}=k.useContext(Nn),{openCart:i,cartQuantity:o}=hi(),[s,a]=k.useState(null),l=!!s,d=v=>{a(v.currentTarget)},f=()=>{a(null)},h=()=>{r(),f(),fe.success("Logged out successfully!")};return c.jsxs("div",{className:"flex flex-row w-36 justify-evenly items-center",children:[c.jsx(Eo,{id:"search-bar-button",ariaLabel:"Open search bar button on mobile",onClick:e,children:c.jsx(m2,{className:"h-8 w-8 sm:hidden"})}),c.jsx(Eo,{id:"dark-mode-button",ariaLabel:"Dark mode button",onClick:t,children:c.jsx(tL,{})}),c.jsxs(Eo,{id:"cart-button",ariaLabel:"Cart button",onClick:i,children:[c.jsx(Qc,{className:"h-8 w-8"}),c.jsx("div",{className:"rounded-full bg-red-500 flex justify-center items-center text-white w-4 h-4 absolute top-0 right-0 translate-x-1 -translate-y-1",children:o})]}),c.jsx(Eo,{id:"account-button",ariaLabel:"Account button",onClick:d,children:c.jsx(Sh,{className:"h-8 w-8"})}),c.jsx(ZN,{isLoggedIn:n,anchorMenuEl:s,open:l,handleClose:f,handleLogout:h})]})},rL=()=>c.jsx("img",{src:`${ve}/assets/logo.png`,alt:"E-commerce logo",className:"max-h-16 hover-button"}),mv=({display:e,height:t,width:n,rounded:r="",onClick:i})=>{const[o,s]=k.useState(""),a=ut(),l=d=>{d.preventDefault(),o!==""&&(a(`${ve}category/search?name=${o}`),i&&i(),s(""))};return c.jsxs("form",{id:"search-form",className:`${e} font-body flex items-center justify-between py-4 px-2 gap-2.5 isolate bg-secondary-regular ${r} ${n} ${t}`,onSubmit:l,children:[c.jsx("input",{id:"search",name:"search",type:"search",placeholder:"Search product by name...",className:"bg-transparent w-full h-full text-white placeholder-white focus:outline-none border-none",value:o,onChange:d=>s(d.target.value),"aria-label":"Search product by name"}),c.jsx(Eo,{id:"search-button",ariaLabel:"Search button",children:c.jsx(m2,{className:"h-6 w-6"})}),c.jsx(Eo,{id:"close-button",ariaLabel:"Close search",isHidden:!0,onClick:i,children:c.jsx(Ea,{className:"h-10 w-10"})})]})},iL=()=>{const[e,t]=k.useState(!0),n=()=>{t(r=>!r)};return c.jsx("header",{className:"bg-primary-regular text-white flex flex-row justify-between items-center",children:e?c.jsxs(c.Fragment,{children:[c.jsx(Je,{to:"/","aria-label":"Home",children:c.jsx(rL,{})}),c.jsx(mv,{display:"hidden sm:flex",height:"h-12",width:"w-[32rem]",rounded:"rounded-3xl"}),c.jsx(nL,{onClick:n})]}):c.jsx(mv,{display:"flex",height:"h-16",width:"w-full",onClick:n})})},Pr=({children:e})=>c.jsx("span",{className:"text-accent-regular dark:text-accent-light",children:e}),Ii=e=>e.charAt(0).toUpperCase()+e.slice(1);function oL(e){return e.charAt(0).toLowerCase()+e.slice(1)}function gv(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2")}function Jh(e){if(e.length===0)return[void 0,void 0];const t=e.split("_");if(t.length!==2)throw new Error("Input string must contain exactly one underscore.");return t}function jw(e){return sL(e.split("T")[0])}function sL(e){const t=new Date(e),n=t.getDate().toString().padStart(2,"0"),r=(t.getMonth()+1).toString().padStart(2,"0"),i=t.getFullYear();return`${n}/${r}/${i}`}const em=({name:e,errors:t,register:n,...r})=>{var S,P;const i=k.useRef(null),o=(P=(S=t[e])==null?void 0:S.message)==null?void 0:P.toString(),s=Ii(o??""),[a,l]=k.useState(!1),[d,f]=k.useState(!1),h=Number.MAX_SAFE_INTEGER,{ref:v,...C}=n(e,{required:`${e} is required`,minLength:{value:r.minLength??2,message:`Minimum length is ${r.minLength??1}`},maxLength:{value:r.maxLength??Number.MAX_SAFE_INTEGER,message:`Maximum length is ${r.maxLength??h}`}}),w=m=>{m&&(m.style.height="auto",m.style.height=`${m.scrollHeight}px`)};return k.useEffect(()=>{if(a){f(!0);const m=setTimeout(()=>{l(!1)},5e3);return()=>clearTimeout(m)}else{const m=setTimeout(()=>{f(!1)},500);return()=>clearTimeout(m)}},[a]),k.useEffect(()=>{i.current&&w(i.current)},[]),c.jsxs("div",{className:"flex flex-col w-full md:min-h-80 items-center px-4 mb-4",children:[c.jsx("label",{htmlFor:e,className:"self-start",children:Ii(e)}),c.jsx("textarea",{className:"overflow-hidden resize-none md:min-h-80",id:e,...C,ref:m=>{v(m),i.current=m},onInput:m=>{w(m.currentTarget),m.currentTarget.value.length===r.maxLength?l(!0):l(!1)},"aria-label":"Enter your message here",...r}),t[e]&&c.jsxs("p",{className:"text-red-500 mb-4",children:[s,"!"]}),d&&c.jsx("p",{className:`text-amber-500 h-0 my-4 transition-opacity duration-500 ease-in-out ${a?"opacity-100":"opacity-0"}`,children:"Maximum length reached!"})]})},Tw=e=>/\.(jpeg|jpg|gif|png|svg|webp|bmp|tiff?)$/i.test(e),aL=({image:e})=>Tw(e)?c.jsx("img",{src:e,alt:"User Avatar",className:"size-48 sm:size-80 rounded-full mx-auto my-4"}):c.jsx(Sh,{className:"size-48 sm:size-80 rounded-full mx-auto my-4 text-primary-regular dark:text-primary-light"}),Nw=e=>c.jsx("div",{onClick:e.onClick,className:"bg-slate-100 hover:bg-slate-300 hover:dark:bg-slate-500 dark:bg-slate-700 w-fit border-primary-regular dark:border-white border text-slate-600 text-xl shadow-lg shadow-primary-regular rounded-3xl dark:shadow-secondary-light cursor-pointer flex flex-col items-center",children:e.children}),lL=({src:e,size:t,alt:n})=>c.jsx("div",{className:`${t} border border-primary-regular dark:border-white rounded-3xl sm:rounded-[4rem] shadow-2xl shadow-primary-regular dark:shadow-secondary-light hover:scale-110 sm:hover:scale-125 hover:bg-slate-300 hover:dark:bg-slate-500 transition-all duration-300 ease-in-out`,children:c.jsx("img",{src:`${ve}/${e}`,alt:n})}),Xr=({to:e,src:t,alt:n,label:r,size:i})=>c.jsxs(Je,{to:`${ve}category/${e}`,className:"flex flex-col items-center gap-10","aria-label":`Category: ${e}`,children:[c.jsx(lL,{size:i,src:t,alt:n}),c.jsx("h1",{children:r})]}),we=({errors:e,name:t,register:n,pattern:r,className:i,...o})=>{var g,y;const[s,a]=k.useState(!1),l=(y=(g=e[t])==null?void 0:g.message)==null?void 0:y.toString(),d=Ii(l??""),f=Number.MAX_SAFE_INTEGER,h=o.type==="password",v=o.disabled,C=gv(t),w=()=>a(!s),{onBlur:S,...P}=n(t,{required:o.required?`${t} is required`:!1,minLength:{value:o.minLength??2,message:`Minimum length is ${o.minLength??2}`},maxLength:{value:o.maxLength??f,message:`Maximum length is ${o.maxLength??f}`},pattern:r?{value:r.value,message:r.message??`Invalid format for ${t}`}:void 0}),m=E=>{S(E),o.onBlur&&o.onBlur(E)};return c.jsxs("div",{className:`flex flex-col w-full items-center px-4 ${i}`,children:[c.jsxs("div",{className:"w-full flex flex-col justify-center mb-4",children:[c.jsx("label",{htmlFor:t,className:"flex flex-row items-center justify-center mb-1 self-start",children:Ii(C)}),c.jsxs("div",{className:"relative w-full",children:[c.jsx("input",{id:t,placeholder:`${Ii(C)}`,...P,...o,type:h?s?"text":"password":o.type||"text",autoComplete:o.autoComplete??"off",className:`pr-4 ${v?"bg-red-200":""}`,"aria-invalid":e[t]?"true":"false","aria-label":`Enter your ${t} here`,onChange:o.onChange,onBlur:m}),h&&c.jsx("button",{type:"button",onClick:w,className:"absolute inset-y-0 right-0 pr-3 flex items-center text-sm leading-5","aria-label":s?"Hide password":"Show password",children:s?c.jsx(f5,{className:"dark:text-white"}):c.jsx(d5,{className:"dark:text-white"})})]})]}),e[t]&&c.jsx("p",{className:"text-red-500 mb-4",children:gv(d)})]})},Hs=({children:e,onClick:t,display:n,ariaLabel:r})=>c.jsx("button",{onClick:t,className:`border-2 border-primary-regular dark:border-primary-light rounded-md items-center gap-1 p-2 transition-colors duration-300 ease-in-out hover:bg-primary-regular/10 dark:hover:bg-primary-regular/80 ${n}`,"aria-label":r,children:e}),cL=()=>{const e="hover:bg-primary-light active:bg-primary-regular transition-all duration-300 ease-in-out",t=`border-r-2 border-slate-100 flex-1 hover:bg-primary-light active:bg-primary-regular ${e}`;return c.jsxs("nav",{className:"bg-primary-regular flex justify-between border-t-2 border-slate-100 text-center",children:[c.jsx(Je,{to:`${ve}category/laptop`,className:t,"aria-label":"Laptops category",children:c.jsx("p",{className:"text-white",children:"Laptop"})}),c.jsx(Je,{to:`${ve}category/cellular`,className:t,"aria-label":"Cellulars category",children:c.jsx("p",{className:"text-white",children:"Cellulars"})}),c.jsx(Je,{to:`${ve}category/tv`,className:t,"aria-label":"TV category",children:c.jsx("p",{className:"text-white",children:"TV"})}),c.jsx(Je,{to:`${ve}category/headphone`,className:`flex-1 ${e}`,"aria-label":"Headphones category",children:c.jsx("p",{className:"text-white",children:"Headphones"})})]})},tm=({id:e,name:t,price:n,image:r,averageRating:i})=>{const o=ut(),{increaseItemQuantity:s}=hi(),a=d=>{d.stopPropagation(),s(e),fe.success(`${t} added to cart!`)},l=d=>{a(d),o(`${ve}cart`)};return c.jsxs(Nw,{onClick:()=>o(`${ve}products/${e}`),children:[c.jsx("img",{src:r,alt:t,className:"h-80 max-w-48 object-contain"}),c.jsx("h3",{className:"mb-4 text-center",children:t}),c.jsxs("div",{className:"flex justify-between gap-4 items-center mx-2 mb-4 w-72",children:[c.jsxs("h3",{children:[n,"$"]}),c.jsxs("div",{className:"flex items-center gap-2 ",children:[c.jsx(g2,{className:"text-orange-200"}),c.jsx("p",{children:parseFloat(i).toFixed(2)})]}),c.jsxs("div",{className:"flex justify-between w-36",children:[c.jsx("button",{className:"flex justify-between items-center border bg-amber-300 text-white size-10 rounded-xl hover-button active:bg-amber-400","aria-label":`Add ${t} to cart`,onClick:a,children:c.jsx(Qc,{className:"size-11/12"})}),c.jsx("button",{className:"bg-green-600 text-white rounded-2xl w-20 hover-button active:bg-green-700","aria-label":`Buy ${t} now`,onClick:l,children:"Buy now"})]})]})]})},en=({children:e})=>{const{isLoggedIn:t}=k.useContext(Nn);return t?e||c.jsx(Xc,{}):(fe.warning("You need to login to access this page"),c.jsx(wh,{to:`${ve}login`,replace:!0}))},nm=({isOpen:e,toggleDrawer:t,onSortChange:n,sortInputs:r})=>{const[i,o]=k.useState(""),s=l=>{const{value:d}=l.target;o(d)},a=l=>{l.preventDefault(),n(i),t()};return c.jsx(bh,{open:e,onClose:t,direction:"bottom",className:"bg-slate-100 dark:bg-slate-600 h-fit",lockBackgroundScroll:!0,children:c.jsxs("form",{className:"mx-1 flex flex-col items-center",onSubmit:a,children:[c.jsxs("div",{className:"w-full flex justify-between items-center mt-2",children:[c.jsx("h2",{children:"Sort By"}),c.jsx("button",{onClick:t,type:"button",children:c.jsx(Ea,{className:"text-primary-regular dark:text-primary-light size-8 hover:scale-125 transition-scale duration-300 ease-in-out"})})]}),c.jsx("hr",{className:"w-full my-2 border-t border-black dark:border-white"}),c.jsx("div",{className:"grid grid-cols-[repeat(2,1fr)] w-full gap-4",children:r.map(l=>c.jsxs("div",{className:"flex justify-start items-center",children:[c.jsx("input",{type:"radio",name:"sortBy",id:l.id,value:l.id,className:"w-fit mr-2 cursor-pointer",checked:i===l.id,onChange:s,"aria-pressed":i===l.id}),c.jsx("label",{htmlFor:l.id,className:"cursor-pointer",children:l.label})]},l.id))}),c.jsx("button",{className:"action-button mt-4",type:"submit",children:"Show the results"})]})})},Lw=({anchorEl:e,open:t,onClose:n,onSortChange:r,sortInputs:i})=>{const[o,s]=k.useState(""),a=d=>{const f=d.currentTarget.value;s(f)},l=d=>{d.preventDefault(),r(o),n()};return c.jsx(fp,{anchorEl:e,open:t,onClose:n,sx:{".dark & .MuiMenu-list":{backgroundColor:"rgb(71 85 105)"},"& .MuiMenu-list":{backgroundColor:"rgb(241 245 249)"}},children:c.jsx("form",{onSubmit:l,children:i.map(d=>c.jsx(Ls,{className:"flex justify-start items-center",children:c.jsx("button",{name:"sortBy",value:d.id,className:"w-fit mr-2",onClick:a,children:c.jsx("p",{children:d.label})})},d.label))})})},_w="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M24%200C10.7464%200%200%2011.0149%200%2024.612C0%2035.4876%206.87857%2044.7024%2016.4143%2047.9597C17.6143%2048.1847%2018.0536%2047.4239%2018.0536%2046.7703C18.0536%2046.181%2018.0321%2044.6381%2018.0214%2042.5808C11.3464%2044.0702%209.93214%2039.2806%209.93214%2039.2806C8.83929%2036.4412%207.26429%2035.6805%207.26429%2035.6805C5.08929%2034.1482%207.425%2034.1804%207.425%2034.1804C9.83571%2034.3518%2011.1%2036.7198%2011.1%2036.7198C13.2429%2040.4807%2016.7143%2039.3985%2018.0857%2038.7663C18.3%2037.1805%2018.9214%2036.0876%2019.6071%2035.4769C14.2821%2034.8554%208.67857%2032.7446%208.67857%2023.3155C8.67857%2020.6261%209.61071%2018.4295%2011.1429%2016.7152C10.8964%2016.0937%2010.0714%2013.5864%2011.3786%2010.2005C11.3786%2010.2005%2013.3929%209.53622%2017.9786%2012.7185C19.8964%2012.1721%2021.9429%2011.9042%2023.9893%2011.8935C26.025%2011.9042%2028.0821%2012.1721%2030%2012.7185C34.5857%209.53622%2036.5893%2010.2005%2036.5893%2010.2005C37.8964%2013.5864%2037.0714%2016.0937%2036.825%2016.7152C38.3571%2018.4403%2039.2893%2020.6368%2039.2893%2023.3155C39.2893%2032.766%2033.675%2034.8447%2028.3286%2035.4554C29.1857%2036.2162%2029.9571%2037.7163%2029.9571%2040.0093C29.9571%2043.2987%2029.925%2045.956%2029.925%2046.7596C29.925%2047.4132%2030.3536%2048.1847%2031.575%2047.9382C41.1321%2044.6916%2048%2035.4769%2048%2024.612C48%2011.0149%2037.2536%200%2024%200Z'%20fill='white'%20/%3e%3c/svg%3e",Mw="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M39.6911%2011.1889C39.6911%2012.7796%2038.4015%2014.0689%2036.8111%2014.0689C35.2208%2014.0689%2033.9311%2012.7796%2033.9311%2011.1889C33.9311%209.59812%2035.2208%208.30887%2036.8111%208.30887C38.4019%208.30887%2039.6911%209.59812%2039.6911%2011.1889ZM24%2031.9999C19.5818%2031.9999%2016.0001%2028.4182%2016.0001%2024C16.0001%2019.5818%2019.5818%2016.0001%2024%2016.0001C28.4182%2016.0001%2031.9999%2019.5818%2031.9999%2024C31.9999%2028.4182%2028.4182%2031.9999%2024%2031.9999ZM24%2011.6756C17.1934%2011.6756%2011.6756%2017.1934%2011.6756%2024C11.6756%2030.8066%2017.1934%2036.3244%2024%2036.3244C30.8066%2036.3244%2036.3244%2030.8066%2036.3244%2024C36.3244%2017.1934%2030.8066%2011.6756%2024%2011.6756ZM24%204.3245C30.4084%204.3245%2031.1674%204.34887%2033.6979%204.46437C36.0379%204.57125%2037.3088%204.962%2038.1544%205.29088C39.2745%205.72625%2040.074%206.24637%2040.914%207.08637C41.754%207.926%2042.2741%208.7255%2042.7095%209.846C43.038%2010.6916%2043.4291%2011.9625%2043.536%2014.3025C43.6515%2016.8334%2043.6759%2017.5924%2043.6759%2024.0007C43.6759%2030.4091%2043.6515%2031.1681%2043.536%2033.6986C43.4291%2036.0386%2043.0384%2037.3095%2042.7095%2038.1551C42.2741%2039.2753%2041.754%2040.0748%2040.914%2040.9148C40.0744%2041.7548%2039.2749%2042.2749%2038.1544%2042.7102C37.3088%2043.0387%2036.0379%2043.4299%2033.6979%2043.5367C31.1674%2043.6522%2030.4084%2043.6766%2024%2043.6766C17.5912%2043.6766%2016.8323%2043.6522%2014.3018%2043.5367C11.9618%2043.4299%2010.6909%2043.0391%209.84525%2042.7102C8.72512%2042.2749%207.92563%2041.7548%207.08563%2040.9148C6.246%2040.0751%205.7255%2039.2756%205.29013%2038.1551C4.96163%2037.3095%204.5705%2036.0386%204.46362%2033.6986C4.34812%2031.1677%204.32375%2030.4087%204.32375%2024.0007C4.32375%2017.5924%204.34812%2016.8334%204.46362%2014.3025C4.5705%2011.9625%204.96125%2010.6916%205.29013%209.846C5.7255%208.72588%206.24563%207.92637%207.08563%207.08637C7.92525%206.24637%208.72475%205.72625%209.84525%205.29088C10.6909%204.96238%2011.9618%204.57125%2014.3018%204.46437C16.8326%204.34887%2017.5916%204.3245%2024%204.3245ZM24%200C17.4821%200%2016.6646%200.02775%2014.1049%200.144375C11.5504%200.261%209.8055%200.66675%208.27925%201.26C6.70087%201.87312%205.3625%202.694%204.02825%204.02825C2.694%205.3625%201.87312%206.70087%201.26%208.27925C0.66675%209.80587%200.261%2011.5504%200.144375%2014.1049C0.02775%2016.6646%200%2017.4821%200%2024C0%2030.5179%200.02775%2031.3354%200.144375%2033.8951C0.261%2036.4496%200.66675%2038.1941%201.26%2039.7207C1.87312%2041.2991%202.694%2042.6375%204.02825%2043.9718C5.3625%2045.306%206.70087%2046.1265%208.27925%2046.74C9.80587%2047.3332%2011.5504%2047.739%2014.1049%2047.8556C16.6646%2047.9722%2017.4821%2048%2024%2048C30.5179%2048%2031.3354%2047.9722%2033.8951%2047.8556C36.4496%2047.739%2038.1941%2047.3332%2039.7207%2046.74C41.2991%2046.1265%2042.6375%2045.306%2043.9718%2043.9718C45.306%2042.6375%2046.1265%2041.2991%2046.74%2039.7207C47.3332%2038.1941%2047.739%2036.4496%2047.8556%2033.8951C47.9722%2031.3354%2048%2030.5179%2048%2024C48%2017.4821%2047.9722%2016.6646%2047.8556%2014.1049C47.739%2011.5504%2047.3332%209.80587%2046.74%208.27925C46.1265%206.70087%2045.306%205.3625%2043.9718%204.02825C42.6375%202.694%2041.2991%201.8735%2039.7207%201.26C38.1941%200.66675%2036.4496%200.261%2033.8951%200.144375C31.3354%200.02775%2030.5179%200%2024%200Z'%20fill='url(%23paint0_radial_98_1953)'%20/%3e%3cdefs%3e%3cradialGradient%20id='paint0_radial_98_1953'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(7.16666%2048.1666)%20scale(61.332)'%20%3e%3cstop%20stop-color='%23FFB140'%20/%3e%3cstop%20offset='0.2559'%20stop-color='%23FF5445'%20/%3e%3cstop%20offset='0.599'%20stop-color='%23FC2B82'%20/%3e%3cstop%20offset='1'%20stop-color='%238E40B7'%20/%3e%3c/radialGradient%3e%3c/defs%3e%3c/svg%3e",Ow="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48%206C48%202.68847%2045.3115%200%2042%200H6C2.68847%200%200%202.68847%200%206V42C0%2045.3115%202.68847%2048%206%2048H42C45.3115%2048%2048%2045.3115%2048%2042V6Z'%20fill='%232867B2'%20/%3e%3cpath%20d='M13.7638%2016.75H5.72375V40.9339H13.7638V16.75Z'%20fill='white'%20/%3e%3cpath%20d='M9.798%205.08875C7.04728%205.08875%205.25%206.89718%205.25%209.26746C5.25%2011.588%206.99262%2013.4463%209.69159%2013.4463H9.74353C12.5469%2013.4463%2014.2919%2011.588%2014.2919%209.26746C14.2399%206.89718%2012.5471%205.08875%209.798%205.08875Z'%20fill='white'%20/%3e%3cpath%20d='M33.4948%2016.1813C29.2302%2016.1813%2027.3199%2018.5266%2026.2502%2020.174V16.75H18.2123C18.3189%2019.0184%2018.2123%2040.9338%2018.2123%2040.9338H26.2501V27.4278C26.2501%2026.7049%2026.3021%2025.9822%2026.5152%2025.4655C27.0953%2024.0218%2028.4187%2022.5263%2030.6395%2022.5263C33.5469%2022.5263%2034.7116%2024.7448%2034.7116%2027.9944V40.9338H42.7498V27.0654C42.7498%2019.6369%2038.7837%2016.1813%2033.4948%2016.1813Z'%20fill='white'%20/%3e%3c/svg%3e",Iw="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20d='M28.572%2020.3269L46.443%200H42.2087L26.6843%2017.6459L14.294%200H0L18.7407%2026.686L0%2048H4.23429L20.6184%2029.361L33.706%2048H48L28.572%2020.3269ZM22.7706%2026.9203L20.8689%2024.2613L5.76128%203.12352H12.266L24.4619%2020.1887L26.3556%2022.8477L42.2067%2045.0287H35.7019L22.7706%2026.9203Z'%20fill='white'%20/%3e%3c/svg%3e",uL="data:image/svg+xml,%3csvg%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M64%200C28.6571%200%200%2029.373%200%2065.632C0%2094.6336%2018.3429%20119.206%2043.7714%20127.892C46.9714%20128.493%2048.1429%20126.464%2048.1429%20124.721C48.1429%20123.149%2048.0857%20119.035%2048.0571%20113.549C30.2571%20117.52%2026.4857%20104.748%2026.4857%20104.748C23.5714%2097.1766%2019.3714%2095.1479%2019.3714%2095.1479C13.5714%2091.062%2019.8%2091.1477%2019.8%2091.1477C26.2286%2091.6048%2029.6%2097.9195%2029.6%2097.9195C35.3143%20107.949%2044.5714%20105.063%2048.2286%20103.377C48.8%2099.1481%2050.4571%2096.2337%2052.2857%2094.605C38.0857%2092.9478%2023.1429%2087.3189%2023.1429%2062.1747C23.1429%2055.0029%2025.6286%2049.1455%2029.7143%2044.5738C29.0571%2042.9166%2026.8571%2036.2305%2030.3429%2027.2014C30.3429%2027.2014%2035.7143%2025.4299%2047.9429%2033.9161C53.0571%2032.4589%2058.5143%2031.7445%2063.9714%2031.716C69.4%2031.7445%2074.8857%2032.4589%2080%2033.9161C92.2286%2025.4299%2097.5714%2027.2014%2097.5714%2027.2014C101.057%2036.2305%2098.8571%2042.9166%2098.2%2044.5738C102.286%2049.174%20104.771%2055.0315%20104.771%2062.1747C104.771%2087.376%2089.8%2092.9192%2075.5429%2094.5479C77.8286%2096.5765%2079.8857%20100.577%2079.8857%20106.691C79.8857%20115.463%2079.8%20122.549%2079.8%20124.692C79.8%20126.435%2080.9429%20128.492%2084.2%20127.835C109.686%20119.178%20128%2094.605%20128%2065.632C128%2029.373%2099.3429%200%2064%200Z'%20fill='black'%20/%3e%3c/svg%3e",dL="data:image/svg+xml,%3csvg%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M76.1919%2054.205L123.848%200H112.556L71.158%2047.0556L38.1173%200H0L49.9752%2071.1627L0%20128H11.2914L54.9823%2078.2961L89.8827%20128H128L76.1919%2054.205ZM60.7216%2071.7874L55.6503%2064.6968L15.3634%208.32937H32.7094L65.2318%2053.8366L70.2816%2060.9272L112.551%20120.076H95.2051L60.7216%2071.7874Z'%20fill='black'%20/%3e%3c/svg%3e",fL=()=>c.jsxs("div",{className:"flex order-2 sm:order-1 justify-evenly sm:grid sm:grid-cols-2 sm:gap-4 my-8",children:[c.jsx("a",{href:"https://www.linkedin.com/in/maksim-mirkin/","aria-label":"LinkedIn",target:"_blank",rel:"noopener noreferrer",children:c.jsx("img",{src:Ow,alt:"LinkedIn icon",className:"h-12 sm:h-9"})}),c.jsx("a",{href:"https://github.com/Maksim-Mirkin","aria-label":"GitHub",target:"_blank",rel:"noopener noreferrer",children:c.jsx("img",{src:_w,alt:"GitHub icon",className:"h-12 sm:h-9"})}),c.jsx("a",{href:"https://www.instagram.com/","aria-label":"Instagram",target:"_blank",rel:"noopener noreferrer",children:c.jsx("img",{src:Mw,alt:"Instagram icon",className:"h-12 sm:h-9"})}),c.jsx("a",{href:"https://twitter.com/","aria-label":"Twitter",target:"_blank",rel:"noopener noreferrer",children:c.jsx("img",{src:Iw,alt:"Twitter icon",className:"h-12 sm:h-9"})})]}),pL=()=>c.jsxs("footer",{className:"font-body flex flex-col sm:flex-row justify-evenly bg-primary-regular text-white",children:[c.jsx(fL,{}),c.jsxs("nav",{className:"flex flex-col gap-2 items-center my-4 sm:my-10 order-1 sm:order-2",children:[c.jsx(Je,{to:`${ve}about`,"aria-label":"About Us",children:"About"}),c.jsx(Je,{to:`${ve}contact-us`,"aria-label":"Contact Us",children:"Contact Us"}),c.jsx("a",{href:"https://ecommerce-store-e805668c131b.herokuapp.com/swagger-ui/index.html","aria-label":"Documentation",target:"_blank",rel:"noopener noreferrer",children:"Documentation"})]}),c.jsxs("div",{className:"flex flex-col gap-4 my-8 sm:my-12 items-center order-last",children:[c.jsxs("span",{children:[c.jsx(Je,{to:`${ve}terms`,"aria-label":"Terms and Conditions",children:"Terms"})," ","Ā·"," ",c.jsx(Je,{to:`${ve}privacy-policy`,"aria-label":"Privacy Policy",children:"Privacy Policy"})]}),c.jsx("span",{children:"Ā© All rights reserved 2024"})]})]}),hL=()=>c.jsxs("div",{className:"min-h-screen flex flex-col overflow-x-hidden",children:[c.jsx(iL,{}),c.jsx(cL,{}),c.jsxs("main",{className:"flex-1 bg-slate-100 dark:bg-slate-700",children:[c.jsx(mk,{}),c.jsx(Xc,{})]}),c.jsx(pL,{}),c.jsx(s5,{})]}),mL=()=>{const e=Yc(),t=ut();let n="";return e instanceof Error?n=e.message:typeof e=="string"?n=e:Wc(e)&&(n=`${e.data} ${e.status} ${e.statusText}`),c.jsxs("div",{className:"flex flex-col justify-evenly items-center bg-slate-100 dark:bg-slate-600 h-screen ",children:[c.jsx("h1",{className:"text-red-500",children:"Oops!"}),c.jsx("img",{src:`${ve}/assets/sad-robot.png`,alt:"Sad robot"}),c.jsx("h2",{className:"text-red-500 mx-8",children:n}),c.jsxs("div",{className:"flex justify-between w-64",children:[c.jsx("button",{onClick:()=>t(-1),className:"action-button","aria-label":"Go back to the previous page",children:"Go Back"}),c.jsx("button",{onClick:()=>t("/"),className:"action-button","aria-label":"Go to the home page",children:"Go Home"})]})]})};var _a=e=>e.type==="checkbox",Po=e=>e instanceof Date,nn=e=>e==null;const $w=e=>typeof e=="object";var Pt=e=>!nn(e)&&!Array.isArray(e)&&$w(e)&&!Po(e),Aw=e=>Pt(e)&&e.target?_a(e.target)?e.target.checked:e.target.value:e,gL=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Rw=(e,t)=>e.has(gL(t)),vL=e=>{const t=e.constructor&&e.constructor.prototype;return Pt(t)&&t.hasOwnProperty("isPrototypeOf")},rm=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ln(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(rm&&(e instanceof Blob||e instanceof FileList))&&(n||Pt(e)))if(t=n?[]:{},!n&&!vL(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=ln(e[r]));else return e;return t}var Ma=e=>Array.isArray(e)?e.filter(Boolean):[],ct=e=>e===void 0,re=(e,t,n)=>{if(!t||!Pt(e))return n;const r=Ma(t.split(/[,[\].]+?/)).reduce((i,o)=>nn(i)?i:i[o],e);return ct(r)||r===e?ct(e[t])?n:e[t]:r},Zn=e=>typeof e=="boolean";const wc={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Jn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Sr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},yL=ie.createContext(null),im=()=>ie.useContext(yL);var Dw=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const s=o;return t._proxyFormState[s]!==Jn.all&&(t._proxyFormState[s]=!r||Jn.all),n&&(n[s]=!0),e[s]}});return i},wn=e=>Pt(e)&&!Object.keys(e).length,zw=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return wn(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(s=>t[s]===(!r||Jn.all))},Il=e=>Array.isArray(e)?e:[e],Fw=(e,t,n)=>!e||!t||e===t||Il(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function om(e){const t=ie.useRef(e);t.current=e,ie.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function wL(e){const t=im(),{control:n=t.control,disabled:r,name:i,exact:o}=e||{},[s,a]=ie.useState(n._formState),l=ie.useRef(!0),d=ie.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=ie.useRef(i);return f.current=i,om({disabled:r,next:h=>l.current&&Fw(f.current,h.name,o)&&zw(h,d.current,n._updateFormState)&&a({...n._formState,...h}),subject:n._subjects.state}),ie.useEffect(()=>(l.current=!0,d.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),Dw(s,n,d.current,!1)}var fr=e=>typeof e=="string",Bw=(e,t,n,r,i)=>fr(e)?(r&&t.watch.add(e),re(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),re(n,o))):(r&&(t.watchAll=!0),n);function xL(e){const t=im(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:s}=e||{},a=ie.useRef(r);a.current=r,om({disabled:o,subject:n._subjects.values,next:f=>{Fw(a.current,f.name,s)&&d(ln(Bw(a.current,n._names,f.values||n._formValues,!1,i)))}});const[l,d]=ie.useState(n._getWatch(r,i));return ie.useEffect(()=>n._removeUnmounted()),l}var sm=e=>/^\w*$/.test(e),Vw=e=>Ma(e.replace(/["|']|\]/g,"").split(/\.|\[/)),We=(e,t,n)=>{let r=-1;const i=sm(t)?[t]:Vw(t),o=i.length,s=o-1;for(;++r{const f=i._options.shouldUnregister||o,h=(v,C)=>{const w=re(i._fields,v);w&&(w._f.mount=C)};if(h(n,!0),f){const v=ln(re(i._options.defaultValues,n));We(i._defaultValues,n,v),ct(re(i._formValues,n))&&We(i._formValues,n,v)}return()=>{(s?f&&!i._state.action:f)?i.unregister(n):h(n,!1)}},[n,i,s,o]),ie.useEffect(()=>{re(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:re(i._fields,n)._f.value})},[r,n,i]),{field:{name:n,value:a,...Zn(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:ie.useCallback(f=>d.current.onChange({target:{value:Aw(f),name:n},type:wc.CHANGE}),[n]),onBlur:ie.useCallback(()=>d.current.onBlur({target:{value:re(i._formValues,n),name:n},type:wc.BLUR}),[n,i]),ref:f=>{const h=re(i._fields,n);h&&f&&(h._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:v=>f.setCustomValidity(v),reportValidity:()=>f.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!re(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!re(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!re(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!re(l.validatingFields,n)},error:{enumerable:!0,get:()=>re(l.errors,n)}})}}const SL=e=>e.render(bL(e));var CL=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},vv=e=>({isOnSubmit:!e||e===Jn.onSubmit,isOnBlur:e===Jn.onBlur,isOnChange:e===Jn.onChange,isOnAll:e===Jn.all,isOnTouch:e===Jn.onTouched}),yv=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Us=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=re(e,i);if(o){const{_f:s,...a}=o;if(s){if(s.refs&&s.refs[0]&&t(s.refs[0],i)&&!r)break;if(s.ref&&t(s.ref,s.name)&&!r)break;Us(a,t)}else Pt(a)&&Us(a,t)}}};var kL=(e,t,n)=>{const r=Ma(re(e,n));return We(r,"root",t[n]),We(e,n,r),e},am=e=>e.type==="file",Qr=e=>typeof e=="function",xc=e=>{if(!rm)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},$l=e=>fr(e),lm=e=>e.type==="radio",bc=e=>e instanceof RegExp;const wv={value:!1,isValid:!1},xv={value:!0,isValid:!0};var Hw=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!ct(e[0].attributes.value)?ct(e[0].value)||e[0].value===""?xv:{value:e[0].value,isValid:!0}:xv:wv}return wv};const bv={isValid:!1,value:null};var Uw=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,bv):bv;function Sv(e,t,n="validate"){if($l(e)||Array.isArray(e)&&e.every($l)||Zn(e)&&!e)return{type:n,message:$l(e)?e:"",ref:t}}var co=e=>Pt(e)&&!bc(e)?e:{value:e,message:""},Cv=async(e,t,n,r,i)=>{const{ref:o,refs:s,required:a,maxLength:l,minLength:d,min:f,max:h,pattern:v,validate:C,name:w,valueAsNumber:S,mount:P,disabled:m}=e._f,g=re(t,w);if(!P||m)return{};const y=s?s[0]:o,E=z=>{r&&y.reportValidity&&(y.setCustomValidity(Zn(z)?"":z||""),y.reportValidity())},j={},L=lm(o),M=_a(o),O=L||M,I=(S||am(o))&&ct(o.value)&&ct(g)||xc(o)&&o.value===""||g===""||Array.isArray(g)&&!g.length,_=CL.bind(null,w,n,j),B=(z,R,H,U=Sr.maxLength,q=Sr.minLength)=>{const ee=z?R:H;j[w]={type:z?U:q,message:ee,ref:o,..._(z?U:q,ee)}};if(i?!Array.isArray(g)||!g.length:a&&(!O&&(I||nn(g))||Zn(g)&&!g||M&&!Hw(s).isValid||L&&!Uw(s).isValid)){const{value:z,message:R}=$l(a)?{value:!!a,message:a}:co(a);if(z&&(j[w]={type:Sr.required,message:R,ref:y,..._(Sr.required,R)},!n))return E(R),j}if(!I&&(!nn(f)||!nn(h))){let z,R;const H=co(h),U=co(f);if(!nn(g)&&!isNaN(g)){const q=o.valueAsNumber||g&&+g;nn(H.value)||(z=q>H.value),nn(U.value)||(R=qnew Date(new Date().toDateString()+" "+te),A=o.type=="time",Y=o.type=="week";fr(H.value)&&g&&(z=A?ee(g)>ee(H.value):Y?g>H.value:q>new Date(H.value)),fr(U.value)&&g&&(R=A?ee(g)+z.value,U=!nn(R.value)&&g.length<+R.value;if((H||U)&&(B(H,z.message,R.message),!n))return E(j[w].message),j}if(v&&!I&&fr(g)){const{value:z,message:R}=co(v);if(bc(z)&&!g.match(z)&&(j[w]={type:Sr.pattern,message:R,ref:o,..._(Sr.pattern,R)},!n))return E(R),j}if(C){if(Qr(C)){const z=await C(g,t),R=Sv(z,y);if(R&&(j[w]={...R,..._(Sr.validate,R.message)},!n))return E(R.message),j}else if(Pt(C)){let z={};for(const R in C){if(!wn(z)&&!n)break;const H=Sv(await C[R](g,t),y,R);H&&(z={...H,..._(R,H.message)},E(H.message),n&&(j[w]=z))}if(!wn(z)&&(j[w]={ref:y,...z},!n))return j}}return E(!0),j};function EL(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},Sc=e=>nn(e)||!$w(e);function _i(e,t){if(Sc(e)||Sc(t))return e===t;if(Po(e)&&Po(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(Po(o)&&Po(s)||Pt(o)&&Pt(s)||Array.isArray(o)&&Array.isArray(s)?!_i(o,s):o!==s)return!1}}return!0}var Ww=e=>e.type==="select-multiple",jL=e=>lm(e)||_a(e),zd=e=>xc(e)&&e.isConnected,Gw=e=>{for(const t in e)if(Qr(e[t]))return!0;return!1};function Cc(e,t={}){const n=Array.isArray(e);if(Pt(e)||n)for(const r in e)Array.isArray(e[r])||Pt(e[r])&&!Gw(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Cc(e[r],t[r])):nn(e[r])||(t[r]=!0);return t}function qw(e,t,n){const r=Array.isArray(e);if(Pt(e)||r)for(const i in e)Array.isArray(e[i])||Pt(e[i])&&!Gw(e[i])?ct(t)||Sc(n[i])?n[i]=Array.isArray(e[i])?Cc(e[i],[]):{...Cc(e[i])}:qw(e[i],nn(t)?{}:t[i],n[i]):n[i]=!_i(e[i],t[i]);return n}var hl=(e,t)=>qw(e,t,Cc(t)),Kw=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>ct(e)?e:t?e===""?NaN:e&&+e:n&&fr(e)?new Date(e):r?r(e):e;function Fd(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return am(t)?t.files:lm(t)?Uw(e.refs).value:Ww(t)?[...t.selectedOptions].map(({value:n})=>n):_a(t)?Hw(e.refs).value:Kw(ct(t.value)?e.ref.value:t.value,e)}var TL=(e,t,n,r)=>{const i={};for(const o of e){const s=re(t,o);s&&We(i,o,s._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Ss=e=>ct(e)?e:bc(e)?e.source:Pt(e)?bc(e.value)?e.value.source:e.value:e,NL=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function kv(e,t,n){const r=re(e,n);if(r||sm(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),s=re(t,o),a=re(e,o);if(s&&!Array.isArray(s)&&n!==o)return{name:n};if(a&&a.type)return{name:o,error:a};i.pop()}return{name:n}}var LL=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,_L=(e,t)=>!Ma(re(e,t)).length&&Ct(e,t);const ML={mode:Jn.onSubmit,reValidateMode:Jn.onChange,shouldFocusError:!0};function OL(e={}){let t={...ML,...e},n={submitCount:0,isDirty:!1,isLoading:Qr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Pt(t.defaultValues)||Pt(t.values)?ln(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:ln(i),s={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:Dd(),array:Dd(),state:Dd()},v=vv(t.mode),C=vv(t.reValidateMode),w=t.criteriaMode===Jn.all,S=N=>D=>{clearTimeout(d),d=setTimeout(N,D)},P=async N=>{if(f.isValid||N){const D=t.resolver?wn((await O()).errors):await _(r,!0);D!==n.isValid&&h.state.next({isValid:D})}},m=(N,D)=>{(f.isValidating||f.validatingFields)&&((N||Array.from(a.mount)).forEach($=>{$&&(D?We(n.validatingFields,$,D):Ct(n.validatingFields,$))}),h.state.next({validatingFields:n.validatingFields,isValidating:!wn(n.validatingFields)}))},g=(N,D=[],$,Q,Z=!0,K=!0)=>{if(Q&&$){if(s.action=!0,K&&Array.isArray(re(r,N))){const ne=$(re(r,N),Q.argA,Q.argB);Z&&We(r,N,ne)}if(K&&Array.isArray(re(n.errors,N))){const ne=$(re(n.errors,N),Q.argA,Q.argB);Z&&We(n.errors,N,ne),_L(n.errors,N)}if(f.touchedFields&&K&&Array.isArray(re(n.touchedFields,N))){const ne=$(re(n.touchedFields,N),Q.argA,Q.argB);Z&&We(n.touchedFields,N,ne)}f.dirtyFields&&(n.dirtyFields=hl(i,o)),h.state.next({name:N,isDirty:z(N,D),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else We(o,N,D)},y=(N,D)=>{We(n.errors,N,D),h.state.next({errors:n.errors})},E=N=>{n.errors=N,h.state.next({errors:n.errors,isValid:!1})},j=(N,D,$,Q)=>{const Z=re(r,N);if(Z){const K=re(o,N,ct($)?re(i,N):$);ct(K)||Q&&Q.defaultChecked||D?We(o,N,D?K:Fd(Z._f)):U(N,K),s.mount&&P()}},L=(N,D,$,Q,Z)=>{let K=!1,ne=!1;const xe={name:N},Ve=!!(re(r,N)&&re(r,N)._f.disabled);if(!$||Q){f.isDirty&&(ne=n.isDirty,n.isDirty=xe.isDirty=z(),K=ne!==xe.isDirty);const Ue=Ve||_i(re(i,N),D);ne=!!(!Ve&&re(n.dirtyFields,N)),Ue||Ve?Ct(n.dirtyFields,N):We(n.dirtyFields,N,!0),xe.dirtyFields=n.dirtyFields,K=K||f.dirtyFields&&ne!==!Ue}if($){const Ue=re(n.touchedFields,N);Ue||(We(n.touchedFields,N,$),xe.touchedFields=n.touchedFields,K=K||f.touchedFields&&Ue!==$)}return K&&Z&&h.state.next(xe),K?xe:{}},M=(N,D,$,Q)=>{const Z=re(n.errors,N),K=f.isValid&&Zn(D)&&n.isValid!==D;if(e.delayError&&$?(l=S(()=>y(N,$)),l(e.delayError)):(clearTimeout(d),l=null,$?We(n.errors,N,$):Ct(n.errors,N)),($?!_i(Z,$):Z)||!wn(Q)||K){const ne={...Q,...K&&Zn(D)?{isValid:D}:{},errors:n.errors,name:N};n={...n,...ne},h.state.next(ne)}},O=async N=>{m(N,!0);const D=await t.resolver(o,t.context,TL(N||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return m(N),D},I=async N=>{const{errors:D}=await O(N);if(N)for(const $ of N){const Q=re(D,$);Q?We(n.errors,$,Q):Ct(n.errors,$)}else n.errors=D;return D},_=async(N,D,$={valid:!0})=>{for(const Q in N){const Z=N[Q];if(Z){const{_f:K,...ne}=Z;if(K){const xe=a.array.has(K.name);m([Q],!0);const Ve=await Cv(Z,o,w,t.shouldUseNativeValidation&&!D,xe);if(m([Q]),Ve[K.name]&&($.valid=!1,D))break;!D&&(re(Ve,K.name)?xe?kL(n.errors,Ve,K.name):We(n.errors,K.name,Ve[K.name]):Ct(n.errors,K.name))}ne&&await _(ne,D,$)}}return $.valid},B=()=>{for(const N of a.unMount){const D=re(r,N);D&&(D._f.refs?D._f.refs.every($=>!zd($)):!zd(D._f.ref))&&_e(N)}a.unMount=new Set},z=(N,D)=>(N&&D&&We(o,N,D),!_i(ce(),i)),R=(N,D,$)=>Bw(N,a,{...s.mount?o:ct(D)?i:fr(N)?{[N]:D}:D},$,D),H=N=>Ma(re(s.mount?o:i,N,e.shouldUnregister?re(i,N,[]):[])),U=(N,D,$={})=>{const Q=re(r,N);let Z=D;if(Q){const K=Q._f;K&&(!K.disabled&&We(o,N,Kw(D,K)),Z=xc(K.ref)&&nn(D)?"":D,Ww(K.ref)?[...K.ref.options].forEach(ne=>ne.selected=Z.includes(ne.value)):K.refs?_a(K.ref)?K.refs.length>1?K.refs.forEach(ne=>(!ne.defaultChecked||!ne.disabled)&&(ne.checked=Array.isArray(Z)?!!Z.find(xe=>xe===ne.value):Z===ne.value)):K.refs[0]&&(K.refs[0].checked=!!Z):K.refs.forEach(ne=>ne.checked=ne.value===Z):am(K.ref)?K.ref.value="":(K.ref.value=Z,K.ref.type||h.values.next({name:N,values:{...o}})))}($.shouldDirty||$.shouldTouch)&&L(N,Z,$.shouldTouch,$.shouldDirty,!0),$.shouldValidate&&te(N)},q=(N,D,$)=>{for(const Q in D){const Z=D[Q],K=`${N}.${Q}`,ne=re(r,K);(a.array.has(N)||!Sc(Z)||ne&&!ne._f)&&!Po(Z)?q(K,Z,$):U(K,Z,$)}},ee=(N,D,$={})=>{const Q=re(r,N),Z=a.array.has(N),K=ln(D);We(o,N,K),Z?(h.array.next({name:N,values:{...o}}),(f.isDirty||f.dirtyFields)&&$.shouldDirty&&h.state.next({name:N,dirtyFields:hl(i,o),isDirty:z(N,K)})):Q&&!Q._f&&!nn(K)?q(N,K,$):U(N,K,$),yv(N,a)&&h.state.next({...n}),h.values.next({name:s.mount?N:void 0,values:{...o}})},A=async N=>{s.mount=!0;const D=N.target;let $=D.name,Q=!0;const Z=re(r,$),K=()=>D.type?Fd(Z._f):Aw(N),ne=xe=>{Q=Number.isNaN(xe)||xe===re(o,$,xe)};if(Z){let xe,Ve;const Ue=K(),X=N.type===wc.BLUR||N.type===wc.FOCUS_OUT,G=!NL(Z._f)&&!t.resolver&&!re(n.errors,$)&&!Z._f.deps||LL(X,re(n.touchedFields,$),n.isSubmitted,C,v),ae=yv($,a,X);We(o,$,Ue),X?(Z._f.onBlur&&Z._f.onBlur(N),l&&l(0)):Z._f.onChange&&Z._f.onChange(N);const Se=L($,Ue,X,!1),ye=!wn(Se)||ae;if(!X&&h.values.next({name:$,type:N.type,values:{...o}}),G)return f.isValid&&P(),ye&&h.state.next({name:$,...ae?{}:Se});if(!X&&ae&&h.state.next({...n}),t.resolver){const{errors:ge}=await O([$]);if(ne(Ue),Q){const Ut=kv(n.errors,r,$),Tt=kv(ge,r,Ut.name||$);xe=Tt.error,$=Tt.name,Ve=wn(ge)}}else m([$],!0),xe=(await Cv(Z,o,w,t.shouldUseNativeValidation))[$],m([$]),ne(Ue),Q&&(xe?Ve=!1:f.isValid&&(Ve=await _(r,!0)));Q&&(Z._f.deps&&te(Z._f.deps),M($,Ve,xe,Se))}},Y=(N,D)=>{if(re(n.errors,D)&&N.focus)return N.focus(),1},te=async(N,D={})=>{let $,Q;const Z=Il(N);if(t.resolver){const K=await I(ct(N)?N:Z);$=wn(K),Q=N?!Z.some(ne=>re(K,ne)):$}else N?(Q=(await Promise.all(Z.map(async K=>{const ne=re(r,K);return await _(ne&&ne._f?{[K]:ne}:ne)}))).every(Boolean),!(!Q&&!n.isValid)&&P()):Q=$=await _(r);return h.state.next({...!fr(N)||f.isValid&&$!==n.isValid?{}:{name:N},...t.resolver||!N?{isValid:$}:{},errors:n.errors}),D.shouldFocus&&!Q&&Us(r,Y,N?Z:a.mount),Q},ce=N=>{const D={...i,...s.mount?o:{}};return ct(N)?D:fr(N)?re(D,N):N.map($=>re(D,$))},ue=(N,D)=>({invalid:!!re((D||n).errors,N),isDirty:!!re((D||n).dirtyFields,N),isTouched:!!re((D||n).touchedFields,N),isValidating:!!re((D||n).validatingFields,N),error:re((D||n).errors,N)}),F=N=>{N&&Il(N).forEach(D=>Ct(n.errors,D)),h.state.next({errors:N?n.errors:{}})},he=(N,D,$)=>{const Q=(re(r,N,{_f:{}})._f||{}).ref;We(n.errors,N,{...D,ref:Q}),h.state.next({name:N,errors:n.errors,isValid:!1}),$&&$.shouldFocus&&Q&&Q.focus&&Q.focus()},Le=(N,D)=>Qr(N)?h.values.subscribe({next:$=>N(R(void 0,D),$)}):R(N,D,!0),_e=(N,D={})=>{for(const $ of N?Il(N):a.mount)a.mount.delete($),a.array.delete($),D.keepValue||(Ct(r,$),Ct(o,$)),!D.keepError&&Ct(n.errors,$),!D.keepDirty&&Ct(n.dirtyFields,$),!D.keepTouched&&Ct(n.touchedFields,$),!D.keepIsValidating&&Ct(n.validatingFields,$),!t.shouldUnregister&&!D.keepDefaultValue&&Ct(i,$);h.values.next({values:{...o}}),h.state.next({...n,...D.keepDirty?{isDirty:z()}:{}}),!D.keepIsValid&&P()},Ae=({disabled:N,name:D,field:$,fields:Q,value:Z})=>{if(Zn(N)){const K=N?void 0:ct(Z)?Fd($?$._f:re(Q,D)._f):Z;We(o,D,K),L(D,K,!1,!1,!0)}},Pe=(N,D={})=>{let $=re(r,N);const Q=Zn(D.disabled);return We(r,N,{...$||{},_f:{...$&&$._f?$._f:{ref:{name:N}},name:N,mount:!0,...D}}),a.mount.add(N),$?Ae({field:$,disabled:D.disabled,name:N,value:D.value}):j(N,!0,D.value),{...Q?{disabled:D.disabled}:{},...t.progressive?{required:!!D.required,min:Ss(D.min),max:Ss(D.max),minLength:Ss(D.minLength),maxLength:Ss(D.maxLength),pattern:Ss(D.pattern)}:{},name:N,onChange:A,onBlur:A,ref:Z=>{if(Z){Pe(N,D),$=re(r,N);const K=ct(Z.value)&&Z.querySelectorAll&&Z.querySelectorAll("input,select,textarea")[0]||Z,ne=jL(K),xe=$._f.refs||[];if(ne?xe.find(Ve=>Ve===K):K===$._f.ref)return;We(r,N,{_f:{...$._f,...ne?{refs:[...xe.filter(zd),K,...Array.isArray(re(i,N))?[{}]:[]],ref:{type:K.type,name:N}}:{ref:K}}}),j(N,!1,void 0,K)}else $=re(r,N,{}),$._f&&($._f.mount=!1),(t.shouldUnregister||D.shouldUnregister)&&!(Rw(a.array,N)&&s.action)&&a.unMount.add(N)}}},be=()=>t.shouldFocusError&&Us(r,Y,a.mount),ft=N=>{Zn(N)&&(h.state.next({disabled:N}),Us(r,(D,$)=>{let Q=N;const Z=re(r,$);Z&&Zn(Z._f.disabled)&&(Q||(Q=Z._f.disabled)),D.disabled=Q},0,!1))},Ht=(N,D)=>async $=>{let Q;$&&($.preventDefault&&$.preventDefault(),$.persist&&$.persist());let Z=ln(o);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:K,values:ne}=await O();n.errors=K,Z=ne}else await _(r);if(Ct(n.errors,"root"),wn(n.errors)){h.state.next({errors:{}});try{await N(Z,$)}catch(K){Q=K}}else D&&await D({...n.errors},$),be(),setTimeout(be);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:wn(n.errors)&&!Q,submitCount:n.submitCount+1,errors:n.errors}),Q)throw Q},It=(N,D={})=>{re(r,N)&&(ct(D.defaultValue)?ee(N,ln(re(i,N))):(ee(N,D.defaultValue),We(i,N,ln(D.defaultValue))),D.keepTouched||Ct(n.touchedFields,N),D.keepDirty||(Ct(n.dirtyFields,N),n.isDirty=D.defaultValue?z(N,ln(re(i,N))):z()),D.keepError||(Ct(n.errors,N),f.isValid&&P()),h.state.next({...n}))},pe=(N,D={})=>{const $=N?ln(N):i,Q=ln($),Z=wn(N),K=Z?i:Q;if(D.keepDefaultValues||(i=$),!D.keepValues){if(D.keepDirtyValues)for(const ne of a.mount)re(n.dirtyFields,ne)?We(K,ne,re(o,ne)):ee(ne,re(K,ne));else{if(rm&&ct(N))for(const ne of a.mount){const xe=re(r,ne);if(xe&&xe._f){const Ve=Array.isArray(xe._f.refs)?xe._f.refs[0]:xe._f.ref;if(xc(Ve)){const Ue=Ve.closest("form");if(Ue){Ue.reset();break}}}}r={}}o=e.shouldUnregister?D.keepDefaultValues?ln(i):{}:ln(K),h.array.next({values:{...K}}),h.values.next({values:{...K}})}a={mount:D.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!f.isValid||!!D.keepIsValid||!!D.keepDirtyValues,s.watch=!!e.shouldUnregister,h.state.next({submitCount:D.keepSubmitCount?n.submitCount:0,isDirty:Z?!1:D.keepDirty?n.isDirty:!!(D.keepDefaultValues&&!_i(N,i)),isSubmitted:D.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Z?[]:D.keepDirtyValues?D.keepDefaultValues&&o?hl(i,o):n.dirtyFields:D.keepDefaultValues&&N?hl(i,N):{},touchedFields:D.keepTouched?n.touchedFields:{},errors:D.keepErrors?n.errors:{},isSubmitSuccessful:D.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},de=(N,D)=>pe(Qr(N)?N(o):N,D);return{control:{register:Pe,unregister:_e,getFieldState:ue,handleSubmit:Ht,setError:he,_executeSchema:O,_getWatch:R,_getDirty:z,_updateValid:P,_removeUnmounted:B,_updateFieldArray:g,_updateDisabledField:Ae,_getFieldArray:H,_reset:pe,_resetDefaultValues:()=>Qr(t.defaultValues)&&t.defaultValues().then(N=>{de(N,t.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:N=>{n={...n,...N}},_disableForm:ft,_subjects:h,_proxyFormState:f,_setErrors:E,get _fields(){return r},get _formValues(){return o},get _state(){return s},set _state(N){s=N},get _defaultValues(){return i},get _names(){return a},set _names(N){a=N},get _formState(){return n},set _formState(N){n=N},get _options(){return t},set _options(N){t={...t,...N}}},trigger:te,register:Pe,handleSubmit:Ht,watch:Le,setValue:ee,getValues:ce,reset:de,resetField:It,clearErrors:F,unregister:_e,setError:he,setFocus:(N,D={})=>{const $=re(r,N),Q=$&&$._f;if(Q){const Z=Q.refs?Q.refs[0]:Q.ref;Z.focus&&(Z.focus(),D.shouldSelect&&Z.select())}},getFieldState:ue}}function yr(e={}){const t=ie.useRef(),n=ie.useRef(),[r,i]=ie.useState({isDirty:!1,isValidating:!1,isLoading:Qr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Qr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...OL(e),formState:r});const o=t.current.control;return o._options=e,om({subject:o._subjects.state,next:s=>{zw(s,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),ie.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),ie.useEffect(()=>{if(o._proxyFormState.isDirty){const s=o._getDirty();s!==r.isDirty&&o._subjects.state.next({isDirty:s})}},[o,r.isDirty]),ie.useEffect(()=>{e.values&&!_i(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(s=>({...s}))):o._resetDefaultValues()},[e.values,o]),ie.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),ie.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),ie.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=Dw(r,o),t.current}const Bi=e=>{["e","E","+","-"].includes(e.key)&&e.preventDefault()},Yw=({name:e,price:t,image:n,averageRating:r})=>c.jsxs(Nw,{onClick:()=>{},children:[c.jsx("img",{src:n,alt:e,className:"h-80 max-w-48 object-scale-down"}),c.jsx("h3",{className:"mb-4 text-center",children:e}),c.jsxs("div",{className:"flex justify-between gap-4 items-center mx-2 mb-4",children:[c.jsxs("h3",{children:[t,"$"]}),c.jsxs("div",{className:"flex items-center gap-2 ",children:[c.jsx(g2,{className:"text-orange-200"}),c.jsx("p",{children:r})]}),c.jsxs("div",{className:"flex justify-between w-36",children:[c.jsx("button",{className:"flex justify-between items-center border bg-amber-300 text-white size-10 rounded-xl","aria-label":`Add ${e} to cart`,children:c.jsx(Qc,{className:"size-11/12"})}),c.jsx("button",{className:"bg-green-600 text-white rounded-2xl w-24","aria-label":`Buy ${e} now`,children:"Buy now"})]})]})]}),IL=()=>{const[e,t]=ie.useState(""),[n,r]=ie.useState(""),[i,o]=ie.useState(1),{register:s,handleSubmit:a,setValue:l,reset:d,formState:{errors:f}}=yr({mode:"onBlur"}),h=async w=>{fe.confirm("Is your product data correct? Do you want to add it?",async()=>{try{await rr.addProduct(w),fe.success("Product added successfully!"),d(),t(""),r(""),o(1)}catch(S){S!=null&&typeof S=="object"&&"message"in S&&typeof S.message=="string"?fe.error(S.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})},v=w=>{let S=parseFloat(w.target.value);isNaN(S)||S<1?S=1:S>99999&&(S=99999),o(S),l("price",S,{shouldValidate:!0,shouldDirty:!0})},C=w=>{const S=w.target.value;o(S===""?"":parseFloat(S))};return c.jsxs("div",{className:"flex flex-col items-center pt-4 pb-8",children:[c.jsx("h2",{className:"mb-4",children:"Add Product"}),c.jsxs("form",{noValidate:!0,onSubmit:a(h),className:"flex flex-col items-center w-3/4 mb-4",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 w-full",children:[c.jsx(we,{register:s,errors:f,name:"name","aria-label":"Name",minLength:2,maxLength:30,required:!0,onChange:w=>{r(w.target.value)}}),c.jsx(we,{register:s,errors:f,name:"brand","aria-label":"Brand",minLength:2,maxLength:30,required:!0}),c.jsx("div",{className:"col-span-1 md:col-span-2",children:c.jsx(we,{register:s,errors:f,name:"image",placeholder:"Image URL","aria-label":"Image URL",required:!0,onChange:w=>{t(w.target.value)}})}),c.jsx("div",{className:"col-span-1 md:col-span-2",children:c.jsx(em,{register:s,errors:f,name:"description",minLength:2,maxLength:512,required:!0})}),c.jsx(we,{register:s,errors:f,name:"price","aria-label":"Price",type:"number",min:1,minLength:1,max:99999,required:!0,value:i,onWheel:w=>w.target.blur(),onBlur:v,onChange:C,onKeyDown:Bi}),c.jsxs("div",{className:"mb-4 w-full px-4",children:[c.jsx("label",{htmlFor:"category",children:"Category"}),c.jsxs("select",{id:"category",...s("category",{required:"Category is required"}),children:[c.jsx("option",{value:"Laptop",children:"Laptop"}),c.jsx("option",{value:"Cellular",children:"Cellular"}),c.jsx("option",{value:"TV",children:"TV"}),c.jsx("option",{value:"Headphone",children:"Headphone"})]}),f.category&&c.jsx("span",{className:"text-red-500",children:"Category is required"})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 w-full col-span-1 md:col-span-2",children:[c.jsx(we,{register:s,errors:f,name:"memory"}),c.jsx(we,{register:s,errors:f,name:"screenSize"}),c.jsx(we,{register:s,errors:f,name:"batteryCapacity"})]}),c.jsx(we,{register:s,errors:f,name:"operatingSystem"}),c.jsx(we,{register:s,errors:f,name:"color"})]}),c.jsx("div",{children:c.jsx("button",{className:"action-button mt-4",children:"Add Product"})})]}),c.jsx("h2",{className:"mb-4",children:"Preview"}),c.jsx(Yw,{name:n,price:i,image:Tw(e)?e:"",averageRating:4.9})]})},$L=()=>c.jsx("div",{className:"animate-pulse border bg-gray-400 h-[19rem] flex flex-col justify-between",children:Array.from({length:10}).map((e,t)=>c.jsx("hr",{},t))}),Xw=()=>c.jsx("div",{className:"md:hidden flex flex-col justify-center gap-4 my-4 mx-1",children:Array.from({length:3}).map((e,t)=>c.jsx($L,{},t))}),AL=()=>c.jsx("div",{className:"animate-pulse border h-12 bg-gray-400"}),Qw=()=>c.jsx("div",{className:"md:flex flex-col mx-1 hidden",children:Array.from({length:3}).map((e,t)=>c.jsx(AL,{},t))}),Zw=()=>{const{isAdmin:e}=k.useContext(Nn),n=vn().pathname,r=n.substring(n.lastIndexOf("/")+1)==="all-orders";return c.jsxs("div",{className:"md:flex justify-around items-center text-center border border-black dark:border-white mx-1 px-4 hidden",children:[c.jsx("p",{className:"flex-1",children:"Order ID"}),c.jsx("p",{className:"flex-1",children:"Address"}),c.jsx("p",{className:"flex-1",children:"City"}),c.jsx("p",{className:"flex-1",children:"Postal Code"}),c.jsx("p",{className:"flex-1",children:"Payment Information"}),c.jsx("p",{className:"flex-1",children:"Total Price"}),c.jsx("p",{className:"flex-1",children:"Status"}),c.jsx("p",{className:"flex-1",children:"Date"}),c.jsx("p",{className:"flex-1",children:"Order Items"}),e&&r&&c.jsx("p",{className:"flex-1",children:"Change Status"})]})};var Ei=(e=>(e.PENDING="Pending",e.APPROVED="Approved",e.DECLINED="Declined",e))(Ei||{});const Jw=({orderId:e,onSubmit:t})=>{const{handleSubmit:n,register:r,setValue:i}=yr({mode:"onChange",defaultValues:{orderId:e,status:""}}),o=a=>{i("orderId",e,{shouldValidate:!0,shouldDirty:!0}),i("status",a.target.value,{shouldValidate:!0,shouldDirty:!0}),n(t)()},s=a=>{a.stopPropagation()};return c.jsxs("form",{className:"dark:text-white flex-1 p-2 md:p-0",onClick:s,onSubmit:n(t),children:[c.jsx("input",{type:"hidden",...r("orderId")}),c.jsxs("select",{className:"md:my-1",...r("status"),defaultValue:"",onChange:o,onClick:s,children:[c.jsx("option",{value:"",disabled:!0,children:"Select status"}),c.jsx("option",{value:Ei.PENDING,children:Ei.PENDING}),c.jsx("option",{value:Ei.APPROVED,children:Ei.APPROVED}),c.jsx("option",{value:Ei.DECLINED,children:Ei.DECLINED})]})]})},ex=({orders:e,navigateToOrder:t})=>{const{isAdmin:n}=k.useContext(Nn),r=ut(),o=vn().pathname,s=o.substring(o.lastIndexOf("/")+1)==="all-orders",a=async l=>{fe.confirm("Do you want to change the status of this order?",async()=>{try{await ka.updateOrderStatus(l),fe.success("Order updated successfully!"),setTimeout(()=>{r(0)},2e3)}catch(d){d!=null&&typeof d=="object"&&"message"in d&&typeof d.message=="string"?fe.error(d.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})};return c.jsx("div",{className:"md:hidden",children:e.orders.map(l=>c.jsxs("div",{onClick:()=>{const d=e.orders.find(f=>f.id===l.id);d&&t(ox(),d)},className:`flex flex-col justify-center gap-2 text-center border border-black dark:border-white cursor-pointer my-4 mx-1 ${ix(l.status)}`,children:[c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Order ID"}),c.jsx("p",{className:"dark:text-white",children:l.id})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Address"}),c.jsx("p",{className:"dark:text-white",children:l.address})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"City"}),c.jsx("p",{className:"dark:text-white",children:l.city})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Postal Code"}),c.jsx("p",{className:"dark:text-white",children:l.postalCode})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Payment Information"}),c.jsx("p",{className:"dark:text-white",children:l.paymentInformation})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Total Price"}),c.jsxs("p",{className:"dark:text-white",children:[l.totalPrice,"$"]})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Status"}),c.jsx("p",{className:"dark:text-white",children:l.status})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Date"}),c.jsx("p",{className:"dark:text-white",children:jw(l.createdAt)})]}),c.jsxs("div",{className:"flex justify-between items-center px-4",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Order Items"}),c.jsx("p",{className:"dark:text-white",children:c.jsx(h2,{})})]}),n&&s&&c.jsx(Jw,{orderId:l.id,initialStatus:l.status,onSubmit:a})]},l.id))})},tx=({orders:e,navigateToOrder:t})=>{const{isAdmin:n}=k.useContext(Nn),r=ut(),o=vn().pathname,s=o.substring(o.lastIndexOf("/")+1)==="all-orders",a=async l=>{fe.confirm("Do you want to change the status of this order?",async()=>{try{await ka.updateOrderStatus(l),fe.success("Order updated successfully!"),setTimeout(()=>{r(0)},2e3)}catch(d){d!=null&&typeof d=="object"&&"message"in d&&typeof d.message=="string"?fe.error(d.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})};return c.jsx("div",{children:e.orders.map(l=>c.jsxs("div",{onClick:()=>{const d=e.orders.find(f=>f.id===l.id);d&&t(ox(),d)},className:`md:flex justify-around items-center text-center border border-black dark:border-white mx-1 px-4 hidden cursor-pointer ${ix(l.status)}`,children:[c.jsx("p",{className:"dark:text-white flex-1",children:l.id}),c.jsx("p",{className:"dark:text-white flex-1",children:l.address}),c.jsx("p",{className:"dark:text-white flex-1",children:l.city}),c.jsx("p",{className:"dark:text-white flex-1",children:l.postalCode}),c.jsx("p",{className:"dark:text-white flex-1",children:l.paymentInformation}),c.jsxs("p",{className:"dark:text-white flex-1",children:[l.totalPrice,"$"]}),c.jsx("p",{className:"dark:text-white flex-1",children:l.status}),c.jsx("p",{className:"dark:text-white flex-1",children:jw(l.createdAt)}),c.jsx("p",{className:"dark:text-white flex-1 flex justify-center",children:c.jsx(h2,{})}),n&&s&&c.jsx(Jw,{orderId:l.id,initialStatus:l.status,onSubmit:a})]},l.id))})},nx=({toggleSortDrawer:e,handleMenuOpen:t,anchorMenuEl:n,open:r,handleMenuClose:i,handleSortChange:o})=>c.jsxs("div",{className:"sm:absolute top-2 right-4 self-center",children:[c.jsxs(Hs,{onClick:e,display:"md:hidden flex",ariaLabel:"Sort by",children:[c.jsx("p",{children:"Sort by"}),c.jsx(fc,{className:"text-primary-regular dark:text-primary-light"})]}),c.jsxs(Hs,{onClick:t,display:"hidden md:flex",ariaLabel:"Sort by",children:[c.jsx("p",{children:"Sort by"}),c.jsx(fc,{className:"text-primary-regular dark:text-primary-light"}),c.jsx(Lw,{anchorEl:n,open:r,onClose:i,onSortChange:o,sortInputs:cm})]})]}),rx=({handlePrevPage:e,handleNextPage:t,currentPage:n,totalPages:r})=>{const i="size-10 text-primary-regular dark:text-primary-light hover:text-primary-light dark:hover:text-primary-regular transition-colors duration-300 ease-in-out";return c.jsxs("div",{className:"flex items-center justify-between w-64 mx-auto my-4",children:[c.jsx("button",{onClick:e,disabled:n===0,className:"disabled:opacity-50 disabled:cursor-not-allowed",children:c.jsx(a5,{className:i})}),c.jsxs("h2",{className:"text-primary-regular dark:text-primary-light",children:[n+1," / ",r]}),c.jsx("button",{onClick:t,disabled:n>=r-1,className:"disabled:opacity-50 disabled:cursor-not-allowed",children:c.jsx(l5,{className:i})})]})},RL=()=>{const{isAdmin:e}=k.useContext(Nn),[t,n]=k.useState(),[r,i]=k.useState(!1),[o,s]=k.useState(),[a,l]=k.useState(0),[d,f]=k.useState(0),[h,v]=k.useState(!1),[C,w]=k.useState(""),[S,P]=k.useState(null),m=!!S,g=()=>{a>0&&l(_=>_-1)},y=()=>{a_+1)},E=_=>{P(_.currentTarget)};k.useEffect(()=>{const _=B=>{S&&!S.contains(B.target)&&P(null)};return document.addEventListener("click",_),()=>{document.removeEventListener("click",_)}},[S,m]);const j=()=>{P(null)},L=()=>{v(_=>!_)},M=_=>{w(_)},O=ut(),I=(_,B)=>{O(`${ve}orders/${_}`,{state:{specificOrder:B}})};return k.useEffect(()=>{(async()=>{const[B,z]=Jh(C),R=B,H=z;try{i(!0),s(void 0);const U=await ka.fetchAllOrders({pageNumber:a,sortBy:R,sortDir:H});n(U),f(U.totalPages)}catch(U){U!=null&&typeof U=="object"&&"message"in U&&typeof U.message=="string"&&s(U.message)}finally{i(!1)}})()},[a,C]),c.jsxs("div",{className:"relative flex flex-col",children:[c.jsx("h2",{className:"text-center my-4",children:"All Orders"}),c.jsx(nx,{toggleSortDrawer:L,handleMenuOpen:E,anchorMenuEl:S,open:m,handleMenuClose:j,handleSortChange:M}),r&&c.jsxs(c.Fragment,{children:[c.jsx(Xw,{}),c.jsx(Qw,{})]}),o&&c.jsx("h2",{className:"error",children:o}),e?t?c.jsxs("div",{children:[c.jsx(Zw,{}),c.jsx(ex,{orders:t,navigateToOrder:I}),c.jsx(tx,{orders:t,navigateToOrder:I}),c.jsx(rx,{handlePrevPage:g,handleNextPage:y,currentPage:a,totalPages:d})]}):!o&&!r&&c.jsx("h1",{className:"m-auto",children:"There are no orders yet!"}):c.jsx("h1",{className:"error",children:"Access Denied"}),c.jsx(nm,{isOpen:h,toggleDrawer:L,onSortChange:M,sortInputs:cm})]})},DL=()=>c.jsx("div",{className:"animate-pulse bg-gray-400 dark:bg-slate-200 border flex gap-2 items-center h-12 px-2 md:flex-1 md:border md:rounded-lg md:mx-2 md:my-2 md:py-2 md:justify-center"}),zL=()=>{const{isAdmin:e}=k.useContext(Nn),t=e?4:2;return c.jsx("div",{className:"flex flex-col md:flex-row",children:Array.from({length:t}).map((n,r)=>c.jsx(DL,{},r))})},FL=()=>{const{user:e,logout:t}=k.useContext(Nn),[n,r]=k.useState(!1),i=()=>{r(!0)},o=()=>{r(!1)},{register:s,handleSubmit:a,formState:{errors:l}}=yr({mode:"onBlur"}),d=async w=>{fe.confirm("Are you sure you want to update your data? You will have to login again!",async()=>{const S={oldUsername:e==null?void 0:e.username,newUsername:w.username,email:w.email,userImage:w.userImage};try{await Go.updateUserDetails(S),fe.success("Your data updated successfully! Now you have to login again."),t()}catch(P){P!=null&&typeof P=="object"&&"message"in P&&typeof P.message=="string"?fe.error(P.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})},{register:f,handleSubmit:h,formState:{errors:v}}=yr({mode:"onBlur"}),C=async w=>{if(w.newPassword!==w.confirmNewPassword){o(),fe.error("Password and confirm password do not match");return}w.username=e==null?void 0:e.username;try{await Go.changePassword(w),fe.success("Password changed successfully!")}catch(S){S!=null&&typeof S=="object"&&"message"in S&&typeof S.message=="string"?fe.error(S.message):fe.error("An unexpected error occurred. Please try again.")}finally{o()}};return c.jsxs("div",{className:"flex flex-col items-center",children:[c.jsx("h2",{className:"my-4",children:"Personal Data"}),c.jsx("img",{src:e==null?void 0:e.userImage,alt:"User Avatar",className:"size-48 sm:size-80 rounded-full"}),c.jsxs("form",{noValidate:!0,onSubmit:a(d),className:"flex flex-col items-center my-4 sm:w-3/4 md:grid md:grid-cols-2",children:[c.jsx(we,{register:s,errors:l,name:"username",placeholder:"Username",defaultValue:e==null?void 0:e.username,"aria-label":"Username",className:"md:col-span-1"}),c.jsx(we,{pattern:{message:"Email must be valid",value:/^[\w.]+@([\w-]+\.)+[\w-]{2,4}$/},register:s,errors:l,name:"email",placeholder:"Email",defaultValue:e==null?void 0:e.email,"aria-label":"Email",className:"md:col-span-1"}),c.jsx(we,{register:s,errors:l,name:"userImage",placeholder:"User Avatar",defaultValue:e==null?void 0:e.userImage,"aria-label":"User Avatar",className:"md:col-span-2"}),c.jsxs("div",{className:"md:col-span-2 mt-4 w-full flex justify-around flex-col md:flex-row",children:[c.jsx("button",{className:"action-button md:w-40",type:"submit",children:"Update Data"}),c.jsx("button",{className:"action-button md:w-40",type:"button",onClick:i,children:"Change Password"})]})]}),c.jsxs(sp,{open:n,onClose:o,PaperProps:{component:"form",onSubmit:h(C)},classes:{paper:"dark:bg-slate-600"},children:[c.jsx(cp,{className:"text-center",children:"Change Password"}),c.jsxs(lp,{children:[c.jsx(we,{register:f,errors:v,name:"oldPassword",type:"password",pattern:{value:/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[*!@$%^&_]).{8,32}$/,message:"Your password must be 8-32 characters long and include at least one lowercase letter, one uppercase letter, one digit, and one special character."},placeholder:"Old Password","aria-label":"Old Password"}),c.jsx(we,{register:f,errors:v,name:"newPassword",type:"password",pattern:{value:/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[*!@$%^&_]).{8,32}$/,message:"Your password must be 8-32 characters long and include at least one lowercase letter, one uppercase letter, one digit, and one special character."},placeholder:"New Password","aria-label":"New Password"}),c.jsx(we,{register:f,errors:v,name:"confirmNewPassword",type:"password",placeholder:"Confirm New Password","aria-label":"Confirm New Password"})]}),c.jsxs(ap,{className:"flex justify-center",children:[c.jsx("button",{className:"action-button",onClick:o,type:"button",children:"Cancel"}),c.jsx("button",{className:"action-button",type:"submit",children:"Change Password"})]})]})]})},BL=()=>{const[e,t]=k.useState(null),[n,r]=k.useState(!1),[i,o]=k.useState(null),[s,a]=k.useState(0),[l,d]=k.useState(0),[f,h]=k.useState(!1),[v,C]=k.useState(""),[w,S]=k.useState(null),P=!!w,m=I=>{S(I.currentTarget)};k.useEffect(()=>{const I=_=>{w&&!w.contains(_.target)&&S(null)};return document.addEventListener("click",I),()=>{document.removeEventListener("click",I)}},[w,P]);const g=()=>{S(null)},y=()=>{h(I=>!I)},E=I=>{C(I)},j=ut();k.useEffect(()=>{(async()=>{const[_,B]=Jh(v),z=_,R=B;try{r(!0),o(null);const H=await ka.fetchCustomerOrders({pageNumber:s,sortBy:z,sortDir:R});t(H),d(H.totalPages)}catch(H){H!=null&&typeof H=="object"&&"message"in H&&typeof H.message=="string"&&o(H.message)}finally{r(!1)}})()},[s,v]);const L=()=>{s>0&&a(I=>I-1)},M=()=>{sI+1)},O=(I,_)=>{j(`${ve}orders/${I}`,{state:{specificOrder:_}})};return c.jsxs("div",{className:"relative flex flex-col",children:[c.jsx("h2",{className:"text-center my-4",children:"Recent Orders"}),c.jsx(nx,{toggleSortDrawer:y,handleMenuOpen:m,anchorMenuEl:w,open:P,handleMenuClose:g,handleSortChange:E}),n&&c.jsxs(c.Fragment,{children:[c.jsx(Xw,{}),c.jsx(Qw,{})]}),i&&c.jsx("h2",{className:"error",children:i}),e?c.jsxs("div",{children:[c.jsx(Zw,{}),c.jsx(ex,{orders:e,navigateToOrder:O}),c.jsx(tx,{orders:e,navigateToOrder:O}),c.jsx(rx,{handlePrevPage:L,handleNextPage:M,currentPage:s,totalPages:l})]}):!n&&!i&&c.jsx("h1",{className:"m-auto",children:"There are no orders yet!"}),c.jsx(nm,{isOpen:f,toggleDrawer:y,onSortChange:E,sortInputs:cm})]})},cm=[{id:"createdAt_asc",label:"Order date: oldest first"},{id:"createdAt_desc",label:"Order date: newest first"},{id:"status_asc",label:"Status: pending first"},{id:"status_desc",label:"Status: declined first"},{id:"totalPrice_asc",label:"Total price: low to high"},{id:"totalPrice_desc",label:"Total price: high to low"}];function ix(e){switch(e.toLowerCase()){case"pending":return"bg-amber-300 dark:bg-yellow-500 hover:bg-amber-400 dark:hover:bg-yellow-600 transition-colors duration-300 ease-in-out active:bg-amber-300 dark:active:bg-yellow-500";case"approved":return"bg-green-300 dark:bg-green-500 hover:bg-green-400 dark:hover:bg-green-600 transition-colors duration-300 ease-in-out active:bg-green-300 dark:active:bg-green-500";case"declined":return"bg-red-300 dark:bg-red-500 hover:bg-red-400 dark:hover:bg-red-600 transition-colors duration-300 ease-in-out active:bg-red-300 dark:active:bg-red-500";default:return""}}function ox(){const e="0123456789abcdef";function t(n){let r="";for(let i=0;i{const t=ut(),[n,r]=k.useState(!1),[i,o]=k.useState(e.price),[s,a]=k.useState(e.image),[l,d]=k.useState(e.name),[f,h]=k.useState(!1),{register:v,handleSubmit:C,setValue:w,formState:{errors:S}}=yr({mode:"onBlur"}),P=()=>{r(!0)},m=()=>{r(!1)},g=()=>{r(!1),h(!0)},y=()=>{h(!1),r(!0)},E=()=>{fe.confirm("Do you want to delete this product?",async()=>{try{await rr.deleteProduct(e.id),fe.success("Product deleted successfully!"),t(-1)}catch(O){O!=null&&typeof O=="object"&&"message"in O&&typeof O.message=="string"?fe.error(O.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})},j=O=>{let I=parseFloat(O.target.value);isNaN(I)||I<1?I=1:I>99999&&(I=99999),o(I),w("price",I,{shouldValidate:!0,shouldDirty:!0})},L=O=>{const I=O.target.value;I===""?o(""):isNaN(parseFloat(I))||o(I)},M=async O=>{m(),fe.confirm("Are you sure you want to update your data? You will have to login again!",async()=>{try{await rr.updateProduct(e.id,O),fe.success("Product updated successfully!"),window.location.reload()}catch(I){I!=null&&typeof I=="object"&&"message"in I&&typeof I.message=="string"?fe.error(I.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{P()})};return c.jsxs("div",{className:"flex gap-4 mb-4",children:[c.jsx("button",{className:"bg-accent-regular text-white rounded-xl flex-1 h-10 mb-4 min-w-32 max-w-40 hover-button",onClick:P,children:"Change Product"}),c.jsx("button",{className:"bg-red-600 text-white rounded-xl flex-1 h-10 min-w-32 max-w-40 hover-button",onClick:E,children:"Delete Product"}),c.jsxs(sp,{open:n,onClose:m,PaperProps:{component:"form",onSubmit:C(M)},classes:{paper:"dark:bg-slate-600 sm:w-3/4"},children:[c.jsx(cp,{className:"text-center",children:"Update Product"}),c.jsxs(lp,{children:[c.jsx(we,{register:v,errors:S,name:"name","aria-label":"Name",minLength:2,maxLength:30,defaultValue:e.name,onChange:O=>d(O.target.value),required:!0}),c.jsx(we,{register:v,errors:S,name:"brand","aria-label":"Brand",minLength:2,maxLength:30,defaultValue:e.brand,required:!0}),c.jsx(we,{register:v,errors:S,name:"image",placeholder:"Image URL","aria-label":"Image URL",defaultValue:e.image,onChange:O=>a(O.target.value),required:!0}),c.jsx(em,{register:v,errors:S,name:"description",minLength:2,maxLength:512,defaultValue:e.description,required:!0}),c.jsx(we,{register:v,errors:S,name:"price","aria-label":"Price",type:"number",min:1,minLength:1,max:99999,step:.01,required:!0,value:i,onWheel:O=>O.target.blur(),onBlur:j,onChange:L,onKeyDown:Bi}),c.jsxs("div",{className:"mb-4 w-full px-4",children:[c.jsx("label",{htmlFor:"category",children:"Category"}),c.jsxs("select",{id:"category",...v("category",{required:!0}),defaultValue:e.category,children:[c.jsx("option",{value:"Laptop",children:"Laptop"}),c.jsx("option",{value:"Cellular",children:"Cellular"}),c.jsx("option",{value:"TV",children:"TV"}),c.jsx("option",{value:"Headphone",children:"Headphone"})]}),S.category&&c.jsx("span",{className:"text-red-500",children:"Category is required"})]}),c.jsx(we,{register:v,errors:S,defaultValue:e.memory,name:"memory"}),c.jsx(we,{register:v,errors:S,defaultValue:e.screenSize,name:"screenSize"}),c.jsx(we,{register:v,errors:S,defaultValue:e.batteryCapacity,name:"batteryCapacity"}),c.jsx(we,{register:v,errors:S,defaultValue:e.operatingSystem,name:"operatingSystem"}),c.jsx(we,{register:v,errors:S,defaultValue:e.color,name:"color"})]}),c.jsxs(ap,{className:"flex justify-between",children:[c.jsx("button",{className:"action-button",type:"button",onClick:m,children:"Cancel"}),c.jsx("button",{className:"action-button",type:"submit",children:"Update Product"})]}),c.jsx(ap,{children:c.jsx("button",{className:"action-button w-full",type:"button",onClick:g,children:"Preview"})})]}),c.jsxs(sp,{open:f,onClose:y,classes:{paper:"dark:bg-slate-600 m-0 p-0"},children:[c.jsxs(cp,{className:"text-center flex w-full justify-between",children:[c.jsx("span",{className:"text-3xl",children:"Preview"}),c.jsx("button",{className:"justify-self-end",onClick:y,children:c.jsx(Ea,{className:"size-8 transition-all duration-300 ease-in-out hover:scale-125"})})]}),c.jsx(lp,{className:"p-0",children:c.jsx(Yw,{name:l,price:i,image:s,averageRating:parseFloat(e.averageRating)===0?4.9:parseFloat(e.averageRating)})})]})]})},HL=()=>c.jsxs("span",{className:"animate-pulse flex flex-col items-center",children:[c.jsxs("div",{className:"flex flex-col lg:flex-row lg:w-full justify-center items-center w-screen my-4",children:[c.jsx("div",{className:"bg-slate-300 rounded-3xl w-72 h-96 sm:w-96"}),c.jsxs("div",{className:"grid grid-cols-2 w-80 sm:w-96 gap-4 lg:gap-8 place-items-center my-4 lg:ml-16",children:[c.jsx("div",{className:"h-12 lg:h-6 w-32 sm:w-48 lg:80 bg-slate-300 rounded-lg lg:my-20"}),c.jsx("div",{className:"h-12 lg:h-6 w-32 sm:w-48 lg:80 bg-slate-300 rounded-lg lg:my-20"}),c.jsx("div",{className:"h-12 lg:h-6 w-32 sm:w-48 lg:80 bg-slate-300 rounded-lg lg:my-20"}),c.jsx("div",{className:"h-12 lg:h-6 w-32 sm:w-48 lg:80 bg-slate-300 rounded-lg lg:my-20"})]})]}),c.jsx("div",{className:"h-8 lg:h-16 w-24 lg:w-56 bg-slate-300 rounded-2xl my-4"}),c.jsx("div",{className:"h-20 w-72 sm:w-[30rem] md:w-[35rem] lg:w-[40rem] bg-slate-300 rounded-2xl my-4"}),c.jsx("div",{className:"h-8 w-36 bg-slate-300 rounded-2xl my-4"}),c.jsxs("div",{className:"flex flex-wrap gap-4 lg:gap-8 items-center justify-center lg:flex-nowrap w-64 lg:w-1/2 mb-4",children:[c.jsx("div",{className:"bg-slate-300 h-10 w-36 rounded-2xl"}),c.jsx("div",{className:"bg-slate-300 h-10 w-28 lg:w-36 rounded-2xl"}),c.jsx("div",{className:"bg-slate-300 h-10 w-28 lg:w-36 rounded-2xl"})]})]}),uo=({children:e})=>c.jsx("div",{className:"gap-2 p-2 lg:flex justify-center items-center ",children:e}),UL=()=>{const{id:e}=V3(),{isAdmin:t}=k.useContext(Nn),[n,r]=k.useState(1),[i,o]=k.useState(!1),[s,a]=k.useState(!1),l=parseInt(e??"",10),[d,f]=k.useState(null),[h,v]=k.useState(!0),[C,w]=k.useState(),{increaseItemQuantity:S,getItemQuantity:P}=hi(),[m,g]=k.useState("grid-cols-2"),y=ut();if(k.useEffect(()=>{(async()=>{try{v(!0),w(void 0);const M=await rr.fetchProduct(l);f(M),(M==null?void 0:M.category.toLowerCase())==="headphone"&&g("grid-cols-1")}catch(M){M!=null&&typeof M=="object"&&"message"in M&&typeof M.message=="string"&&w(M.message)}finally{v(!1)}})()},[l]),isNaN(l))throw new Error("Invalid product id");k.useEffect(()=>{o(n<=1),a(n>=5)},[n]);const E=()=>{P(l)<5&&S(l),y(`${ve}cart`)},j=()=>{for(let L=0;L{r(L=>Math.max(L-1,1))},disabled:i,children:c.jsx(d2,{className:"text-secondary-regular dark:text-secondary-light h-full rounded-l-md"})}),c.jsx("div",{className:"w-8 text-center dark:text-white",children:n}),c.jsx("button",{className:`h-full rounded-r-md ${s?"bg-slate-300 dark:bg-gray-400":""}`,onClick:()=>{r(L=>Math.min(L+1,5))},disabled:s,children:c.jsx(u2,{className:"text-secondary-regular dark:text-secondary-light h-full rounded-r-md"})})]})]}),c.jsxs("div",{className:"flex justify-between items-center w-full lg:w-[55%] gap-4",children:[c.jsxs("button",{className:"flex flex-1 text-center justify-around items-center border bg-amber-300 text-white size-10 rounded-xl max-w-40 hover-button","aria-label":`Add ${d==null?void 0:d.name} to cart`,onClick:j,children:[c.jsx(Qc,{className:"size-8"}),"Add to cart"]}),c.jsx("button",{className:"bg-green-600 text-white rounded-xl flex-1 h-10 max-w-40 hover-button","aria-label":`Buy ${d==null?void 0:d.name} now`,onClick:E,children:"Buy now"})]})]}),t&&d&&c.jsx(VL,{product:d})]})})};/*! ***************************************************************************** +`),In.rippleVisible,K6,ip,({theme:e})=>e.transitions.easing.easeInOut,In.ripplePulsate,({theme:e})=>e.transitions.duration.shorter,In.child,In.childLeaving,Y6,ip,({theme:e})=>e.transitions.easing.easeInOut,In.childPulsate,X6,({theme:e})=>e.transitions.easing.easeInOut),J6=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:o}=r,a=Me(r,G6),[l,d]=k.useState([]),f=k.useRef(0),h=k.useRef(null);k.useEffect(()=>{h.current&&(h.current(),h.current=null)},[l]);const v=k.useRef(!1),C=Z2(),w=k.useRef(null),S=k.useRef(null),P=k.useCallback(E=>{const{pulsate:j,rippleX:L,rippleY:M,rippleSize:O,cb:I}=E;d(_=>[..._,c.jsx(Z6,{classes:{ripple:Ce(s.ripple,In.ripple),rippleVisible:Ce(s.rippleVisible,In.rippleVisible),ripplePulsate:Ce(s.ripplePulsate,In.ripplePulsate),child:Ce(s.child,In.child),childLeaving:Ce(s.childLeaving,In.childLeaving),childPulsate:Ce(s.childPulsate,In.childPulsate)},timeout:ip,pulsate:j,rippleX:L,rippleY:M,rippleSize:O},f.current)]),f.current+=1,h.current=I},[s]),m=k.useCallback((E={},j={},L=()=>{})=>{const{pulsate:M=!1,center:O=i||j.pulsate,fakeElement:I=!1}=j;if((E==null?void 0:E.type)==="mousedown"&&v.current){v.current=!1;return}(E==null?void 0:E.type)==="touchstart"&&(v.current=!0);const _=I?null:S.current,B=_?_.getBoundingClientRect():{width:0,height:0,left:0,top:0};let z,R,H;if(O||E===void 0||E.clientX===0&&E.clientY===0||!E.clientX&&!E.touches)z=Math.round(B.width/2),R=Math.round(B.height/2);else{const{clientX:U,clientY:q}=E.touches&&E.touches.length>0?E.touches[0]:E;z=Math.round(U-B.left),R=Math.round(q-B.top)}if(O)H=Math.sqrt((2*B.width**2+B.height**2)/3),H%2===0&&(H+=1);else{const U=Math.max(Math.abs((_?_.clientWidth:0)-z),z)*2+2,q=Math.max(Math.abs((_?_.clientHeight:0)-R),R)*2+2;H=Math.sqrt(U**2+q**2)}E!=null&&E.touches?w.current===null&&(w.current=()=>{P({pulsate:M,rippleX:z,rippleY:R,rippleSize:H,cb:L})},C.start(q6,()=>{w.current&&(w.current(),w.current=null)})):P({pulsate:M,rippleX:z,rippleY:R,rippleSize:H,cb:L})},[i,P,C]),g=k.useCallback(()=>{m({},{pulsate:!0})},[m]),y=k.useCallback((E,j)=>{if(C.clear(),(E==null?void 0:E.type)==="touchend"&&w.current){w.current(),w.current=null,C.start(0,()=>{y(E,j)});return}w.current=null,d(L=>L.length>0?L.slice(1):L),h.current=j},[C]);return k.useImperativeHandle(n,()=>({pulsate:g,start:m,stop:y}),[g,m,y]),c.jsx(Q6,V({className:Ce(In.root,s.root,o),ref:S},a,{children:c.jsx(I6,{component:null,exit:!0,children:l})}))}),eT=J6;function tT(e){return Bt("MuiButtonBase",e)}const nT=St("MuiButtonBase",["root","disabled","focusVisible"]),rT=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],iT=e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:i}=e,o=Jt({root:["root",t&&"disabled",n&&"focusVisible"]},tT,i);return n&&r&&(o.root+=` ${r}`),o},sT=Oe("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${nT.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),oT=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiButtonBase"}),{action:i,centerRipple:s=!1,children:o,className:a,component:l="button",disabled:d=!1,disableRipple:f=!1,disableTouchRipple:h=!1,focusRipple:v=!1,LinkComponent:C="a",onBlur:w,onClick:S,onContextMenu:P,onDragLeave:m,onFocus:g,onFocusVisible:y,onKeyDown:E,onKeyUp:j,onMouseDown:L,onMouseLeave:M,onMouseUp:O,onTouchEnd:I,onTouchMove:_,onTouchStart:B,tabIndex:z=0,TouchRippleProps:R,touchRippleRef:H,type:U}=r,q=Me(r,rT),ee=k.useRef(null),A=k.useRef(null),Y=gn(A,H),{isFocusVisibleRef:te,onFocus:ce,onBlur:ue,ref:F}=zh(),[he,Le]=k.useState(!1);d&&he&&Le(!1),k.useImperativeHandle(i,()=>({focusVisible:()=>{Le(!0),ee.current.focus()}}),[]);const[_e,Ae]=k.useState(!1);k.useEffect(()=>{Ae(!0)},[]);const Pe=_e&&!f&&!d;k.useEffect(()=>{he&&v&&!f&&_e&&A.current.pulsate()},[f,v,he,_e]);function be(G,ae,Se=h){return Nr(ye=>(ae&&ae(ye),!Se&&A.current&&A.current[G](ye),!0))}const dt=be("start",L),Ht=be("stop",P),It=be("stop",m),pe=be("stop",O),de=be("stop",G=>{he&&G.preventDefault(),M&&M(G)}),oe=be("start",B),ke=be("stop",I),me=be("stop",_),N=be("stop",G=>{ue(G),te.current===!1&&Le(!1),w&&w(G)},!1),D=Nr(G=>{ee.current||(ee.current=G.currentTarget),ce(G),te.current===!0&&(Le(!0),y&&y(G)),g&&g(G)}),$=()=>{const G=ee.current;return l&&l!=="button"&&!(G.tagName==="A"&&G.href)},Q=k.useRef(!1),Z=Nr(G=>{v&&!Q.current&&he&&A.current&&G.key===" "&&(Q.current=!0,A.current.stop(G,()=>{A.current.start(G)})),G.target===G.currentTarget&&$()&&G.key===" "&&G.preventDefault(),E&&E(G),G.target===G.currentTarget&&$()&&G.key==="Enter"&&!d&&(G.preventDefault(),S&&S(G))}),K=Nr(G=>{v&&G.key===" "&&A.current&&he&&!G.defaultPrevented&&(Q.current=!1,A.current.stop(G,()=>{A.current.pulsate(G)})),j&&j(G),S&&G.target===G.currentTarget&&$()&&G.key===" "&&!G.defaultPrevented&&S(G)});let ne=l;ne==="button"&&(q.href||q.to)&&(ne=C);const xe={};ne==="button"?(xe.type=U===void 0?"button":U,xe.disabled=d):(!q.href&&!q.to&&(xe.role="button"),d&&(xe["aria-disabled"]=d));const Ve=gn(n,F,ee),Ue=V({},r,{centerRipple:s,component:l,disabled:d,disableRipple:f,disableTouchRipple:h,focusRipple:v,tabIndex:z,focusVisible:he}),X=iT(Ue);return c.jsxs(sT,V({as:ne,className:Ce(X.root,a),ownerState:Ue,onBlur:N,onClick:S,onContextMenu:Ht,onFocus:D,onKeyDown:Z,onKeyUp:K,onMouseDown:dt,onMouseLeave:de,onMouseUp:pe,onDragLeave:It,onTouchEnd:ke,onTouchMove:me,onTouchStart:oe,ref:Ve,tabIndex:d?-1:z,type:U},xe,q,{children:[o,Pe?c.jsx(eT,V({ref:Y,center:s},R)):null]}))}),aT=oT;function lT(e){return Bt("MuiTypography",e)}St("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);const cT=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],uT=e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:i,variant:s,classes:o}=e,a={root:["root",s,e.align!=="inherit"&&`align${Xe(t)}`,n&&"gutterBottom",r&&"noWrap",i&&"paragraph"]};return Jt(a,lT,o)},dT=Oe("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!=="inherit"&&t[`align${Xe(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})(({theme:e,ownerState:t})=>V({margin:0},t.variant==="inherit"&&{font:"inherit"},t.variant!=="inherit"&&e.typography[t.variant],t.align!=="inherit"&&{textAlign:t.align},t.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t.gutterBottom&&{marginBottom:"0.35em"},t.paragraph&&{marginBottom:16})),Z0={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},fT={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},pT=e=>fT[e]||e,hT=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiTypography"}),i=pT(r.color),s=U2(V({},r,{color:i})),{align:o="inherit",className:a,component:l,gutterBottom:d=!1,noWrap:f=!1,paragraph:h=!1,variant:v="body1",variantMapping:C=Z0}=s,w=Me(s,cT),S=V({},s,{align:o,color:i,className:a,component:l,gutterBottom:d,noWrap:f,paragraph:h,variant:v,variantMapping:C}),P=l||(h?"p":C[v]||Z0[v])||"span",m=uT(S);return c.jsx(dT,V({as:P,ref:n,ownerState:S,className:Ce(m.root,a)},w))}),mT=hT,gT=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function vT(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function yT(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function wT(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||yT(e))}function xT(e){const t=[],n=[];return Array.from(e.querySelectorAll(gT)).forEach((r,i)=>{const s=vT(r);s===-1||!wT(r)||(s===0?t.push(r):n.push({documentOrder:i,tabIndex:s,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function bT(){return!0}function ST(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:s=xT,isEnabled:o=bT,open:a}=e,l=k.useRef(!1),d=k.useRef(null),f=k.useRef(null),h=k.useRef(null),v=k.useRef(null),C=k.useRef(!1),w=k.useRef(null),S=gn(t.ref,w),P=k.useRef(null);k.useEffect(()=>{!a||!w.current||(C.current=!n)},[n,a]),k.useEffect(()=>{if(!a||!w.current)return;const y=Xt(w.current);return w.current.contains(y.activeElement)||(w.current.hasAttribute("tabIndex")||w.current.setAttribute("tabIndex","-1"),C.current&&w.current.focus()),()=>{i||(h.current&&h.current.focus&&(l.current=!0,h.current.focus()),h.current=null)}},[a]),k.useEffect(()=>{if(!a||!w.current)return;const y=Xt(w.current),E=M=>{P.current=M,!(r||!o()||M.key!=="Tab")&&y.activeElement===w.current&&M.shiftKey&&(l.current=!0,f.current&&f.current.focus())},j=()=>{const M=w.current;if(M===null)return;if(!y.hasFocus()||!o()||l.current){l.current=!1;return}if(M.contains(y.activeElement)||r&&y.activeElement!==d.current&&y.activeElement!==f.current)return;if(y.activeElement!==v.current)v.current=null;else if(v.current!==null)return;if(!C.current)return;let O=[];if((y.activeElement===d.current||y.activeElement===f.current)&&(O=s(w.current)),O.length>0){var I,_;const B=!!((I=P.current)!=null&&I.shiftKey&&((_=P.current)==null?void 0:_.key)==="Tab"),z=O[0],R=O[O.length-1];typeof z!="string"&&typeof R!="string"&&(B?R.focus():z.focus())}else M.focus()};y.addEventListener("focusin",j),y.addEventListener("keydown",E,!0);const L=setInterval(()=>{y.activeElement&&y.activeElement.tagName==="BODY"&&j()},50);return()=>{clearInterval(L),y.removeEventListener("focusin",j),y.removeEventListener("keydown",E,!0)}},[n,r,i,o,a,s]);const m=y=>{h.current===null&&(h.current=y.relatedTarget),C.current=!0,v.current=y.target;const E=t.props.onFocus;E&&E(y)},g=y=>{h.current===null&&(h.current=y.relatedTarget),C.current=!0};return c.jsxs(k.Fragment,{children:[c.jsx("div",{tabIndex:a?0:-1,onFocus:g,ref:d,"data-testid":"sentinelStart"}),k.cloneElement(t,{ref:S,onFocus:m}),c.jsx("div",{tabIndex:a?0:-1,onFocus:g,ref:f,"data-testid":"sentinelEnd"})]})}function CT(e){return typeof e=="function"?e():e}const kT=k.forwardRef(function(t,n){const{children:r,container:i,disablePortal:s=!1}=t,[o,a]=k.useState(null),l=gn(k.isValidElement(r)?r.ref:null,n);if(qs(()=>{s||a(CT(i)||document.body)},[i,s]),qs(()=>{if(o&&!s)return Xf(n,o),()=>{Xf(n,null)}},[n,o,s]),s){if(k.isValidElement(r)){const d={ref:l};return k.cloneElement(r,d)}return c.jsx(k.Fragment,{children:r})}return c.jsx(k.Fragment,{children:o&&fh.createPortal(r,o)})});function ET(e){const t=Xt(e);return t.body===e?ya(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function Vo(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function J0(e){return parseInt(ya(e).getComputedStyle(e).paddingRight,10)||0}function PT(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName)!==-1,r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function ev(e,t,n,r,i){const s=[t,n,...r];[].forEach.call(e.children,o=>{const a=s.indexOf(o)===-1,l=!PT(o);a&&l&&Vo(o,i)})}function Md(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function jT(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(ET(r)){const o=J2(Xt(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${J0(r)+o}px`;const a=Xt(r).querySelectorAll(".mui-fixed");[].forEach.call(a,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${J0(l)+o}px`})}let s;if(r.parentNode instanceof DocumentFragment)s=Xt(r).body;else{const o=r.parentElement,a=ya(r);s=(o==null?void 0:o.nodeName)==="HTML"&&a.getComputedStyle(o).overflowY==="scroll"?o:r}n.push({value:s.style.overflow,property:"overflow",el:s},{value:s.style.overflowX,property:"overflow-x",el:s},{value:s.style.overflowY,property:"overflow-y",el:s}),s.style.overflow="hidden"}return()=>{n.forEach(({value:s,el:o,property:a})=>{s?o.style.setProperty(a,s):o.style.removeProperty(a)})}}function TT(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class NT{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&Vo(t.modalRef,!1);const i=TT(n);ev(n,t.mount,t.modalRef,i,!0);const s=Md(this.containers,o=>o.container===n);return s!==-1?(this.containers[s].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=Md(this.containers,s=>s.modals.indexOf(t)!==-1),i=this.containers[r];i.restore||(i.restore=jT(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=Md(this.containers,o=>o.modals.indexOf(t)!==-1),s=this.containers[i];if(s.modals.splice(s.modals.indexOf(t),1),this.modals.splice(r,1),s.modals.length===0)s.restore&&s.restore(),t.modalRef&&Vo(t.modalRef,n),ev(s.container,t.mount,t.modalRef,s.hiddenSiblings,!1),this.containers.splice(i,1);else{const o=s.modals[s.modals.length-1];o.modalRef&&Vo(o.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}function LT(e){return typeof e=="function"?e():e}function _T(e){return e?e.props.hasOwnProperty("in"):!1}const MT=new NT;function OT(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,manager:i=MT,closeAfterTransition:s=!1,onTransitionEnter:o,onTransitionExited:a,children:l,onClose:d,open:f,rootRef:h}=e,v=k.useRef({}),C=k.useRef(null),w=k.useRef(null),S=gn(w,h),[P,m]=k.useState(!f),g=_T(l);let y=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(y=!1);const E=()=>Xt(C.current),j=()=>(v.current.modalRef=w.current,v.current.mount=C.current,v.current),L=()=>{i.mount(j(),{disableScrollLock:r}),w.current&&(w.current.scrollTop=0)},M=Nr(()=>{const q=LT(t)||E().body;i.add(j(),q),w.current&&L()}),O=k.useCallback(()=>i.isTopModal(j()),[i]),I=Nr(q=>{C.current=q,q&&(f&&O()?L():w.current&&Vo(w.current,y))}),_=k.useCallback(()=>{i.remove(j(),y)},[y,i]);k.useEffect(()=>()=>{_()},[_]),k.useEffect(()=>{f?M():(!g||!s)&&_()},[f,_,g,s,M]);const B=q=>ee=>{var A;(A=q.onKeyDown)==null||A.call(q,ee),!(ee.key!=="Escape"||ee.which===229||!O())&&(n||(ee.stopPropagation(),d&&d(ee,"escapeKeyDown")))},z=q=>ee=>{var A;(A=q.onClick)==null||A.call(q,ee),ee.target===ee.currentTarget&&d&&d(ee,"backdropClick")};return{getRootProps:(q={})=>{const ee=Bo(e);delete ee.onTransitionEnter,delete ee.onTransitionExited;const A=V({},ee,q);return V({role:"presentation"},A,{onKeyDown:B(A),ref:S})},getBackdropProps:(q={})=>{const ee=q;return V({"aria-hidden":!0},ee,{onClick:z(ee),open:f})},getTransitionProps:()=>{const q=()=>{m(!1),o&&o()},ee=()=>{m(!0),a&&a(),s&&_()};return{onEnter:O0(q,l==null?void 0:l.props.onEnter),onExited:O0(ee,l==null?void 0:l.props.onExited)}},rootRef:S,portalRef:I,isTopModal:O,exited:P,hasTransition:g}}const IT=2;function mw(e,t){return e-t}function tv(e,t){var n;const{index:r}=(n=e.reduce((i,s,o)=>{const a=Math.abs(t-s);return i===null||a({left:`${e}%`}),leap:e=>({width:`${e}%`})},"horizontal-reverse":{offset:e=>({right:`${e}%`}),leap:e=>({width:`${e}%`})},vertical:{offset:e=>({bottom:`${e}%`}),leap:e=>({height:`${e}%`})}},zT=e=>e;let pl;function rv(){return pl===void 0&&(typeof CSS<"u"&&typeof CSS.supports=="function"?pl=CSS.supports("touch-action","none"):pl=!0),pl}function FT(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:i=!1,isRtl:s=!1,marks:o=!1,max:a=100,min:l=0,name:d,onChange:f,onChangeCommitted:h,orientation:v="horizontal",rootRef:C,scale:w=zT,step:S=1,shiftStep:P=10,tabIndex:m,value:g}=e,y=k.useRef(),[E,j]=k.useState(-1),[L,M]=k.useState(-1),[O,I]=k.useState(!1),_=k.useRef(0),[B,z]=Q2({controlled:g,default:n??l,name:"Slider"}),R=f&&((X,G,ae)=>{const Se=X.nativeEvent||X,ye=new Se.constructor(Se.type,Se);Object.defineProperty(ye,"target",{writable:!0,value:{value:G,name:d}}),f(ye,G,ae)}),H=Array.isArray(B);let U=H?B.slice().sort(mw):[B];U=U.map(X=>X==null?l:Pi(X,l,a));const q=o===!0&&S!==null?[...Array(Math.floor((a-l)/S)+1)].map((X,G)=>({value:l+S*G})):o||[],ee=q.map(X=>X.value),{isFocusVisibleRef:A,onBlur:Y,onFocus:te,ref:ce}=zh(),[ue,F]=k.useState(-1),he=k.useRef(),Le=gn(ce,he),_e=gn(C,Le),Ae=X=>G=>{var ae;const Se=Number(G.currentTarget.getAttribute("data-index"));te(G),A.current===!0&&F(Se),M(Se),X==null||(ae=X.onFocus)==null||ae.call(X,G)},Pe=X=>G=>{var ae;Y(G),A.current===!1&&F(-1),M(-1),X==null||(ae=X.onBlur)==null||ae.call(X,G)},be=(X,G)=>{const ae=Number(X.currentTarget.getAttribute("data-index")),Se=U[ae],ye=ee.indexOf(Se);let ge=G;if(q&&S==null){const Ut=ee[ee.length-1];ge>Ut?ge=Ut:geG=>{var ae;if(S!==null){const Se=Number(G.currentTarget.getAttribute("data-index")),ye=U[Se];let ge=null;(G.key==="ArrowLeft"||G.key==="ArrowDown")&&G.shiftKey||G.key==="PageDown"?ge=Math.max(ye-P,l):((G.key==="ArrowRight"||G.key==="ArrowUp")&&G.shiftKey||G.key==="PageUp")&&(ge=Math.min(ye+P,a)),ge!==null&&(be(G,ge),G.preventDefault())}X==null||(ae=X.onKeyDown)==null||ae.call(X,G)};qs(()=>{if(r&&he.current.contains(document.activeElement)){var X;(X=document.activeElement)==null||X.blur()}},[r]),r&&E!==-1&&j(-1),r&&ue!==-1&&F(-1);const Ht=X=>G=>{var ae;(ae=X.onChange)==null||ae.call(X,G),be(G,G.target.valueAsNumber)},It=k.useRef();let pe=v;s&&v==="horizontal"&&(pe+="-reverse");const de=({finger:X,move:G=!1})=>{const{current:ae}=he,{width:Se,height:ye,bottom:ge,left:Ut}=ae.getBoundingClientRect();let Tt;pe.indexOf("vertical")===0?Tt=(ge-X.y)/ye:Tt=(X.x-Ut)/Se,pe.indexOf("-reverse")!==-1&&(Tt=1-Tt);let Ie;if(Ie=$T(Tt,l,a),S)Ie=RT(Ie,S,l);else{const ir=tv(ee,Ie);Ie=ee[ir]}Ie=Pi(Ie,l,a);let an=0;if(H){G?an=It.current:an=tv(U,Ie),i&&(Ie=Pi(Ie,U[an-1]||-1/0,U[an+1]||1/0));const ir=Ie;Ie=nv({values:U,newValue:Ie,index:an}),i&&G||(an=Ie.indexOf(ir),It.current=an)}return{newValue:Ie,activeIndex:an}},oe=Nr(X=>{const G=ul(X,y);if(!G)return;if(_.current+=1,X.type==="mousemove"&&X.buttons===0){ke(X);return}const{newValue:ae,activeIndex:Se}=de({finger:G,move:!0});dl({sliderRef:he,activeIndex:Se,setActive:j}),z(ae),!O&&_.current>IT&&I(!0),R&&!fl(ae,B)&&R(X,ae,Se)}),ke=Nr(X=>{const G=ul(X,y);if(I(!1),!G)return;const{newValue:ae}=de({finger:G,move:!0});j(-1),X.type==="touchend"&&M(-1),h&&h(X,ae),y.current=void 0,N()}),me=Nr(X=>{if(r)return;rv()||X.preventDefault();const G=X.changedTouches[0];G!=null&&(y.current=G.identifier);const ae=ul(X,y);if(ae!==!1){const{newValue:ye,activeIndex:ge}=de({finger:ae});dl({sliderRef:he,activeIndex:ge,setActive:j}),z(ye),R&&!fl(ye,B)&&R(X,ye,ge)}_.current=0;const Se=Xt(he.current);Se.addEventListener("touchmove",oe,{passive:!0}),Se.addEventListener("touchend",ke,{passive:!0})}),N=k.useCallback(()=>{const X=Xt(he.current);X.removeEventListener("mousemove",oe),X.removeEventListener("mouseup",ke),X.removeEventListener("touchmove",oe),X.removeEventListener("touchend",ke)},[ke,oe]);k.useEffect(()=>{const{current:X}=he;return X.addEventListener("touchstart",me,{passive:rv()}),()=>{X.removeEventListener("touchstart",me),N()}},[N,me]),k.useEffect(()=>{r&&N()},[r,N]);const D=X=>G=>{var ae;if((ae=X.onMouseDown)==null||ae.call(X,G),r||G.defaultPrevented||G.button!==0)return;G.preventDefault();const Se=ul(G,y);if(Se!==!1){const{newValue:ge,activeIndex:Ut}=de({finger:Se});dl({sliderRef:he,activeIndex:Ut,setActive:j}),z(ge),R&&!fl(ge,B)&&R(G,ge,Ut)}_.current=0;const ye=Xt(he.current);ye.addEventListener("mousemove",oe,{passive:!0}),ye.addEventListener("mouseup",ke)},$=yc(H?U[0]:l,l,a),Q=yc(U[U.length-1],l,a)-$,Z=(X={})=>{const G=Bo(X),ae={onMouseDown:D(G||{})},Se=V({},G,ae);return V({},X,{ref:_e},Se)},K=X=>G=>{var ae;(ae=X.onMouseOver)==null||ae.call(X,G);const Se=Number(G.currentTarget.getAttribute("data-index"));M(Se)},ne=X=>G=>{var ae;(ae=X.onMouseLeave)==null||ae.call(X,G),M(-1)};return{active:E,axis:pe,axisProps:DT,dragging:O,focusedThumbIndex:ue,getHiddenInputProps:(X={})=>{var G;const ae=Bo(X),Se={onChange:Ht(ae||{}),onFocus:Ae(ae||{}),onBlur:Pe(ae||{}),onKeyDown:dt(ae||{})},ye=V({},ae,Se);return V({tabIndex:m,"aria-labelledby":t,"aria-orientation":v,"aria-valuemax":w(a),"aria-valuemin":w(l),name:d,type:"range",min:e.min,max:e.max,step:e.step===null&&e.marks?"any":(G=e.step)!=null?G:void 0,disabled:r},X,ye,{style:V({},ew,{direction:s?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:Z,getThumbProps:(X={})=>{const G=Bo(X),ae={onMouseOver:K(G||{}),onMouseLeave:ne(G||{})};return V({},X,G,ae)},marks:q,open:L,range:H,rootRef:_e,trackLeap:Q,trackOffset:$,values:U,getThumbStyle:X=>({pointerEvents:E!==-1&&E!==X?"none":void 0})}}const BT=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],VT={entering:{opacity:1},entered:{opacity:1}},HT=k.forwardRef(function(t,n){const r=Wh(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:o=!0,children:a,easing:l,in:d,onEnter:f,onEntered:h,onEntering:v,onExit:C,onExited:w,onExiting:S,style:P,timeout:m=i,TransitionComponent:g=pw}=t,y=Me(t,BT),E=k.useRef(null),j=gn(E,a.ref,n),L=H=>U=>{if(H){const q=E.current;U===void 0?H(q):H(q,U)}},M=L(v),O=L((H,U)=>{hw(H);const q=vc({style:P,timeout:m,easing:l},{mode:"enter"});H.style.webkitTransition=r.transitions.create("opacity",q),H.style.transition=r.transitions.create("opacity",q),f&&f(H,U)}),I=L(h),_=L(S),B=L(H=>{const U=vc({style:P,timeout:m,easing:l},{mode:"exit"});H.style.webkitTransition=r.transitions.create("opacity",U),H.style.transition=r.transitions.create("opacity",U),C&&C(H)}),z=L(w),R=H=>{s&&s(E.current,H)};return c.jsx(g,V({appear:o,in:d,nodeRef:E,onEnter:O,onEntered:I,onEntering:M,onExit:B,onExited:z,onExiting:_,addEndListener:R,timeout:m},y,{children:(H,U)=>k.cloneElement(a,V({style:V({opacity:0,visibility:H==="exited"&&!d?"hidden":void 0},VT[H],P,a.props.style),ref:j},U))}))}),gw=HT;function UT(e){return Bt("MuiBackdrop",e)}St("MuiBackdrop",["root","invisible"]);const WT=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],GT=e=>{const{classes:t,invisible:n}=e;return Jt({root:["root",n&&"invisible"]},UT,t)},qT=Oe("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})(({ownerState:e})=>V({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},e.invisible&&{backgroundColor:"transparent"})),KT=k.forwardRef(function(t,n){var r,i,s;const o=Vt({props:t,name:"MuiBackdrop"}),{children:a,className:l,component:d="div",components:f={},componentsProps:h={},invisible:v=!1,open:C,slotProps:w={},slots:S={},TransitionComponent:P=gw,transitionDuration:m}=o,g=Me(o,WT),y=V({},o,{component:d,invisible:v}),E=GT(y),j=(r=w.root)!=null?r:h.root;return c.jsx(P,V({in:C,timeout:m},g,{children:c.jsx(qT,V({"aria-hidden":!0},j,{as:(i=(s=S.root)!=null?s:f.Root)!=null?i:d,className:Ce(E.root,l,j==null?void 0:j.className),ownerState:V({},y,j==null?void 0:j.ownerState),classes:E,ref:n,children:a}))}))}),vw=KT;function YT(e){return Bt("MuiModal",e)}St("MuiModal",["root","hidden","backdrop"]);const XT=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],QT=e=>{const{open:t,exited:n,classes:r}=e;return Jt({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},YT,r)},ZT=Oe("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(({theme:e,ownerState:t})=>V({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0},!t.open&&t.exited&&{visibility:"hidden"})),JT=Oe(vw,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),e8=k.forwardRef(function(t,n){var r,i,s,o,a,l;const d=Vt({name:"MuiModal",props:t}),{BackdropComponent:f=JT,BackdropProps:h,className:v,closeAfterTransition:C=!1,children:w,container:S,component:P,components:m={},componentsProps:g={},disableAutoFocus:y=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:j=!1,disablePortal:L=!1,disableRestoreFocus:M=!1,disableScrollLock:O=!1,hideBackdrop:I=!1,keepMounted:_=!1,onBackdropClick:B,open:z,slotProps:R,slots:H}=d,U=Me(d,XT),q=V({},d,{closeAfterTransition:C,disableAutoFocus:y,disableEnforceFocus:E,disableEscapeKeyDown:j,disablePortal:L,disableRestoreFocus:M,disableScrollLock:O,hideBackdrop:I,keepMounted:_}),{getRootProps:ee,getBackdropProps:A,getTransitionProps:Y,portalRef:te,isTopModal:ce,exited:ue,hasTransition:F}=OT(V({},q,{rootRef:n})),he=V({},q,{exited:ue}),Le=QT(he),_e={};if(w.props.tabIndex===void 0&&(_e.tabIndex="-1"),F){const{onEnter:pe,onExited:de}=Y();_e.onEnter=pe,_e.onExited=de}const Ae=(r=(i=H==null?void 0:H.root)!=null?i:m.Root)!=null?r:ZT,Pe=(s=(o=H==null?void 0:H.backdrop)!=null?o:m.Backdrop)!=null?s:f,be=(a=R==null?void 0:R.root)!=null?a:g.root,dt=(l=R==null?void 0:R.backdrop)!=null?l:g.backdrop,Ht=cn({elementType:Ae,externalSlotProps:be,externalForwardedProps:U,getSlotProps:ee,additionalProps:{ref:n,as:P},ownerState:he,className:Ce(v,be==null?void 0:be.className,Le==null?void 0:Le.root,!he.open&&he.exited&&(Le==null?void 0:Le.hidden))}),It=cn({elementType:Pe,externalSlotProps:dt,additionalProps:h,getSlotProps:pe=>A(V({},pe,{onClick:de=>{B&&B(de),pe!=null&&pe.onClick&&pe.onClick(de)}})),className:Ce(dt==null?void 0:dt.className,h==null?void 0:h.className,Le==null?void 0:Le.backdrop),ownerState:he});return!_&&!z&&(!F||ue)?null:c.jsx(kT,{ref:te,container:S,disablePortal:L,children:c.jsxs(Ae,V({},Ht,{children:[!I&&f?c.jsx(Pe,V({},It)):null,c.jsx(ST,{disableEnforceFocus:E,disableAutoFocus:y,disableRestoreFocus:M,isEnabled:ce,open:z,children:k.cloneElement(w,_e)})]}))})}),yw=e8;function t8(e){return Bt("MuiDialog",e)}const n8=St("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),Od=n8,r8=k.createContext({}),ww=r8,i8=["aria-describedby","aria-labelledby","BackdropComponent","BackdropProps","children","className","disableEscapeKeyDown","fullScreen","fullWidth","maxWidth","onBackdropClick","onClick","onClose","open","PaperComponent","PaperProps","scroll","TransitionComponent","transitionDuration","TransitionProps"],s8=Oe(vw,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),o8=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:s}=e,o={root:["root"],container:["container",`scroll${Xe(n)}`],paper:["paper",`paperScroll${Xe(n)}`,`paperWidth${Xe(String(r))}`,i&&"paperFullWidth",s&&"paperFullScreen"]};return Jt(o,t8,t)},a8=Oe(yw,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),l8=Oe("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${Xe(n.scroll)}`]]}})(({ownerState:e})=>V({height:"100%","@media print":{height:"auto"},outline:0},e.scroll==="paper"&&{display:"flex",justifyContent:"center",alignItems:"center"},e.scroll==="body"&&{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}})),c8=Oe(Qh,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${Xe(n.scroll)}`],t[`paperWidth${Xe(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(({theme:e,ownerState:t})=>V({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"}},t.scroll==="paper"&&{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"},t.scroll==="body"&&{display:"inline-block",verticalAlign:"middle",textAlign:"left"},!t.maxWidth&&{maxWidth:"calc(100% - 64px)"},t.maxWidth==="xs"&&{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${Od.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.maxWidth&&t.maxWidth!=="xs"&&{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`,[`&.${Od.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t.maxWidth]+32*2)]:{maxWidth:"calc(100% - 64px)"}}},t.fullWidth&&{width:"calc(100% - 64px)"},t.fullScreen&&{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${Od.paperScrollBody}`]:{margin:0,maxWidth:"100%"}})),u8=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialog"}),i=Wh(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":o,"aria-labelledby":a,BackdropComponent:l,BackdropProps:d,children:f,className:h,disableEscapeKeyDown:v=!1,fullScreen:C=!1,fullWidth:w=!1,maxWidth:S="sm",onBackdropClick:P,onClick:m,onClose:g,open:y,PaperComponent:E=Qh,PaperProps:j={},scroll:L="paper",TransitionComponent:M=gw,transitionDuration:O=s,TransitionProps:I}=r,_=Me(r,i8),B=V({},r,{disableEscapeKeyDown:v,fullScreen:C,fullWidth:w,maxWidth:S,scroll:L}),z=o8(B),R=k.useRef(),H=A=>{R.current=A.target===A.currentTarget},U=A=>{m&&m(A),R.current&&(R.current=null,P&&P(A),g&&g(A,"backdropClick"))},q=Dh(a),ee=k.useMemo(()=>({titleId:q}),[q]);return c.jsx(a8,V({className:Ce(z.root,h),closeAfterTransition:!0,components:{Backdrop:s8},componentsProps:{backdrop:V({transitionDuration:O,as:l},d)},disableEscapeKeyDown:v,onClose:g,open:y,ref:n,onClick:U,ownerState:B},_,{children:c.jsx(M,V({appear:!0,in:y,timeout:O,role:"presentation"},I,{children:c.jsx(l8,{className:Ce(z.container),onMouseDown:H,ownerState:B,children:c.jsx(c8,V({as:E,elevation:24,role:"dialog","aria-describedby":o,"aria-labelledby":q},j,{className:Ce(z.paper,j.className),ownerState:B,children:c.jsx(ww.Provider,{value:ee,children:f})}))})}))}))}),sp=u8;function d8(e){return Bt("MuiDialogActions",e)}St("MuiDialogActions",["root","spacing"]);const f8=["className","disableSpacing"],p8=e=>{const{classes:t,disableSpacing:n}=e;return Jt({root:["root",!n&&"spacing"]},d8,t)},h8=Oe("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})(({ownerState:e})=>V({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto"},!e.disableSpacing&&{"& > :not(style) ~ :not(style)":{marginLeft:8}})),m8=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogActions"}),{className:i,disableSpacing:s=!1}=r,o=Me(r,f8),a=V({},r,{disableSpacing:s}),l=p8(a);return c.jsx(h8,V({className:Ce(l.root,i),ownerState:a,ref:n},o))}),op=m8;function g8(e){return Bt("MuiDialogContent",e)}St("MuiDialogContent",["root","dividers"]);function v8(e){return Bt("MuiDialogTitle",e)}const y8=St("MuiDialogTitle",["root"]),w8=y8,x8=["className","dividers"],b8=e=>{const{classes:t,dividers:n}=e;return Jt({root:["root",n&&"dividers"]},g8,t)},S8=Oe("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(({theme:e,ownerState:t})=>V({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px"},t.dividers?{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}:{[`.${w8.root} + &`]:{paddingTop:0}})),C8=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogContent"}),{className:i,dividers:s=!1}=r,o=Me(r,x8),a=V({},r,{dividers:s}),l=b8(a);return c.jsx(S8,V({className:Ce(l.root,i),ownerState:a,ref:n},o))}),ap=C8,k8=["className","id"],E8=e=>{const{classes:t}=e;return Jt({root:["root"]},v8,t)},P8=Oe(mT,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),j8=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogTitle"}),{className:i,id:s}=r,o=Me(r,k8),a=r,l=E8(a),{titleId:d=s}=k.useContext(ww);return c.jsx(P8,V({component:"h2",className:Ce(l.root,i),ownerState:a,ref:n,variant:"h6",id:s??d},o))}),lp=j8,T8=St("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]),iv=T8,N8=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function cp(e){return`scale(${e}, ${e**2})`}const L8={entering:{opacity:1,transform:cp(1)},entered:{opacity:1,transform:"none"}},Id=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),xw=k.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:s,easing:o,in:a,onEnter:l,onEntered:d,onEntering:f,onExit:h,onExited:v,onExiting:C,style:w,timeout:S="auto",TransitionComponent:P=pw}=t,m=Me(t,N8),g=Z2(),y=k.useRef(),E=Wh(),j=k.useRef(null),L=gn(j,s.ref,n),M=U=>q=>{if(U){const ee=j.current;q===void 0?U(ee):U(ee,q)}},O=M(f),I=M((U,q)=>{hw(U);const{duration:ee,delay:A,easing:Y}=vc({style:w,timeout:S,easing:o},{mode:"enter"});let te;S==="auto"?(te=E.transitions.getAutoHeightDuration(U.clientHeight),y.current=te):te=ee,U.style.transition=[E.transitions.create("opacity",{duration:te,delay:A}),E.transitions.create("transform",{duration:Id?te:te*.666,delay:A,easing:Y})].join(","),l&&l(U,q)}),_=M(d),B=M(C),z=M(U=>{const{duration:q,delay:ee,easing:A}=vc({style:w,timeout:S,easing:o},{mode:"exit"});let Y;S==="auto"?(Y=E.transitions.getAutoHeightDuration(U.clientHeight),y.current=Y):Y=q,U.style.transition=[E.transitions.create("opacity",{duration:Y,delay:ee}),E.transitions.create("transform",{duration:Id?Y:Y*.666,delay:Id?ee:ee||Y*.333,easing:A})].join(","),U.style.opacity=0,U.style.transform=cp(.75),h&&h(U)}),R=M(v),H=U=>{S==="auto"&&g.start(y.current||0,U),r&&r(j.current,U)};return c.jsx(P,V({appear:i,in:a,nodeRef:j,onEnter:I,onEntered:_,onEntering:O,onExit:z,onExited:R,onExiting:B,addEndListener:H,timeout:S==="auto"?null:S},m,{children:(U,q)=>k.cloneElement(s,V({style:V({opacity:0,transform:cp(.75),visibility:U==="exited"&&!a?"hidden":void 0},L8[U],w,s.props.style),ref:L},q))}))});xw.muiSupportAuto=!0;const _8=xw,M8=k.createContext({}),up=M8;function O8(e){return Bt("MuiList",e)}St("MuiList",["root","padding","dense","subheader"]);const I8=["children","className","component","dense","disablePadding","subheader"],$8=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Jt({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},O8,t)},A8=Oe("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})(({ownerState:e})=>V({listStyle:"none",margin:0,padding:0,position:"relative"},!e.disablePadding&&{paddingTop:8,paddingBottom:8},e.subheader&&{paddingTop:0})),R8=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiList"}),{children:i,className:s,component:o="ul",dense:a=!1,disablePadding:l=!1,subheader:d}=r,f=Me(r,I8),h=k.useMemo(()=>({dense:a}),[a]),v=V({},r,{component:o,dense:a,disablePadding:l}),C=$8(v);return c.jsx(up.Provider,{value:h,children:c.jsxs(A8,V({as:o,className:Ce(C.root,s),ref:n,ownerState:v},f,{children:[d,i]}))})}),D8=R8,z8=St("MuiListItemIcon",["root","alignItemsFlexStart"]),sv=z8,F8=St("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]),ov=F8,B8=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function $d(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function av(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function bw(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.indexOf(t.keys.join(""))===0}function wo(e,t,n,r,i,s){let o=!1,a=i(e,t,t?n:!1);for(;a;){if(a===e.firstChild){if(o)return!1;o=!0}const l=r?!1:a.disabled||a.getAttribute("aria-disabled")==="true";if(!a.hasAttribute("tabindex")||!bw(a,s)||l)a=i(e,a,n);else return a.focus(),!0}return!1}const V8=k.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:s=!1,children:o,className:a,disabledItemsFocusable:l=!1,disableListWrap:d=!1,onKeyDown:f,variant:h="selectedMenu"}=t,v=Me(t,B8),C=k.useRef(null),w=k.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});qs(()=>{i&&C.current.focus()},[i]),k.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(y,{direction:E})=>{const j=!C.current.style.width;if(y.clientHeight{const E=C.current,j=y.key,L=Xt(E).activeElement;if(j==="ArrowDown")y.preventDefault(),wo(E,L,d,l,$d);else if(j==="ArrowUp")y.preventDefault(),wo(E,L,d,l,av);else if(j==="Home")y.preventDefault(),wo(E,null,d,l,$d);else if(j==="End")y.preventDefault(),wo(E,null,d,l,av);else if(j.length===1){const M=w.current,O=j.toLowerCase(),I=performance.now();M.keys.length>0&&(I-M.lastTime>500?(M.keys=[],M.repeating=!0,M.previousKeyMatched=!0):M.repeating&&O!==M.keys[0]&&(M.repeating=!1)),M.lastTime=I,M.keys.push(O);const _=L&&!M.repeating&&bw(L,M);M.previousKeyMatched&&(_||wo(E,L,!1,l,$d,M))?y.preventDefault():M.previousKeyMatched=!1}f&&f(y)},P=gn(C,n);let m=-1;k.Children.forEach(o,(y,E)=>{if(!k.isValidElement(y)){m===E&&(m+=1,m>=o.length&&(m=-1));return}y.props.disabled||(h==="selectedMenu"&&y.props.selected||m===-1)&&(m=E),m===E&&(y.props.disabled||y.props.muiSkipListHighlight||y.type.muiSkipListHighlight)&&(m+=1,m>=o.length&&(m=-1))});const g=k.Children.map(o,(y,E)=>{if(E===m){const j={};return s&&(j.autoFocus=!0),y.props.tabIndex===void 0&&h==="selectedMenu"&&(j.tabIndex=0),k.cloneElement(y,j)}return y});return c.jsx(D8,V({role:"menu",ref:P,className:a,onKeyDown:S,tabIndex:i?0:-1},v,{children:g}))}),H8=V8;function U8(e){return Bt("MuiPopover",e)}St("MuiPopover",["root","paper"]);const W8=["onEntering"],G8=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],q8=["slotProps"];function lv(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function cv(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function uv(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function Ad(e){return typeof e=="function"?e():e}const K8=e=>{const{classes:t}=e;return Jt({root:["root"],paper:["paper"]},U8,t)},Y8=Oe(yw,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Sw=Oe(Qh,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),X8=k.forwardRef(function(t,n){var r,i,s;const o=Vt({props:t,name:"MuiPopover"}),{action:a,anchorEl:l,anchorOrigin:d={vertical:"top",horizontal:"left"},anchorPosition:f,anchorReference:h="anchorEl",children:v,className:C,container:w,elevation:S=8,marginThreshold:P=16,open:m,PaperProps:g={},slots:y,slotProps:E,transformOrigin:j={vertical:"top",horizontal:"left"},TransitionComponent:L=_8,transitionDuration:M="auto",TransitionProps:{onEntering:O}={},disableScrollLock:I=!1}=o,_=Me(o.TransitionProps,W8),B=Me(o,G8),z=(r=E==null?void 0:E.paper)!=null?r:g,R=k.useRef(),H=gn(R,z.ref),U=V({},o,{anchorOrigin:d,anchorReference:h,elevation:S,marginThreshold:P,externalPaperSlotProps:z,transformOrigin:j,TransitionComponent:L,transitionDuration:M,TransitionProps:_}),q=K8(U),ee=k.useCallback(()=>{if(h==="anchorPosition")return f;const pe=Ad(l),oe=(pe&&pe.nodeType===1?pe:Xt(R.current).body).getBoundingClientRect();return{top:oe.top+lv(oe,d.vertical),left:oe.left+cv(oe,d.horizontal)}},[l,d.horizontal,d.vertical,f,h]),A=k.useCallback(pe=>({vertical:lv(pe,j.vertical),horizontal:cv(pe,j.horizontal)}),[j.horizontal,j.vertical]),Y=k.useCallback(pe=>{const de={width:pe.offsetWidth,height:pe.offsetHeight},oe=A(de);if(h==="none")return{top:null,left:null,transformOrigin:uv(oe)};const ke=ee();let me=ke.top-oe.vertical,N=ke.left-oe.horizontal;const D=me+de.height,$=N+de.width,Q=ya(Ad(l)),Z=Q.innerHeight-P,K=Q.innerWidth-P;if(P!==null&&meZ){const ne=D-Z;me-=ne,oe.vertical+=ne}if(P!==null&&NK){const ne=$-K;N-=ne,oe.horizontal+=ne}return{top:`${Math.round(me)}px`,left:`${Math.round(N)}px`,transformOrigin:uv(oe)}},[l,h,ee,A,P]),[te,ce]=k.useState(m),ue=k.useCallback(()=>{const pe=R.current;if(!pe)return;const de=Y(pe);de.top!==null&&(pe.style.top=de.top),de.left!==null&&(pe.style.left=de.left),pe.style.transformOrigin=de.transformOrigin,ce(!0)},[Y]);k.useEffect(()=>(I&&window.addEventListener("scroll",ue),()=>window.removeEventListener("scroll",ue)),[l,I,ue]);const F=(pe,de)=>{O&&O(pe,de),ue()},he=()=>{ce(!1)};k.useEffect(()=>{m&&ue()}),k.useImperativeHandle(a,()=>m?{updatePosition:()=>{ue()}}:null,[m,ue]),k.useEffect(()=>{if(!m)return;const pe=JP(()=>{ue()}),de=ya(l);return de.addEventListener("resize",pe),()=>{pe.clear(),de.removeEventListener("resize",pe)}},[l,m,ue]);let Le=M;M==="auto"&&!L.muiSupportAuto&&(Le=void 0);const _e=w||(l?Xt(Ad(l)).body:void 0),Ae=(i=y==null?void 0:y.root)!=null?i:Y8,Pe=(s=y==null?void 0:y.paper)!=null?s:Sw,be=cn({elementType:Pe,externalSlotProps:V({},z,{style:te?z.style:V({},z.style,{opacity:0})}),additionalProps:{elevation:S,ref:H},ownerState:U,className:Ce(q.paper,z==null?void 0:z.className)}),dt=cn({elementType:Ae,externalSlotProps:(E==null?void 0:E.root)||{},externalForwardedProps:B,additionalProps:{ref:n,slotProps:{backdrop:{invisible:!0}},container:_e,open:m},ownerState:U,className:Ce(q.root,C)}),{slotProps:Ht}=dt,It=Me(dt,q8);return c.jsx(Ae,V({},It,!Is(Ae)&&{slotProps:Ht,disableScrollLock:I},{children:c.jsx(L,V({appear:!0,in:m,onEntering:F,onExited:he,timeout:Le},_,{children:c.jsx(Pe,V({},be,{children:v}))}))}))}),Q8=X8;function Z8(e){return Bt("MuiMenu",e)}St("MuiMenu",["root","paper","list"]);const J8=["onEntering"],eN=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],tN={vertical:"top",horizontal:"right"},nN={vertical:"top",horizontal:"left"},rN=e=>{const{classes:t}=e;return Jt({root:["root"],paper:["paper"],list:["list"]},Z8,t)},iN=Oe(Q8,{shouldForwardProp:e=>Gh(e)||e==="classes",name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),sN=Oe(Sw,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),oN=Oe(H8,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),aN=k.forwardRef(function(t,n){var r,i;const s=Vt({props:t,name:"MuiMenu"}),{autoFocus:o=!0,children:a,className:l,disableAutoFocusItem:d=!1,MenuListProps:f={},onClose:h,open:v,PaperProps:C={},PopoverClasses:w,transitionDuration:S="auto",TransitionProps:{onEntering:P}={},variant:m="selectedMenu",slots:g={},slotProps:y={}}=s,E=Me(s.TransitionProps,J8),j=Me(s,eN),L=Fh(),M=V({},s,{autoFocus:o,disableAutoFocusItem:d,MenuListProps:f,onEntering:P,PaperProps:C,transitionDuration:S,TransitionProps:E,variant:m}),O=rN(M),I=o&&!d&&v,_=k.useRef(null),B=(A,Y)=>{_.current&&_.current.adjustStyleForScrollbar(A,{direction:L?"rtl":"ltr"}),P&&P(A,Y)},z=A=>{A.key==="Tab"&&(A.preventDefault(),h&&h(A,"tabKeyDown"))};let R=-1;k.Children.map(a,(A,Y)=>{k.isValidElement(A)&&(A.props.disabled||(m==="selectedMenu"&&A.props.selected||R===-1)&&(R=Y))});const H=(r=g.paper)!=null?r:sN,U=(i=y.paper)!=null?i:C,q=cn({elementType:g.root,externalSlotProps:y.root,ownerState:M,className:[O.root,l]}),ee=cn({elementType:H,externalSlotProps:U,ownerState:M,className:O.paper});return c.jsx(iN,V({onClose:h,anchorOrigin:{vertical:"bottom",horizontal:L?"right":"left"},transformOrigin:L?tN:nN,slots:{paper:H,root:g.root},slotProps:{root:q,paper:ee},open:v,ref:n,transitionDuration:S,TransitionProps:V({onEntering:B},E),ownerState:M},j,{classes:w,children:c.jsx(oN,V({onKeyDown:z,actions:_,autoFocus:o&&(R===-1||d),autoFocusItem:I,variant:m},f,{className:Ce(O.list,f.className),children:a}))}))}),dp=aN;function lN(e){return Bt("MuiMenuItem",e)}const cN=St("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]),xo=cN,uN=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],dN=(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]},fN=e=>{const{disabled:t,dense:n,divider:r,disableGutters:i,selected:s,classes:o}=e,l=Jt({root:["root",n&&"dense",t&&"disabled",!i&&"gutters",r&&"divider",s&&"selected"]},lN,o);return V({},o,l)},pN=Oe(aT,{shouldForwardProp:e=>Gh(e)||e==="classes",name:"MuiMenuItem",slot:"Root",overridesResolver:dN})(({theme:e,ownerState:t})=>V({},e.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!t.disableGutters&&{paddingLeft:16,paddingRight:16},t.divider&&{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${xo.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Yr(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${xo.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:Yr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${xo.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:Yr(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:Yr(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${xo.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${xo.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`& + .${iv.root}`]:{marginTop:e.spacing(1),marginBottom:e.spacing(1)},[`& + .${iv.inset}`]:{marginLeft:52},[`& .${ov.root}`]:{marginTop:0,marginBottom:0},[`& .${ov.inset}`]:{paddingLeft:36},[`& .${sv.root}`]:{minWidth:36}},!t.dense&&{[e.breakpoints.up("sm")]:{minHeight:"auto"}},t.dense&&V({minHeight:32,paddingTop:4,paddingBottom:4},e.typography.body2,{[`& .${sv.root} svg`]:{fontSize:"1.25rem"}}))),hN=k.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiMenuItem"}),{autoFocus:i=!1,component:s="li",dense:o=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:d,role:f="menuitem",tabIndex:h,className:v}=r,C=Me(r,uN),w=k.useContext(up),S=k.useMemo(()=>({dense:o||w.dense||!1,disableGutters:l}),[w.dense,o,l]),P=k.useRef(null);qs(()=>{i&&P.current&&P.current.focus()},[i]);const m=V({},r,{dense:S.dense,divider:a,disableGutters:l}),g=fN(r),y=gn(P,n);let E;return r.disabled||(E=h!==void 0?h:-1),c.jsx(up.Provider,{value:S,children:c.jsx(pN,V({ref:y,role:f,tabIndex:E,component:s,focusVisibleClassName:Ce(g.focusVisible,d),className:Ce(g.root,v)},C,{ownerState:m,classes:g}))})}),Lo=hN,mN=uw(c.jsx("path",{d:"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"}),"Star"),gN=uw(c.jsx("path",{d:"M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"}),"StarBorder");function vN(e){return Bt("MuiRating",e)}const yN=St("MuiRating",["root","sizeSmall","sizeMedium","sizeLarge","readOnly","disabled","focusVisible","visuallyHidden","pristine","label","labelEmptyValueActive","icon","iconEmpty","iconFilled","iconHover","iconFocus","iconActive","decimal"]),bo=yN,wN=["value"],xN=["className","defaultValue","disabled","emptyIcon","emptyLabelText","getLabelText","highlightSelectedOnly","icon","IconContainerComponent","max","name","onChange","onChangeActive","onMouseLeave","onMouseMove","precision","readOnly","size","value"];function bN(e){const t=e.toString().split(".")[1];return t?t.length:0}function Rd(e,t){if(e==null)return e;const n=Math.round(e/t)*t;return Number(n.toFixed(bN(t)))}const SN=e=>{const{classes:t,size:n,readOnly:r,disabled:i,emptyValueFocused:s,focusVisible:o}=e,a={root:["root",`size${Xe(n)}`,i&&"disabled",o&&"focusVisible",r&&"readOnly"],label:["label","pristine"],labelEmptyValue:[s&&"labelEmptyValueActive"],icon:["icon"],iconEmpty:["iconEmpty"],iconFilled:["iconFilled"],iconHover:["iconHover"],iconFocus:["iconFocus"],iconActive:["iconActive"],decimal:["decimal"],visuallyHidden:["visuallyHidden"]};return Jt(a,vN,t)},CN=Oe("span",{name:"MuiRating",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${bo.visuallyHidden}`]:t.visuallyHidden},t.root,t[`size${Xe(n.size)}`],n.readOnly&&t.readOnly]}})(({theme:e,ownerState:t})=>V({display:"inline-flex",position:"relative",fontSize:e.typography.pxToRem(24),color:"#faaf00",cursor:"pointer",textAlign:"left",width:"min-content",WebkitTapHighlightColor:"transparent",[`&.${bo.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${bo.focusVisible} .${bo.iconActive}`]:{outline:"1px solid #999"},[`& .${bo.visuallyHidden}`]:ew},t.size==="small"&&{fontSize:e.typography.pxToRem(18)},t.size==="large"&&{fontSize:e.typography.pxToRem(30)},t.readOnly&&{pointerEvents:"none"})),Cw=Oe("label",{name:"MuiRating",slot:"Label",overridesResolver:({ownerState:e},t)=>[t.label,e.emptyValueFocused&&t.labelEmptyValueActive]})(({ownerState:e})=>V({cursor:"inherit"},e.emptyValueFocused&&{top:0,bottom:0,position:"absolute",outline:"1px solid #999",width:"100%"})),kN=Oe("span",{name:"MuiRating",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.iconEmpty&&t.iconEmpty,n.iconFilled&&t.iconFilled,n.iconHover&&t.iconHover,n.iconFocus&&t.iconFocus,n.iconActive&&t.iconActive]}})(({theme:e,ownerState:t})=>V({display:"flex",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),pointerEvents:"none"},t.iconActive&&{transform:"scale(1.2)"},t.iconEmpty&&{color:(e.vars||e).palette.action.disabled})),EN=Oe("span",{name:"MuiRating",slot:"Decimal",shouldForwardProp:e=>Ou(e)&&e!=="iconActive",overridesResolver:(e,t)=>{const{iconActive:n}=e;return[t.decimal,n&&t.iconActive]}})(({iconActive:e})=>V({position:"relative"},e&&{transform:"scale(1.2)"}));function PN(e){const t=Me(e,wN);return c.jsx("span",V({},t))}function dv(e){const{classes:t,disabled:n,emptyIcon:r,focus:i,getLabelText:s,highlightSelectedOnly:o,hover:a,icon:l,IconContainerComponent:d,isActive:f,itemValue:h,labelProps:v,name:C,onBlur:w,onChange:S,onClick:P,onFocus:m,readOnly:g,ownerState:y,ratingValue:E,ratingValueRounded:j}=e,L=o?h===E:h<=E,M=h<=a,O=h<=i,I=h===j,_=Dh(),B=c.jsx(kN,{as:d,value:h,className:Ce(t.icon,L?t.iconFilled:t.iconEmpty,M&&t.iconHover,O&&t.iconFocus,f&&t.iconActive),ownerState:V({},y,{iconEmpty:!L,iconFilled:L,iconHover:M,iconFocus:O,iconActive:f}),children:r&&!L?r:l});return g?c.jsx("span",V({},v,{children:B})):c.jsxs(k.Fragment,{children:[c.jsxs(Cw,V({ownerState:V({},y,{emptyValueFocused:void 0}),htmlFor:_},v,{children:[B,c.jsx("span",{className:t.visuallyHidden,children:s(h)})]})),c.jsx("input",{className:t.visuallyHidden,onFocus:m,onBlur:w,onChange:S,onClick:P,disabled:n,value:h,id:_,type:"radio",name:C,checked:I})]})}const jN=c.jsx(mN,{fontSize:"inherit"}),TN=c.jsx(gN,{fontSize:"inherit"});function NN(e){return`${e} Star${e!==1?"s":""}`}const LN=k.forwardRef(function(t,n){const r=Vt({name:"MuiRating",props:t}),{className:i,defaultValue:s=null,disabled:o=!1,emptyIcon:a=TN,emptyLabelText:l="Empty",getLabelText:d=NN,highlightSelectedOnly:f=!1,icon:h=jN,IconContainerComponent:v=PN,max:C=5,name:w,onChange:S,onChangeActive:P,onMouseLeave:m,onMouseMove:g,precision:y=1,readOnly:E=!1,size:j="medium",value:L}=r,M=Me(r,xN),O=Dh(w),[I,_]=Q2({controlled:L,default:s,name:"Rating"}),B=Rd(I,y),z=Fh(),[{hover:R,focus:H},U]=k.useState({hover:-1,focus:-1});let q=B;R!==-1&&(q=R),H!==-1&&(q=H);const{isFocusVisibleRef:ee,onBlur:A,onFocus:Y,ref:te}=zh(),[ce,ue]=k.useState(!1),F=k.useRef(),he=gn(te,F,n),Le=oe=>{g&&g(oe);const ke=F.current,{right:me,left:N,width:D}=ke.getBoundingClientRect();let $;z?$=(me-oe.clientX)/D:$=(oe.clientX-N)/D;let Q=Rd(C*$+y/2,y);Q=Pi(Q,y,C),U(Z=>Z.hover===Q&&Z.focus===Q?Z:{hover:Q,focus:Q}),ue(!1),P&&R!==Q&&P(oe,Q)},_e=oe=>{m&&m(oe);const ke=-1;U({hover:ke,focus:ke}),P&&R!==ke&&P(oe,ke)},Ae=oe=>{let ke=oe.target.value===""?null:parseFloat(oe.target.value);R!==-1&&(ke=R),_(ke),S&&S(oe,ke)},Pe=oe=>{oe.clientX===0&&oe.clientY===0||(U({hover:-1,focus:-1}),_(null),S&&parseFloat(oe.target.value)===B&&S(oe,null))},be=oe=>{Y(oe),ee.current===!0&&ue(!0);const ke=parseFloat(oe.target.value);U(me=>({hover:me.hover,focus:ke}))},dt=oe=>{if(R!==-1)return;A(oe),ee.current===!1&&ue(!1);const ke=-1;U(me=>({hover:me.hover,focus:ke}))},[Ht,It]=k.useState(!1),pe=V({},r,{defaultValue:s,disabled:o,emptyIcon:a,emptyLabelText:l,emptyValueFocused:Ht,focusVisible:ce,getLabelText:d,icon:h,IconContainerComponent:v,max:C,precision:y,readOnly:E,size:j}),de=SN(pe);return c.jsxs(CN,V({ref:he,onMouseMove:Le,onMouseLeave:_e,className:Ce(de.root,i,E&&"MuiRating-readOnly"),ownerState:pe,role:E?"img":null,"aria-label":E?d(q):null},M,{children:[Array.from(new Array(C)).map((oe,ke)=>{const me=ke+1,N={classes:de,disabled:o,emptyIcon:a,focus:H,getLabelText:d,highlightSelectedOnly:f,hover:R,icon:h,IconContainerComponent:v,name:O,onBlur:dt,onChange:Ae,onClick:Pe,onFocus:be,ratingValue:q,ratingValueRounded:B,readOnly:E,ownerState:pe},D=me===Math.ceil(q)&&(R!==-1||H!==-1);if(y<1){const $=Array.from(new Array(1/y));return c.jsx(EN,{className:Ce(de.decimal,D&&de.iconActive),ownerState:pe,iconActive:D,children:$.map((Q,Z)=>{const K=Rd(me-1+(Z+1)*y,y);return c.jsx(dv,V({},N,{isActive:!1,itemValue:K,labelProps:{style:$.length-1===Z?{}:{width:K===q?`${(Z+1)*y*100}%`:"0%",overflow:"hidden",position:"absolute"}}}),K)})},me)}return c.jsx(dv,V({},N,{isActive:D,itemValue:me}),me)}),!E&&!o&&c.jsxs(Cw,{className:Ce(de.label,de.labelEmptyValue),ownerState:pe,children:[c.jsx("input",{className:de.visuallyHidden,value:"",id:`${O}-empty`,type:"radio",name:O,checked:B==null,onFocus:()=>It(!0),onBlur:()=>It(!1),onChange:Ae}),c.jsx("span",{className:de.visuallyHidden,children:l})]})]}))}),kw=LN,_N=e=>!e||!Is(e);function MN(e){return Bt("MuiSlider",e)}const ON=St("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]),zn=ON,IN=e=>{const{open:t}=e;return{offset:Ce(t&&zn.valueLabelOpen),circle:zn.valueLabelCircle,label:zn.valueLabelLabel}};function $N(e){const{children:t,className:n,value:r}=e,i=IN(e);return t?k.cloneElement(t,{className:Ce(t.props.className)},c.jsxs(k.Fragment,{children:[t.props.children,c.jsx("span",{className:Ce(i.offset,n),"aria-hidden":!0,children:c.jsx("span",{className:i.circle,children:c.jsx("span",{className:i.label,children:r})})})]})):null}const AN=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],RN=P6();function fv(e){return e}const DN=Oe("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`color${Xe(n.color)}`],n.size!=="medium"&&t[`size${Xe(n.size)}`],n.marked&&t.marked,n.orientation==="vertical"&&t.vertical,n.track==="inverted"&&t.trackInverted,n.track===!1&&t.trackFalse]}})(({theme:e})=>{var t;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},[`&.${zn.disabled}`]:{pointerEvents:"none",cursor:"default",color:(e.vars||e).palette.grey[400]},[`&.${zn.dragging}`]:{[`& .${zn.thumb}, & .${zn.track}`]:{transition:"none"}},variants:[...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n},style:{color:(e.vars||e).palette[n].main}})),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}}),zN=Oe("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),FN=Oe("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})(({theme:e})=>{var t;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:e.transitions.create(["left","width","bottom","height"],{duration:e.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n,track:"inverted"},style:V({},e.vars?{backgroundColor:e.vars.palette.Slider[`${n}Track`],borderColor:e.vars.palette.Slider[`${n}Track`]}:V({backgroundColor:Jf(e.palette[n].main,.62),borderColor:Jf(e.palette[n].main,.62)},e.applyStyles("dark",{backgroundColor:Zf(e.palette[n].main,.5)}),e.applyStyles("dark",{borderColor:Zf(e.palette[n].main,.5)})))}))]}}),BN=Oe("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t[`thumbColor${Xe(n.color)}`],n.size!=="medium"&&t[`thumbSize${Xe(n.size)}`]]}})(({theme:e})=>{var t;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:e.transitions.create(["box-shadow","left","bottom"],{duration:e.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(e.vars||e).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},[`&.${zn.disabled}`]:{"&:hover":{boxShadow:"none"}},variants:[{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}},...Object.keys(((t=e.vars)!=null?t:e).palette).filter(n=>{var r;return((r=e.vars)!=null?r:e).palette[n].main}).map(n=>({props:{color:n},style:{[`&:hover, &.${zn.focusVisible}`]:V({},e.vars?{boxShadow:`0px 0px 0px 8px rgba(${e.vars.palette[n].mainChannel} / 0.16)`}:{boxShadow:`0px 0px 0px 8px ${Yr(e.palette[n].main,.16)}`},{"@media (hover: none)":{boxShadow:"none"}}),[`&.${zn.active}`]:V({},e.vars?{boxShadow:`0px 0px 0px 14px rgba(${e.vars.palette[n].mainChannel} / 0.16)}`}:{boxShadow:`0px 0px 0px 14px ${Yr(e.palette[n].main,.16)}`})}}))]}}),VN=Oe($N,{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})(({theme:e})=>V({zIndex:1,whiteSpace:"nowrap"},e.typography.body2,{fontWeight:500,transition:e.transitions.create(["transform"],{duration:e.transitions.duration.shortest}),position:"absolute",backgroundColor:(e.vars||e).palette.grey[600],borderRadius:2,color:(e.vars||e).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},[`&.${zn.valueLabelOpen}`]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},[`&.${zn.valueLabelOpen}`]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:e.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})),HN=Oe("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>Ou(e)&&e!=="markActive",overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})(({theme:e})=>({position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(e.vars||e).palette.background.paper,opacity:.8}}]})),UN=Oe("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>Ou(e)&&e!=="markLabelActive",overridesResolver:(e,t)=>t.markLabel})(({theme:e})=>V({},e.typography.body2,{color:(e.vars||e).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(e.vars||e).palette.text.primary}}]})),WN=e=>{const{disabled:t,dragging:n,marked:r,orientation:i,track:s,classes:o,color:a,size:l}=e,d={root:["root",t&&"disabled",n&&"dragging",r&&"marked",i==="vertical"&&"vertical",s==="inverted"&&"trackInverted",s===!1&&"trackFalse",a&&`color${Xe(a)}`,l&&`size${Xe(l)}`],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&`thumbSize${Xe(l)}`,a&&`thumbColor${Xe(a)}`],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return Jt(d,MN,o)},GN=({children:e})=>e,qN=k.forwardRef(function(t,n){var r,i,s,o,a,l,d,f,h,v,C,w,S,P,m,g,y,E,j,L,M,O,I,_;const B=RN({props:t,name:"MuiSlider"}),z=Fh(),{"aria-label":R,"aria-valuetext":H,"aria-labelledby":U,component:q="span",components:ee={},componentsProps:A={},color:Y="primary",classes:te,className:ce,disableSwap:ue=!1,disabled:F=!1,getAriaLabel:he,getAriaValueText:Le,marks:_e=!1,max:Ae=100,min:Pe=0,orientation:be="horizontal",shiftStep:dt=10,size:Ht="medium",step:It=1,scale:pe=fv,slotProps:de,slots:oe,track:ke="normal",valueLabelDisplay:me="off",valueLabelFormat:N=fv}=B,D=Me(B,AN),$=V({},B,{isRtl:z,max:Ae,min:Pe,classes:te,disabled:F,disableSwap:ue,orientation:be,marks:_e,color:Y,size:Ht,step:It,shiftStep:dt,scale:pe,track:ke,valueLabelDisplay:me,valueLabelFormat:N}),{axisProps:Q,getRootProps:Z,getHiddenInputProps:K,getThumbProps:ne,open:xe,active:Ve,axis:Ue,focusedThumbIndex:X,range:G,dragging:ae,marks:Se,values:ye,trackOffset:ge,trackLeap:Ut,getThumbStyle:Tt}=FT(V({},$,{rootRef:n}));$.marked=Se.length>0&&Se.some(et=>et.label),$.dragging=ae,$.focusedThumbIndex=X;const Ie=WN($),an=(r=(i=oe==null?void 0:oe.root)!=null?i:ee.Root)!=null?r:DN,ir=(s=(o=oe==null?void 0:oe.rail)!=null?o:ee.Rail)!=null?s:zN,Gi=(a=(l=oe==null?void 0:oe.track)!=null?l:ee.Track)!=null?a:FN,mi=(d=(f=oe==null?void 0:oe.thumb)!=null?f:ee.Thumb)!=null?d:BN,Oa=(h=(v=oe==null?void 0:oe.valueLabel)!=null?v:ee.ValueLabel)!=null?h:VN,$t=(C=(w=oe==null?void 0:oe.mark)!=null?w:ee.Mark)!=null?C:HN,yn=(S=(P=oe==null?void 0:oe.markLabel)!=null?P:ee.MarkLabel)!=null?S:UN,Ia=(m=(g=oe==null?void 0:oe.input)!=null?g:ee.Input)!=null?m:"input",Wt=(y=de==null?void 0:de.root)!=null?y:A.root,qi=(E=de==null?void 0:de.rail)!=null?E:A.rail,Ki=(j=de==null?void 0:de.track)!=null?j:A.track,Yi=(L=de==null?void 0:de.thumb)!=null?L:A.thumb,je=(M=de==null?void 0:de.valueLabel)!=null?M:A.valueLabel,Mn=(O=de==null?void 0:de.mark)!=null?O:A.mark,sr=(I=de==null?void 0:de.markLabel)!=null?I:A.markLabel,br=(_=de==null?void 0:de.input)!=null?_:A.input,wt=cn({elementType:an,getSlotProps:Z,externalSlotProps:Wt,externalForwardedProps:D,additionalProps:V({},_N(an)&&{as:q}),ownerState:V({},$,Wt==null?void 0:Wt.ownerState),className:[Ie.root,ce]}),Nt=cn({elementType:ir,externalSlotProps:qi,ownerState:$,className:Ie.rail}),no=cn({elementType:Gi,externalSlotProps:Ki,additionalProps:{style:V({},Q[Ue].offset(ge),Q[Ue].leap(Ut))},ownerState:V({},$,Ki==null?void 0:Ki.ownerState),className:Ie.track}),Xi=cn({elementType:mi,getSlotProps:ne,externalSlotProps:Yi,ownerState:V({},$,Yi==null?void 0:Yi.ownerState),className:Ie.thumb}),gi=cn({elementType:Oa,externalSlotProps:je,ownerState:V({},$,je==null?void 0:je.ownerState),className:Ie.valueLabel}),At=cn({elementType:$t,externalSlotProps:Mn,ownerState:$,className:Ie.mark}),ro=cn({elementType:yn,externalSlotProps:sr,ownerState:$,className:Ie.markLabel}),$a=cn({elementType:Ia,getSlotProps:K,externalSlotProps:br,ownerState:$});return c.jsxs(an,V({},wt,{children:[c.jsx(ir,V({},Nt)),c.jsx(Gi,V({},no)),Se.filter(et=>et.value>=Pe&&et.value<=Ae).map((et,ft)=>{const io=yc(et.value,Pe,Ae),vi=Q[Ue].offset(io);let qn;return ke===!1?qn=ye.indexOf(et.value)!==-1:qn=ke==="normal"&&(G?et.value>=ye[0]&&et.value<=ye[ye.length-1]:et.value<=ye[0])||ke==="inverted"&&(G?et.value<=ye[0]||et.value>=ye[ye.length-1]:et.value>=ye[0]),c.jsxs(k.Fragment,{children:[c.jsx($t,V({"data-index":ft},At,!Is($t)&&{markActive:qn},{style:V({},vi,At.style),className:Ce(At.className,qn&&Ie.markActive)})),et.label!=null?c.jsx(yn,V({"aria-hidden":!0,"data-index":ft},ro,!Is(yn)&&{markLabelActive:qn},{style:V({},vi,ro.style),className:Ce(Ie.markLabel,ro.className,qn&&Ie.markLabelActive),children:et.label})):null]},ft)}),ye.map((et,ft)=>{const io=yc(et,Pe,Ae),vi=Q[Ue].offset(io),qn=me==="off"?GN:Oa;return c.jsx(qn,V({},!Is(qn)&&{valueLabelFormat:N,valueLabelDisplay:me,value:typeof N=="function"?N(pe(et),ft):N,index:ft,open:xe===ft||Ve===ft||me==="on",disabled:F},gi,{children:c.jsx(mi,V({"data-index":ft},Xi,{className:Ce(Ie.thumb,Xi.className,Ve===ft&&Ie.active,X===ft&&Ie.focusVisible),style:V({},vi,Tt(ft),Xi.style),children:c.jsx(Ia,V({"data-index":ft,"aria-label":he?he(ft):R,"aria-valuenow":pe(et),"aria-labelledby":U,"aria-valuetext":Le?Le(pe(et),ft):H,value:ye[ft]},$a))}))}),ft)})]}))}),KN=qN,YN=({isLoggedIn:e,anchorMenuEl:t,open:n,handleClose:r,handleLogout:i})=>e?c.jsxs(dp,{open:n,anchorEl:t,onClose:r,sx:{".dark & .MuiMenu-list":{backgroundColor:"rgb(71 85 105)"},"& .MuiMenu-list":{backgroundColor:"rgb(241 245 249)"}},children:[c.jsx(Lo,{onClick:r,className:"p-0",children:c.jsx(Je,{to:`${ve}account/user`,className:"block px-4 py-2 text-center hover:bg-slate-200 dark:hover:bg-slate-800 w-32","aria-label":"Account",children:c.jsx("p",{children:"Account"})})}),c.jsx(Lo,{onClick:i,className:"p-0",children:c.jsx("p",{className:"block px-4 py-2 w-32 hover:bg-slate-200 dark:hover:bg-slate-800 text-center","aria-label":"Logout",children:"Logout"})})]}):c.jsxs(dp,{open:n,anchorEl:t,onClose:r,sx:{".dark & .MuiMenu-list":{backgroundColor:"rgb(71 85 105)"},"& .MuiMenu-list":{backgroundColor:"rgb(241 245 249)"}},children:[c.jsx(Lo,{onClick:r,className:"p-0",children:c.jsx(Je,{to:`${ve}login`,className:"block px-4 py-2 text-center hover:bg-slate-200 dark:hover:bg-slate-800 w-32","aria-label":"Login",children:c.jsx("p",{children:"Login"})})}),c.jsx(Lo,{onClick:r,className:"p-0",children:c.jsx(Je,{to:`${ve}register`,className:"block px-4 py-2 text-center hover:bg-slate-200 dark:hover:bg-slate-800 w-32","aria-label":"Register",children:c.jsx("p",{children:"Register"})})})]}),XN="_dark_1bzky_4",QN="_light_1bzky_7",pv={"toggle-button":"_toggle-button_1bzky_1",dark:XN,light:QN},ZN=()=>{const{isDark:e}=k.useContext(Sh),t=e?"dark":"light";return c.jsx("div",{className:`${pv["toggle-button"]} ${pv[t]}`,"aria-label":`Switch to ${e?"light":"dark"} mode`,children:e?c.jsx(d5,{className:"h-6 w-6 text-blue-200"}):c.jsx(f5,{className:"h-8 w-8 pt-2 -translate-y-[0.2rem] text-yellow-200"})})},JN=({onClick:e})=>{const{toggleTheme:t}=k.useContext(Sh),{isLoggedIn:n,logout:r}=k.useContext(Nn),{openCart:i,cartQuantity:s}=hi(),[o,a]=k.useState(null),l=!!o,d=v=>{a(v.currentTarget)},f=()=>{a(null)},h=()=>{r(),f(),fe.success("Logged out successfully!")};return c.jsxs("div",{className:"flex flex-row w-36 justify-evenly items-center",children:[c.jsx(ks,{id:"search-bar-button",ariaLabel:"Open search bar button on mobile",onClick:e,children:c.jsx(p2,{className:"h-8 w-8 sm:hidden"})}),c.jsx(ks,{id:"dark-mode-button",ariaLabel:"Dark mode button",onClick:t,children:c.jsx(ZN,{})}),c.jsxs(ks,{id:"cart-button",ariaLabel:"Cart button",onClick:i,children:[c.jsx(Qc,{className:"h-8 w-8"}),c.jsx("div",{className:"rounded-full bg-red-500 flex justify-center items-center text-white w-4 h-4 absolute top-0 right-0 translate-x-1 -translate-y-1",children:s})]}),c.jsx(ks,{id:"account-button",ariaLabel:"Account button",onClick:d,children:c.jsx(bh,{className:"h-8 w-8"})}),c.jsx(YN,{isLoggedIn:n,anchorMenuEl:o,open:l,handleClose:f,handleLogout:h})]})},eL=()=>c.jsx("img",{src:`${ve}/assets/logo.png`,alt:"E-commerce logo",className:"max-h-16 hover-button"}),hv=({display:e,height:t,width:n,rounded:r="",onClick:i})=>{const[s,o]=k.useState(""),a=ct(),l=d=>{d.preventDefault(),s!==""&&(a(`${ve}category/search?name=${s}`),i&&i(),o(""))};return c.jsxs("form",{id:"search-form",className:`${e} font-body flex items-center justify-between py-4 px-2 gap-2.5 isolate bg-secondary-regular ${r} ${n} ${t}`,onSubmit:l,children:[c.jsx("input",{id:"search",name:"search",type:"search",placeholder:"Search product by name...",className:"bg-transparent w-full h-full text-white placeholder-white focus:outline-none border-none",value:s,onChange:d=>o(d.target.value),"aria-label":"Search product by name"}),c.jsx(ks,{id:"search-button",ariaLabel:"Search button",children:c.jsx(p2,{className:"h-6 w-6"})}),c.jsx(ks,{id:"close-button",ariaLabel:"Close search",isHidden:!0,onClick:i,children:c.jsx(Ea,{className:"h-10 w-10"})})]})},tL=()=>{const[e,t]=k.useState(!0),n=()=>{t(r=>!r)};return c.jsx("header",{className:"bg-primary-regular text-white flex flex-row justify-between items-center",children:e?c.jsxs(c.Fragment,{children:[c.jsx(Je,{to:"/","aria-label":"Home",children:c.jsx(eL,{})}),c.jsx(hv,{display:"hidden sm:flex",height:"h-12",width:"w-[32rem]",rounded:"rounded-3xl"}),c.jsx(JN,{onClick:n})]}):c.jsx(hv,{display:"flex",height:"h-16",width:"w-full",onClick:n})})},Pr=({children:e})=>c.jsx("span",{className:"text-accent-regular dark:text-accent-light",children:e}),Ii=e=>e.charAt(0).toUpperCase()+e.slice(1);function nL(e){return e.charAt(0).toLowerCase()+e.slice(1)}function mv(e){return e.replace(/([a-z])([A-Z])/g,"$1 $2")}function Zh(e){if(e.length===0)return[void 0,void 0];const t=e.split("_");if(t.length!==2)throw new Error("Input string must contain exactly one underscore.");return t}function Ew(e){return rL(e.split("T")[0])}function rL(e){const t=new Date(e),n=t.getDate().toString().padStart(2,"0"),r=(t.getMonth()+1).toString().padStart(2,"0"),i=t.getFullYear();return`${n}/${r}/${i}`}const Jh=({name:e,errors:t,register:n,...r})=>{var S,P;const i=k.useRef(null),s=(P=(S=t[e])==null?void 0:S.message)==null?void 0:P.toString(),o=Ii(s??""),[a,l]=k.useState(!1),[d,f]=k.useState(!1),h=Number.MAX_SAFE_INTEGER,{ref:v,...C}=n(e,{required:`${e} is required`,minLength:{value:r.minLength??2,message:`Minimum length is ${r.minLength??1}`},maxLength:{value:r.maxLength??Number.MAX_SAFE_INTEGER,message:`Maximum length is ${r.maxLength??h}`}}),w=m=>{m&&(m.style.height="auto",m.style.height=`${m.scrollHeight}px`)};return k.useEffect(()=>{if(a){f(!0);const m=setTimeout(()=>{l(!1)},5e3);return()=>clearTimeout(m)}else{const m=setTimeout(()=>{f(!1)},500);return()=>clearTimeout(m)}},[a]),k.useEffect(()=>{i.current&&w(i.current)},[]),c.jsxs("div",{className:"flex flex-col w-full md:min-h-80 items-center px-4 mb-4",children:[c.jsx("label",{htmlFor:e,className:"self-start",children:Ii(e)}),c.jsx("textarea",{className:"overflow-hidden resize-none md:min-h-80",id:e,...C,ref:m=>{v(m),i.current=m},onInput:m=>{w(m.currentTarget),m.currentTarget.value.length===r.maxLength?l(!0):l(!1)},"aria-label":"Enter your message here",...r}),t[e]&&c.jsxs("p",{className:"text-red-500 mb-4",children:[o,"!"]}),d&&c.jsx("p",{className:`text-amber-500 h-0 my-4 transition-opacity duration-500 ease-in-out ${a?"opacity-100":"opacity-0"}`,children:"Maximum length reached!"})]})},Pw=e=>/\.(jpeg|jpg|gif|png|svg|webp|bmp|tiff?)$/i.test(e),iL=({image:e})=>Pw(e)?c.jsx("img",{src:e,alt:"User Avatar",className:"size-48 sm:size-80 rounded-full mx-auto my-4"}):c.jsx(bh,{className:"size-48 sm:size-80 rounded-full mx-auto my-4 text-primary-regular dark:text-primary-light"}),jw=e=>c.jsx("div",{onClick:e.onClick,className:"bg-slate-100 hover:bg-slate-300 hover:dark:bg-slate-500 dark:bg-slate-700 w-fit border-primary-regular dark:border-white border text-slate-600 text-xl shadow-lg shadow-primary-regular rounded-3xl dark:shadow-secondary-light cursor-pointer flex flex-col items-center",children:e.children}),sL=({src:e,size:t,alt:n})=>c.jsx("div",{className:`${t} border border-primary-regular dark:border-white rounded-3xl sm:rounded-[4rem] shadow-2xl shadow-primary-regular dark:shadow-secondary-light hover:scale-110 sm:hover:scale-125 hover:bg-slate-300 hover:dark:bg-slate-500 transition-all duration-300 ease-in-out`,children:c.jsx("img",{src:`${ve}/${e}`,alt:n})}),Xr=({to:e,src:t,alt:n,label:r,size:i})=>c.jsxs(Je,{to:`${ve}category/${e}`,className:"flex flex-col items-center gap-10","aria-label":`Category: ${e}`,children:[c.jsx(sL,{size:i,src:t,alt:n}),c.jsx("h1",{children:r})]}),we=({errors:e,name:t,register:n,pattern:r,className:i,...s})=>{var g,y;const[o,a]=k.useState(!1),l=(y=(g=e[t])==null?void 0:g.message)==null?void 0:y.toString(),d=Ii(l??""),f=Number.MAX_SAFE_INTEGER,h=s.type==="password",v=s.disabled,C=mv(t),w=()=>a(!o),{onBlur:S,...P}=n(t,{required:s.required?`${t} is required`:!1,minLength:{value:s.minLength??2,message:`Minimum length is ${s.minLength??2}`},maxLength:{value:s.maxLength??f,message:`Maximum length is ${s.maxLength??f}`},pattern:r?{value:r.value,message:r.message??`Invalid format for ${t}`}:void 0}),m=E=>{S(E),s.onBlur&&s.onBlur(E)};return c.jsxs("div",{className:`flex flex-col w-full items-center px-4 ${i}`,children:[c.jsxs("div",{className:"w-full flex flex-col justify-center mb-4",children:[c.jsx("label",{htmlFor:t,className:"flex flex-row items-center justify-center mb-1 self-start",children:Ii(C)}),c.jsxs("div",{className:"relative w-full",children:[c.jsx("input",{id:t,placeholder:`${Ii(C)}`,...P,...s,type:h?o?"text":"password":s.type||"text",autoComplete:s.autoComplete??"off",className:`pr-4 ${v?"bg-red-200":""}`,"aria-invalid":e[t]?"true":"false","aria-label":`Enter your ${t} here`,onChange:s.onChange,onBlur:m}),h&&c.jsx("button",{type:"button",onClick:w,className:"absolute inset-y-0 right-0 pr-3 flex items-center text-sm leading-5","aria-label":o?"Hide password":"Show password",children:o?c.jsx(c5,{className:"dark:text-white"}):c.jsx(l5,{className:"dark:text-white"})})]})]}),e[t]&&c.jsx("p",{className:"text-red-500 mb-4",children:mv(d)})]})},Ho=({children:e,onClick:t,display:n,ariaLabel:r})=>c.jsx("button",{onClick:t,className:`border-2 border-primary-regular dark:border-primary-light rounded-md items-center gap-1 p-2 transition-colors duration-300 ease-in-out hover:bg-primary-regular/10 dark:hover:bg-primary-regular/80 ${n}`,"aria-label":r,children:e}),oL=()=>{const e="hover:bg-primary-light active:bg-primary-regular transition-all duration-300 ease-in-out",t=`border-r-2 border-slate-100 flex-1 hover:bg-primary-light active:bg-primary-regular ${e}`;return c.jsxs("nav",{className:"bg-primary-regular flex justify-between border-t-2 border-slate-100 text-center",children:[c.jsx(Je,{to:`${ve}category/laptop`,className:t,"aria-label":"Laptops category",children:c.jsx("p",{className:"text-white",children:"Laptop"})}),c.jsx(Je,{to:`${ve}category/cellular`,className:t,"aria-label":"Cellulars category",children:c.jsx("p",{className:"text-white",children:"Cellulars"})}),c.jsx(Je,{to:`${ve}category/tv`,className:t,"aria-label":"TV category",children:c.jsx("p",{className:"text-white",children:"TV"})}),c.jsx(Je,{to:`${ve}category/headphone`,className:`flex-1 ${e}`,"aria-label":"Headphones category",children:c.jsx("p",{className:"text-white",children:"Headphones"})})]})},em=({id:e,name:t,price:n,image:r,averageRating:i})=>{const s=ct(),{increaseItemQuantity:o}=hi(),a=d=>{d.stopPropagation(),o(e),fe.success(`${t} added to cart!`)},l=d=>{a(d),s(`${ve}cart`)};return c.jsxs(jw,{onClick:()=>s(`${ve}products/${e}`),children:[c.jsx("img",{src:r,alt:t,className:"h-80 max-w-48 object-contain"}),c.jsx("h3",{className:"mb-4 text-center",children:t}),c.jsxs("div",{className:"flex justify-between gap-4 items-center mx-2 mb-4 w-72",children:[c.jsxs("h3",{children:[n,"$"]}),c.jsxs("div",{className:"flex items-center gap-2 ",children:[c.jsx(h2,{className:"text-orange-200"}),c.jsx("p",{children:parseFloat(i).toFixed(2)})]}),c.jsxs("div",{className:"flex justify-between w-36",children:[c.jsx("button",{className:"flex justify-between items-center border bg-amber-300 text-white size-10 rounded-xl hover-button active:bg-amber-400","aria-label":`Add ${t} to cart`,onClick:a,children:c.jsx(Qc,{className:"size-11/12"})}),c.jsx("button",{className:"bg-green-600 text-white rounded-2xl w-20 hover-button active:bg-green-700","aria-label":`Buy ${t} now`,onClick:l,children:"Buy now"})]})]})]})},en=({children:e})=>{const{isLoggedIn:t}=k.useContext(Nn);return t?e||c.jsx(Xc,{}):(fe.warning("You need to login to access this page"),c.jsx(yh,{to:`${ve}login`,replace:!0}))},tm=({isOpen:e,toggleDrawer:t,onSortChange:n,sortInputs:r})=>{const[i,s]=k.useState(""),o=l=>{const{value:d}=l.target;s(d)},a=l=>{l.preventDefault(),n(i),t()};return c.jsx(xh,{open:e,onClose:t,direction:"bottom",className:"bg-slate-100 dark:bg-slate-600 h-fit",lockBackgroundScroll:!0,children:c.jsxs("form",{className:"mx-1 flex flex-col items-center",onSubmit:a,children:[c.jsxs("div",{className:"w-full flex justify-between items-center mt-2",children:[c.jsx("h2",{children:"Sort By"}),c.jsx("button",{onClick:t,type:"button",children:c.jsx(Ea,{className:"text-primary-regular dark:text-primary-light size-8 hover:scale-125 transition-scale duration-300 ease-in-out"})})]}),c.jsx("hr",{className:"w-full my-2 border-t border-black dark:border-white"}),c.jsx("div",{className:"grid grid-cols-[repeat(2,1fr)] w-full gap-4",children:r.map(l=>c.jsxs("div",{className:"flex justify-start items-center",children:[c.jsx("input",{type:"radio",name:"sortBy",id:l.id,value:l.id,className:"w-fit mr-2 cursor-pointer",checked:i===l.id,onChange:o,"aria-pressed":i===l.id}),c.jsx("label",{htmlFor:l.id,className:"cursor-pointer",children:l.label})]},l.id))}),c.jsx("button",{className:"action-button mt-4",type:"submit",children:"Show the results"})]})})},Tw=({anchorEl:e,open:t,onClose:n,onSortChange:r,sortInputs:i})=>{const[s,o]=k.useState(""),a=d=>{const f=d.currentTarget.value;o(f)},l=d=>{d.preventDefault(),r(s),n()};return c.jsx(dp,{anchorEl:e,open:t,onClose:n,sx:{".dark & .MuiMenu-list":{backgroundColor:"rgb(71 85 105)"},"& .MuiMenu-list":{backgroundColor:"rgb(241 245 249)"}},children:c.jsx("form",{onSubmit:l,children:i.map(d=>c.jsx(Lo,{className:"flex justify-start items-center",children:c.jsx("button",{name:"sortBy",value:d.id,className:"w-fit mr-2",onClick:a,children:c.jsx("p",{children:d.label})})},d.label))})})},Nw="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M24%200C10.7464%200%200%2011.0149%200%2024.612C0%2035.4876%206.87857%2044.7024%2016.4143%2047.9597C17.6143%2048.1847%2018.0536%2047.4239%2018.0536%2046.7703C18.0536%2046.181%2018.0321%2044.6381%2018.0214%2042.5808C11.3464%2044.0702%209.93214%2039.2806%209.93214%2039.2806C8.83929%2036.4412%207.26429%2035.6805%207.26429%2035.6805C5.08929%2034.1482%207.425%2034.1804%207.425%2034.1804C9.83571%2034.3518%2011.1%2036.7198%2011.1%2036.7198C13.2429%2040.4807%2016.7143%2039.3985%2018.0857%2038.7663C18.3%2037.1805%2018.9214%2036.0876%2019.6071%2035.4769C14.2821%2034.8554%208.67857%2032.7446%208.67857%2023.3155C8.67857%2020.6261%209.61071%2018.4295%2011.1429%2016.7152C10.8964%2016.0937%2010.0714%2013.5864%2011.3786%2010.2005C11.3786%2010.2005%2013.3929%209.53622%2017.9786%2012.7185C19.8964%2012.1721%2021.9429%2011.9042%2023.9893%2011.8935C26.025%2011.9042%2028.0821%2012.1721%2030%2012.7185C34.5857%209.53622%2036.5893%2010.2005%2036.5893%2010.2005C37.8964%2013.5864%2037.0714%2016.0937%2036.825%2016.7152C38.3571%2018.4403%2039.2893%2020.6368%2039.2893%2023.3155C39.2893%2032.766%2033.675%2034.8447%2028.3286%2035.4554C29.1857%2036.2162%2029.9571%2037.7163%2029.9571%2040.0093C29.9571%2043.2987%2029.925%2045.956%2029.925%2046.7596C29.925%2047.4132%2030.3536%2048.1847%2031.575%2047.9382C41.1321%2044.6916%2048%2035.4769%2048%2024.612C48%2011.0149%2037.2536%200%2024%200Z'%20fill='white'%20/%3e%3c/svg%3e",Lw="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M39.6911%2011.1889C39.6911%2012.7796%2038.4015%2014.0689%2036.8111%2014.0689C35.2208%2014.0689%2033.9311%2012.7796%2033.9311%2011.1889C33.9311%209.59812%2035.2208%208.30887%2036.8111%208.30887C38.4019%208.30887%2039.6911%209.59812%2039.6911%2011.1889ZM24%2031.9999C19.5818%2031.9999%2016.0001%2028.4182%2016.0001%2024C16.0001%2019.5818%2019.5818%2016.0001%2024%2016.0001C28.4182%2016.0001%2031.9999%2019.5818%2031.9999%2024C31.9999%2028.4182%2028.4182%2031.9999%2024%2031.9999ZM24%2011.6756C17.1934%2011.6756%2011.6756%2017.1934%2011.6756%2024C11.6756%2030.8066%2017.1934%2036.3244%2024%2036.3244C30.8066%2036.3244%2036.3244%2030.8066%2036.3244%2024C36.3244%2017.1934%2030.8066%2011.6756%2024%2011.6756ZM24%204.3245C30.4084%204.3245%2031.1674%204.34887%2033.6979%204.46437C36.0379%204.57125%2037.3088%204.962%2038.1544%205.29088C39.2745%205.72625%2040.074%206.24637%2040.914%207.08637C41.754%207.926%2042.2741%208.7255%2042.7095%209.846C43.038%2010.6916%2043.4291%2011.9625%2043.536%2014.3025C43.6515%2016.8334%2043.6759%2017.5924%2043.6759%2024.0007C43.6759%2030.4091%2043.6515%2031.1681%2043.536%2033.6986C43.4291%2036.0386%2043.0384%2037.3095%2042.7095%2038.1551C42.2741%2039.2753%2041.754%2040.0748%2040.914%2040.9148C40.0744%2041.7548%2039.2749%2042.2749%2038.1544%2042.7102C37.3088%2043.0387%2036.0379%2043.4299%2033.6979%2043.5367C31.1674%2043.6522%2030.4084%2043.6766%2024%2043.6766C17.5912%2043.6766%2016.8323%2043.6522%2014.3018%2043.5367C11.9618%2043.4299%2010.6909%2043.0391%209.84525%2042.7102C8.72512%2042.2749%207.92563%2041.7548%207.08563%2040.9148C6.246%2040.0751%205.7255%2039.2756%205.29013%2038.1551C4.96163%2037.3095%204.5705%2036.0386%204.46362%2033.6986C4.34812%2031.1677%204.32375%2030.4087%204.32375%2024.0007C4.32375%2017.5924%204.34812%2016.8334%204.46362%2014.3025C4.5705%2011.9625%204.96125%2010.6916%205.29013%209.846C5.7255%208.72588%206.24563%207.92637%207.08563%207.08637C7.92525%206.24637%208.72475%205.72625%209.84525%205.29088C10.6909%204.96238%2011.9618%204.57125%2014.3018%204.46437C16.8326%204.34887%2017.5916%204.3245%2024%204.3245ZM24%200C17.4821%200%2016.6646%200.02775%2014.1049%200.144375C11.5504%200.261%209.8055%200.66675%208.27925%201.26C6.70087%201.87312%205.3625%202.694%204.02825%204.02825C2.694%205.3625%201.87312%206.70087%201.26%208.27925C0.66675%209.80587%200.261%2011.5504%200.144375%2014.1049C0.02775%2016.6646%200%2017.4821%200%2024C0%2030.5179%200.02775%2031.3354%200.144375%2033.8951C0.261%2036.4496%200.66675%2038.1941%201.26%2039.7207C1.87312%2041.2991%202.694%2042.6375%204.02825%2043.9718C5.3625%2045.306%206.70087%2046.1265%208.27925%2046.74C9.80587%2047.3332%2011.5504%2047.739%2014.1049%2047.8556C16.6646%2047.9722%2017.4821%2048%2024%2048C30.5179%2048%2031.3354%2047.9722%2033.8951%2047.8556C36.4496%2047.739%2038.1941%2047.3332%2039.7207%2046.74C41.2991%2046.1265%2042.6375%2045.306%2043.9718%2043.9718C45.306%2042.6375%2046.1265%2041.2991%2046.74%2039.7207C47.3332%2038.1941%2047.739%2036.4496%2047.8556%2033.8951C47.9722%2031.3354%2048%2030.5179%2048%2024C48%2017.4821%2047.9722%2016.6646%2047.8556%2014.1049C47.739%2011.5504%2047.3332%209.80587%2046.74%208.27925C46.1265%206.70087%2045.306%205.3625%2043.9718%204.02825C42.6375%202.694%2041.2991%201.8735%2039.7207%201.26C38.1941%200.66675%2036.4496%200.261%2033.8951%200.144375C31.3354%200.02775%2030.5179%200%2024%200Z'%20fill='url(%23paint0_radial_98_1953)'%20/%3e%3cdefs%3e%3cradialGradient%20id='paint0_radial_98_1953'%20cx='0'%20cy='0'%20r='1'%20gradientUnits='userSpaceOnUse'%20gradientTransform='translate(7.16666%2048.1666)%20scale(61.332)'%20%3e%3cstop%20stop-color='%23FFB140'%20/%3e%3cstop%20offset='0.2559'%20stop-color='%23FF5445'%20/%3e%3cstop%20offset='0.599'%20stop-color='%23FC2B82'%20/%3e%3cstop%20offset='1'%20stop-color='%238E40B7'%20/%3e%3c/radialGradient%3e%3c/defs%3e%3c/svg%3e",_w="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M48%206C48%202.68847%2045.3115%200%2042%200H6C2.68847%200%200%202.68847%200%206V42C0%2045.3115%202.68847%2048%206%2048H42C45.3115%2048%2048%2045.3115%2048%2042V6Z'%20fill='%232867B2'%20/%3e%3cpath%20d='M13.7638%2016.75H5.72375V40.9339H13.7638V16.75Z'%20fill='white'%20/%3e%3cpath%20d='M9.798%205.08875C7.04728%205.08875%205.25%206.89718%205.25%209.26746C5.25%2011.588%206.99262%2013.4463%209.69159%2013.4463H9.74353C12.5469%2013.4463%2014.2919%2011.588%2014.2919%209.26746C14.2399%206.89718%2012.5471%205.08875%209.798%205.08875Z'%20fill='white'%20/%3e%3cpath%20d='M33.4948%2016.1813C29.2302%2016.1813%2027.3199%2018.5266%2026.2502%2020.174V16.75H18.2123C18.3189%2019.0184%2018.2123%2040.9338%2018.2123%2040.9338H26.2501V27.4278C26.2501%2026.7049%2026.3021%2025.9822%2026.5152%2025.4655C27.0953%2024.0218%2028.4187%2022.5263%2030.6395%2022.5263C33.5469%2022.5263%2034.7116%2024.7448%2034.7116%2027.9944V40.9338H42.7498V27.0654C42.7498%2019.6369%2038.7837%2016.1813%2033.4948%2016.1813Z'%20fill='white'%20/%3e%3c/svg%3e",Mw="data:image/svg+xml,%3csvg%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20%3e%3cpath%20d='M28.572%2020.3269L46.443%200H42.2087L26.6843%2017.6459L14.294%200H0L18.7407%2026.686L0%2048H4.23429L20.6184%2029.361L33.706%2048H48L28.572%2020.3269ZM22.7706%2026.9203L20.8689%2024.2613L5.76128%203.12352H12.266L24.4619%2020.1887L26.3556%2022.8477L42.2067%2045.0287H35.7019L22.7706%2026.9203Z'%20fill='white'%20/%3e%3c/svg%3e",aL="data:image/svg+xml,%3csvg%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M64%200C28.6571%200%200%2029.373%200%2065.632C0%2094.6336%2018.3429%20119.206%2043.7714%20127.892C46.9714%20128.493%2048.1429%20126.464%2048.1429%20124.721C48.1429%20123.149%2048.0857%20119.035%2048.0571%20113.549C30.2571%20117.52%2026.4857%20104.748%2026.4857%20104.748C23.5714%2097.1766%2019.3714%2095.1479%2019.3714%2095.1479C13.5714%2091.062%2019.8%2091.1477%2019.8%2091.1477C26.2286%2091.6048%2029.6%2097.9195%2029.6%2097.9195C35.3143%20107.949%2044.5714%20105.063%2048.2286%20103.377C48.8%2099.1481%2050.4571%2096.2337%2052.2857%2094.605C38.0857%2092.9478%2023.1429%2087.3189%2023.1429%2062.1747C23.1429%2055.0029%2025.6286%2049.1455%2029.7143%2044.5738C29.0571%2042.9166%2026.8571%2036.2305%2030.3429%2027.2014C30.3429%2027.2014%2035.7143%2025.4299%2047.9429%2033.9161C53.0571%2032.4589%2058.5143%2031.7445%2063.9714%2031.716C69.4%2031.7445%2074.8857%2032.4589%2080%2033.9161C92.2286%2025.4299%2097.5714%2027.2014%2097.5714%2027.2014C101.057%2036.2305%2098.8571%2042.9166%2098.2%2044.5738C102.286%2049.174%20104.771%2055.0315%20104.771%2062.1747C104.771%2087.376%2089.8%2092.9192%2075.5429%2094.5479C77.8286%2096.5765%2079.8857%20100.577%2079.8857%20106.691C79.8857%20115.463%2079.8%20122.549%2079.8%20124.692C79.8%20126.435%2080.9429%20128.492%2084.2%20127.835C109.686%20119.178%20128%2094.605%20128%2065.632C128%2029.373%2099.3429%200%2064%200Z'%20fill='black'%20/%3e%3c/svg%3e",lL="data:image/svg+xml,%3csvg%20width='128'%20height='128'%20viewBox='0%200%20128%20128'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M76.1919%2054.205L123.848%200H112.556L71.158%2047.0556L38.1173%200H0L49.9752%2071.1627L0%20128H11.2914L54.9823%2078.2961L89.8827%20128H128L76.1919%2054.205ZM60.7216%2071.7874L55.6503%2064.6968L15.3634%208.32937H32.7094L65.2318%2053.8366L70.2816%2060.9272L112.551%20120.076H95.2051L60.7216%2071.7874Z'%20fill='black'%20/%3e%3c/svg%3e",cL=()=>c.jsxs("div",{className:"flex order-2 sm:order-1 justify-evenly sm:grid sm:grid-cols-2 sm:gap-4 my-8",children:[c.jsx("a",{href:"https://www.linkedin.com/in/maksim-mirkin/","aria-label":"LinkedIn",target:"_blank",rel:"noopener noreferrer",children:c.jsx("img",{src:_w,alt:"LinkedIn icon",className:"h-12 sm:h-9"})}),c.jsx("a",{href:"https://github.com/Maksim-Mirkin","aria-label":"GitHub",target:"_blank",rel:"noopener noreferrer",children:c.jsx("img",{src:Nw,alt:"GitHub icon",className:"h-12 sm:h-9"})}),c.jsx("a",{href:"https://www.instagram.com/","aria-label":"Instagram",target:"_blank",rel:"noopener noreferrer",children:c.jsx("img",{src:Lw,alt:"Instagram icon",className:"h-12 sm:h-9"})}),c.jsx("a",{href:"https://twitter.com/","aria-label":"Twitter",target:"_blank",rel:"noopener noreferrer",children:c.jsx("img",{src:Mw,alt:"Twitter icon",className:"h-12 sm:h-9"})})]}),uL=()=>c.jsxs("footer",{className:"font-body flex flex-col sm:flex-row justify-evenly bg-primary-regular text-white",children:[c.jsx(cL,{}),c.jsxs("nav",{className:"flex flex-col gap-2 items-center my-4 sm:my-10 order-1 sm:order-2",children:[c.jsx(Je,{to:`${ve}about`,"aria-label":"About Us",children:"About"}),c.jsx(Je,{to:`${ve}contact-us`,"aria-label":"Contact Us",children:"Contact Us"}),c.jsx("a",{href:"https://ecommerce-store-e805668c131b.herokuapp.com/swagger-ui/index.html","aria-label":"Documentation",target:"_blank",rel:"noopener noreferrer",children:"Documentation"})]}),c.jsxs("div",{className:"flex flex-col gap-4 my-8 sm:my-12 items-center order-last",children:[c.jsxs("span",{children:[c.jsx(Je,{to:`${ve}terms`,"aria-label":"Terms and Conditions",children:"Terms"})," ","Ā·"," ",c.jsx(Je,{to:`${ve}privacy-policy`,"aria-label":"Privacy Policy",children:"Privacy Policy"})]}),c.jsx("span",{children:"Ā© All rights reserved 2024"})]})]}),dL=()=>c.jsxs("div",{className:"min-h-screen flex flex-col overflow-x-hidden",children:[c.jsx(tL,{}),c.jsx(oL,{}),c.jsxs("main",{className:"flex-1 bg-slate-100 dark:bg-slate-700",children:[c.jsx(fk,{}),c.jsx(Xc,{})]}),c.jsx(uL,{}),c.jsx(r5,{})]}),fL=()=>{const e=Yc(),t=ct();let n="";return e instanceof Error?n=e.message:typeof e=="string"?n=e:Wc(e)&&(n=`${e.data} ${e.status} ${e.statusText}`),c.jsxs("div",{className:"flex flex-col justify-evenly items-center bg-slate-100 dark:bg-slate-600 h-screen ",children:[c.jsx("h1",{className:"text-red-500",children:"Oops!"}),c.jsx("img",{src:`${ve}/assets/sad-robot.png`,alt:"Sad robot"}),c.jsx("h2",{className:"text-red-500 mx-8",children:n}),c.jsxs("div",{className:"flex justify-between w-64",children:[c.jsx("button",{onClick:()=>t(-1),className:"action-button","aria-label":"Go back to the previous page",children:"Go Back"}),c.jsx("button",{onClick:()=>t("/"),className:"action-button","aria-label":"Go to the home page",children:"Go Home"})]})]})};var _a=e=>e.type==="checkbox",Es=e=>e instanceof Date,nn=e=>e==null;const Ow=e=>typeof e=="object";var Pt=e=>!nn(e)&&!Array.isArray(e)&&Ow(e)&&!Es(e),Iw=e=>Pt(e)&&e.target?_a(e.target)?e.target.checked:e.target.value:e,pL=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,$w=(e,t)=>e.has(pL(t)),hL=e=>{const t=e.constructor&&e.constructor.prototype;return Pt(t)&&t.hasOwnProperty("isPrototypeOf")},nm=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function ln(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(nm&&(e instanceof Blob||e instanceof FileList))&&(n||Pt(e)))if(t=n?[]:{},!n&&!hL(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=ln(e[r]));else return e;return t}var Ma=e=>Array.isArray(e)?e.filter(Boolean):[],lt=e=>e===void 0,re=(e,t,n)=>{if(!t||!Pt(e))return n;const r=Ma(t.split(/[,[\].]+?/)).reduce((i,s)=>nn(i)?i:i[s],e);return lt(r)||r===e?lt(e[t])?n:e[t]:r},Zn=e=>typeof e=="boolean";const wc={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Jn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Sr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},mL=ie.createContext(null),rm=()=>ie.useContext(mL);var Aw=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const s in e)Object.defineProperty(i,s,{get:()=>{const o=s;return t._proxyFormState[o]!==Jn.all&&(t._proxyFormState[o]=!r||Jn.all),n&&(n[o]=!0),e[o]}});return i},wn=e=>Pt(e)&&!Object.keys(e).length,Rw=(e,t,n,r)=>{n(e);const{name:i,...s}=e;return wn(s)||Object.keys(s).length>=Object.keys(t).length||Object.keys(s).find(o=>t[o]===(!r||Jn.all))},Il=e=>Array.isArray(e)?e:[e],Dw=(e,t,n)=>!e||!t||e===t||Il(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function im(e){const t=ie.useRef(e);t.current=e,ie.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function gL(e){const t=rm(),{control:n=t.control,disabled:r,name:i,exact:s}=e||{},[o,a]=ie.useState(n._formState),l=ie.useRef(!0),d=ie.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=ie.useRef(i);return f.current=i,im({disabled:r,next:h=>l.current&&Dw(f.current,h.name,s)&&Rw(h,d.current,n._updateFormState)&&a({...n._formState,...h}),subject:n._subjects.state}),ie.useEffect(()=>(l.current=!0,d.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),Aw(o,n,d.current,!1)}var fr=e=>typeof e=="string",zw=(e,t,n,r,i)=>fr(e)?(r&&t.watch.add(e),re(n,e,i)):Array.isArray(e)?e.map(s=>(r&&t.watch.add(s),re(n,s))):(r&&(t.watchAll=!0),n);function vL(e){const t=rm(),{control:n=t.control,name:r,defaultValue:i,disabled:s,exact:o}=e||{},a=ie.useRef(r);a.current=r,im({disabled:s,subject:n._subjects.values,next:f=>{Dw(a.current,f.name,o)&&d(ln(zw(a.current,n._names,f.values||n._formValues,!1,i)))}});const[l,d]=ie.useState(n._getWatch(r,i));return ie.useEffect(()=>n._removeUnmounted()),l}var sm=e=>/^\w*$/.test(e),Fw=e=>Ma(e.replace(/["|']|\]/g,"").split(/\.|\[/)),We=(e,t,n)=>{let r=-1;const i=sm(t)?[t]:Fw(t),s=i.length,o=s-1;for(;++r{const f=i._options.shouldUnregister||s,h=(v,C)=>{const w=re(i._fields,v);w&&(w._f.mount=C)};if(h(n,!0),f){const v=ln(re(i._options.defaultValues,n));We(i._defaultValues,n,v),lt(re(i._formValues,n))&&We(i._formValues,n,v)}return()=>{(o?f&&!i._state.action:f)?i.unregister(n):h(n,!1)}},[n,i,o,s]),ie.useEffect(()=>{re(i._fields,n)&&i._updateDisabledField({disabled:r,fields:i._fields,name:n,value:re(i._fields,n)._f.value})},[r,n,i]),{field:{name:n,value:a,...Zn(r)||l.disabled?{disabled:l.disabled||r}:{},onChange:ie.useCallback(f=>d.current.onChange({target:{value:Iw(f),name:n},type:wc.CHANGE}),[n]),onBlur:ie.useCallback(()=>d.current.onBlur({target:{value:re(i._formValues,n),name:n},type:wc.BLUR}),[n,i]),ref:f=>{const h=re(i._fields,n);h&&f&&(h._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:v=>f.setCustomValidity(v),reportValidity:()=>f.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!re(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!re(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!re(l.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!re(l.validatingFields,n)},error:{enumerable:!0,get:()=>re(l.errors,n)}})}}const wL=e=>e.render(yL(e));var xL=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},gv=e=>({isOnSubmit:!e||e===Jn.onSubmit,isOnBlur:e===Jn.onBlur,isOnChange:e===Jn.onChange,isOnAll:e===Jn.all,isOnTouch:e===Jn.onTouched}),vv=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const Uo=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const s=re(e,i);if(s){const{_f:o,...a}=s;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],i)&&!r)break;if(o.ref&&t(o.ref,o.name)&&!r)break;Uo(a,t)}else Pt(a)&&Uo(a,t)}}};var bL=(e,t,n)=>{const r=Ma(re(e,n));return We(r,"root",t[n]),We(e,n,r),e},om=e=>e.type==="file",Qr=e=>typeof e=="function",xc=e=>{if(!nm)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},$l=e=>fr(e),am=e=>e.type==="radio",bc=e=>e instanceof RegExp;const yv={value:!1,isValid:!1},wv={value:!0,isValid:!0};var Bw=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!lt(e[0].attributes.value)?lt(e[0].value)||e[0].value===""?wv:{value:e[0].value,isValid:!0}:wv:yv}return yv};const xv={isValid:!1,value:null};var Vw=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,xv):xv;function bv(e,t,n="validate"){if($l(e)||Array.isArray(e)&&e.every($l)||Zn(e)&&!e)return{type:n,message:$l(e)?e:"",ref:t}}var cs=e=>Pt(e)&&!bc(e)?e:{value:e,message:""},Sv=async(e,t,n,r,i)=>{const{ref:s,refs:o,required:a,maxLength:l,minLength:d,min:f,max:h,pattern:v,validate:C,name:w,valueAsNumber:S,mount:P,disabled:m}=e._f,g=re(t,w);if(!P||m)return{};const y=o?o[0]:s,E=z=>{r&&y.reportValidity&&(y.setCustomValidity(Zn(z)?"":z||""),y.reportValidity())},j={},L=am(s),M=_a(s),O=L||M,I=(S||om(s))&<(s.value)&<(g)||xc(s)&&s.value===""||g===""||Array.isArray(g)&&!g.length,_=xL.bind(null,w,n,j),B=(z,R,H,U=Sr.maxLength,q=Sr.minLength)=>{const ee=z?R:H;j[w]={type:z?U:q,message:ee,ref:s,..._(z?U:q,ee)}};if(i?!Array.isArray(g)||!g.length:a&&(!O&&(I||nn(g))||Zn(g)&&!g||M&&!Bw(o).isValid||L&&!Vw(o).isValid)){const{value:z,message:R}=$l(a)?{value:!!a,message:a}:cs(a);if(z&&(j[w]={type:Sr.required,message:R,ref:y,..._(Sr.required,R)},!n))return E(R),j}if(!I&&(!nn(f)||!nn(h))){let z,R;const H=cs(h),U=cs(f);if(!nn(g)&&!isNaN(g)){const q=s.valueAsNumber||g&&+g;nn(H.value)||(z=q>H.value),nn(U.value)||(R=qnew Date(new Date().toDateString()+" "+te),A=s.type=="time",Y=s.type=="week";fr(H.value)&&g&&(z=A?ee(g)>ee(H.value):Y?g>H.value:q>new Date(H.value)),fr(U.value)&&g&&(R=A?ee(g)+z.value,U=!nn(R.value)&&g.length<+R.value;if((H||U)&&(B(H,z.message,R.message),!n))return E(j[w].message),j}if(v&&!I&&fr(g)){const{value:z,message:R}=cs(v);if(bc(z)&&!g.match(z)&&(j[w]={type:Sr.pattern,message:R,ref:s,..._(Sr.pattern,R)},!n))return E(R),j}if(C){if(Qr(C)){const z=await C(g,t),R=bv(z,y);if(R&&(j[w]={...R,..._(Sr.validate,R.message)},!n))return E(R.message),j}else if(Pt(C)){let z={};for(const R in C){if(!wn(z)&&!n)break;const H=bv(await C[R](g,t),y,R);H&&(z={...H,..._(R,H.message)},E(H.message),n&&(j[w]=z))}if(!wn(z)&&(j[w]={ref:y,...z},!n))return j}}return E(!0),j};function SL(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const s of e)s.next&&s.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(s=>s!==i)}}),unsubscribe:()=>{e=[]}}},Sc=e=>nn(e)||!Ow(e);function _i(e,t){if(Sc(e)||Sc(t))return e===t;if(Es(e)&&Es(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const s=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const o=t[i];if(Es(s)&&Es(o)||Pt(s)&&Pt(o)||Array.isArray(s)&&Array.isArray(o)?!_i(s,o):s!==o)return!1}}return!0}var Hw=e=>e.type==="select-multiple",kL=e=>am(e)||_a(e),zd=e=>xc(e)&&e.isConnected,Uw=e=>{for(const t in e)if(Qr(e[t]))return!0;return!1};function Cc(e,t={}){const n=Array.isArray(e);if(Pt(e)||n)for(const r in e)Array.isArray(e[r])||Pt(e[r])&&!Uw(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Cc(e[r],t[r])):nn(e[r])||(t[r]=!0);return t}function Ww(e,t,n){const r=Array.isArray(e);if(Pt(e)||r)for(const i in e)Array.isArray(e[i])||Pt(e[i])&&!Uw(e[i])?lt(t)||Sc(n[i])?n[i]=Array.isArray(e[i])?Cc(e[i],[]):{...Cc(e[i])}:Ww(e[i],nn(t)?{}:t[i],n[i]):n[i]=!_i(e[i],t[i]);return n}var hl=(e,t)=>Ww(e,t,Cc(t)),Gw=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>lt(e)?e:t?e===""?NaN:e&&+e:n&&fr(e)?new Date(e):r?r(e):e;function Fd(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return om(t)?t.files:am(t)?Vw(e.refs).value:Hw(t)?[...t.selectedOptions].map(({value:n})=>n):_a(t)?Bw(e.refs).value:Gw(lt(t.value)?e.ref.value:t.value,e)}var EL=(e,t,n,r)=>{const i={};for(const s of e){const o=re(t,s);o&&We(i,s,o._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},So=e=>lt(e)?e:bc(e)?e.source:Pt(e)?bc(e.value)?e.value.source:e.value:e,PL=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function Cv(e,t,n){const r=re(e,n);if(r||sm(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const s=i.join("."),o=re(t,s),a=re(e,s);if(o&&!Array.isArray(o)&&n!==s)return{name:n};if(a&&a.type)return{name:s,error:a};i.pop()}return{name:n}}var jL=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,TL=(e,t)=>!Ma(re(e,t)).length&&Ct(e,t);const NL={mode:Jn.onSubmit,reValidateMode:Jn.onChange,shouldFocusError:!0};function LL(e={}){let t={...NL,...e},n={submitCount:0,isDirty:!1,isLoading:Qr(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Pt(t.defaultValues)||Pt(t.values)?ln(t.defaultValues||t.values)||{}:{},s=t.shouldUnregister?{}:ln(i),o={action:!1,mount:!1,watch:!1},a={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l,d=0;const f={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:Dd(),array:Dd(),state:Dd()},v=gv(t.mode),C=gv(t.reValidateMode),w=t.criteriaMode===Jn.all,S=N=>D=>{clearTimeout(d),d=setTimeout(N,D)},P=async N=>{if(f.isValid||N){const D=t.resolver?wn((await O()).errors):await _(r,!0);D!==n.isValid&&h.state.next({isValid:D})}},m=(N,D)=>{(f.isValidating||f.validatingFields)&&((N||Array.from(a.mount)).forEach($=>{$&&(D?We(n.validatingFields,$,D):Ct(n.validatingFields,$))}),h.state.next({validatingFields:n.validatingFields,isValidating:!wn(n.validatingFields)}))},g=(N,D=[],$,Q,Z=!0,K=!0)=>{if(Q&&$){if(o.action=!0,K&&Array.isArray(re(r,N))){const ne=$(re(r,N),Q.argA,Q.argB);Z&&We(r,N,ne)}if(K&&Array.isArray(re(n.errors,N))){const ne=$(re(n.errors,N),Q.argA,Q.argB);Z&&We(n.errors,N,ne),TL(n.errors,N)}if(f.touchedFields&&K&&Array.isArray(re(n.touchedFields,N))){const ne=$(re(n.touchedFields,N),Q.argA,Q.argB);Z&&We(n.touchedFields,N,ne)}f.dirtyFields&&(n.dirtyFields=hl(i,s)),h.state.next({name:N,isDirty:z(N,D),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else We(s,N,D)},y=(N,D)=>{We(n.errors,N,D),h.state.next({errors:n.errors})},E=N=>{n.errors=N,h.state.next({errors:n.errors,isValid:!1})},j=(N,D,$,Q)=>{const Z=re(r,N);if(Z){const K=re(s,N,lt($)?re(i,N):$);lt(K)||Q&&Q.defaultChecked||D?We(s,N,D?K:Fd(Z._f)):U(N,K),o.mount&&P()}},L=(N,D,$,Q,Z)=>{let K=!1,ne=!1;const xe={name:N},Ve=!!(re(r,N)&&re(r,N)._f.disabled);if(!$||Q){f.isDirty&&(ne=n.isDirty,n.isDirty=xe.isDirty=z(),K=ne!==xe.isDirty);const Ue=Ve||_i(re(i,N),D);ne=!!(!Ve&&re(n.dirtyFields,N)),Ue||Ve?Ct(n.dirtyFields,N):We(n.dirtyFields,N,!0),xe.dirtyFields=n.dirtyFields,K=K||f.dirtyFields&&ne!==!Ue}if($){const Ue=re(n.touchedFields,N);Ue||(We(n.touchedFields,N,$),xe.touchedFields=n.touchedFields,K=K||f.touchedFields&&Ue!==$)}return K&&Z&&h.state.next(xe),K?xe:{}},M=(N,D,$,Q)=>{const Z=re(n.errors,N),K=f.isValid&&Zn(D)&&n.isValid!==D;if(e.delayError&&$?(l=S(()=>y(N,$)),l(e.delayError)):(clearTimeout(d),l=null,$?We(n.errors,N,$):Ct(n.errors,N)),($?!_i(Z,$):Z)||!wn(Q)||K){const ne={...Q,...K&&Zn(D)?{isValid:D}:{},errors:n.errors,name:N};n={...n,...ne},h.state.next(ne)}},O=async N=>{m(N,!0);const D=await t.resolver(s,t.context,EL(N||a.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return m(N),D},I=async N=>{const{errors:D}=await O(N);if(N)for(const $ of N){const Q=re(D,$);Q?We(n.errors,$,Q):Ct(n.errors,$)}else n.errors=D;return D},_=async(N,D,$={valid:!0})=>{for(const Q in N){const Z=N[Q];if(Z){const{_f:K,...ne}=Z;if(K){const xe=a.array.has(K.name);m([Q],!0);const Ve=await Sv(Z,s,w,t.shouldUseNativeValidation&&!D,xe);if(m([Q]),Ve[K.name]&&($.valid=!1,D))break;!D&&(re(Ve,K.name)?xe?bL(n.errors,Ve,K.name):We(n.errors,K.name,Ve[K.name]):Ct(n.errors,K.name))}ne&&await _(ne,D,$)}}return $.valid},B=()=>{for(const N of a.unMount){const D=re(r,N);D&&(D._f.refs?D._f.refs.every($=>!zd($)):!zd(D._f.ref))&&_e(N)}a.unMount=new Set},z=(N,D)=>(N&&D&&We(s,N,D),!_i(ce(),i)),R=(N,D,$)=>zw(N,a,{...o.mount?s:lt(D)?i:fr(N)?{[N]:D}:D},$,D),H=N=>Ma(re(o.mount?s:i,N,e.shouldUnregister?re(i,N,[]):[])),U=(N,D,$={})=>{const Q=re(r,N);let Z=D;if(Q){const K=Q._f;K&&(!K.disabled&&We(s,N,Gw(D,K)),Z=xc(K.ref)&&nn(D)?"":D,Hw(K.ref)?[...K.ref.options].forEach(ne=>ne.selected=Z.includes(ne.value)):K.refs?_a(K.ref)?K.refs.length>1?K.refs.forEach(ne=>(!ne.defaultChecked||!ne.disabled)&&(ne.checked=Array.isArray(Z)?!!Z.find(xe=>xe===ne.value):Z===ne.value)):K.refs[0]&&(K.refs[0].checked=!!Z):K.refs.forEach(ne=>ne.checked=ne.value===Z):om(K.ref)?K.ref.value="":(K.ref.value=Z,K.ref.type||h.values.next({name:N,values:{...s}})))}($.shouldDirty||$.shouldTouch)&&L(N,Z,$.shouldTouch,$.shouldDirty,!0),$.shouldValidate&&te(N)},q=(N,D,$)=>{for(const Q in D){const Z=D[Q],K=`${N}.${Q}`,ne=re(r,K);(a.array.has(N)||!Sc(Z)||ne&&!ne._f)&&!Es(Z)?q(K,Z,$):U(K,Z,$)}},ee=(N,D,$={})=>{const Q=re(r,N),Z=a.array.has(N),K=ln(D);We(s,N,K),Z?(h.array.next({name:N,values:{...s}}),(f.isDirty||f.dirtyFields)&&$.shouldDirty&&h.state.next({name:N,dirtyFields:hl(i,s),isDirty:z(N,K)})):Q&&!Q._f&&!nn(K)?q(N,K,$):U(N,K,$),vv(N,a)&&h.state.next({...n}),h.values.next({name:o.mount?N:void 0,values:{...s}})},A=async N=>{o.mount=!0;const D=N.target;let $=D.name,Q=!0;const Z=re(r,$),K=()=>D.type?Fd(Z._f):Iw(N),ne=xe=>{Q=Number.isNaN(xe)||xe===re(s,$,xe)};if(Z){let xe,Ve;const Ue=K(),X=N.type===wc.BLUR||N.type===wc.FOCUS_OUT,G=!PL(Z._f)&&!t.resolver&&!re(n.errors,$)&&!Z._f.deps||jL(X,re(n.touchedFields,$),n.isSubmitted,C,v),ae=vv($,a,X);We(s,$,Ue),X?(Z._f.onBlur&&Z._f.onBlur(N),l&&l(0)):Z._f.onChange&&Z._f.onChange(N);const Se=L($,Ue,X,!1),ye=!wn(Se)||ae;if(!X&&h.values.next({name:$,type:N.type,values:{...s}}),G)return f.isValid&&P(),ye&&h.state.next({name:$,...ae?{}:Se});if(!X&&ae&&h.state.next({...n}),t.resolver){const{errors:ge}=await O([$]);if(ne(Ue),Q){const Ut=Cv(n.errors,r,$),Tt=Cv(ge,r,Ut.name||$);xe=Tt.error,$=Tt.name,Ve=wn(ge)}}else m([$],!0),xe=(await Sv(Z,s,w,t.shouldUseNativeValidation))[$],m([$]),ne(Ue),Q&&(xe?Ve=!1:f.isValid&&(Ve=await _(r,!0)));Q&&(Z._f.deps&&te(Z._f.deps),M($,Ve,xe,Se))}},Y=(N,D)=>{if(re(n.errors,D)&&N.focus)return N.focus(),1},te=async(N,D={})=>{let $,Q;const Z=Il(N);if(t.resolver){const K=await I(lt(N)?N:Z);$=wn(K),Q=N?!Z.some(ne=>re(K,ne)):$}else N?(Q=(await Promise.all(Z.map(async K=>{const ne=re(r,K);return await _(ne&&ne._f?{[K]:ne}:ne)}))).every(Boolean),!(!Q&&!n.isValid)&&P()):Q=$=await _(r);return h.state.next({...!fr(N)||f.isValid&&$!==n.isValid?{}:{name:N},...t.resolver||!N?{isValid:$}:{},errors:n.errors}),D.shouldFocus&&!Q&&Uo(r,Y,N?Z:a.mount),Q},ce=N=>{const D={...i,...o.mount?s:{}};return lt(N)?D:fr(N)?re(D,N):N.map($=>re(D,$))},ue=(N,D)=>({invalid:!!re((D||n).errors,N),isDirty:!!re((D||n).dirtyFields,N),isTouched:!!re((D||n).touchedFields,N),isValidating:!!re((D||n).validatingFields,N),error:re((D||n).errors,N)}),F=N=>{N&&Il(N).forEach(D=>Ct(n.errors,D)),h.state.next({errors:N?n.errors:{}})},he=(N,D,$)=>{const Q=(re(r,N,{_f:{}})._f||{}).ref;We(n.errors,N,{...D,ref:Q}),h.state.next({name:N,errors:n.errors,isValid:!1}),$&&$.shouldFocus&&Q&&Q.focus&&Q.focus()},Le=(N,D)=>Qr(N)?h.values.subscribe({next:$=>N(R(void 0,D),$)}):R(N,D,!0),_e=(N,D={})=>{for(const $ of N?Il(N):a.mount)a.mount.delete($),a.array.delete($),D.keepValue||(Ct(r,$),Ct(s,$)),!D.keepError&&Ct(n.errors,$),!D.keepDirty&&Ct(n.dirtyFields,$),!D.keepTouched&&Ct(n.touchedFields,$),!D.keepIsValidating&&Ct(n.validatingFields,$),!t.shouldUnregister&&!D.keepDefaultValue&&Ct(i,$);h.values.next({values:{...s}}),h.state.next({...n,...D.keepDirty?{isDirty:z()}:{}}),!D.keepIsValid&&P()},Ae=({disabled:N,name:D,field:$,fields:Q,value:Z})=>{if(Zn(N)){const K=N?void 0:lt(Z)?Fd($?$._f:re(Q,D)._f):Z;We(s,D,K),L(D,K,!1,!1,!0)}},Pe=(N,D={})=>{let $=re(r,N);const Q=Zn(D.disabled);return We(r,N,{...$||{},_f:{...$&&$._f?$._f:{ref:{name:N}},name:N,mount:!0,...D}}),a.mount.add(N),$?Ae({field:$,disabled:D.disabled,name:N,value:D.value}):j(N,!0,D.value),{...Q?{disabled:D.disabled}:{},...t.progressive?{required:!!D.required,min:So(D.min),max:So(D.max),minLength:So(D.minLength),maxLength:So(D.maxLength),pattern:So(D.pattern)}:{},name:N,onChange:A,onBlur:A,ref:Z=>{if(Z){Pe(N,D),$=re(r,N);const K=lt(Z.value)&&Z.querySelectorAll&&Z.querySelectorAll("input,select,textarea")[0]||Z,ne=kL(K),xe=$._f.refs||[];if(ne?xe.find(Ve=>Ve===K):K===$._f.ref)return;We(r,N,{_f:{...$._f,...ne?{refs:[...xe.filter(zd),K,...Array.isArray(re(i,N))?[{}]:[]],ref:{type:K.type,name:N}}:{ref:K}}}),j(N,!1,void 0,K)}else $=re(r,N,{}),$._f&&($._f.mount=!1),(t.shouldUnregister||D.shouldUnregister)&&!($w(a.array,N)&&o.action)&&a.unMount.add(N)}}},be=()=>t.shouldFocusError&&Uo(r,Y,a.mount),dt=N=>{Zn(N)&&(h.state.next({disabled:N}),Uo(r,(D,$)=>{let Q=N;const Z=re(r,$);Z&&Zn(Z._f.disabled)&&(Q||(Q=Z._f.disabled)),D.disabled=Q},0,!1))},Ht=(N,D)=>async $=>{let Q;$&&($.preventDefault&&$.preventDefault(),$.persist&&$.persist());let Z=ln(s);if(h.state.next({isSubmitting:!0}),t.resolver){const{errors:K,values:ne}=await O();n.errors=K,Z=ne}else await _(r);if(Ct(n.errors,"root"),wn(n.errors)){h.state.next({errors:{}});try{await N(Z,$)}catch(K){Q=K}}else D&&await D({...n.errors},$),be(),setTimeout(be);if(h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:wn(n.errors)&&!Q,submitCount:n.submitCount+1,errors:n.errors}),Q)throw Q},It=(N,D={})=>{re(r,N)&&(lt(D.defaultValue)?ee(N,ln(re(i,N))):(ee(N,D.defaultValue),We(i,N,ln(D.defaultValue))),D.keepTouched||Ct(n.touchedFields,N),D.keepDirty||(Ct(n.dirtyFields,N),n.isDirty=D.defaultValue?z(N,ln(re(i,N))):z()),D.keepError||(Ct(n.errors,N),f.isValid&&P()),h.state.next({...n}))},pe=(N,D={})=>{const $=N?ln(N):i,Q=ln($),Z=wn(N),K=Z?i:Q;if(D.keepDefaultValues||(i=$),!D.keepValues){if(D.keepDirtyValues)for(const ne of a.mount)re(n.dirtyFields,ne)?We(K,ne,re(s,ne)):ee(ne,re(K,ne));else{if(nm&<(N))for(const ne of a.mount){const xe=re(r,ne);if(xe&&xe._f){const Ve=Array.isArray(xe._f.refs)?xe._f.refs[0]:xe._f.ref;if(xc(Ve)){const Ue=Ve.closest("form");if(Ue){Ue.reset();break}}}}r={}}s=e.shouldUnregister?D.keepDefaultValues?ln(i):{}:ln(K),h.array.next({values:{...K}}),h.values.next({values:{...K}})}a={mount:D.keepDirtyValues?a.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},o.mount=!f.isValid||!!D.keepIsValid||!!D.keepDirtyValues,o.watch=!!e.shouldUnregister,h.state.next({submitCount:D.keepSubmitCount?n.submitCount:0,isDirty:Z?!1:D.keepDirty?n.isDirty:!!(D.keepDefaultValues&&!_i(N,i)),isSubmitted:D.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:Z?[]:D.keepDirtyValues?D.keepDefaultValues&&s?hl(i,s):n.dirtyFields:D.keepDefaultValues&&N?hl(i,N):{},touchedFields:D.keepTouched?n.touchedFields:{},errors:D.keepErrors?n.errors:{},isSubmitSuccessful:D.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},de=(N,D)=>pe(Qr(N)?N(s):N,D);return{control:{register:Pe,unregister:_e,getFieldState:ue,handleSubmit:Ht,setError:he,_executeSchema:O,_getWatch:R,_getDirty:z,_updateValid:P,_removeUnmounted:B,_updateFieldArray:g,_updateDisabledField:Ae,_getFieldArray:H,_reset:pe,_resetDefaultValues:()=>Qr(t.defaultValues)&&t.defaultValues().then(N=>{de(N,t.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:N=>{n={...n,...N}},_disableForm:dt,_subjects:h,_proxyFormState:f,_setErrors:E,get _fields(){return r},get _formValues(){return s},get _state(){return o},set _state(N){o=N},get _defaultValues(){return i},get _names(){return a},set _names(N){a=N},get _formState(){return n},set _formState(N){n=N},get _options(){return t},set _options(N){t={...t,...N}}},trigger:te,register:Pe,handleSubmit:Ht,watch:Le,setValue:ee,getValues:ce,reset:de,resetField:It,clearErrors:F,unregister:_e,setError:he,setFocus:(N,D={})=>{const $=re(r,N),Q=$&&$._f;if(Q){const Z=Q.refs?Q.refs[0]:Q.ref;Z.focus&&(Z.focus(),D.shouldSelect&&Z.select())}},getFieldState:ue}}function yr(e={}){const t=ie.useRef(),n=ie.useRef(),[r,i]=ie.useState({isDirty:!1,isValidating:!1,isLoading:Qr(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:Qr(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...LL(e),formState:r});const s=t.current.control;return s._options=e,im({subject:s._subjects.state,next:o=>{Rw(o,s._proxyFormState,s._updateFormState,!0)&&i({...s._formState})}}),ie.useEffect(()=>s._disableForm(e.disabled),[s,e.disabled]),ie.useEffect(()=>{if(s._proxyFormState.isDirty){const o=s._getDirty();o!==r.isDirty&&s._subjects.state.next({isDirty:o})}},[s,r.isDirty]),ie.useEffect(()=>{e.values&&!_i(e.values,n.current)?(s._reset(e.values,s._options.resetOptions),n.current=e.values,i(o=>({...o}))):s._resetDefaultValues()},[e.values,s]),ie.useEffect(()=>{e.errors&&s._setErrors(e.errors)},[e.errors,s]),ie.useEffect(()=>{s._state.mount||(s._updateValid(),s._state.mount=!0),s._state.watch&&(s._state.watch=!1,s._subjects.state.next({...s._formState})),s._removeUnmounted()}),ie.useEffect(()=>{e.shouldUnregister&&s._subjects.values.next({values:s._getWatch()})},[e.shouldUnregister,s]),t.current.formState=Aw(r,s),t.current}const Bi=e=>{["e","E","+","-"].includes(e.key)&&e.preventDefault()},qw=({name:e,price:t,image:n,averageRating:r})=>c.jsxs(jw,{onClick:()=>{},children:[c.jsx("img",{src:n,alt:e,className:"h-80 max-w-48 object-scale-down"}),c.jsx("h3",{className:"mb-4 text-center",children:e}),c.jsxs("div",{className:"flex justify-between gap-4 items-center mx-2 mb-4",children:[c.jsxs("h3",{children:[t,"$"]}),c.jsxs("div",{className:"flex items-center gap-2 ",children:[c.jsx(h2,{className:"text-orange-200"}),c.jsx("p",{children:r})]}),c.jsxs("div",{className:"flex justify-between w-36",children:[c.jsx("button",{className:"flex justify-between items-center border bg-amber-300 text-white size-10 rounded-xl","aria-label":`Add ${e} to cart`,children:c.jsx(Qc,{className:"size-11/12"})}),c.jsx("button",{className:"bg-green-600 text-white rounded-2xl w-24","aria-label":`Buy ${e} now`,children:"Buy now"})]})]})]}),_L=()=>{const[e,t]=ie.useState(""),[n,r]=ie.useState(""),[i,s]=ie.useState(1),{register:o,handleSubmit:a,setValue:l,reset:d,formState:{errors:f}}=yr({mode:"onBlur"}),h=async w=>{fe.confirm("Is your product data correct? Do you want to add it?",async()=>{try{await rr.addProduct(w),fe.success("Product added successfully!"),d(),t(""),r(""),s(1)}catch(S){S!=null&&typeof S=="object"&&"message"in S&&typeof S.message=="string"?fe.error(S.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})},v=w=>{let S=parseFloat(w.target.value);isNaN(S)||S<1?S=1:S>99999&&(S=99999),s(S),l("price",S,{shouldValidate:!0,shouldDirty:!0})},C=w=>{const S=w.target.value;s(S===""?"":parseFloat(S))};return c.jsxs("div",{className:"flex flex-col items-center pt-4 pb-8",children:[c.jsx("h2",{className:"mb-4",children:"Add Product"}),c.jsxs("form",{noValidate:!0,onSubmit:a(h),className:"flex flex-col items-center w-3/4 mb-4",children:[c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 w-full",children:[c.jsx(we,{register:o,errors:f,name:"name","aria-label":"Name",minLength:2,maxLength:30,required:!0,onChange:w=>{r(w.target.value)}}),c.jsx(we,{register:o,errors:f,name:"brand","aria-label":"Brand",minLength:2,maxLength:30,required:!0}),c.jsx("div",{className:"col-span-1 md:col-span-2",children:c.jsx(we,{register:o,errors:f,name:"image",placeholder:"Image URL","aria-label":"Image URL",required:!0,onChange:w=>{t(w.target.value)}})}),c.jsx("div",{className:"col-span-1 md:col-span-2",children:c.jsx(Jh,{register:o,errors:f,name:"description",minLength:2,maxLength:512,required:!0})}),c.jsx(we,{register:o,errors:f,name:"price","aria-label":"Price",type:"number",min:1,minLength:1,max:99999,required:!0,value:i,onWheel:w=>w.target.blur(),onBlur:v,onChange:C,onKeyDown:Bi}),c.jsxs("div",{className:"mb-4 w-full px-4",children:[c.jsx("label",{htmlFor:"category",children:"Category"}),c.jsxs("select",{id:"category",...o("category",{required:"Category is required"}),children:[c.jsx("option",{value:"Laptop",children:"Laptop"}),c.jsx("option",{value:"Cellular",children:"Cellular"}),c.jsx("option",{value:"TV",children:"TV"}),c.jsx("option",{value:"Headphone",children:"Headphone"})]}),f.category&&c.jsx("span",{className:"text-red-500",children:"Category is required"})]}),c.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 w-full col-span-1 md:col-span-2",children:[c.jsx(we,{register:o,errors:f,name:"memory"}),c.jsx(we,{register:o,errors:f,name:"screenSize"}),c.jsx(we,{register:o,errors:f,name:"batteryCapacity"})]}),c.jsx(we,{register:o,errors:f,name:"operatingSystem"}),c.jsx(we,{register:o,errors:f,name:"color"})]}),c.jsx("div",{children:c.jsx("button",{className:"action-button mt-4",children:"Add Product"})})]}),c.jsx("h2",{className:"mb-4",children:"Preview"}),c.jsx(qw,{name:n,price:i,image:Pw(e)?e:"",averageRating:4.9})]})},ML=()=>c.jsx("div",{className:"animate-pulse border bg-gray-400 h-[19rem] flex flex-col justify-between",children:Array.from({length:10}).map((e,t)=>c.jsx("hr",{},t))}),Kw=()=>c.jsx("div",{className:"md:hidden flex flex-col justify-center gap-4 my-4 mx-1",children:Array.from({length:3}).map((e,t)=>c.jsx(ML,{},t))}),OL=()=>c.jsx("div",{className:"animate-pulse border h-12 bg-gray-400"}),Yw=()=>c.jsx("div",{className:"md:flex flex-col mx-1 hidden",children:Array.from({length:3}).map((e,t)=>c.jsx(OL,{},t))}),Xw=()=>{const{isAdmin:e}=k.useContext(Nn),n=vn().pathname,r=n.substring(n.lastIndexOf("/")+1)==="all-orders";return c.jsxs("div",{className:"md:flex justify-around items-center text-center border border-black dark:border-white mx-1 px-4 hidden",children:[c.jsx("p",{className:"flex-1",children:"Order ID"}),c.jsx("p",{className:"flex-1",children:"Address"}),c.jsx("p",{className:"flex-1",children:"City"}),c.jsx("p",{className:"flex-1",children:"Postal Code"}),c.jsx("p",{className:"flex-1",children:"Payment Information"}),c.jsx("p",{className:"flex-1",children:"Total Price"}),c.jsx("p",{className:"flex-1",children:"Status"}),c.jsx("p",{className:"flex-1",children:"Date"}),c.jsx("p",{className:"flex-1",children:"Order Items"}),e&&r&&c.jsx("p",{className:"flex-1",children:"Change Status"})]})};var Ei=(e=>(e.PENDING="Pending",e.APPROVED="Approved",e.DECLINED="Declined",e))(Ei||{});const Qw=({orderId:e,onSubmit:t})=>{const{handleSubmit:n,register:r,setValue:i}=yr({mode:"onChange",defaultValues:{orderId:e,status:""}}),s=a=>{i("orderId",e,{shouldValidate:!0,shouldDirty:!0}),i("status",a.target.value,{shouldValidate:!0,shouldDirty:!0}),n(t)()},o=a=>{a.stopPropagation()};return c.jsxs("form",{className:"dark:text-white flex-1 p-2 md:p-0",onClick:o,onSubmit:n(t),children:[c.jsx("input",{type:"hidden",...r("orderId")}),c.jsxs("select",{className:"md:my-1",...r("status"),defaultValue:"",onChange:s,onClick:o,children:[c.jsx("option",{value:"",disabled:!0,children:"Select status"}),c.jsx("option",{value:Ei.PENDING,children:Ei.PENDING}),c.jsx("option",{value:Ei.APPROVED,children:Ei.APPROVED}),c.jsx("option",{value:Ei.DECLINED,children:Ei.DECLINED})]})]})},Zw=({orders:e,navigateToOrder:t})=>{const{isAdmin:n}=k.useContext(Nn),r=ct(),s=vn().pathname,o=s.substring(s.lastIndexOf("/")+1)==="all-orders",a=async l=>{fe.confirm("Do you want to change the status of this order?",async()=>{try{await ka.updateOrderStatus(l),fe.success("Order updated successfully!"),setTimeout(()=>{r(0)},2e3)}catch(d){d!=null&&typeof d=="object"&&"message"in d&&typeof d.message=="string"?fe.error(d.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})};return c.jsx("div",{className:"md:hidden",children:e.orders.map(l=>c.jsxs("div",{onClick:()=>{const d=e.orders.find(f=>f.id===l.id);d&&t(rx(),d)},className:`flex flex-col justify-center gap-2 text-center border border-black dark:border-white cursor-pointer my-4 mx-1 ${nx(l.status)}`,children:[c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Order ID"}),c.jsx("p",{className:"dark:text-white",children:l.id})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Address"}),c.jsx("p",{className:"dark:text-white",children:l.address})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"City"}),c.jsx("p",{className:"dark:text-white",children:l.city})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Postal Code"}),c.jsx("p",{className:"dark:text-white",children:l.postalCode})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Payment Information"}),c.jsx("p",{className:"dark:text-white",children:l.paymentInformation})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Total Price"}),c.jsxs("p",{className:"dark:text-white",children:[l.totalPrice,"$"]})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Status"}),c.jsx("p",{className:"dark:text-white",children:l.status})]}),c.jsxs("div",{className:"flex justify-between items-center px-4 border-b border-black dark:border-white",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Date"}),c.jsx("p",{className:"dark:text-white",children:Ew(l.createdAt)})]}),c.jsxs("div",{className:"flex justify-between items-center px-4",children:[c.jsx("p",{className:"dark:text-white font-bold",children:"Order Items"}),c.jsx("p",{className:"dark:text-white",children:c.jsx(f2,{})})]}),n&&o&&c.jsx(Qw,{orderId:l.id,initialStatus:l.status,onSubmit:a})]},l.id))})},Jw=({orders:e,navigateToOrder:t})=>{const{isAdmin:n}=k.useContext(Nn),r=ct(),s=vn().pathname,o=s.substring(s.lastIndexOf("/")+1)==="all-orders",a=async l=>{fe.confirm("Do you want to change the status of this order?",async()=>{try{await ka.updateOrderStatus(l),fe.success("Order updated successfully!"),setTimeout(()=>{r(0)},2e3)}catch(d){d!=null&&typeof d=="object"&&"message"in d&&typeof d.message=="string"?fe.error(d.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})};return c.jsx("div",{children:e.orders.map(l=>c.jsxs("div",{onClick:()=>{const d=e.orders.find(f=>f.id===l.id);d&&t(rx(),d)},className:`md:flex justify-around items-center text-center border border-black dark:border-white mx-1 px-4 hidden cursor-pointer ${nx(l.status)}`,children:[c.jsx("p",{className:"dark:text-white flex-1",children:l.id}),c.jsx("p",{className:"dark:text-white flex-1",children:l.address}),c.jsx("p",{className:"dark:text-white flex-1",children:l.city}),c.jsx("p",{className:"dark:text-white flex-1",children:l.postalCode}),c.jsx("p",{className:"dark:text-white flex-1",children:l.paymentInformation}),c.jsxs("p",{className:"dark:text-white flex-1",children:[l.totalPrice,"$"]}),c.jsx("p",{className:"dark:text-white flex-1",children:l.status}),c.jsx("p",{className:"dark:text-white flex-1",children:Ew(l.createdAt)}),c.jsx("p",{className:"dark:text-white flex-1 flex justify-center",children:c.jsx(f2,{})}),n&&o&&c.jsx(Qw,{orderId:l.id,initialStatus:l.status,onSubmit:a})]},l.id))})},ex=({toggleSortDrawer:e,handleMenuOpen:t,anchorMenuEl:n,open:r,handleMenuClose:i,handleSortChange:s})=>c.jsxs("div",{className:"sm:absolute top-2 right-4 self-center",children:[c.jsxs(Ho,{onClick:e,display:"md:hidden flex",ariaLabel:"Sort by",children:[c.jsx("p",{children:"Sort by"}),c.jsx(fc,{className:"text-primary-regular dark:text-primary-light"})]}),c.jsxs(Ho,{onClick:t,display:"hidden md:flex",ariaLabel:"Sort by",children:[c.jsx("p",{children:"Sort by"}),c.jsx(fc,{className:"text-primary-regular dark:text-primary-light"}),c.jsx(Tw,{anchorEl:n,open:r,onClose:i,onSortChange:s,sortInputs:lm})]})]}),tx=({handlePrevPage:e,handleNextPage:t,currentPage:n,totalPages:r})=>{const i="size-10 text-primary-regular dark:text-primary-light hover:text-primary-light dark:hover:text-primary-regular transition-colors duration-300 ease-in-out";return c.jsxs("div",{className:"flex items-center justify-between w-64 mx-auto my-4",children:[c.jsx("button",{onClick:e,disabled:n===0,className:"disabled:opacity-50 disabled:cursor-not-allowed",children:c.jsx(i5,{className:i})}),c.jsxs("h2",{className:"text-primary-regular dark:text-primary-light",children:[n+1," / ",r]}),c.jsx("button",{onClick:t,disabled:n>=r-1,className:"disabled:opacity-50 disabled:cursor-not-allowed",children:c.jsx(s5,{className:i})})]})},IL=()=>{const{isAdmin:e}=k.useContext(Nn),[t,n]=k.useState(),[r,i]=k.useState(!1),[s,o]=k.useState(),[a,l]=k.useState(0),[d,f]=k.useState(0),[h,v]=k.useState(!1),[C,w]=k.useState(""),[S,P]=k.useState(null),m=!!S,g=()=>{a>0&&l(_=>_-1)},y=()=>{a_+1)},E=_=>{P(_.currentTarget)};k.useEffect(()=>{const _=B=>{S&&!S.contains(B.target)&&P(null)};return document.addEventListener("click",_),()=>{document.removeEventListener("click",_)}},[S,m]);const j=()=>{P(null)},L=()=>{v(_=>!_)},M=_=>{w(_)},O=ct(),I=(_,B)=>{O(`${ve}orders/${_}`,{state:{specificOrder:B}})};return k.useEffect(()=>{(async()=>{const[B,z]=Zh(C),R=B,H=z;try{i(!0),o(void 0);const U=await ka.fetchAllOrders({pageNumber:a,sortBy:R,sortDir:H});n(U),f(U.totalPages)}catch(U){U!=null&&typeof U=="object"&&"message"in U&&typeof U.message=="string"&&o(U.message)}finally{i(!1)}})()},[a,C]),c.jsxs("div",{className:"relative flex flex-col",children:[c.jsx("h2",{className:"text-center my-4",children:"All Orders"}),c.jsx(ex,{toggleSortDrawer:L,handleMenuOpen:E,anchorMenuEl:S,open:m,handleMenuClose:j,handleSortChange:M}),r&&c.jsxs(c.Fragment,{children:[c.jsx(Kw,{}),c.jsx(Yw,{})]}),s&&c.jsx("h2",{className:"error",children:s}),e?t?c.jsxs("div",{children:[c.jsx(Xw,{}),c.jsx(Zw,{orders:t,navigateToOrder:I}),c.jsx(Jw,{orders:t,navigateToOrder:I}),c.jsx(tx,{handlePrevPage:g,handleNextPage:y,currentPage:a,totalPages:d})]}):!s&&!r&&c.jsx("h1",{className:"m-auto",children:"There are no orders yet!"}):c.jsx("h1",{className:"error",children:"Access Denied"}),c.jsx(tm,{isOpen:h,toggleDrawer:L,onSortChange:M,sortInputs:lm})]})},$L=()=>c.jsx("div",{className:"animate-pulse bg-gray-400 dark:bg-slate-200 border flex gap-2 items-center h-12 px-2 md:flex-1 md:border md:rounded-lg md:mx-2 md:my-2 md:py-2 md:justify-center"}),AL=()=>{const{isAdmin:e}=k.useContext(Nn),t=e?4:2;return c.jsx("div",{className:"flex flex-col md:flex-row",children:Array.from({length:t}).map((n,r)=>c.jsx($L,{},r))})},RL=()=>{const{user:e,logout:t}=k.useContext(Nn),[n,r]=k.useState(!1),i=()=>{r(!0)},s=()=>{r(!1)},{register:o,handleSubmit:a,formState:{errors:l}}=yr({mode:"onBlur"}),d=async w=>{fe.confirm("Are you sure you want to update your data? You will have to login again!",async()=>{const S={oldUsername:e==null?void 0:e.username,newUsername:w.username,email:w.email,userImage:w.userImage};try{await Ws.updateUserDetails(S),fe.success("Your data updated successfully! Now you have to login again."),t()}catch(P){P!=null&&typeof P=="object"&&"message"in P&&typeof P.message=="string"?fe.error(P.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})},{register:f,handleSubmit:h,formState:{errors:v}}=yr({mode:"onBlur"}),C=async w=>{if(w.newPassword!==w.confirmNewPassword){s(),fe.error("Password and confirm password do not match");return}w.username=e==null?void 0:e.username;try{await Ws.changePassword(w),fe.success("Password changed successfully!")}catch(S){S!=null&&typeof S=="object"&&"message"in S&&typeof S.message=="string"?fe.error(S.message):fe.error("An unexpected error occurred. Please try again.")}finally{s()}};return c.jsxs("div",{className:"flex flex-col items-center",children:[c.jsx("h2",{className:"my-4",children:"Personal Data"}),c.jsx("img",{src:e==null?void 0:e.userImage,alt:"User Avatar",className:"size-48 sm:size-80 rounded-full"}),c.jsxs("form",{noValidate:!0,onSubmit:a(d),className:"flex flex-col items-center my-4 sm:w-3/4 md:grid md:grid-cols-2",children:[c.jsx(we,{register:o,errors:l,name:"username",placeholder:"Username",defaultValue:e==null?void 0:e.username,"aria-label":"Username",className:"md:col-span-1"}),c.jsx(we,{pattern:{message:"Email must be valid",value:/^[\w.]+@([\w-]+\.)+[\w-]{2,4}$/},register:o,errors:l,name:"email",placeholder:"Email",defaultValue:e==null?void 0:e.email,"aria-label":"Email",className:"md:col-span-1"}),c.jsx(we,{register:o,errors:l,name:"userImage",placeholder:"User Avatar",defaultValue:e==null?void 0:e.userImage,"aria-label":"User Avatar",className:"md:col-span-2"}),c.jsxs("div",{className:"md:col-span-2 mt-4 w-full flex justify-around flex-col md:flex-row",children:[c.jsx("button",{className:"action-button md:w-40",type:"submit",children:"Update Data"}),c.jsx("button",{className:"action-button md:w-40",type:"button",onClick:i,children:"Change Password"})]})]}),c.jsxs(sp,{open:n,onClose:s,PaperProps:{component:"form",onSubmit:h(C)},classes:{paper:"dark:bg-slate-600"},children:[c.jsx(lp,{className:"text-center",children:"Change Password"}),c.jsxs(ap,{children:[c.jsx(we,{register:f,errors:v,name:"oldPassword",type:"password",pattern:{value:/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[*!@$%^&_]).{8,32}$/,message:"Your password must be 8-32 characters long and include at least one lowercase letter, one uppercase letter, one digit, and one special character."},placeholder:"Old Password","aria-label":"Old Password"}),c.jsx(we,{register:f,errors:v,name:"newPassword",type:"password",pattern:{value:/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[*!@$%^&_]).{8,32}$/,message:"Your password must be 8-32 characters long and include at least one lowercase letter, one uppercase letter, one digit, and one special character."},placeholder:"New Password","aria-label":"New Password"}),c.jsx(we,{register:f,errors:v,name:"confirmNewPassword",type:"password",placeholder:"Confirm New Password","aria-label":"Confirm New Password"})]}),c.jsxs(op,{className:"flex justify-center",children:[c.jsx("button",{className:"action-button",onClick:s,type:"button",children:"Cancel"}),c.jsx("button",{className:"action-button",type:"submit",children:"Change Password"})]})]})]})},DL=()=>{const[e,t]=k.useState(null),[n,r]=k.useState(!1),[i,s]=k.useState(null),[o,a]=k.useState(0),[l,d]=k.useState(0),[f,h]=k.useState(!1),[v,C]=k.useState(""),[w,S]=k.useState(null),P=!!w,m=I=>{S(I.currentTarget)};k.useEffect(()=>{const I=_=>{w&&!w.contains(_.target)&&S(null)};return document.addEventListener("click",I),()=>{document.removeEventListener("click",I)}},[w,P]);const g=()=>{S(null)},y=()=>{h(I=>!I)},E=I=>{C(I)},j=ct();k.useEffect(()=>{(async()=>{const[_,B]=Zh(v),z=_,R=B;try{r(!0),s(null);const H=await ka.fetchCustomerOrders({pageNumber:o,sortBy:z,sortDir:R});t(H),d(H.totalPages)}catch(H){H!=null&&typeof H=="object"&&"message"in H&&typeof H.message=="string"&&s(H.message)}finally{r(!1)}})()},[o,v]);const L=()=>{o>0&&a(I=>I-1)},M=()=>{oI+1)},O=(I,_)=>{j(`${ve}orders/${I}`,{state:{specificOrder:_}})};return c.jsxs("div",{className:"relative flex flex-col",children:[c.jsx("h2",{className:"text-center my-4",children:"Recent Orders"}),c.jsx(ex,{toggleSortDrawer:y,handleMenuOpen:m,anchorMenuEl:w,open:P,handleMenuClose:g,handleSortChange:E}),n&&c.jsxs(c.Fragment,{children:[c.jsx(Kw,{}),c.jsx(Yw,{})]}),i&&c.jsx("h2",{className:"error",children:i}),e?c.jsxs("div",{children:[c.jsx(Xw,{}),c.jsx(Zw,{orders:e,navigateToOrder:O}),c.jsx(Jw,{orders:e,navigateToOrder:O}),c.jsx(tx,{handlePrevPage:L,handleNextPage:M,currentPage:o,totalPages:l})]}):!n&&!i&&c.jsx("h1",{className:"m-auto",children:"There are no orders yet!"}),c.jsx(tm,{isOpen:f,toggleDrawer:y,onSortChange:E,sortInputs:lm})]})},lm=[{id:"createdAt_asc",label:"Order date: oldest first"},{id:"createdAt_desc",label:"Order date: newest first"},{id:"status_asc",label:"Status: pending first"},{id:"status_desc",label:"Status: declined first"},{id:"totalPrice_asc",label:"Total price: low to high"},{id:"totalPrice_desc",label:"Total price: high to low"}];function nx(e){switch(e.toLowerCase()){case"pending":return"bg-amber-300 dark:bg-yellow-500 hover:bg-amber-400 dark:hover:bg-yellow-600 transition-colors duration-300 ease-in-out active:bg-amber-300 dark:active:bg-yellow-500";case"approved":return"bg-green-300 dark:bg-green-500 hover:bg-green-400 dark:hover:bg-green-600 transition-colors duration-300 ease-in-out active:bg-green-300 dark:active:bg-green-500";case"declined":return"bg-red-300 dark:bg-red-500 hover:bg-red-400 dark:hover:bg-red-600 transition-colors duration-300 ease-in-out active:bg-red-300 dark:active:bg-red-500";default:return""}}function rx(){const e="0123456789abcdef";function t(n){let r="";for(let i=0;i{const t=ct(),[n,r]=k.useState(!1),[i,s]=k.useState(e.price),[o,a]=k.useState(e.image),[l,d]=k.useState(e.name),[f,h]=k.useState(!1),{register:v,handleSubmit:C,setValue:w,formState:{errors:S}}=yr({mode:"onBlur"}),P=()=>{r(!0)},m=()=>{r(!1)},g=()=>{r(!1),h(!0)},y=()=>{h(!1),r(!0)},E=()=>{fe.confirm("Do you want to delete this product?",async()=>{try{await rr.deleteProduct(e.id),fe.success("Product deleted successfully!"),t(-1)}catch(O){O!=null&&typeof O=="object"&&"message"in O&&typeof O.message=="string"?fe.error(O.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})},j=O=>{let I=parseFloat(O.target.value);isNaN(I)||I<1?I=1:I>99999&&(I=99999),s(I),w("price",I,{shouldValidate:!0,shouldDirty:!0})},L=O=>{const I=O.target.value;I===""?s(""):isNaN(parseFloat(I))||s(I)},M=async O=>{m(),fe.confirm("Are you sure you want to update your data? You will have to login again!",async()=>{try{await rr.updateProduct(e.id,O),fe.success("Product updated successfully!"),window.location.reload()}catch(I){I!=null&&typeof I=="object"&&"message"in I&&typeof I.message=="string"?fe.error(I.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{P()})};return c.jsxs("div",{className:"flex gap-4 mb-4",children:[c.jsx("button",{className:"bg-accent-regular text-white rounded-xl flex-1 h-10 mb-4 min-w-32 max-w-40 hover-button",onClick:P,children:"Change Product"}),c.jsx("button",{className:"bg-red-600 text-white rounded-xl flex-1 h-10 min-w-32 max-w-40 hover-button",onClick:E,children:"Delete Product"}),c.jsxs(sp,{open:n,onClose:m,PaperProps:{component:"form",onSubmit:C(M)},classes:{paper:"dark:bg-slate-600 sm:w-3/4"},children:[c.jsx(lp,{className:"text-center",children:"Update Product"}),c.jsxs(ap,{children:[c.jsx(we,{register:v,errors:S,name:"name","aria-label":"Name",minLength:2,maxLength:30,defaultValue:e.name,onChange:O=>d(O.target.value),required:!0}),c.jsx(we,{register:v,errors:S,name:"brand","aria-label":"Brand",minLength:2,maxLength:30,defaultValue:e.brand,required:!0}),c.jsx(we,{register:v,errors:S,name:"image",placeholder:"Image URL","aria-label":"Image URL",defaultValue:e.image,onChange:O=>a(O.target.value),required:!0}),c.jsx(Jh,{register:v,errors:S,name:"description",minLength:2,maxLength:512,defaultValue:e.description,required:!0}),c.jsx(we,{register:v,errors:S,name:"price","aria-label":"Price",type:"number",min:1,minLength:1,max:99999,step:.01,required:!0,value:i,onWheel:O=>O.target.blur(),onBlur:j,onChange:L,onKeyDown:Bi}),c.jsxs("div",{className:"mb-4 w-full px-4",children:[c.jsx("label",{htmlFor:"category",children:"Category"}),c.jsxs("select",{id:"category",...v("category",{required:!0}),defaultValue:e.category,children:[c.jsx("option",{value:"Laptop",children:"Laptop"}),c.jsx("option",{value:"Cellular",children:"Cellular"}),c.jsx("option",{value:"TV",children:"TV"}),c.jsx("option",{value:"Headphone",children:"Headphone"})]}),S.category&&c.jsx("span",{className:"text-red-500",children:"Category is required"})]}),c.jsx(we,{register:v,errors:S,defaultValue:e.memory,name:"memory"}),c.jsx(we,{register:v,errors:S,defaultValue:e.screenSize,name:"screenSize"}),c.jsx(we,{register:v,errors:S,defaultValue:e.batteryCapacity,name:"batteryCapacity"}),c.jsx(we,{register:v,errors:S,defaultValue:e.operatingSystem,name:"operatingSystem"}),c.jsx(we,{register:v,errors:S,defaultValue:e.color,name:"color"})]}),c.jsxs(op,{className:"flex justify-between",children:[c.jsx("button",{className:"action-button",type:"button",onClick:m,children:"Cancel"}),c.jsx("button",{className:"action-button",type:"submit",children:"Update Product"})]}),c.jsx(op,{children:c.jsx("button",{className:"action-button w-full",type:"button",onClick:g,children:"Preview"})})]}),c.jsxs(sp,{open:f,onClose:y,classes:{paper:"dark:bg-slate-600 m-0 p-0"},children:[c.jsxs(lp,{className:"text-center flex w-full justify-between",children:[c.jsx("span",{className:"text-3xl",children:"Preview"}),c.jsx("button",{className:"justify-self-end",onClick:y,children:c.jsx(Ea,{className:"size-8 transition-all duration-300 ease-in-out hover:scale-125"})})]}),c.jsx(ap,{className:"p-0",children:c.jsx(qw,{name:l,price:i,image:o,averageRating:parseFloat(e.averageRating)===0?4.9:parseFloat(e.averageRating)})})]})]})},FL=()=>c.jsxs("span",{className:"animate-pulse flex flex-col items-center",children:[c.jsxs("div",{className:"flex flex-col lg:flex-row lg:w-full justify-center items-center w-screen my-4",children:[c.jsx("div",{className:"bg-slate-300 rounded-3xl w-72 h-96 sm:w-96"}),c.jsxs("div",{className:"grid grid-cols-2 w-80 sm:w-96 gap-4 lg:gap-8 place-items-center my-4 lg:ml-16",children:[c.jsx("div",{className:"h-12 lg:h-6 w-32 sm:w-48 lg:80 bg-slate-300 rounded-lg lg:my-20"}),c.jsx("div",{className:"h-12 lg:h-6 w-32 sm:w-48 lg:80 bg-slate-300 rounded-lg lg:my-20"}),c.jsx("div",{className:"h-12 lg:h-6 w-32 sm:w-48 lg:80 bg-slate-300 rounded-lg lg:my-20"}),c.jsx("div",{className:"h-12 lg:h-6 w-32 sm:w-48 lg:80 bg-slate-300 rounded-lg lg:my-20"})]})]}),c.jsx("div",{className:"h-8 lg:h-16 w-24 lg:w-56 bg-slate-300 rounded-2xl my-4"}),c.jsx("div",{className:"h-20 w-72 sm:w-[30rem] md:w-[35rem] lg:w-[40rem] bg-slate-300 rounded-2xl my-4"}),c.jsx("div",{className:"h-8 w-36 bg-slate-300 rounded-2xl my-4"}),c.jsxs("div",{className:"flex flex-wrap gap-4 lg:gap-8 items-center justify-center lg:flex-nowrap w-64 lg:w-1/2 mb-4",children:[c.jsx("div",{className:"bg-slate-300 h-10 w-36 rounded-2xl"}),c.jsx("div",{className:"bg-slate-300 h-10 w-28 lg:w-36 rounded-2xl"}),c.jsx("div",{className:"bg-slate-300 h-10 w-28 lg:w-36 rounded-2xl"})]})]}),us=({children:e})=>c.jsx("div",{className:"gap-2 p-2 lg:flex justify-center items-center ",children:e}),BL=()=>{const{id:e}=F3(),{isAdmin:t}=k.useContext(Nn),[n,r]=k.useState(1),[i,s]=k.useState(!1),[o,a]=k.useState(!1),l=parseInt(e??"",10),[d,f]=k.useState(null),[h,v]=k.useState(!0),[C,w]=k.useState(),{increaseItemQuantity:S,getItemQuantity:P}=hi(),[m,g]=k.useState("grid-cols-2"),y=ct();if(k.useEffect(()=>{(async()=>{try{v(!0),w(void 0);const M=await rr.fetchProduct(l);f(M),(M==null?void 0:M.category.toLowerCase())==="headphone"&&g("grid-cols-1")}catch(M){M!=null&&typeof M=="object"&&"message"in M&&typeof M.message=="string"&&w(M.message)}finally{v(!1)}})()},[l]),isNaN(l))throw new Error("Invalid product id");k.useEffect(()=>{s(n<=1),a(n>=5)},[n]);const E=()=>{P(l)<5&&S(l),y(`${ve}cart`)},j=()=>{for(let L=0;L{r(L=>Math.max(L-1,1))},disabled:i,children:c.jsx(c2,{className:"text-secondary-regular dark:text-secondary-light h-full rounded-l-md"})}),c.jsx("div",{className:"w-8 text-center dark:text-white",children:n}),c.jsx("button",{className:`h-full rounded-r-md ${o?"bg-slate-300 dark:bg-gray-400":""}`,onClick:()=>{r(L=>Math.min(L+1,5))},disabled:o,children:c.jsx(l2,{className:"text-secondary-regular dark:text-secondary-light h-full rounded-r-md"})})]})]}),c.jsxs("div",{className:"flex justify-between items-center w-full lg:w-[55%] gap-4",children:[c.jsxs("button",{className:"flex flex-1 text-center justify-around items-center border bg-amber-300 text-white size-10 rounded-xl max-w-40 hover-button","aria-label":`Add ${d==null?void 0:d.name} to cart`,onClick:j,children:[c.jsx(Qc,{className:"size-8"}),"Add to cart"]}),c.jsx("button",{className:"bg-green-600 text-white rounded-xl flex-1 h-10 max-w-40 hover-button","aria-label":`Buy ${d==null?void 0:d.name} now`,onClick:E,children:"Buy now"})]})]}),t&&d&&c.jsx(zL,{product:d})]})})};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the @@ -239,11 +239,11 @@ MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. -***************************************************************************** */var pp=function(e,t){return pp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},pp(e,t)};function WL(e,t){pp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ws=function(){return Ws=Object.assign||function(t){for(var n,r=1,i=arguments.length;re?C():t!==!0&&(i=setTimeout(r?w:C,r===void 0?e-h:e))}return d.cancel=l,d}var Ao={Pixel:"Pixel",Percent:"Percent"},Ev={unit:Ao.Percent,value:.8};function Pv(e){return typeof e=="number"?{unit:Ao.Percent,value:e*100}:typeof e=="string"?e.match(/^(\d*(\.\d+)?)px$/)?{unit:Ao.Pixel,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:Ao.Percent,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),Ev):(console.warn("scrollThreshold should be string or number"),Ev)}var qL=function(e){WL(t,e);function t(n){var r=e.call(this,n)||this;return r.lastScrollTop=0,r.actionTriggered=!1,r.startY=0,r.currentY=0,r.dragging=!1,r.maxPullDownDistance=0,r.getScrollableTarget=function(){return r.props.scrollableTarget instanceof HTMLElement?r.props.scrollableTarget:typeof r.props.scrollableTarget=="string"?document.getElementById(r.props.scrollableTarget):(r.props.scrollableTarget===null&&console.warn(`You are trying to pass scrollableTarget but it is null. This might +***************************************************************************** */var fp=function(e,t){return fp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])},fp(e,t)};function VL(e,t){fp(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Wo=function(){return Wo=Object.assign||function(t){for(var n,r=1,i=arguments.length;re?C():t!==!0&&(i=setTimeout(r?w:C,r===void 0?e-h:e))}return d.cancel=l,d}var $s={Pixel:"Pixel",Percent:"Percent"},kv={unit:$s.Percent,value:.8};function Ev(e){return typeof e=="number"?{unit:$s.Percent,value:e*100}:typeof e=="string"?e.match(/^(\d*(\.\d+)?)px$/)?{unit:$s.Pixel,value:parseFloat(e)}:e.match(/^(\d*(\.\d+)?)%$/)?{unit:$s.Percent,value:parseFloat(e)}:(console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...'),kv):(console.warn("scrollThreshold should be string or number"),kv)}var UL=function(e){VL(t,e);function t(n){var r=e.call(this,n)||this;return r.lastScrollTop=0,r.actionTriggered=!1,r.startY=0,r.currentY=0,r.dragging=!1,r.maxPullDownDistance=0,r.getScrollableTarget=function(){return r.props.scrollableTarget instanceof HTMLElement?r.props.scrollableTarget:typeof r.props.scrollableTarget=="string"?document.getElementById(r.props.scrollableTarget):(r.props.scrollableTarget===null&&console.warn(`You are trying to pass scrollableTarget but it is null. This might happen because the element may not have been added to DOM yet. See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info. - `),null)},r.onStart=function(i){r.lastScrollTop||(r.dragging=!0,i instanceof MouseEvent?r.startY=i.pageY:i instanceof TouchEvent&&(r.startY=i.touches[0].pageY),r.currentY=r.startY,r._infScroll&&(r._infScroll.style.willChange="transform",r._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},r.onMove=function(i){r.dragging&&(i instanceof MouseEvent?r.currentY=i.pageY:i instanceof TouchEvent&&(r.currentY=i.touches[0].pageY),!(r.currentY=Number(r.props.pullDownToRefreshThreshold)&&r.setState({pullToRefreshThresholdBreached:!0}),!(r.currentY-r.startY>r.maxPullDownDistance*1.5)&&r._infScroll&&(r._infScroll.style.overflow="visible",r._infScroll.style.transform="translate3d(0px, "+(r.currentY-r.startY)+"px, 0px)")))},r.onEnd=function(){r.startY=0,r.currentY=0,r.dragging=!1,r.state.pullToRefreshThresholdBreached&&(r.props.refreshFunction&&r.props.refreshFunction(),r.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){r._infScroll&&(r._infScroll.style.overflow="auto",r._infScroll.style.transform="none",r._infScroll.style.willChange="unset")})},r.onScrollListener=function(i){typeof r.props.onScroll=="function"&&setTimeout(function(){return r.props.onScroll&&r.props.onScroll(i)},0);var o=r.props.height||r._scrollableNode?i.target:document.documentElement.scrollTop?document.documentElement:document.body;if(!r.actionTriggered){var s=r.props.inverse?r.isElementAtTop(o,r.props.scrollThreshold):r.isElementAtBottom(o,r.props.scrollThreshold);s&&r.props.hasMore&&(r.actionTriggered=!0,r.setState({showLoader:!0}),r.props.next&&r.props.next()),r.lastScrollTop=o.scrollTop}},r.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:n.dataLength},r.throttledOnScrollListener=GL(150,r.onScrollListener).bind(r),r.onStart=r.onStart.bind(r),r.onMove=r.onMove.bind(r),r.onEnd=r.onEnd.bind(r),r}return t.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),typeof this.props.initialScrollY=="number"&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),typeof this.props.refreshFunction!="function"))throw new Error(`Mandatory prop "refreshFunction" missing. + `),null)},r.onStart=function(i){r.lastScrollTop||(r.dragging=!0,i instanceof MouseEvent?r.startY=i.pageY:i instanceof TouchEvent&&(r.startY=i.touches[0].pageY),r.currentY=r.startY,r._infScroll&&(r._infScroll.style.willChange="transform",r._infScroll.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},r.onMove=function(i){r.dragging&&(i instanceof MouseEvent?r.currentY=i.pageY:i instanceof TouchEvent&&(r.currentY=i.touches[0].pageY),!(r.currentY=Number(r.props.pullDownToRefreshThreshold)&&r.setState({pullToRefreshThresholdBreached:!0}),!(r.currentY-r.startY>r.maxPullDownDistance*1.5)&&r._infScroll&&(r._infScroll.style.overflow="visible",r._infScroll.style.transform="translate3d(0px, "+(r.currentY-r.startY)+"px, 0px)")))},r.onEnd=function(){r.startY=0,r.currentY=0,r.dragging=!1,r.state.pullToRefreshThresholdBreached&&(r.props.refreshFunction&&r.props.refreshFunction(),r.setState({pullToRefreshThresholdBreached:!1})),requestAnimationFrame(function(){r._infScroll&&(r._infScroll.style.overflow="auto",r._infScroll.style.transform="none",r._infScroll.style.willChange="unset")})},r.onScrollListener=function(i){typeof r.props.onScroll=="function"&&setTimeout(function(){return r.props.onScroll&&r.props.onScroll(i)},0);var s=r.props.height||r._scrollableNode?i.target:document.documentElement.scrollTop?document.documentElement:document.body;if(!r.actionTriggered){var o=r.props.inverse?r.isElementAtTop(s,r.props.scrollThreshold):r.isElementAtBottom(s,r.props.scrollThreshold);o&&r.props.hasMore&&(r.actionTriggered=!0,r.setState({showLoader:!0}),r.props.next&&r.props.next()),r.lastScrollTop=s.scrollTop}},r.state={showLoader:!1,pullToRefreshThresholdBreached:!1,prevDataLength:n.dataLength},r.throttledOnScrollListener=HL(150,r.onScrollListener).bind(r),r.onStart=r.onStart.bind(r),r.onMove=r.onMove.bind(r),r.onEnd=r.onEnd.bind(r),r}return t.prototype.componentDidMount=function(){if(typeof this.props.dataLength>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(this._scrollableNode=this.getScrollableTarget(),this.el=this.props.height?this._infScroll:this._scrollableNode||window,this.el&&this.el.addEventListener("scroll",this.throttledOnScrollListener),typeof this.props.initialScrollY=="number"&&this.el&&this.el instanceof HTMLElement&&this.el.scrollHeight>this.props.initialScrollY&&this.el.scrollTo(0,this.props.initialScrollY),this.props.pullDownToRefresh&&this.el&&(this.el.addEventListener("touchstart",this.onStart),this.el.addEventListener("touchmove",this.onMove),this.el.addEventListener("touchend",this.onEnd),this.el.addEventListener("mousedown",this.onStart),this.el.addEventListener("mousemove",this.onMove),this.el.addEventListener("mouseup",this.onEnd),this.maxPullDownDistance=this._pullDown&&this._pullDown.firstChild&&this._pullDown.firstChild.getBoundingClientRect().height||0,this.forceUpdate(),typeof this.props.refreshFunction!="function"))throw new Error(`Mandatory prop "refreshFunction" missing. Pull Down To Refresh functionality will not work - as expected. Check README.md for usage'`)},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(n){this.props.dataLength!==n.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(n,r){var i=n.dataLength!==r.prevDataLength;return i?Ws(Ws({},r),{prevDataLength:n.dataLength}):null},t.prototype.isElementAtTop=function(n,r){r===void 0&&(r=.8);var i=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,o=Pv(r);return o.unit===Ao.Pixel?n.scrollTop<=o.value+i-n.scrollHeight+1:n.scrollTop<=o.value/100+i-n.scrollHeight+1},t.prototype.isElementAtBottom=function(n,r){r===void 0&&(r=.8);var i=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,o=Pv(r);return o.unit===Ao.Pixel?n.scrollTop+i>=n.scrollHeight-o.value:n.scrollTop+i>=o.value/100*n.scrollHeight},t.prototype.render=function(){var n=this,r=Ws({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),i=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),o=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return ie.createElement("div",{style:o,className:"infinite-scroll-component__outerdiv"},ie.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(s){return n._infScroll=s},style:r},this.props.pullDownToRefresh&&ie.createElement("div",{style:{position:"relative"},ref:function(s){return n._pullDown=s}},ie.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!i&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(k.Component);const KL=()=>{const e=()=>c.jsx("div",{className:"w-64 h-96 sm:w-80 sm:h-[26.25rem] bg-gray-300 rounded-3xl animate-pulse"});return c.jsx("div",{className:"flex flex-wrap justify-center items-center gap-8 py-8",children:Array.from({length:5}).map((t,n)=>c.jsx(e,{},n))})},YL=({isOpen:e,toggleDrawer:t,lastPath:n,filterCriteria:r,updateFilterCriteria:i})=>{const[o,s]=k.useState(),[a,l]=k.useState(),[d,f]=k.useState(!1),[h,v]=k.useState([0,100]),C=g=>(g=oL(g).replace(" ",""),`${g}`),w=g=>{const{checked:y,value:E,name:j}=g.target,L=C(j),M=r[L],O=y?[...M,E]:M.filter(I=>I!==E);i({...r,[L]:O})};k.useEffect(()=>{if(!e)return;(async()=>{const y={name:r.name,brand:r.brand,color:r.color,memory:r.memory,screenSize:r.screenSize,batteryCapacity:r.batteryCapacity,operatingSystem:r.operatingSystem};try{f(!0),l(void 0);const E=await Nk.fetchProductFilterOption({category:[n==="search"?"":n],...y});s(E),E.prices&&E.prices.length&&v([E.prices[0],E.prices[1]])}catch(E){E instanceof Error&&l(E.message)}finally{f(!1)}})()},[e,n,r]);const S=g=>{v(g)},P=()=>{i({...r,minPrice:h[0],maxPrice:h[1]})},m=(g,y)=>{if(!y||y.length===0||y[0]===null)return null;const E=C(g),j=r[E];return c.jsx(jv,{title:g,children:y.map(L=>L&&c.jsxs("div",{className:"flex cursor-pointer",children:[c.jsx("input",{type:"checkbox",className:"w-auto ml-2",value:L,name:g,id:L,onChange:w,checked:j.includes(L)}),c.jsx("label",{htmlFor:L,className:"pl-2 py-2",children:L})]},L))},g)};return c.jsx(bh,{open:e,onClose:t,direction:"right",lockBackgroundScroll:!0,className:"bg-slate-100 dark:bg-slate-600 min-w-[30vw] overflow-auto",children:c.jsxs("form",{className:"px-2",children:[c.jsxs("div",{className:"w-full flex justify-between items-center mt-2",children:[c.jsx("h2",{children:"Filter by"}),c.jsx("button",{onClick:t,type:"button",children:c.jsx(Ea,{className:"text-primary-regular dark:text-primary-light size-8 hover:bg-slate-400/50 hover:rounded-full"})})]}),c.jsx("hr",{className:"w-full my-2 border-t border-black dark:border-white"}),o&&c.jsxs(c.Fragment,{children:[c.jsx(jv,{title:"Price",children:c.jsx(ZL,{prices:o.prices||[],sliderValue:h,onSliderChange:S,onSubmit:P})}),d&&c.jsx(QL,{}),a&&c.jsxs("p",{className:"error",children:["Error: ",a]}),c.jsx("div",{className:"mt-2",children:!d&&!a&&c.jsxs(c.Fragment,{children:[m("Brand",o.brands),m("Color",o.colors),m("Memory",o.memories),m("Screen Size",o.screenSizes),m("Battery Capacity",o.batteryCapacities),m("Operating System",o.operatingSystems),n==="search"&&m("Category",o.categories)]})})]})]})})},XL=()=>c.jsx("div",{className:"w-[13.125rem] lg:w-[16.75rem] xl:w-96 h-10 animate-pulse rounded-md bg-gray-300 flex justify-end items-center text-white pr-4",children:"ā–¼"}),QL=()=>c.jsx("div",{className:"flex flex-col items-center gap-2",children:Array.from({length:5}).map((e,t)=>c.jsx(XL,{},t))}),jv=({title:e,children:t})=>{const[n,r]=k.useState(!1),i=k.useRef(null),o=n&&i.current?`${i.current.scrollHeight}px`:"0";k.useEffect(()=>{if(n&&i.current){const a=i.current.scrollHeight;i.current.style.maxHeight=`${a}px`}},[n,t]);const s=k.useCallback(()=>{r(a=>!a)},[]);return c.jsxs("div",{className:"mb-2 mx-3",children:[c.jsxs("button",{type:"button","aria-expanded":n,onClick:s,className:"w-full flex justify-between items-center px-4 py-2 bg-secondary-regular hover:bg-primary-regular text-white rounded-md",children:[Ii(e),c.jsx("span",{children:n?"ā–²":"ā–¼"})]}),c.jsx("div",{ref:i,className:"transition-[max-height] duration-500 ease-in-out overflow-hidden",style:{maxHeight:o},children:t})]})},ZL=({prices:e,sliderValue:t,onSliderChange:n,onSubmit:r})=>{const[i,o]=k.useMemo(()=>e.length===0?[0,1e3]:[e[0],e[1]],[e]),[s,a]=k.useState(i.toString()),[l,d]=k.useState(o.toString());k.useEffect(()=>{a(i.toString()),d(o.toString())},[i,o]);const f=(S,P)=>{const m=S.target.value;P?a(m):d(m)},h=S=>{let P=parseInt(s,10),m=parseInt(l,10);isNaN(P)||isNaN(m)||(Po&&(m=o),P>m&&(S?(P=m,a(P.toString())):(m=P,d(m.toString()))),S?(a(P.toString()),n([P,Math.max(t[1],P)])):(d(m.toString()),n([Math.min(t[0],m),m])))},v=(S,P)=>{const[m,g]=P;a(m.toString()),d(g.toString()),n([m,g])},C=S=>`${S}$`,w=S=>{S.preventDefault(),r()};return c.jsxs("div",{className:"mx-6 flex flex-col items-center",children:[c.jsxs("div",{className:"flex justify-between items-center my-4 w-full",children:[c.jsxs("div",{className:"flex flex-col items-center gap-2 flex-1",children:[c.jsx("label",{htmlFor:"minPrice",children:"From"}),c.jsx("input",{type:"number",min:i,max:o,value:s,onChange:S=>f(S,!0),onBlur:()=>h(!0),onKeyDown:Bi,className:"w-3/4 rounded-md shadow-md shadow-primary-regular dark:shadow-secondary-light",id:"minPrice"})]}),c.jsx("p",{className:"mx-2 mt-8",children:"-"}),c.jsxs("div",{className:"flex flex-col items-center gap-2 flex-1",children:[c.jsx("label",{htmlFor:"maxPrice",children:"To"}),c.jsx("input",{type:"number",min:i,max:o,value:l,onChange:S=>f(S,!1),onBlur:()=>h(!1),onKeyDown:Bi,className:"w-3/4 rounded-md shadow-md shadow-primary-regular dark:shadow-secondary-light",id:"maxPrice"})]})]}),c.jsx(QN,{getAriaLabel:()=>"Price range",value:t,onChange:v,valueLabelDisplay:"auto",getAriaValueText:C,min:i,max:o}),c.jsx("button",{className:"action-button mt-2",onClick:w,"aria-label":"Apply filtering by price",children:"Filter By Price"})]})},Tv=[{id:"price_asc",label:"Price: low to high"},{id:"price_desc",label:"Price: high to low"},{id:"name_asc",label:"Name: A to Z"},{id:"name_desc",label:"Name: Z to A"},{id:"ratings_desc",label:"Rating: high to low"}],Nv=(e,t)=>({name:t||"",brand:[],minPrice:0,maxPrice:1e4,color:[],memory:[],screenSize:[],batteryCapacity:[],operatingSystem:[],category:e==="search"?[""]:[e]}),Cs=()=>{const t=vn().pathname,n=t.substring(t.lastIndexOf("/")+1),[r]=yk(),i=r.get("name"),[o,s]=k.useState([]),[a,l]=k.useState(0),[d,f]=k.useState(1),[h,v]=k.useState(!0),[C,w]=k.useState(),[S,P]=k.useState(!1),[m,g]=k.useState(!1),[y,E]=k.useState(""),[j,L]=k.useState(!1),[M,O]=k.useState(Nv(n,i)),[I,_]=k.useState(null),B=!!I,z=ce=>{_(ce.currentTarget)},R=()=>{_(null)},H=()=>{L(ce=>!ce)},U=ce=>{E(ce)},q=()=>{g(ce=>!ce)},ee=ce=>{O(ce)},A=ce=>{ce instanceof Error&&w(ce.message),v(!1)},Y=k.useCallback(async(ce,ue,F,he=!1)=>{const[Le,_e]=Jh(F),Ae=Le,Pe=_e;try{P(!0),w(void 0);const be=await rr.fetchProducts({...n==="search"?{name:i||""}:{category:[n]},pageNumber:ce,brand:ue.brand,minPrice:ue.minPrice,maxPrice:ue.maxPrice,color:ue.color,memory:ue.memory,screenSize:ue.screenSize,batteryCapacity:ue.batteryCapacity,operatingSystem:ue.operatingSystem,sortBy:Ae,sortDir:Pe});s(ft=>he?be.products:[...ft,...be.products]),f(be.totalPages),v(!be.isLast)}catch(be){A(be)}finally{P(!1)}},[n,i]);k.useEffect(()=>{const ce=ue=>{I&&!I.contains(ue.target)&&_(null)};return document.addEventListener("click",ce),()=>{document.removeEventListener("click",ce)}},[I,B]),k.useEffect(()=>{Y(0,M,y,!0)},[Y,M,y,n,i]),k.useEffect(()=>{O(Nv(n,i)),l(0),s([]),f(1),v(!0)},[n,i]);const te=()=>{ace+1),Y(a+1,M,y)):v(!1)};return c.jsxs("div",{className:"my-8 mx-4 flex flex-col items-center",children:[c.jsxs("div",{className:"mt-4 mb-1 w-full flex justify-between",children:[c.jsx("h1",{children:n==="tv"?n.toUpperCase():Ii(n)}),c.jsxs("div",{className:"flex gap-1",children:[c.jsxs(Hs,{onClick:q,display:"md:hidden flex",ariaLabel:"Sort by",children:[c.jsx("p",{children:"Sort by"}),c.jsx(fc,{className:"text-primary-regular dark:text-primary-light"})]}),c.jsxs(Hs,{onClick:z,display:"hidden md:flex",ariaLabel:"Sort by",children:[c.jsx("p",{children:"Sort by"}),c.jsx(fc,{className:"text-primary-regular dark:text-primary-light"}),c.jsx(Lw,{anchorEl:I,open:B,onClose:R,onSortChange:U,sortInputs:Tv})]}),c.jsx(Hs,{onClick:H,ariaLabel:"Filter by",display:"flex",children:c.jsx(p5,{className:"text-primary-regular dark:text-primary-light"})})]})]}),c.jsx("hr",{className:"w-full mt-2 mb-4 border-t border-black dark:border-white"}),c.jsx(qL,{dataLength:o.length,next:te,hasMore:h,loader:c.jsx(KL,{}),children:c.jsx("div",{className:"flex justify-center mb-8",children:c.jsx("div",{className:"flex flex-[3] flex-wrap justify-center items-center gap-8",children:o.length===0&&!S?c.jsx("p",{className:"text-center mt-8",children:"There are no products"}):o.map(ce=>c.jsx(tm,{...ce},ce.id))})})}),C&&c.jsx("p",{className:"text-red-500",children:C}),c.jsx(nm,{isOpen:m,toggleDrawer:q,onSortChange:U,sortInputs:Tv}),c.jsx(YL,{isOpen:j,toggleDrawer:H,filterCriteria:M,updateFilterCriteria:ee,lastPath:n})]})},JL=()=>c.jsxs("div",{className:"grid grid-cols-2 gap-12 my-8 xl:w-full xl:flex xl:gap-0 xl:justify-around",children:[c.jsx(Xr,{to:"laptop",src:"../assets/laptop-image.png",alt:"Laptop category image",size:"size-28 sm:size-64"}),c.jsx(Xr,{to:"cellular",src:"../assets/phone-image.png",alt:"Cellulars category image",size:"size-28 sm:size-64"}),c.jsx(Xr,{to:"tv",src:"../assets/tv-image.webp",alt:"TV category image",size:"size-28 sm:size-64"}),c.jsx(Xr,{to:"headphone",src:"../assets/headphone-image.png",alt:"Headphones category image",size:"size-28 sm:size-64"})]}),e9="_products_1uzqd_1",t9="_product_1uzqd_1",Lv={products:e9,product:t9},n9=({products:e})=>c.jsx("div",{className:`${Lv.products} hidden home:grid`,children:e==null?void 0:e.map(t=>c.jsx("span",{className:`${Lv.product}`,children:c.jsx(tm,{...t})},t.id))}),r9=()=>{const e=({className:t})=>c.jsx("div",{className:`w-64 h-96 sm:w-80 sm:h-[26.25rem] rounded-3xl animate-pulse ${t}`});return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"hidden home:grid grid-cols-[repeat(9,_88.67px)] gap-2 md:gap-4",children:Array.from({length:8}).map((t,n)=>c.jsx(e,{className:n%2===0?"bg-gray-300":"bg-gray-400"},n))}),c.jsxs("div",{className:"home:hidden flex justify-center items-center gap-2 md:gap-16",children:[c.jsx(e,{className:"bg-gray-300"}),c.jsx(e,{className:"bg-gray-300 hidden sm:block"})]})]})};function _v(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function um(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:_v(t[n])&&_v(e[n])&&Object.keys(t[n]).length>0&&um(e[n],t[n])})}const sx={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function ns(){const e=typeof document<"u"?document:{};return um(e,sx),e}const i9={document:sx,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function _n(){const e=typeof window<"u"?window:{};return um(e,i9),e}function o9(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function s9(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function hp(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function kc(){return Date.now()}function a9(e){const t=_n();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function l9(e,t){t===void 0&&(t="x");const n=_n();let r,i,o;const s=a9(e);return n.WebKitCSSMatrix?(i=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(a=>a.replace(",",".")).join(", ")),o=new n.WebKitCSSMatrix(i==="none"?"":i)):(o=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=o.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?i=o.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?i=o.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function ml(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function c9(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function bn(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;nt.indexOf(o)<0);for(let o=0,s=i.length;oo?"next":"prev",f=(v,C)=>d==="next"&&v>=C||d==="prev"&&v<=C,h=()=>{a=new Date().getTime(),s===null&&(s=a);const v=Math.max(Math.min((a-s)/l,1),0),C=.5-Math.cos(v*Math.PI)/2;let w=o+C*(n-o);if(f(w,n)&&(w=n),t.wrapperEl.scrollTo({[r]:w}),f(w,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:w})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(h)};h()}function pr(e,t){return t===void 0&&(t=""),[...e.children].filter(n=>n.matches(t))}function Ec(e){try{console.warn(e);return}catch{}}function Pc(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:o9(t)),n}function u9(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function d9(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Zr(e,t){return _n().getComputedStyle(e,null).getPropertyValue(t)}function jc(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function lx(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function mp(e,t,n){const r=_n();return n?e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom")):e.offsetWidth}function Lt(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function cx(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(i=>{if(!n[i]&&n.auto===!0){let o=pr(e.el,`.${r[i]}`)[0];o||(o=Pc("div",r[i]),o.className=r[i],e.el.append(o)),n[i]=o,t[i]=o}}),n}function f9(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;n({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null};function o(w){let S;return w&&typeof w=="string"&&t.isElement&&(S=t.el.querySelector(w),S)?S:(w&&(typeof w=="string"&&(S=[...document.querySelectorAll(w)]),t.params.uniqueNavElements&&typeof w=="string"&&S&&S.length>1&&t.el.querySelectorAll(w).length===1?S=t.el.querySelector(w):S&&S.length===1&&(S=S[0])),w&&!S?w:S)}function s(w,S){const P=t.params.navigation;w=Lt(w),w.forEach(m=>{m&&(m.classList[S?"add":"remove"](...P.disabledClass.split(" ")),m.tagName==="BUTTON"&&(m.disabled=S),t.params.watchOverflow&&t.enabled&&m.classList[t.isLocked?"add":"remove"](P.lockClass))})}function a(){const{nextEl:w,prevEl:S}=t.navigation;if(t.params.loop){s(S,!1),s(w,!1);return}s(S,t.isBeginning&&!t.params.rewind),s(w,t.isEnd&&!t.params.rewind)}function l(w){w.preventDefault(),!(t.isBeginning&&!t.params.loop&&!t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function d(w){w.preventDefault(),!(t.isEnd&&!t.params.loop&&!t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function f(){const w=t.params.navigation;if(t.params.navigation=cx(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(w.nextEl||w.prevEl))return;let S=o(w.nextEl),P=o(w.prevEl);Object.assign(t.navigation,{nextEl:S,prevEl:P}),S=Lt(S),P=Lt(P);const m=(g,y)=>{g&&g.addEventListener("click",y==="next"?d:l),!t.enabled&&g&&g.classList.add(...w.lockClass.split(" "))};S.forEach(g=>m(g,"next")),P.forEach(g=>m(g,"prev"))}function h(){let{nextEl:w,prevEl:S}=t.navigation;w=Lt(w),S=Lt(S);const P=(m,g)=>{m.removeEventListener("click",g==="next"?d:l),m.classList.remove(...t.params.navigation.disabledClass.split(" "))};w.forEach(m=>P(m,"next")),S.forEach(m=>P(m,"prev"))}r("init",()=>{t.params.navigation.enabled===!1?C():(f(),a())}),r("toEdge fromEdge lock unlock",()=>{a()}),r("destroy",()=>{h()}),r("enable disable",()=>{let{nextEl:w,prevEl:S}=t.navigation;if(w=Lt(w),S=Lt(S),t.enabled){a();return}[...w,...S].filter(P=>!!P).forEach(P=>P.classList.add(t.params.navigation.lockClass))}),r("click",(w,S)=>{let{nextEl:P,prevEl:m}=t.navigation;P=Lt(P),m=Lt(m);const g=S.target;if(t.params.navigation.hideOnClick&&!m.includes(g)&&!P.includes(g)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===g||t.pagination.el.contains(g)))return;let y;P.length?y=P[0].classList.contains(t.params.navigation.hiddenClass):m.length&&(y=m[0].classList.contains(t.params.navigation.hiddenClass)),i(y===!0?"navigationShow":"navigationHide"),[...P,...m].filter(E=>!!E).forEach(E=>E.classList.toggle(t.params.navigation.hiddenClass))}});const v=()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),f(),a()},C=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),h()};Object.assign(t.navigation,{enable:v,disable:C,update:a,init:f,destroy:h})}function ks(e){return e===void 0&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function p9(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o="swiper-pagination";n({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:m=>m,formatFractionTotal:m=>m,bulletClass:`${o}-bullet`,bulletActiveClass:`${o}-bullet-active`,modifierClass:`${o}-`,currentClass:`${o}-current`,totalClass:`${o}-total`,hiddenClass:`${o}-hidden`,progressbarFillClass:`${o}-progressbar-fill`,progressbarOppositeClass:`${o}-progressbar-opposite`,clickableClass:`${o}-clickable`,lockClass:`${o}-lock`,horizontalClass:`${o}-horizontal`,verticalClass:`${o}-vertical`,paginationDisabledClass:`${o}-disabled`}}),t.pagination={el:null,bullets:[]};let s,a=0;function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&t.pagination.el.length===0}function d(m,g){const{bulletActiveClass:y}=t.params.pagination;m&&(m=m[`${g==="prev"?"previous":"next"}ElementSibling`],m&&(m.classList.add(`${y}-${g}`),m=m[`${g==="prev"?"previous":"next"}ElementSibling`],m&&m.classList.add(`${y}-${g}-${g}`)))}function f(m){const g=m.target.closest(ks(t.params.pagination.bulletClass));if(!g)return;m.preventDefault();const y=jc(g)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===y)return;t.slideToLoop(y)}else t.slideTo(y)}function h(){const m=t.rtl,g=t.params.pagination;if(l())return;let y=t.pagination.el;y=Lt(y);let E,j;const L=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,M=t.params.loop?Math.ceil(L/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(j=t.previousRealIndex||0,E=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):typeof t.snapIndex<"u"?(E=t.snapIndex,j=t.previousSnapIndex):(j=t.previousIndex||0,E=t.activeIndex||0),g.type==="bullets"&&t.pagination.bullets&&t.pagination.bullets.length>0){const O=t.pagination.bullets;let I,_,B;if(g.dynamicBullets&&(s=mp(O[0],t.isHorizontal()?"width":"height",!0),y.forEach(z=>{z.style[t.isHorizontal()?"width":"height"]=`${s*(g.dynamicMainBullets+4)}px`}),g.dynamicMainBullets>1&&j!==void 0&&(a+=E-(j||0),a>g.dynamicMainBullets-1?a=g.dynamicMainBullets-1:a<0&&(a=0)),I=Math.max(E-a,0),_=I+(Math.min(O.length,g.dynamicMainBullets)-1),B=(_+I)/2),O.forEach(z=>{const R=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(H=>`${g.bulletActiveClass}${H}`)].map(H=>typeof H=="string"&&H.includes(" ")?H.split(" "):H).flat();z.classList.remove(...R)}),y.length>1)O.forEach(z=>{const R=jc(z);R===E?z.classList.add(...g.bulletActiveClass.split(" ")):t.isElement&&z.setAttribute("part","bullet"),g.dynamicBullets&&(R>=I&&R<=_&&z.classList.add(...`${g.bulletActiveClass}-main`.split(" ")),R===I&&d(z,"prev"),R===_&&d(z,"next"))});else{const z=O[E];if(z&&z.classList.add(...g.bulletActiveClass.split(" ")),t.isElement&&O.forEach((R,H)=>{R.setAttribute("part",H===E?"bullet-active":"bullet")}),g.dynamicBullets){const R=O[I],H=O[_];for(let U=I;U<=_;U+=1)O[U]&&O[U].classList.add(...`${g.bulletActiveClass}-main`.split(" "));d(R,"prev"),d(H,"next")}}if(g.dynamicBullets){const z=Math.min(O.length,g.dynamicMainBullets+4),R=(s*z-s)/2-B*s,H=m?"right":"left";O.forEach(U=>{U.style[t.isHorizontal()?H:"top"]=`${R}px`})}}y.forEach((O,I)=>{if(g.type==="fraction"&&(O.querySelectorAll(ks(g.currentClass)).forEach(_=>{_.textContent=g.formatFractionCurrent(E+1)}),O.querySelectorAll(ks(g.totalClass)).forEach(_=>{_.textContent=g.formatFractionTotal(M)})),g.type==="progressbar"){let _;g.progressbarOpposite?_=t.isHorizontal()?"vertical":"horizontal":_=t.isHorizontal()?"horizontal":"vertical";const B=(E+1)/M;let z=1,R=1;_==="horizontal"?z=B:R=B,O.querySelectorAll(ks(g.progressbarFillClass)).forEach(H=>{H.style.transform=`translate3d(0,0,0) scaleX(${z}) scaleY(${R})`,H.style.transitionDuration=`${t.params.speed}ms`})}g.type==="custom"&&g.renderCustom?(O.innerHTML=g.renderCustom(t,E+1,M),I===0&&i("paginationRender",O)):(I===0&&i("paginationRender",O),i("paginationUpdate",O)),t.params.watchOverflow&&t.enabled&&O.classList[t.isLocked?"add":"remove"](g.lockClass)})}function v(){const m=t.params.pagination;if(l())return;const g=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let y=t.pagination.el;y=Lt(y);let E="";if(m.type==="bullets"){let j=t.params.loop?Math.ceil(g/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&j>g&&(j=g);for(let L=0;L`}m.type==="fraction"&&(m.renderFraction?E=m.renderFraction.call(t,m.currentClass,m.totalClass):E=` / `),m.type==="progressbar"&&(m.renderProgressbar?E=m.renderProgressbar.call(t,m.progressbarFillClass):E=``),t.pagination.bullets=[],y.forEach(j=>{m.type!=="custom"&&(j.innerHTML=E||""),m.type==="bullets"&&t.pagination.bullets.push(...j.querySelectorAll(ks(m.bulletClass)))}),m.type!=="custom"&&i("paginationRender",y[0])}function C(){t.params.pagination=cx(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const m=t.params.pagination;if(!m.el)return;let g;typeof m.el=="string"&&t.isElement&&(g=t.el.querySelector(m.el)),!g&&typeof m.el=="string"&&(g=[...document.querySelectorAll(m.el)]),g||(g=m.el),!(!g||g.length===0)&&(t.params.uniqueNavElements&&typeof m.el=="string"&&Array.isArray(g)&&g.length>1&&(g=[...t.el.querySelectorAll(m.el)],g.length>1&&(g=g.filter(y=>lx(y,".swiper")[0]===t.el)[0])),Array.isArray(g)&&g.length===1&&(g=g[0]),Object.assign(t.pagination,{el:g}),g=Lt(g),g.forEach(y=>{m.type==="bullets"&&m.clickable&&y.classList.add(...(m.clickableClass||"").split(" ")),y.classList.add(m.modifierClass+m.type),y.classList.add(t.isHorizontal()?m.horizontalClass:m.verticalClass),m.type==="bullets"&&m.dynamicBullets&&(y.classList.add(`${m.modifierClass}${m.type}-dynamic`),a=0,m.dynamicMainBullets<1&&(m.dynamicMainBullets=1)),m.type==="progressbar"&&m.progressbarOpposite&&y.classList.add(m.progressbarOppositeClass),m.clickable&&y.addEventListener("click",f),t.enabled||y.classList.add(m.lockClass)}))}function w(){const m=t.params.pagination;if(l())return;let g=t.pagination.el;g&&(g=Lt(g),g.forEach(y=>{y.classList.remove(m.hiddenClass),y.classList.remove(m.modifierClass+m.type),y.classList.remove(t.isHorizontal()?m.horizontalClass:m.verticalClass),m.clickable&&(y.classList.remove(...(m.clickableClass||"").split(" ")),y.removeEventListener("click",f))})),t.pagination.bullets&&t.pagination.bullets.forEach(y=>y.classList.remove(...m.bulletActiveClass.split(" ")))}r("changeDirection",()=>{if(!t.pagination||!t.pagination.el)return;const m=t.params.pagination;let{el:g}=t.pagination;g=Lt(g),g.forEach(y=>{y.classList.remove(m.horizontalClass,m.verticalClass),y.classList.add(t.isHorizontal()?m.horizontalClass:m.verticalClass)})}),r("init",()=>{t.params.pagination.enabled===!1?P():(C(),v(),h())}),r("activeIndexChange",()=>{typeof t.snapIndex>"u"&&h()}),r("snapIndexChange",()=>{h()}),r("snapGridLengthChange",()=>{v(),h()}),r("destroy",()=>{w()}),r("enable disable",()=>{let{el:m}=t.pagination;m&&(m=Lt(m),m.forEach(g=>g.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass)))}),r("lock unlock",()=>{h()}),r("click",(m,g)=>{const y=g.target,E=Lt(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&E&&E.length>0&&!y.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&y===t.navigation.nextEl||t.navigation.prevEl&&y===t.navigation.prevEl))return;const j=E[0].classList.contains(t.params.pagination.hiddenClass);i(j===!0?"paginationShow":"paginationHide"),E.forEach(L=>L.classList.toggle(t.params.pagination.hiddenClass))}});const S=()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:m}=t.pagination;m&&(m=Lt(m),m.forEach(g=>g.classList.remove(t.params.pagination.paginationDisabledClass))),C(),v(),h()},P=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:m}=t.pagination;m&&(m=Lt(m),m.forEach(g=>g.classList.add(t.params.pagination.paginationDisabledClass))),w()};Object.assign(t.pagination,{enable:S,disable:P,render:v,update:h,init:C,destroy:w})}let Bd;function h9(){const e=_n(),t=ns();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function ux(){return Bd||(Bd=h9()),Bd}let Vd;function m9(e){let{userAgent:t}=e===void 0?{}:e;const n=ux(),r=_n(),i=r.navigator.platform,o=t||r.navigator.userAgent,s={ios:!1,android:!1},a=r.screen.width,l=r.screen.height,d=o.match(/(Android);?[\s\/]+([\d.]+)?/);let f=o.match(/(iPad).*OS\s([\d_]+)/);const h=o.match(/(iPod)(.*OS\s([\d_]+))?/),v=!f&&o.match(/(iPhone\sOS|iOS)\s([\d_]+)/),C=i==="Win32";let w=i==="MacIntel";const S=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!f&&w&&n.touch&&S.indexOf(`${a}x${l}`)>=0&&(f=o.match(/(Version)\/([\d.]+)/),f||(f=[0,1,"13_0_0"]),w=!1),d&&!C&&(s.os="android",s.android=!0),(f||v||h)&&(s.os="ios",s.ios=!0),s}function dx(e){return e===void 0&&(e={}),Vd||(Vd=m9(e)),Vd}let Hd;function g9(){const e=_n(),t=dx();let n=!1;function r(){const a=e.navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}if(r()){const a=String(e.navigator.userAgent);if(a.includes("Version/")){const[l,d]=a.split("Version/")[1].split(" ")[0].split(".").map(f=>Number(f));n=l<16||l===16&&d<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),o=r(),s=o||i&&t.ios;return{isSafari:n||o,needPerspectiveFix:n,need3dFix:s,isWebView:i}}function v9(){return Hd||(Hd=g9()),Hd}function y9(e){let{swiper:t,on:n,emit:r}=e;const i=_n();let o=null,s=null;const a=()=>{!t||t.destroyed||!t.initialized||(r("beforeResize"),r("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(o=new ResizeObserver(h=>{s=i.requestAnimationFrame(()=>{const{width:v,height:C}=t;let w=v,S=C;h.forEach(P=>{let{contentBoxSize:m,contentRect:g,target:y}=P;y&&y!==t.el||(w=g?g.width:(m[0]||m).inlineSize,S=g?g.height:(m[0]||m).blockSize)}),(w!==v||S!==C)&&a()})}),o.observe(t.el))},d=()=>{s&&i.cancelAnimationFrame(s),o&&o.unobserve&&t.el&&(o.unobserve(t.el),o=null)},f=()=>{!t||t.destroyed||!t.initialized||r("orientationchange")};n("init",()=>{if(t.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",a),i.addEventListener("orientationchange",f)}),n("destroy",()=>{d(),i.removeEventListener("resize",a),i.removeEventListener("orientationchange",f)})}function w9(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const o=[],s=_n(),a=function(f,h){h===void 0&&(h={});const v=s.MutationObserver||s.WebkitMutationObserver,C=new v(w=>{if(t.__preventObserver__)return;if(w.length===1){i("observerUpdate",w[0]);return}const S=function(){i("observerUpdate",w[0])};s.requestAnimationFrame?s.requestAnimationFrame(S):s.setTimeout(S,0)});C.observe(f,{attributes:typeof h.attributes>"u"?!0:h.attributes,childList:typeof h.childList>"u"?!0:h.childList,characterData:typeof h.characterData>"u"?!0:h.characterData}),o.push(C)},l=()=>{if(t.params.observer){if(t.params.observeParents){const f=lx(t.hostEl);for(let h=0;h{o.forEach(f=>{f.disconnect()}),o.splice(0,o.length)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",l),r("destroy",d)}var x9={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const i=n?"unshift":"push";return e.split(" ").forEach(o=>{r.eventsListeners[o]||(r.eventsListeners[o]=[]),r.eventsListeners[o][i](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function i(){r.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var o=arguments.length,s=new Array(o),a=0;a=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((i,o)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[r].splice(o,1)})}),n},emit(){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,n,r;for(var i=arguments.length,o=new Array(i),s=0;s{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(d=>{d.apply(r,[l,...n])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(d=>{d.apply(r,n)})}),e}};function b9(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(Zr(r,"padding-left")||0,10)-parseInt(Zr(r,"padding-right")||0,10),n=n-parseInt(Zr(r,"padding-top")||0,10)-parseInt(Zr(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function S9(){const e=this;function t(_,B){return parseFloat(_.getPropertyValue(e.getDirectionLabel(B))||0)}const n=e.params,{wrapperEl:r,slidesEl:i,size:o,rtlTranslate:s,wrongRTL:a}=e,l=e.virtual&&n.virtual.enabled,d=l?e.virtual.slides.length:e.slides.length,f=pr(i,`.${e.params.slideClass}, swiper-slide`),h=l?e.virtual.slides.length:f.length;let v=[];const C=[],w=[];let S=n.slidesOffsetBefore;typeof S=="function"&&(S=n.slidesOffsetBefore.call(e));let P=n.slidesOffsetAfter;typeof P=="function"&&(P=n.slidesOffsetAfter.call(e));const m=e.snapGrid.length,g=e.slidesGrid.length;let y=n.spaceBetween,E=-S,j=0,L=0;if(typeof o>"u")return;typeof y=="string"&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*o:typeof y=="string"&&(y=parseFloat(y)),e.virtualSize=-y,f.forEach(_=>{s?_.style.marginLeft="":_.style.marginRight="",_.style.marginBottom="",_.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(gl(r,"--swiper-centered-offset-before",""),gl(r,"--swiper-centered-offset-after",""));const M=n.grid&&n.grid.rows>1&&e.grid;M?e.grid.initSlides(f):e.grid&&e.grid.unsetSlides();let O;const I=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(_=>typeof n.breakpoints[_].slidesPerView<"u").length>0;for(let _=0;_1&&v.push(e.virtualSize-o)}if(l&&n.loop){const _=w[0]+y;if(n.slidesPerGroup>1){const B=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),z=_*n.slidesPerGroup;for(let R=0;R!n.cssMode||n.loop?!0:z!==f.length-1).forEach(B=>{B.style[_]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let _=0;w.forEach(z=>{_+=z+(y||0)}),_-=y;const B=_-o;v=v.map(z=>z<=0?-S:z>B?B+P:z)}if(n.centerInsufficientSlides){let _=0;if(w.forEach(B=>{_+=B+(y||0)}),_-=y,_{v[R]=z-B}),C.forEach((z,R)=>{C[R]=z+B})}}if(Object.assign(e,{slides:f,snapGrid:v,slidesGrid:C,slidesSizesGrid:w}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){gl(r,"--swiper-centered-offset-before",`${-v[0]}px`),gl(r,"--swiper-centered-offset-after",`${e.size/2-w[w.length-1]/2}px`);const _=-e.snapGrid[0],B=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(z=>z+_),e.slidesGrid=e.slidesGrid.map(z=>z+B)}if(h!==d&&e.emit("slidesLengthChange"),v.length!==m&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),C.length!==g&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const _=`${n.containerModifierClass}backface-hidden`,B=e.el.classList.contains(_);h<=n.maxBackfaceHiddenSlides?B||e.el.classList.add(_):B&&e.el.classList.remove(_)}}function C9(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let i=0,o;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const s=a=>r?t.slides[t.getSlideIndexByData(a)]:t.slides[a];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(a=>{n.push(a)});else for(o=0;ot.slides.length&&!r)break;n.push(s(a))}else n.push(s(t.activeIndex));for(o=0;oi?a:i}(i||i===0)&&(t.wrapperEl.style.height=`${i}px`)}function k9(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r"u"&&t.updateSlidesOffset();let s=-e;i&&(s=e),r.forEach(l=>{l.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass)}),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=n.spaceBetween;typeof a=="string"&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:typeof a=="string"&&(a=parseFloat(a));for(let l=0;l=0&&C<=t.size-t.slidesSizesGrid[l];(C>=0&&C1&&w<=t.size||C<=0&&w>=t.size)&&(t.visibleSlides.push(d),t.visibleSlidesIndexes.push(l),r[l].classList.add(n.slideVisibleClass)),S&&r[l].classList.add(n.slideFullyVisibleClass),d.progress=i?-h:h,d.originalProgress=i?-v:v}}function P9(e){const t=this;if(typeof e>"u"){const f=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*f||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:o,isEnd:s,progressLoop:a}=t;const l=o,d=s;if(r===0)i=0,o=!0,s=!0;else{i=(e-t.minTranslate())/r;const f=Math.abs(e-t.minTranslate())<1,h=Math.abs(e-t.maxTranslate())<1;o=f||i<=0,s=h||i>=1,f&&(i=0),h&&(i=1)}if(n.loop){const f=t.getSlideIndexByData(0),h=t.getSlideIndexByData(t.slides.length-1),v=t.slidesGrid[f],C=t.slidesGrid[h],w=t.slidesGrid[t.slidesGrid.length-1],S=Math.abs(e);S>=v?a=(S-v)/w:a=(S+w-C)/w,a>1&&(a-=1)}Object.assign(t,{progress:i,progressLoop:a,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),o&&!l&&t.emit("reachBeginning toEdge"),s&&!d&&t.emit("reachEnd toEdge"),(l&&!o||d&&!s)&&t.emit("fromEdge"),t.emit("progress",i)}const Ud=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function j9(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:i}=e,o=e.virtual&&n.virtual.enabled,s=e.grid&&n.grid&&n.grid.rows>1,a=h=>pr(r,`.${n.slideClass}${h}, swiper-slide${h}`)[0];let l,d,f;if(o)if(n.loop){let h=i-e.virtual.slidesBefore;h<0&&(h=e.virtual.slides.length+h),h>=e.virtual.slides.length&&(h-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${h}"]`)}else l=a(`[data-swiper-slide-index="${i}"]`);else s?(l=t.filter(h=>h.column===i)[0],f=t.filter(h=>h.column===i+1)[0],d=t.filter(h=>h.column===i-1)[0]):l=t[i];l&&(s||(f=d9(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!f&&(f=t[0]),d=u9(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!d===0&&(d=t[t.length-1]))),t.forEach(h=>{Ud(h,h===l,n.slideActiveClass),Ud(h,h===f,n.slideNextClass),Ud(h,h===d,n.slidePrevClass)}),e.emitSlidesClasses()}const Al=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let i=r.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(r.shadowRoot?i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},Wd=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},gp=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const s=i,a=[s-t];a.push(...Array.from({length:t}).map((l,d)=>s+r+d)),e.slides.forEach((l,d)=>{a.includes(l.column)&&Wd(e,d)});return}const o=i+r-1;if(e.params.rewind||e.params.loop)for(let s=i-t;s<=o+t;s+=1){const a=(s%n+n)%n;(ao)&&Wd(e,a)}else for(let s=Math.max(i-t,0);s<=Math.min(o+t,n-1);s+=1)s!==i&&(s>o||s=t[o]&&r=t[o]&&r=t[o]&&(i=o);return n.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function N9(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:i,activeIndex:o,realIndex:s,snapIndex:a}=t;let l=e,d;const f=C=>{let w=C-t.virtual.slidesBefore;return w<0&&(w=t.virtual.slides.length+w),w>=t.virtual.slides.length&&(w-=t.virtual.slides.length),w};if(typeof l>"u"&&(l=T9(t)),r.indexOf(n)>=0)d=r.indexOf(n);else{const C=Math.min(i.slidesPerGroupSkip,l);d=C+Math.floor((l-C)/i.slidesPerGroup)}if(d>=r.length&&(d=r.length-1),l===o&&!t.params.loop){d!==a&&(t.snapIndex=d,t.emit("snapIndexChange"));return}if(l===o&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=f(l);return}const h=t.grid&&i.grid&&i.grid.rows>1;let v;if(t.virtual&&i.virtual.enabled&&i.loop)v=f(l);else if(h){const C=t.slides.filter(S=>S.column===l)[0];let w=parseInt(C.getAttribute("data-swiper-slide-index"),10);Number.isNaN(w)&&(w=Math.max(t.slides.indexOf(C),0)),v=Math.floor(w/i.grid.rows)}else if(t.slides[l]){const C=t.slides[l].getAttribute("data-swiper-slide-index");C?v=parseInt(C,10):v=l}else v=l;Object.assign(t,{previousSnapIndex:a,snapIndex:d,previousRealIndex:s,realIndex:v,previousIndex:o,activeIndex:l}),t.initialized&&gp(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(s!==v&&t.emit("realIndexChange"),t.emit("slideChange"))}function L9(e,t){const n=this,r=n.params;let i=e.closest(`.${r.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(a=>{!i&&a.matches&&a.matches(`.${r.slideClass}, swiper-slide`)&&(i=a)});let o=!1,s;if(i){for(let a=0;al?f=l:r&&es?a="next":o"u"&&(t=o.params.speed);const S=Math.min(o.params.slidesPerGroupSkip,s);let P=S+Math.floor((s-S)/o.params.slidesPerGroup);P>=l.length&&(P=l.length-1);const m=-l[P];if(a.normalizeSlideIndex)for(let y=0;y=j&&E=j&&E=j&&(s=y)}if(o.initialized&&s!==h&&(!o.allowSlideNext&&(v?m>o.translate&&m>o.minTranslate():mo.translate&&m>o.maxTranslate()&&(h||0)!==s))return!1;s!==(f||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(m);let g;if(s>h?g="next":s0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{C[y?"scrollLeft":"scrollTop"]=E})):C[y?"scrollLeft":"scrollTop"]=E,j&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1})}else{if(!o.support.smoothScroll)return ax({swiper:o,targetPosition:E,side:y?"left":"top"}),!0;C.scrollTo({[y?"left":"top"]:E,behavior:"smooth"})}return!0}return o.setTransition(t),o.setTranslate(m),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",t,r),o.transitionStart(n,g),t===0?o.transitionEnd(n,g):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(E){!o||o.destroyed||E.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,g))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0}function H9(e,t,n,r){e===void 0&&(e=0),n===void 0&&(n=!0),typeof e=="string"&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;typeof t>"u"&&(t=i.params.speed);const o=i.grid&&i.params.grid&&i.params.grid.rows>1;let s=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)s=s+i.virtual.slidesBefore;else{let a;if(o){const v=s*i.params.grid.rows;a=i.slides.filter(C=>C.getAttribute("data-swiper-slide-index")*1===v)[0].column}else a=i.getSlideIndexByData(s);const l=o?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:d}=i.params;let f=i.params.slidesPerView;f==="auto"?f=i.slidesPerViewDynamic():(f=Math.ceil(parseFloat(i.params.slidesPerView,10)),d&&f%2===0&&(f=f+1));let h=l-aC.getAttribute("data-swiper-slide-index")*1===v)[0].column}else s=i.getSlideIndexByData(s)}return requestAnimationFrame(()=>{i.slideTo(s,t,n,r)}),i}function U9(e,t,n){t===void 0&&(t=!0);const r=this,{enabled:i,params:o,animating:s}=r;if(!i||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let a=o.slidesPerGroup;o.slidesPerView==="auto"&&o.slidesPerGroup===1&&o.slidesPerGroupAuto&&(a=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return o.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)}function W9(e,t,n){t===void 0&&(t=!0);const r=this,{params:i,snapGrid:o,slidesGrid:s,rtlTranslate:a,enabled:l,animating:d}=r;if(!l||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const f=r.virtual&&i.virtual.enabled;if(i.loop){if(d&&!f&&i.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const h=a?r.translate:-r.translate;function v(m){return m<0?-Math.floor(Math.abs(m)):Math.floor(m)}const C=v(h),w=o.map(m=>v(m));let S=o[w.indexOf(C)-1];if(typeof S>"u"&&i.cssMode){let m;o.forEach((g,y)=>{C>=g&&(m=y)}),typeof m<"u"&&(S=o[m>0?m-1:m])}let P=0;if(typeof S<"u"&&(P=s.indexOf(S),P<0&&(P=r.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(P=P-r.slidesPerViewDynamic("previous",!0)+1,P=Math.max(P,0))),i.rewind&&r.isBeginning){const m=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(m,e,t,n)}else if(i.loop&&r.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(P,e,t,n)}),!0;return r.slideTo(P,e,t,n)}function G9(e,t,n){t===void 0&&(t=!0);const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function q9(e,t,n,r){t===void 0&&(t=!0),r===void 0&&(r=.5);const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);let o=i.activeIndex;const s=Math.min(i.params.slidesPerGroupSkip,o),a=s+Math.floor((o-s)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){const d=i.snapGrid[a],f=i.snapGrid[a+1];l-d>(f-d)*r&&(o+=i.params.slidesPerGroup)}else{const d=i.snapGrid[a-1],f=i.snapGrid[a];l-d<=(f-d)*r&&(o-=i.params.slidesPerGroup)}return o=Math.max(o,0),o=Math.min(o,i.slidesGrid.length-1),i.slideTo(o,e,t,n)}function K9(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex,o;const s=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;o=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?ie.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(pr(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),hp(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(pr(n,`${s}[data-swiper-slide-index="${o}"]`)[0]),hp(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var Y9={slideTo:V9,slideToLoop:H9,slideNext:U9,slidePrev:W9,slideReset:G9,slideToClosest:q9,slideToClickedSlide:K9};function X9(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const i=()=>{pr(r,`.${n.slideClass}, swiper-slide`).forEach((h,v)=>{h.setAttribute("data-swiper-slide-index",v)})},o=t.grid&&n.grid&&n.grid.rows>1,s=n.slidesPerGroup*(o?n.grid.rows:1),a=t.slides.length%s!==0,l=o&&t.slides.length%n.grid.rows!==0,d=f=>{for(let h=0;h1;d.length"u"?o=l.getSlideIndex(d.filter(R=>R.classList.contains(C.slideActiveClass))[0]):j=o;const L=r==="next"||!r,M=r==="prev"||!r;let O=0,I=0;const _=g?Math.ceil(d.length/C.grid.rows):d.length,z=(g?d[o].column:o)+(w&&typeof i>"u"?-S/2+.5:0);if(z=0;q-=1)d[q].column===U&&y.push(q)}else y.push(_-H-1)}}else if(z+S>_-m){I=Math.max(z-(_-m*2),P);for(let R=0;R{U.column===H&&E.push(q)}):E.push(H)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),M&&y.forEach(R=>{d[R].swiperLoopMoveDOM=!0,v.prepend(d[R]),d[R].swiperLoopMoveDOM=!1}),L&&E.forEach(R=>{d[R].swiperLoopMoveDOM=!0,v.append(d[R]),d[R].swiperLoopMoveDOM=!1}),l.recalcSlides(),C.slidesPerView==="auto"?l.updateSlides():g&&(y.length>0&&M||E.length>0&&L)&&l.slides.forEach((R,H)=>{l.grid.updateSlide(H,R,l.slides)}),C.watchSlidesProgress&&l.updateSlidesOffset(),n){if(y.length>0&&M){if(typeof t>"u"){const R=l.slidesGrid[j],U=l.slidesGrid[j+O]-R;a?l.setTranslate(l.translate-U):(l.slideTo(j+Math.ceil(O),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-U,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-U))}else if(i){const R=g?y.length/C.grid.rows:y.length;l.slideTo(l.activeIndex+R,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(E.length>0&&L)if(typeof t>"u"){const R=l.slidesGrid[j],U=l.slidesGrid[j-I]-R;a?l.setTranslate(l.translate-U):(l.slideTo(j-I,0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-U,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-U))}else{const R=g?E.length/C.grid.rows:E.length;l.slideTo(l.activeIndex-R,0,!1,!0)}}if(l.allowSlidePrev=f,l.allowSlideNext=h,l.controller&&l.controller.control&&!s){const R={slideRealIndex:t,direction:r,setTranslate:i,activeSlideIndex:o,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(H=>{!H.destroyed&&H.params.loop&&H.loopFix({...R,slideTo:H.params.slidesPerView===C.slidesPerView?n:!1})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...R,slideTo:l.controller.control.params.slidesPerView===C.slidesPerView?n:!1})}l.emit("loopFix")}function Z9(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(i=>{const o=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;r[o]=i}),e.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),r.forEach(i=>{n.append(i)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var J9={loopCreate:X9,loopFix:Q9,loopDestroy:Z9};function e7(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function t7(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var n7={setGrabCursor:e7,unsetGrabCursor:t7};function r7(e,t){t===void 0&&(t=this);function n(r){if(!r||r===ns()||r===_n())return null;r.assignedSlot&&(r=r.assignedSlot);const i=r.closest(e);return!i&&!r.getRootNode?null:i||n(r.getRootNode().host)}return n(t)}function Mv(e,t,n){const r=_n(),{params:i}=e,o=i.edgeSwipeDetection,s=i.edgeSwipeThreshold;return o&&(n<=s||n>=r.innerWidth-s)?o==="prevent"?(t.preventDefault(),!0):!1:!0}function i7(e){const t=this,n=ns();let r=e;r.originalEvent&&(r=r.originalEvent);const i=t.touchEventsData;if(r.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==r.pointerId)return;i.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(i.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){Mv(t,r,r.targetTouches[0].pageX);return}const{params:o,touches:s,enabled:a}=t;if(!a||!o.simulateTouch&&r.pointerType==="mouse"||t.animating&&o.preventInteractionOnTransition)return;!t.animating&&o.cssMode&&o.loop&&t.loopFix();let l=r.target;if(o.touchEventsTarget==="wrapper"&&!t.wrapperEl.contains(l)||"which"in r&&r.which===3||"button"in r&&r.button>0||i.isTouched&&i.isMoved)return;const d=!!o.noSwipingClass&&o.noSwipingClass!=="",f=r.composedPath?r.composedPath():r.path;d&&r.target&&r.target.shadowRoot&&f&&(l=f[0]);const h=o.noSwipingSelector?o.noSwipingSelector:`.${o.noSwipingClass}`,v=!!(r.target&&r.target.shadowRoot);if(o.noSwiping&&(v?r7(h,l):l.closest(h))){t.allowClick=!0;return}if(o.swipeHandler&&!l.closest(o.swipeHandler))return;s.currentX=r.pageX,s.currentY=r.pageY;const C=s.currentX,w=s.currentY;if(!Mv(t,r,C))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=C,s.startY=w,i.touchStartTime=kc(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,o.threshold>0&&(i.allowThresholdMove=!1);let S=!0;l.matches(i.focusableElements)&&(S=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&n.activeElement.blur();const P=S&&t.allowTouchMove&&o.touchStartPreventDefault;(o.touchStartForcePreventDefault||P)&&!l.isContentEditable&&r.preventDefault(),o.freeMode&&o.freeMode.enabled&&t.freeMode&&t.animating&&!o.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function o7(e){const t=ns(),n=this,r=n.touchEventsData,{params:i,touches:o,rtlTranslate:s,enabled:a}=n;if(!a||!i.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(r.touchId!==null||l.pointerId!==r.pointerId))return;let d;if(l.type==="touchmove"){if(d=[...l.changedTouches].filter(L=>L.identifier===r.touchId)[0],!d||d.identifier!==r.touchId)return}else d=l;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l);return}const f=d.pageX,h=d.pageY;if(l.preventedByNestedSwiper){o.startX=f,o.startY=h;return}if(!n.allowTouchMove){l.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(o,{startX:f,startY:h,currentX:f,currentY:h}),r.touchStartTime=kc());return}if(i.touchReleaseOnEdges&&!i.loop){if(n.isVertical()){if(ho.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else if(fo.startX&&n.translate>=n.minTranslate())return}if(t.activeElement&&l.target===t.activeElement&&l.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",l),o.previousX=o.currentX,o.previousY=o.currentY,o.currentX=f,o.currentY=h;const v=o.currentX-o.startX,C=o.currentY-o.startY;if(n.params.threshold&&Math.sqrt(v**2+C**2)"u"){let L;n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?r.isScrolling=!1:v*v+C*C>=25&&(L=Math.atan2(Math.abs(C),Math.abs(v))*180/Math.PI,r.isScrolling=n.isHorizontal()?L>i.touchAngle:90-L>i.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),typeof r.startMoving>"u"&&(o.currentX!==o.startX||o.currentY!==o.startY)&&(r.startMoving=!0),r.isScrolling||l.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let w=n.isHorizontal()?v:C,S=n.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(w=Math.abs(w)*(s?1:-1),S=Math.abs(S)*(s?1:-1)),o.diff=w,w*=i.touchRatio,s&&(w=-w,S=-S);const P=n.touchesDirection;n.swipeDirection=w>0?"prev":"next",n.touchesDirection=S>0?"prev":"next";const m=n.params.loop&&!i.cssMode,g=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(m&&g&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const L=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});n.wrapperEl.dispatchEvent(L)}r.allowMomentumBounce=!1,i.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}let y;if(new Date().getTime(),r.isMoved&&r.allowThresholdMove&&P!==n.touchesDirection&&m&&g&&Math.abs(w)>=1){Object.assign(o,{startX:f,startY:h,currentX:f,currentY:h,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=w+r.startTranslate;let E=!0,j=i.resistanceRatio;if(i.touchReleaseOnEdges&&(j=0),w>0?(m&&g&&!y&&r.allowThresholdMove&&r.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(E=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+w)**j))):w<0&&(m&&g&&!y&&r.allowThresholdMove&&r.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]:n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(i.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),r.currentTranslater.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),i.threshold>0)if(Math.abs(w)>i.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,r.currentTranslate=r.startTranslate,o.diff=n.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY;return}}else{r.currentTranslate=r.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function s7(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let i;if(r.type==="touchend"||r.type==="touchcancel"){if(i=[...r.changedTouches].filter(j=>j.identifier===n.touchId)[0],!i||i.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;i=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:s,touches:a,rtlTranslate:l,slidesGrid:d,enabled:f}=t;if(!f||!s.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&s.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}s.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const h=kc(),v=h-n.touchStartTime;if(t.allowClick){const j=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(j&&j[0]||r.target,j),t.emit("tap click",r),v<300&&h-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=kc(),hp(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||a.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let C;if(s.followFinger?C=l?t.translate:-t.translate:C=-n.currentTranslate,s.cssMode)return;if(s.freeMode&&s.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:C});return}const w=C>=-t.maxTranslate()&&!t.params.loop;let S=0,P=t.slidesSizesGrid[0];for(let j=0;j=d[j]&&C=d[j])&&(S=j,P=d[d.length-1]-d[d.length-2])}let m=null,g=null;s.rewind&&(t.isBeginning?g=s.virtual&&s.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(m=0));const y=(C-d[S])/P,E=Ss.longSwipesMs){if(!s.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(y>=s.longSwipesRatio?t.slideTo(s.rewind&&t.isEnd?m:S+E):t.slideTo(S)),t.swipeDirection==="prev"&&(y>1-s.longSwipesRatio?t.slideTo(S+E):g!==null&&y<0&&Math.abs(y)>s.longSwipesRatio?t.slideTo(g):t.slideTo(S))}else{if(!s.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(S+E):t.slideTo(S):(t.swipeDirection==="next"&&t.slideTo(m!==null?m:S+E),t.swipeDirection==="prev"&&t.slideTo(g!==null?g:S))}}function Ov(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:o}=e,s=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=s&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!a?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!s?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=r,e.params.watchOverflow&&o!==e.snapGrid&&e.checkOverflow()}function a7(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function l7(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let i;const o=e.maxTranslate()-e.minTranslate();o===0?i=0:i=(e.translate-e.minTranslate())/o,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function c7(e){const t=this;Al(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function u7(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const px=(e,t)=>{const n=ns(),{params:r,el:i,wrapperEl:o,device:s}=e,a=!!r.nested,l=t==="on"?"addEventListener":"removeEventListener",d=t;n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&i[l]("click",e.onClick,!0),r.cssMode&&o[l]("scroll",e.onScroll),r.updateOnWindowResize?e[d](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",Ov,!0):e[d]("observerUpdate",Ov,!0),i[l]("load",e.onLoad,{capture:!0})};function d7(){const e=this,{params:t}=e;e.onTouchStart=i7.bind(e),e.onTouchMove=o7.bind(e),e.onTouchEnd=s7.bind(e),e.onDocumentTouchStart=u7.bind(e),t.cssMode&&(e.onScroll=l7.bind(e)),e.onClick=a7.bind(e),e.onLoad=c7.bind(e),px(e,"on")}function f7(){px(this,"off")}var p7={attachEvents:d7,detachEvents:f7};const Iv=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function h7(){const e=this,{realIndex:t,initialized:n,params:r,el:i}=e,o=r.breakpoints;if(!o||o&&Object.keys(o).length===0)return;const s=e.getBreakpoint(o,e.params.breakpointsBase,e.el);if(!s||e.currentBreakpoint===s)return;const l=(s in o?o[s]:void 0)||e.originalParams,d=Iv(e,r),f=Iv(e,l),h=e.params.grabCursor,v=l.grabCursor,C=r.enabled;d&&!f?(i.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!d&&f&&(i.classList.add(`${r.containerModifierClass}grid`),(l.grid.fill&&l.grid.fill==="column"||!l.grid.fill&&r.grid.fill==="column")&&i.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),h&&!v?e.unsetGrabCursor():!h&&v&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(y=>{if(typeof l[y]>"u")return;const E=r[y]&&r[y].enabled,j=l[y]&&l[y].enabled;E&&!j&&e[y].disable(),!E&&j&&e[y].enable()});const w=l.direction&&l.direction!==r.direction,S=r.loop&&(l.slidesPerView!==r.slidesPerView||w),P=r.loop;w&&n&&e.changeDirection(),bn(e.params,l);const m=e.params.enabled,g=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),C&&!m?e.disable():!C&&m&&e.enable(),e.currentBreakpoint=s,e.emit("_beforeBreakpoint",l),n&&(S?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!P&&g?(e.loopCreate(t),e.updateSlides()):P&&!g&&e.loopDestroy()),e.emit("breakpoint",l)}function m7(e,t,n){if(t===void 0&&(t="window"),!e||t==="container"&&!n)return;let r=!1;const i=_n(),o=t==="window"?i.innerHeight:n.clientHeight,s=Object.keys(e).map(a=>{if(typeof a=="string"&&a.indexOf("@")===0){const l=parseFloat(a.substr(1));return{value:o*l,point:a}}return{value:a,point:a}});s.sort((a,l)=>parseInt(a.value,10)-parseInt(l.value,10));for(let a=0;a{typeof r=="object"?Object.keys(r).forEach(i=>{r[i]&&n.push(t+i)}):typeof r=="string"&&n.push(t+r)}),n}function y7(){const e=this,{classNames:t,params:n,rtl:r,el:i,device:o}=e,s=v7(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:o.android},{ios:o.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...s),i.classList.add(...t),e.emitContainerClasses()}function w7(){const e=this,{el:t,classNames:n}=e;t.classList.remove(...n),e.emitContainerClasses()}var x7={addClasses:y7,removeClasses:w7};function b7(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const i=e.slides.length-1,o=e.slidesGrid[i]+e.slidesSizesGrid[i]+r*2;e.isLocked=e.size>o}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var S7={checkOverflow:b7},vp={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function C7(e,t){return function(r){r===void 0&&(r={});const i=Object.keys(r)[0],o=r[i];if(typeof o!="object"||o===null){bn(t,r);return}if(e[i]===!0&&(e[i]={enabled:!0}),i==="navigation"&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),!(i in e&&"enabled"in o)){bn(t,r);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),bn(t,r)}}const Gd={eventsEmitter:x9,update:_9,translate:R9,transition:B9,slide:Y9,loop:J9,grabCursor:n7,events:p7,breakpoints:g7,checkOverflow:S7,classes:x7},qd={};let dm=class Cr{constructor(){let t,n;for(var r=arguments.length,i=new Array(r),o=0;o1){const f=[];return s.querySelectorAll(n.el).forEach(h=>{const v=bn({},n,{el:h});f.push(new Cr(v))}),f}const a=this;a.__swiper__=!0,a.support=ux(),a.device=dx({userAgent:n.userAgent}),a.browser=v9(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],n.modules&&Array.isArray(n.modules)&&a.modules.push(...n.modules);const l={};a.modules.forEach(f=>{f({params:n,swiper:a,extendParams:C7(n,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const d=bn({},vp,l);return a.params=bn({},d,qd,n),a.originalParams=bn({},a.params),a.passedParams=bn({},n),a.params&&a.params.on&&Object.keys(a.params.on).forEach(f=>{a.on(f,a.params.on[f])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return a.params.direction==="horizontal"},isVertical(){return a.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:n,params:r}=this,i=pr(n,`.${r.slideClass}, swiper-slide`),o=jc(i[0]);return jc(t)-o}getSlideIndexByData(t){return this.getSlideIndex(this.slides.filter(n=>n.getAttribute("data-swiper-slide-index")*1===t)[0])}recalcSlides(){const t=this,{slidesEl:n,params:r}=t;t.slides=pr(n,`.${r.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const r=this;t=Math.min(Math.max(t,0),1);const i=r.minTranslate(),s=(r.maxTranslate()-i)*t+i;r.translateTo(s,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const i=t.getSlideClasses(r);n.push({slideEl:r,classNames:i}),t.emit("_slideClass",r,i)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t,n){t===void 0&&(t="current"),n===void 0&&(n=!1);const r=this,{params:i,slides:o,slidesGrid:s,slidesSizesGrid:a,size:l,activeIndex:d}=r;let f=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let h=o[d]?Math.ceil(o[d].swiperSlideSize):0,v;for(let C=d+1;Cl&&(v=!0));for(let C=d-1;C>=0;C-=1)o[C]&&!v&&(h+=o[C].swiperSlideSize,f+=1,h>l&&(v=!0))}else if(t==="current")for(let h=d+1;h=0;h-=1)s[d]-s[h]{s.complete&&Al(t,s)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function i(){const s=t.rtlTranslate?t.translate*-1:t.translate,a=Math.min(Math.max(s,t.maxTranslate()),t.minTranslate());t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}let o;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)i(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const s=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;o=t.slideTo(s.length-1,0,!1,!0)}else o=t.slideTo(t.activeIndex,0,!1,!0);o||i()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n){n===void 0&&(n=!0);const r=this,i=r.params.direction;return t||(t=i==="horizontal"?"vertical":"horizontal"),t===i||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${i}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(o=>{t==="vertical"?o.style.width="":o.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const i=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let s=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(i()):pr(r,i())[0];return!s&&n.params.createElements&&(s=Pc("div",n.params.wrapperClass),r.append(s),pr(r,`.${n.params.slideClass}`).forEach(a=>{s.append(a)})),Object.assign(n,{el:r,wrapperEl:s,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:s,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||Zr(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||Zr(r,"direction")==="rtl"),wrongRTL:Zr(s,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(),n.attachEvents();const i=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&i.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(o=>{o.complete?Al(n,o):o.addEventListener("load",s=>{Al(n,s.target)})}),gp(n),n.initialized=!0,gp(n),n.emit("init"),n.emit("afterInit"),n}destroy(t,n){t===void 0&&(t=!0),n===void 0&&(n=!0);const r=this,{params:i,el:o,wrapperEl:s,slides:a}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),i.loop&&r.loopDestroy(),n&&(r.removeClasses(),o.removeAttribute("style"),s.removeAttribute("style"),a&&a.length&&a.forEach(l=>{l.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(l=>{r.off(l)}),t!==!1&&(r.el.swiper=null,s9(r)),r.destroyed=!0),null}static extendDefaults(t){bn(qd,t)}static get extendedDefaults(){return qd}static get defaults(){return vp}static installModule(t){Cr.prototype.__modules__||(Cr.prototype.__modules__=[]);const n=Cr.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>Cr.installModule(n)),Cr):(Cr.installModule(t),Cr)}};Object.keys(Gd).forEach(e=>{Object.keys(Gd[e]).forEach(t=>{dm.prototype[t]=Gd[e][t]})});dm.use([y9,w9]);const hx=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Vi(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function Ro(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:Vi(t[r])&&Vi(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:Ro(e[r],t[r]):e[r]=t[r]})}function mx(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function gx(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function vx(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function yx(e){e===void 0&&(e="");const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function k7(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function E7(e){let{swiper:t,slides:n,passedParams:r,changedParams:i,nextEl:o,prevEl:s,scrollbarEl:a,paginationEl:l}=e;const d=i.filter(I=>I!=="children"&&I!=="direction"&&I!=="wrapperClass"),{params:f,pagination:h,navigation:v,scrollbar:C,virtual:w,thumbs:S}=t;let P,m,g,y,E,j,L,M;i.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&f.thumbs&&!f.thumbs.swiper&&(P=!0),i.includes("controller")&&r.controller&&r.controller.control&&f.controller&&!f.controller.control&&(m=!0),i.includes("pagination")&&r.pagination&&(r.pagination.el||l)&&(f.pagination||f.pagination===!1)&&h&&!h.el&&(g=!0),i.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||a)&&(f.scrollbar||f.scrollbar===!1)&&C&&!C.el&&(y=!0),i.includes("navigation")&&r.navigation&&(r.navigation.prevEl||s)&&(r.navigation.nextEl||o)&&(f.navigation||f.navigation===!1)&&v&&!v.prevEl&&!v.nextEl&&(E=!0);const O=I=>{t[I]&&(t[I].destroy(),I==="navigation"?(t.isElement&&(t[I].prevEl.remove(),t[I].nextEl.remove()),f[I].prevEl=void 0,f[I].nextEl=void 0,t[I].prevEl=void 0,t[I].nextEl=void 0):(t.isElement&&t[I].el.remove(),f[I].el=void 0,t[I].el=void 0))};i.includes("loop")&&t.isElement&&(f.loop&&!r.loop?j=!0:!f.loop&&r.loop?L=!0:M=!0),d.forEach(I=>{if(Vi(f[I])&&Vi(r[I]))Object.assign(f[I],r[I]),(I==="navigation"||I==="pagination"||I==="scrollbar")&&"enabled"in r[I]&&!r[I].enabled&&O(I);else{const _=r[I];(_===!0||_===!1)&&(I==="navigation"||I==="pagination"||I==="scrollbar")?_===!1&&O(I):f[I]=r[I]}}),d.includes("controller")&&!m&&t.controller&&t.controller.control&&f.controller&&f.controller.control&&(t.controller.control=f.controller.control),i.includes("children")&&n&&w&&f.virtual.enabled?(w.slides=n,w.update(!0)):i.includes("virtual")&&w&&f.virtual.enabled&&(n&&(w.slides=n),w.update(!0)),i.includes("children")&&n&&f.loop&&(M=!0),P&&S.init()&&S.update(!0),m&&(t.controller.control=f.controller.control),g&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(f.pagination.el=l),h.init(),h.render(),h.update()),y&&(t.isElement&&(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-scrollbar"),a.part.add("scrollbar"),t.el.appendChild(a)),a&&(f.scrollbar.el=a),C.init(),C.updateSize(),C.setTranslate()),E&&(t.isElement&&((!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-next"),o.innerHTML=t.hostEl.constructor.nextButtonSvg,o.part.add("button-next"),t.el.appendChild(o)),(!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-prev"),s.innerHTML=t.hostEl.constructor.prevButtonSvg,s.part.add("button-prev"),t.el.appendChild(s))),o&&(f.navigation.nextEl=o),s&&(f.navigation.prevEl=s),v.init(),v.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=r.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=r.allowSlidePrev),i.includes("direction")&&t.changeDirection(r.direction,!1),(j||M)&&t.loopDestroy(),(L||M)&&t.loopCreate(),t.update()}function P7(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const n={on:{}},r={},i={};Ro(n,vp),n._emitClasses=!0,n.init=!1;const o={},s=hx.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(s.indexOf(l)>=0?Vi(e[l])?(n[l]={},i[l]={},Ro(n[l],e[l]),Ro(i[l],e[l])):(n[l]=e[l],i[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?r[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:n.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:o[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{n[l]===!0&&(n[l]={}),n[l]===!1&&delete n[l]}),{params:n,passedParams:i,rest:o,events:r}}function j7(e,t){let{el:n,nextEl:r,prevEl:i,paginationEl:o,scrollbarEl:s,swiper:a}=e;mx(t)&&r&&i&&(a.params.navigation.nextEl=r,a.originalParams.navigation.nextEl=r,a.params.navigation.prevEl=i,a.originalParams.navigation.prevEl=i),gx(t)&&o&&(a.params.pagination.el=o,a.originalParams.pagination.el=o),vx(t)&&s&&(a.params.scrollbar.el=s,a.originalParams.scrollbar.el=s),a.init(n)}function T7(e,t,n,r,i){const o=[];if(!t)return o;const s=l=>{o.indexOf(l)<0&&o.push(l)};if(n&&r){const l=r.map(i),d=n.map(i);l.join("")!==d.join("")&&s("children"),r.length!==n.length&&s("children")}return hx.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(Vi(e[l])&&Vi(t[l])){const d=Object.keys(e[l]),f=Object.keys(t[l]);d.length!==f.length?s(l):(d.forEach(h=>{e[l][h]!==t[l][h]&&s(l)}),f.forEach(h=>{e[l][h]!==t[l][h]&&s(l)}))}else e[l]!==t[l]&&s(l)}),o}const N7=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function Tc(){return Tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t{wx(n)?t.push(n):n.props&&n.props.children&&xx(n.props.children).forEach(r=>t.push(r))}),t}function L7(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return ie.Children.toArray(e).forEach(r=>{if(wx(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const i=xx(r.props.children);i.length>0?i.forEach(o=>t.push(o)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function _7(e,t,n){if(!n)return null;const r=f=>{let h=f;return f<0?h=t.length+f:h>=t.length&&(h=h-t.length),h},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:o,to:s}=n,a=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,d=[];for(let f=a;f=o&&f<=s&&d.push(t[r(f)]);return d.map((f,h)=>ie.cloneElement(f,{swiper:e,style:i,key:f.props.virtualIndex||f.key||`slide-${h}`}))}function Gs(e,t){return typeof window>"u"?k.useEffect(e,t):k.useLayoutEffect(e,t)}const $v=k.createContext(null),M7=k.createContext(null),bx=k.forwardRef(function(e,t){let{className:n,tag:r="div",wrapperTag:i="div",children:o,onSwiper:s,...a}=e===void 0?{}:e,l=!1;const[d,f]=k.useState("swiper"),[h,v]=k.useState(null),[C,w]=k.useState(!1),S=k.useRef(!1),P=k.useRef(null),m=k.useRef(null),g=k.useRef(null),y=k.useRef(null),E=k.useRef(null),j=k.useRef(null),L=k.useRef(null),M=k.useRef(null),{params:O,passedParams:I,rest:_,events:B}=P7(a),{slides:z,slots:R}=L7(o),H=()=>{w(!C)};Object.assign(O.on,{_containerClasses(Y,te){f(te)}});const U=()=>{Object.assign(O.on,B),l=!0;const Y={...O};if(delete Y.wrapperClass,m.current=new dm(Y),m.current.virtual&&m.current.params.virtual.enabled){m.current.virtual.slides=z;const te={cache:!1,slides:z,renderExternal:v,renderExternalUpdate:!1};Ro(m.current.params.virtual,te),Ro(m.current.originalParams.virtual,te)}};P.current||U(),m.current&&m.current.on("_beforeBreakpoint",H);const q=()=>{l||!B||!m.current||Object.keys(B).forEach(Y=>{m.current.on(Y,B[Y])})},ee=()=>{!B||!m.current||Object.keys(B).forEach(Y=>{m.current.off(Y,B[Y])})};k.useEffect(()=>()=>{m.current&&m.current.off("_beforeBreakpoint",H)}),k.useEffect(()=>{!S.current&&m.current&&(m.current.emitSlidesClasses(),S.current=!0)}),Gs(()=>{if(t&&(t.current=P.current),!!P.current)return m.current.destroyed&&U(),j7({el:P.current,nextEl:E.current,prevEl:j.current,paginationEl:L.current,scrollbarEl:M.current,swiper:m.current},O),s&&!m.current.destroyed&&s(m.current),()=>{m.current&&!m.current.destroyed&&m.current.destroy(!0,!1)}},[]),Gs(()=>{q();const Y=T7(I,g.current,z,y.current,te=>te.key);return g.current=I,y.current=z,Y.length&&m.current&&!m.current.destroyed&&E7({swiper:m.current,slides:z,passedParams:I,changedParams:Y,nextEl:E.current,prevEl:j.current,scrollbarEl:M.current,paginationEl:L.current}),()=>{ee()}}),Gs(()=>{N7(m.current)},[h]);function A(){return O.virtual?_7(m.current,z,h):z.map((Y,te)=>ie.cloneElement(Y,{swiper:m.current,swiperSlideIndex:te}))}return ie.createElement(r,Tc({ref:P,className:yx(`${d}${n?` ${n}`:""}`)},_),ie.createElement(M7.Provider,{value:m.current},R["container-start"],ie.createElement(i,{className:k7(O.wrapperClass)},R["wrapper-start"],A(),R["wrapper-end"]),mx(O)&&ie.createElement(ie.Fragment,null,ie.createElement("div",{ref:j,className:"swiper-button-prev"}),ie.createElement("div",{ref:E,className:"swiper-button-next"})),vx(O)&&ie.createElement("div",{ref:M,className:"swiper-scrollbar"}),gx(O)&&ie.createElement("div",{ref:L,className:"swiper-pagination"}),R["container-end"]))});bx.displayName="Swiper";const Sx=k.forwardRef(function(e,t){let{tag:n="div",children:r,className:i="",swiper:o,zoom:s,lazy:a,virtualIndex:l,swiperSlideIndex:d,...f}=e===void 0?{}:e;const h=k.useRef(null),[v,C]=k.useState("swiper-slide"),[w,S]=k.useState(!1);function P(E,j,L){j===h.current&&C(L)}Gs(()=>{if(typeof d<"u"&&(h.current.swiperSlideIndex=d),t&&(t.current=h.current),!(!h.current||!o)){if(o.destroyed){v!=="swiper-slide"&&C("swiper-slide");return}return o.on("_slideClass",P),()=>{o&&o.off("_slideClass",P)}}}),Gs(()=>{o&&h.current&&!o.destroyed&&C(o.getSlideClasses(h.current))},[o]);const m={isActive:v.indexOf("swiper-slide-active")>=0,isVisible:v.indexOf("swiper-slide-visible")>=0,isPrev:v.indexOf("swiper-slide-prev")>=0,isNext:v.indexOf("swiper-slide-next")>=0},g=()=>typeof r=="function"?r(m):r,y=()=>{S(!0)};return ie.createElement(n,Tc({ref:h,className:yx(`${v}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:y},f),s&&ie.createElement($v.Provider,{value:m},ie.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof s=="number"?s:void 0},g(),a&&!w&&ie.createElement("div",{className:"swiper-lazy-preloader"}))),!s&&ie.createElement($v.Provider,{value:m},g(),a&&!w&&ie.createElement("div",{className:"swiper-lazy-preloader"})))});Sx.displayName="SwiperSlide";const O7=({products:e})=>c.jsx(bx,{slidesPerView:1,spaceBetween:10,centeredSlides:!0,loop:!0,pagination:{clickable:!0},modules:[f9,p9],className:"mySwiper w-[96vw] home:hidden",breakpoints:{640:{slidesPerView:2,spaceBetween:10,centeredSlides:!1},950:{slidesPerView:3,spaceBetween:10,centeredSlides:!1}},children:e==null?void 0:e.map(t=>c.jsx(Sx,{className:"hover:bg-slate-300 hover:rounded-3xl flex justify-center",children:c.jsx(tm,{...t})},t.id))}),I7=()=>{const[e,t]=k.useState(),[n,r]=k.useState(),[i,o]=k.useState(!1),s=ut(),a=()=>{const l=localStorage.getItem("token");s(l?`${ve}category`:`${ve}register`)};return k.useEffect(()=>{(async()=>{try{o(!0),r(void 0);const d=await rr.fetchProductsByRating();t(d)}catch(d){d!=null&&typeof d=="object"&&"message"in d&&typeof d.message=="string"&&r(d.message)}finally{o(!1)}})()},[]),c.jsxs("div",{className:"flex flex-col items-center justify-around mx-8 text-center",children:[c.jsxs("h1",{className:"my-4",children:["Welcome to the ",c.jsx("br",{className:"sm:hidden"}),"E-commerce website!"]}),c.jsx(JL,{}),c.jsx("div",{children:c.jsxs("div",{className:"flex flex-col items-center",children:[c.jsx("h1",{className:"my-8 text-3xl",children:"Best sellers"}),n&&c.jsx("h2",{className:"error",children:n}),i&&c.jsx(r9,{}),!n&&!i&&c.jsxs(c.Fragment,{children:[c.jsx(n9,{products:(e==null?void 0:e.products)??[]}),c.jsx(O7,{products:(e==null?void 0:e.products)??[]})]})]})}),c.jsx("h2",{className:"mt-24 text-xl sm:text-2xl",children:"Step into E-commerce's world of new discoveries! Explore our latest products and find your next favorite."}),c.jsx("button",{className:"action-button w-36 h-12 my-8",onClick:a,children:"Explore"})]})},$7=()=>{const{login:e,isLoggedIn:t}=k.useContext(Nn),n=ut(),r="underline hover:text-primary-regular dark:hover:text-primary-light transition-colors duration-300 ease-in-out";k.useEffect(()=>{t&&n("/")},[t,n]);const{register:i,handleSubmit:o,formState:{errors:s}}=yr({mode:"onBlur"}),a=()=>{fe.warning("Please contact the administrator to reset your password.")},l=async d=>{try{const f=await Go.login(d);await fe.success("Logged in successfully!"),e(f.jwt),n("/")}catch(f){f!=null&&typeof f=="object"&&"message"in f&&typeof f.message=="string"?fe.error(f.message):fe.error("An unexpected error occurred. Please try again.")}};return c.jsxs(c.Fragment,{children:[c.jsx("h1",{className:"text-center my-4",children:"Sign in"}),c.jsxs("form",{onSubmit:o(l),noValidate:!0,className:"flex flex-col items-center gap-5 mx-4 md:w-1/2 md:mx-auto shadow-2xl rounded-xl p-5 text-xl",children:[c.jsx(we,{register:i,errors:s,name:"username",placeholder:"Username","aria-label":"Username",required:!0,type:"text"}),c.jsx(we,{register:i,errors:s,name:"password",type:"password",required:!0,pattern:{value:/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[*!@$%^&_]).{8,32}$/,message:"Your password must be 8-32 characters long and include at least one lowercase letter, one uppercase letter, one digit, and one special character."},placeholder:"Password","aria-label":"Password"}),c.jsx("button",{className:"action-button w-fit",type:"submit","aria-label":"Sign in",children:"Sign in"})]}),c.jsx("div",{className:"flex flex-row items-center justify-center mt-2",children:c.jsx("button",{className:"justify-self-center",onClick:a,children:c.jsx("p",{className:`text-xl ${r}`,children:"Forgot Password?"})})}),c.jsxs("p",{className:"text-center block my-8 text-xl",children:["Don't have an account?"," ",c.jsx(Je,{to:`${ve}register`,className:r,children:"Register"})]})]})},A7=()=>c.jsxs("section",{className:"flex flex-col items-center mx-4",children:[c.jsx("img",{src:"./assets/AboutUsLandscape.webp",alt:`A futuristic scene displaying interconnected electronic devices like smartphones, - tablets, laptops, monitors, and speakers, highlighted by vibrant, glowing lines and technology icons.`,className:"mt-4 md:max-h-96 md:min-w-full"}),c.jsx("h1",{className:"pb-4 my-6 text-center",children:"E-commerce - Your Gateway to the Digital Life"}),c.jsxs("article",{className:"mb-4 flex flex-col justify-evenly sm:w-4/5 lg:w-3/5",children:[c.jsxs("p",{className:"mb-4",children:["At"," ",c.jsx("span",{className:"text-primary-regular dark:text-primary-light",children:"E-commerce"}),", we're not just about gadgets; we're about"," ",c.jsx(Pr,{children:"experiences."})," From the moment you power on a device, the adventure begins. Established in the heart of the digital age, our mission is to bring you closer to the technology that powers your life."]}),c.jsx("p",{className:"mb-4",children:"We specialize in a curated collection of electronics, ranging from the latest smartphones and laptops to immersive TVs and premium headphones. Our products connect you to the world and enhance every encounter with the digital universe."}),c.jsxs("p",{children:["We're committed to providing you with the"," ",c.jsx(Pr,{children:"highest quality "}),"devices, backed by knowledgeable support that understands"," ",c.jsx(Pr,{children:"your needs."})," Whether you're a tech enthusiast or seeking the perfect entertainment setup, our team is here to help you make informed decisions."]}),c.jsx("p",{className:"mb-4",children:"Experience the blend of technology and human ingenuity."}),c.jsx("h2",{className:"text-center",children:"Welcome to E-commerce , where your digital journey awaits."})]})]}),R7=()=>{const{login:e,isLoggedIn:t}=k.useContext(Nn),[n,r]=k.useState(""),i=ut();k.useEffect(()=>{t&&i("/")},[t,i]);const{register:o,handleSubmit:s,formState:{errors:a}}=yr({mode:"onBlur"}),l=async d=>{if(d.password!==d.confirmPassword){fe.error("Password and confirm password do not match");return}try{await Go.register(d);const f=await Go.login({username:d.username,password:d.password});e(f.jwt),fe.success("Registration successful! Enjoy your stay!"),i("/")}catch(f){f instanceof Error?fe.error(f.message):fe.error("An unexpected error occurred. Please try again.")}};return c.jsxs(c.Fragment,{children:[c.jsx("h1",{className:"text-center my-4",children:"Sign up"}),c.jsx(aL,{image:n}),c.jsxs("form",{onSubmit:s(l),noValidate:!0,className:"flex flex-col items-center gap-5 mx-4 md:w-1/2 md:mx-auto shadow-2xl rounded-xl p-5 text-xl",children:[c.jsx(we,{register:o,errors:a,name:"username",type:"text",required:!0}),c.jsx(we,{register:o,errors:a,placeholder:"Image URL",name:"image",type:"text",onChange:d=>{r(d.target.value)},required:!0}),c.jsx(we,{pattern:{message:"Email must be valid",value:/^[\w.]+@([\w-]+\.)+[\w-]{2,4}$/},register:o,errors:a,name:"email",type:"text",required:!0}),c.jsx(we,{register:o,errors:a,name:"password",type:"password",required:!0,pattern:{value:/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[*!@$%^&_]).{8,32}$/,message:"Your password must be 8-32 characters long and include at least one lowercase letter, one uppercase letter, one digit, and one special character."}}),c.jsx(we,{register:o,errors:a,name:"confirmPassword",type:"password",required:!0}),c.jsx("button",{className:"action-button w-fit",type:"submit","aria-label":"Register",children:"Register"})]}),c.jsxs("p",{className:"text-center block my-8 text-xl",children:["Already have an account?"," ",c.jsx(Je,{to:`${ve}login`,className:"underline hover:text-primary-regular dark:hover:text-primary-light transition-colors duration-300 ease-in-out",children:"Login"})]})]})},D7=()=>c.jsxs("section",{className:"flex flex-col p-6 shadow-lg rounded-lg",children:[c.jsx("header",{className:"border-b border-slate-600 dark:border-slate-100 pb-4 mb-6",children:c.jsx("h1",{children:"Terms of Service"})}),c.jsxs("article",{children:[c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"1. Introduction"}),c.jsx("p",{children:"Welcome to E-commerce website! By accessing our website or using our services, you agree to be bound by these Terms of Service. If you do not agree with any part of the terms, you may not use our services."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"2. Use of Service"}),c.jsx("p",{children:"E-commerce website is an online marketplace where you can purchase a variety of electronic products, including laptops, headphones, cell phones, and televisions. Our services are provided to you subject to the terms outlined in this agreement."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"3. User Obligations"}),c.jsx("p",{children:"You agree to use our website and services in a manner consistent with all applicable laws and regulations and in accordance with the terms and conditions set out in this policy."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"4. Intellectual Property"}),c.jsx("p",{children:"All content included on the site, such as text, graphics, logos, button icons, images, and software, is the property of E-commerce website or its content suppliers and protected by international copyright laws."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"5. Disclaimer of Warranties and Limitation of Liability"}),c.jsx("p",{children:'Our services are provided "as is" without warranty of any kind, either express or implied. We do not guarantee that our services will be uninterrupted or error-free.'})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"6. Changes to Terms"}),c.jsx("p",{children:"We reserve the right, at our discretion, to update or revise these terms. Please check the terms periodically for changes."})]})]})]}),z7=()=>c.jsxs("section",{className:"flex flex-col p-6 shadow-lg rounded-lg",children:[c.jsx("header",{className:"border-b border-slate-600 dark:border-slate-100 pb-4 mb-6",children:c.jsx("h1",{children:"Privacy Policy"})}),c.jsxs("article",{children:[c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"1. Introduction"}),c.jsx("p",{children:"Your privacy is important to us. This Privacy Policy explains how we collect, use, protect, and disclose information and data when you use E-commerce website and services."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"2. Information We Collect"}),c.jsx("p",{children:"We collect information in two ways: information you provide directly to us, and information we collect automatically through our services. This may include personal details such as your name, email address, and transaction details."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"3. Use of Information"}),c.jsx("p",{children:"The information we collect is used to provide, maintain, and improve our services, to communicate with you, and to enhance your experience."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"4. Sharing of Information"}),c.jsx("p",{children:"We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our website, conducting our business, or servicing you, so long as those parties agree to keep this information confidential."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"5. Security"}),c.jsx("p",{children:"We implement a variety of security measures to maintain the safety of your personal information when you enter, submit, or access your personal information."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"6. Changes to this Privacy Policy"}),c.jsx("p",{children:"We may update this policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"7. Contact Us"}),c.jsxs("p",{children:["If you have any questions about this Privacy Policy, please contact usĀ ",c.jsx(Je,{to:`${ve}contact-us`,className:"underline hover:dark:text-accent-light hover:text-accent-regular","aria-label":"Contact us via the contact page",children:"here"}),"."]})]})]})]}),F7=()=>{const{register:e,handleSubmit:t,reset:n,formState:{errors:r}}=yr({mode:"onBlur"}),i=()=>{n(),fe.success("Your message has been sent successfully! We will get back to you soon.")};return c.jsxs("div",{className:"flex flex-col items-center text-center mx-4 px-4",children:[c.jsx("h1",{className:"my-4",children:"Get In Touch"}),c.jsx("p",{className:"mb-4",children:"We love to hear from you. Our friendly team is always here to contact with you."}),c.jsx("p",{className:"mb-4",children:"Should you wish to reach out to us directly, please feel free to use the following email address: maksim.mirkin@gmail.com."}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:flex sm:flex-row sm:justify-evenly sm:w-full my-8",children:[c.jsx(Je,{to:"https://www.linkedin.com/in/maksim-mirkin/",target:"_blank","aria-label":"LinkedIn",children:c.jsx("img",{src:Ow,alt:"LinkedIn icon",className:"h-24"})}),c.jsxs(Je,{to:"https://github.com/Maksim-Mirkin",target:"_blank","aria-label":"GitHub",children:[c.jsx("img",{src:uL,alt:"GitHub icon",className:"h-24 dark:hidden"}),c.jsx("img",{src:_w,alt:"GitHub icon",className:"h-24 hidden dark:block"})]}),c.jsx(Je,{to:"https://www.instagram.com/",target:"_blank","aria-label":"Instagram",children:c.jsx("img",{src:Mw,alt:"Instagram icon",className:"h-24"})}),c.jsxs(Je,{to:"https://twitter.com/",target:"_blank","aria-label":"Twitter",children:[c.jsx("img",{src:dL,alt:"Twitter icon",className:"h-24 dark:hidden"}),c.jsx("img",{src:Iw,alt:"Twitter icon",className:"h-24 hidden dark:block"})]})]}),c.jsxs("div",{className:"border border-black dark:border-white w-4/5 mb-4 rounded-xl shadow-xl p-4",children:[c.jsx("h1",{className:"text-2xl md:text-3xl md:my-4",children:"Send Message"}),c.jsxs("form",{onSubmit:t(i),noValidate:!0,className:"flex flex-col items-center w-full",children:[c.jsxs("div",{className:"md:flex md:justify-between w-full mb-4",children:[c.jsx(we,{register:e,errors:r,name:"name",placeholder:"Name",type:"text"}),c.jsx(we,{register:e,errors:r,name:"phone",placeholder:"Phone",type:"text",pattern:/^05\d{8}$/gm,onKeyDown:Bi})]}),c.jsx(we,{register:e,errors:r,name:"email",placeholder:"Email",type:"text"}),c.jsx(em,{register:e,errors:r,name:"message",placeholder:"Your Message"}),c.jsx("button",{type:"submit",className:"action-button my-4",children:c.jsx("span",{className:"drop-shadow-text",children:"Send"})})]})]})]})},B7=()=>{const{user:e,isAdmin:t}=k.useContext(Nn),n="border flex gap-2 items-center h-12 px-2 md:flex-1 md:border md:rounded-lg md:mx-2 md:my-2 md:py-2 md:justify-center hover:bg-primary-regular dark:hover:text-white hover:text-white transition-colors duration-300 ease-in-out",r=`${n} bg-primary-regular text-white`,i=`${n} text-primary-regular dark:text-primary-light`;return c.jsx("div",{children:e?c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-col md:flex-row",children:[c.jsxs(sl,{to:`${ve}account/user`,className:({isActive:o})=>o?r:i,children:[c.jsx(Sh,{}),"Personal Data"]}),c.jsxs(sl,{to:`${ve}account/orders`,className:({isActive:o})=>o?r:i,children:[c.jsx(c5,{}),"Recent Orders"]}),t&&c.jsxs(sl,{to:`${ve}account/all-orders`,className:({isActive:o})=>o?r:i,children:[c.jsx(u5,{}),"All Orders"]}),t&&c.jsxs(sl,{to:`${ve}account/add-product`,className:({isActive:o})=>o?r:i,children:[c.jsx(v5,{}),"Add Product"]})]}),c.jsx(Xc,{})]}):c.jsx(zL,{})})},V7=()=>{const t=vn().pathname!==`${ve}category`;return c.jsx(c.Fragment,{children:t?c.jsx(Xc,{}):c.jsxs("div",{className:"h-4/5 flex flex-col sm:grid grid-cols-2 place-items-center gap-y-12 md:mx-24 lg:mx-40 xl:mx-80 my-12",children:[c.jsx(Xr,{to:"laptop",src:"../assets/laptop-image.png",alt:"Laptop category image",label:"Laptop",size:"size-64"}),c.jsx(Xr,{to:"cellular",src:"../assets/phone-image.png",alt:"Cellulars category image",label:"Cellulars",size:"size-64"}),c.jsx(Xr,{to:"tv",src:"../assets/tv-image.webp",alt:"TV category image",label:"TV",size:"size-64"}),c.jsx(Xr,{to:"headphone",src:"../assets/headphone-image.png",alt:"Headphones category image",label:"Headphones",size:"size-64"})]})})},H7=()=>{const e=Yc(),t=ut();let n="";return e instanceof Error?n=e.message:typeof e=="string"?n=e:Wc(e)&&(n=`${e.data} ${e.status} ${e.statusText}`),c.jsxs("div",{className:"flex flex-col justify-evenly items-center bg-slate-100 dark:bg-slate-600 h-screen ",children:[c.jsx("h1",{className:"text-red-500",children:"Oops!"}),c.jsx("img",{src:`${ve}/assets/sad-robot.png`,alt:"Sad robot"}),c.jsx("h2",{className:"text-red-500 mx-8",children:n}),c.jsxs("div",{className:"flex justify-between w-64",children:[c.jsx("button",{onClick:()=>t(-1),className:"action-button","aria-label":"Go back to the previous page",children:"Go Back"}),c.jsx("button",{onClick:()=>t("/"),className:"action-button","aria-label":"Go to the home page",children:"Go Home"})]})]})},U7=()=>{const e=Yc(),t=ut();let n="";return e instanceof Error?n=e.message:typeof e=="string"?n=e:Wc(e)&&(n=`${e.data} ${e.status} ${e.statusText}`),c.jsxs("div",{className:"flex flex-col justify-evenly items-center bg-slate-100 dark:bg-slate-600 h-screen ",children:[c.jsx("h1",{className:"text-red-500",children:"Oops!"}),c.jsx("img",{src:`${ve}/assets/sad-robot.png`,alt:"Sad robot"}),c.jsx("h2",{className:"text-red-500 mx-8",children:"404 - Not Found"}),n&&c.jsx("p",{className:"text-red-500",children:n}),c.jsxs("div",{className:"flex justify-between w-64",children:[c.jsx("button",{onClick:()=>t(-1),className:"action-button","aria-label":"Go back to the previous page",children:"Go Back"}),c.jsx("button",{onClick:()=>t("/"),className:"action-button","aria-label":"Go to the home page",children:"Go Home"})]})]})},W7=()=>{const{cartItems:e}=hi(),[t,n]=k.useState(0),r=10;return k.useEffect(()=>{(async()=>{const o=await Promise.all(e.map(async s=>(await rr.fetchProduct(s.id)).price*s.quantity)).then(s=>s.reduce((a,l)=>a+l,0));n(o)})()},[e]),e.length===0?(fe.warning("Your cart is empty. Please add some items to continue shopping."),c.jsx(wh,{to:`${ve}login`,replace:!0})):c.jsxs("div",{className:"flex",children:[c.jsxs("div",{className:"py-4 relative flex-1",children:[c.jsxs("div",{className:"hidden lg:flex justify-around mr-4 text-center sticky top-0 z-50 bg-transparent",children:[c.jsx("h2",{className:"w-96",children:"Product"}),c.jsx("h2",{className:"w-16",children:"Quantity"}),c.jsx("h2",{className:"w-16 pl-3",children:"Price"}),c.jsx("h2",{className:"w-16",children:"Subtotal"})]}),c.jsx("div",{className:"flex flex-col gap-4",children:e.map(i=>c.jsx(t5,{...i},i.id))}),c.jsxs("div",{className:"lg:hidden border-t border-black sticky bottom-0 mt-4 flex flex-col gap-2 justify-center items-center bg-slate-100 dark:bg-slate-700",children:[c.jsxs("div",{children:[c.jsxs("h3",{className:"text-2xl",children:["Subtotal: ",t.toFixed(2),"$"]}),c.jsxs("h3",{className:"text-2xl",children:["Delivery: ",r,"$"]})]}),c.jsxs("h1",{children:["Total: ",t.toFixed(2),"$"]}),c.jsx(Je,{to:"/order",className:"action-button text-center mb-0 w-fit",children:"Continue with payment"}),c.jsxs("div",{className:"flex gap-2 items-center pb-2 dark:text-white",children:[c.jsx(y0,{className:"size-5"}),"Secure payment"]})]})]}),c.jsxs("div",{className:"hidden lg:block border-2 border-black w-fit sticky h-fit mt-4 mr-8 top-2",children:[c.jsx("h2",{className:"text-center",children:"Total"}),c.jsx("hr",{className:"border border-black"}),c.jsxs("div",{className:"px-4 flex flex-col gap-2",children:[c.jsxs("h3",{children:["Subtotal: ",t.toFixed(2),"$"]}),c.jsxs("h3",{children:["Delivery: ",r,"$"]}),c.jsxs("h2",{children:["Total: ",(t+r).toFixed(2),"$"]}),c.jsx(Je,{to:`${ve}order`,className:"action-button text-center mb-0",children:"Continue with payment"}),c.jsxs("div",{className:"flex gap-2 items-center justify-center pb-2 dark:text-white",children:[c.jsx(y0,{className:"size-5"}),"Secure payment"]})]})]})]})},G7=()=>c.jsx("div",{className:"bg-slate-300 animate-pulse w-64 sm:w-96 h-40 rounded-xl"}),q7=({id:e,quantity:t})=>{const[n,r]=k.useState(null),[i,o]=k.useState(!1),[s,a]=k.useState(),l=ut(),d=()=>{l(`${ve}products/${e}`)};return k.useEffect(()=>{(async()=>{try{o(!0),a(void 0);const h=await rr.fetchProduct(e);r(h)}catch(h){h!=null&&typeof h=="object"&&"message"in h&&typeof h.message=="string"&&a(h.message)}finally{o(!1)}})()},[e]),i?c.jsx(G7,{}):s?c.jsx("div",{children:s}):n===null?null:c.jsxs("div",{className:"flex items-center w-fit hover:scale-105",onClick:d,children:[c.jsx("img",{src:n.image,alt:n.name,className:"h-40 w-40 object-scale-down"}),c.jsxs("div",{className:"w-40 sm:w-fit",children:[c.jsx("h2",{children:n.name}),c.jsxs("p",{children:["Quantity: ",t]})]})]})},K7=()=>{const{register:e,handleSubmit:t,reset:n,formState:{errors:r},setValue:i}=yr({mode:"onBlur"}),{cartItems:o,removeItem:s}=hi(),[a,l]=k.useState("Cash"),d=ut();k.useEffect(()=>{const h=()=>{document.querySelectorAll("input").forEach(C=>{C.value&&i(C.name,C.value)})};return window.addEventListener("input",h),()=>{window.removeEventListener("input",h)}},[i]);const f=h=>{if(a==="creditCard")return fe.error("Credit Card payment is not available at the moment. We apologize for the inconvenience. Please try again later.");fe.confirm("Is everything correct? Shall we go ahead and place your order?",async()=>{const C={orderItems:o.map(w=>({productId:w.id,quantity:w.quantity})),...h};try{await ka.createOrder(C),fe.success("Order created successfully!"),n(),o.forEach(w=>s(w.id)),d(`${ve}account/orders`)}catch(w){w!=null&&typeof w=="object"&&"message"in w&&typeof w.message=="string"?fe.error(w.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})};return c.jsxs(c.Fragment,{children:[c.jsx("h1",{className:"text-center my-4",children:"Your Order"}),c.jsxs("div",{className:"flex flex-col md:flex-row justify-around items-center md:items-start",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("h2",{className:"text-center mb-4",children:"Order Summary"}),c.jsx("div",{children:o.map((h,v)=>c.jsxs("div",{className:"mx-4 w-full",children:[c.jsx(q7,{...h}),v===o.length-1?null:c.jsx("hr",{className:"my-2 border border-gray-300 mr-4"})]},h.id))})]}),c.jsxs("form",{className:"flex flex-col gap-2 items-center",noValidate:!0,onSubmit:t(f),children:[c.jsx("h2",{className:"text-center mb-4",children:"Order Details"}),c.jsx(we,{register:e,errors:r,name:"address",required:!0}),c.jsx(we,{register:e,errors:r,name:"city",required:!0}),c.jsx(we,{register:e,errors:r,name:"phoneNumber",type:"number",pattern:{value:/^05\d{8}$/gm,message:"Phone number must be 10 digits and start with 05"},onKeyDown:Bi,required:!0}),c.jsx(we,{register:e,errors:r,name:"postalCode",type:"number",pattern:{value:/^\d{7}$/gm,message:"Postal code must be 7 digits"},onKeyDown:Bi,required:!0}),c.jsxs("div",{className:"px-4 w-full mb-4",children:[c.jsx("label",{htmlFor:"paymentInformation",children:"Payment Information"}),c.jsxs("select",{id:"paymentInformation",...e("paymentInformation",{required:"Payment Information is required"}),value:a,onChange:h=>l(h.target.value),children:[c.jsx("option",{value:"Cash",children:"Cash"}),c.jsx("option",{value:"creditCard",children:"Credit Card"})]}),r.paymentInformation&&c.jsx("span",{className:"text-red-500",children:"Payment Information is required"})]}),a==="creditCard"&&c.jsxs(c.Fragment,{children:[c.jsx(we,{register:e,errors:r,name:"creditCardNumber",value:"Not Available",disabled:!0}),c.jsx(we,{register:e,errors:r,name:"creditCardName",value:"Not Available",disabled:!0}),c.jsx(we,{register:e,errors:r,name:"expirationDate",value:"Not Available",disabled:!0}),c.jsx(we,{register:e,errors:r,name:"CVV",value:"Not Available",disabled:!0})]}),c.jsx("button",{className:"action-button",type:"submit",children:"Submit Order"})]})]})]})},Y7=()=>{const e=vn(),t=ut(),{specificOrder:n}=e.state,r=async o=>{fe.confirm("Do you want to change the rating of this product?",async()=>{try{await Pd.postRating(o),fe.success("Rating updated successfully!")}catch(s){s!=null&&typeof s=="object"&&"message"in s&&typeof s.message=="string"?fe.error(s.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})},i=async o=>{fe.confirm("Do you want to change the rating of this product?",async()=>{try{await Pd.updateRating(o),fe.success("Rating updated successfully!")}catch(s){s!=null&&typeof s=="object"&&"message"in s&&typeof s.message=="string"?fe.error(s.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})};return c.jsxs("div",{className:"relative",children:[c.jsx("button",{className:"absolute -top-2 left-2 z-50",onClick:()=>t(-1),"aria-label":"Go back",children:c.jsx(g5,{className:"size-12 text-primary-regular dark:text-primary-light hover:scale-125"})}),n&&c.jsxs("div",{children:[c.jsxs("h2",{className:"text-center my-4",children:["Order ID: ",n.id]}),c.jsx("div",{className:"md:flex flex-wrap md:justify-center",children:n.items.map(o=>{const[s,a]=k.useState(0),l=async()=>{try{const f=(await Pd.fetchRatingByProductId(o.product.id)).rating;a(f)}catch(f){f!=null&&typeof f=="object"&&"status"in f&&f.status===404?console.clear():f!=null&&typeof f=="object"&&"message"in f&&typeof f.message=="string"&&fe.error(f.message)}};k.useEffect(()=>{l()},[]);const{control:d}=yr({mode:"onChange",defaultValues:{rating:s.toString()}});return c.jsx("div",{className:`flex flex-col mb-4 mx-2 items-center border border-primary-regular dark:border-white - shadow-lg shadow-primary-regular dark:shadow-white rounded-2xl hover:bg-slate-200 dark:hover:bg-slate-600 cursor-pointer`,onClick:f=>{f.stopPropagation(),t(`${ve}products/${o.product.id}`)},children:c.jsxs("div",{className:"flex flex-col",children:[c.jsx("img",{src:o.product.image,alt:o.product.name,className:"size-64 object-scale-down mx-auto mb-2"}),c.jsxs("div",{className:"flex items-center gap-2 px-2",children:[c.jsxs("h2",{children:["Product: ",o.product.name]}),c.jsxs("p",{className:"text-xl",children:["x",o.quantity]})]}),c.jsxs("h2",{className:"px-2",children:["Subtotal: ",o.subTotal,"$"]}),c.jsxs("div",{className:"self-center mb-4 mt-2 flex gap-2 items-center",children:[c.jsx("h2",{children:"Your rating:"}),c.jsx(SL,{name:"rating",control:d,defaultValue:o.product.averageRating,rules:{required:!0},render:()=>c.jsx(Pw,{name:"rating",size:"large",value:s,onClick:f=>{f.stopPropagation()},onChange:(f,h)=>{s>0?i({productId:o.product.id,rating:(h==null?void 0:h.toString())??"0"}):r({productId:o.product.id,rating:(h==null?void 0:h.toString())??"0"})},sx:{"& .MuiRating-iconFilled":{color:"#FBBF24"}}})})]})]})},o.id)})})]},n.id)]})},X7=[{path:`${ve}`,element:c.jsx(hL,{}),errorElement:c.jsx(mL,{}),children:[{index:!0,element:c.jsx(I7,{})},{path:"category",element:c.jsx(en,{children:c.jsx(V7,{})}),children:[{path:"laptop",element:c.jsx(en,{children:c.jsx(Cs,{})})},{path:"cellular",element:c.jsx(en,{children:c.jsx(Cs,{})})},{path:"tv",element:c.jsx(en,{children:c.jsx(Cs,{})})},{path:"headphone",element:c.jsx(en,{children:c.jsx(Cs,{})})},{path:"search",element:c.jsx(en,{children:c.jsx(Cs,{})})}]},{path:"products/:id",element:c.jsx(en,{children:c.jsx(UL,{})}),errorElement:c.jsx(H7,{})},{path:"login",element:c.jsx($7,{})},{path:"register",element:c.jsx(R7,{})},{path:"about",element:c.jsx(A7,{})},{path:"terms",element:c.jsx(D7,{})},{path:"privacy-policy",element:c.jsx(z7,{})},{path:"contact-us",element:c.jsx(F7,{})},{path:"account",element:c.jsx(en,{children:c.jsx(B7,{})}),children:[{path:"user",element:c.jsx(en,{children:c.jsx(FL,{})})},{path:"orders",element:c.jsx(en,{children:c.jsx(BL,{})})},{path:"all-orders",element:c.jsx(en,{children:c.jsx(RL,{})})},{path:"add-product",element:c.jsx(en,{children:c.jsx(IL,{})})}]},{path:"cart",element:c.jsx(en,{children:c.jsx(W7,{})})},{path:"order",element:c.jsx(en,{children:c.jsx(K7,{})})},{path:"orders/:id",element:c.jsx(en,{children:c.jsx(Y7,{})})},{path:"*",element:c.jsx(U7,{})}]},{path:"/",element:c.jsx(wh,{to:`${ve}`,replace:!0})}],Q7=document.getElementById("root"),Z7=Y1(Q7);Z7.render(c.jsx(c.Fragment,{children:c.jsx(w5,{children:c.jsx(b5,{children:c.jsx(Jk,{children:c.jsx(fk,{children:c.jsx(rk,{children:X7.map((e,t)=>c.jsx(r2,{path:e.path,element:e.element},t))})})})})})})); + as expected. Check README.md for usage'`)},t.prototype.componentWillUnmount=function(){this.el&&(this.el.removeEventListener("scroll",this.throttledOnScrollListener),this.props.pullDownToRefresh&&(this.el.removeEventListener("touchstart",this.onStart),this.el.removeEventListener("touchmove",this.onMove),this.el.removeEventListener("touchend",this.onEnd),this.el.removeEventListener("mousedown",this.onStart),this.el.removeEventListener("mousemove",this.onMove),this.el.removeEventListener("mouseup",this.onEnd)))},t.prototype.componentDidUpdate=function(n){this.props.dataLength!==n.dataLength&&(this.actionTriggered=!1,this.setState({showLoader:!1}))},t.getDerivedStateFromProps=function(n,r){var i=n.dataLength!==r.prevDataLength;return i?Wo(Wo({},r),{prevDataLength:n.dataLength}):null},t.prototype.isElementAtTop=function(n,r){r===void 0&&(r=.8);var i=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,s=Ev(r);return s.unit===$s.Pixel?n.scrollTop<=s.value+i-n.scrollHeight+1:n.scrollTop<=s.value/100+i-n.scrollHeight+1},t.prototype.isElementAtBottom=function(n,r){r===void 0&&(r=.8);var i=n===document.body||n===document.documentElement?window.screen.availHeight:n.clientHeight,s=Ev(r);return s.unit===$s.Pixel?n.scrollTop+i>=n.scrollHeight-s.value:n.scrollTop+i>=s.value/100*n.scrollHeight},t.prototype.render=function(){var n=this,r=Wo({height:this.props.height||"auto",overflow:"auto",WebkitOverflowScrolling:"touch"},this.props.style),i=this.props.hasChildren||!!(this.props.children&&this.props.children instanceof Array&&this.props.children.length),s=this.props.pullDownToRefresh&&this.props.height?{overflow:"auto"}:{};return ie.createElement("div",{style:s,className:"infinite-scroll-component__outerdiv"},ie.createElement("div",{className:"infinite-scroll-component "+(this.props.className||""),ref:function(o){return n._infScroll=o},style:r},this.props.pullDownToRefresh&&ie.createElement("div",{style:{position:"relative"},ref:function(o){return n._pullDown=o}},ie.createElement("div",{style:{position:"absolute",left:0,right:0,top:-1*this.maxPullDownDistance}},this.state.pullToRefreshThresholdBreached?this.props.releaseToRefreshContent:this.props.pullDownToRefreshContent)),this.props.children,!this.state.showLoader&&!i&&this.props.hasMore&&this.props.loader,this.state.showLoader&&this.props.hasMore&&this.props.loader,!this.props.hasMore&&this.props.endMessage))},t}(k.Component);const WL=()=>{const e=()=>c.jsx("div",{className:"w-64 h-96 sm:w-80 sm:h-[26.25rem] bg-gray-300 rounded-3xl animate-pulse"});return c.jsx("div",{className:"flex flex-wrap justify-center items-center gap-8 py-8",children:Array.from({length:5}).map((t,n)=>c.jsx(e,{},n))})},GL=({isOpen:e,toggleDrawer:t,lastPath:n,filterCriteria:r,updateFilterCriteria:i})=>{const[s,o]=k.useState(),[a,l]=k.useState(),[d,f]=k.useState(!1),[h,v]=k.useState([0,100]),C=g=>(g=nL(g).replace(" ",""),`${g}`),w=g=>{const{checked:y,value:E,name:j}=g.target,L=C(j),M=r[L],O=y?[...M,E]:M.filter(I=>I!==E);i({...r,[L]:O})};k.useEffect(()=>{if(!e)return;(async()=>{const y={name:r.name,brand:r.brand,color:r.color,memory:r.memory,screenSize:r.screenSize,batteryCapacity:r.batteryCapacity,operatingSystem:r.operatingSystem};try{f(!0),l(void 0);const E=await Pk.fetchProductFilterOption({category:[n==="search"?"":n],...y});o(E),E.prices&&E.prices.length&&v([E.prices[0],E.prices[1]])}catch(E){E instanceof Error&&l(E.message)}finally{f(!1)}})()},[e,n,r]);const S=g=>{v(g)},P=()=>{i({...r,minPrice:h[0],maxPrice:h[1]})},m=(g,y)=>{if(!y||y.length===0||y[0]===null)return null;const E=C(g),j=r[E];return c.jsx(Pv,{title:g,children:y.map(L=>L&&c.jsxs("div",{className:"flex cursor-pointer",children:[c.jsx("input",{type:"checkbox",className:"w-auto ml-2",value:L,name:g,id:L,onChange:w,checked:j.includes(L)}),c.jsx("label",{htmlFor:L,className:"pl-2 py-2",children:L})]},L))},g)};return c.jsx(xh,{open:e,onClose:t,direction:"right",lockBackgroundScroll:!0,className:"bg-slate-100 dark:bg-slate-600 min-w-[30vw] overflow-auto",children:c.jsxs("form",{className:"px-2",children:[c.jsxs("div",{className:"w-full flex justify-between items-center mt-2",children:[c.jsx("h2",{children:"Filter by"}),c.jsx("button",{onClick:t,type:"button",children:c.jsx(Ea,{className:"text-primary-regular dark:text-primary-light size-8 hover:bg-slate-400/50 hover:rounded-full"})})]}),c.jsx("hr",{className:"w-full my-2 border-t border-black dark:border-white"}),s&&c.jsxs(c.Fragment,{children:[c.jsx(Pv,{title:"Price",children:c.jsx(YL,{prices:s.prices||[],sliderValue:h,onSliderChange:S,onSubmit:P})}),d&&c.jsx(KL,{}),a&&c.jsxs("p",{className:"error",children:["Error: ",a]}),c.jsx("div",{className:"mt-2",children:!d&&!a&&c.jsxs(c.Fragment,{children:[m("Brand",s.brands),m("Color",s.colors),m("Memory",s.memories),m("Screen Size",s.screenSizes),m("Battery Capacity",s.batteryCapacities),m("Operating System",s.operatingSystems),n==="search"&&m("Category",s.categories)]})})]})]})})},qL=()=>c.jsx("div",{className:"w-[13.125rem] lg:w-[16.75rem] xl:w-96 h-10 animate-pulse rounded-md bg-gray-300 flex justify-end items-center text-white pr-4",children:"ā–¼"}),KL=()=>c.jsx("div",{className:"flex flex-col items-center gap-2",children:Array.from({length:5}).map((e,t)=>c.jsx(qL,{},t))}),Pv=({title:e,children:t})=>{const[n,r]=k.useState(!1),i=k.useRef(null),s=n&&i.current?`${i.current.scrollHeight}px`:"0";k.useEffect(()=>{if(n&&i.current){const a=i.current.scrollHeight;i.current.style.maxHeight=`${a}px`}},[n,t]);const o=k.useCallback(()=>{r(a=>!a)},[]);return c.jsxs("div",{className:"mb-2 mx-3",children:[c.jsxs("button",{type:"button","aria-expanded":n,onClick:o,className:"w-full flex justify-between items-center px-4 py-2 bg-secondary-regular hover:bg-primary-regular text-white rounded-md",children:[Ii(e),c.jsx("span",{children:n?"ā–²":"ā–¼"})]}),c.jsx("div",{ref:i,className:"transition-[max-height] duration-500 ease-in-out overflow-hidden",style:{maxHeight:s},children:t})]})},YL=({prices:e,sliderValue:t,onSliderChange:n,onSubmit:r})=>{const[i,s]=k.useMemo(()=>e.length===0?[0,1e3]:[e[0],e[1]],[e]),[o,a]=k.useState(i.toString()),[l,d]=k.useState(s.toString());k.useEffect(()=>{a(i.toString()),d(s.toString())},[i,s]);const f=(S,P)=>{const m=S.target.value;P?a(m):d(m)},h=S=>{let P=parseInt(o,10),m=parseInt(l,10);isNaN(P)||isNaN(m)||(Ps&&(m=s),P>m&&(S?(P=m,a(P.toString())):(m=P,d(m.toString()))),S?(a(P.toString()),n([P,Math.max(t[1],P)])):(d(m.toString()),n([Math.min(t[0],m),m])))},v=(S,P)=>{const[m,g]=P;a(m.toString()),d(g.toString()),n([m,g])},C=S=>`${S}$`,w=S=>{S.preventDefault(),r()};return c.jsxs("div",{className:"mx-6 flex flex-col items-center",children:[c.jsxs("div",{className:"flex justify-between items-center my-4 w-full",children:[c.jsxs("div",{className:"flex flex-col items-center gap-2 flex-1",children:[c.jsx("label",{htmlFor:"minPrice",children:"From"}),c.jsx("input",{type:"number",min:i,max:s,value:o,onChange:S=>f(S,!0),onBlur:()=>h(!0),onKeyDown:Bi,className:"w-3/4 rounded-md shadow-md shadow-primary-regular dark:shadow-secondary-light",id:"minPrice"})]}),c.jsx("p",{className:"mx-2 mt-8",children:"-"}),c.jsxs("div",{className:"flex flex-col items-center gap-2 flex-1",children:[c.jsx("label",{htmlFor:"maxPrice",children:"To"}),c.jsx("input",{type:"number",min:i,max:s,value:l,onChange:S=>f(S,!1),onBlur:()=>h(!1),onKeyDown:Bi,className:"w-3/4 rounded-md shadow-md shadow-primary-regular dark:shadow-secondary-light",id:"maxPrice"})]})]}),c.jsx(KN,{getAriaLabel:()=>"Price range",value:t,onChange:v,valueLabelDisplay:"auto",getAriaValueText:C,min:i,max:s}),c.jsx("button",{className:"action-button mt-2",onClick:w,"aria-label":"Apply filtering by price",children:"Filter By Price"})]})},jv=[{id:"price_asc",label:"Price: low to high"},{id:"price_desc",label:"Price: high to low"},{id:"name_asc",label:"Name: A to Z"},{id:"name_desc",label:"Name: Z to A"},{id:"ratings_desc",label:"Rating: high to low"}],Tv=(e,t)=>({name:t||"",brand:[],minPrice:0,maxPrice:1e4,color:[],memory:[],screenSize:[],batteryCapacity:[],operatingSystem:[],category:e==="search"?[""]:[e]}),Co=()=>{const t=vn().pathname,n=t.substring(t.lastIndexOf("/")+1),[r]=mk(),i=r.get("name"),[s,o]=k.useState([]),[a,l]=k.useState(0),[d,f]=k.useState(1),[h,v]=k.useState(!0),[C,w]=k.useState(),[S,P]=k.useState(!1),[m,g]=k.useState(!1),[y,E]=k.useState(""),[j,L]=k.useState(!1),[M,O]=k.useState(Tv(n,i)),[I,_]=k.useState(null),B=!!I,z=ce=>{_(ce.currentTarget)},R=()=>{_(null)},H=()=>{L(ce=>!ce)},U=ce=>{E(ce)},q=()=>{g(ce=>!ce)},ee=ce=>{O(ce)},A=ce=>{ce instanceof Error&&w(ce.message),v(!1)},Y=k.useCallback(async(ce,ue,F,he=!1)=>{const[Le,_e]=Zh(F),Ae=Le,Pe=_e;try{P(!0),w(void 0);const be=await rr.fetchProducts({...n==="search"?{name:i||""}:{category:[n]},pageNumber:ce,brand:ue.brand,minPrice:ue.minPrice,maxPrice:ue.maxPrice,color:ue.color,memory:ue.memory,screenSize:ue.screenSize,batteryCapacity:ue.batteryCapacity,operatingSystem:ue.operatingSystem,sortBy:Ae,sortDir:Pe});o(dt=>he?be.products:[...dt,...be.products]),f(be.totalPages),v(!be.isLast)}catch(be){A(be)}finally{P(!1)}},[n,i]);k.useEffect(()=>{const ce=ue=>{I&&!I.contains(ue.target)&&_(null)};return document.addEventListener("click",ce),()=>{document.removeEventListener("click",ce)}},[I,B]),k.useEffect(()=>{Y(0,M,y,!0)},[Y,M,y,n,i]),k.useEffect(()=>{O(Tv(n,i)),l(0),o([]),f(1),v(!0)},[n,i]);const te=()=>{ace+1),Y(a+1,M,y)):v(!1)};return c.jsxs("div",{className:"my-8 mx-4 flex flex-col items-center",children:[c.jsxs("div",{className:"mt-4 mb-1 w-full flex justify-between",children:[c.jsx("h1",{children:n==="tv"?n.toUpperCase():Ii(n)}),c.jsxs("div",{className:"flex gap-1",children:[c.jsxs(Ho,{onClick:q,display:"md:hidden flex",ariaLabel:"Sort by",children:[c.jsx("p",{children:"Sort by"}),c.jsx(fc,{className:"text-primary-regular dark:text-primary-light"})]}),c.jsxs(Ho,{onClick:z,display:"hidden md:flex",ariaLabel:"Sort by",children:[c.jsx("p",{children:"Sort by"}),c.jsx(fc,{className:"text-primary-regular dark:text-primary-light"}),c.jsx(Tw,{anchorEl:I,open:B,onClose:R,onSortChange:U,sortInputs:jv})]}),c.jsx(Ho,{onClick:H,ariaLabel:"Filter by",display:"flex",children:c.jsx(u5,{className:"text-primary-regular dark:text-primary-light"})})]})]}),c.jsx("hr",{className:"w-full mt-2 mb-4 border-t border-black dark:border-white"}),c.jsx(UL,{dataLength:s.length,next:te,hasMore:h,loader:c.jsx(WL,{}),children:c.jsx("div",{className:"flex justify-center mb-8",children:c.jsx("div",{className:"flex flex-[3] flex-wrap justify-center items-center gap-8",children:s.length===0&&!S?c.jsx("p",{className:"text-center mt-8",children:"There are no products"}):s.map(ce=>c.jsx(em,{...ce},ce.id))})})}),C&&c.jsx("p",{className:"text-red-500",children:C}),c.jsx(tm,{isOpen:m,toggleDrawer:q,onSortChange:U,sortInputs:jv}),c.jsx(GL,{isOpen:j,toggleDrawer:H,filterCriteria:M,updateFilterCriteria:ee,lastPath:n})]})},XL=()=>c.jsxs("div",{className:"grid grid-cols-2 gap-12 my-8 xl:w-full xl:flex xl:gap-0 xl:justify-around",children:[c.jsx(Xr,{to:"laptop",src:"../assets/laptop-image.png",alt:"Laptop category image",size:"size-28 sm:size-64"}),c.jsx(Xr,{to:"cellular",src:"../assets/phone-image.png",alt:"Cellulars category image",size:"size-28 sm:size-64"}),c.jsx(Xr,{to:"tv",src:"../assets/tv-image.webp",alt:"TV category image",size:"size-28 sm:size-64"}),c.jsx(Xr,{to:"headphone",src:"../assets/headphone-image.png",alt:"Headphones category image",size:"size-28 sm:size-64"})]}),QL="_products_1uzqd_1",ZL="_product_1uzqd_1",Nv={products:QL,product:ZL},JL=({products:e})=>c.jsx("div",{className:`${Nv.products} hidden home:grid`,children:e==null?void 0:e.map(t=>c.jsx("span",{className:`${Nv.product}`,children:c.jsx(em,{...t})},t.id))}),e9=()=>{const e=({className:t})=>c.jsx("div",{className:`w-64 h-96 sm:w-80 sm:h-[26.25rem] rounded-3xl animate-pulse ${t}`});return c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"hidden home:grid grid-cols-[repeat(9,_88.67px)] gap-2 md:gap-4",children:Array.from({length:8}).map((t,n)=>c.jsx(e,{className:n%2===0?"bg-gray-300":"bg-gray-400"},n))}),c.jsxs("div",{className:"home:hidden flex justify-center items-center gap-2 md:gap-16",children:[c.jsx(e,{className:"bg-gray-300"}),c.jsx(e,{className:"bg-gray-300 hidden sm:block"})]})]})};function Lv(e){return e!==null&&typeof e=="object"&&"constructor"in e&&e.constructor===Object}function cm(e,t){e===void 0&&(e={}),t===void 0&&(t={}),Object.keys(t).forEach(n=>{typeof e[n]>"u"?e[n]=t[n]:Lv(t[n])&&Lv(e[n])&&Object.keys(t[n]).length>0&&cm(e[n],t[n])})}const ix={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector(){return null},querySelectorAll(){return[]},getElementById(){return null},createEvent(){return{initEvent(){}}},createElement(){return{children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName(){return[]}}},createElementNS(){return{}},importNode(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function to(){const e=typeof document<"u"?document:{};return cm(e,ix),e}const t9={document:ix,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle(){return{getPropertyValue(){return""}}},Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia(){return{}},requestAnimationFrame(e){return typeof setTimeout>"u"?(e(),null):setTimeout(e,0)},cancelAnimationFrame(e){typeof setTimeout>"u"||clearTimeout(e)}};function _n(){const e=typeof window<"u"?window:{};return cm(e,t9),e}function n9(e){return e===void 0&&(e=""),e.trim().split(" ").filter(t=>!!t.trim())}function r9(e){const t=e;Object.keys(t).forEach(n=>{try{t[n]=null}catch{}try{delete t[n]}catch{}})}function pp(e,t){return t===void 0&&(t=0),setTimeout(e,t)}function kc(){return Date.now()}function i9(e){const t=_n();let n;return t.getComputedStyle&&(n=t.getComputedStyle(e,null)),!n&&e.currentStyle&&(n=e.currentStyle),n||(n=e.style),n}function s9(e,t){t===void 0&&(t="x");const n=_n();let r,i,s;const o=i9(e);return n.WebKitCSSMatrix?(i=o.transform||o.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(a=>a.replace(",",".")).join(", ")),s=new n.WebKitCSSMatrix(i==="none"?"":i)):(s=o.MozTransform||o.OTransform||o.MsTransform||o.msTransform||o.transform||o.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=s.toString().split(",")),t==="x"&&(n.WebKitCSSMatrix?i=s.m41:r.length===16?i=parseFloat(r[12]):i=parseFloat(r[4])),t==="y"&&(n.WebKitCSSMatrix?i=s.m42:r.length===16?i=parseFloat(r[13]):i=parseFloat(r[5])),i||0}function ml(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"}function o9(e){return typeof window<"u"&&typeof window.HTMLElement<"u"?e instanceof HTMLElement:e&&(e.nodeType===1||e.nodeType===11)}function bn(){const e=Object(arguments.length<=0?void 0:arguments[0]),t=["__proto__","constructor","prototype"];for(let n=1;nt.indexOf(s)<0);for(let s=0,o=i.length;ss?"next":"prev",f=(v,C)=>d==="next"&&v>=C||d==="prev"&&v<=C,h=()=>{a=new Date().getTime(),o===null&&(o=a);const v=Math.max(Math.min((a-o)/l,1),0),C=.5-Math.cos(v*Math.PI)/2;let w=s+C*(n-s);if(f(w,n)&&(w=n),t.wrapperEl.scrollTo({[r]:w}),f(w,n)){t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[r]:w})}),i.cancelAnimationFrame(t.cssModeFrameID);return}t.cssModeFrameID=i.requestAnimationFrame(h)};h()}function pr(e,t){return t===void 0&&(t=""),[...e.children].filter(n=>n.matches(t))}function Ec(e){try{console.warn(e);return}catch{}}function Pc(e,t){t===void 0&&(t=[]);const n=document.createElement(e);return n.classList.add(...Array.isArray(t)?t:n9(t)),n}function a9(e,t){const n=[];for(;e.previousElementSibling;){const r=e.previousElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function l9(e,t){const n=[];for(;e.nextElementSibling;){const r=e.nextElementSibling;t?r.matches(t)&&n.push(r):n.push(r),e=r}return n}function Zr(e,t){return _n().getComputedStyle(e,null).getPropertyValue(t)}function jc(e){let t=e,n;if(t){for(n=0;(t=t.previousSibling)!==null;)t.nodeType===1&&(n+=1);return n}}function ox(e,t){const n=[];let r=e.parentElement;for(;r;)t?r.matches(t)&&n.push(r):n.push(r),r=r.parentElement;return n}function hp(e,t,n){const r=_n();return n?e[t==="width"?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(e,null).getPropertyValue(t==="width"?"margin-left":"margin-bottom")):e.offsetWidth}function Lt(e){return(Array.isArray(e)?e:[e]).filter(t=>!!t)}function ax(e,t,n,r){return e.params.createElements&&Object.keys(r).forEach(i=>{if(!n[i]&&n.auto===!0){let s=pr(e.el,`.${r[i]}`)[0];s||(s=Pc("div",r[i]),s.className=r[i],e.el.append(s)),n[i]=s,t[i]=s}}),n}function c9(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;n({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null};function s(w){let S;return w&&typeof w=="string"&&t.isElement&&(S=t.el.querySelector(w),S)?S:(w&&(typeof w=="string"&&(S=[...document.querySelectorAll(w)]),t.params.uniqueNavElements&&typeof w=="string"&&S&&S.length>1&&t.el.querySelectorAll(w).length===1?S=t.el.querySelector(w):S&&S.length===1&&(S=S[0])),w&&!S?w:S)}function o(w,S){const P=t.params.navigation;w=Lt(w),w.forEach(m=>{m&&(m.classList[S?"add":"remove"](...P.disabledClass.split(" ")),m.tagName==="BUTTON"&&(m.disabled=S),t.params.watchOverflow&&t.enabled&&m.classList[t.isLocked?"add":"remove"](P.lockClass))})}function a(){const{nextEl:w,prevEl:S}=t.navigation;if(t.params.loop){o(S,!1),o(w,!1);return}o(S,t.isBeginning&&!t.params.rewind),o(w,t.isEnd&&!t.params.rewind)}function l(w){w.preventDefault(),!(t.isBeginning&&!t.params.loop&&!t.params.rewind)&&(t.slidePrev(),i("navigationPrev"))}function d(w){w.preventDefault(),!(t.isEnd&&!t.params.loop&&!t.params.rewind)&&(t.slideNext(),i("navigationNext"))}function f(){const w=t.params.navigation;if(t.params.navigation=ax(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!(w.nextEl||w.prevEl))return;let S=s(w.nextEl),P=s(w.prevEl);Object.assign(t.navigation,{nextEl:S,prevEl:P}),S=Lt(S),P=Lt(P);const m=(g,y)=>{g&&g.addEventListener("click",y==="next"?d:l),!t.enabled&&g&&g.classList.add(...w.lockClass.split(" "))};S.forEach(g=>m(g,"next")),P.forEach(g=>m(g,"prev"))}function h(){let{nextEl:w,prevEl:S}=t.navigation;w=Lt(w),S=Lt(S);const P=(m,g)=>{m.removeEventListener("click",g==="next"?d:l),m.classList.remove(...t.params.navigation.disabledClass.split(" "))};w.forEach(m=>P(m,"next")),S.forEach(m=>P(m,"prev"))}r("init",()=>{t.params.navigation.enabled===!1?C():(f(),a())}),r("toEdge fromEdge lock unlock",()=>{a()}),r("destroy",()=>{h()}),r("enable disable",()=>{let{nextEl:w,prevEl:S}=t.navigation;if(w=Lt(w),S=Lt(S),t.enabled){a();return}[...w,...S].filter(P=>!!P).forEach(P=>P.classList.add(t.params.navigation.lockClass))}),r("click",(w,S)=>{let{nextEl:P,prevEl:m}=t.navigation;P=Lt(P),m=Lt(m);const g=S.target;if(t.params.navigation.hideOnClick&&!m.includes(g)&&!P.includes(g)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===g||t.pagination.el.contains(g)))return;let y;P.length?y=P[0].classList.contains(t.params.navigation.hiddenClass):m.length&&(y=m[0].classList.contains(t.params.navigation.hiddenClass)),i(y===!0?"navigationShow":"navigationHide"),[...P,...m].filter(E=>!!E).forEach(E=>E.classList.toggle(t.params.navigation.hiddenClass))}});const v=()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),f(),a()},C=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),h()};Object.assign(t.navigation,{enable:v,disable:C,update:a,init:f,destroy:h})}function ko(e){return e===void 0&&(e=""),`.${e.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}`}function u9(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const s="swiper-pagination";n({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:m=>m,formatFractionTotal:m=>m,bulletClass:`${s}-bullet`,bulletActiveClass:`${s}-bullet-active`,modifierClass:`${s}-`,currentClass:`${s}-current`,totalClass:`${s}-total`,hiddenClass:`${s}-hidden`,progressbarFillClass:`${s}-progressbar-fill`,progressbarOppositeClass:`${s}-progressbar-opposite`,clickableClass:`${s}-clickable`,lockClass:`${s}-lock`,horizontalClass:`${s}-horizontal`,verticalClass:`${s}-vertical`,paginationDisabledClass:`${s}-disabled`}}),t.pagination={el:null,bullets:[]};let o,a=0;function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&t.pagination.el.length===0}function d(m,g){const{bulletActiveClass:y}=t.params.pagination;m&&(m=m[`${g==="prev"?"previous":"next"}ElementSibling`],m&&(m.classList.add(`${y}-${g}`),m=m[`${g==="prev"?"previous":"next"}ElementSibling`],m&&m.classList.add(`${y}-${g}-${g}`)))}function f(m){const g=m.target.closest(ko(t.params.pagination.bulletClass));if(!g)return;m.preventDefault();const y=jc(g)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===y)return;t.slideToLoop(y)}else t.slideTo(y)}function h(){const m=t.rtl,g=t.params.pagination;if(l())return;let y=t.pagination.el;y=Lt(y);let E,j;const L=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,M=t.params.loop?Math.ceil(L/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(j=t.previousRealIndex||0,E=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):typeof t.snapIndex<"u"?(E=t.snapIndex,j=t.previousSnapIndex):(j=t.previousIndex||0,E=t.activeIndex||0),g.type==="bullets"&&t.pagination.bullets&&t.pagination.bullets.length>0){const O=t.pagination.bullets;let I,_,B;if(g.dynamicBullets&&(o=hp(O[0],t.isHorizontal()?"width":"height",!0),y.forEach(z=>{z.style[t.isHorizontal()?"width":"height"]=`${o*(g.dynamicMainBullets+4)}px`}),g.dynamicMainBullets>1&&j!==void 0&&(a+=E-(j||0),a>g.dynamicMainBullets-1?a=g.dynamicMainBullets-1:a<0&&(a=0)),I=Math.max(E-a,0),_=I+(Math.min(O.length,g.dynamicMainBullets)-1),B=(_+I)/2),O.forEach(z=>{const R=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(H=>`${g.bulletActiveClass}${H}`)].map(H=>typeof H=="string"&&H.includes(" ")?H.split(" "):H).flat();z.classList.remove(...R)}),y.length>1)O.forEach(z=>{const R=jc(z);R===E?z.classList.add(...g.bulletActiveClass.split(" ")):t.isElement&&z.setAttribute("part","bullet"),g.dynamicBullets&&(R>=I&&R<=_&&z.classList.add(...`${g.bulletActiveClass}-main`.split(" ")),R===I&&d(z,"prev"),R===_&&d(z,"next"))});else{const z=O[E];if(z&&z.classList.add(...g.bulletActiveClass.split(" ")),t.isElement&&O.forEach((R,H)=>{R.setAttribute("part",H===E?"bullet-active":"bullet")}),g.dynamicBullets){const R=O[I],H=O[_];for(let U=I;U<=_;U+=1)O[U]&&O[U].classList.add(...`${g.bulletActiveClass}-main`.split(" "));d(R,"prev"),d(H,"next")}}if(g.dynamicBullets){const z=Math.min(O.length,g.dynamicMainBullets+4),R=(o*z-o)/2-B*o,H=m?"right":"left";O.forEach(U=>{U.style[t.isHorizontal()?H:"top"]=`${R}px`})}}y.forEach((O,I)=>{if(g.type==="fraction"&&(O.querySelectorAll(ko(g.currentClass)).forEach(_=>{_.textContent=g.formatFractionCurrent(E+1)}),O.querySelectorAll(ko(g.totalClass)).forEach(_=>{_.textContent=g.formatFractionTotal(M)})),g.type==="progressbar"){let _;g.progressbarOpposite?_=t.isHorizontal()?"vertical":"horizontal":_=t.isHorizontal()?"horizontal":"vertical";const B=(E+1)/M;let z=1,R=1;_==="horizontal"?z=B:R=B,O.querySelectorAll(ko(g.progressbarFillClass)).forEach(H=>{H.style.transform=`translate3d(0,0,0) scaleX(${z}) scaleY(${R})`,H.style.transitionDuration=`${t.params.speed}ms`})}g.type==="custom"&&g.renderCustom?(O.innerHTML=g.renderCustom(t,E+1,M),I===0&&i("paginationRender",O)):(I===0&&i("paginationRender",O),i("paginationUpdate",O)),t.params.watchOverflow&&t.enabled&&O.classList[t.isLocked?"add":"remove"](g.lockClass)})}function v(){const m=t.params.pagination;if(l())return;const g=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.grid&&t.params.grid.rows>1?t.slides.length/Math.ceil(t.params.grid.rows):t.slides.length;let y=t.pagination.el;y=Lt(y);let E="";if(m.type==="bullets"){let j=t.params.loop?Math.ceil(g/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&j>g&&(j=g);for(let L=0;L`}m.type==="fraction"&&(m.renderFraction?E=m.renderFraction.call(t,m.currentClass,m.totalClass):E=` / `),m.type==="progressbar"&&(m.renderProgressbar?E=m.renderProgressbar.call(t,m.progressbarFillClass):E=``),t.pagination.bullets=[],y.forEach(j=>{m.type!=="custom"&&(j.innerHTML=E||""),m.type==="bullets"&&t.pagination.bullets.push(...j.querySelectorAll(ko(m.bulletClass)))}),m.type!=="custom"&&i("paginationRender",y[0])}function C(){t.params.pagination=ax(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const m=t.params.pagination;if(!m.el)return;let g;typeof m.el=="string"&&t.isElement&&(g=t.el.querySelector(m.el)),!g&&typeof m.el=="string"&&(g=[...document.querySelectorAll(m.el)]),g||(g=m.el),!(!g||g.length===0)&&(t.params.uniqueNavElements&&typeof m.el=="string"&&Array.isArray(g)&&g.length>1&&(g=[...t.el.querySelectorAll(m.el)],g.length>1&&(g=g.filter(y=>ox(y,".swiper")[0]===t.el)[0])),Array.isArray(g)&&g.length===1&&(g=g[0]),Object.assign(t.pagination,{el:g}),g=Lt(g),g.forEach(y=>{m.type==="bullets"&&m.clickable&&y.classList.add(...(m.clickableClass||"").split(" ")),y.classList.add(m.modifierClass+m.type),y.classList.add(t.isHorizontal()?m.horizontalClass:m.verticalClass),m.type==="bullets"&&m.dynamicBullets&&(y.classList.add(`${m.modifierClass}${m.type}-dynamic`),a=0,m.dynamicMainBullets<1&&(m.dynamicMainBullets=1)),m.type==="progressbar"&&m.progressbarOpposite&&y.classList.add(m.progressbarOppositeClass),m.clickable&&y.addEventListener("click",f),t.enabled||y.classList.add(m.lockClass)}))}function w(){const m=t.params.pagination;if(l())return;let g=t.pagination.el;g&&(g=Lt(g),g.forEach(y=>{y.classList.remove(m.hiddenClass),y.classList.remove(m.modifierClass+m.type),y.classList.remove(t.isHorizontal()?m.horizontalClass:m.verticalClass),m.clickable&&(y.classList.remove(...(m.clickableClass||"").split(" ")),y.removeEventListener("click",f))})),t.pagination.bullets&&t.pagination.bullets.forEach(y=>y.classList.remove(...m.bulletActiveClass.split(" ")))}r("changeDirection",()=>{if(!t.pagination||!t.pagination.el)return;const m=t.params.pagination;let{el:g}=t.pagination;g=Lt(g),g.forEach(y=>{y.classList.remove(m.horizontalClass,m.verticalClass),y.classList.add(t.isHorizontal()?m.horizontalClass:m.verticalClass)})}),r("init",()=>{t.params.pagination.enabled===!1?P():(C(),v(),h())}),r("activeIndexChange",()=>{typeof t.snapIndex>"u"&&h()}),r("snapIndexChange",()=>{h()}),r("snapGridLengthChange",()=>{v(),h()}),r("destroy",()=>{w()}),r("enable disable",()=>{let{el:m}=t.pagination;m&&(m=Lt(m),m.forEach(g=>g.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass)))}),r("lock unlock",()=>{h()}),r("click",(m,g)=>{const y=g.target,E=Lt(t.pagination.el);if(t.params.pagination.el&&t.params.pagination.hideOnClick&&E&&E.length>0&&!y.classList.contains(t.params.pagination.bulletClass)){if(t.navigation&&(t.navigation.nextEl&&y===t.navigation.nextEl||t.navigation.prevEl&&y===t.navigation.prevEl))return;const j=E[0].classList.contains(t.params.pagination.hiddenClass);i(j===!0?"paginationShow":"paginationHide"),E.forEach(L=>L.classList.toggle(t.params.pagination.hiddenClass))}});const S=()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:m}=t.pagination;m&&(m=Lt(m),m.forEach(g=>g.classList.remove(t.params.pagination.paginationDisabledClass))),C(),v(),h()},P=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:m}=t.pagination;m&&(m=Lt(m),m.forEach(g=>g.classList.add(t.params.pagination.paginationDisabledClass))),w()};Object.assign(t.pagination,{enable:S,disable:P,render:v,update:h,init:C,destroy:w})}let Bd;function d9(){const e=_n(),t=to();return{smoothScroll:t.documentElement&&t.documentElement.style&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch)}}function lx(){return Bd||(Bd=d9()),Bd}let Vd;function f9(e){let{userAgent:t}=e===void 0?{}:e;const n=lx(),r=_n(),i=r.navigator.platform,s=t||r.navigator.userAgent,o={ios:!1,android:!1},a=r.screen.width,l=r.screen.height,d=s.match(/(Android);?[\s\/]+([\d.]+)?/);let f=s.match(/(iPad).*OS\s([\d_]+)/);const h=s.match(/(iPod)(.*OS\s([\d_]+))?/),v=!f&&s.match(/(iPhone\sOS|iOS)\s([\d_]+)/),C=i==="Win32";let w=i==="MacIntel";const S=["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"];return!f&&w&&n.touch&&S.indexOf(`${a}x${l}`)>=0&&(f=s.match(/(Version)\/([\d.]+)/),f||(f=[0,1,"13_0_0"]),w=!1),d&&!C&&(o.os="android",o.android=!0),(f||v||h)&&(o.os="ios",o.ios=!0),o}function cx(e){return e===void 0&&(e={}),Vd||(Vd=f9(e)),Vd}let Hd;function p9(){const e=_n(),t=cx();let n=!1;function r(){const a=e.navigator.userAgent.toLowerCase();return a.indexOf("safari")>=0&&a.indexOf("chrome")<0&&a.indexOf("android")<0}if(r()){const a=String(e.navigator.userAgent);if(a.includes("Version/")){const[l,d]=a.split("Version/")[1].split(" ")[0].split(".").map(f=>Number(f));n=l<16||l===16&&d<2}}const i=/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent),s=r(),o=s||i&&t.ios;return{isSafari:n||s,needPerspectiveFix:n,need3dFix:o,isWebView:i}}function h9(){return Hd||(Hd=p9()),Hd}function m9(e){let{swiper:t,on:n,emit:r}=e;const i=_n();let s=null,o=null;const a=()=>{!t||t.destroyed||!t.initialized||(r("beforeResize"),r("resize"))},l=()=>{!t||t.destroyed||!t.initialized||(s=new ResizeObserver(h=>{o=i.requestAnimationFrame(()=>{const{width:v,height:C}=t;let w=v,S=C;h.forEach(P=>{let{contentBoxSize:m,contentRect:g,target:y}=P;y&&y!==t.el||(w=g?g.width:(m[0]||m).inlineSize,S=g?g.height:(m[0]||m).blockSize)}),(w!==v||S!==C)&&a()})}),s.observe(t.el))},d=()=>{o&&i.cancelAnimationFrame(o),s&&s.unobserve&&t.el&&(s.unobserve(t.el),s=null)},f=()=>{!t||t.destroyed||!t.initialized||r("orientationchange")};n("init",()=>{if(t.params.resizeObserver&&typeof i.ResizeObserver<"u"){l();return}i.addEventListener("resize",a),i.addEventListener("orientationchange",f)}),n("destroy",()=>{d(),i.removeEventListener("resize",a),i.removeEventListener("orientationchange",f)})}function g9(e){let{swiper:t,extendParams:n,on:r,emit:i}=e;const s=[],o=_n(),a=function(f,h){h===void 0&&(h={});const v=o.MutationObserver||o.WebkitMutationObserver,C=new v(w=>{if(t.__preventObserver__)return;if(w.length===1){i("observerUpdate",w[0]);return}const S=function(){i("observerUpdate",w[0])};o.requestAnimationFrame?o.requestAnimationFrame(S):o.setTimeout(S,0)});C.observe(f,{attributes:typeof h.attributes>"u"?!0:h.attributes,childList:typeof h.childList>"u"?!0:h.childList,characterData:typeof h.characterData>"u"?!0:h.characterData}),s.push(C)},l=()=>{if(t.params.observer){if(t.params.observeParents){const f=ox(t.hostEl);for(let h=0;h{s.forEach(f=>{f.disconnect()}),s.splice(0,s.length)};n({observer:!1,observeParents:!1,observeSlideChildren:!1}),r("init",l),r("destroy",d)}var v9={on(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;const i=n?"unshift":"push";return e.split(" ").forEach(s=>{r.eventsListeners[s]||(r.eventsListeners[s]=[]),r.eventsListeners[s][i](t)}),r},once(e,t,n){const r=this;if(!r.eventsListeners||r.destroyed||typeof t!="function")return r;function i(){r.off(e,i),i.__emitterProxy&&delete i.__emitterProxy;for(var s=arguments.length,o=new Array(s),a=0;a=0&&t.eventsAnyListeners.splice(n,1),t},off(e,t){const n=this;return!n.eventsListeners||n.destroyed||!n.eventsListeners||e.split(" ").forEach(r=>{typeof t>"u"?n.eventsListeners[r]=[]:n.eventsListeners[r]&&n.eventsListeners[r].forEach((i,s)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&n.eventsListeners[r].splice(s,1)})}),n},emit(){const e=this;if(!e.eventsListeners||e.destroyed||!e.eventsListeners)return e;let t,n,r;for(var i=arguments.length,s=new Array(i),o=0;o{e.eventsAnyListeners&&e.eventsAnyListeners.length&&e.eventsAnyListeners.forEach(d=>{d.apply(r,[l,...n])}),e.eventsListeners&&e.eventsListeners[l]&&e.eventsListeners[l].forEach(d=>{d.apply(r,n)})}),e}};function y9(){const e=this;let t,n;const r=e.el;typeof e.params.width<"u"&&e.params.width!==null?t=e.params.width:t=r.clientWidth,typeof e.params.height<"u"&&e.params.height!==null?n=e.params.height:n=r.clientHeight,!(t===0&&e.isHorizontal()||n===0&&e.isVertical())&&(t=t-parseInt(Zr(r,"padding-left")||0,10)-parseInt(Zr(r,"padding-right")||0,10),n=n-parseInt(Zr(r,"padding-top")||0,10)-parseInt(Zr(r,"padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(n)&&(n=0),Object.assign(e,{width:t,height:n,size:e.isHorizontal()?t:n}))}function w9(){const e=this;function t(_,B){return parseFloat(_.getPropertyValue(e.getDirectionLabel(B))||0)}const n=e.params,{wrapperEl:r,slidesEl:i,size:s,rtlTranslate:o,wrongRTL:a}=e,l=e.virtual&&n.virtual.enabled,d=l?e.virtual.slides.length:e.slides.length,f=pr(i,`.${e.params.slideClass}, swiper-slide`),h=l?e.virtual.slides.length:f.length;let v=[];const C=[],w=[];let S=n.slidesOffsetBefore;typeof S=="function"&&(S=n.slidesOffsetBefore.call(e));let P=n.slidesOffsetAfter;typeof P=="function"&&(P=n.slidesOffsetAfter.call(e));const m=e.snapGrid.length,g=e.slidesGrid.length;let y=n.spaceBetween,E=-S,j=0,L=0;if(typeof s>"u")return;typeof y=="string"&&y.indexOf("%")>=0?y=parseFloat(y.replace("%",""))/100*s:typeof y=="string"&&(y=parseFloat(y)),e.virtualSize=-y,f.forEach(_=>{o?_.style.marginLeft="":_.style.marginRight="",_.style.marginBottom="",_.style.marginTop=""}),n.centeredSlides&&n.cssMode&&(gl(r,"--swiper-centered-offset-before",""),gl(r,"--swiper-centered-offset-after",""));const M=n.grid&&n.grid.rows>1&&e.grid;M?e.grid.initSlides(f):e.grid&&e.grid.unsetSlides();let O;const I=n.slidesPerView==="auto"&&n.breakpoints&&Object.keys(n.breakpoints).filter(_=>typeof n.breakpoints[_].slidesPerView<"u").length>0;for(let _=0;_1&&v.push(e.virtualSize-s)}if(l&&n.loop){const _=w[0]+y;if(n.slidesPerGroup>1){const B=Math.ceil((e.virtual.slidesBefore+e.virtual.slidesAfter)/n.slidesPerGroup),z=_*n.slidesPerGroup;for(let R=0;R!n.cssMode||n.loop?!0:z!==f.length-1).forEach(B=>{B.style[_]=`${y}px`})}if(n.centeredSlides&&n.centeredSlidesBounds){let _=0;w.forEach(z=>{_+=z+(y||0)}),_-=y;const B=_-s;v=v.map(z=>z<=0?-S:z>B?B+P:z)}if(n.centerInsufficientSlides){let _=0;if(w.forEach(B=>{_+=B+(y||0)}),_-=y,_{v[R]=z-B}),C.forEach((z,R)=>{C[R]=z+B})}}if(Object.assign(e,{slides:f,snapGrid:v,slidesGrid:C,slidesSizesGrid:w}),n.centeredSlides&&n.cssMode&&!n.centeredSlidesBounds){gl(r,"--swiper-centered-offset-before",`${-v[0]}px`),gl(r,"--swiper-centered-offset-after",`${e.size/2-w[w.length-1]/2}px`);const _=-e.snapGrid[0],B=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map(z=>z+_),e.slidesGrid=e.slidesGrid.map(z=>z+B)}if(h!==d&&e.emit("slidesLengthChange"),v.length!==m&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),C.length!==g&&e.emit("slidesGridLengthChange"),n.watchSlidesProgress&&e.updateSlidesOffset(),e.emit("slidesUpdated"),!l&&!n.cssMode&&(n.effect==="slide"||n.effect==="fade")){const _=`${n.containerModifierClass}backface-hidden`,B=e.el.classList.contains(_);h<=n.maxBackfaceHiddenSlides?B||e.el.classList.add(_):B&&e.el.classList.remove(_)}}function x9(e){const t=this,n=[],r=t.virtual&&t.params.virtual.enabled;let i=0,s;typeof e=="number"?t.setTransition(e):e===!0&&t.setTransition(t.params.speed);const o=a=>r?t.slides[t.getSlideIndexByData(a)]:t.slides[a];if(t.params.slidesPerView!=="auto"&&t.params.slidesPerView>1)if(t.params.centeredSlides)(t.visibleSlides||[]).forEach(a=>{n.push(a)});else for(s=0;st.slides.length&&!r)break;n.push(o(a))}else n.push(o(t.activeIndex));for(s=0;si?a:i}(i||i===0)&&(t.wrapperEl.style.height=`${i}px`)}function b9(){const e=this,t=e.slides,n=e.isElement?e.isHorizontal()?e.wrapperEl.offsetLeft:e.wrapperEl.offsetTop:0;for(let r=0;r"u"&&t.updateSlidesOffset();let o=-e;i&&(o=e),r.forEach(l=>{l.classList.remove(n.slideVisibleClass,n.slideFullyVisibleClass)}),t.visibleSlidesIndexes=[],t.visibleSlides=[];let a=n.spaceBetween;typeof a=="string"&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*t.size:typeof a=="string"&&(a=parseFloat(a));for(let l=0;l=0&&C<=t.size-t.slidesSizesGrid[l];(C>=0&&C1&&w<=t.size||C<=0&&w>=t.size)&&(t.visibleSlides.push(d),t.visibleSlidesIndexes.push(l),r[l].classList.add(n.slideVisibleClass)),S&&r[l].classList.add(n.slideFullyVisibleClass),d.progress=i?-h:h,d.originalProgress=i?-v:v}}function C9(e){const t=this;if(typeof e>"u"){const f=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*f||0}const n=t.params,r=t.maxTranslate()-t.minTranslate();let{progress:i,isBeginning:s,isEnd:o,progressLoop:a}=t;const l=s,d=o;if(r===0)i=0,s=!0,o=!0;else{i=(e-t.minTranslate())/r;const f=Math.abs(e-t.minTranslate())<1,h=Math.abs(e-t.maxTranslate())<1;s=f||i<=0,o=h||i>=1,f&&(i=0),h&&(i=1)}if(n.loop){const f=t.getSlideIndexByData(0),h=t.getSlideIndexByData(t.slides.length-1),v=t.slidesGrid[f],C=t.slidesGrid[h],w=t.slidesGrid[t.slidesGrid.length-1],S=Math.abs(e);S>=v?a=(S-v)/w:a=(S+w-C)/w,a>1&&(a-=1)}Object.assign(t,{progress:i,progressLoop:a,isBeginning:s,isEnd:o}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&t.updateSlidesProgress(e),s&&!l&&t.emit("reachBeginning toEdge"),o&&!d&&t.emit("reachEnd toEdge"),(l&&!s||d&&!o)&&t.emit("fromEdge"),t.emit("progress",i)}const Ud=(e,t,n)=>{t&&!e.classList.contains(n)?e.classList.add(n):!t&&e.classList.contains(n)&&e.classList.remove(n)};function k9(){const e=this,{slides:t,params:n,slidesEl:r,activeIndex:i}=e,s=e.virtual&&n.virtual.enabled,o=e.grid&&n.grid&&n.grid.rows>1,a=h=>pr(r,`.${n.slideClass}${h}, swiper-slide${h}`)[0];let l,d,f;if(s)if(n.loop){let h=i-e.virtual.slidesBefore;h<0&&(h=e.virtual.slides.length+h),h>=e.virtual.slides.length&&(h-=e.virtual.slides.length),l=a(`[data-swiper-slide-index="${h}"]`)}else l=a(`[data-swiper-slide-index="${i}"]`);else o?(l=t.filter(h=>h.column===i)[0],f=t.filter(h=>h.column===i+1)[0],d=t.filter(h=>h.column===i-1)[0]):l=t[i];l&&(o||(f=l9(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!f&&(f=t[0]),d=a9(l,`.${n.slideClass}, swiper-slide`)[0],n.loop&&!d===0&&(d=t[t.length-1]))),t.forEach(h=>{Ud(h,h===l,n.slideActiveClass),Ud(h,h===f,n.slideNextClass),Ud(h,h===d,n.slidePrevClass)}),e.emitSlidesClasses()}const Al=(e,t)=>{if(!e||e.destroyed||!e.params)return;const n=()=>e.isElement?"swiper-slide":`.${e.params.slideClass}`,r=t.closest(n());if(r){let i=r.querySelector(`.${e.params.lazyPreloaderClass}`);!i&&e.isElement&&(r.shadowRoot?i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`):requestAnimationFrame(()=>{r.shadowRoot&&(i=r.shadowRoot.querySelector(`.${e.params.lazyPreloaderClass}`),i&&i.remove())})),i&&i.remove()}},Wd=(e,t)=>{if(!e.slides[t])return;const n=e.slides[t].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},mp=e=>{if(!e||e.destroyed||!e.params)return;let t=e.params.lazyPreloadPrevNext;const n=e.slides.length;if(!n||!t||t<0)return;t=Math.min(t,n);const r=e.params.slidesPerView==="auto"?e.slidesPerViewDynamic():Math.ceil(e.params.slidesPerView),i=e.activeIndex;if(e.params.grid&&e.params.grid.rows>1){const o=i,a=[o-t];a.push(...Array.from({length:t}).map((l,d)=>o+r+d)),e.slides.forEach((l,d)=>{a.includes(l.column)&&Wd(e,d)});return}const s=i+r-1;if(e.params.rewind||e.params.loop)for(let o=i-t;o<=s+t;o+=1){const a=(o%n+n)%n;(as)&&Wd(e,a)}else for(let o=Math.max(i-t,0);o<=Math.min(s+t,n-1);o+=1)o!==i&&(o>s||o=t[s]&&r=t[s]&&r=t[s]&&(i=s);return n.normalizeSlideIndex&&(i<0||typeof i>"u")&&(i=0),i}function P9(e){const t=this,n=t.rtlTranslate?t.translate:-t.translate,{snapGrid:r,params:i,activeIndex:s,realIndex:o,snapIndex:a}=t;let l=e,d;const f=C=>{let w=C-t.virtual.slidesBefore;return w<0&&(w=t.virtual.slides.length+w),w>=t.virtual.slides.length&&(w-=t.virtual.slides.length),w};if(typeof l>"u"&&(l=E9(t)),r.indexOf(n)>=0)d=r.indexOf(n);else{const C=Math.min(i.slidesPerGroupSkip,l);d=C+Math.floor((l-C)/i.slidesPerGroup)}if(d>=r.length&&(d=r.length-1),l===s&&!t.params.loop){d!==a&&(t.snapIndex=d,t.emit("snapIndexChange"));return}if(l===s&&t.params.loop&&t.virtual&&t.params.virtual.enabled){t.realIndex=f(l);return}const h=t.grid&&i.grid&&i.grid.rows>1;let v;if(t.virtual&&i.virtual.enabled&&i.loop)v=f(l);else if(h){const C=t.slides.filter(S=>S.column===l)[0];let w=parseInt(C.getAttribute("data-swiper-slide-index"),10);Number.isNaN(w)&&(w=Math.max(t.slides.indexOf(C),0)),v=Math.floor(w/i.grid.rows)}else if(t.slides[l]){const C=t.slides[l].getAttribute("data-swiper-slide-index");C?v=parseInt(C,10):v=l}else v=l;Object.assign(t,{previousSnapIndex:a,snapIndex:d,previousRealIndex:o,realIndex:v,previousIndex:s,activeIndex:l}),t.initialized&&mp(t),t.emit("activeIndexChange"),t.emit("snapIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&(o!==v&&t.emit("realIndexChange"),t.emit("slideChange"))}function j9(e,t){const n=this,r=n.params;let i=e.closest(`.${r.slideClass}, swiper-slide`);!i&&n.isElement&&t&&t.length>1&&t.includes(e)&&[...t.slice(t.indexOf(e)+1,t.length)].forEach(a=>{!i&&a.matches&&a.matches(`.${r.slideClass}, swiper-slide`)&&(i=a)});let s=!1,o;if(i){for(let a=0;al?f=l:r&&eo?a="next":s"u"&&(t=s.params.speed);const S=Math.min(s.params.slidesPerGroupSkip,o);let P=S+Math.floor((o-S)/s.params.slidesPerGroup);P>=l.length&&(P=l.length-1);const m=-l[P];if(a.normalizeSlideIndex)for(let y=0;y=j&&E=j&&E=j&&(o=y)}if(s.initialized&&o!==h&&(!s.allowSlideNext&&(v?m>s.translate&&m>s.minTranslate():ms.translate&&m>s.maxTranslate()&&(h||0)!==o))return!1;o!==(f||0)&&n&&s.emit("beforeSlideChangeStart"),s.updateProgress(m);let g;if(o>h?g="next":o0?(s._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{C[y?"scrollLeft":"scrollTop"]=E})):C[y?"scrollLeft":"scrollTop"]=E,j&&requestAnimationFrame(()=>{s.wrapperEl.style.scrollSnapType="",s._immediateVirtual=!1})}else{if(!s.support.smoothScroll)return sx({swiper:s,targetPosition:E,side:y?"left":"top"}),!0;C.scrollTo({[y?"left":"top"]:E,behavior:"smooth"})}return!0}return s.setTransition(t),s.setTranslate(m),s.updateActiveIndex(o),s.updateSlidesClasses(),s.emit("beforeTransitionStart",t,r),s.transitionStart(n,g),t===0?s.transitionEnd(n,g):s.animating||(s.animating=!0,s.onSlideToWrapperTransitionEnd||(s.onSlideToWrapperTransitionEnd=function(E){!s||s.destroyed||E.target===this&&(s.wrapperEl.removeEventListener("transitionend",s.onSlideToWrapperTransitionEnd),s.onSlideToWrapperTransitionEnd=null,delete s.onSlideToWrapperTransitionEnd,s.transitionEnd(n,g))}),s.wrapperEl.addEventListener("transitionend",s.onSlideToWrapperTransitionEnd)),!0}function F9(e,t,n,r){e===void 0&&(e=0),n===void 0&&(n=!0),typeof e=="string"&&(e=parseInt(e,10));const i=this;if(i.destroyed)return;typeof t>"u"&&(t=i.params.speed);const s=i.grid&&i.params.grid&&i.params.grid.rows>1;let o=e;if(i.params.loop)if(i.virtual&&i.params.virtual.enabled)o=o+i.virtual.slidesBefore;else{let a;if(s){const v=o*i.params.grid.rows;a=i.slides.filter(C=>C.getAttribute("data-swiper-slide-index")*1===v)[0].column}else a=i.getSlideIndexByData(o);const l=s?Math.ceil(i.slides.length/i.params.grid.rows):i.slides.length,{centeredSlides:d}=i.params;let f=i.params.slidesPerView;f==="auto"?f=i.slidesPerViewDynamic():(f=Math.ceil(parseFloat(i.params.slidesPerView,10)),d&&f%2===0&&(f=f+1));let h=l-aC.getAttribute("data-swiper-slide-index")*1===v)[0].column}else o=i.getSlideIndexByData(o)}return requestAnimationFrame(()=>{i.slideTo(o,t,n,r)}),i}function B9(e,t,n){t===void 0&&(t=!0);const r=this,{enabled:i,params:s,animating:o}=r;if(!i||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);let a=s.slidesPerGroup;s.slidesPerView==="auto"&&s.slidesPerGroup===1&&s.slidesPerGroupAuto&&(a=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex{r.slideTo(r.activeIndex+l,e,t,n)}),!0}return s.rewind&&r.isEnd?r.slideTo(0,e,t,n):r.slideTo(r.activeIndex+l,e,t,n)}function V9(e,t,n){t===void 0&&(t=!0);const r=this,{params:i,snapGrid:s,slidesGrid:o,rtlTranslate:a,enabled:l,animating:d}=r;if(!l||r.destroyed)return r;typeof e>"u"&&(e=r.params.speed);const f=r.virtual&&i.virtual.enabled;if(i.loop){if(d&&!f&&i.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}const h=a?r.translate:-r.translate;function v(m){return m<0?-Math.floor(Math.abs(m)):Math.floor(m)}const C=v(h),w=s.map(m=>v(m));let S=s[w.indexOf(C)-1];if(typeof S>"u"&&i.cssMode){let m;s.forEach((g,y)=>{C>=g&&(m=y)}),typeof m<"u"&&(S=s[m>0?m-1:m])}let P=0;if(typeof S<"u"&&(P=o.indexOf(S),P<0&&(P=r.activeIndex-1),i.slidesPerView==="auto"&&i.slidesPerGroup===1&&i.slidesPerGroupAuto&&(P=P-r.slidesPerViewDynamic("previous",!0)+1,P=Math.max(P,0))),i.rewind&&r.isBeginning){const m=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(m,e,t,n)}else if(i.loop&&r.activeIndex===0&&i.cssMode)return requestAnimationFrame(()=>{r.slideTo(P,e,t,n)}),!0;return r.slideTo(P,e,t,n)}function H9(e,t,n){t===void 0&&(t=!0);const r=this;if(!r.destroyed)return typeof e>"u"&&(e=r.params.speed),r.slideTo(r.activeIndex,e,t,n)}function U9(e,t,n,r){t===void 0&&(t=!0),r===void 0&&(r=.5);const i=this;if(i.destroyed)return;typeof e>"u"&&(e=i.params.speed);let s=i.activeIndex;const o=Math.min(i.params.slidesPerGroupSkip,s),a=o+Math.floor((s-o)/i.params.slidesPerGroup),l=i.rtlTranslate?i.translate:-i.translate;if(l>=i.snapGrid[a]){const d=i.snapGrid[a],f=i.snapGrid[a+1];l-d>(f-d)*r&&(s+=i.params.slidesPerGroup)}else{const d=i.snapGrid[a-1],f=i.snapGrid[a];l-d<=(f-d)*r&&(s-=i.params.slidesPerGroup)}return s=Math.max(s,0),s=Math.min(s,i.slidesGrid.length-1),i.slideTo(s,e,t,n)}function W9(){const e=this;if(e.destroyed)return;const{params:t,slidesEl:n}=e,r=t.slidesPerView==="auto"?e.slidesPerViewDynamic():t.slidesPerView;let i=e.clickedIndex,s;const o=e.isElement?"swiper-slide":`.${t.slideClass}`;if(t.loop){if(e.animating)return;s=parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10),t.centeredSlides?ie.slides.length-e.loopedSlides+r/2?(e.loopFix(),i=e.getSlideIndex(pr(n,`${o}[data-swiper-slide-index="${s}"]`)[0]),pp(()=>{e.slideTo(i)})):e.slideTo(i):i>e.slides.length-r?(e.loopFix(),i=e.getSlideIndex(pr(n,`${o}[data-swiper-slide-index="${s}"]`)[0]),pp(()=>{e.slideTo(i)})):e.slideTo(i)}else e.slideTo(i)}var G9={slideTo:z9,slideToLoop:F9,slideNext:B9,slidePrev:V9,slideReset:H9,slideToClosest:U9,slideToClickedSlide:W9};function q9(e){const t=this,{params:n,slidesEl:r}=t;if(!n.loop||t.virtual&&t.params.virtual.enabled)return;const i=()=>{pr(r,`.${n.slideClass}, swiper-slide`).forEach((h,v)=>{h.setAttribute("data-swiper-slide-index",v)})},s=t.grid&&n.grid&&n.grid.rows>1,o=n.slidesPerGroup*(s?n.grid.rows:1),a=t.slides.length%o!==0,l=s&&t.slides.length%n.grid.rows!==0,d=f=>{for(let h=0;h1;d.length"u"?s=l.getSlideIndex(d.filter(R=>R.classList.contains(C.slideActiveClass))[0]):j=s;const L=r==="next"||!r,M=r==="prev"||!r;let O=0,I=0;const _=g?Math.ceil(d.length/C.grid.rows):d.length,z=(g?d[s].column:s)+(w&&typeof i>"u"?-S/2+.5:0);if(z=0;q-=1)d[q].column===U&&y.push(q)}else y.push(_-H-1)}}else if(z+S>_-m){I=Math.max(z-(_-m*2),P);for(let R=0;R{U.column===H&&E.push(q)}):E.push(H)}}if(l.__preventObserver__=!0,requestAnimationFrame(()=>{l.__preventObserver__=!1}),M&&y.forEach(R=>{d[R].swiperLoopMoveDOM=!0,v.prepend(d[R]),d[R].swiperLoopMoveDOM=!1}),L&&E.forEach(R=>{d[R].swiperLoopMoveDOM=!0,v.append(d[R]),d[R].swiperLoopMoveDOM=!1}),l.recalcSlides(),C.slidesPerView==="auto"?l.updateSlides():g&&(y.length>0&&M||E.length>0&&L)&&l.slides.forEach((R,H)=>{l.grid.updateSlide(H,R,l.slides)}),C.watchSlidesProgress&&l.updateSlidesOffset(),n){if(y.length>0&&M){if(typeof t>"u"){const R=l.slidesGrid[j],U=l.slidesGrid[j+O]-R;a?l.setTranslate(l.translate-U):(l.slideTo(j+Math.ceil(O),0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-U,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-U))}else if(i){const R=g?y.length/C.grid.rows:y.length;l.slideTo(l.activeIndex+R,0,!1,!0),l.touchEventsData.currentTranslate=l.translate}}else if(E.length>0&&L)if(typeof t>"u"){const R=l.slidesGrid[j],U=l.slidesGrid[j-I]-R;a?l.setTranslate(l.translate-U):(l.slideTo(j-I,0,!1,!0),i&&(l.touchEventsData.startTranslate=l.touchEventsData.startTranslate-U,l.touchEventsData.currentTranslate=l.touchEventsData.currentTranslate-U))}else{const R=g?E.length/C.grid.rows:E.length;l.slideTo(l.activeIndex-R,0,!1,!0)}}if(l.allowSlidePrev=f,l.allowSlideNext=h,l.controller&&l.controller.control&&!o){const R={slideRealIndex:t,direction:r,setTranslate:i,activeSlideIndex:s,byController:!0};Array.isArray(l.controller.control)?l.controller.control.forEach(H=>{!H.destroyed&&H.params.loop&&H.loopFix({...R,slideTo:H.params.slidesPerView===C.slidesPerView?n:!1})}):l.controller.control instanceof l.constructor&&l.controller.control.params.loop&&l.controller.control.loopFix({...R,slideTo:l.controller.control.params.slidesPerView===C.slidesPerView?n:!1})}l.emit("loopFix")}function Y9(){const e=this,{params:t,slidesEl:n}=e;if(!t.loop||e.virtual&&e.params.virtual.enabled)return;e.recalcSlides();const r=[];e.slides.forEach(i=>{const s=typeof i.swiperSlideIndex>"u"?i.getAttribute("data-swiper-slide-index")*1:i.swiperSlideIndex;r[s]=i}),e.slides.forEach(i=>{i.removeAttribute("data-swiper-slide-index")}),r.forEach(i=>{n.append(i)}),e.recalcSlides(),e.slideTo(e.realIndex,0)}var X9={loopCreate:q9,loopFix:K9,loopDestroy:Y9};function Q9(e){const t=this;if(!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const n=t.params.touchEventsTarget==="container"?t.el:t.wrapperEl;t.isElement&&(t.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=e?"grabbing":"grab",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1})}function Z9(){const e=this;e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e.isElement&&(e.__preventObserver__=!0),e[e.params.touchEventsTarget==="container"?"el":"wrapperEl"].style.cursor="",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1}))}var J9={setGrabCursor:Q9,unsetGrabCursor:Z9};function e7(e,t){t===void 0&&(t=this);function n(r){if(!r||r===to()||r===_n())return null;r.assignedSlot&&(r=r.assignedSlot);const i=r.closest(e);return!i&&!r.getRootNode?null:i||n(r.getRootNode().host)}return n(t)}function _v(e,t,n){const r=_n(),{params:i}=e,s=i.edgeSwipeDetection,o=i.edgeSwipeThreshold;return s&&(n<=o||n>=r.innerWidth-o)?s==="prevent"?(t.preventDefault(),!0):!1:!0}function t7(e){const t=this,n=to();let r=e;r.originalEvent&&(r=r.originalEvent);const i=t.touchEventsData;if(r.type==="pointerdown"){if(i.pointerId!==null&&i.pointerId!==r.pointerId)return;i.pointerId=r.pointerId}else r.type==="touchstart"&&r.targetTouches.length===1&&(i.touchId=r.targetTouches[0].identifier);if(r.type==="touchstart"){_v(t,r,r.targetTouches[0].pageX);return}const{params:s,touches:o,enabled:a}=t;if(!a||!s.simulateTouch&&r.pointerType==="mouse"||t.animating&&s.preventInteractionOnTransition)return;!t.animating&&s.cssMode&&s.loop&&t.loopFix();let l=r.target;if(s.touchEventsTarget==="wrapper"&&!t.wrapperEl.contains(l)||"which"in r&&r.which===3||"button"in r&&r.button>0||i.isTouched&&i.isMoved)return;const d=!!s.noSwipingClass&&s.noSwipingClass!=="",f=r.composedPath?r.composedPath():r.path;d&&r.target&&r.target.shadowRoot&&f&&(l=f[0]);const h=s.noSwipingSelector?s.noSwipingSelector:`.${s.noSwipingClass}`,v=!!(r.target&&r.target.shadowRoot);if(s.noSwiping&&(v?e7(h,l):l.closest(h))){t.allowClick=!0;return}if(s.swipeHandler&&!l.closest(s.swipeHandler))return;o.currentX=r.pageX,o.currentY=r.pageY;const C=o.currentX,w=o.currentY;if(!_v(t,r,C))return;Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=C,o.startY=w,i.touchStartTime=kc(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,s.threshold>0&&(i.allowThresholdMove=!1);let S=!0;l.matches(i.focusableElements)&&(S=!1,l.nodeName==="SELECT"&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==l&&n.activeElement.blur();const P=S&&t.allowTouchMove&&s.touchStartPreventDefault;(s.touchStartForcePreventDefault||P)&&!l.isContentEditable&&r.preventDefault(),s.freeMode&&s.freeMode.enabled&&t.freeMode&&t.animating&&!s.cssMode&&t.freeMode.onTouchStart(),t.emit("touchStart",r)}function n7(e){const t=to(),n=this,r=n.touchEventsData,{params:i,touches:s,rtlTranslate:o,enabled:a}=n;if(!a||!i.simulateTouch&&e.pointerType==="mouse")return;let l=e;if(l.originalEvent&&(l=l.originalEvent),l.type==="pointermove"&&(r.touchId!==null||l.pointerId!==r.pointerId))return;let d;if(l.type==="touchmove"){if(d=[...l.changedTouches].filter(L=>L.identifier===r.touchId)[0],!d||d.identifier!==r.touchId)return}else d=l;if(!r.isTouched){r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l);return}const f=d.pageX,h=d.pageY;if(l.preventedByNestedSwiper){s.startX=f,s.startY=h;return}if(!n.allowTouchMove){l.target.matches(r.focusableElements)||(n.allowClick=!1),r.isTouched&&(Object.assign(s,{startX:f,startY:h,currentX:f,currentY:h}),r.touchStartTime=kc());return}if(i.touchReleaseOnEdges&&!i.loop){if(n.isVertical()){if(hs.startY&&n.translate>=n.minTranslate()){r.isTouched=!1,r.isMoved=!1;return}}else if(fs.startX&&n.translate>=n.minTranslate())return}if(t.activeElement&&l.target===t.activeElement&&l.target.matches(r.focusableElements)){r.isMoved=!0,n.allowClick=!1;return}r.allowTouchCallbacks&&n.emit("touchMove",l),s.previousX=s.currentX,s.previousY=s.currentY,s.currentX=f,s.currentY=h;const v=s.currentX-s.startX,C=s.currentY-s.startY;if(n.params.threshold&&Math.sqrt(v**2+C**2)"u"){let L;n.isHorizontal()&&s.currentY===s.startY||n.isVertical()&&s.currentX===s.startX?r.isScrolling=!1:v*v+C*C>=25&&(L=Math.atan2(Math.abs(C),Math.abs(v))*180/Math.PI,r.isScrolling=n.isHorizontal()?L>i.touchAngle:90-L>i.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),typeof r.startMoving>"u"&&(s.currentX!==s.startX||s.currentY!==s.startY)&&(r.startMoving=!0),r.isScrolling||l.type==="touchmove"&&r.preventTouchMoveFromPointerMove){r.isTouched=!1;return}if(!r.startMoving)return;n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let w=n.isHorizontal()?v:C,S=n.isHorizontal()?s.currentX-s.previousX:s.currentY-s.previousY;i.oneWayMovement&&(w=Math.abs(w)*(o?1:-1),S=Math.abs(S)*(o?1:-1)),s.diff=w,w*=i.touchRatio,o&&(w=-w,S=-S);const P=n.touchesDirection;n.swipeDirection=w>0?"prev":"next",n.touchesDirection=S>0?"prev":"next";const m=n.params.loop&&!i.cssMode,g=n.touchesDirection==="next"&&n.allowSlideNext||n.touchesDirection==="prev"&&n.allowSlidePrev;if(!r.isMoved){if(m&&g&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const L=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});n.wrapperEl.dispatchEvent(L)}r.allowMomentumBounce=!1,i.grabCursor&&(n.allowSlideNext===!0||n.allowSlidePrev===!0)&&n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}let y;if(new Date().getTime(),r.isMoved&&r.allowThresholdMove&&P!==n.touchesDirection&&m&&g&&Math.abs(w)>=1){Object.assign(s,{startX:f,startY:h,currentX:f,currentY:h,startTranslate:r.currentTranslate}),r.loopSwapReset=!0,r.startTranslate=r.currentTranslate;return}n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=w+r.startTranslate;let E=!0,j=i.resistanceRatio;if(i.touchReleaseOnEdges&&(j=0),w>0?(m&&g&&!y&&r.allowThresholdMove&&r.currentTranslate>(i.centeredSlides?n.minTranslate()-n.slidesSizesGrid[n.activeIndex+1]:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(E=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+w)**j))):w<0&&(m&&g&&!y&&r.allowThresholdMove&&r.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.slidesSizesGrid[n.slidesSizesGrid.length-1]:n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-(i.slidesPerView==="auto"?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),r.currentTranslater.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&!n.allowSlideNext&&(r.currentTranslate=r.startTranslate),i.threshold>0)if(Math.abs(w)>i.threshold||r.allowThresholdMove){if(!r.allowThresholdMove){r.allowThresholdMove=!0,s.startX=s.currentX,s.startY=s.currentY,r.currentTranslate=r.startTranslate,s.diff=n.isHorizontal()?s.currentX-s.startX:s.currentY-s.startY;return}}else{r.currentTranslate=r.startTranslate;return}!i.followFinger||i.cssMode||((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function r7(e){const t=this,n=t.touchEventsData;let r=e;r.originalEvent&&(r=r.originalEvent);let i;if(r.type==="touchend"||r.type==="touchcancel"){if(i=[...r.changedTouches].filter(j=>j.identifier===n.touchId)[0],!i||i.identifier!==n.touchId)return}else{if(n.touchId!==null||r.pointerId!==n.pointerId)return;i=r}if(["pointercancel","pointerout","pointerleave","contextmenu"].includes(r.type)&&!(["pointercancel","contextmenu"].includes(r.type)&&(t.browser.isSafari||t.browser.isWebView)))return;n.pointerId=null,n.touchId=null;const{params:o,touches:a,rtlTranslate:l,slidesGrid:d,enabled:f}=t;if(!f||!o.simulateTouch&&r.pointerType==="mouse")return;if(n.allowTouchCallbacks&&t.emit("touchEnd",r),n.allowTouchCallbacks=!1,!n.isTouched){n.isMoved&&o.grabCursor&&t.setGrabCursor(!1),n.isMoved=!1,n.startMoving=!1;return}o.grabCursor&&n.isMoved&&n.isTouched&&(t.allowSlideNext===!0||t.allowSlidePrev===!0)&&t.setGrabCursor(!1);const h=kc(),v=h-n.touchStartTime;if(t.allowClick){const j=r.path||r.composedPath&&r.composedPath();t.updateClickedSlide(j&&j[0]||r.target,j),t.emit("tap click",r),v<300&&h-n.lastClickTime<300&&t.emit("doubleTap doubleClick",r)}if(n.lastClickTime=kc(),pp(()=>{t.destroyed||(t.allowClick=!0)}),!n.isTouched||!n.isMoved||!t.swipeDirection||a.diff===0&&!n.loopSwapReset||n.currentTranslate===n.startTranslate&&!n.loopSwapReset){n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;return}n.isTouched=!1,n.isMoved=!1,n.startMoving=!1;let C;if(o.followFinger?C=l?t.translate:-t.translate:C=-n.currentTranslate,o.cssMode)return;if(o.freeMode&&o.freeMode.enabled){t.freeMode.onTouchEnd({currentPos:C});return}const w=C>=-t.maxTranslate()&&!t.params.loop;let S=0,P=t.slidesSizesGrid[0];for(let j=0;j=d[j]&&C=d[j])&&(S=j,P=d[d.length-1]-d[d.length-2])}let m=null,g=null;o.rewind&&(t.isBeginning?g=o.virtual&&o.virtual.enabled&&t.virtual?t.virtual.slides.length-1:t.slides.length-1:t.isEnd&&(m=0));const y=(C-d[S])/P,E=So.longSwipesMs){if(!o.longSwipes){t.slideTo(t.activeIndex);return}t.swipeDirection==="next"&&(y>=o.longSwipesRatio?t.slideTo(o.rewind&&t.isEnd?m:S+E):t.slideTo(S)),t.swipeDirection==="prev"&&(y>1-o.longSwipesRatio?t.slideTo(S+E):g!==null&&y<0&&Math.abs(y)>o.longSwipesRatio?t.slideTo(g):t.slideTo(S))}else{if(!o.shortSwipes){t.slideTo(t.activeIndex);return}t.navigation&&(r.target===t.navigation.nextEl||r.target===t.navigation.prevEl)?r.target===t.navigation.nextEl?t.slideTo(S+E):t.slideTo(S):(t.swipeDirection==="next"&&t.slideTo(m!==null?m:S+E),t.swipeDirection==="prev"&&t.slideTo(g!==null?g:S))}}function Mv(){const e=this,{params:t,el:n}=e;if(n&&n.offsetWidth===0)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:r,allowSlidePrev:i,snapGrid:s}=e,o=e.virtual&&e.params.virtual.enabled;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses();const a=o&&t.loop;(t.slidesPerView==="auto"||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides&&!a?e.slideTo(e.slides.length-1,0,!1,!0):e.params.loop&&!o?e.slideToLoop(e.realIndex,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&(clearTimeout(e.autoplay.resizeTimeout),e.autoplay.resizeTimeout=setTimeout(()=>{e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.resume()},500)),e.allowSlidePrev=i,e.allowSlideNext=r,e.params.watchOverflow&&s!==e.snapGrid&&e.checkOverflow()}function i7(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function s7(){const e=this,{wrapperEl:t,rtlTranslate:n,enabled:r}=e;if(!r)return;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,e.translate===0&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();let i;const s=e.maxTranslate()-e.minTranslate();s===0?i=0:i=(e.translate-e.minTranslate())/s,i!==e.progress&&e.updateProgress(n?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}function o7(e){const t=this;Al(t,e.target),!(t.params.cssMode||t.params.slidesPerView!=="auto"&&!t.params.autoHeight)&&t.update()}function a7(){const e=this;e.documentTouchHandlerProceeded||(e.documentTouchHandlerProceeded=!0,e.params.touchReleaseOnEdges&&(e.el.style.touchAction="auto"))}const dx=(e,t)=>{const n=to(),{params:r,el:i,wrapperEl:s,device:o}=e,a=!!r.nested,l=t==="on"?"addEventListener":"removeEventListener",d=t;n[l]("touchstart",e.onDocumentTouchStart,{passive:!1,capture:a}),i[l]("touchstart",e.onTouchStart,{passive:!1}),i[l]("pointerdown",e.onTouchStart,{passive:!1}),n[l]("touchmove",e.onTouchMove,{passive:!1,capture:a}),n[l]("pointermove",e.onTouchMove,{passive:!1,capture:a}),n[l]("touchend",e.onTouchEnd,{passive:!0}),n[l]("pointerup",e.onTouchEnd,{passive:!0}),n[l]("pointercancel",e.onTouchEnd,{passive:!0}),n[l]("touchcancel",e.onTouchEnd,{passive:!0}),n[l]("pointerout",e.onTouchEnd,{passive:!0}),n[l]("pointerleave",e.onTouchEnd,{passive:!0}),n[l]("contextmenu",e.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&i[l]("click",e.onClick,!0),r.cssMode&&s[l]("scroll",e.onScroll),r.updateOnWindowResize?e[d](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",Mv,!0):e[d]("observerUpdate",Mv,!0),i[l]("load",e.onLoad,{capture:!0})};function l7(){const e=this,{params:t}=e;e.onTouchStart=t7.bind(e),e.onTouchMove=n7.bind(e),e.onTouchEnd=r7.bind(e),e.onDocumentTouchStart=a7.bind(e),t.cssMode&&(e.onScroll=s7.bind(e)),e.onClick=i7.bind(e),e.onLoad=o7.bind(e),dx(e,"on")}function c7(){dx(this,"off")}var u7={attachEvents:l7,detachEvents:c7};const Ov=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;function d7(){const e=this,{realIndex:t,initialized:n,params:r,el:i}=e,s=r.breakpoints;if(!s||s&&Object.keys(s).length===0)return;const o=e.getBreakpoint(s,e.params.breakpointsBase,e.el);if(!o||e.currentBreakpoint===o)return;const l=(o in s?s[o]:void 0)||e.originalParams,d=Ov(e,r),f=Ov(e,l),h=e.params.grabCursor,v=l.grabCursor,C=r.enabled;d&&!f?(i.classList.remove(`${r.containerModifierClass}grid`,`${r.containerModifierClass}grid-column`),e.emitContainerClasses()):!d&&f&&(i.classList.add(`${r.containerModifierClass}grid`),(l.grid.fill&&l.grid.fill==="column"||!l.grid.fill&&r.grid.fill==="column")&&i.classList.add(`${r.containerModifierClass}grid-column`),e.emitContainerClasses()),h&&!v?e.unsetGrabCursor():!h&&v&&e.setGrabCursor(),["navigation","pagination","scrollbar"].forEach(y=>{if(typeof l[y]>"u")return;const E=r[y]&&r[y].enabled,j=l[y]&&l[y].enabled;E&&!j&&e[y].disable(),!E&&j&&e[y].enable()});const w=l.direction&&l.direction!==r.direction,S=r.loop&&(l.slidesPerView!==r.slidesPerView||w),P=r.loop;w&&n&&e.changeDirection(),bn(e.params,l);const m=e.params.enabled,g=e.params.loop;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),C&&!m?e.disable():!C&&m&&e.enable(),e.currentBreakpoint=o,e.emit("_beforeBreakpoint",l),n&&(S?(e.loopDestroy(),e.loopCreate(t),e.updateSlides()):!P&&g?(e.loopCreate(t),e.updateSlides()):P&&!g&&e.loopDestroy()),e.emit("breakpoint",l)}function f7(e,t,n){if(t===void 0&&(t="window"),!e||t==="container"&&!n)return;let r=!1;const i=_n(),s=t==="window"?i.innerHeight:n.clientHeight,o=Object.keys(e).map(a=>{if(typeof a=="string"&&a.indexOf("@")===0){const l=parseFloat(a.substr(1));return{value:s*l,point:a}}return{value:a,point:a}});o.sort((a,l)=>parseInt(a.value,10)-parseInt(l.value,10));for(let a=0;a{typeof r=="object"?Object.keys(r).forEach(i=>{r[i]&&n.push(t+i)}):typeof r=="string"&&n.push(t+r)}),n}function m7(){const e=this,{classNames:t,params:n,rtl:r,el:i,device:s}=e,o=h7(["initialized",n.direction,{"free-mode":e.params.freeMode&&n.freeMode.enabled},{autoheight:n.autoHeight},{rtl:r},{grid:n.grid&&n.grid.rows>1},{"grid-column":n.grid&&n.grid.rows>1&&n.grid.fill==="column"},{android:s.android},{ios:s.ios},{"css-mode":n.cssMode},{centered:n.cssMode&&n.centeredSlides},{"watch-progress":n.watchSlidesProgress}],n.containerModifierClass);t.push(...o),i.classList.add(...t),e.emitContainerClasses()}function g7(){const e=this,{el:t,classNames:n}=e;t.classList.remove(...n),e.emitContainerClasses()}var v7={addClasses:m7,removeClasses:g7};function y7(){const e=this,{isLocked:t,params:n}=e,{slidesOffsetBefore:r}=n;if(r){const i=e.slides.length-1,s=e.slidesGrid[i]+e.slidesSizesGrid[i]+r*2;e.isLocked=e.size>s}else e.isLocked=e.snapGrid.length===1;n.allowSlideNext===!0&&(e.allowSlideNext=!e.isLocked),n.allowSlidePrev===!0&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}var w7={checkOverflow:y7},gp={init:!0,direction:"horizontal",oneWayMovement:!1,swiperElementNodeName:"SWIPER-CONTAINER",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,eventsPrefix:"swiper",enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopAddBlankSlides:!0,loopAdditionalSlides:0,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-blank",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideFullyVisibleClass:"swiper-slide-fully-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function x7(e,t){return function(r){r===void 0&&(r={});const i=Object.keys(r)[0],s=r[i];if(typeof s!="object"||s===null){bn(t,r);return}if(e[i]===!0&&(e[i]={enabled:!0}),i==="navigation"&&e[i]&&e[i].enabled&&!e[i].prevEl&&!e[i].nextEl&&(e[i].auto=!0),["pagination","scrollbar"].indexOf(i)>=0&&e[i]&&e[i].enabled&&!e[i].el&&(e[i].auto=!0),!(i in e&&"enabled"in s)){bn(t,r);return}typeof e[i]=="object"&&!("enabled"in e[i])&&(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),bn(t,r)}}const Gd={eventsEmitter:v9,update:T9,translate:I9,transition:D9,slide:G9,loop:X9,grabCursor:J9,events:u7,breakpoints:p7,checkOverflow:w7,classes:v7},qd={};let um=class Cr{constructor(){let t,n;for(var r=arguments.length,i=new Array(r),s=0;s1){const f=[];return o.querySelectorAll(n.el).forEach(h=>{const v=bn({},n,{el:h});f.push(new Cr(v))}),f}const a=this;a.__swiper__=!0,a.support=lx(),a.device=cx({userAgent:n.userAgent}),a.browser=h9(),a.eventsListeners={},a.eventsAnyListeners=[],a.modules=[...a.__modules__],n.modules&&Array.isArray(n.modules)&&a.modules.push(...n.modules);const l={};a.modules.forEach(f=>{f({params:n,swiper:a,extendParams:x7(n,l),on:a.on.bind(a),once:a.once.bind(a),off:a.off.bind(a),emit:a.emit.bind(a)})});const d=bn({},gp,l);return a.params=bn({},d,qd,n),a.originalParams=bn({},a.params),a.passedParams=bn({},n),a.params&&a.params.on&&Object.keys(a.params.on).forEach(f=>{a.on(f,a.params.on[f])}),a.params&&a.params.onAny&&a.onAny(a.params.onAny),Object.assign(a,{enabled:a.params.enabled,el:t,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal(){return a.params.direction==="horizontal"},isVertical(){return a.params.direction==="vertical"},activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:a.params.allowSlideNext,allowSlidePrev:a.params.allowSlidePrev,touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:a.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,pointerId:null,touchId:null},allowClick:!0,allowTouchMove:a.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),a.emit("_swiper"),a.params.init&&a.init(),a}getDirectionLabel(t){return this.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}getSlideIndex(t){const{slidesEl:n,params:r}=this,i=pr(n,`.${r.slideClass}, swiper-slide`),s=jc(i[0]);return jc(t)-s}getSlideIndexByData(t){return this.getSlideIndex(this.slides.filter(n=>n.getAttribute("data-swiper-slide-index")*1===t)[0])}recalcSlides(){const t=this,{slidesEl:n,params:r}=t;t.slides=pr(n,`.${r.slideClass}, swiper-slide`)}enable(){const t=this;t.enabled||(t.enabled=!0,t.params.grabCursor&&t.setGrabCursor(),t.emit("enable"))}disable(){const t=this;t.enabled&&(t.enabled=!1,t.params.grabCursor&&t.unsetGrabCursor(),t.emit("disable"))}setProgress(t,n){const r=this;t=Math.min(Math.max(t,0),1);const i=r.minTranslate(),o=(r.maxTranslate()-i)*t+i;r.translateTo(o,typeof n>"u"?0:n),r.updateActiveIndex(),r.updateSlidesClasses()}emitContainerClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=t.el.className.split(" ").filter(r=>r.indexOf("swiper")===0||r.indexOf(t.params.containerModifierClass)===0);t.emit("_containerClasses",n.join(" "))}getSlideClasses(t){const n=this;return n.destroyed?"":t.className.split(" ").filter(r=>r.indexOf("swiper-slide")===0||r.indexOf(n.params.slideClass)===0).join(" ")}emitSlidesClasses(){const t=this;if(!t.params._emitClasses||!t.el)return;const n=[];t.slides.forEach(r=>{const i=t.getSlideClasses(r);n.push({slideEl:r,classNames:i}),t.emit("_slideClass",r,i)}),t.emit("_slideClasses",n)}slidesPerViewDynamic(t,n){t===void 0&&(t="current"),n===void 0&&(n=!1);const r=this,{params:i,slides:s,slidesGrid:o,slidesSizesGrid:a,size:l,activeIndex:d}=r;let f=1;if(typeof i.slidesPerView=="number")return i.slidesPerView;if(i.centeredSlides){let h=s[d]?Math.ceil(s[d].swiperSlideSize):0,v;for(let C=d+1;Cl&&(v=!0));for(let C=d-1;C>=0;C-=1)s[C]&&!v&&(h+=s[C].swiperSlideSize,f+=1,h>l&&(v=!0))}else if(t==="current")for(let h=d+1;h=0;h-=1)o[d]-o[h]{o.complete&&Al(t,o)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses();function i(){const o=t.rtlTranslate?t.translate*-1:t.translate,a=Math.min(Math.max(o,t.maxTranslate()),t.minTranslate());t.setTranslate(a),t.updateActiveIndex(),t.updateSlidesClasses()}let s;if(r.freeMode&&r.freeMode.enabled&&!r.cssMode)i(),r.autoHeight&&t.updateAutoHeight();else{if((r.slidesPerView==="auto"||r.slidesPerView>1)&&t.isEnd&&!r.centeredSlides){const o=t.virtual&&r.virtual.enabled?t.virtual.slides:t.slides;s=t.slideTo(o.length-1,0,!1,!0)}else s=t.slideTo(t.activeIndex,0,!1,!0);s||i()}r.watchOverflow&&n!==t.snapGrid&&t.checkOverflow(),t.emit("update")}changeDirection(t,n){n===void 0&&(n=!0);const r=this,i=r.params.direction;return t||(t=i==="horizontal"?"vertical":"horizontal"),t===i||t!=="horizontal"&&t!=="vertical"||(r.el.classList.remove(`${r.params.containerModifierClass}${i}`),r.el.classList.add(`${r.params.containerModifierClass}${t}`),r.emitContainerClasses(),r.params.direction=t,r.slides.forEach(s=>{t==="vertical"?s.style.width="":s.style.height=""}),r.emit("changeDirection"),n&&r.update()),r}changeLanguageDirection(t){const n=this;n.rtl&&t==="rtl"||!n.rtl&&t==="ltr"||(n.rtl=t==="rtl",n.rtlTranslate=n.params.direction==="horizontal"&&n.rtl,n.rtl?(n.el.classList.add(`${n.params.containerModifierClass}rtl`),n.el.dir="rtl"):(n.el.classList.remove(`${n.params.containerModifierClass}rtl`),n.el.dir="ltr"),n.update())}mount(t){const n=this;if(n.mounted)return!0;let r=t||n.params.el;if(typeof r=="string"&&(r=document.querySelector(r)),!r)return!1;r.swiper=n,r.parentNode&&r.parentNode.host&&r.parentNode.host.nodeName===n.params.swiperElementNodeName.toUpperCase()&&(n.isElement=!0);const i=()=>`.${(n.params.wrapperClass||"").trim().split(" ").join(".")}`;let o=r&&r.shadowRoot&&r.shadowRoot.querySelector?r.shadowRoot.querySelector(i()):pr(r,i())[0];return!o&&n.params.createElements&&(o=Pc("div",n.params.wrapperClass),r.append(o),pr(r,`.${n.params.slideClass}`).forEach(a=>{o.append(a)})),Object.assign(n,{el:r,wrapperEl:o,slidesEl:n.isElement&&!r.parentNode.host.slideSlots?r.parentNode.host:o,hostEl:n.isElement?r.parentNode.host:r,mounted:!0,rtl:r.dir.toLowerCase()==="rtl"||Zr(r,"direction")==="rtl",rtlTranslate:n.params.direction==="horizontal"&&(r.dir.toLowerCase()==="rtl"||Zr(r,"direction")==="rtl"),wrongRTL:Zr(o,"display")==="-webkit-box"}),!0}init(t){const n=this;if(n.initialized||n.mount(t)===!1)return n;n.emit("beforeInit"),n.params.breakpoints&&n.setBreakpoint(),n.addClasses(),n.updateSize(),n.updateSlides(),n.params.watchOverflow&&n.checkOverflow(),n.params.grabCursor&&n.enabled&&n.setGrabCursor(),n.params.loop&&n.virtual&&n.params.virtual.enabled?n.slideTo(n.params.initialSlide+n.virtual.slidesBefore,0,n.params.runCallbacksOnInit,!1,!0):n.slideTo(n.params.initialSlide,0,n.params.runCallbacksOnInit,!1,!0),n.params.loop&&n.loopCreate(),n.attachEvents();const i=[...n.el.querySelectorAll('[loading="lazy"]')];return n.isElement&&i.push(...n.hostEl.querySelectorAll('[loading="lazy"]')),i.forEach(s=>{s.complete?Al(n,s):s.addEventListener("load",o=>{Al(n,o.target)})}),mp(n),n.initialized=!0,mp(n),n.emit("init"),n.emit("afterInit"),n}destroy(t,n){t===void 0&&(t=!0),n===void 0&&(n=!0);const r=this,{params:i,el:s,wrapperEl:o,slides:a}=r;return typeof r.params>"u"||r.destroyed||(r.emit("beforeDestroy"),r.initialized=!1,r.detachEvents(),i.loop&&r.loopDestroy(),n&&(r.removeClasses(),s.removeAttribute("style"),o.removeAttribute("style"),a&&a.length&&a.forEach(l=>{l.classList.remove(i.slideVisibleClass,i.slideFullyVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass),l.removeAttribute("style"),l.removeAttribute("data-swiper-slide-index")})),r.emit("destroy"),Object.keys(r.eventsListeners).forEach(l=>{r.off(l)}),t!==!1&&(r.el.swiper=null,r9(r)),r.destroyed=!0),null}static extendDefaults(t){bn(qd,t)}static get extendedDefaults(){return qd}static get defaults(){return gp}static installModule(t){Cr.prototype.__modules__||(Cr.prototype.__modules__=[]);const n=Cr.prototype.__modules__;typeof t=="function"&&n.indexOf(t)<0&&n.push(t)}static use(t){return Array.isArray(t)?(t.forEach(n=>Cr.installModule(n)),Cr):(Cr.installModule(t),Cr)}};Object.keys(Gd).forEach(e=>{Object.keys(Gd[e]).forEach(t=>{um.prototype[t]=Gd[e][t]})});um.use([m9,g9]);const fx=["eventsPrefix","injectStyles","injectStylesUrls","modules","init","_direction","oneWayMovement","swiperElementNodeName","touchEventsTarget","initialSlide","_speed","cssMode","updateOnWindowResize","resizeObserver","nested","focusableElements","_enabled","_width","_height","preventInteractionOnTransition","userAgent","url","_edgeSwipeDetection","_edgeSwipeThreshold","_freeMode","_autoHeight","setWrapperSize","virtualTranslate","_effect","breakpoints","breakpointsBase","_spaceBetween","_slidesPerView","maxBackfaceHiddenSlides","_grid","_slidesPerGroup","_slidesPerGroupSkip","_slidesPerGroupAuto","_centeredSlides","_centeredSlidesBounds","_slidesOffsetBefore","_slidesOffsetAfter","normalizeSlideIndex","_centerInsufficientSlides","_watchOverflow","roundLengths","touchRatio","touchAngle","simulateTouch","_shortSwipes","_longSwipes","longSwipesRatio","longSwipesMs","_followFinger","allowTouchMove","_threshold","touchMoveStopPropagation","touchStartPreventDefault","touchStartForcePreventDefault","touchReleaseOnEdges","uniqueNavElements","_resistance","_resistanceRatio","_watchSlidesProgress","_grabCursor","preventClicks","preventClicksPropagation","_slideToClickedSlide","_loop","loopAdditionalSlides","loopAddBlankSlides","loopPreventsSliding","_rewind","_allowSlidePrev","_allowSlideNext","_swipeHandler","_noSwiping","noSwipingClass","noSwipingSelector","passiveListeners","containerModifierClass","slideClass","slideActiveClass","slideVisibleClass","slideFullyVisibleClass","slideNextClass","slidePrevClass","slideBlankClass","wrapperClass","lazyPreloaderClass","lazyPreloadPrevNext","runCallbacksOnInit","observer","observeParents","observeSlideChildren","a11y","_autoplay","_controller","coverflowEffect","cubeEffect","fadeEffect","flipEffect","creativeEffect","cardsEffect","hashNavigation","history","keyboard","mousewheel","_navigation","_pagination","parallax","_scrollbar","_thumbs","virtual","zoom","control"];function Vi(e){return typeof e=="object"&&e!==null&&e.constructor&&Object.prototype.toString.call(e).slice(8,-1)==="Object"&&!e.__swiper__}function As(e,t){const n=["__proto__","constructor","prototype"];Object.keys(t).filter(r=>n.indexOf(r)<0).forEach(r=>{typeof e[r]>"u"?e[r]=t[r]:Vi(t[r])&&Vi(e[r])&&Object.keys(t[r]).length>0?t[r].__swiper__?e[r]=t[r]:As(e[r],t[r]):e[r]=t[r]})}function px(e){return e===void 0&&(e={}),e.navigation&&typeof e.navigation.nextEl>"u"&&typeof e.navigation.prevEl>"u"}function hx(e){return e===void 0&&(e={}),e.pagination&&typeof e.pagination.el>"u"}function mx(e){return e===void 0&&(e={}),e.scrollbar&&typeof e.scrollbar.el>"u"}function gx(e){e===void 0&&(e="");const t=e.split(" ").map(r=>r.trim()).filter(r=>!!r),n=[];return t.forEach(r=>{n.indexOf(r)<0&&n.push(r)}),n.join(" ")}function b7(e){return e===void 0&&(e=""),e?e.includes("swiper-wrapper")?e:`swiper-wrapper ${e}`:"swiper-wrapper"}function S7(e){let{swiper:t,slides:n,passedParams:r,changedParams:i,nextEl:s,prevEl:o,scrollbarEl:a,paginationEl:l}=e;const d=i.filter(I=>I!=="children"&&I!=="direction"&&I!=="wrapperClass"),{params:f,pagination:h,navigation:v,scrollbar:C,virtual:w,thumbs:S}=t;let P,m,g,y,E,j,L,M;i.includes("thumbs")&&r.thumbs&&r.thumbs.swiper&&f.thumbs&&!f.thumbs.swiper&&(P=!0),i.includes("controller")&&r.controller&&r.controller.control&&f.controller&&!f.controller.control&&(m=!0),i.includes("pagination")&&r.pagination&&(r.pagination.el||l)&&(f.pagination||f.pagination===!1)&&h&&!h.el&&(g=!0),i.includes("scrollbar")&&r.scrollbar&&(r.scrollbar.el||a)&&(f.scrollbar||f.scrollbar===!1)&&C&&!C.el&&(y=!0),i.includes("navigation")&&r.navigation&&(r.navigation.prevEl||o)&&(r.navigation.nextEl||s)&&(f.navigation||f.navigation===!1)&&v&&!v.prevEl&&!v.nextEl&&(E=!0);const O=I=>{t[I]&&(t[I].destroy(),I==="navigation"?(t.isElement&&(t[I].prevEl.remove(),t[I].nextEl.remove()),f[I].prevEl=void 0,f[I].nextEl=void 0,t[I].prevEl=void 0,t[I].nextEl=void 0):(t.isElement&&t[I].el.remove(),f[I].el=void 0,t[I].el=void 0))};i.includes("loop")&&t.isElement&&(f.loop&&!r.loop?j=!0:!f.loop&&r.loop?L=!0:M=!0),d.forEach(I=>{if(Vi(f[I])&&Vi(r[I]))Object.assign(f[I],r[I]),(I==="navigation"||I==="pagination"||I==="scrollbar")&&"enabled"in r[I]&&!r[I].enabled&&O(I);else{const _=r[I];(_===!0||_===!1)&&(I==="navigation"||I==="pagination"||I==="scrollbar")?_===!1&&O(I):f[I]=r[I]}}),d.includes("controller")&&!m&&t.controller&&t.controller.control&&f.controller&&f.controller.control&&(t.controller.control=f.controller.control),i.includes("children")&&n&&w&&f.virtual.enabled?(w.slides=n,w.update(!0)):i.includes("virtual")&&w&&f.virtual.enabled&&(n&&(w.slides=n),w.update(!0)),i.includes("children")&&n&&f.loop&&(M=!0),P&&S.init()&&S.update(!0),m&&(t.controller.control=f.controller.control),g&&(t.isElement&&(!l||typeof l=="string")&&(l=document.createElement("div"),l.classList.add("swiper-pagination"),l.part.add("pagination"),t.el.appendChild(l)),l&&(f.pagination.el=l),h.init(),h.render(),h.update()),y&&(t.isElement&&(!a||typeof a=="string")&&(a=document.createElement("div"),a.classList.add("swiper-scrollbar"),a.part.add("scrollbar"),t.el.appendChild(a)),a&&(f.scrollbar.el=a),C.init(),C.updateSize(),C.setTranslate()),E&&(t.isElement&&((!s||typeof s=="string")&&(s=document.createElement("div"),s.classList.add("swiper-button-next"),s.innerHTML=t.hostEl.constructor.nextButtonSvg,s.part.add("button-next"),t.el.appendChild(s)),(!o||typeof o=="string")&&(o=document.createElement("div"),o.classList.add("swiper-button-prev"),o.innerHTML=t.hostEl.constructor.prevButtonSvg,o.part.add("button-prev"),t.el.appendChild(o))),s&&(f.navigation.nextEl=s),o&&(f.navigation.prevEl=o),v.init(),v.update()),i.includes("allowSlideNext")&&(t.allowSlideNext=r.allowSlideNext),i.includes("allowSlidePrev")&&(t.allowSlidePrev=r.allowSlidePrev),i.includes("direction")&&t.changeDirection(r.direction,!1),(j||M)&&t.loopDestroy(),(L||M)&&t.loopCreate(),t.update()}function C7(e,t){e===void 0&&(e={}),t===void 0&&(t=!0);const n={on:{}},r={},i={};As(n,gp),n._emitClasses=!0,n.init=!1;const s={},o=fx.map(l=>l.replace(/_/,"")),a=Object.assign({},e);return Object.keys(a).forEach(l=>{typeof e[l]>"u"||(o.indexOf(l)>=0?Vi(e[l])?(n[l]={},i[l]={},As(n[l],e[l]),As(i[l],e[l])):(n[l]=e[l],i[l]=e[l]):l.search(/on[A-Z]/)===0&&typeof e[l]=="function"?t?r[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:n.on[`${l[2].toLowerCase()}${l.substr(3)}`]=e[l]:s[l]=e[l])}),["navigation","pagination","scrollbar"].forEach(l=>{n[l]===!0&&(n[l]={}),n[l]===!1&&delete n[l]}),{params:n,passedParams:i,rest:s,events:r}}function k7(e,t){let{el:n,nextEl:r,prevEl:i,paginationEl:s,scrollbarEl:o,swiper:a}=e;px(t)&&r&&i&&(a.params.navigation.nextEl=r,a.originalParams.navigation.nextEl=r,a.params.navigation.prevEl=i,a.originalParams.navigation.prevEl=i),hx(t)&&s&&(a.params.pagination.el=s,a.originalParams.pagination.el=s),mx(t)&&o&&(a.params.scrollbar.el=o,a.originalParams.scrollbar.el=o),a.init(n)}function E7(e,t,n,r,i){const s=[];if(!t)return s;const o=l=>{s.indexOf(l)<0&&s.push(l)};if(n&&r){const l=r.map(i),d=n.map(i);l.join("")!==d.join("")&&o("children"),r.length!==n.length&&o("children")}return fx.filter(l=>l[0]==="_").map(l=>l.replace(/_/,"")).forEach(l=>{if(l in e&&l in t)if(Vi(e[l])&&Vi(t[l])){const d=Object.keys(e[l]),f=Object.keys(t[l]);d.length!==f.length?o(l):(d.forEach(h=>{e[l][h]!==t[l][h]&&o(l)}),f.forEach(h=>{e[l][h]!==t[l][h]&&o(l)}))}else e[l]!==t[l]&&o(l)}),s}const P7=e=>{!e||e.destroyed||!e.params.virtual||e.params.virtual&&!e.params.virtual.enabled||(e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.parallax&&e.params.parallax&&e.params.parallax.enabled&&e.parallax.setTranslate())};function Tc(){return Tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t{vx(n)?t.push(n):n.props&&n.props.children&&yx(n.props.children).forEach(r=>t.push(r))}),t}function j7(e){const t=[],n={"container-start":[],"container-end":[],"wrapper-start":[],"wrapper-end":[]};return ie.Children.toArray(e).forEach(r=>{if(vx(r))t.push(r);else if(r.props&&r.props.slot&&n[r.props.slot])n[r.props.slot].push(r);else if(r.props&&r.props.children){const i=yx(r.props.children);i.length>0?i.forEach(s=>t.push(s)):n["container-end"].push(r)}else n["container-end"].push(r)}),{slides:t,slots:n}}function T7(e,t,n){if(!n)return null;const r=f=>{let h=f;return f<0?h=t.length+f:h>=t.length&&(h=h-t.length),h},i=e.isHorizontal()?{[e.rtlTranslate?"right":"left"]:`${n.offset}px`}:{top:`${n.offset}px`},{from:s,to:o}=n,a=e.params.loop?-t.length:0,l=e.params.loop?t.length*2:t.length,d=[];for(let f=a;f=s&&f<=o&&d.push(t[r(f)]);return d.map((f,h)=>ie.cloneElement(f,{swiper:e,style:i,key:f.props.virtualIndex||f.key||`slide-${h}`}))}function Go(e,t){return typeof window>"u"?k.useEffect(e,t):k.useLayoutEffect(e,t)}const Iv=k.createContext(null),N7=k.createContext(null),wx=k.forwardRef(function(e,t){let{className:n,tag:r="div",wrapperTag:i="div",children:s,onSwiper:o,...a}=e===void 0?{}:e,l=!1;const[d,f]=k.useState("swiper"),[h,v]=k.useState(null),[C,w]=k.useState(!1),S=k.useRef(!1),P=k.useRef(null),m=k.useRef(null),g=k.useRef(null),y=k.useRef(null),E=k.useRef(null),j=k.useRef(null),L=k.useRef(null),M=k.useRef(null),{params:O,passedParams:I,rest:_,events:B}=C7(a),{slides:z,slots:R}=j7(s),H=()=>{w(!C)};Object.assign(O.on,{_containerClasses(Y,te){f(te)}});const U=()=>{Object.assign(O.on,B),l=!0;const Y={...O};if(delete Y.wrapperClass,m.current=new um(Y),m.current.virtual&&m.current.params.virtual.enabled){m.current.virtual.slides=z;const te={cache:!1,slides:z,renderExternal:v,renderExternalUpdate:!1};As(m.current.params.virtual,te),As(m.current.originalParams.virtual,te)}};P.current||U(),m.current&&m.current.on("_beforeBreakpoint",H);const q=()=>{l||!B||!m.current||Object.keys(B).forEach(Y=>{m.current.on(Y,B[Y])})},ee=()=>{!B||!m.current||Object.keys(B).forEach(Y=>{m.current.off(Y,B[Y])})};k.useEffect(()=>()=>{m.current&&m.current.off("_beforeBreakpoint",H)}),k.useEffect(()=>{!S.current&&m.current&&(m.current.emitSlidesClasses(),S.current=!0)}),Go(()=>{if(t&&(t.current=P.current),!!P.current)return m.current.destroyed&&U(),k7({el:P.current,nextEl:E.current,prevEl:j.current,paginationEl:L.current,scrollbarEl:M.current,swiper:m.current},O),o&&!m.current.destroyed&&o(m.current),()=>{m.current&&!m.current.destroyed&&m.current.destroy(!0,!1)}},[]),Go(()=>{q();const Y=E7(I,g.current,z,y.current,te=>te.key);return g.current=I,y.current=z,Y.length&&m.current&&!m.current.destroyed&&S7({swiper:m.current,slides:z,passedParams:I,changedParams:Y,nextEl:E.current,prevEl:j.current,scrollbarEl:M.current,paginationEl:L.current}),()=>{ee()}}),Go(()=>{P7(m.current)},[h]);function A(){return O.virtual?T7(m.current,z,h):z.map((Y,te)=>ie.cloneElement(Y,{swiper:m.current,swiperSlideIndex:te}))}return ie.createElement(r,Tc({ref:P,className:gx(`${d}${n?` ${n}`:""}`)},_),ie.createElement(N7.Provider,{value:m.current},R["container-start"],ie.createElement(i,{className:b7(O.wrapperClass)},R["wrapper-start"],A(),R["wrapper-end"]),px(O)&&ie.createElement(ie.Fragment,null,ie.createElement("div",{ref:j,className:"swiper-button-prev"}),ie.createElement("div",{ref:E,className:"swiper-button-next"})),mx(O)&&ie.createElement("div",{ref:M,className:"swiper-scrollbar"}),hx(O)&&ie.createElement("div",{ref:L,className:"swiper-pagination"}),R["container-end"]))});wx.displayName="Swiper";const xx=k.forwardRef(function(e,t){let{tag:n="div",children:r,className:i="",swiper:s,zoom:o,lazy:a,virtualIndex:l,swiperSlideIndex:d,...f}=e===void 0?{}:e;const h=k.useRef(null),[v,C]=k.useState("swiper-slide"),[w,S]=k.useState(!1);function P(E,j,L){j===h.current&&C(L)}Go(()=>{if(typeof d<"u"&&(h.current.swiperSlideIndex=d),t&&(t.current=h.current),!(!h.current||!s)){if(s.destroyed){v!=="swiper-slide"&&C("swiper-slide");return}return s.on("_slideClass",P),()=>{s&&s.off("_slideClass",P)}}}),Go(()=>{s&&h.current&&!s.destroyed&&C(s.getSlideClasses(h.current))},[s]);const m={isActive:v.indexOf("swiper-slide-active")>=0,isVisible:v.indexOf("swiper-slide-visible")>=0,isPrev:v.indexOf("swiper-slide-prev")>=0,isNext:v.indexOf("swiper-slide-next")>=0},g=()=>typeof r=="function"?r(m):r,y=()=>{S(!0)};return ie.createElement(n,Tc({ref:h,className:gx(`${v}${i?` ${i}`:""}`),"data-swiper-slide-index":l,onLoad:y},f),o&&ie.createElement(Iv.Provider,{value:m},ie.createElement("div",{className:"swiper-zoom-container","data-swiper-zoom":typeof o=="number"?o:void 0},g(),a&&!w&&ie.createElement("div",{className:"swiper-lazy-preloader"}))),!o&&ie.createElement(Iv.Provider,{value:m},g(),a&&!w&&ie.createElement("div",{className:"swiper-lazy-preloader"})))});xx.displayName="SwiperSlide";const L7=({products:e})=>c.jsx(wx,{slidesPerView:1,spaceBetween:10,centeredSlides:!0,loop:!0,pagination:{clickable:!0},modules:[c9,u9],className:"mySwiper w-[96vw] home:hidden",breakpoints:{640:{slidesPerView:2,spaceBetween:10,centeredSlides:!1},950:{slidesPerView:3,spaceBetween:10,centeredSlides:!1}},children:e==null?void 0:e.map(t=>c.jsx(xx,{className:"hover:bg-slate-300 hover:rounded-3xl flex justify-center",children:c.jsx(em,{...t})},t.id))}),_7=()=>{const[e,t]=k.useState(),[n,r]=k.useState(),[i,s]=k.useState(!1),o=ct(),a=()=>{const l=localStorage.getItem("token");o(l?`${ve}category`:`${ve}register`)};return k.useEffect(()=>{(async()=>{try{s(!0),r(void 0);const d=await rr.fetchProductsByRating();t(d)}catch(d){d!=null&&typeof d=="object"&&"message"in d&&typeof d.message=="string"&&r(d.message)}finally{s(!1)}})()},[]),c.jsxs("div",{className:"flex flex-col items-center justify-around mx-8 text-center",children:[c.jsxs("h1",{className:"my-4",children:["Welcome to the ",c.jsx("br",{className:"sm:hidden"}),"E-commerce website!"]}),c.jsx(XL,{}),c.jsx("div",{children:c.jsxs("div",{className:"flex flex-col items-center",children:[c.jsx("h1",{className:"my-8 text-3xl",children:"Best sellers"}),n&&c.jsx("h2",{className:"error",children:n}),i&&c.jsx(e9,{}),!n&&!i&&c.jsxs(c.Fragment,{children:[c.jsx(JL,{products:(e==null?void 0:e.products)??[]}),c.jsx(L7,{products:(e==null?void 0:e.products)??[]})]})]})}),c.jsx("h2",{className:"mt-24 text-xl sm:text-2xl",children:"Step into E-commerce's world of new discoveries! Explore our latest products and find your next favorite."}),c.jsx("button",{className:"action-button w-36 h-12 my-8",onClick:a,children:"Explore"})]})},M7=()=>{const{login:e,isLoggedIn:t}=k.useContext(Nn),n=ct(),r="underline hover:text-primary-regular dark:hover:text-primary-light transition-colors duration-300 ease-in-out";k.useEffect(()=>{t&&n("/")},[t,n]);const{register:i,handleSubmit:s,formState:{errors:o}}=yr({mode:"onBlur"}),a=()=>{fe.warning("Please contact the administrator to reset your password.")},l=async d=>{try{const f=await Ws.login(d);await fe.success("Logged in successfully!"),e(f.jwt),n("/")}catch(f){f!=null&&typeof f=="object"&&"message"in f&&typeof f.message=="string"?fe.error(f.message):fe.error("An unexpected error occurred. Please try again.")}};return c.jsxs(c.Fragment,{children:[c.jsx("h1",{className:"text-center my-4",children:"Sign in"}),c.jsxs("form",{onSubmit:s(l),noValidate:!0,className:"flex flex-col items-center gap-5 mx-4 md:w-1/2 md:mx-auto shadow-2xl rounded-xl p-5 text-xl",children:[c.jsx(we,{register:i,errors:o,name:"username",placeholder:"Username","aria-label":"Username",required:!0,type:"text"}),c.jsx(we,{register:i,errors:o,name:"password",type:"password",required:!0,pattern:{value:/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[*!@$%^&_]).{8,32}$/,message:"Your password must be 8-32 characters long and include at least one lowercase letter, one uppercase letter, one digit, and one special character."},placeholder:"Password","aria-label":"Password"}),c.jsx("button",{className:"action-button w-fit",type:"submit","aria-label":"Sign in",children:"Sign in"})]}),c.jsx("div",{className:"flex flex-row items-center justify-center mt-2",children:c.jsx("button",{className:"justify-self-center",onClick:a,children:c.jsx("p",{className:`text-xl ${r}`,children:"Forgot Password?"})})}),c.jsxs("p",{className:"text-center block my-8 text-xl",children:["Don't have an account?"," ",c.jsx(Je,{to:`${ve}register`,className:r,children:"Register"})]})]})},O7=()=>c.jsxs("section",{className:"flex flex-col items-center mx-4",children:[c.jsx("img",{src:"./assets/AboutUsLandscape.webp",alt:`A futuristic scene displaying interconnected electronic devices like smartphones, + tablets, laptops, monitors, and speakers, highlighted by vibrant, glowing lines and technology icons.`,className:"mt-4 md:max-h-96 md:min-w-full"}),c.jsx("h1",{className:"pb-4 my-6 text-center",children:"E-commerce - Your Gateway to the Digital Life"}),c.jsxs("article",{className:"mb-4 flex flex-col justify-evenly sm:w-4/5 lg:w-3/5",children:[c.jsxs("p",{className:"mb-4",children:["At"," ",c.jsx("span",{className:"text-primary-regular dark:text-primary-light",children:"E-commerce"}),", we're not just about gadgets; we're about"," ",c.jsx(Pr,{children:"experiences."})," From the moment you power on a device, the adventure begins. Established in the heart of the digital age, our mission is to bring you closer to the technology that powers your life."]}),c.jsx("p",{className:"mb-4",children:"We specialize in a curated collection of electronics, ranging from the latest smartphones and laptops to immersive TVs and premium headphones. Our products connect you to the world and enhance every encounter with the digital universe."}),c.jsxs("p",{children:["We're committed to providing you with the"," ",c.jsx(Pr,{children:"highest quality "}),"devices, backed by knowledgeable support that understands"," ",c.jsx(Pr,{children:"your needs."})," Whether you're a tech enthusiast or seeking the perfect entertainment setup, our team is here to help you make informed decisions."]}),c.jsx("p",{className:"mb-4",children:"Experience the blend of technology and human ingenuity."}),c.jsx("h2",{className:"text-center",children:"Welcome to E-commerce , where your digital journey awaits."})]})]}),I7=()=>{const{login:e,isLoggedIn:t}=k.useContext(Nn),[n,r]=k.useState(""),i=ct();k.useEffect(()=>{t&&i("/")},[t,i]);const{register:s,handleSubmit:o,formState:{errors:a}}=yr({mode:"onBlur"}),l=async d=>{if(d.password!==d.confirmPassword){fe.error("Password and confirm password do not match");return}try{await Ws.register(d);const f=await Ws.login({username:d.username,password:d.password});e(f.jwt),fe.success("Registration successful! Enjoy your stay!"),i("/")}catch(f){f instanceof Error?fe.error(f.message):fe.error("An unexpected error occurred. Please try again.")}};return c.jsxs(c.Fragment,{children:[c.jsx("h1",{className:"text-center my-4",children:"Sign up"}),c.jsx(iL,{image:n}),c.jsxs("form",{onSubmit:o(l),noValidate:!0,className:"flex flex-col items-center gap-5 mx-4 md:w-1/2 md:mx-auto shadow-2xl rounded-xl p-5 text-xl",children:[c.jsx(we,{register:s,errors:a,name:"username",type:"text",required:!0}),c.jsx(we,{register:s,errors:a,placeholder:"Image URL",name:"image",type:"text",onChange:d=>{r(d.target.value)},required:!0}),c.jsx(we,{pattern:{message:"Email must be valid",value:/^[\w.]+@([\w-]+\.)+[\w-]{2,4}$/},register:s,errors:a,name:"email",type:"text",required:!0}),c.jsx(we,{register:s,errors:a,name:"password",type:"password",required:!0,pattern:{value:/^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[*!@$%^&_]).{8,32}$/,message:"Your password must be 8-32 characters long and include at least one lowercase letter, one uppercase letter, one digit, and one special character."}}),c.jsx(we,{register:s,errors:a,name:"confirmPassword",type:"password",required:!0}),c.jsx("button",{className:"action-button w-fit",type:"submit","aria-label":"Register",children:"Register"})]}),c.jsxs("p",{className:"text-center block my-8 text-xl",children:["Already have an account?"," ",c.jsx(Je,{to:`${ve}login`,className:"underline hover:text-primary-regular dark:hover:text-primary-light transition-colors duration-300 ease-in-out",children:"Login"})]})]})},$7=()=>c.jsxs("section",{className:"flex flex-col p-6 shadow-lg rounded-lg",children:[c.jsx("header",{className:"border-b border-slate-600 dark:border-slate-100 pb-4 mb-6",children:c.jsx("h1",{children:"Terms of Service"})}),c.jsxs("article",{children:[c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"1. Introduction"}),c.jsx("p",{children:"Welcome to E-commerce website! By accessing our website or using our services, you agree to be bound by these Terms of Service. If you do not agree with any part of the terms, you may not use our services."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"2. Use of Service"}),c.jsx("p",{children:"E-commerce website is an online marketplace where you can purchase a variety of electronic products, including laptops, headphones, cell phones, and televisions. Our services are provided to you subject to the terms outlined in this agreement."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"3. User Obligations"}),c.jsx("p",{children:"You agree to use our website and services in a manner consistent with all applicable laws and regulations and in accordance with the terms and conditions set out in this policy."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"4. Intellectual Property"}),c.jsx("p",{children:"All content included on the site, such as text, graphics, logos, button icons, images, and software, is the property of E-commerce website or its content suppliers and protected by international copyright laws."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"5. Disclaimer of Warranties and Limitation of Liability"}),c.jsx("p",{children:'Our services are provided "as is" without warranty of any kind, either express or implied. We do not guarantee that our services will be uninterrupted or error-free.'})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"6. Changes to Terms"}),c.jsx("p",{children:"We reserve the right, at our discretion, to update or revise these terms. Please check the terms periodically for changes."})]})]})]}),A7=()=>c.jsxs("section",{className:"flex flex-col p-6 shadow-lg rounded-lg",children:[c.jsx("header",{className:"border-b border-slate-600 dark:border-slate-100 pb-4 mb-6",children:c.jsx("h1",{children:"Privacy Policy"})}),c.jsxs("article",{children:[c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"1. Introduction"}),c.jsx("p",{children:"Your privacy is important to us. This Privacy Policy explains how we collect, use, protect, and disclose information and data when you use E-commerce website and services."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"2. Information We Collect"}),c.jsx("p",{children:"We collect information in two ways: information you provide directly to us, and information we collect automatically through our services. This may include personal details such as your name, email address, and transaction details."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"3. Use of Information"}),c.jsx("p",{children:"The information we collect is used to provide, maintain, and improve our services, to communicate with you, and to enhance your experience."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"4. Sharing of Information"}),c.jsx("p",{children:"We do not sell, trade, or otherwise transfer to outside parties your personally identifiable information. This does not include trusted third parties who assist us in operating our website, conducting our business, or servicing you, so long as those parties agree to keep this information confidential."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"5. Security"}),c.jsx("p",{children:"We implement a variety of security measures to maintain the safety of your personal information when you enter, submit, or access your personal information."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"6. Changes to this Privacy Policy"}),c.jsx("p",{children:"We may update this policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page."})]}),c.jsxs("section",{className:"mb-4",children:[c.jsx("h2",{className:"text-2xl font-semibold mt-4 mb-2",children:"7. Contact Us"}),c.jsxs("p",{children:["If you have any questions about this Privacy Policy, please contact usĀ ",c.jsx(Je,{to:`${ve}contact-us`,className:"underline hover:dark:text-accent-light hover:text-accent-regular","aria-label":"Contact us via the contact page",children:"here"}),"."]})]})]})]}),R7=()=>{const{register:e,handleSubmit:t,reset:n,formState:{errors:r}}=yr({mode:"onBlur"}),i=()=>{n(),fe.success("Your message has been sent successfully! We will get back to you soon.")};return c.jsxs("div",{className:"flex flex-col items-center text-center mx-4 px-4",children:[c.jsx("h1",{className:"my-4",children:"Get In Touch"}),c.jsx("p",{className:"mb-4",children:"We love to hear from you. Our friendly team is always here to contact with you."}),c.jsx("p",{className:"mb-4",children:"Should you wish to reach out to us directly, please feel free to use the following email address: maksim.mirkin@gmail.com."}),c.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:flex sm:flex-row sm:justify-evenly sm:w-full my-8",children:[c.jsx(Je,{to:"https://www.linkedin.com/in/maksim-mirkin/",target:"_blank","aria-label":"LinkedIn",children:c.jsx("img",{src:_w,alt:"LinkedIn icon",className:"h-24"})}),c.jsxs(Je,{to:"https://github.com/Maksim-Mirkin",target:"_blank","aria-label":"GitHub",children:[c.jsx("img",{src:aL,alt:"GitHub icon",className:"h-24 dark:hidden"}),c.jsx("img",{src:Nw,alt:"GitHub icon",className:"h-24 hidden dark:block"})]}),c.jsx(Je,{to:"https://www.instagram.com/",target:"_blank","aria-label":"Instagram",children:c.jsx("img",{src:Lw,alt:"Instagram icon",className:"h-24"})}),c.jsxs(Je,{to:"https://twitter.com/",target:"_blank","aria-label":"Twitter",children:[c.jsx("img",{src:lL,alt:"Twitter icon",className:"h-24 dark:hidden"}),c.jsx("img",{src:Mw,alt:"Twitter icon",className:"h-24 hidden dark:block"})]})]}),c.jsxs("div",{className:"border border-black dark:border-white w-4/5 mb-4 rounded-xl shadow-xl p-4",children:[c.jsx("h1",{className:"text-2xl md:text-3xl md:my-4",children:"Send Message"}),c.jsxs("form",{onSubmit:t(i),noValidate:!0,className:"flex flex-col items-center w-full",children:[c.jsxs("div",{className:"md:flex md:justify-between w-full mb-4",children:[c.jsx(we,{register:e,errors:r,name:"name",placeholder:"Name",type:"text"}),c.jsx(we,{register:e,errors:r,name:"phone",placeholder:"Phone",type:"text",pattern:/^05\d{8}$/gm,onKeyDown:Bi})]}),c.jsx(we,{register:e,errors:r,name:"email",placeholder:"Email",type:"text"}),c.jsx(Jh,{register:e,errors:r,name:"message",placeholder:"Your Message"}),c.jsx("button",{type:"submit",className:"action-button my-4",children:c.jsx("span",{className:"drop-shadow-text",children:"Send"})})]})]})]})},D7=()=>{const{user:e,isAdmin:t}=k.useContext(Nn),n="border flex gap-2 items-center h-12 px-2 md:flex-1 md:border md:rounded-lg md:mx-2 md:my-2 md:py-2 md:justify-center hover:bg-primary-regular dark:hover:text-white hover:text-white transition-colors duration-300 ease-in-out",r=`${n} bg-primary-regular text-white`,i=`${n} text-primary-regular dark:text-primary-light`;return c.jsx("div",{children:e?c.jsxs("div",{children:[c.jsxs("div",{className:"flex flex-col md:flex-row",children:[c.jsxs(ol,{to:`${ve}account/user`,className:({isActive:s})=>s?r:i,children:[c.jsx(bh,{}),"Personal Data"]}),c.jsxs(ol,{to:`${ve}account/orders`,className:({isActive:s})=>s?r:i,children:[c.jsx(o5,{}),"Recent Orders"]}),t&&c.jsxs(ol,{to:`${ve}account/all-orders`,className:({isActive:s})=>s?r:i,children:[c.jsx(a5,{}),"All Orders"]}),t&&c.jsxs(ol,{to:`${ve}account/add-product`,className:({isActive:s})=>s?r:i,children:[c.jsx(h5,{}),"Add Product"]})]}),c.jsx(Xc,{})]}):c.jsx(AL,{})})},z7=()=>{const t=vn().pathname!==`${ve}category`;return c.jsx(c.Fragment,{children:t?c.jsx(Xc,{}):c.jsxs("div",{className:"h-4/5 flex flex-col sm:grid grid-cols-2 place-items-center gap-y-12 md:mx-24 lg:mx-40 xl:mx-80 my-12",children:[c.jsx(Xr,{to:"laptop",src:"../assets/laptop-image.png",alt:"Laptop category image",label:"Laptop",size:"size-64"}),c.jsx(Xr,{to:"cellular",src:"../assets/phone-image.png",alt:"Cellulars category image",label:"Cellulars",size:"size-64"}),c.jsx(Xr,{to:"tv",src:"../assets/tv-image.webp",alt:"TV category image",label:"TV",size:"size-64"}),c.jsx(Xr,{to:"headphone",src:"../assets/headphone-image.png",alt:"Headphones category image",label:"Headphones",size:"size-64"})]})})},F7=()=>{const e=Yc(),t=ct();let n="";return e instanceof Error?n=e.message:typeof e=="string"?n=e:Wc(e)&&(n=`${e.data} ${e.status} ${e.statusText}`),c.jsxs("div",{className:"flex flex-col justify-evenly items-center bg-slate-100 dark:bg-slate-600 h-screen ",children:[c.jsx("h1",{className:"text-red-500",children:"Oops!"}),c.jsx("img",{src:`${ve}/assets/sad-robot.png`,alt:"Sad robot"}),c.jsx("h2",{className:"text-red-500 mx-8",children:n}),c.jsxs("div",{className:"flex justify-between w-64",children:[c.jsx("button",{onClick:()=>t(-1),className:"action-button","aria-label":"Go back to the previous page",children:"Go Back"}),c.jsx("button",{onClick:()=>t("/"),className:"action-button","aria-label":"Go to the home page",children:"Go Home"})]})]})},B7=()=>{const e=Yc(),t=ct();let n="";return e instanceof Error?n=e.message:typeof e=="string"?n=e:Wc(e)&&(n=`${e.data} ${e.status} ${e.statusText}`),c.jsxs("div",{className:"flex flex-col justify-evenly items-center bg-slate-100 dark:bg-slate-600 h-screen ",children:[c.jsx("h1",{className:"text-red-500",children:"Oops!"}),c.jsx("img",{src:`${ve}/assets/sad-robot.png`,alt:"Sad robot"}),c.jsx("h2",{className:"text-red-500 mx-8",children:"404 - Not Found"}),n&&c.jsx("p",{className:"text-red-500",children:n}),c.jsxs("div",{className:"flex justify-between w-64",children:[c.jsx("button",{onClick:()=>t(-1),className:"action-button","aria-label":"Go back to the previous page",children:"Go Back"}),c.jsx("button",{onClick:()=>t("/"),className:"action-button","aria-label":"Go to the home page",children:"Go Home"})]})]})},V7=()=>{const{cartItems:e}=hi(),[t,n]=k.useState(0),r=10;return k.useEffect(()=>{(async()=>{const s=await Promise.all(e.map(async o=>(await rr.fetchProduct(o.id)).price*o.quantity)).then(o=>o.reduce((a,l)=>a+l,0));n(s)})()},[e]),e.length===0?(fe.warning("Your cart is empty. Please add some items to continue shopping."),c.jsx(yh,{to:`${ve}login`,replace:!0})):c.jsxs("div",{className:"flex",children:[c.jsxs("div",{className:"py-4 relative flex-1",children:[c.jsxs("div",{className:"hidden lg:flex justify-around mr-4 text-center sticky top-0 z-50 bg-transparent",children:[c.jsx("h2",{className:"w-96",children:"Product"}),c.jsx("h2",{className:"w-16",children:"Quantity"}),c.jsx("h2",{className:"w-16 pl-3",children:"Price"}),c.jsx("h2",{className:"w-16",children:"Subtotal"})]}),c.jsx("div",{className:"flex flex-col gap-4",children:e.map(i=>c.jsx(Zk,{...i},i.id))}),c.jsxs("div",{className:"lg:hidden border-t border-black sticky bottom-0 mt-4 flex flex-col gap-2 justify-center items-center bg-slate-100 dark:bg-slate-700",children:[c.jsxs("div",{children:[c.jsxs("h3",{className:"text-2xl",children:["Subtotal: ",t.toFixed(2),"$"]}),c.jsxs("h3",{className:"text-2xl",children:["Delivery: ",r,"$"]})]}),c.jsxs("h1",{children:["Total: ",t.toFixed(2),"$"]}),c.jsx(Je,{to:"/order",className:"action-button text-center mb-0 w-fit",children:"Continue with payment"}),c.jsxs("div",{className:"flex gap-2 items-center pb-2 dark:text-white",children:[c.jsx(v0,{className:"size-5"}),"Secure payment"]})]})]}),c.jsxs("div",{className:"hidden lg:block border-2 border-black w-fit sticky h-fit mt-4 mr-8 top-2",children:[c.jsx("h2",{className:"text-center",children:"Total"}),c.jsx("hr",{className:"border border-black"}),c.jsxs("div",{className:"px-4 flex flex-col gap-2",children:[c.jsxs("h3",{children:["Subtotal: ",t.toFixed(2),"$"]}),c.jsxs("h3",{children:["Delivery: ",r,"$"]}),c.jsxs("h2",{children:["Total: ",(t+r).toFixed(2),"$"]}),c.jsx(Je,{to:`${ve}order`,className:"action-button text-center mb-0",children:"Continue with payment"}),c.jsxs("div",{className:"flex gap-2 items-center justify-center pb-2 dark:text-white",children:[c.jsx(v0,{className:"size-5"}),"Secure payment"]})]})]})]})},H7=()=>c.jsx("div",{className:"bg-slate-300 animate-pulse w-64 sm:w-96 h-40 rounded-xl"}),U7=({id:e,quantity:t})=>{const[n,r]=k.useState(null),[i,s]=k.useState(!1),[o,a]=k.useState(),l=ct(),d=()=>{l(`${ve}products/${e}`)};return k.useEffect(()=>{(async()=>{try{s(!0),a(void 0);const h=await rr.fetchProduct(e);r(h)}catch(h){h!=null&&typeof h=="object"&&"message"in h&&typeof h.message=="string"&&a(h.message)}finally{s(!1)}})()},[e]),i?c.jsx(H7,{}):o?c.jsx("div",{children:o}):n===null?null:c.jsxs("div",{className:"flex items-center w-fit hover:scale-105",onClick:d,children:[c.jsx("img",{src:n.image,alt:n.name,className:"h-40 w-40 object-scale-down"}),c.jsxs("div",{className:"w-40 sm:w-fit",children:[c.jsx("h2",{children:n.name}),c.jsxs("p",{children:["Quantity: ",t]})]})]})},W7=()=>{const{register:e,handleSubmit:t,reset:n,formState:{errors:r},setValue:i}=yr({mode:"onBlur"}),{cartItems:s,removeItem:o}=hi(),[a,l]=k.useState("Cash"),d=ct();k.useEffect(()=>{const h=()=>{document.querySelectorAll("input").forEach(C=>{C.value&&i(C.name,C.value)})};return window.addEventListener("input",h),()=>{window.removeEventListener("input",h)}},[i]);const f=h=>{if(a==="creditCard")return fe.error("Credit Card payment is not available at the moment. We apologize for the inconvenience. Please try again later.");fe.confirm("Is everything correct? Shall we go ahead and place your order?",async()=>{const C={orderItems:s.map(w=>({productId:w.id,quantity:w.quantity})),...h};try{await ka.createOrder(C),fe.success("Order created successfully!"),n(),s.forEach(w=>o(w.id)),d(`${ve}account/orders`)}catch(w){w!=null&&typeof w=="object"&&"message"in w&&typeof w.message=="string"?fe.error(w.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})};return c.jsxs(c.Fragment,{children:[c.jsx("h1",{className:"text-center my-4",children:"Your Order"}),c.jsxs("div",{className:"flex flex-col md:flex-row justify-around items-center md:items-start",children:[c.jsxs("div",{className:"flex-1",children:[c.jsx("h2",{className:"text-center mb-4",children:"Order Summary"}),c.jsx("div",{children:s.map((h,v)=>c.jsxs("div",{className:"mx-4 w-full",children:[c.jsx(U7,{...h}),v===s.length-1?null:c.jsx("hr",{className:"my-2 border border-gray-300 mr-4"})]},h.id))})]}),c.jsxs("form",{className:"flex flex-col gap-2 items-center",noValidate:!0,onSubmit:t(f),children:[c.jsx("h2",{className:"text-center mb-4",children:"Order Details"}),c.jsx(we,{register:e,errors:r,name:"address",required:!0}),c.jsx(we,{register:e,errors:r,name:"city",required:!0}),c.jsx(we,{register:e,errors:r,name:"phoneNumber",type:"number",pattern:{value:/^05\d{8}$/gm,message:"Phone number must be 10 digits and start with 05"},onKeyDown:Bi,required:!0}),c.jsx(we,{register:e,errors:r,name:"postalCode",type:"number",pattern:{value:/^\d{7}$/gm,message:"Postal code must be 7 digits"},onKeyDown:Bi,required:!0}),c.jsxs("div",{className:"px-4 w-full mb-4",children:[c.jsx("label",{htmlFor:"paymentInformation",children:"Payment Information"}),c.jsxs("select",{id:"paymentInformation",...e("paymentInformation",{required:"Payment Information is required"}),value:a,onChange:h=>l(h.target.value),children:[c.jsx("option",{value:"Cash",children:"Cash"}),c.jsx("option",{value:"creditCard",children:"Credit Card"})]}),r.paymentInformation&&c.jsx("span",{className:"text-red-500",children:"Payment Information is required"})]}),a==="creditCard"&&c.jsxs(c.Fragment,{children:[c.jsx(we,{register:e,errors:r,name:"creditCardNumber",value:"Not Available",disabled:!0}),c.jsx(we,{register:e,errors:r,name:"creditCardName",value:"Not Available",disabled:!0}),c.jsx(we,{register:e,errors:r,name:"expirationDate",value:"Not Available",disabled:!0}),c.jsx(we,{register:e,errors:r,name:"CVV",value:"Not Available",disabled:!0})]}),c.jsx("button",{className:"action-button",type:"submit",children:"Submit Order"})]})]})]})},G7=()=>{const e=vn(),t=ct(),{specificOrder:n}=e.state,r=async s=>{fe.confirm("Do you want to change the rating of this product?",async()=>{try{await Pd.postRating(s),fe.success("Rating updated successfully!")}catch(o){o!=null&&typeof o=="object"&&"message"in o&&typeof o.message=="string"?fe.error(o.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})},i=async s=>{fe.confirm("Do you want to change the rating of this product?",async()=>{try{await Pd.updateRating(s),fe.success("Rating updated successfully!")}catch(o){o!=null&&typeof o=="object"&&"message"in o&&typeof o.message=="string"?fe.error(o.message):fe.error("An unexpected error occurred. Please try again.")}},()=>{})};return c.jsxs("div",{className:"relative",children:[c.jsx("button",{className:"absolute -top-2 left-2 z-50",onClick:()=>t(-1),"aria-label":"Go back",children:c.jsx(p5,{className:"size-12 text-primary-regular dark:text-primary-light hover:scale-125"})}),n&&c.jsxs("div",{children:[c.jsxs("h2",{className:"text-center my-4",children:["Order ID: ",n.id]}),c.jsx("div",{className:"md:flex flex-wrap md:justify-center",children:n.items.map(s=>{const[o,a]=k.useState(0),l=async()=>{try{const f=(await Pd.fetchRatingByProductId(s.product.id)).rating;a(f)}catch(f){f!=null&&typeof f=="object"&&"status"in f&&f.status===404?console.clear():f!=null&&typeof f=="object"&&"message"in f&&typeof f.message=="string"&&fe.error(f.message)}};k.useEffect(()=>{l()},[]);const{control:d}=yr({mode:"onChange",defaultValues:{rating:o.toString()}});return c.jsx("div",{className:`flex flex-col mb-4 mx-2 items-center border border-primary-regular dark:border-white + shadow-lg shadow-primary-regular dark:shadow-white rounded-2xl hover:bg-slate-200 dark:hover:bg-slate-600 cursor-pointer`,onClick:f=>{f.stopPropagation(),t(`${ve}products/${s.product.id}`)},children:c.jsxs("div",{className:"flex flex-col",children:[c.jsx("img",{src:s.product.image,alt:s.product.name,className:"size-64 object-scale-down mx-auto mb-2"}),c.jsxs("div",{className:"flex items-center gap-2 px-2",children:[c.jsxs("h2",{children:["Product: ",s.product.name]}),c.jsxs("p",{className:"text-xl",children:["x",s.quantity]})]}),c.jsxs("h2",{className:"px-2",children:["Subtotal: ",s.subTotal,"$"]}),c.jsxs("div",{className:"self-center mb-4 mt-2 flex gap-2 items-center",children:[c.jsx("h2",{children:"Your rating:"}),c.jsx(wL,{name:"rating",control:d,defaultValue:s.product.averageRating,rules:{required:!0},render:()=>c.jsx(kw,{name:"rating",size:"large",value:o,onClick:f=>{f.stopPropagation()},onChange:(f,h)=>{o>0?i({productId:s.product.id,rating:(h==null?void 0:h.toString())??"0"}):r({productId:s.product.id,rating:(h==null?void 0:h.toString())??"0"})},sx:{"& .MuiRating-iconFilled":{color:"#FBBF24"}}})})]})]})},s.id)})})]},n.id)]})},q7=[{path:`${ve}`,element:c.jsx(dL,{}),errorElement:c.jsx(fL,{}),children:[{index:!0,element:c.jsx(_7,{})},{path:"category",element:c.jsx(en,{children:c.jsx(z7,{})}),children:[{path:"laptop",element:c.jsx(en,{children:c.jsx(Co,{})})},{path:"cellular",element:c.jsx(en,{children:c.jsx(Co,{})})},{path:"tv",element:c.jsx(en,{children:c.jsx(Co,{})})},{path:"headphone",element:c.jsx(en,{children:c.jsx(Co,{})})},{path:"search",element:c.jsx(en,{children:c.jsx(Co,{})})}]},{path:"products/:id",element:c.jsx(en,{children:c.jsx(BL,{})}),errorElement:c.jsx(F7,{})},{path:"login",element:c.jsx(M7,{})},{path:"register",element:c.jsx(I7,{})},{path:"about",element:c.jsx(O7,{})},{path:"terms",element:c.jsx($7,{})},{path:"privacy-policy",element:c.jsx(A7,{})},{path:"contact-us",element:c.jsx(R7,{})},{path:"account",element:c.jsx(en,{children:c.jsx(D7,{})}),children:[{path:"user",element:c.jsx(en,{children:c.jsx(RL,{})})},{path:"orders",element:c.jsx(en,{children:c.jsx(DL,{})})},{path:"all-orders",element:c.jsx(en,{children:c.jsx(IL,{})})},{path:"add-product",element:c.jsx(en,{children:c.jsx(_L,{})})}]},{path:"cart",element:c.jsx(en,{children:c.jsx(V7,{})})},{path:"order",element:c.jsx(en,{children:c.jsx(W7,{})})},{path:"orders/:id",element:c.jsx(en,{children:c.jsx(G7,{})})},{path:"*",element:c.jsx(B7,{})}]},{path:"/",element:c.jsx(yh,{to:`${ve}`,replace:!0})}],K7=()=>B3(q7),Y7=document.getElementById("root"),X7=K1(Y7);X7.render(c.jsx(g5,{children:c.jsx(y5,{children:c.jsx(Xk,{children:c.jsx(ck,{children:c.jsx(K7,{})})})})})); diff --git a/index.html b/index.html index 8e675f6..9a0ad8c 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ E-commerce - +