Skip to content
https://juvel.pages.dev

Lighthouse Desktop

· 0 checks — Desktop Lighthouse audit -- Performance, Accessibility, Best Practices, and SEO category breakdown.
SCORE
0
GRADE
FIX
0
REVIEW
0
PASS
0
INFO
0

Detailed Report

Audit breakdown by category with detailed findings.

97

Performance

Insights

Remove large, duplicate JavaScript modules from bundles to reduce unnecessary bytes consumed by network activity.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Polyfills and transforms enable older browsers to use new JavaScript features. However, many aren't necessary for modern browsers. Consider modifying your JavaScript build process to not transpile Baseline features, unless you know you must support older browsers. Learn why most sites can deploy ES6+ code without transpiling

Why this matters

Performance issues directly impact user engagement and conversion rates.

3rd party code can significantly impact load performance. Reduce and defer loading of 3rd party code to prioritize your page's content.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Reducing the download time of images can improve the perceived load time of the page and LCP. Learn more about optimizing image size

Why this matters

Performance issues directly impact user engagement and conversion rates.

URLResource SizeEst Savings
شعار جوفيل div.absolute > div.relative > div.flex > img.h-full
juvel.pages.dev/images/logo.png79.3 KiB76.4 KiB
button.group > div.relative > div.absolute > img.h-full button.group > div.relative > div.absolute > img.h-full
juvel.pages.dev/images/hero.webp104.2 KiB18.1 KiB

Avoid chaining critical requests by reducing the length of chains, reducing the download size of resources, or deferring the download of unnecessary resources to improve page load.

Why this matters

Performance issues directly impact user engagement and conversion rates.

description: [preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints help the browser establish a connection earlier in the page load, saving time when the first request for that origin is made. The following are the origins that the page preconnected to.
title: Preconnected origins
description: Add [preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints to your most important origins, but try to use no more than 4.
title: Preconnect candidates
value: No additional origins are good candidates for preconnecting

Requests are blocking the page's initial render, which may delay LCP. Deferring or inlining can move these network requests out of the critical path.

Why this matters

Performance issues directly impact user engagement and conversion rates.

These insights are also available in the Chrome DevTools Performance Panel - record a trace to view more detailed information.

Diagnostics

Reduce unused JavaScript and defer loading scripts until they are required to decrease bytes consumed by network activity. Learn how to reduce unused JavaScript.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Estimated savings: 60 ms 141.4 KiB
URLTransfer SizeEst Savings
juvel.pages.dev/213.0 KiB141.4 KiB

More information about the performance of your application. These numbers don't directly affect the Performance score.

●Use efficient cache lifetimes
●Layout shift culprits
●Document request latency
●Optimize DOM size
●Font display
●Forced reflow
●LCP breakdown
●Modern HTTP
●Optimize viewport for mobile
●Time to Interactive 1.2 s
●Max Potential First Input Delay 20 ms
●Minify CSS
●Minify JavaScript
●Reduce unused CSS
●Avoids enormous network payloads Total size was 500 KiB
●JavaScript execution time 0.2 s
●Minimizes main-thread work 0.7 s
●Image elements have explicit `width` and `height`
●Page didn't prevent back/forward cache restoration
●Network Requests
●Network Round Trip Times 20 ms
●Server Backend Latencies 70 ms
●Tasks
●Diagnostics
●Metrics
●Screenshot Thumbnails
●Final Screenshot
●Script Treemap Data
●Resources Summary
●Avoid multiple page redirects
●Initial server response time was short Root document took 40 ms
●Avoid large layout shifts 3 layout shifts found
○INP breakdown
○LCP request discovery
○User Timing marks and measures
○Avoid long main-thread tasks
○Avoid non-composited animations
100

Accessibility

These checks highlight opportunities to improve the accessibility of your web app. Automatic detection can only detect a subset of issues and does not guarantee the accessibility of your web app, so manual testing is also encouraged.

○Interactive controls are keyboard focusable
○Interactive elements indicate their purpose and state
○The page has a logical tab order
○Visual order on the page follows DOM order
○User focus is not accidentally trapped in a region
○The user's focus is directed to new content added to the page
○HTML5 landmark elements are used to improve navigation
○Offscreen content is hidden from assistive technology
○Custom controls have associated labels
○Custom controls have ARIA roles
●`[aria-*]` attributes match their roles
●`[aria-hidden="true"]` is not present on the document `<body>`
●`[role]`s have all required `[aria-*]` attributes
●`[role]` values are valid
●`[aria-*]` attributes have valid values
●`[aria-*]` attributes are valid and not misspelled
●Buttons have an accessible name
●Image elements have `[alt]` attributes
●`[user-scalable="no"]` is not used in the `<meta name="viewport">` element and the `[maximum-scale]` attribute is not less than 5.
●ARIA attributes are used as specified for the element's role
●Elements with `role="dialog"` or `role="alertdialog"` have accessible names.
●`[aria-hidden="true"]` elements do not contain focusable descendents
●Elements use only permitted ARIA attributes
●Document has a `<title>` element
●`<html>` element has a `[lang]` attribute
●`<html>` element has a valid value for its `[lang]` attribute
●Touch targets have sufficient size and spacing.
●Heading elements appear in a sequentially-descending order
●Document has a main landmark.
●Deprecated ARIA roles were not used
●Elements with visible text labels have matching accessible names.
○`[accesskey]` values are unique
○`button`, `link`, and `menuitem` elements have accessible names
○ARIA input fields have accessible names
○ARIA `meter` elements have accessible names
○ARIA `progressbar` elements have accessible names
○Elements with an ARIA `[role]` that require children to contain a specific `[role]` have all required children.
○`[role]`s are contained by their required parent element
○Elements with the `role=text` attribute do not have focusable descendents.
○ARIA toggle fields have accessible names
○ARIA `tooltip` elements have accessible names
○ARIA `treeitem` elements have accessible names
○The page contains a heading, skip link, or landmark region
○Background and foreground colors have a sufficient contrast ratio
○`<dl>`'s contain only properly-ordered `<dt>` and `<dd>` groups, `<script>`, `<template>` or `<div>` elements.
○Definition list items are wrapped in `<dl>` elements
○ARIA IDs are unique
○No form fields have multiple labels
○`<frame>` or `<iframe>` elements have a title
○`<html>` element has an `[xml:lang]` attribute with the same base language as the `[lang]` attribute.
○Input buttons have discernible text.
○`<input type="image">` elements have `[alt]` text
○Form elements have associated labels
○Links are distinguishable without relying on color.
○Links have a discernible name
○Lists contain only `<li>` elements and script supporting elements (`<script>` and `<template>`).
○List items (`<li>`) are contained within `<ul>`, `<ol>` or `<menu>` parent elements
○The document does not use `<meta http-equiv="refresh">`
○`<object>` elements have alternate text
○Select elements have associated label elements.
○Skip links are focusable.
○No element has a `[tabindex]` value greater than 0
○Cells in a `<table>` element that use the `[headers]` attribute refer to table cells within the same table.
○`<th>` elements and elements with `[role="columnheader"/"rowheader"]` have data cells they describe.
○`[lang]` attributes have a valid value
○`<video>` elements contain a `<track>` element with `[kind="captions"]`
○Tables have different content in the summary attribute and `<caption>`.
○All heading elements contain content.
○Uses ARIA roles only on compatible elements
○Image elements do not have `[alt]` attributes that are redundant text.
○Identical links have the same purpose.
○Tables use `<caption>` instead of cells with the `[colspan]` attribute to indicate a caption.
○`<td>` elements in a large `<table>` have one or more table headers.
100

Best Practices

General

Source maps translate minified code to the original source code. This helps developers debug in production. In addition, Lighthouse is able to provide further insights. Consider deploying source maps to take advantage of these benefits. Learn more about source maps.

Why this matters

Performance issues directly impact user engagement and conversion rates.

●Uses HTTPS
●Avoids deprecated APIs
●Avoids third-party cookies
●Allows users to paste into input fields
●Avoids requesting the geolocation permission on page load
●Avoids requesting the notification permission on page load
●Displays images with correct aspect ratio
●Serves images with appropriate resolution
●Page has the HTML doctype
●Properly defines charset
●No browser errors logged to the console
●No issues in the `Issues` panel in Chrome Devtools
●Ensure CSP is effective against XSS attacks
●Use a strong HSTS policy
●Ensure proper origin isolation with COOP
●Mitigate clickjacking with XFO or CSP
●Mitigate DOM-based XSS with Trusted Types
○Redirects HTTP traffic to HTTPS
○Detected JavaScript libraries
92

SEO

These checks ensure that your page is following basic search engine optimization advice. There are many additional factors Lighthouse does not score here that may affect your search ranking, including performance on Core Web Vitals. Learn more about Google Search Essentials.

Crawling and Indexing

If your robots.txt file is malformed, crawlers may not be able to understand how you want your website to be crawled or indexed. Learn more about robots.txt.

Why this matters

Performance issues directly impact user engagement and conversion rates.

Line #ContentError
1<!doctype html>Syntax not understood
2<html lang="ar" dir="rtl">Syntax not understood
3 <head>Syntax not understood
4 <meta charset="UTF-8" />Syntax not understood
5 <meta name="viewport" content="width=device-width, initial-scale=1.0" />Syntax not understood
6 <meta name="description" content="Juvel — منتجات طبيعية ومستحضرات تجميل فاخرة من قلب الطبيعة" />Syntax not understood
7 <link rel="icon" type="image/png" href="./images/logo.png" />Syntax not understood
8 <link rel="apple-touch-icon" href="./images/logo.png" />Syntax not understood
9 <link rel="preload" as="image" href="./images/hero.webp" fetchpriority="high" />Syntax not understood
10 <link rel="preconnect" href="https://fonts.googleapis.com" />Unknown directive
11 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />Unknown directive
12 <linkSyntax not understood
13 href="https://fonts.googleapis.com/css2?family=Tajawal:wght@400;700;900&family=Marcellus&display=swap"Unknown directive
14 rel="stylesheet"Syntax not understood
15 />Syntax not understood
16 <title>Juvel | جوفيل — جمالك من الطبيعة</title>Syntax not understood
17 <script type="module" crossorigin>(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&i(d)}).observe(document,{childList:!0,subtree:!0});function s(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function i(l){if(l.ep)return;l.ep=!0;const u=s(l);fetch(l.href,u)}})();var $h={exports:{}},Br={};var ty;function g4(){if(ty)return Br;ty=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function s(i,l,u){var d=null;if(u!==void 0&&(d=""+u),l.key!==void 0&&(d=""+l.key),"key"in l){u={};for(var f in l)f!=="key"&&(u[f]=l[f])}else u=l;return l=u.ref,{$$typeof:t,type:i,key:d,ref:l!==void 0?l:null,props:u}}return Br.Fragment=e,Br.jsx=s,Br.jsxs=s,Br}var ny;function x4(){return ny||(ny=1,$h.exports=g4()),$h.exports}var o=x4(),Bh={exports:{}},ge={};var sy;function y4(){if(sy)return ge;sy=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),d=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function w(D){return D===null||typeof D!="object"?null:(D=b&&D[b]||D["@@iterator"],typeof D=="function"?D:null)}var j={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,_={};function k(D,J,ne){this.props=D,this.context=J,this.refs=_,this.updater=ne||j}k.prototype.isReactComponent={},k.prototype.setState=function(D,J){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,J,"setState")},k.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function R(){}R.prototype=k.prototype;function M(D,J,ne){this.props=D,this.context=J,this.refs=_,this.updater=ne||j}var T=M.prototype=new R;T.constructor=M,N(T,k.prototype),T.isPureReactComponent=!0;var F=Array.isArray;function I(){}var E={H:null,A:null,T:null,S:null},L=Object.prototype.hasOwnProperty;function q(D,J,ne){var re=ne.ref;return{$$typeof:t,type:D,key:J,ref:re!==void 0?re:null,props:ne}}function G(D,J){return q(D.type,J,D.props)}function me(D){return typeof D=="object"&&D!==null&&D.$$typeof===t}function xe(D){var J={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(ne){return J[ne]})}var Ce=/\/+/g;function ut(D,J){return typeof D=="object"&&D!==null&&D.key!=null?xe(""+D.key):J.toString(36)}function W(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(I,I):(D.status="pending",D.then(function(J){D.status==="pending"&&(D.status="fulfilled",D.value=J)},function(J){D.status==="pending"&&(D.status="rejected",D.reason=J)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function B(D,J,ne,re,ye){var we=typeof D;(we==="undefined"||we==="boolean")&&(D=null);var Me=!1;if(D===null)Me=!0;else switch(we){case"bigint":case"string":case"number":Me=!0;break;case"object":switch(D.$$typeof){case t:case e:Me=!0;break;case x:return Me=D._init,B(Me(D._payload),J,ne,re,ye)}}if(Me)return ye=ye(D),Me=re===""?"."+ut(D,0):re,F(ye)?(ne="",Me!=null&&(ne=Me.replace(Ce,"$&/")+"/"),B(ye,J,ne,"",function(Yi){return Yi})):ye!=null&&(me(ye)&&(ye=G(ye,ne+(ye.key==null||D&&D.key===ye.key?"":(""+ye.key).replace(Ce,"$&/")+"/")+Me)),J.push(ye)),1;Me=0;var At=re===""?".":re+":";if(F(D))for(var We=0;We<D.length;We++)re=D[We],we=At+ut(re,We),Me+=B(re,J,ne,we,ye);else if(We=w(D),typeof We=="function")for(D=We.call(D),We=0;!(re=D.next()).done;)re=re.value,we=At+ut(re,We++),Me+=B(re,J,ne,we,ye);else if(we==="object"){if(typeof D.then=="function")return B(W(D),J,ne,re,ye);throw J=String(D),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return Me}function X(D,J,ne){if(D==null)return D;var re=[],ye=0;return B(D,re,"","",function(we){return J.call(ne,we,ye++)}),re}function ee(D){if(D._status===-1){var J=D._result;J=J(),J.then(function(ne){(D._status===0||D._status===-1)&&(D._status=1,D._result=ne)},function(ne){(D._status===0||D._status===-1)&&(D._status=2,D._result=ne)}),D._status===-1&&(D._status=0,D._result=J)}if(D._status===1)return D._result.default;throw D._result}var de=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},ke={map:X,forEach:function(D,J,ne){X(D,function(){J.apply(this,arguments)},ne)},count:function(D){var J=0;return X(D,function(){J++}),J},toArray:function(D){return X(D,function(J){return J})||[]},only:function(D){if(!me(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return ge.Activity=y,ge.Children=ke,ge.Component=k,ge.Fragment=s,ge.Profiler=l,ge.PureComponent=M,ge.StrictMode=i,ge.Suspense=g,ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,ge.__COMPILER_RUNTIME={__proto__:null,c:function(D){return E.H.useMemoCache(D)}},ge.cache=function(D){return function(){return D.apply(null,arguments)}},ge.cacheSignal=function(){return null},ge.cloneElement=function(D,J,ne){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var re=N({},D.props),ye=D.key;if(J!=null)for(we in J.key!==void 0&&(ye=""+J.key),J)!L.call(J,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&J.ref===void 0||(re[we]=J[we]);var we=arguments.length-2;if(we===1)re.children=ne;else if(1<we){for(var Me=Array(we),At=0;At<we;At++)Me[At]=arguments[At+2];re.children=Me}return q(D.type,ye,re)},ge.createContext=function(D){return D={$$typeof:d,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:u,_context:D},D},ge.createElement=function(D,J,ne){var re,ye={},we=null;if(J!=null)for(re in J.key!==void 0&&(we=""+J.key),J)L.call(J,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ye[re]=J[re]);var Me=arguments.length-2;if(Me===1)ye.children=ne;else if(1<Me){for(var At=Array(Me),We=0;We<Me;We++)At[We]=arguments[We+2];ye.children=At}if(D&&D.defaultProps)for(re in Me=D.defaultProps,Me)ye[re]===void 0&&(ye[re]=Me[re]);return q(D,we,ye)},ge.createRef=function(){return{current:null}},ge.forwardRef=function(D){return{$$typeof:f,render:D}},ge.isValidElement=me,ge.lazy=function(D){return{$$typeof:x,_payload:{_status:-1,_result:D},_init:ee}},ge.memo=function(D,J){return{$$typeof:p,type:D,compare:J===void 0?null:J}},ge.startTransition=function(D){var J=E.T,ne={};E.T=ne;try{var re=D(),ye=E.S;ye!==null&&ye(ne,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(I,de)}catch(we){de(we)}finally{J!==null&&ne.types!==null&&(J.types=ne.types),E.T=J}},ge.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},ge.use=function(D){return E.H.use(D)},ge.useActionState=function(D,J,ne){return E.H.useActionState(D,J,ne)},ge.useCallback=function(D,J){return E.H.useCallback(D,J)},ge.useContext=function(D){return E.H.useContext(D)},ge.useDebugValue=function(){},ge.useDeferredValue=function(D,J){return E.H.useDeferredValue(D,J)},ge.useEffect=function(D,J){return E.H.useEffect(D,J)},ge.useEffectEvent=function(D){return E.H.useEffectEvent(D)},ge.useId=function(){return E.H.useId()},ge.useImperativeHandle=function(D,J,ne){return E.H.useImperativeHandle(D,J,ne)},ge.useInsertionEffect=function(D,J){return E.H.useInsertionEffect(D,J)},ge.useLayoutEffect=function(D,J){return E.H.useLayoutEffect(D,J)},ge.useMemo=function(D,J){return E.H.useMemo(D,J)},ge.useOptimistic=function(D,J){return E.H.useOptimistic(D,J)},ge.useReducer=function(D,J,ne){return E.H.useReducer(D,J,ne)},ge.useRef=function(D){return E.H.useRef(D)},ge.useState=function(D){return E.H.useState(D)},ge.useSyncExternalStore=function(D,J,ne){return E.H.useSyncExternalStore(D,J,ne)},ge.useTransition=function(){return E.H.useTransition()},ge.version="19.2.6",ge}var ay;function cm(){return ay||(ay=1,Bh.exports=y4()),Bh.exports}var A=cm(),Vh={exports:{}},Vr={},qh={exports:{}},Hh={};var iy;function b4(){return iy||(iy=1,(function(t){function e(B,X){var ee=B.length;B.push(X);e:for(;0<ee;){var de=ee-1>>>1,ke=B[de];if(0<l(ke,X))B[de]=X,B[ee]=ke,ee=de;else break e}}function s(B){return B.length===0?null:B[0]}function i(B){if(B.length===0)return null;var X=B[0],ee=B.pop();if(ee!==X){B[0]=ee;e:for(var de=0,ke=B.length,D=ke>>>1;de<D;){var J=2*(de+1)-1,ne=B[J],re=J+1,ye=B[re];if(0>l(ne,ee))re<ke&&0>l(ye,ne)?(B[de]=ye,B[re]=ee,de=re):(B[de]=ne,B[J]=ee,de=J);else if(re<ke&&0>l(ye,ee))B[de]=ye,B[re]=ee,de=re;else break e}}return X}function l(B,X){var ee=B.sortIndex-X.sortIndex;return ee!==0?ee:B.id-X.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();t.unstable_now=function(){return d.now()-f}}var g=[],p=[],x=1,y=null,b=3,w=!1,j=!1,N=!1,_=!1,k=typeof setTimeout=="function"?setTimeout:null,R=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function T(B){for(var X=s(p);X!==null;){if(X.callback===null)i(p);else if(X.startTime<=B)i(p),X.sortIndex=X.expirationTime,e(g,X);else break;X=s(p)}}function F(B){if(N=!1,T(B),!j)if(s(g)!==null)j=!0,I||(I=!0,xe());else{var X=s(p);X!==null&&W(F,X.startTime-B)}}var I=!1,E=-1,L=5,q=-1;function G(){return _?!0:!(t.unstable_now()-q<L)}function me(){if(_=!1,I){var B=t.unstable_now();q=B;var X=!0;try{e:{j=!1,N&&(N=!1,R(E),E=-1),w=!0;var ee=b;try{t:{for(T(B),y=s(g);y!==null&&!(y.expirationTime>B&&G());){var de=y.callback;if(typeof de=="function"){y.callback=null,b=y.priorityLevel;var ke=de(y.expirationTime<=B);if(B=t.unstable_now(),typeof ke=="function"){y.callback=ke,T(B),X=!0;break t}y===s(g)&&i(g),T(B)}else i(g);y=s(g)}if(y!==null)X=!0;else{var D=s(p);D!==null&&W(F,D.startTime-B),X=!1}}break e}finally{y=null,b=ee,w=!1}X=void 0}}finally{X?xe():I=!1}}}var xe;if(typeof M=="function")xe=function(){M(me)};else if(typeof MessageChannel<"u"){var Ce=new MessageChannel,ut=Ce.port2;Ce.port1.onmessage=me,xe=function(){ut.postMessage(null)}}else xe=function(){k(me,0)};function W(B,X){E=k(function(){B(t.unstable_now())},X)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(B){B.callback=null},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(B){switch(b){case 1:case 2:case 3:var X=3;break;default:X=b}var ee=b;b=X;try{return B()}finally{b=ee}},t.unstable_requestPaint=function(){_=!0},t.unstable_runWithPriority=function(B,X){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ee=b;b=B;try{return X()}finally{b=ee}},t.unstable_scheduleCallback=function(B,X,ee){var de=t.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?de+ee:de):ee=de,B){case 1:var ke=-1;break;case 2:ke=250;break;case 5:ke=1073741823;break;case 4:ke=1e4;break;default:ke=5e3}return ke=ee+ke,B={id:x++,callback:X,priorityLevel:B,startTime:ee,expirationTime:ke,sortIndex:-1},ee>de?(B.sortIndex=ee,e(p,B),s(g)===null&&B===s(p)&&(N?(R(E),E=-1):N=!0,W(F,ee-de))):(B.sortIndex=ke,e(g,B),j||w||(j=!0,I||(I=!0,xe()))),B},t.unstable_shouldYield=G,t.unstable_wrapCallback=function(B){var X=b;return function(){var ee=b;b=X;try{return B.apply(this,arguments)}finally{b=ee}}}})(Hh)),Hh}var ry;function v4(){return ry||(ry=1,qh.exports=b4()),qh.exports}var Ih={exports:{}},_t={};var ly;function w4(){if(ly)return _t;ly=1;var t=cm();function e(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var i={d:{f:s,r:function(){throw Error(e(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},l=Symbol.for("react.portal");function u(g,p,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:l,key:y==null?null:""+y,children:g,containerInfo:p,implementation:x}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,_t.createPortal=function(g,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(e(299));return u(g,p,null,x)},_t.flushSync=function(g){var p=d.T,x=i.p;try{if(d.T=null,i.p=2,g)return g()}finally{d.T=p,i.p=x,i.d.f()}},_t.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,i.d.C(g,p))},_t.prefetchDNS=function(g){typeof g=="string"&&i.d.D(g)},_t.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var x=p.as,y=f(x,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,w=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?i.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:w}):x==="script"&&i.d.X(g,{crossOrigin:y,integrity:b,fetchPriority:w,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},_t.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=f(p.as,p.crossOrigin);i.d.M(g,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&i.d.M(g)},_t.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,y=f(x,p.crossOrigin);i.d.L(g,x,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},_t.preloadModule=function(g,p){if(typeof g=="string")if(p){var x=f(p.as,p.crossOrigin);i.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else i.d.m(g)},_t.requestFormReset=function(g){i.d.r(g)},_t.unstable_batchedUpdates=function(g,p){return g(p)},_t.useFormState=function(g,p,x){return d.H.useFormState(g,p,x)},_t.useFormStatus=function(){return d.H.useHostTransitionStatus()},_t.version="19.2.6",_t}var oy;function j4(){if(oy)return Ih.exports;oy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Ih.exports=w4(),Ih.exports}var cy;function S4(){if(cy)return Vr;cy=1;var t=v4(),e=cm(),s=j4();function i(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)a+="&args[]="+encodeURIComponent(arguments[r])}return"Minified React error #"+n+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function u(n){var a=n,r=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(r=a.return),n=a.return;while(n)}return a.tag===3?r:null}function d(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function f(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}function g(n){if(u(n)!==n)throw Error(i(188))}function p(n){var a=n.alternate;if(!a){if(a=u(n),a===null)throw Error(i(188));return a!==n?null:n}for(var r=n,c=a;;){var h=r.return;if(h===null)break;var m=h.alternate;if(m===null){if(c=h.return,c!==null){r=c;continue}break}if(h.child===m.child){for(m=h.child;m;){if(m===r)return g(h),n;if(m===c)return g(h),a;m=m.sibling}throw Error(i(188))}if(r.return!==c.return)r=h,c=m;else{for(var v=!1,S=h.child;S;){if(S===r){v=!0,r=h,c=m;break}if(S===c){v=!0,c=h,r=m;break}S=S.sibling}if(!v){for(S=m.child;S;){if(S===r){v=!0,r=m,c=h;break}if(S===c){v=!0,c=m,r=h;break}S=S.sibling}if(!v)throw Error(i(189))}}if(r.alternate!==c)throw Error(i(190))}if(r.tag!==3)throw Error(i(188));return r.stateNode.current===r?n:a}function x(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=x(n),a!==null)return a;n=n.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),j=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),M=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),L=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),G=Symbol.for("react.memo_cache_sentinel"),me=Symbol.iterator;function xe(n){return n===null||typeof n!="object"?null:(n=me&&n[me]||n["@@iterator"],typeof n=="function"?n:null)}var Ce=Symbol.for("react.client.reference");function ut(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===Ce?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case N:return"Fragment";case k:return"Profiler";case _:return"StrictMode";case F:return"Suspense";case I:return"SuspenseList";case q:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case j:return"Portal";case M:return n.displayName||"Context";case R:return(n._context.displayName||"Context")+".Consumer";case T:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case E:return a=n.displayName||null,a!==null?a:ut(n.type)||"Memo";case L:a=n._payload,n=n._init;try{return ut(n(a))}catch{}}return null}var W=Array.isArray,B=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},de=[],ke=-1;function D(n){return{current:n}}function J(n){0>ke||(n.current=de[ke],de[ke]=null,ke--)}function ne(n,a){ke++,de[ke]=n.current,n.current=a}var re=D(null),ye=D(null),we=D(null),Me=D(null);function At(n,a){switch(ne(we,a),ne(ye,n),ne(re,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?_x(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=_x(a),n=Nx(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}J(re),ne(re,n)}function We(){J(re),J(ye),J(we)}function Yi(n){n.memoizedState!==null&&ne(Me,n);var a=re.current,r=Nx(a,n.type);a!==r&&(ne(ye,n),ne(re,r))}function zl(n){ye.current===n&&(J(re),J(ye)),Me.current===n&&(J(Me),Lr._currentValue=ee)}var wu,e0;function Xs(n){if(wu===void 0)try{throw Error()}catch(r){var a=r.stack.trim().match(/\n( *(at )?)/);wu=a&&a[1]||"",e0=-1<r.stack.indexOf(`Unknown directive
18 at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`Unknown directive
19`+wu+n+e0}var ju=!1;function Su(n,a){if(!n||ju)return"";ju=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(a){var Y=function(){throw Error()};if(Object.defineProperty(Y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Y,[])}catch(V){var $=V}Reflect.construct(n,[],Y)}else{try{Y.call()}catch(V){$=V}n.call(Y.prototype)}}else{try{throw Error()}catch(V){$=V}(Y=n())&&typeof Y.catch=="function"&&Y.catch(function(){})}}catch(V){if(V&&$&&typeof V.stack=="string")return[V.stack,$.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var h=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");h&&h.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=c.DetermineComponentFrameRoot(),v=m[0],S=m[1];if(v&&S){var C=v.split(`Unknown directive
20`),P=S.split(`Syntax not understood
21`);for(h=c=0;c<C.length&&!C[c].includes("DetermineComponentFrameRoot");)c++;for(;h<P.length&&!P[h].includes("DetermineComponentFrameRoot");)h++;if(c===C.length||h===P.length)for(c=C.length-1,h=P.length-1;1<=c&&0<=h&&C[c]!==P[h];)h--;for(;1<=c&&0<=h;c--,h--)if(C[c]!==P[h]){if(c!==1||h!==1)do if(c--,h--,0>h||C[c]!==P[h]){var H=`Syntax not understood
22`+C[c].replace(" at new "," at ");return n.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",n.displayName)),H}while(1<=c&&0<=h);break}}}finally{ju=!1,Error.prepareStackTrace=r}return(r=n?n.displayName||n.name:"")?Xs(r):""}function Yj(n,a){switch(n.tag){case 26:case 27:case 5:return Xs(n.type);case 16:return Xs("Lazy");case 13:return n.child!==a&&a!==null?Xs("Suspense Fallback"):Xs("Suspense");case 19:return Xs("SuspenseList");case 0:case 15:return Su(n.type,!1);case 11:return Su(n.type.render,!1);case 1:return Su(n.type,!0);case 31:return Xs("Activity");default:return""}}function t0(n){try{var a="",r=null;do a+=Yj(n,r),r=n,n=n.return;while(n);return a}catch(c){return`Unknown directive
23Error generating stack: `+c.message+`Unknown directive
24`+c.stack}}var _u=Object.prototype.hasOwnProperty,Nu=t.unstable_scheduleCallback,Tu=t.unstable_cancelCallback,Fj=t.unstable_shouldYield,Xj=t.unstable_requestPaint,It=t.unstable_now,Jj=t.unstable_getCurrentPriorityLevel,n0=t.unstable_ImmediatePriority,s0=t.unstable_UserBlockingPriority,Pl=t.unstable_NormalPriority,Wj=t.unstable_LowPriority,a0=t.unstable_IdlePriority,Qj=t.log,Zj=t.unstable_setDisableYieldValue,Fi=null,Gt=null;function ps(n){if(typeof Qj=="function"&&Zj(n),Gt&&typeof Gt.setStrictMode=="function")try{Gt.setStrictMode(Fi,n)}catch{}}var Kt=Math.clz32?Math.clz32:nS,eS=Math.log,tS=Math.LN2;function nS(n){return n>>>=0,n===0?32:31-(eS(n)/tS|0)|0}var $l=256,Bl=262144,Vl=4194304;function Js(n){var a=n&42;if(a!==0)return a;switch(n&-n){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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function ql(n,a,r){var c=n.pendingLanes;if(c===0)return 0;var h=0,m=n.suspendedLanes,v=n.pingedLanes;n=n.warmLanes;var S=c&134217727;return S!==0?(c=S&~m,c!==0?h=Js(c):(v&=S,v!==0?h=Js(v):r||(r=S&~n,r!==0&&(h=Js(r))))):(S=c&~m,S!==0?h=Js(S):v!==0?h=Js(v):r||(r=c&~n,r!==0&&(h=Js(r)))),h===0?0:a!==0&&a!==h&&(a&m)===0&&(m=h&-h,r=a&-a,m>=r||m===32&&(r&4194048)!==0)?a:h}function Xi(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}function sS(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32: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 a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function i0(){var n=Vl;return Vl<<=1,(Vl&62914560)===0&&(Vl=4194304),n}function ku(n){for(var a=[],r=0;31>r;r++)a.push(n);return a}function Ji(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function aS(n,a,r,c,h,m){var v=n.pendingLanes;n.pendingLanes=r,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=r,n.entangledLanes&=r,n.errorRecoveryDisabledLanes&=r,n.shellSuspendCounter=0;var S=n.entanglements,C=n.expirationTimes,P=n.hiddenUpdates;for(r=v&~r;0<r;){var H=31-Kt(r),Y=1<<H;S[H]=0,C[H]=-1;var $=P[H];if($!==null)for(P[H]=null,H=0;H<$.length;H++){var V=$[H];V!==null&&(V.lane&=-536870913)}r&=~Y}c!==0&&r0(n,c,0),m!==0&&h===0&&n.tag!==0&&(n.suspendedLanes|=m&~(v&~a))}function r0(n,a,r){n.pendingLanes|=a,n.suspendedLanes&=~a;var c=31-Kt(a);n.entangledLanes|=a,n.entanglements[c]=n.entanglements[c]|1073741824|r&261930}function l0(n,a){var r=n.entangledLanes|=a;for(n=n.entanglements;r;){var c=31-Kt(r),h=1<<c;h&a|n[c]&a&&(n[c]|=a),r&=~h}}function o0(n,a){var r=a&-a;return r=(r&42)!==0?1:Eu(r),(r&(n.suspendedLanes|a))!==0?0:r}function Eu(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;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:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}function Au(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}function c0(){var n=X.p;return n!==0?n:(n=window.event,n===void 0?32:Fx(n.type))}function u0(n,a){var r=X.p;try{return X.p=n,a()}finally{X.p=r}}var gs=Math.random().toString(36).slice(2),pt="__reactFiber$"+gs,Ut="__reactProps$"+gs,Ua="__reactContainer$"+gs,Cu="__reactEvents$"+gs,iS="__reactListeners$"+gs,rS="__reactHandles$"+gs,d0="__reactResources$"+gs,Wi="__reactMarker$"+gs;function Ru(n){delete n[pt],delete n[Ut],delete n[Cu],delete n[iS],delete n[rS]}function La(n){var a=n[pt];if(a)return a;for(var r=n.parentNode;r;){if(a=r[Ua]||r[pt]){if(r=a.alternate,a.child!==null||r!==null&&r.child!==null)for(n=Ox(n);n!==null;){if(r=n[pt])return r;n=Ox(n)}return a}n=r,r=n.parentNode}return null}function za(n){if(n=n[pt]||n[Ua]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}function Qi(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(i(33))}function Pa(n){var a=n[d0];return a||(a=n[d0]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function dt(n){n[Wi]=!0}var h0=new Set,f0={};function Ws(n,a){$a(n,a),$a(n+"Capture",a)}function $a(n,a){for(f0[n]=a,n=0;n<a.length;n++)h0.add(a[n])}var lS=RegExp("^[: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]*$"),m0={},p0={};function oS(n){return _u.call(p0,n)?!0:_u.call(m0,n)?!1:lS.test(n)?p0[n]=!0:(m0[n]=!0,!1)}function Hl(n,a,r){if(oS(a))if(r===null)n.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var c=a.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+r)}}function Il(n,a,r){if(r===null)n.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+r)}}function Vn(n,a,r,c){if(c===null)n.removeAttribute(r);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(r);return}n.setAttributeNS(a,r,""+c)}}function an(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function g0(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function cS(n,a,r){var c=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var h=c.get,m=c.set;return Object.defineProperty(n,a,{configurable:!0,get:function(){return h.call(this)},set:function(v){r=""+v,m.call(this,v)}}),Object.defineProperty(n,a,{enumerable:c.enumerable}),{getValue:function(){return r},setValue:function(v){r=""+v},stopTracking:function(){n._valueTracker=null,delete n[a]}}}}function Ou(n){if(!n._valueTracker){var a=g0(n)?"checked":"value";n._valueTracker=cS(n,a,""+n[a])}}function x0(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var r=a.getValue(),c="";return n&&(c=g0(n)?n.checked?"true":"false":n.value),n=c,n!==r?(a.setValue(n),!0):!1}function Gl(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var uS=/[\n"\\]/g;function rn(n){return n.replace(uS,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Du(n,a,r,c,h,m,v,S){n.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?n.type=v:n.removeAttribute("type"),a!=null?v==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+an(a)):n.value!==""+an(a)&&(n.value=""+an(a)):v!=="submit"&&v!=="reset"||n.removeAttribute("value"),a!=null?Mu(n,v,an(a)):r!=null?Mu(n,v,an(r)):c!=null&&n.removeAttribute("value"),h==null&&m!=null&&(n.defaultChecked=!!m),h!=null&&(n.checked=h&&typeof h!="function"&&typeof h!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?n.name=""+an(S):n.removeAttribute("name")}function y0(n,a,r,c,h,m,v,S){if(m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(n.type=m),a!=null||r!=null){if(!(m!=="submit"&&m!=="reset"||a!=null)){Ou(n);return}r=r!=null?""+an(r):"",a=a!=null?""+an(a):r,S||a===n.value||(n.value=a),n.defaultValue=a}c=c??h,c=typeof c!="function"&&typeof c!="symbol"&&!!c,n.checked=S?n.checked:!!c,n.defaultChecked=!!c,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(n.name=v),Ou(n)}function Mu(n,a,r){a==="number"&&Gl(n.ownerDocument)===n||n.defaultValue===""+r||(n.defaultValue=""+r)}function Ba(n,a,r,c){if(n=n.options,a){a={};for(var h=0;h<r.length;h++)a["$"+r[h]]=!0;for(r=0;r<n.length;r++)h=a.hasOwnProperty("$"+n[r].value),n[r].selected!==h&&(n[r].selected=h),h&&c&&(n[r].defaultSelected=!0)}else{for(r=""+an(r),a=null,h=0;h<n.length;h++){if(n[h].value===r){n[h].selected=!0,c&&(n[h].defaultSelected=!0);return}a!==null||n[h].disabled||(a=n[h])}a!==null&&(a.selected=!0)}}function b0(n,a,r){if(a!=null&&(a=""+an(a),a!==n.value&&(n.value=a),r==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=r!=null?""+an(r):""}function v0(n,a,r,c){if(a==null){if(c!=null){if(r!=null)throw Error(i(92));if(W(c)){if(1<c.length)throw Error(i(93));c=c[0]}r=c}r==null&&(r=""),a=r}r=an(a),n.defaultValue=r,c=n.textContent,c===r&&c!==""&&c!==null&&(n.value=c),Ou(n)}function Va(n,a){if(a){var r=n.firstChild;if(r&&r===n.lastChild&&r.nodeType===3){r.nodeValue=a;return}}n.textContent=a}var dS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function w0(n,a,r){var c=a.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?c?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":c?n.setProperty(a,r):typeof r!="number"||r===0||dS.has(a)?a==="float"?n.cssFloat=r:n[a]=(""+r).trim():n[a]=r+"px"}function j0(n,a,r){if(a!=null&&typeof a!="object")throw Error(i(62));if(n=n.style,r!=null){for(var c in r)!r.hasOwnProperty(c)||a!=null&&a.hasOwnProperty(c)||(c.indexOf("--")===0?n.setProperty(c,""):c==="float"?n.cssFloat="":n[c]="");for(var h in a)c=a[h],a.hasOwnProperty(h)&&r[h]!==c&&w0(n,h,c)}else for(var m in a)a.hasOwnProperty(m)&&w0(n,m,a[m])}function Uu(n){if(n.indexOf("-")===-1)return!1;switch(n){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 hS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),fS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Kl(n){return fS.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}function qn(){}var Lu=null;function zu(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var qa=null,Ha=null;function S0(n){var a=za(n);if(a&&(n=a.stateNode)){var r=n[Ut]||null;e:switch(n=a.stateNode,a.type){case"input":if(Du(n,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),a=r.name,r.type==="radio"&&a!=null){for(r=n;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+rn(""+a)+'"][type="radio"]'),a=0;a<r.length;a++){var c=r[a];if(c!==n&&c.form===n.form){var h=c[Ut]||null;if(!h)throw Error(i(90));Du(c,h.value,h.defaultValue,h.defaultValue,h.checked,h.defaultChecked,h.type,h.name)}}for(a=0;a<r.length;a++)c=r[a],c.form===n.form&&x0(c)}break e;case"textarea":b0(n,r.value,r.defaultValue);break e;case"select":a=r.value,a!=null&&Ba(n,!!r.multiple,a,!1)}}}var Pu=!1;function _0(n,a,r){if(Pu)return n(a,r);Pu=!0;try{var c=n(a);return c}finally{if(Pu=!1,(qa!==null||Ha!==null)&&(Mo(),qa&&(a=qa,n=Ha,Ha=qa=null,S0(a),n)))for(a=0;a<n.length;a++)S0(n[a])}}function Zi(n,a){var r=n.stateNode;if(r===null)return null;var c=r[Ut]||null;if(c===null)return null;r=c[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(r&&typeof r!="function")throw Error(i(231,a,typeof r));return r}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$u=!1;if(Hn)try{var er={};Object.defineProperty(er,"passive",{get:function(){$u=!0}}),window.addEventListener("test",er,er),window.removeEventListener("test",er,er)}catch{$u=!1}var xs=null,Bu=null,Yl=null;function N0(){if(Yl)return Yl;var n,a=Bu,r=a.length,c,h="value"in xs?xs.value:xs.textContent,m=h.length;for(n=0;n<r&&a[n]===h[n];n++);var v=r-n;for(c=1;c<=v&&a[r-c]===h[m-c];c++);return Yl=h.slice(n,1<c?1-c:void 0)}function Fl(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}function Xl(){return!0}function T0(){return!1}function Lt(n){function a(r,c,h,m,v){this._reactName=r,this._targetInst=h,this.type=c,this.nativeEvent=m,this.target=v,this.currentTarget=null;for(var S in n)n.hasOwnProperty(S)&&(r=n[S],this[S]=r?r(m):m[S]);return this.isDefaultPrevented=(m.defaultPrevented!=null?m.defaultPrevented:m.returnValue===!1)?Xl:T0,this.isPropagationStopped=T0,this}return y(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Xl)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Xl)},persist:function(){},isPersistent:Xl}),a}var Qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jl=Lt(Qs),tr=y({},Qs,{view:0,detail:0}),mS=Lt(tr),Vu,qu,nr,Wl=y({},tr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==nr&&(nr&&n.type==="mousemove"?(Vu=n.screenX-nr.screenX,qu=n.screenY-nr.screenY):qu=Vu=0,nr=n),Vu)},movementY:function(n){return"movementY"in n?n.movementY:qu}}),k0=Lt(Wl),pS=y({},Wl,{dataTransfer:0}),gS=Lt(pS),xS=y({},tr,{relatedTarget:0}),Hu=Lt(xS),yS=y({},Qs,{animationName:0,elapsedTime:0,pseudoElement:0}),bS=Lt(yS),vS=y({},Qs,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),wS=Lt(vS),jS=y({},Qs,{data:0}),E0=Lt(jS),SS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_S={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},NS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TS(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=NS[n])?!!a[n]:!1}function Iu(){return TS}var kS=y({},tr,{key:function(n){if(n.key){var a=SS[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=Fl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?_S[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iu,charCode:function(n){return n.type==="keypress"?Fl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?Fl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),ES=Lt(kS),AS=y({},Wl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),A0=Lt(AS),CS=y({},tr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iu}),RS=Lt(CS),OS=y({},Qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),DS=Lt(OS),MS=y({},Wl,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),US=Lt(MS),LS=y({},Qs,{newState:0,oldState:0}),zS=Lt(LS),PS=[9,13,27,32],Gu=Hn&&"CompositionEvent"in window,sr=null;Hn&&"documentMode"in document&&(sr=document.documentMode);var $S=Hn&&"TextEvent"in window&&!sr,C0=Hn&&(!Gu||sr&&8<sr&&11>=sr),R0=" ",O0=!1;function D0(n,a){switch(n){case"keyup":return PS.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function M0(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ia=!1;function BS(n,a){switch(n){case"compositionend":return M0(a);case"keypress":return a.which!==32?null:(O0=!0,R0);case"textInput":return n=a.data,n===R0&&O0?null:n;default:return null}}function VS(n,a){if(Ia)return n==="compositionend"||!Gu&&D0(n,a)?(n=N0(),Yl=Bu=xs=null,Ia=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return C0&&a.locale!=="ko"?null:a.data;default:return null}}var qS={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function U0(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!qS[n.type]:a==="textarea"}function L0(n,a,r,c){qa?Ha?Ha.push(c):Ha=[c]:qa=c,a=Vo(a,"onChange"),0<a.length&&(r=new Jl("onChange","change",null,r,c),n.push({event:r,listeners:a}))}var ar=null,ir=null;function HS(n){yx(n,0)}function Ql(n){var a=Qi(n);if(x0(a))return n}function z0(n,a){if(n==="change")return a}var P0=!1;if(Hn){var Ku;if(Hn){var Yu="oninput"in document;if(!Yu){var $0=document.createElement("div");$0.setAttribute("oninput","return;"),Yu=typeof $0.oninput=="function"}Ku=Yu}else Ku=!1;P0=Ku&&(!document.documentMode||9<document.documentMode)}function B0(){ar&&(ar.detachEvent("onpropertychange",V0),ir=ar=null)}function V0(n){if(n.propertyName==="value"&&Ql(ir)){var a=[];L0(a,ir,n,zu(n)),_0(HS,a)}}function IS(n,a,r){n==="focusin"?(B0(),ar=a,ir=r,ar.attachEvent("onpropertychange",V0)):n==="focusout"&&B0()}function GS(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ql(ir)}function KS(n,a){if(n==="click")return Ql(a)}function YS(n,a){if(n==="input"||n==="change")return Ql(a)}function FS(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}var Yt=typeof Object.is=="function"?Object.is:FS;function rr(n,a){if(Yt(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var r=Object.keys(n),c=Object.keys(a);if(r.length!==c.length)return!1;for(c=0;c<r.length;c++){var h=r[c];if(!_u.call(a,h)||!Yt(n[h],a[h]))return!1}return!0}function q0(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function H0(n,a){var r=q0(n);n=0;for(var c;r;){if(r.nodeType===3){if(c=n+r.textContent.length,n<=a&&c>=a)return{node:r,offset:a-n};n=c}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=q0(r)}}function I0(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?I0(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}function G0(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=Gl(n.document);a instanceof n.HTMLIFrameElement;){try{var r=typeof a.contentWindow.location.href=="string"}catch{r=!1}if(r)n=a.contentWindow;else break;a=Gl(n.document)}return a}function Fu(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}var XS=Hn&&"documentMode"in document&&11>=document.documentMode,Ga=null,Xu=null,lr=null,Ju=!1;function K0(n,a,r){var c=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ju||Ga==null||Ga!==Gl(c)||(c=Ga,"selectionStart"in c&&Fu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),lr&&rr(lr,c)||(lr=c,c=Vo(Xu,"onSelect"),0<c.length&&(a=new Jl("onSelect","select",null,a,r),n.push({event:a,listeners:c}),a.target=Ga)))}function Zs(n,a){var r={};return r[n.toLowerCase()]=a.toLowerCase(),r["Webkit"+n]="webkit"+a,r["Moz"+n]="moz"+a,r}var Ka={animationend:Zs("Animation","AnimationEnd"),animationiteration:Zs("Animation","AnimationIteration"),animationstart:Zs("Animation","AnimationStart"),transitionrun:Zs("Transition","TransitionRun"),transitionstart:Zs("Transition","TransitionStart"),transitioncancel:Zs("Transition","TransitionCancel"),transitionend:Zs("Transition","TransitionEnd")},Wu={},Y0={};Hn&&(Y0=document.createElement("div").style,"AnimationEvent"in window||(delete Ka.animationend.animation,delete Ka.animationiteration.animation,delete Ka.animationstart.animation),"TransitionEvent"in window||delete Ka.transitionend.transition);function ea(n){if(Wu[n])return Wu[n];if(!Ka[n])return n;var a=Ka[n],r;for(r in a)if(a.hasOwnProperty(r)&&r in Y0)return Wu[n]=a[r];return n}var F0=ea("animationend"),X0=ea("animationiteration"),J0=ea("animationstart"),JS=ea("transitionrun"),WS=ea("transitionstart"),QS=ea("transitioncancel"),W0=ea("transitionend"),Q0=new Map,Qu="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Qu.push("scrollEnd");function yn(n,a){Q0.set(n,a),Ws(a,[n])}var Zl=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}console.error(n)},ln=[],Ya=0,Zu=0;function eo(){for(var n=Ya,a=Zu=Ya=0;a<n;){var r=ln[a];ln[a++]=null;var c=ln[a];ln[a++]=null;var h=ln[a];ln[a++]=null;var m=ln[a];if(ln[a++]=null,c!==null&&h!==null){var v=c.pending;v===null?h.next=h:(h.next=v.next,v.next=h),c.pending=h}m!==0&&Z0(r,h,m)}}function to(n,a,r,c){ln[Ya++]=n,ln[Ya++]=a,ln[Ya++]=r,ln[Ya++]=c,Zu|=c,n.lanes|=c,n=n.alternate,n!==null&&(n.lanes|=c)}function ed(n,a,r,c){return to(n,a,r,c),no(n)}function ta(n,a){return to(n,null,null,a),no(n)}function Z0(n,a,r){n.lanes|=r;var c=n.alternate;c!==null&&(c.lanes|=r);for(var h=!1,m=n.return;m!==null;)m.childLanes|=r,c=m.alternate,c!==null&&(c.childLanes|=r),m.tag===22&&(n=m.stateNode,n===null||n._visibility&1||(h=!0)),n=m,m=m.return;return n.tag===3?(m=n.stateNode,h&&a!==null&&(h=31-Kt(r),n=m.hiddenUpdates,c=n[h],c===null?n[h]=[a]:c.push(a),a.lane=r|536870912),m):null}function no(n){if(50<Ar)throw Ar=0,ch=null,Error(i(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}var Fa={};function ZS(n,a,r,c){this.tag=n,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ft(n,a,r,c){return new ZS(n,a,r,c)}function td(n){return n=n.prototype,!(!n||!n.isReactComponent)}function In(n,a){var r=n.alternate;return r===null?(r=Ft(n.tag,a,n.key,n.mode),r.elementType=n.elementType,r.type=n.type,r.stateNode=n.stateNode,r.alternate=n,n.alternate=r):(r.pendingProps=a,r.type=n.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=n.flags&65011712,r.childLanes=n.childLanes,r.lanes=n.lanes,r.child=n.child,r.memoizedProps=n.memoizedProps,r.memoizedState=n.memoizedState,r.updateQueue=n.updateQueue,a=n.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},r.sibling=n.sibling,r.index=n.index,r.ref=n.ref,r.refCleanup=n.refCleanup,r}function ep(n,a){n.flags&=65011714;var r=n.alternate;return r===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=r.childLanes,n.lanes=r.lanes,n.child=r.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=r.memoizedProps,n.memoizedState=r.memoizedState,n.updateQueue=r.updateQueue,n.type=r.type,a=r.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}function so(n,a,r,c,h,m){var v=0;if(c=n,typeof n=="function")td(n)&&(v=1);else if(typeof n=="string")v=a4(n,r,re.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case q:return n=Ft(31,r,a,h),n.elementType=q,n.lanes=m,n;case N:return na(r.children,h,m,a);case _:v=8,h|=24;break;case k:return n=Ft(12,r,a,h|2),n.elementType=k,n.lanes=m,n;case F:return n=Ft(13,r,a,h),n.elementType=F,n.lanes=m,n;case I:return n=Ft(19,r,a,h),n.elementType=I,n.lanes=m,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case M:v=10;break e;case R:v=9;break e;case T:v=11;break e;case E:v=14;break e;case L:v=16,c=null;break e}v=29,r=Error(i(130,n===null?"null":typeof n,"")),c=null}return a=Ft(v,r,a,h),a.elementType=n,a.type=c,a.lanes=m,a}function na(n,a,r,c){return n=Ft(7,n,c,a),n.lanes=r,n}function nd(n,a,r){return n=Ft(6,n,null,a),n.lanes=r,n}function tp(n){var a=Ft(18,null,null,0);return a.stateNode=n,a}function sd(n,a,r){return a=Ft(4,n.children!==null?n.children:[],n.key,a),a.lanes=r,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}var np=new WeakMap;function on(n,a){if(typeof n=="object"&&n!==null){var r=np.get(n);return r!==void 0?r:(a={value:n,source:a,stack:t0(a)},np.set(n,a),a)}return{value:n,source:a,stack:t0(a)}}var Xa=[],Ja=0,ao=null,or=0,cn=[],un=0,ys=null,Cn=1,Rn="";function Gn(n,a){Xa[Ja++]=or,Xa[Ja++]=ao,ao=n,or=a}function sp(n,a,r){cn[un++]=Cn,cn[un++]=Rn,cn[un++]=ys,ys=n;var c=Cn;n=Rn;var h=32-Kt(c)-1;c&=~(1<<h),r+=1;var m=32-Kt(a)+h;if(30<m){var v=h-h%5;m=(c&(1<<v)-1).toString(32),c>>=v,h-=v,Cn=1<<32-Kt(a)+h|r<<h|c,Rn=m+n}else Cn=1<<m|r<<h|c,Rn=n}function ad(n){n.return!==null&&(Gn(n,1),sp(n,1,0))}function id(n){for(;n===ao;)ao=Xa[--Ja],Xa[Ja]=null,or=Xa[--Ja],Xa[Ja]=null;for(;n===ys;)ys=cn[--un],cn[un]=null,Rn=cn[--un],cn[un]=null,Cn=cn[--un],cn[un]=null}function ap(n,a){cn[un++]=Cn,cn[un++]=Rn,cn[un++]=ys,Cn=a.id,Rn=a.overflow,ys=n}var gt=null,Ie=null,Ee=!1,bs=null,dn=!1,rd=Error(i(519));function vs(n){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw cr(on(a,n)),rd}function ip(n){var a=n.stateNode,r=n.type,c=n.memoizedProps;switch(a[pt]=n,a[Ut]=c,r){case"dialog":Se("cancel",a),Se("close",a);break;case"iframe":case"object":case"embed":Se("load",a);break;case"video":case"audio":for(r=0;r<Rr.length;r++)Se(Rr[r],a);break;case"source":Se("error",a);break;case"img":case"image":case"link":Se("error",a),Se("load",a);break;case"details":Se("toggle",a);break;case"input":Se("invalid",a),y0(a,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":Se("invalid",a);break;case"textarea":Se("invalid",a),v0(a,c.value,c.defaultValue,c.children)}r=c.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||a.textContent===""+r||c.suppressHydrationWarning===!0||jx(a.textContent,r)?(c.popover!=null&&(Se("beforetoggle",a),Se("toggle",a)),c.onScroll!=null&&Se("scroll",a),c.onScrollEnd!=null&&Se("scrollend",a),c.onClick!=null&&(a.onclick=qn),a=!0):a=!1,a||vs(n,!0)}function rp(n){for(gt=n.return;gt;)switch(gt.tag){case 5:case 31:case 13:dn=!1;return;case 27:case 3:dn=!0;return;default:gt=gt.return}}function Wa(n){if(n!==gt)return!1;if(!Ee)return rp(n),Ee=!0,!1;var a=n.tag,r;if((r=a!==3&&a!==27)&&((r=a===5)&&(r=n.type,r=!(r!=="form"&&r!=="button")||_h(n.type,n.memoizedProps)),r=!r),r&&Ie&&vs(n),rp(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Ie=Rx(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(317));Ie=Rx(n)}else a===27?(a=Ie,Ms(n.type)?(n=Ah,Ah=null,Ie=n):Ie=a):Ie=gt?fn(n.stateNode.nextSibling):null;return!0}function sa(){Ie=gt=null,Ee=!1}function ld(){var n=bs;return n!==null&&(Bt===null?Bt=n:Bt.push.apply(Bt,n),bs=null),n}function cr(n){bs===null?bs=[n]:bs.push(n)}var od=D(null),aa=null,Kn=null;function ws(n,a,r){ne(od,a._currentValue),a._currentValue=r}function Yn(n){n._currentValue=od.current,J(od)}function cd(n,a,r){for(;n!==null;){var c=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,c!==null&&(c.childLanes|=a)):c!==null&&(c.childLanes&a)!==a&&(c.childLanes|=a),n===r)break;n=n.return}}function ud(n,a,r,c){var h=n.child;for(h!==null&&(h.return=n);h!==null;){var m=h.dependencies;if(m!==null){var v=h.child;m=m.firstContext;e:for(;m!==null;){var S=m;m=h;for(var C=0;C<a.length;C++)if(S.context===a[C]){m.lanes|=r,S=m.alternate,S!==null&&(S.lanes|=r),cd(m.return,r,n),c||(v=null);break e}m=S.next}}else if(h.tag===18){if(v=h.return,v===null)throw Error(i(341));v.lanes|=r,m=v.alternate,m!==null&&(m.lanes|=r),cd(v,r,n),v=null}else v=h.child;if(v!==null)v.return=h;else for(v=h;v!==null;){if(v===n){v=null;break}if(h=v.sibling,h!==null){h.return=v.return,v=h;break}v=v.return}h=v}}function Qa(n,a,r,c){n=null;for(var h=a,m=!1;h!==null;){if(!m){if((h.flags&524288)!==0)m=!0;else if((h.flags&262144)!==0)break}if(h.tag===10){var v=h.alternate;if(v===null)throw Error(i(387));if(v=v.memoizedProps,v!==null){var S=h.type;Yt(h.pendingProps.value,v.value)||(n!==null?n.push(S):n=[S])}}else if(h===Me.current){if(v=h.alternate,v===null)throw Error(i(387));v.memoizedState.memoizedState!==h.memoizedState.memoizedState&&(n!==null?n.push(Lr):n=[Lr])}h=h.return}n!==null&&ud(a,n,r,c),a.flags|=262144}function io(n){for(n=n.firstContext;n!==null;){if(!Yt(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}function ia(n){aa=n,Kn=null,n=n.dependencies,n!==null&&(n.firstContext=null)}function xt(n){return lp(aa,n)}function ro(n,a){return aa===null&&ia(n),lp(n,a)}function lp(n,a){var r=a._currentValue;if(a={context:a,memoizedValue:r,next:null},Kn===null){if(n===null)throw Error(i(308));Kn=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else Kn=Kn.next=a;return r}var e_=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:function(r,c){n.push(c)}};this.abort=function(){a.aborted=!0,n.forEach(function(r){return r()})}},t_=t.unstable_scheduleCallback,n_=t.unstable_NormalPriority,et={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function dd(){return{controller:new e_,data:new Map,refCount:0}}function ur(n){n.refCount--,n.refCount===0&&t_(n_,function(){n.controller.abort()})}var dr=null,hd=0,Za=0,ei=null;function s_(n,a){if(dr===null){var r=dr=[];hd=0,Za=ph(),ei={status:"pending",value:void 0,then:function(c){r.push(c)}}}return hd++,a.then(op,op),a}function op(){if(--hd===0&&dr!==null){ei!==null&&(ei.status="fulfilled");var n=dr;dr=null,Za=0,ei=null;for(var a=0;a<n.length;a++)(0,n[a])()}}function a_(n,a){var r=[],c={status:"pending",value:null,reason:null,then:function(h){r.push(h)}};return n.then(function(){c.status="fulfilled",c.value=a;for(var h=0;h<r.length;h++)(0,r[h])(a)},function(h){for(c.status="rejected",c.reason=h,h=0;h<r.length;h++)(0,r[h])(void 0)}),c}var cp=B.S;B.S=function(n,a){Kg=It(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&s_(n,a),cp!==null&&cp(n,a)};var ra=D(null);function fd(){var n=ra.current;return n!==null?n:qe.pooledCache}function lo(n,a){a===null?ne(ra,ra.current):ne(ra,a.pool)}function up(){var n=fd();return n===null?null:{parent:et._currentValue,pool:n}}var ti=Error(i(460)),md=Error(i(474)),oo=Error(i(542)),co={then:function(){}};function dp(n){return n=n.status,n==="fulfilled"||n==="rejected"}function hp(n,a,r){switch(r=n[r],r===void 0?n.push(a):r!==a&&(a.then(qn,qn),a=r),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,mp(n),n;default:if(typeof a.status=="string")a.then(qn,qn);else{if(n=qe,n!==null&&100<n.shellSuspendCounter)throw Error(i(482));n=a,n.status="pending",n.then(function(c){if(a.status==="pending"){var h=a;h.status="fulfilled",h.value=c}},function(c){if(a.status==="pending"){var h=a;h.status="rejected",h.reason=c}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,mp(n),n}throw oa=a,ti}}function la(n){try{var a=n._init;return a(n._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(oa=r,ti):r}}var oa=null;function fp(){if(oa===null)throw Error(i(459));var n=oa;return oa=null,n}function mp(n){if(n===ti||n===oo)throw Error(i(483))}var ni=null,hr=0;function uo(n){var a=hr;return hr+=1,ni===null&&(ni=[]),hp(ni,n,a)}function fr(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}function ho(n,a){throw a.$$typeof===b?Error(i(525)):(n=Object.prototype.toString.call(a),Error(i(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}function pp(n){function a(U,O){if(n){var z=U.deletions;z===null?(U.deletions=[O],U.flags|=16):z.push(O)}}function r(U,O){if(!n)return null;for(;O!==null;)a(U,O),O=O.sibling;return null}function c(U){for(var O=new Map;U!==null;)U.key!==null?O.set(U.key,U):O.set(U.index,U),U=U.sibling;return O}function h(U,O){return U=In(U,O),U.index=0,U.sibling=null,U}function m(U,O,z){return U.index=z,n?(z=U.alternate,z!==null?(z=z.index,z<O?(U.flags|=67108866,O):z):(U.flags|=67108866,O)):(U.flags|=1048576,O)}function v(U){return n&&U.alternate===null&&(U.flags|=67108866),U}function S(U,O,z,K){return O===null||O.tag!==6?(O=nd(z,U.mode,K),O.return=U,O):(O=h(O,z),O.return=U,O)}function C(U,O,z,K){var ce=z.type;return ce===N?H(U,O,z.props.children,K,z.key):O!==null&&(O.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===L&&la(ce)===O.type)?(O=h(O,z.props),fr(O,z),O.return=U,O):(O=so(z.type,z.key,z.props,null,U.mode,K),fr(O,z),O.return=U,O)}function P(U,O,z,K){return O===null||O.tag!==4||O.stateNode.containerInfo!==z.containerInfo||O.stateNode.implementation!==z.implementation?(O=sd(z,U.mode,K),O.return=U,O):(O=h(O,z.children||[]),O.return=U,O)}function H(U,O,z,K,ce){return O===null||O.tag!==7?(O=na(z,U.mode,K,ce),O.return=U,O):(O=h(O,z),O.return=U,O)}function Y(U,O,z){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return O=nd(""+O,U.mode,z),O.return=U,O;if(typeof O=="object"&&O!==null){switch(O.$$typeof){case w:return z=so(O.type,O.key,O.props,null,U.mode,z),fr(z,O),z.return=U,z;case j:return O=sd(O,U.mode,z),O.return=U,O;case L:return O=la(O),Y(U,O,z)}if(W(O)||xe(O))return O=na(O,U.mode,z,null),O.return=U,O;if(typeof O.then=="function")return Y(U,uo(O),z);if(O.$$typeof===M)return Y(U,ro(U,O),z);ho(U,O)}return null}function $(U,O,z,K){var ce=O!==null?O.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return ce!==null?null:S(U,O,""+z,K);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case w:return z.key===ce?C(U,O,z,K):null;case j:return z.key===ce?P(U,O,z,K):null;case L:return z=la(z),$(U,O,z,K)}if(W(z)||xe(z))return ce!==null?null:H(U,O,z,K,null);if(typeof z.then=="function")return $(U,O,uo(z),K);if(z.$$typeof===M)return $(U,O,ro(U,z),K);ho(U,z)}return null}function V(U,O,z,K,ce){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return U=U.get(z)||null,S(O,U,""+K,ce);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case w:return U=U.get(K.key===null?z:K.key)||null,C(O,U,K,ce);case j:return U=U.get(K.key===null?z:K.key)||null,P(O,U,K,ce);case L:return K=la(K),V(U,O,z,K,ce)}if(W(K)||xe(K))return U=U.get(z)||null,H(O,U,K,ce,null);if(typeof K.then=="function")return V(U,O,z,uo(K),ce);if(K.$$typeof===M)return V(U,O,z,ro(O,K),ce);ho(O,K)}return null}function ae(U,O,z,K){for(var ce=null,Re=null,le=O,ve=O=0,Ne=null;le!==null&&ve<z.length;ve++){le.index>ve?(Ne=le,le=null):Ne=le.sibling;var Oe=$(U,le,z[ve],K);if(Oe===null){le===null&&(le=Ne);break}n&&le&&Oe.alternate===null&&a(U,le),O=m(Oe,O,ve),Re===null?ce=Oe:Re.sibling=Oe,Re=Oe,le=Ne}if(ve===z.length)return r(U,le),Ee&&Gn(U,ve),ce;if(le===null){for(;ve<z.length;ve++)le=Y(U,z[ve],K),le!==null&&(O=m(le,O,ve),Re===null?ce=le:Re.sibling=le,Re=le);return Ee&&Gn(U,ve),ce}for(le=c(le);ve<z.length;ve++)Ne=V(le,U,ve,z[ve],K),Ne!==null&&(n&&Ne.alternate!==null&&le.delete(Ne.key===null?ve:Ne.key),O=m(Ne,O,ve),Re===null?ce=Ne:Re.sibling=Ne,Re=Ne);return n&&le.forEach(function($s){return a(U,$s)}),Ee&&Gn(U,ve),ce}function he(U,O,z,K){if(z==null)throw Error(i(151));for(var ce=null,Re=null,le=O,ve=O=0,Ne=null,Oe=z.next();le!==null&&!Oe.done;ve++,Oe=z.next()){le.index>ve?(Ne=le,le=null):Ne=le.sibling;var $s=$(U,le,Oe.value,K);if($s===null){le===null&&(le=Ne);break}n&&le&&$s.alternate===null&&a(U,le),O=m($s,O,ve),Re===null?ce=$s:Re.sibling=$s,Re=$s,le=Ne}if(Oe.done)return r(U,le),Ee&&Gn(U,ve),ce;if(le===null){for(;!Oe.done;ve++,Oe=z.next())Oe=Y(U,Oe.value,K),Oe!==null&&(O=m(Oe,O,ve),Re===null?ce=Oe:Re.sibling=Oe,Re=Oe);return Ee&&Gn(U,ve),ce}for(le=c(le);!Oe.done;ve++,Oe=z.next())Oe=V(le,U,ve,Oe.value,K),Oe!==null&&(n&&Oe.alternate!==null&&le.delete(Oe.key===null?ve:Oe.key),O=m(Oe,O,ve),Re===null?ce=Oe:Re.sibling=Oe,Re=Oe);return n&&le.forEach(function(p4){return a(U,p4)}),Ee&&Gn(U,ve),ce}function Be(U,O,z,K){if(typeof z=="object"&&z!==null&&z.type===N&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case w:e:{for(var ce=z.key;O!==null;){if(O.key===ce){if(ce=z.type,ce===N){if(O.tag===7){r(U,O.sibling),K=h(O,z.props.children),K.return=U,U=K;break e}}else if(O.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===L&&la(ce)===O.type){r(U,O.sibling),K=h(O,z.props),fr(K,z),K.return=U,U=K;break e}r(U,O);break}else a(U,O);O=O.sibling}z.type===N?(K=na(z.props.children,U.mode,K,z.key),K.return=U,U=K):(K=so(z.type,z.key,z.props,null,U.mode,K),fr(K,z),K.return=U,U=K)}return v(U);case j:e:{for(ce=z.key;O!==null;){if(O.key===ce)if(O.tag===4&&O.stateNode.containerInfo===z.containerInfo&&O.stateNode.implementation===z.implementation){r(U,O.sibling),K=h(O,z.children||[]),K.return=U,U=K;break e}else{r(U,O);break}else a(U,O);O=O.sibling}K=sd(z,U.mode,K),K.return=U,U=K}return v(U);case L:return z=la(z),Be(U,O,z,K)}if(W(z))return ae(U,O,z,K);if(xe(z)){if(ce=xe(z),typeof ce!="function")throw Error(i(150));return z=ce.call(z),he(U,O,z,K)}if(typeof z.then=="function")return Be(U,O,uo(z),K);if(z.$$typeof===M)return Be(U,O,ro(U,z),K);ho(U,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,O!==null&&O.tag===6?(r(U,O.sibling),K=h(O,z),K.return=U,U=K):(r(U,O),K=nd(z,U.mode,K),K.return=U,U=K),v(U)):r(U,O)}return function(U,O,z,K){try{hr=0;var ce=Be(U,O,z,K);return ni=null,ce}catch(le){if(le===ti||le===oo)throw le;var Re=Ft(29,le,null,U.mode);return Re.lanes=K,Re.return=U,Re}}}var ca=pp(!0),gp=pp(!1),js=!1;function pd(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gd(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function Ss(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function _s(n,a,r){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(De&2)!==0){var h=c.pending;return h===null?a.next=a:(a.next=h.next,h.next=a),c.pending=a,a=no(n),Z0(n,null,r),a}return to(n,c,a,r),no(n)}function mr(n,a,r){if(a=a.updateQueue,a!==null&&(a=a.shared,(r&4194048)!==0)){var c=a.lanes;c&=n.pendingLanes,r|=c,a.lanes=r,l0(n,r)}}function xd(n,a){var r=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,r===c)){var h=null,m=null;if(r=r.firstBaseUpdate,r!==null){do{var v={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};m===null?h=m=v:m=m.next=v,r=r.next}while(r!==null);m===null?h=m=a:m=m.next=a}else h=m=a;r={baseState:c.baseState,firstBaseUpdate:h,lastBaseUpdate:m,shared:c.shared,callbacks:c.callbacks},n.updateQueue=r;return}n=r.lastBaseUpdate,n===null?r.firstBaseUpdate=a:n.next=a,r.lastBaseUpdate=a}var yd=!1;function pr(){if(yd){var n=ei;if(n!==null)throw n}}function gr(n,a,r,c){yd=!1;var h=n.updateQueue;js=!1;var m=h.firstBaseUpdate,v=h.lastBaseUpdate,S=h.shared.pending;if(S!==null){h.shared.pending=null;var C=S,P=C.next;C.next=null,v===null?m=P:v.next=P,v=C;var H=n.alternate;H!==null&&(H=H.updateQueue,S=H.lastBaseUpdate,S!==v&&(S===null?H.firstBaseUpdate=P:S.next=P,H.lastBaseUpdate=C))}if(m!==null){var Y=h.baseState;v=0,H=P=C=null,S=m;do{var $=S.lane&-536870913,V=$!==S.lane;if(V?(_e&$)===$:(c&$)===$){$!==0&&$===Za&&(yd=!0),H!==null&&(H=H.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var ae=n,he=S;$=a;var Be=r;switch(he.tag){case 1:if(ae=he.payload,typeof ae=="function"){Y=ae.call(Be,Y,$);break e}Y=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=he.payload,$=typeof ae=="function"?ae.call(Be,Y,$):ae,$==null)break e;Y=y({},Y,$);break e;case 2:js=!0}}$=S.callback,$!==null&&(n.flags|=64,V&&(n.flags|=8192),V=h.callbacks,V===null?h.callbacks=[$]:V.push($))}else V={lane:$,tag:S.tag,payload:S.payload,callback:S.callback,next:null},H===null?(P=H=V,C=Y):H=H.next=V,v|=$;if(S=S.next,S===null){if(S=h.shared.pending,S===null)break;V=S,S=V.next,V.next=null,h.lastBaseUpdate=V,h.shared.pending=null}}while(!0);H===null&&(C=Y),h.baseState=C,h.firstBaseUpdate=P,h.lastBaseUpdate=H,m===null&&(h.shared.lanes=0),As|=v,n.lanes=v,n.memoizedState=Y}}function xp(n,a){if(typeof n!="function")throw Error(i(191,n));n.call(a)}function yp(n,a){var r=n.callbacks;if(r!==null)for(n.callbacks=null,n=0;n<r.length;n++)xp(r[n],a)}var si=D(null),fo=D(0);function bp(n,a){n=ns,ne(fo,n),ne(si,a),ns=n|a.baseLanes}function bd(){ne(fo,ns),ne(si,si.current)}function vd(){ns=fo.current,J(si),J(fo)}var Xt=D(null),hn=null;function Ns(n){var a=n.alternate;ne(Qe,Qe.current&1),ne(Xt,n),hn===null&&(a===null||si.current!==null||a.memoizedState!==null)&&(hn=n)}function wd(n){ne(Qe,Qe.current),ne(Xt,n),hn===null&&(hn=n)}function vp(n){n.tag===22?(ne(Qe,Qe.current),ne(Xt,n),hn===null&&(hn=n)):Ts()}function Ts(){ne(Qe,Qe.current),ne(Xt,Xt.current)}function Jt(n){J(Xt),hn===n&&(hn=null),J(Qe)}var Qe=D(0);function mo(n){for(var a=n;a!==null;){if(a.tag===13){var r=a.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||kh(r)||Eh(r)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Fn=0,be=null,Pe=null,tt=null,po=!1,ai=!1,ua=!1,go=0,xr=0,ii=null,i_=0;function Fe(){throw Error(i(321))}function jd(n,a){if(a===null)return!1;for(var r=0;r<a.length&&r<n.length;r++)if(!Yt(n[r],a[r]))return!1;return!0}function Sd(n,a,r,c,h,m){return Fn=m,be=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,B.H=n===null||n.memoizedState===null?sg:Pd,ua=!1,m=r(c,h),ua=!1,ai&&(m=jp(a,r,c,h)),wp(n),m}function wp(n){B.H=vr;var a=Pe!==null&&Pe.next!==null;if(Fn=0,tt=Pe=be=null,po=!1,xr=0,ii=null,a)throw Error(i(300));n===null||nt||(n=n.dependencies,n!==null&&io(n)&&(nt=!0))}function jp(n,a,r,c){be=n;var h=0;do{if(ai&&(ii=null),xr=0,ai=!1,25<=h)throw Error(i(301));if(h+=1,tt=Pe=null,n.updateQueue!=null){var m=n.updateQueue;m.lastEffect=null,m.events=null,m.stores=null,m.memoCache!=null&&(m.memoCache.index=0)}B.H=ag,m=a(r,c)}while(ai);return m}function r_(){var n=B.H,a=n.useState()[0];return a=typeof a.then=="function"?yr(a):a,n=n.useState()[0],(Pe!==null?Pe.memoizedState:null)!==n&&(be.flags|=1024),a}function _d(){var n=go!==0;return go=0,n}function Nd(n,a,r){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~r}function Td(n){if(po){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}po=!1}Fn=0,tt=Pe=be=null,ai=!1,xr=go=0,ii=null}function Ct(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?be.memoizedState=tt=n:tt=tt.next=n,tt}function Ze(){if(Pe===null){var n=be.alternate;n=n!==null?n.memoizedState:null}else n=Pe.next;var a=tt===null?be.memoizedState:tt.next;if(a!==null)tt=a,Pe=n;else{if(n===null)throw be.alternate===null?Error(i(467)):Error(i(310));Pe=n,n={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},tt===null?be.memoizedState=tt=n:tt=tt.next=n}return tt}function xo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yr(n){var a=xr;return xr+=1,ii===null&&(ii=[]),n=hp(ii,n,a),a=be,(tt===null?a.memoizedState:tt.next)===null&&(a=a.alternate,B.H=a===null||a.memoizedState===null?sg:Pd),n}function yo(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return yr(n);if(n.$$typeof===M)return xt(n)}throw Error(i(438,String(n)))}function kd(n){var a=null,r=be.updateQueue;if(r!==null&&(a=r.memoCache),a==null){var c=be.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(a={data:c.data.map(function(h){return h.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),r===null&&(r=xo(),be.updateQueue=r),r.memoCache=a,r=a.data[a.index],r===void 0)for(r=a.data[a.index]=Array(n),c=0;c<n;c++)r[c]=G;return a.index++,r}function Xn(n,a){return typeof a=="function"?a(n):a}function bo(n){var a=Ze();return Ed(a,Pe,n)}function Ed(n,a,r){var c=n.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=r;var h=n.baseQueue,m=c.pending;if(m!==null){if(h!==null){var v=h.next;h.next=m.next,m.next=v}a.baseQueue=h=m,c.pending=null}if(m=n.baseState,h===null)n.memoizedState=m;else{a=h.next;var S=v=null,C=null,P=a,H=!1;do{var Y=P.lane&-536870913;if(Y!==P.lane?(_e&Y)===Y:(Fn&Y)===Y){var $=P.revertLane;if($===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null}),Y===Za&&(H=!0);else if((Fn&$)===$){P=P.next,$===Za&&(H=!0);continue}else Y={lane:0,revertLane:P.revertLane,gesture:null,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},C===null?(S=C=Y,v=m):C=C.next=Y,be.lanes|=$,As|=$;Y=P.action,ua&&r(m,Y),m=P.hasEagerState?P.eagerState:r(m,Y)}else $={lane:Y,revertLane:P.revertLane,gesture:P.gesture,action:P.action,hasEagerState:P.hasEagerState,eagerState:P.eagerState,next:null},C===null?(S=C=$,v=m):C=C.next=$,be.lanes|=Y,As|=Y;P=P.next}while(P!==null&&P!==a);if(C===null?v=m:C.next=S,!Yt(m,n.memoizedState)&&(nt=!0,H&&(r=ei,r!==null)))throw r;n.memoizedState=m,n.baseState=v,n.baseQueue=C,c.lastRenderedState=m}return h===null&&(c.lanes=0),[n.memoizedState,c.dispatch]}function Ad(n){var a=Ze(),r=a.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var c=r.dispatch,h=r.pending,m=a.memoizedState;if(h!==null){r.pending=null;var v=h=h.next;do m=n(m,v.action),v=v.next;while(v!==h);Yt(m,a.memoizedState)||(nt=!0),a.memoizedState=m,a.baseQueue===null&&(a.baseState=m),r.lastRenderedState=m}return[m,c]}function Sp(n,a,r){var c=be,h=Ze(),m=Ee;if(m){if(r===void 0)throw Error(i(407));r=r()}else r=a();var v=!Yt((Pe||h).memoizedState,r);if(v&&(h.memoizedState=r,nt=!0),h=h.queue,Od(Tp.bind(null,c,h,n),[n]),h.getSnapshot!==a||v||tt!==null&&tt.memoizedState.tag&1){if(c.flags|=2048,ri(9,{destroy:void 0},Np.bind(null,c,h,r,a),null),qe===null)throw Error(i(349));m||(Fn&127)!==0||_p(c,a,r)}return r}function _p(n,a,r){n.flags|=16384,n={getSnapshot:a,value:r},a=be.updateQueue,a===null?(a=xo(),be.updateQueue=a,a.stores=[n]):(r=a.stores,r===null?a.stores=[n]:r.push(n))}function Np(n,a,r,c){a.value=r,a.getSnapshot=c,kp(a)&&Ep(n)}function Tp(n,a,r){return r(function(){kp(a)&&Ep(n)})}function kp(n){var a=n.getSnapshot;n=n.value;try{var r=a();return!Yt(n,r)}catch{return!0}}function Ep(n){var a=ta(n,2);a!==null&&Vt(a,n,2)}function Cd(n){var a=Ct();if(typeof n=="function"){var r=n;if(n=r(),ua){ps(!0);try{r()}finally{ps(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:n},a}function Ap(n,a,r,c){return n.baseState=r,Ed(n,Pe,typeof c=="function"?c:Xn)}function l_(n,a,r,c,h){if(jo(n))throw Error(i(485));if(n=a.action,n!==null){var m={payload:h,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){m.listeners.push(v)}};B.T!==null?r(!0):m.isTransition=!1,c(m),r=a.pending,r===null?(m.next=a.pending=m,Cp(a,m)):(m.next=r.next,a.pending=r.next=m)}}function Cp(n,a){var r=a.action,c=a.payload,h=n.state;if(a.isTransition){var m=B.T,v={};B.T=v;try{var S=r(h,c),C=B.S;C!==null&&C(v,S),Rp(n,a,S)}catch(P){Rd(n,a,P)}finally{m!==null&&v.types!==null&&(m.types=v.types),B.T=m}}else try{m=r(h,c),Rp(n,a,m)}catch(P){Rd(n,a,P)}}function Rp(n,a,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(c){Op(n,a,c)},function(c){return Rd(n,a,c)}):Op(n,a,r)}function Op(n,a,r){a.status="fulfilled",a.value=r,Dp(a),n.state=r,a=n.pending,a!==null&&(r=a.next,r===a?n.pending=null:(r=r.next,a.next=r,Cp(n,r)))}function Rd(n,a,r){var c=n.pending;if(n.pending=null,c!==null){c=c.next;do a.status="rejected",a.reason=r,Dp(a),a=a.next;while(a!==c)}n.action=null}function Dp(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}function Mp(n,a){return a}function Up(n,a){if(Ee){var r=qe.formState;if(r!==null){e:{var c=be;if(Ee){if(Ie){t:{for(var h=Ie,m=dn;h.nodeType!==8;){if(!m){h=null;break t}if(h=fn(h.nextSibling),h===null){h=null;break t}}m=h.data,h=m==="F!"||m==="F"?h:null}if(h){Ie=fn(h.nextSibling),c=h.data==="F!";break e}}vs(c)}c=!1}c&&(a=r[0])}}return r=Ct(),r.memoizedState=r.baseState=a,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mp,lastRenderedState:a},r.queue=c,r=eg.bind(null,be,c),c.dispatch=r,c=Cd(!1),m=zd.bind(null,be,!1,c.queue),c=Ct(),h={state:a,dispatch:null,action:n,pending:null},c.queue=h,r=l_.bind(null,be,h,m,r),h.dispatch=r,c.memoizedState=n,[a,r,!1]}function Lp(n){var a=Ze();return zp(a,Pe,n)}function zp(n,a,r){if(a=Ed(n,a,Mp)[0],n=bo(Xn)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var c=yr(a)}catch(v){throw v===ti?oo:v}else c=a;a=Ze();var h=a.queue,m=h.dispatch;return r!==a.memoizedState&&(be.flags|=2048,ri(9,{destroy:void 0},o_.bind(null,h,r),null)),[c,m,n]}function o_(n,a){n.action=a}function Pp(n){var a=Ze(),r=Pe;if(r!==null)return zp(a,r,n);Ze(),a=a.memoizedState,r=Ze();var c=r.queue.dispatch;return r.memoizedState=n,[a,c,!1]}function ri(n,a,r,c){return n={tag:n,create:r,deps:c,inst:a,next:null},a=be.updateQueue,a===null&&(a=xo(),be.updateQueue=a),r=a.lastEffect,r===null?a.lastEffect=n.next=n:(c=r.next,r.next=n,n.next=c,a.lastEffect=n),n}function $p(){return Ze().memoizedState}function vo(n,a,r,c){var h=Ct();be.flags|=n,h.memoizedState=ri(1|a,{destroy:void 0},r,c===void 0?null:c)}function wo(n,a,r,c){var h=Ze();c=c===void 0?null:c;var m=h.memoizedState.inst;Pe!==null&&c!==null&&jd(c,Pe.memoizedState.deps)?h.memoizedState=ri(a,m,r,c):(be.flags|=n,h.memoizedState=ri(1|a,m,r,c))}function Bp(n,a){vo(8390656,8,n,a)}function Od(n,a){wo(2048,8,n,a)}function c_(n){be.flags|=4;var a=be.updateQueue;if(a===null)a=xo(),be.updateQueue=a,a.events=[n];else{var r=a.events;r===null?a.events=[n]:r.push(n)}}function Vp(n){var a=Ze().memoizedState;return c_({ref:a,nextImpl:n}),function(){if((De&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function qp(n,a){return wo(4,2,n,a)}function Hp(n,a){return wo(4,4,n,a)}function Ip(n,a){if(typeof a=="function"){n=n();var r=a(n);return function(){typeof r=="function"?r():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}function Gp(n,a,r){r=r!=null?r.concat([n]):null,wo(4,4,Ip.bind(null,a,n),r)}function Dd(){}function Kp(n,a){var r=Ze();a=a===void 0?null:a;var c=r.memoizedState;return a!==null&&jd(a,c[1])?c[0]:(r.memoizedState=[n,a],n)}function Yp(n,a){var r=Ze();a=a===void 0?null:a;var c=r.memoizedState;if(a!==null&&jd(a,c[1]))return c[0];if(c=n(),ua){ps(!0);try{n()}finally{ps(!1)}}return r.memoizedState=[c,a],c}function Md(n,a,r){return r===void 0||(Fn&1073741824)!==0&&(_e&261930)===0?n.memoizedState=a:(n.memoizedState=r,n=Fg(),be.lanes|=n,As|=n,r)}function Fp(n,a,r,c){return Yt(r,a)?r:si.current!==null?(n=Md(n,r,c),Yt(n,a)||(nt=!0),n):(Fn&42)===0||(Fn&1073741824)!==0&&(_e&261930)===0?(nt=!0,n.memoizedState=r):(n=Fg(),be.lanes|=n,As|=n,a)}function Xp(n,a,r,c,h){var m=X.p;X.p=m!==0&&8>m?m:8;var v=B.T,S={};B.T=S,zd(n,!1,a,r);try{var C=h(),P=B.S;if(P!==null&&P(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var H=a_(C,c);br(n,a,H,Zt(n))}else br(n,a,c,Zt(n))}catch(Y){br(n,a,{then:function(){},status:"rejected",reason:Y},Zt())}finally{X.p=m,v!==null&&S.types!==null&&(v.types=S.types),B.T=v}}function u_(){}function Ud(n,a,r,c){if(n.tag!==5)throw Error(i(476));var h=Jp(n).queue;Xp(n,h,a,ee,r===null?u_:function(){return Wp(n),r(c)})}function Jp(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:ee},next:null};var r={};return a.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:r},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}function Wp(n){var a=Jp(n);a.next===null&&(a=n.alternate.memoizedState),br(n,a.next.queue,{},Zt())}function Ld(){return xt(Lr)}function Qp(){return Ze().memoizedState}function Zp(){return Ze().memoizedState}function d_(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var r=Zt();n=Ss(r);var c=_s(a,n,r);c!==null&&(Vt(c,a,r),mr(c,a,r)),a={cache:dd()},n.payload=a;return}a=a.return}}function h_(n,a,r){var c=Zt();r={lane:c,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},jo(n)?tg(a,r):(r=ed(n,a,r,c),r!==null&&(Vt(r,n,c),ng(r,a,c)))}function eg(n,a,r){var c=Zt();br(n,a,r,c)}function br(n,a,r,c){var h={lane:c,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(jo(n))tg(a,h);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=a.lastRenderedReducer,m!==null))try{var v=a.lastRenderedState,S=m(v,r);if(h.hasEagerState=!0,h.eagerState=S,Yt(S,v))return to(n,a,h,0),qe===null&&eo(),!1}catch{}if(r=ed(n,a,h,c),r!==null)return Vt(r,n,c),ng(r,a,c),!0}return!1}function zd(n,a,r,c){if(c={lane:2,revertLane:ph(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},jo(n)){if(a)throw Error(i(479))}else a=ed(n,r,c,2),a!==null&&Vt(a,n,2)}function jo(n){var a=n.alternate;return n===be||a!==null&&a===be}function tg(n,a){ai=po=!0;var r=n.pending;r===null?a.next=a:(a.next=r.next,r.next=a),n.pending=a}function ng(n,a,r){if((r&4194048)!==0){var c=a.lanes;c&=n.pendingLanes,r|=c,a.lanes=r,l0(n,r)}}var vr={readContext:xt,use:yo,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};vr.useEffectEvent=Fe;var sg={readContext:xt,use:yo,useCallback:function(n,a){return Ct().memoizedState=[n,a===void 0?null:a],n},useContext:xt,useEffect:Bp,useImperativeHandle:function(n,a,r){r=r!=null?r.concat([n]):null,vo(4194308,4,Ip.bind(null,a,n),r)},useLayoutEffect:function(n,a){return vo(4194308,4,n,a)},useInsertionEffect:function(n,a){vo(4,2,n,a)},useMemo:function(n,a){var r=Ct();a=a===void 0?null:a;var c=n();if(ua){ps(!0);try{n()}finally{ps(!1)}}return r.memoizedState=[c,a],c},useReducer:function(n,a,r){var c=Ct();if(r!==void 0){var h=r(a);if(ua){ps(!0);try{r(a)}finally{ps(!1)}}}else h=a;return c.memoizedState=c.baseState=h,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:h},c.queue=n,n=n.dispatch=h_.bind(null,be,n),[c.memoizedState,n]},useRef:function(n){var a=Ct();return n={current:n},a.memoizedState=n},useState:function(n){n=Cd(n);var a=n.queue,r=eg.bind(null,be,a);return a.dispatch=r,[n.memoizedState,r]},useDebugValue:Dd,useDeferredValue:function(n,a){var r=Ct();return Md(r,n,a)},useTransition:function(){var n=Cd(!1);return n=Xp.bind(null,be,n.queue,!0,!1),Ct().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,a,r){var c=be,h=Ct();if(Ee){if(r===void 0)throw Error(i(407));r=r()}else{if(r=a(),qe===null)throw Error(i(349));(_e&127)!==0||_p(c,a,r)}h.memoizedState=r;var m={value:r,getSnapshot:a};return h.queue=m,Bp(Tp.bind(null,c,m,n),[n]),c.flags|=2048,ri(9,{destroy:void 0},Np.bind(null,c,m,r,a),null),r},useId:function(){var n=Ct(),a=qe.identifierPrefix;if(Ee){var r=Rn,c=Cn;r=(c&~(1<<32-Kt(c)-1)).toString(32)+r,a="_"+a+"R_"+r,r=go++,0<r&&(a+="H"+r.toString(32)),a+="_"}else r=i_++,a="_"+a+"r_"+r.toString(32)+"_";return n.memoizedState=a},useHostTransitionStatus:Ld,useFormState:Up,useActionState:Up,useOptimistic:function(n){var a=Ct();a.memoizedState=a.baseState=n;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=r,a=zd.bind(null,be,!0,r),r.dispatch=a,[n,a]},useMemoCache:kd,useCacheRefresh:function(){return Ct().memoizedState=d_.bind(null,be)},useEffectEvent:function(n){var a=Ct(),r={impl:n};return a.memoizedState=r,function(){if((De&2)!==0)throw Error(i(440));return r.impl.apply(void 0,arguments)}}},Pd={readContext:xt,use:yo,useCallback:Kp,useContext:xt,useEffect:Od,useImperativeHandle:Gp,useInsertionEffect:qp,useLayoutEffect:Hp,useMemo:Yp,useReducer:bo,useRef:$p,useState:function(){return bo(Xn)},useDebugValue:Dd,useDeferredValue:function(n,a){var r=Ze();return Fp(r,Pe.memoizedState,n,a)},useTransition:function(){var n=bo(Xn)[0],a=Ze().memoizedState;return[typeof n=="boolean"?n:yr(n),a]},useSyncExternalStore:Sp,useId:Qp,useHostTransitionStatus:Ld,useFormState:Lp,useActionState:Lp,useOptimistic:function(n,a){var r=Ze();return Ap(r,Pe,n,a)},useMemoCache:kd,useCacheRefresh:Zp};Pd.useEffectEvent=Vp;var ag={readContext:xt,use:yo,useCallback:Kp,useContext:xt,useEffect:Od,useImperativeHandle:Gp,useInsertionEffect:qp,useLayoutEffect:Hp,useMemo:Yp,useReducer:Ad,useRef:$p,useState:function(){return Ad(Xn)},useDebugValue:Dd,useDeferredValue:function(n,a){var r=Ze();return Pe===null?Md(r,n,a):Fp(r,Pe.memoizedState,n,a)},useTransition:function(){var n=Ad(Xn)[0],a=Ze().memoizedState;return[typeof n=="boolean"?n:yr(n),a]},useSyncExternalStore:Sp,useId:Qp,useHostTransitionStatus:Ld,useFormState:Pp,useActionState:Pp,useOptimistic:function(n,a){var r=Ze();return Pe!==null?Ap(r,Pe,n,a):(r.baseState=n,[n,r.queue.dispatch])},useMemoCache:kd,useCacheRefresh:Zp};ag.useEffectEvent=Vp;function $d(n,a,r,c){a=n.memoizedState,r=r(c,a),r=r==null?a:y({},a,r),n.memoizedState=r,n.lanes===0&&(n.updateQueue.baseState=r)}var Bd={enqueueSetState:function(n,a,r){n=n._reactInternals;var c=Zt(),h=Ss(c);h.payload=a,r!=null&&(h.callback=r),a=_s(n,h,c),a!==null&&(Vt(a,n,c),mr(a,n,c))},enqueueReplaceState:function(n,a,r){n=n._reactInternals;var c=Zt(),h=Ss(c);h.tag=1,h.payload=a,r!=null&&(h.callback=r),a=_s(n,h,c),a!==null&&(Vt(a,n,c),mr(a,n,c))},enqueueForceUpdate:function(n,a){n=n._reactInternals;var r=Zt(),c=Ss(r);c.tag=2,a!=null&&(c.callback=a),a=_s(n,c,r),a!==null&&(Vt(a,n,r),mr(a,n,r))}};function ig(n,a,r,c,h,m,v){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,m,v):a.prototype&&a.prototype.isPureReactComponent?!rr(r,c)||!rr(h,m):!0}function rg(n,a,r,c){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(r,c),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(r,c),a.state!==n&&Bd.enqueueReplaceState(a,a.state,null)}function da(n,a){var r=a;if("ref"in a){r={};for(var c in a)c!=="ref"&&(r[c]=a[c])}if(n=n.defaultProps){r===a&&(r=y({},r));for(var h in n)r[h]===void 0&&(r[h]=n[h])}return r}function lg(n){Zl(n)}function og(n){console.error(n)}function cg(n){Zl(n)}function So(n,a){try{var r=n.onUncaughtError;r(a.value,{componentStack:a.stack})}catch(c){setTimeout(function(){throw c})}}function ug(n,a,r){try{var c=n.onCaughtError;c(r.value,{componentStack:r.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(h){setTimeout(function(){throw h})}}function Vd(n,a,r){return r=Ss(r),r.tag=3,r.payload={element:null},r.callback=function(){So(n,a)},r}function dg(n){return n=Ss(n),n.tag=3,n}function hg(n,a,r,c){var h=r.type.getDerivedStateFromError;if(typeof h=="function"){var m=c.value;n.payload=function(){return h(m)},n.callback=function(){ug(a,r,c)}}var v=r.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(n.callback=function(){ug(a,r,c),typeof h!="function"&&(Cs===null?Cs=new Set([this]):Cs.add(this));var S=c.stack;this.componentDidCatch(c.value,{componentStack:S!==null?S:""})})}function f_(n,a,r,c,h){if(r.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(a=r.alternate,a!==null&&Qa(a,r,h,!0),r=Xt.current,r!==null){switch(r.tag){case 31:case 13:return hn===null?Uo():r.alternate===null&&Xe===0&&(Xe=3),r.flags&=-257,r.flags|=65536,r.lanes=h,c===co?r.flags|=16384:(a=r.updateQueue,a===null?r.updateQueue=new Set([c]):a.add(c),hh(n,c,h)),!1;case 22:return r.flags|=65536,c===co?r.flags|=16384:(a=r.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([c])},r.updateQueue=a):(r=a.retryQueue,r===null?a.retryQueue=new Set([c]):r.add(c)),hh(n,c,h)),!1}throw Error(i(435,r.tag))}return hh(n,c,h),Uo(),!1}if(Ee)return a=Xt.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=h,c!==rd&&(n=Error(i(422),{cause:c}),cr(on(n,r)))):(c!==rd&&(a=Error(i(423),{cause:c}),cr(on(a,r))),n=n.current.alternate,n.flags|=65536,h&=-h,n.lanes|=h,c=on(c,r),h=Vd(n.stateNode,c,h),xd(n,h),Xe!==4&&(Xe=2)),!1;var m=Error(i(520),{cause:c});if(m=on(m,r),Er===null?Er=[m]:Er.push(m),Xe!==4&&(Xe=2),a===null)return!0;c=on(c,r),r=a;do{switch(r.tag){case 3:return r.flags|=65536,n=h&-h,r.lanes|=n,n=Vd(r.stateNode,c,n),xd(r,n),!1;case 1:if(a=r.type,m=r.stateNode,(r.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(Cs===null||!Cs.has(m))))return r.flags|=65536,h&=-h,r.lanes|=h,h=dg(h),hg(h,n,r,c),xd(r,h),!1}r=r.return}while(r!==null);return!1}var qd=Error(i(461)),nt=!1;function yt(n,a,r,c){a.child=n===null?gp(a,null,r,c):ca(a,n.child,r,c)}function fg(n,a,r,c,h){r=r.render;var m=a.ref;if("ref"in c){var v={};for(var S in c)S!=="ref"&&(v[S]=c[S])}else v=c;return ia(a),c=Sd(n,a,r,v,m,h),S=_d(),n!==null&&!nt?(Nd(n,a,h),Jn(n,a,h)):(Ee&&S&&ad(a),a.flags|=1,yt(n,a,c,h),a.child)}function mg(n,a,r,c,h){if(n===null){var m=r.type;return typeof m=="function"&&!td(m)&&m.defaultProps===void 0&&r.compare===null?(a.tag=15,a.type=m,pg(n,a,m,c,h)):(n=so(r.type,null,c,a,a.mode,h),n.ref=a.ref,n.return=a,a.child=n)}if(m=n.child,!Jd(n,h)){var v=m.memoizedProps;if(r=r.compare,r=r!==null?r:rr,r(v,c)&&n.ref===a.ref)return Jn(n,a,h)}return a.flags|=1,n=In(m,c),n.ref=a.ref,n.return=a,a.child=n}function pg(n,a,r,c,h){if(n!==null){var m=n.memoizedProps;if(rr(m,c)&&n.ref===a.ref)if(nt=!1,a.pendingProps=c=m,Jd(n,h))(n.flags&131072)!==0&&(nt=!0);else return a.lanes=n.lanes,Jn(n,a,h)}return Hd(n,a,r,c,h)}function gg(n,a,r,c){var h=c.children,m=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((a.flags&128)!==0){if(m=m!==null?m.baseLanes|r:r,n!==null){for(c=a.child=n.child,h=0;c!==null;)h=h|c.lanes|c.childLanes,c=c.sibling;c=h&~m}else c=0,a.child=null;return xg(n,a,m,r,c)}if((r&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&lo(a,m!==null?m.cachePool:null),m!==null?bp(a,m):bd(),vp(a);else return c=a.lanes=536870912,xg(n,a,m!==null?m.baseLanes|r:r,r,c)}else m!==null?(lo(a,m.cachePool),bp(a,m),Ts(),a.memoizedState=null):(n!==null&&lo(a,null),bd(),Ts());return yt(n,a,h,r),a.child}function wr(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function xg(n,a,r,c,h){var m=fd();return m=m===null?null:{parent:et._currentValue,pool:m},a.memoizedState={baseLanes:r,cachePool:m},n!==null&&lo(a,null),bd(),vp(a),n!==null&&Qa(n,a,c,!0),a.childLanes=h,null}function _o(n,a){return a=To({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}function yg(n,a,r){return ca(a,n.child,null,r),n=_o(a,a.pendingProps),n.flags|=2,Jt(a),a.memoizedState=null,n}function m_(n,a,r){var c=a.pendingProps,h=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(Ee){if(c.mode==="hidden")return n=_o(a,c),a.lanes=536870912,wr(null,n);if(wd(a),(n=Ie)?(n=Cx(n,dn),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:ys!==null?{id:Cn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},r=tp(n),r.return=a,a.child=r,gt=a,Ie=null)):n=null,n===null)throw vs(a);return a.lanes=536870912,null}return _o(a,c)}var m=n.memoizedState;if(m!==null){var v=m.dehydrated;if(wd(a),h)if(a.flags&256)a.flags&=-257,a=yg(n,a,r);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(i(558));else if(nt||Qa(n,a,r,!1),h=(r&n.childLanes)!==0,nt||h){if(c=qe,c!==null&&(v=o0(c,r),v!==0&&v!==m.retryLane))throw m.retryLane=v,ta(n,v),Vt(c,n,v),qd;Uo(),a=yg(n,a,r)}else n=m.treeContext,Ie=fn(v.nextSibling),gt=a,Ee=!0,bs=null,dn=!1,n!==null&&ap(a,n),a=_o(a,c),a.flags|=4096;return a}return n=In(n.child,{mode:c.mode,children:c.children}),n.ref=a.ref,a.child=n,n.return=a,n}function No(n,a){var r=a.ref;if(r===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(i(284));(n===null||n.ref!==r)&&(a.flags|=4194816)}}function Hd(n,a,r,c,h){return ia(a),r=Sd(n,a,r,c,void 0,h),c=_d(),n!==null&&!nt?(Nd(n,a,h),Jn(n,a,h)):(Ee&&c&&ad(a),a.flags|=1,yt(n,a,r,h),a.child)}function bg(n,a,r,c,h,m){return ia(a),a.updateQueue=null,r=jp(a,c,r,h),wp(n),c=_d(),n!==null&&!nt?(Nd(n,a,m),Jn(n,a,m)):(Ee&&c&&ad(a),a.flags|=1,yt(n,a,r,m),a.child)}function vg(n,a,r,c,h){if(ia(a),a.stateNode===null){var m=Fa,v=r.contextType;typeof v=="object"&&v!==null&&(m=xt(v)),m=new r(c,m),a.memoizedState=m.state!==null&&m.state!==void 0?m.state:null,m.updater=Bd,a.stateNode=m,m._reactInternals=a,m=a.stateNode,m.props=c,m.state=a.memoizedState,m.refs={},pd(a),v=r.contextType,m.context=typeof v=="object"&&v!==null?xt(v):Fa,m.state=a.memoizedState,v=r.getDerivedStateFromProps,typeof v=="function"&&($d(a,r,v,c),m.state=a.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof m.getSnapshotBeforeUpdate=="function"||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(v=m.state,typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount(),v!==m.state&&Bd.enqueueReplaceState(m,m.state,null),gr(a,c,m,h),pr(),m.state=a.memoizedState),typeof m.componentDidMount=="function"&&(a.flags|=4194308),c=!0}else if(n===null){m=a.stateNode;var S=a.memoizedProps,C=da(r,S);m.props=C;var P=m.context,H=r.contextType;v=Fa,typeof H=="object"&&H!==null&&(v=xt(H));var Y=r.getDerivedStateFromProps;H=typeof Y=="function"||typeof m.getSnapshotBeforeUpdate=="function",S=a.pendingProps!==S,H||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(S||P!==v)&&rg(a,m,c,v),js=!1;var $=a.memoizedState;m.state=$,gr(a,c,m,h),pr(),P=a.memoizedState,S||$!==P||js?(typeof Y=="function"&&($d(a,r,Y,c),P=a.memoizedState),(C=js||ig(a,r,C,c,$,P,v))?(H||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(a.flags|=4194308)):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=c,a.memoizedState=P),m.props=c,m.state=P,m.context=v,c=C):(typeof m.componentDidMount=="function"&&(a.flags|=4194308),c=!1)}else{m=a.stateNode,gd(n,a),v=a.memoizedProps,H=da(r,v),m.props=H,Y=a.pendingProps,$=m.context,P=r.contextType,C=Fa,typeof P=="object"&&P!==null&&(C=xt(P)),S=r.getDerivedStateFromProps,(P=typeof S=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(v!==Y||$!==C)&&rg(a,m,c,C),js=!1,$=a.memoizedState,m.state=$,gr(a,c,m,h),pr();var V=a.memoizedState;v!==Y||$!==V||js||n!==null&&n.dependencies!==null&&io(n.dependencies)?(typeof S=="function"&&($d(a,r,S,c),V=a.memoizedState),(H=js||ig(a,r,H,c,$,V,C)||n!==null&&n.dependencies!==null&&io(n.dependencies))?(P||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(c,V,C),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(c,V,C)),typeof m.componentDidUpdate=="function"&&(a.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof m.componentDidUpdate!="function"||v===n.memoizedProps&&$===n.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&$===n.memoizedState||(a.flags|=1024),a.memoizedProps=c,a.memoizedState=V),m.props=c,m.state=V,m.context=C,c=H):(typeof m.componentDidUpdate!="function"||v===n.memoizedProps&&$===n.memoizedState||(a.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||v===n.memoizedProps&&$===n.memoizedState||(a.flags|=1024),c=!1)}return m=c,No(n,a),c=(a.flags&128)!==0,m||c?(m=a.stateNode,r=c&&typeof r.getDerivedStateFromError!="function"?null:m.render(),a.flags|=1,n!==null&&c?(a.child=ca(a,n.child,null,h),a.child=ca(a,null,r,h)):yt(n,a,r,h),a.memoizedState=m.state,n=a.child):n=Jn(n,a,h),n}function wg(n,a,r,c){return sa(),a.flags|=256,yt(n,a,r,c),a.child}var Id={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gd(n){return{baseLanes:n,cachePool:up()}}function Kd(n,a,r){return n=n!==null?n.childLanes&~r:0,a&&(n|=Qt),n}function jg(n,a,r){var c=a.pendingProps,h=!1,m=(a.flags&128)!==0,v;if((v=m)||(v=n!==null&&n.memoizedState===null?!1:(Qe.current&2)!==0),v&&(h=!0,a.flags&=-129),v=(a.flags&32)!==0,a.flags&=-33,n===null){if(Ee){if(h?Ns(a):Ts(),(n=Ie)?(n=Cx(n,dn),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:ys!==null?{id:Cn,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},r=tp(n),r.return=a,a.child=r,gt=a,Ie=null)):n=null,n===null)throw vs(a);return Eh(n)?a.lanes=32:a.lanes=536870912,null}var S=c.children;return c=c.fallback,h?(Ts(),h=a.mode,S=To({mode:"hidden",children:S},h),c=na(c,h,r,null),S.return=a,c.return=a,S.sibling=c,a.child=S,c=a.child,c.memoizedState=Gd(r),c.childLanes=Kd(n,v,r),a.memoizedState=Id,wr(null,c)):(Ns(a),Yd(a,S))}var C=n.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(m)a.flags&256?(Ns(a),a.flags&=-257,a=Fd(n,a,r)):a.memoizedState!==null?(Ts(),a.child=n.child,a.flags|=128,a=null):(Ts(),S=c.fallback,h=a.mode,c=To({mode:"visible",children:c.children},h),S=na(S,h,r,null),S.flags|=2,c.return=a,S.return=a,c.sibling=S,a.child=c,ca(a,n.child,null,r),c=a.child,c.memoizedState=Gd(r),c.childLanes=Kd(n,v,r),a.memoizedState=Id,a=wr(null,c));else if(Ns(a),Eh(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var P=v.dgst;v=P,c=Error(i(419)),c.stack="",c.digest=v,cr({value:c,source:null,stack:null}),a=Fd(n,a,r)}else if(nt||Qa(n,a,r,!1),v=(r&n.childLanes)!==0,nt||v){if(v=qe,v!==null&&(c=o0(v,r),c!==0&&c!==C.retryLane))throw C.retryLane=c,ta(n,c),Vt(v,n,c),qd;kh(S)||Uo(),a=Fd(n,a,r)}else kh(S)?(a.flags|=192,a.child=n.child,a=null):(n=C.treeContext,Ie=fn(S.nextSibling),gt=a,Ee=!0,bs=null,dn=!1,n!==null&&ap(a,n),a=Yd(a,c.children),a.flags|=4096);return a}return h?(Ts(),S=c.fallback,h=a.mode,C=n.child,P=C.sibling,c=In(C,{mode:"hidden",children:c.children}),c.subtreeFlags=C.subtreeFlags&65011712,P!==null?S=In(P,S):(S=na(S,h,r,null),S.flags|=2),S.return=a,c.return=a,c.sibling=S,a.child=c,wr(null,c),c=a.child,S=n.child.memoizedState,S===null?S=Gd(r):(h=S.cachePool,h!==null?(C=et._currentValue,h=h.parent!==C?{parent:C,pool:C}:h):h=up(),S={baseLanes:S.baseLanes|r,cachePool:h}),c.memoizedState=S,c.childLanes=Kd(n,v,r),a.memoizedState=Id,wr(n.child,c)):(Ns(a),r=n.child,n=r.sibling,r=In(r,{mode:"visible",children:c.children}),r.return=a,r.sibling=null,n!==null&&(v=a.deletions,v===null?(a.deletions=[n],a.flags|=16):v.push(n)),a.child=r,a.memoizedState=null,r)}function Yd(n,a){return a=To({mode:"visible",children:a},n.mode),a.return=n,n.child=a}function To(n,a){return n=Ft(22,n,null,a),n.lanes=0,n}function Fd(n,a,r){return ca(a,n.child,null,r),n=Yd(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}function Sg(n,a,r){n.lanes|=a;var c=n.alternate;c!==null&&(c.lanes|=a),cd(n.return,a,r)}function Xd(n,a,r,c,h,m){var v=n.memoizedState;v===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:c,tail:r,tailMode:h,treeForkCount:m}:(v.isBackwards=a,v.rendering=null,v.renderingStartTime=0,v.last=c,v.tail=r,v.tailMode=h,v.treeForkCount=m)}function _g(n,a,r){var c=a.pendingProps,h=c.revealOrder,m=c.tail;c=c.children;var v=Qe.current,S=(v&2)!==0;if(S?(v=v&1|2,a.flags|=128):v&=1,ne(Qe,v),yt(n,a,c,r),c=Ee?or:0,!S&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Sg(n,r,a);else if(n.tag===19)Sg(n,r,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(h){case"forwards":for(r=a.child,h=null;r!==null;)n=r.alternate,n!==null&&mo(n)===null&&(h=r),r=r.sibling;r=h,r===null?(h=a.child,a.child=null):(h=r.sibling,r.sibling=null),Xd(a,!1,h,r,m,c);break;case"backwards":case"unstable_legacy-backwards":for(r=null,h=a.child,a.child=null;h!==null;){if(n=h.alternate,n!==null&&mo(n)===null){a.child=h;break}n=h.sibling,h.sibling=r,r=h,h=n}Xd(a,!0,r,null,m,c);break;case"together":Xd(a,!1,null,null,void 0,c);break;default:a.memoizedState=null}return a.child}function Jn(n,a,r){if(n!==null&&(a.dependencies=n.dependencies),As|=a.lanes,(r&a.childLanes)===0)if(n!==null){if(Qa(n,a,r,!1),(r&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(i(153));if(a.child!==null){for(n=a.child,r=In(n,n.pendingProps),a.child=r,r.return=a;n.sibling!==null;)n=n.sibling,r=r.sibling=In(n,n.pendingProps),r.return=a;r.sibling=null}return a.child}function Jd(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&io(n)))}function p_(n,a,r){switch(a.tag){case 3:At(a,a.stateNode.containerInfo),ws(a,et,n.memoizedState.cache),sa();break;case 27:case 5:Yi(a);break;case 4:At(a,a.stateNode.containerInfo);break;case 10:ws(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,wd(a),null;break;case 13:var c=a.memoizedState;if(c!==null)return c.dehydrated!==null?(Ns(a),a.flags|=128,null):(r&a.child.childLanes)!==0?jg(n,a,r):(Ns(a),n=Jn(n,a,r),n!==null?n.sibling:null);Ns(a);break;case 19:var h=(n.flags&128)!==0;if(c=(r&a.childLanes)!==0,c||(Qa(n,a,r,!1),c=(r&a.childLanes)!==0),h){if(c)return _g(n,a,r);a.flags|=128}if(h=a.memoizedState,h!==null&&(h.rendering=null,h.tail=null,h.lastEffect=null),ne(Qe,Qe.current),c)break;return null;case 22:return a.lanes=0,gg(n,a,r,a.pendingProps);case 24:ws(a,et,n.memoizedState.cache)}return Jn(n,a,r)}function Ng(n,a,r){if(n!==null)if(n.memoizedProps!==a.pendingProps)nt=!0;else{if(!Jd(n,r)&&(a.flags&128)===0)return nt=!1,p_(n,a,r);nt=(n.flags&131072)!==0}else nt=!1,Ee&&(a.flags&1048576)!==0&&sp(a,or,a.index);switch(a.lanes=0,a.tag){case 16:e:{var c=a.pendingProps;if(n=la(a.elementType),a.type=n,typeof n=="function")td(n)?(c=da(n,c),a.tag=1,a=vg(null,a,n,c,r)):(a.tag=0,a=Hd(null,a,n,c,r));else{if(n!=null){var h=n.$$typeof;if(h===T){a.tag=11,a=fg(null,a,n,c,r);break e}else if(h===E){a.tag=14,a=mg(null,a,n,c,r);break e}}throw a=ut(n)||n,Error(i(306,a,""))}}return a;case 0:return Hd(n,a,a.type,a.pendingProps,r);case 1:return c=a.type,h=da(c,a.pendingProps),vg(n,a,c,h,r);case 3:e:{if(At(a,a.stateNode.containerInfo),n===null)throw Error(i(387));c=a.pendingProps;var m=a.memoizedState;h=m.element,gd(n,a),gr(a,c,null,r);var v=a.memoizedState;if(c=v.cache,ws(a,et,c),c!==m.cache&&ud(a,[et],r,!0),pr(),c=v.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:v.cache},a.updateQueue.baseState=m,a.memoizedState=m,a.flags&256){a=wg(n,a,c,r);break e}else if(c!==h){h=on(Error(i(424)),a),cr(h),a=wg(n,a,c,r);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,Ie=fn(n.firstChild),gt=a,Ee=!0,bs=null,dn=!0,r=gp(a,null,c,r),a.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(sa(),c===h){a=Jn(n,a,r);break e}yt(n,a,c,r)}a=a.child}return a;case 26:return No(n,a),n===null?(r=Lx(a.type,null,a.pendingProps,null))?a.memoizedState=r:Ee||(r=a.type,n=a.pendingProps,c=qo(we.current).createElement(r),c[pt]=a,c[Ut]=n,bt(c,r,n),dt(c),a.stateNode=c):a.memoizedState=Lx(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return Yi(a),n===null&&Ee&&(c=a.stateNode=Dx(a.type,a.pendingProps,we.current),gt=a,dn=!0,h=Ie,Ms(a.type)?(Ah=h,Ie=fn(c.firstChild)):Ie=h),yt(n,a,a.pendingProps.children,r),No(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&Ee&&((h=c=Ie)&&(c=G_(c,a.type,a.pendingProps,dn),c!==null?(a.stateNode=c,gt=a,Ie=fn(c.firstChild),dn=!1,h=!0):h=!1),h||vs(a)),Yi(a),h=a.type,m=a.pendingProps,v=n!==null?n.memoizedProps:null,c=m.children,_h(h,m)?c=null:v!==null&&_h(h,v)&&(a.flags|=32),a.memoizedState!==null&&(h=Sd(n,a,r_,null,null,r),Lr._currentValue=h),No(n,a),yt(n,a,c,r),a.child;case 6:return n===null&&Ee&&((n=r=Ie)&&(r=K_(r,a.pendingProps,dn),r!==null?(a.stateNode=r,gt=a,Ie=null,n=!0):n=!1),n||vs(a)),null;case 13:return jg(n,a,r);case 4:return At(a,a.stateNode.containerInfo),c=a.pendingProps,n===null?a.child=ca(a,null,c,r):yt(n,a,c,r),a.child;case 11:return fg(n,a,a.type,a.pendingProps,r);case 7:return yt(n,a,a.pendingProps,r),a.child;case 8:return yt(n,a,a.pendingProps.children,r),a.child;case 12:return yt(n,a,a.pendingProps.children,r),a.child;case 10:return c=a.pendingProps,ws(a,a.type,c.value),yt(n,a,c.children,r),a.child;case 9:return h=a.type._context,c=a.pendingProps.children,ia(a),h=xt(h),c=c(h),a.flags|=1,yt(n,a,c,r),a.child;case 14:return mg(n,a,a.type,a.pendingProps,r);case 15:return pg(n,a,a.type,a.pendingProps,r);case 19:return _g(n,a,r);case 31:return m_(n,a,r);case 22:return gg(n,a,r,a.pendingProps);case 24:return ia(a),c=xt(et),n===null?(h=fd(),h===null&&(h=qe,m=dd(),h.pooledCache=m,m.refCount++,m!==null&&(h.pooledCacheLanes|=r),h=m),a.memoizedState={parent:c,cache:h},pd(a),ws(a,et,h)):((n.lanes&r)!==0&&(gd(n,a),gr(a,null,null,r),pr()),h=n.memoizedState,m=a.memoizedState,h.parent!==c?(h={parent:c,cache:c},a.memoizedState=h,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=h),ws(a,et,c)):(c=m.cache,ws(a,et,c),c!==h.cache&&ud(a,[et],r,!0))),yt(n,a,a.pendingProps.children,r),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function Wn(n){n.flags|=4}function Wd(n,a,r,c,h){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(h&335544128)===h)if(n.stateNode.complete)n.flags|=8192;else if(Qg())n.flags|=8192;else throw oa=co,md}else n.flags&=-16777217}function Tg(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!Vx(a))if(Qg())n.flags|=8192;else throw oa=co,md}function ko(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?i0():536870912,n.lanes|=a,ui|=a)}function jr(n,a){if(!Ee)switch(n.tailMode){case"hidden":a=n.tail;for(var r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?n.tail=null:r.sibling=null;break;case"collapsed":r=n.tail;for(var c=null;r!==null;)r.alternate!==null&&(c=r),r=r.sibling;c===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Ge(n){var a=n.alternate!==null&&n.alternate.child===n.child,r=0,c=0;if(a)for(var h=n.child;h!==null;)r|=h.lanes|h.childLanes,c|=h.subtreeFlags&65011712,c|=h.flags&65011712,h.return=n,h=h.sibling;else for(h=n.child;h!==null;)r|=h.lanes|h.childLanes,c|=h.subtreeFlags,c|=h.flags,h.return=n,h=h.sibling;return n.subtreeFlags|=c,n.childLanes=r,a}function g_(n,a,r){var c=a.pendingProps;switch(id(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(a),null;case 1:return Ge(a),null;case 3:return r=a.stateNode,c=null,n!==null&&(c=n.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),Yn(et),We(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(n===null||n.child===null)&&(Wa(a)?Wn(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,ld())),Ge(a),null;case 26:var h=a.type,m=a.memoizedState;return n===null?(Wn(a),m!==null?(Ge(a),Tg(a,m)):(Ge(a),Wd(a,h,null,c,r))):m?m!==n.memoizedState?(Wn(a),Ge(a),Tg(a,m)):(Ge(a),a.flags&=-16777217):(n=n.memoizedProps,n!==c&&Wn(a),Ge(a),Wd(a,h,n,c,r)),null;case 27:if(zl(a),r=we.current,h=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==c&&Wn(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return Ge(a),null}n=re.current,Wa(a)?ip(a):(n=Dx(h,c,r),a.stateNode=n,Wn(a))}return Ge(a),null;case 5:if(zl(a),h=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==c&&Wn(a);else{if(!c){if(a.stateNode===null)throw Error(i(166));return Ge(a),null}if(m=re.current,Wa(a))ip(a);else{var v=qo(we.current);switch(m){case 1:m=v.createElementNS("http://www.w3.org/2000/svg",h);break;case 2:m=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;default:switch(h){case"svg":m=v.createElementNS("http://www.w3.org/2000/svg",h);break;case"math":m=v.createElementNS("http://www.w3.org/1998/Math/MathML",h);break;case"script":m=v.createElement("div"),m.innerHTML="<script><\/script>",m=m.removeChild(m.firstChild);break;case"select":m=typeof c.is=="string"?v.createElement("select",{is:c.is}):v.createElement("select"),c.multiple?m.multiple=!0:c.size&&(m.size=c.size);break;default:m=typeof c.is=="string"?v.createElement(h,{is:c.is}):v.createElement(h)}}m[pt]=a,m[Ut]=c;e:for(v=a.child;v!==null;){if(v.tag===5||v.tag===6)m.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===a)break e;for(;v.sibling===null;){if(v.return===null||v.return===a)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}a.stateNode=m;e:switch(bt(m,h,c),h){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Wn(a)}}return Ge(a),Wd(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,r),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==c&&Wn(a);else{if(typeof c!="string"&&a.stateNode===null)throw Error(i(166));if(n=we.current,Wa(a)){if(n=a.stateNode,r=a.memoizedProps,c=null,h=gt,h!==null)switch(h.tag){case 27:case 5:c=h.memoizedProps}n[pt]=a,n=!!(n.nodeValue===r||c!==null&&c.suppressHydrationWarning===!0||jx(n.nodeValue,r)),n||vs(a,!0)}else n=qo(n).createTextNode(c),n[pt]=a,a.stateNode=n}return Ge(a),null;case 31:if(r=a.memoizedState,n===null||n.memoizedState!==null){if(c=Wa(a),r!==null){if(n===null){if(!c)throw Error(i(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(i(557));n[pt]=a}else sa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ge(a),n=!1}else r=ld(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=r),n=!0;if(!n)return a.flags&256?(Jt(a),a):(Jt(a),null);if((a.flags&128)!==0)throw Error(i(558))}return Ge(a),null;case 13:if(c=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(h=Wa(a),c!==null&&c.dehydrated!==null){if(n===null){if(!h)throw Error(i(318));if(h=a.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error(i(317));h[pt]=a}else sa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Ge(a),h=!1}else h=ld(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=h),h=!0;if(!h)return a.flags&256?(Jt(a),a):(Jt(a),null)}return Jt(a),(a.flags&128)!==0?(a.lanes=r,a):(r=c!==null,n=n!==null&&n.memoizedState!==null,r&&(c=a.child,h=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(h=c.alternate.memoizedState.cachePool.pool),m=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(m=c.memoizedState.cachePool.pool),m!==h&&(c.flags|=2048)),r!==n&&r&&(a.child.flags|=8192),ko(a,a.updateQueue),Ge(a),null);case 4:return We(),n===null&&bh(a.stateNode.containerInfo),Ge(a),null;case 10:return Yn(a.type),Ge(a),null;case 19:if(J(Qe),c=a.memoizedState,c===null)return Ge(a),null;if(h=(a.flags&128)!==0,m=c.rendering,m===null)if(h)jr(c,!1);else{if(Xe!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(m=mo(n),m!==null){for(a.flags|=128,jr(c,!1),n=m.updateQueue,a.updateQueue=n,ko(a,n),a.subtreeFlags=0,n=r,r=a.child;r!==null;)ep(r,n),r=r.sibling;return ne(Qe,Qe.current&1|2),Ee&&Gn(a,c.treeForkCount),a.child}n=n.sibling}c.tail!==null&&It()>Oo&&(a.flags|=128,h=!0,jr(c,!1),a.lanes=4194304)}else{if(!h)if(n=mo(m),n!==null){if(a.flags|=128,h=!0,n=n.updateQueue,a.updateQueue=n,ko(a,n),jr(c,!0),c.tail===null&&c.tailMode==="hidden"&&!m.alternate&&!Ee)return Ge(a),null}else 2*It()-c.renderingStartTime>Oo&&r!==536870912&&(a.flags|=128,h=!0,jr(c,!1),a.lanes=4194304);c.isBackwards?(m.sibling=a.child,a.child=m):(n=c.last,n!==null?n.sibling=m:a.child=m,c.last=m)}return c.tail!==null?(n=c.tail,c.rendering=n,c.tail=n.sibling,c.renderingStartTime=It(),n.sibling=null,r=Qe.current,ne(Qe,h?r&1|2:r&1),Ee&&Gn(a,c.treeForkCount),n):(Ge(a),null);case 22:case 23:return Jt(a),vd(),c=a.memoizedState!==null,n!==null?n.memoizedState!==null!==c&&(a.flags|=8192):c&&(a.flags|=8192),c?(r&536870912)!==0&&(a.flags&128)===0&&(Ge(a),a.subtreeFlags&6&&(a.flags|=8192)):Ge(a),r=a.updateQueue,r!==null&&ko(a,r.retryQueue),r=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),c=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(c=a.memoizedState.cachePool.pool),c!==r&&(a.flags|=2048),n!==null&&J(ra),null;case 24:return r=null,n!==null&&(r=n.memoizedState.cache),a.memoizedState.cache!==r&&(a.flags|=2048),Yn(et),Ge(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function x_(n,a){switch(id(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return Yn(et),We(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return zl(a),null;case 31:if(a.memoizedState!==null){if(Jt(a),a.alternate===null)throw Error(i(340));sa()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(Jt(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(i(340));sa()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return J(Qe),null;case 4:return We(),null;case 10:return Yn(a.type),null;case 22:case 23:return Jt(a),vd(),n!==null&&J(ra),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return Yn(et),null;case 25:return null;default:return null}}function kg(n,a){switch(id(a),a.tag){case 3:Yn(et),We();break;case 26:case 27:case 5:zl(a);break;case 4:We();break;case 31:a.memoizedState!==null&&Jt(a);break;case 13:Jt(a);break;case 19:J(Qe);break;case 10:Yn(a.type);break;case 22:case 23:Jt(a),vd(),n!==null&&J(ra);break;case 24:Yn(et)}}function Sr(n,a){try{var r=a.updateQueue,c=r!==null?r.lastEffect:null;if(c!==null){var h=c.next;r=h;do{if((r.tag&n)===n){c=void 0;var m=r.create,v=r.inst;c=m(),v.destroy=c}r=r.next}while(r!==h)}}catch(S){Le(a,a.return,S)}}function ks(n,a,r){try{var c=a.updateQueue,h=c!==null?c.lastEffect:null;if(h!==null){var m=h.next;c=m;do{if((c.tag&n)===n){var v=c.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,h=a;var C=r,P=S;try{P()}catch(H){Le(h,C,H)}}}c=c.next}while(c!==m)}}catch(H){Le(a,a.return,H)}}function Eg(n){var a=n.updateQueue;if(a!==null){var r=n.stateNode;try{yp(a,r)}catch(c){Le(n,n.return,c)}}}function Ag(n,a,r){r.props=da(n.type,n.memoizedProps),r.state=n.memoizedState;try{r.componentWillUnmount()}catch(c){Le(n,a,c)}}function _r(n,a){try{var r=n.ref;if(r!==null){switch(n.tag){case 26:case 27:case 5:var c=n.stateNode;break;case 30:c=n.stateNode;break;default:c=n.stateNode}typeof r=="function"?n.refCleanup=r(c):r.current=c}}catch(h){Le(n,a,h)}}function On(n,a){var r=n.ref,c=n.refCleanup;if(r!==null)if(typeof c=="function")try{c()}catch(h){Le(n,a,h)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(h){Le(n,a,h)}else r.current=null}function Cg(n){var a=n.type,r=n.memoizedProps,c=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":r.autoFocus&&c.focus();break e;case"img":r.src?c.src=r.src:r.srcSet&&(c.srcset=r.srcSet)}}catch(h){Le(n,n.return,h)}}function Qd(n,a,r){try{var c=n.stateNode;$_(c,n.type,r,a),c[Ut]=a}catch(h){Le(n,n.return,h)}}function Rg(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ms(n.type)||n.tag===4}function Zd(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Rg(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ms(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function eh(n,a,r){var c=n.tag;if(c===5||c===6)n=n.stateNode,a?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(n,a):(a=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,a.appendChild(n),r=r._reactRootContainer,r!=null||a.onclick!==null||(a.onclick=qn));else if(c!==4&&(c===27&&Ms(n.type)&&(r=n.stateNode,a=null),n=n.child,n!==null))for(eh(n,a,r),n=n.sibling;n!==null;)eh(n,a,r),n=n.sibling}function Eo(n,a,r){var c=n.tag;if(c===5||c===6)n=n.stateNode,a?r.insertBefore(n,a):r.appendChild(n);else if(c!==4&&(c===27&&Ms(n.type)&&(r=n.stateNode),n=n.child,n!==null))for(Eo(n,a,r),n=n.sibling;n!==null;)Eo(n,a,r),n=n.sibling}function Og(n){var a=n.stateNode,r=n.memoizedProps;try{for(var c=n.type,h=a.attributes;h.length;)a.removeAttributeNode(h[0]);bt(a,c,r),a[pt]=n,a[Ut]=r}catch(m){Le(n,n.return,m)}}var Qn=!1,st=!1,th=!1,Dg=typeof WeakSet=="function"?WeakSet:Set,ht=null;function y_(n,a){if(n=n.containerInfo,jh=Xo,n=G0(n),Fu(n)){if("selectionStart"in n)var r={start:n.selectionStart,end:n.selectionEnd};else e:{r=(r=n.ownerDocument)&&r.defaultView||window;var c=r.getSelection&&r.getSelection();if(c&&c.rangeCount!==0){r=c.anchorNode;var h=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{r.nodeType,m.nodeType}catch{r=null;break e}var v=0,S=-1,C=-1,P=0,H=0,Y=n,$=null;t:for(;;){for(var V;Y!==r||h!==0&&Y.nodeType!==3||(S=v+h),Y!==m||c!==0&&Y.nodeType!==3||(C=v+c),Y.nodeType===3&&(v+=Y.nodeValue.length),(V=Y.firstChild)!==null;)$=Y,Y=V;for(;;){if(Y===n)break t;if($===r&&++P===h&&(S=v),$===m&&++H===c&&(C=v),(V=Y.nextSibling)!==null)break;Y=$,$=Y.parentNode}Y=V}r=S===-1||C===-1?null:{start:S,end:C}}else r=null}r=r||{start:0,end:0}}else r=null;for(Sh={focusedElem:n,selectionRange:r},Xo=!1,ht=a;ht!==null;)if(a=ht,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,ht=n;else for(;ht!==null;){switch(a=ht,m=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(r=0;r<n.length;r++)h=n[r],h.ref.impl=h.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&m!==null){n=void 0,r=a,h=m.memoizedProps,m=m.memoizedState,c=r.stateNode;try{var ae=da(r.type,h);n=c.getSnapshotBeforeUpdate(ae,m),c.__reactInternalSnapshotBeforeUpdate=n}catch(he){Le(r,r.return,he)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,r=n.nodeType,r===9)Th(n);else if(r===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Th(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(i(163))}if(n=a.sibling,n!==null){n.return=a.return,ht=n;break}ht=a.return}}function Mg(n,a,r){var c=r.flags;switch(r.tag){case 0:case 11:case 15:es(n,r),c&4&&Sr(5,r);break;case 1:if(es(n,r),c&4)if(n=r.stateNode,a===null)try{n.componentDidMount()}catch(v){Le(r,r.return,v)}else{var h=da(r.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(h,a,n.__reactInternalSnapshotBeforeUpdate)}catch(v){Le(r,r.return,v)}}c&64&&Eg(r),c&512&&_r(r,r.return);break;case 3:if(es(n,r),c&64&&(n=r.updateQueue,n!==null)){if(a=null,r.child!==null)switch(r.child.tag){case 27:case 5:a=r.child.stateNode;break;case 1:a=r.child.stateNode}try{yp(n,a)}catch(v){Le(r,r.return,v)}}break;case 27:a===null&&c&4&&Og(r);case 26:case 5:es(n,r),a===null&&c&4&&Cg(r),c&512&&_r(r,r.return);break;case 12:es(n,r);break;case 31:es(n,r),c&4&&zg(n,r);break;case 13:es(n,r),c&4&&Pg(n,r),c&64&&(n=r.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(r=k_.bind(null,r),Y_(n,r))));break;case 22:if(c=r.memoizedState!==null||Qn,!c){a=a!==null&&a.memoizedState!==null||st,h=Qn;var m=st;Qn=c,(st=a)&&!m?ts(n,r,(r.subtreeFlags&8772)!==0):es(n,r),Qn=h,st=m}break;case 30:break;default:es(n,r)}}function Ug(n){var a=n.alternate;a!==null&&(n.alternate=null,Ug(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&Ru(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}var Ke=null,zt=!1;function Zn(n,a,r){for(r=r.child;r!==null;)Lg(n,a,r),r=r.sibling}function Lg(n,a,r){if(Gt&&typeof Gt.onCommitFiberUnmount=="function")try{Gt.onCommitFiberUnmount(Fi,r)}catch{}switch(r.tag){case 26:st||On(r,a),Zn(n,a,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:st||On(r,a);var c=Ke,h=zt;Ms(r.type)&&(Ke=r.stateNode,zt=!1),Zn(n,a,r),Dr(r.stateNode),Ke=c,zt=h;break;case 5:st||On(r,a);case 6:if(c=Ke,h=zt,Ke=null,Zn(n,a,r),Ke=c,zt=h,Ke!==null)if(zt)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(r.stateNode)}catch(m){Le(r,a,m)}else try{Ke.removeChild(r.stateNode)}catch(m){Le(r,a,m)}break;case 18:Ke!==null&&(zt?(n=Ke,Ex(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,r.stateNode),yi(n)):Ex(Ke,r.stateNode));break;case 4:c=Ke,h=zt,Ke=r.stateNode.containerInfo,zt=!0,Zn(n,a,r),Ke=c,zt=h;break;case 0:case 11:case 14:case 15:ks(2,r,a),st||ks(4,r,a),Zn(n,a,r);break;case 1:st||(On(r,a),c=r.stateNode,typeof c.componentWillUnmount=="function"&&Ag(r,a,c)),Zn(n,a,r);break;case 21:Zn(n,a,r);break;case 22:st=(c=st)||r.memoizedState!==null,Zn(n,a,r),st=c;break;default:Zn(n,a,r)}}function zg(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{yi(n)}catch(r){Le(a,a.return,r)}}}function Pg(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{yi(n)}catch(r){Le(a,a.return,r)}}function b_(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new Dg),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new Dg),a;default:throw Error(i(435,n.tag))}}function Ao(n,a){var r=b_(n);a.forEach(function(c){if(!r.has(c)){r.add(c);var h=E_.bind(null,n,c);c.then(h,h)}})}function Pt(n,a){var r=a.deletions;if(r!==null)for(var c=0;c<r.length;c++){var h=r[c],m=n,v=a,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(Ms(S.type)){Ke=S.stateNode,zt=!1;break e}break;case 5:Ke=S.stateNode,zt=!1;break e;case 3:case 4:Ke=S.stateNode.containerInfo,zt=!0;break e}S=S.return}if(Ke===null)throw Error(i(160));Lg(m,v,h),Ke=null,zt=!1,m=h.alternate,m!==null&&(m.return=null),h.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)$g(a,n),a=a.sibling}var bn=null;function $g(n,a){var r=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Pt(a,n),$t(n),c&4&&(ks(3,n,n.return),Sr(3,n),ks(5,n,n.return));break;case 1:Pt(a,n),$t(n),c&512&&(st||r===null||On(r,r.return)),c&64&&Qn&&(n=n.updateQueue,n!==null&&(c=n.callbacks,c!==null&&(r=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=r===null?c:r.concat(c))));break;case 26:var h=bn;if(Pt(a,n),$t(n),c&512&&(st||r===null||On(r,r.return)),c&4){var m=r!==null?r.memoizedState:null;if(c=n.memoizedState,r===null)if(c===null)if(n.stateNode===null){e:{c=n.type,r=n.memoizedProps,h=h.ownerDocument||h;t:switch(c){case"title":m=h.getElementsByTagName("title")[0],(!m||m[Wi]||m[pt]||m.namespaceURI==="http://www.w3.org/2000/svg"||m.hasAttribute("itemprop"))&&(m=h.createElement(c),h.head.insertBefore(m,h.querySelector("head > title"))),bt(m,c,r),m[pt]=n,dt(m),c=m;break e;case"link":var v=$x("link","href",h).get(c+(r.href||""));if(v){for(var S=0;S<v.length;S++)if(m=v[S],m.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&m.getAttribute("rel")===(r.rel==null?null:r.rel)&&m.getAttribute("title")===(r.title==null?null:r.title)&&m.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){v.splice(S,1);break t}}m=h.createElement(c),bt(m,c,r),h.head.appendChild(m);break;case"meta":if(v=$x("meta","content",h).get(c+(r.content||""))){for(S=0;S<v.length;S++)if(m=v[S],m.getAttribute("content")===(r.content==null?null:""+r.content)&&m.getAttribute("name")===(r.name==null?null:r.name)&&m.getAttribute("property")===(r.property==null?null:r.property)&&m.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&m.getAttribute("charset")===(r.charSet==null?null:r.charSet)){v.splice(S,1);break t}}m=h.createElement(c),bt(m,c,r),h.head.appendChild(m);break;default:throw Error(i(468,c))}m[pt]=n,dt(m),c=m}n.stateNode=c}else Bx(h,n.type,n.stateNode);else n.stateNode=Px(h,c,n.memoizedProps);else m!==c?(m===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):m.count--,c===null?Bx(h,n.type,n.stateNode):Px(h,c,n.memoizedProps)):c===null&&n.stateNode!==null&&Qd(n,n.memoizedProps,r.memoizedProps)}break;case 27:Pt(a,n),$t(n),c&512&&(st||r===null||On(r,r.return)),r!==null&&c&4&&Qd(n,n.memoizedProps,r.memoizedProps);break;case 5:if(Pt(a,n),$t(n),c&512&&(st||r===null||On(r,r.return)),n.flags&32){h=n.stateNode;try{Va(h,"")}catch(ae){Le(n,n.return,ae)}}c&4&&n.stateNode!=null&&(h=n.memoizedProps,Qd(n,h,r!==null?r.memoizedProps:h)),c&1024&&(th=!0);break;case 6:if(Pt(a,n),$t(n),c&4){if(n.stateNode===null)throw Error(i(162));c=n.memoizedProps,r=n.stateNode;try{r.nodeValue=c}catch(ae){Le(n,n.return,ae)}}break;case 3:if(Go=null,h=bn,bn=Ho(a.containerInfo),Pt(a,n),bn=h,$t(n),c&4&&r!==null&&r.memoizedState.isDehydrated)try{yi(a.containerInfo)}catch(ae){Le(n,n.return,ae)}th&&(th=!1,Bg(n));break;case 4:c=bn,bn=Ho(n.stateNode.containerInfo),Pt(a,n),$t(n),bn=c;break;case 12:Pt(a,n),$t(n);break;case 31:Pt(a,n),$t(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Ao(n,c)));break;case 13:Pt(a,n),$t(n),n.child.flags&8192&&n.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Ro=It()),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Ao(n,c)));break;case 22:h=n.memoizedState!==null;var C=r!==null&&r.memoizedState!==null,P=Qn,H=st;if(Qn=P||h,st=H||C,Pt(a,n),st=H,Qn=P,$t(n),c&8192)e:for(a=n.stateNode,a._visibility=h?a._visibility&-2:a._visibility|1,h&&(r===null||C||Qn||st||ha(n)),r=null,a=n;;){if(a.tag===5||a.tag===26){if(r===null){C=r=a;try{if(m=C.stateNode,h)v=m.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=C.stateNode;var Y=C.memoizedProps.style,$=Y!=null&&Y.hasOwnProperty("display")?Y.display:null;S.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(ae){Le(C,C.return,ae)}}}else if(a.tag===6){if(r===null){C=a;try{C.stateNode.nodeValue=h?"":C.memoizedProps}catch(ae){Le(C,C.return,ae)}}}else if(a.tag===18){if(r===null){C=a;try{var V=C.stateNode;h?Ax(V,!0):Ax(C.stateNode,!1)}catch(ae){Le(C,C.return,ae)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;r===a&&(r=null),a=a.return}r===a&&(r=null),a.sibling.return=a.return,a=a.sibling}c&4&&(c=n.updateQueue,c!==null&&(r=c.retryQueue,r!==null&&(c.retryQueue=null,Ao(n,r))));break;case 19:Pt(a,n),$t(n),c&4&&(c=n.updateQueue,c!==null&&(n.updateQueue=null,Ao(n,c)));break;case 30:break;case 21:break;default:Pt(a,n),$t(n)}}function $t(n){var a=n.flags;if(a&2){try{for(var r,c=n.return;c!==null;){if(Rg(c)){r=c;break}c=c.return}if(r==null)throw Error(i(160));switch(r.tag){case 27:var h=r.stateNode,m=Zd(n);Eo(n,m,h);break;case 5:var v=r.stateNode;r.flags&32&&(Va(v,""),r.flags&=-33);var S=Zd(n);Eo(n,S,v);break;case 3:case 4:var C=r.stateNode.containerInfo,P=Zd(n);eh(n,P,C);break;default:throw Error(i(161))}}catch(H){Le(n,n.return,H)}n.flags&=-3}a&4096&&(n.flags&=-4097)}function Bg(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;Bg(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}function es(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)Mg(n,a.alternate,a),a=a.sibling}function ha(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:ks(4,a,a.return),ha(a);break;case 1:On(a,a.return);var r=a.stateNode;typeof r.componentWillUnmount=="function"&&Ag(a,a.return,r),ha(a);break;case 27:Dr(a.stateNode);case 26:case 5:On(a,a.return),ha(a);break;case 22:a.memoizedState===null&&ha(a);break;case 30:ha(a);break;default:ha(a)}n=n.sibling}}function ts(n,a,r){for(r=r&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var c=a.alternate,h=n,m=a,v=m.flags;switch(m.tag){case 0:case 11:case 15:ts(h,m,r),Sr(4,m);break;case 1:if(ts(h,m,r),c=m,h=c.stateNode,typeof h.componentDidMount=="function")try{h.componentDidMount()}catch(P){Le(c,c.return,P)}if(c=m,h=c.updateQueue,h!==null){var S=c.stateNode;try{var C=h.shared.hiddenCallbacks;if(C!==null)for(h.shared.hiddenCallbacks=null,h=0;h<C.length;h++)xp(C[h],S)}catch(P){Le(c,c.return,P)}}r&&v&64&&Eg(m),_r(m,m.return);break;case 27:Og(m);case 26:case 5:ts(h,m,r),r&&c===null&&v&4&&Cg(m),_r(m,m.return);break;case 12:ts(h,m,r);break;case 31:ts(h,m,r),r&&v&4&&zg(h,m);break;case 13:ts(h,m,r),r&&v&4&&Pg(h,m);break;case 22:m.memoizedState===null&&ts(h,m,r),_r(m,m.return);break;case 30:break;default:ts(h,m,r)}a=a.sibling}}function nh(n,a){var r=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==r&&(n!=null&&n.refCount++,r!=null&&ur(r))}function sh(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&ur(n))}function vn(n,a,r,c){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Vg(n,a,r,c),a=a.sibling}function Vg(n,a,r,c){var h=a.flags;switch(a.tag){case 0:case 11:case 15:vn(n,a,r,c),h&2048&&Sr(9,a);break;case 1:vn(n,a,r,c);break;case 3:vn(n,a,r,c),h&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&ur(n)));break;case 12:if(h&2048){vn(n,a,r,c),n=a.stateNode;try{var m=a.memoizedProps,v=m.id,S=m.onPostCommit;typeof S=="function"&&S(v,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(C){Le(a,a.return,C)}}else vn(n,a,r,c);break;case 31:vn(n,a,r,c);break;case 13:vn(n,a,r,c);break;case 23:break;case 22:m=a.stateNode,v=a.alternate,a.memoizedState!==null?m._visibility&2?vn(n,a,r,c):Nr(n,a):m._visibility&2?vn(n,a,r,c):(m._visibility|=2,li(n,a,r,c,(a.subtreeFlags&10256)!==0||!1)),h&2048&&nh(v,a);break;case 24:vn(n,a,r,c),h&2048&&sh(a.alternate,a);break;default:vn(n,a,r,c)}}function li(n,a,r,c,h){for(h=h&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var m=n,v=a,S=r,C=c,P=v.flags;switch(v.tag){case 0:case 11:case 15:li(m,v,S,C,h),Sr(8,v);break;case 23:break;case 22:var H=v.stateNode;v.memoizedState!==null?H._visibility&2?li(m,v,S,C,h):Nr(m,v):(H._visibility|=2,li(m,v,S,C,h)),h&&P&2048&&nh(v.alternate,v);break;case 24:li(m,v,S,C,h),h&&P&2048&&sh(v.alternate,v);break;default:li(m,v,S,C,h)}a=a.sibling}}function Nr(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var r=n,c=a,h=c.flags;switch(c.tag){case 22:Nr(r,c),h&2048&&nh(c.alternate,c);break;case 24:Nr(r,c),h&2048&&sh(c.alternate,c);break;default:Nr(r,c)}a=a.sibling}}var Tr=8192;function oi(n,a,r){if(n.subtreeFlags&Tr)for(n=n.child;n!==null;)qg(n,a,r),n=n.sibling}function qg(n,a,r){switch(n.tag){case 26:oi(n,a,r),n.flags&Tr&&n.memoizedState!==null&&i4(r,bn,n.memoizedState,n.memoizedProps);break;case 5:oi(n,a,r);break;case 3:case 4:var c=bn;bn=Ho(n.stateNode.containerInfo),oi(n,a,r),bn=c;break;case 22:n.memoizedState===null&&(c=n.alternate,c!==null&&c.memoizedState!==null?(c=Tr,Tr=16777216,oi(n,a,r),Tr=c):oi(n,a,r));break;default:oi(n,a,r)}}function Hg(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}function kr(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var c=a[r];ht=c,Gg(c,n)}Hg(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Ig(n),n=n.sibling}function Ig(n){switch(n.tag){case 0:case 11:case 15:kr(n),n.flags&2048&&ks(9,n,n.return);break;case 3:kr(n);break;case 12:kr(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,Co(n)):kr(n);break;default:kr(n)}}function Co(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var r=0;r<a.length;r++){var c=a[r];ht=c,Gg(c,n)}Hg(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:ks(8,a,a.return),Co(a);break;case 22:r=a.stateNode,r._visibility&2&&(r._visibility&=-3,Co(a));break;default:Co(a)}n=n.sibling}}function Gg(n,a){for(;ht!==null;){var r=ht;switch(r.tag){case 0:case 11:case 15:ks(8,r,a);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var c=r.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:ur(r.memoizedState.cache)}if(c=r.child,c!==null)c.return=r,ht=c;else e:for(r=n;ht!==null;){c=ht;var h=c.sibling,m=c.return;if(Ug(c),c===r){ht=null;break e}if(h!==null){h.return=m,ht=h;break e}ht=m}}}var v_={getCacheForType:function(n){var a=xt(et),r=a.data.get(n);return r===void 0&&(r=n(),a.data.set(n,r)),r},cacheSignal:function(){return xt(et).controller.signal}},w_=typeof WeakMap=="function"?WeakMap:Map,De=0,qe=null,je=null,_e=0,Ue=0,Wt=null,Es=!1,ci=!1,ah=!1,ns=0,Xe=0,As=0,fa=0,ih=0,Qt=0,ui=0,Er=null,Bt=null,rh=!1,Ro=0,Kg=0,Oo=1/0,Do=null,Cs=null,it=0,Rs=null,di=null,ss=0,lh=0,oh=null,Yg=null,Ar=0,ch=null;function Zt(){return(De&2)!==0&&_e!==0?_e&-_e:B.T!==null?ph():c0()}function Fg(){if(Qt===0)if((_e&536870912)===0||Ee){var n=Bl;Bl<<=1,(Bl&3932160)===0&&(Bl=262144),Qt=n}else Qt=536870912;return n=Xt.current,n!==null&&(n.flags|=32),Qt}function Vt(n,a,r){(n===qe&&(Ue===2||Ue===9)||n.cancelPendingCommit!==null)&&(hi(n,0),Os(n,_e,Qt,!1)),Ji(n,r),((De&2)===0||n!==qe)&&(n===qe&&((De&2)===0&&(fa|=r),Xe===4&&Os(n,_e,Qt,!1)),Dn(n))}function Xg(n,a,r){if((De&6)!==0)throw Error(i(327));var c=!r&&(a&127)===0&&(a&n.expiredLanes)===0||Xi(n,a),h=c?__(n,a):dh(n,a,!0),m=c;do{if(h===0){ci&&!c&&Os(n,a,0,!1);break}else{if(r=n.current.alternate,m&&!j_(r)){h=dh(n,a,!1),m=!1;continue}if(h===2){if(m=a,n.errorRecoveryDisabledLanes&m)var v=0;else v=n.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){a=v;e:{var S=n;h=Er;var C=S.current.memoizedState.isDehydrated;if(C&&(hi(S,v).flags|=256),v=dh(S,v,!1),v!==2){if(ah&&!C){S.errorRecoveryDisabledLanes|=m,fa|=m,h=4;break e}m=Bt,Bt=h,m!==null&&(Bt===null?Bt=m:Bt.push.apply(Bt,m))}h=v}if(m=!1,h!==2)continue}}if(h===1){hi(n,0),Os(n,a,0,!0);break}e:{switch(c=n,m=h,m){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:Os(c,a,Qt,!Es);break e;case 2:Bt=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(h=Ro+300-It(),10<h)){if(Os(c,a,Qt,!Es),ql(c,0,!0)!==0)break e;ss=a,c.timeoutHandle=Tx(Jg.bind(null,c,r,Bt,Do,rh,a,Qt,fa,ui,Es,m,"Throttled",-0,0),h);break e}Jg(c,r,Bt,Do,rh,a,Qt,fa,ui,Es,m,null,-0,0)}}break}while(!0);Dn(n)}function Jg(n,a,r,c,h,m,v,S,C,P,H,Y,$,V){if(n.timeoutHandle=-1,Y=a.subtreeFlags,Y&8192||(Y&16785408)===16785408){Y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:qn},qg(a,m,Y);var ae=(m&62914560)===m?Ro-It():(m&4194048)===m?Kg-It():0;if(ae=r4(Y,ae),ae!==null){ss=m,n.cancelPendingCommit=ae(ax.bind(null,n,a,m,r,c,h,v,S,C,H,Y,null,$,V)),Os(n,m,v,!P);return}}ax(n,a,m,r,c,h,v,S,C)}function j_(n){for(var a=n;;){var r=a.tag;if((r===0||r===11||r===15)&&a.flags&16384&&(r=a.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var c=0;c<r.length;c++){var h=r[c],m=h.getSnapshot;h=h.value;try{if(!Yt(m(),h))return!1}catch{return!1}}if(r=a.child,a.subtreeFlags&16384&&r!==null)r.return=a,a=r;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Os(n,a,r,c){a&=~ih,a&=~fa,n.suspendedLanes|=a,n.pingedLanes&=~a,c&&(n.warmLanes|=a),c=n.expirationTimes;for(var h=a;0<h;){var m=31-Kt(h),v=1<<m;c[m]=-1,h&=~v}r!==0&&r0(n,r,a)}function Mo(){return(De&6)===0?(Cr(0),!1):!0}function uh(){if(je!==null){if(Ue===0)var n=je.return;else n=je,Kn=aa=null,Td(n),ni=null,hr=0,n=je;for(;n!==null;)kg(n.alternate,n),n=n.return;je=null}}function hi(n,a){var r=n.timeoutHandle;r!==-1&&(n.timeoutHandle=-1,q_(r)),r=n.cancelPendingCommit,r!==null&&(n.cancelPendingCommit=null,r()),ss=0,uh(),qe=n,je=r=In(n.current,null),_e=a,Ue=0,Wt=null,Es=!1,ci=Xi(n,a),ah=!1,ui=Qt=ih=fa=As=Xe=0,Bt=Er=null,rh=!1,(a&8)!==0&&(a|=a&32);var c=n.entangledLanes;if(c!==0)for(n=n.entanglements,c&=a;0<c;){var h=31-Kt(c),m=1<<h;a|=n[h],c&=~m}return ns=a,eo(),r}function Wg(n,a){be=null,B.H=vr,a===ti||a===oo?(a=fp(),Ue=3):a===md?(a=fp(),Ue=4):Ue=a===qd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Wt=a,je===null&&(Xe=1,So(n,on(a,n.current)))}function Qg(){var n=Xt.current;return n===null?!0:(_e&4194048)===_e?hn===null:(_e&62914560)===_e||(_e&536870912)!==0?n===hn:!1}function Zg(){var n=B.H;return B.H=vr,n===null?vr:n}function ex(){var n=B.A;return B.A=v_,n}function Uo(){Xe=4,Es||(_e&4194048)!==_e&&Xt.current!==null||(ci=!0),(As&134217727)===0&&(fa&134217727)===0||qe===null||Os(qe,_e,Qt,!1)}function dh(n,a,r){var c=De;De|=2;var h=Zg(),m=ex();(qe!==n||_e!==a)&&(Do=null,hi(n,a)),a=!1;var v=Xe;e:do try{if(Ue!==0&&je!==null){var S=je,C=Wt;switch(Ue){case 8:uh(),v=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(a=!0);var P=Ue;if(Ue=0,Wt=null,fi(n,S,C,P),r&&ci){v=0;break e}break;default:P=Ue,Ue=0,Wt=null,fi(n,S,C,P)}}S_(),v=Xe;break}catch(H){Wg(n,H)}while(!0);return a&&n.shellSuspendCounter++,Kn=aa=null,De=c,B.H=h,B.A=m,je===null&&(qe=null,_e=0,eo()),v}function S_(){for(;je!==null;)tx(je)}function __(n,a){var r=De;De|=2;var c=Zg(),h=ex();qe!==n||_e!==a?(Do=null,Oo=It()+500,hi(n,a)):ci=Xi(n,a);e:do try{if(Ue!==0&&je!==null){a=je;var m=Wt;t:switch(Ue){case 1:Ue=0,Wt=null,fi(n,a,m,1);break;case 2:case 9:if(dp(m)){Ue=0,Wt=null,nx(a);break}a=function(){Ue!==2&&Ue!==9||qe!==n||(Ue=7),Dn(n)},m.then(a,a);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:dp(m)?(Ue=0,Wt=null,nx(a)):(Ue=0,Wt=null,fi(n,a,m,7));break;case 5:var v=null;switch(je.tag){case 26:v=je.memoizedState;case 5:case 27:var S=je;if(v?Vx(v):S.stateNode.complete){Ue=0,Wt=null;var C=S.sibling;if(C!==null)je=C;else{var P=S.return;P!==null?(je=P,Lo(P)):je=null}break t}}Ue=0,Wt=null,fi(n,a,m,5);break;case 6:Ue=0,Wt=null,fi(n,a,m,6);break;case 8:uh(),Xe=6;break e;default:throw Error(i(462))}}N_();break}catch(H){Wg(n,H)}while(!0);return Kn=aa=null,B.H=c,B.A=h,De=r,je!==null?0:(qe=null,_e=0,eo(),Xe)}function N_(){for(;je!==null&&!Fj();)tx(je)}function tx(n){var a=Ng(n.alternate,n,ns);n.memoizedProps=n.pendingProps,a===null?Lo(n):je=a}function nx(n){var a=n,r=a.alternate;switch(a.tag){case 15:case 0:a=bg(r,a,a.pendingProps,a.type,void 0,_e);break;case 11:a=bg(r,a,a.pendingProps,a.type.render,a.ref,_e);break;case 5:Td(a);default:kg(r,a),a=je=ep(a,ns),a=Ng(r,a,ns)}n.memoizedProps=n.pendingProps,a===null?Lo(n):je=a}function fi(n,a,r,c){Kn=aa=null,Td(a),ni=null,hr=0;var h=a.return;try{if(f_(n,h,a,r,_e)){Xe=1,So(n,on(r,n.current)),je=null;return}}catch(m){if(h!==null)throw je=h,m;Xe=1,So(n,on(r,n.current)),je=null;return}a.flags&32768?(Ee||c===1?n=!0:ci||(_e&536870912)!==0?n=!1:(Es=n=!0,(c===2||c===9||c===3||c===6)&&(c=Xt.current,c!==null&&c.tag===13&&(c.flags|=16384))),sx(a,n)):Lo(a)}function Lo(n){var a=n;do{if((a.flags&32768)!==0){sx(a,Es);return}n=a.return;var r=g_(a.alternate,a,ns);if(r!==null){je=r;return}if(a=a.sibling,a!==null){je=a;return}je=a=n}while(a!==null);Xe===0&&(Xe=5)}function sx(n,a){do{var r=x_(n.alternate,n);if(r!==null){r.flags&=32767,je=r;return}if(r=n.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!a&&(n=n.sibling,n!==null)){je=n;return}je=n=r}while(n!==null);Xe=6,je=null}function ax(n,a,r,c,h,m,v,S,C){n.cancelPendingCommit=null;do zo();while(it!==0);if((De&6)!==0)throw Error(i(327));if(a!==null){if(a===n.current)throw Error(i(177));if(m=a.lanes|a.childLanes,m|=Zu,aS(n,r,m,v,S,C),n===qe&&(je=qe=null,_e=0),di=a,Rs=n,ss=r,lh=m,oh=h,Yg=c,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,A_(Pl,function(){return cx(),null})):(n.callbackNode=null,n.callbackPriority=0),c=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||c){c=B.T,B.T=null,h=X.p,X.p=2,v=De,De|=4;try{y_(n,a,r)}finally{De=v,X.p=h,B.T=c}}it=1,ix(),rx(),lx()}}function ix(){if(it===1){it=0;var n=Rs,a=di,r=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||r){r=B.T,B.T=null;var c=X.p;X.p=2;var h=De;De|=4;try{$g(a,n);var m=Sh,v=G0(n.containerInfo),S=m.focusedElem,C=m.selectionRange;if(v!==S&&S&&S.ownerDocument&&I0(S.ownerDocument.documentElement,S)){if(C!==null&&Fu(S)){var P=C.start,H=C.end;if(H===void 0&&(H=P),"selectionStart"in S)S.selectionStart=P,S.selectionEnd=Math.min(H,S.value.length);else{var Y=S.ownerDocument||document,$=Y&&Y.defaultView||window;if($.getSelection){var V=$.getSelection(),ae=S.textContent.length,he=Math.min(C.start,ae),Be=C.end===void 0?he:Math.min(C.end,ae);!V.extend&&he>Be&&(v=Be,Be=he,he=v);var U=H0(S,he),O=H0(S,Be);if(U&&O&&(V.rangeCount!==1||V.anchorNode!==U.node||V.anchorOffset!==U.offset||V.focusNode!==O.node||V.focusOffset!==O.offset)){var z=Y.createRange();z.setStart(U.node,U.offset),V.removeAllRanges(),he>Be?(V.addRange(z),V.extend(O.node,O.offset)):(z.setEnd(O.node,O.offset),V.addRange(z))}}}}for(Y=[],V=S;V=V.parentNode;)V.nodeType===1&&Y.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<Y.length;S++){var K=Y[S];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Xo=!!jh,Sh=jh=null}finally{De=h,X.p=c,B.T=r}}n.current=a,it=2}}function rx(){if(it===2){it=0;var n=Rs,a=di,r=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||r){r=B.T,B.T=null;var c=X.p;X.p=2;var h=De;De|=4;try{Mg(n,a.alternate,a)}finally{De=h,X.p=c,B.T=r}}it=3}}function lx(){if(it===4||it===3){it=0,Xj();var n=Rs,a=di,r=ss,c=Yg;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?it=5:(it=0,di=Rs=null,ox(n,n.pendingLanes));var h=n.pendingLanes;if(h===0&&(Cs=null),Au(r),a=a.stateNode,Gt&&typeof Gt.onCommitFiberRoot=="function")try{Gt.onCommitFiberRoot(Fi,a,void 0,(a.current.flags&128)===128)}catch{}if(c!==null){a=B.T,h=X.p,X.p=2,B.T=null;try{for(var m=n.onRecoverableError,v=0;v<c.length;v++){var S=c[v];m(S.value,{componentStack:S.stack})}}finally{B.T=a,X.p=h}}(ss&3)!==0&&zo(),Dn(n),h=n.pendingLanes,(r&261930)!==0&&(h&42)!==0?n===ch?Ar++:(Ar=0,ch=n):Ar=0,Cr(0)}}function ox(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,ur(a)))}function zo(){return ix(),rx(),lx(),cx()}function cx(){if(it!==5)return!1;var n=Rs,a=lh;lh=0;var r=Au(ss),c=B.T,h=X.p;try{X.p=32>r?32:r,B.T=null,r=oh,oh=null;var m=Rs,v=ss;if(it=0,di=Rs=null,ss=0,(De&6)!==0)throw Error(i(331));var S=De;if(De|=4,Ig(m.current),Vg(m,m.current,v,r),De=S,Cr(0,!1),Gt&&typeof Gt.onPostCommitFiberRoot=="function")try{Gt.onPostCommitFiberRoot(Fi,m)}catch{}return!0}finally{X.p=h,B.T=c,ox(n,a)}}function ux(n,a,r){a=on(r,a),a=Vd(n.stateNode,a,2),n=_s(n,a,2),n!==null&&(Ji(n,2),Dn(n))}function Le(n,a,r){if(n.tag===3)ux(n,n,r);else for(;a!==null;){if(a.tag===3){ux(a,n,r);break}else if(a.tag===1){var c=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Cs===null||!Cs.has(c))){n=on(r,n),r=dg(2),c=_s(a,r,2),c!==null&&(hg(r,c,a,n),Ji(c,2),Dn(c));break}}a=a.return}}function hh(n,a,r){var c=n.pingCache;if(c===null){c=n.pingCache=new w_;var h=new Set;c.set(a,h)}else h=c.get(a),h===void 0&&(h=new Set,c.set(a,h));h.has(r)||(ah=!0,h.add(r),n=T_.bind(null,n,a,r),a.then(n,n))}function T_(n,a,r){var c=n.pingCache;c!==null&&c.delete(a),n.pingedLanes|=n.suspendedLanes&r,n.warmLanes&=~r,qe===n&&(_e&r)===r&&(Xe===4||Xe===3&&(_e&62914560)===_e&&300>It()-Ro?(De&2)===0&&hi(n,0):ih|=r,ui===_e&&(ui=0)),Dn(n)}function dx(n,a){a===0&&(a=i0()),n=ta(n,a),n!==null&&(Ji(n,a),Dn(n))}function k_(n){var a=n.memoizedState,r=0;a!==null&&(r=a.retryLane),dx(n,r)}function E_(n,a){var r=0;switch(n.tag){case 31:case 13:var c=n.stateNode,h=n.memoizedState;h!==null&&(r=h.retryLane);break;case 19:c=n.stateNode;break;case 22:c=n.stateNode._retryCache;break;default:throw Error(i(314))}c!==null&&c.delete(a),dx(n,r)}function A_(n,a){return Nu(n,a)}var Po=null,mi=null,fh=!1,$o=!1,mh=!1,Ds=0;function Dn(n){n!==mi&&n.next===null&&(mi===null?Po=mi=n:mi=mi.next=n),$o=!0,fh||(fh=!0,R_())}function Cr(n,a){if(!mh&&$o){mh=!0;do for(var r=!1,c=Po;c!==null;){if(n!==0){var h=c.pendingLanes;if(h===0)var m=0;else{var v=c.suspendedLanes,S=c.pingedLanes;m=(1<<31-Kt(42|n)+1)-1,m&=h&~(v&~S),m=m&201326741?m&201326741|1:m?m|2:0}m!==0&&(r=!0,px(c,m))}else m=_e,m=ql(c,c===qe?m:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(m&3)===0||Xi(c,m)||(r=!0,px(c,m));c=c.next}while(r);mh=!1}}function C_(){hx()}function hx(){$o=fh=!1;var n=0;Ds!==0&&V_()&&(n=Ds);for(var a=It(),r=null,c=Po;c!==null;){var h=c.next,m=fx(c,a);m===0?(c.next=null,r===null?Po=h:r.next=h,h===null&&(mi=r)):(r=c,(n!==0||(m&3)!==0)&&($o=!0)),c=h}it!==0&&it!==5||Cr(n),Ds!==0&&(Ds=0)}function fx(n,a){for(var r=n.suspendedLanes,c=n.pingedLanes,h=n.expirationTimes,m=n.pendingLanes&-62914561;0<m;){var v=31-Kt(m),S=1<<v,C=h[v];C===-1?((S&r)===0||(S&c)!==0)&&(h[v]=sS(S,a)):C<=a&&(n.expiredLanes|=S),m&=~S}if(a=qe,r=_e,r=ql(n,n===a?r:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c=n.callbackNode,r===0||n===a&&(Ue===2||Ue===9)||n.cancelPendingCommit!==null)return c!==null&&c!==null&&Tu(c),n.callbackNode=null,n.callbackPriority=0;if((r&3)===0||Xi(n,r)){if(a=r&-r,a===n.callbackPriority)return a;switch(c!==null&&Tu(c),Au(r)){case 2:case 8:r=s0;break;case 32:r=Pl;break;case 268435456:r=a0;break;default:r=Pl}return c=mx.bind(null,n),r=Nu(r,c),n.callbackPriority=a,n.callbackNode=r,a}return c!==null&&c!==null&&Tu(c),n.callbackPriority=2,n.callbackNode=null,2}function mx(n,a){if(it!==0&&it!==5)return n.callbackNode=null,n.callbackPriority=0,null;var r=n.callbackNode;if(zo()&&n.callbackNode!==r)return null;var c=_e;return c=ql(n,n===qe?c:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),c===0?null:(Xg(n,c,a),fx(n,It()),n.callbackNode!=null&&n.callbackNode===r?mx.bind(null,n):null)}function px(n,a){if(zo())return null;Xg(n,a,!0)}function R_(){H_(function(){(De&6)!==0?Nu(n0,C_):hx()})}function ph(){if(Ds===0){var n=Za;n===0&&(n=$l,$l<<=1,($l&261888)===0&&($l=256)),Ds=n}return Ds}function gx(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Kl(""+n)}function xx(n,a){var r=a.ownerDocument.createElement("input");return r.name=a.name,r.value=a.value,n.id&&r.setAttribute("form",n.id),a.parentNode.insertBefore(r,a),n=new FormData(n),r.parentNode.removeChild(r),n}function O_(n,a,r,c,h){if(a==="submit"&&r&&r.stateNode===h){var m=gx((h[Ut]||null).action),v=c.submitter;v&&(a=(a=v[Ut]||null)?gx(a.formAction):v.getAttribute("formAction"),a!==null&&(m=a,v=null));var S=new Jl("action","action",null,c,h);n.push({event:S,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(Ds!==0){var C=v?xx(h,v):new FormData(h);Ud(r,{pending:!0,data:C,method:h.method,action:m},null,C)}}else typeof m=="function"&&(S.preventDefault(),C=v?xx(h,v):new FormData(h),Ud(r,{pending:!0,data:C,method:h.method,action:m},m,C))},currentTarget:h}]})}}for(var gh=0;gh<Qu.length;gh++){var xh=Qu[gh],D_=xh.toLowerCase(),M_=xh[0].toUpperCase()+xh.slice(1);yn(D_,"on"+M_)}yn(F0,"onAnimationEnd"),yn(X0,"onAnimationIteration"),yn(J0,"onAnimationStart"),yn("dblclick","onDoubleClick"),yn("focusin","onFocus"),yn("focusout","onBlur"),yn(JS,"onTransitionRun"),yn(WS,"onTransitionStart"),yn(QS,"onTransitionCancel"),yn(W0,"onTransitionEnd"),$a("onMouseEnter",["mouseout","mouseover"]),$a("onMouseLeave",["mouseout","mouseover"]),$a("onPointerEnter",["pointerout","pointerover"]),$a("onPointerLeave",["pointerout","pointerover"]),Ws("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ws("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ws("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ws("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ws("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ws("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Rr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),U_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Rr));function yx(n,a){a=(a&4)!==0;for(var r=0;r<n.length;r++){var c=n[r],h=c.event;c=c.listeners;e:{var m=void 0;if(a)for(var v=c.length-1;0<=v;v--){var S=c[v],C=S.instance,P=S.currentTarget;if(S=S.listener,C!==m&&h.isPropagationStopped())break e;m=S,h.currentTarget=P;try{m(h)}catch(H){Zl(H)}h.currentTarget=null,m=C}else for(v=0;v<c.length;v++){if(S=c[v],C=S.instance,P=S.currentTarget,S=S.listener,C!==m&&h.isPropagationStopped())break e;m=S,h.currentTarget=P;try{m(h)}catch(H){Zl(H)}h.currentTarget=null,m=C}}}}function Se(n,a){var r=a[Cu];r===void 0&&(r=a[Cu]=new Set);var c=n+"__bubble";r.has(c)||(bx(a,n,2,!1),r.add(c))}function yh(n,a,r){var c=0;a&&(c|=4),bx(r,n,c,a)}var Bo="_reactListening"+Math.random().toString(36).slice(2);function bh(n){if(!n[Bo]){n[Bo]=!0,h0.forEach(function(r){r!=="selectionchange"&&(U_.has(r)||yh(r,!1,n),yh(r,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[Bo]||(a[Bo]=!0,yh("selectionchange",!1,a))}}function bx(n,a,r,c){switch(Fx(a)){case 2:var h=c4;break;case 8:h=u4;break;default:h=Mh}r=h.bind(null,a,r,n),h=void 0,!$u||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(h=!0),c?h!==void 0?n.addEventListener(a,r,{capture:!0,passive:h}):n.addEventListener(a,r,!0):h!==void 0?n.addEventListener(a,r,{passive:h}):n.addEventListener(a,r,!1)}function vh(n,a,r,c,h){var m=c;if((a&1)===0&&(a&2)===0&&c!==null)e:for(;;){if(c===null)return;var v=c.tag;if(v===3||v===4){var S=c.stateNode.containerInfo;if(S===h)break;if(v===4)for(v=c.return;v!==null;){var C=v.tag;if((C===3||C===4)&&v.stateNode.containerInfo===h)return;v=v.return}for(;S!==null;){if(v=La(S),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){c=m=v;continue e}S=S.parentNode}}c=c.return}_0(function(){var P=m,H=zu(r),Y=[];e:{var $=Q0.get(n);if($!==void 0){var V=Jl,ae=n;switch(n){case"keypress":if(Fl(r)===0)break e;case"keydown":case"keyup":V=ES;break;case"focusin":ae="focus",V=Hu;break;case"focusout":ae="blur",V=Hu;break;case"beforeblur":case"afterblur":V=Hu;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=k0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=gS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=RS;break;case F0:case X0:case J0:V=bS;break;case W0:V=DS;break;case"scroll":case"scrollend":V=mS;break;case"wheel":V=US;break;case"copy":case"cut":case"paste":V=wS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=A0;break;case"toggle":case"beforetoggle":V=zS}var he=(a&4)!==0,Be=!he&&(n==="scroll"||n==="scrollend"),U=he?$!==null?$+"Capture":null:$;he=[];for(var O=P,z;O!==null;){var K=O;if(z=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||z===null||U===null||(K=Zi(O,U),K!=null&&he.push(Or(O,K,z))),Be)break;O=O.return}0<he.length&&($=new V($,ae,null,r,H),Y.push({event:$,listeners:he}))}}if((a&7)===0){e:{if($=n==="mouseover"||n==="pointerover",V=n==="mouseout"||n==="pointerout",$&&r!==Lu&&(ae=r.relatedTarget||r.fromElement)&&(La(ae)||ae[Ua]))break e;if((V||$)&&($=H.window===H?H:($=H.ownerDocument)?$.defaultView||$.parentWindow:window,V?(ae=r.relatedTarget||r.toElement,V=P,ae=ae?La(ae):null,ae!==null&&(Be=u(ae),he=ae.tag,ae!==Be||he!==5&&he!==27&&he!==6)&&(ae=null)):(V=null,ae=P),V!==ae)){if(he=k0,K="onMouseLeave",U="onMouseEnter",O="mouse",(n==="pointerout"||n==="pointerover")&&(he=A0,K="onPointerLeave",U="onPointerEnter",O="pointer"),Be=V==null?$:Qi(V),z=ae==null?$:Qi(ae),$=new he(K,O+"leave",V,r,H),$.target=Be,$.relatedTarget=z,K=null,La(H)===P&&(he=new he(U,O+"enter",ae,r,H),he.target=z,he.relatedTarget=Be,K=he),Be=K,V&&ae)t:{for(he=L_,U=V,O=ae,z=0,K=U;K;K=he(K))z++;K=0;for(var ce=O;ce;ce=he(ce))K++;for(;0<z-K;)U=he(U),z--;for(;0<K-z;)O=he(O),K--;for(;z--;){if(U===O||O!==null&&U===O.alternate){he=U;break t}U=he(U),O=he(O)}he=null}else he=null;V!==null&&vx(Y,$,V,he,!1),ae!==null&&Be!==null&&vx(Y,Be,ae,he,!0)}}e:{if($=P?Qi(P):window,V=$.nodeName&&$.nodeName.toLowerCase(),V==="select"||V==="input"&&$.type==="file")var Re=z0;else if(U0($))if(P0)Re=YS;else{Re=GS;var le=IS}else V=$.nodeName,!V||V.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?P&&Uu(P.elementType)&&(Re=z0):Re=KS;if(Re&&(Re=Re(n,P))){L0(Y,Re,r,H);break e}le&&le(n,$,P),n==="focusout"&&P&&$.type==="number"&&P.memoizedProps.value!=null&&Mu($,"number",$.value)}switch(le=P?Qi(P):window,n){case"focusin":(U0(le)||le.contentEditable==="true")&&(Ga=le,Xu=P,lr=null);break;case"focusout":lr=Xu=Ga=null;break;case"mousedown":Ju=!0;break;case"contextmenu":case"mouseup":case"dragend":Ju=!1,K0(Y,r,H);break;case"selectionchange":if(XS)break;case"keydown":case"keyup":K0(Y,r,H)}var ve;if(Gu)e:{switch(n){case"compositionstart":var Ne="onCompositionStart";break e;case"compositionend":Ne="onCompositionEnd";break e;case"compositionupdate":Ne="onCompositionUpdate";break e}Ne=void 0}else Ia?D0(n,r)&&(Ne="onCompositionEnd"):n==="keydown"&&r.keyCode===229&&(Ne="onCompositionStart");Ne&&(C0&&r.locale!=="ko"&&(Ia||Ne!=="onCompositionStart"?Ne==="onCompositionEnd"&&Ia&&(ve=N0()):(xs=H,Bu="value"in xs?xs.value:xs.textContent,Ia=!0)),le=Vo(P,Ne),0<le.length&&(Ne=new E0(Ne,n,null,r,H),Y.push({event:Ne,listeners:le}),ve?Ne.data=ve:(ve=M0(r),ve!==null&&(Ne.data=ve)))),(ve=$S?BS(n,r):VS(n,r))&&(Ne=Vo(P,"onBeforeInput"),0<Ne.length&&(le=new E0("onBeforeInput","beforeinput",null,r,H),Y.push({event:le,listeners:Ne}),le.data=ve)),O_(Y,n,P,r,H)}yx(Y,a)})}function Or(n,a,r){return{instance:n,listener:a,currentTarget:r}}function Vo(n,a){for(var r=a+"Capture",c=[];n!==null;){var h=n,m=h.stateNode;if(h=h.tag,h!==5&&h!==26&&h!==27||m===null||(h=Zi(n,r),h!=null&&c.unshift(Or(n,h,m)),h=Zi(n,a),h!=null&&c.push(Or(n,h,m))),n.tag===3)return c;n=n.return}return[]}function L_(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}function vx(n,a,r,c,h){for(var m=a._reactName,v=[];r!==null&&r!==c;){var S=r,C=S.alternate,P=S.stateNode;if(S=S.tag,C!==null&&C===c)break;S!==5&&S!==26&&S!==27||P===null||(C=P,h?(P=Zi(r,m),P!=null&&v.unshift(Or(r,P,C))):h||(P=Zi(r,m),P!=null&&v.push(Or(r,P,C)))),r=r.return}v.length!==0&&n.push({event:a,listeners:v})}var z_=/\r\n?/g,P_=/\u0000|\uFFFD/g;function wx(n){return(typeof n=="string"?n:""+n).replace(z_,`Unknown directive
25`).replace(P_,"")}function jx(n,a){return a=wx(a),wx(n)===a}function $e(n,a,r,c,h,m){switch(r){case"children":typeof c=="string"?a==="body"||a==="textarea"&&c===""||Va(n,c):(typeof c=="number"||typeof c=="bigint")&&a!=="body"&&Va(n,""+c);break;case"className":Il(n,"class",c);break;case"tabIndex":Il(n,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":Il(n,r,c);break;case"style":j0(n,c,m);break;case"data":if(a!=="object"){Il(n,"data",c);break}case"src":case"href":if(c===""&&(a!=="a"||r!=="href")){n.removeAttribute(r);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(r);break}c=Kl(""+c),n.setAttribute(r,c);break;case"action":case"formAction":if(typeof c=="function"){n.setAttribute(r,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof m=="function"&&(r==="formAction"?(a!=="input"&&$e(n,a,"name",h.name,h,null),$e(n,a,"formEncType",h.formEncType,h,null),$e(n,a,"formMethod",h.formMethod,h,null),$e(n,a,"formTarget",h.formTarget,h,null)):($e(n,a,"encType",h.encType,h,null),$e(n,a,"method",h.method,h,null),$e(n,a,"target",h.target,h,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){n.removeAttribute(r);break}c=Kl(""+c),n.setAttribute(r,c);break;case"onClick":c!=null&&(n.onclick=qn);break;case"onScroll":c!=null&&Se("scroll",n);break;case"onScrollEnd":c!=null&&Se("scrollend",n);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(r=c.__html,r!=null){if(h.children!=null)throw Error(i(60));n.innerHTML=r}}break;case"multiple":n.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":n.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){n.removeAttribute("xlink:href");break}r=Kl(""+c),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(r,""+c):n.removeAttribute(r);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(r,""):n.removeAttribute(r);break;case"capture":case"download":c===!0?n.setAttribute(r,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?n.setAttribute(r,c):n.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?n.setAttribute(r,c):n.removeAttribute(r);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?n.removeAttribute(r):n.setAttribute(r,c);break;case"popover":Se("beforetoggle",n),Se("toggle",n),Hl(n,"popover",c);break;case"xlinkActuate":Vn(n,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Vn(n,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Vn(n,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Vn(n,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Vn(n,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Vn(n,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Vn(n,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Vn(n,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Vn(n,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Hl(n,"is",c);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=hS.get(r)||r,Hl(n,r,c))}}function wh(n,a,r,c,h,m){switch(r){case"style":j0(n,c,m);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(i(61));if(r=c.__html,r!=null){if(h.children!=null)throw Error(i(60));n.innerHTML=r}}break;case"children":typeof c=="string"?Va(n,c):(typeof c=="number"||typeof c=="bigint")&&Va(n,""+c);break;case"onScroll":c!=null&&Se("scroll",n);break;case"onScrollEnd":c!=null&&Se("scrollend",n);break;case"onClick":c!=null&&(n.onclick=qn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!f0.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(h=r.endsWith("Capture"),a=r.slice(2,h?r.length-7:void 0),m=n[Ut]||null,m=m!=null?m[r]:null,typeof m=="function"&&n.removeEventListener(a,m,h),typeof c=="function")){typeof m!="function"&&m!==null&&(r in n?n[r]=null:n.hasAttribute(r)&&n.removeAttribute(r)),n.addEventListener(a,c,h);break e}r in n?n[r]=c:c===!0?n.setAttribute(r,""):Hl(n,r,c)}}}function bt(n,a,r){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Se("error",n),Se("load",n);var c=!1,h=!1,m;for(m in r)if(r.hasOwnProperty(m)){var v=r[m];if(v!=null)switch(m){case"src":c=!0;break;case"srcSet":h=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:$e(n,a,m,v,r,null)}}h&&$e(n,a,"srcSet",r.srcSet,r,null),c&&$e(n,a,"src",r.src,r,null);return;case"input":Se("invalid",n);var S=m=v=h=null,C=null,P=null;for(c in r)if(r.hasOwnProperty(c)){var H=r[c];if(H!=null)switch(c){case"name":h=H;break;case"type":v=H;break;case"checked":C=H;break;case"defaultChecked":P=H;break;case"value":m=H;break;case"defaultValue":S=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(137,a));break;default:$e(n,a,c,H,r,null)}}y0(n,m,S,C,P,v,h,!1);return;case"select":Se("invalid",n),c=v=m=null;for(h in r)if(r.hasOwnProperty(h)&&(S=r[h],S!=null))switch(h){case"value":m=S;break;case"defaultValue":v=S;break;case"multiple":c=S;default:$e(n,a,h,S,r,null)}a=m,r=v,n.multiple=!!c,a!=null?Ba(n,!!c,a,!1):r!=null&&Ba(n,!!c,r,!0);return;case"textarea":Se("invalid",n),m=h=c=null;for(v in r)if(r.hasOwnProperty(v)&&(S=r[v],S!=null))switch(v){case"value":c=S;break;case"defaultValue":h=S;break;case"children":m=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(i(91));break;default:$e(n,a,v,S,r,null)}v0(n,c,h,m);return;case"option":for(C in r)r.hasOwnProperty(C)&&(c=r[C],c!=null)&&(C==="selected"?n.selected=c&&typeof c!="function"&&typeof c!="symbol":$e(n,a,C,c,r,null));return;case"dialog":Se("beforetoggle",n),Se("toggle",n),Se("cancel",n),Se("close",n);break;case"iframe":case"object":Se("load",n);break;case"video":case"audio":for(c=0;c<Rr.length;c++)Se(Rr[c],n);break;case"image":Se("error",n),Se("load",n);break;case"details":Se("toggle",n);break;case"embed":case"source":case"link":Se("error",n),Se("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(P in r)if(r.hasOwnProperty(P)&&(c=r[P],c!=null))switch(P){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:$e(n,a,P,c,r,null)}return;default:if(Uu(a)){for(H in r)r.hasOwnProperty(H)&&(c=r[H],c!==void 0&&wh(n,a,H,c,r,void 0));return}}for(S in r)r.hasOwnProperty(S)&&(c=r[S],c!=null&&$e(n,a,S,c,r,null))}function $_(n,a,r,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var h=null,m=null,v=null,S=null,C=null,P=null,H=null;for(V in r){var Y=r[V];if(r.hasOwnProperty(V)&&Y!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":C=Y;default:c.hasOwnProperty(V)||$e(n,a,V,null,c,Y)}}for(var $ in c){var V=c[$];if(Y=r[$],c.hasOwnProperty($)&&(V!=null||Y!=null))switch($){case"type":m=V;break;case"name":h=V;break;case"checked":P=V;break;case"defaultChecked":H=V;break;case"value":v=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(i(137,a));break;default:V!==Y&&$e(n,a,$,V,c,Y)}}Du(n,v,S,C,P,H,m,h);return;case"select":V=v=S=$=null;for(m in r)if(C=r[m],r.hasOwnProperty(m)&&C!=null)switch(m){case"value":break;case"multiple":V=C;default:c.hasOwnProperty(m)||$e(n,a,m,null,c,C)}for(h in c)if(m=c[h],C=r[h],c.hasOwnProperty(h)&&(m!=null||C!=null))switch(h){case"value":$=m;break;case"defaultValue":S=m;break;case"multiple":v=m;default:m!==C&&$e(n,a,h,m,c,C)}a=S,r=v,c=V,$!=null?Ba(n,!!r,$,!1):!!c!=!!r&&(a!=null?Ba(n,!!r,a,!0):Ba(n,!!r,r?[]:"",!1));return;case"textarea":V=$=null;for(S in r)if(h=r[S],r.hasOwnProperty(S)&&h!=null&&!c.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:$e(n,a,S,null,c,h)}for(v in c)if(h=c[v],m=r[v],c.hasOwnProperty(v)&&(h!=null||m!=null))switch(v){case"value":$=h;break;case"defaultValue":V=h;break;case"children":break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(i(91));break;default:h!==m&&$e(n,a,v,h,c,m)}b0(n,$,V);return;case"option":for(var ae in r)$=r[ae],r.hasOwnProperty(ae)&&$!=null&&!c.hasOwnProperty(ae)&&(ae==="selected"?n.selected=!1:$e(n,a,ae,null,c,$));for(C in c)$=c[C],V=r[C],c.hasOwnProperty(C)&&$!==V&&($!=null||V!=null)&&(C==="selected"?n.selected=$&&typeof $!="function"&&typeof $!="symbol":$e(n,a,C,$,c,V));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var he in r)$=r[he],r.hasOwnProperty(he)&&$!=null&&!c.hasOwnProperty(he)&&$e(n,a,he,null,c,$);for(P in c)if($=c[P],V=r[P],c.hasOwnProperty(P)&&$!==V&&($!=null||V!=null))switch(P){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(i(137,a));break;default:$e(n,a,P,$,c,V)}return;default:if(Uu(a)){for(var Be in r)$=r[Be],r.hasOwnProperty(Be)&&$!==void 0&&!c.hasOwnProperty(Be)&&wh(n,a,Be,void 0,c,$);for(H in c)$=c[H],V=r[H],!c.hasOwnProperty(H)||$===V||$===void 0&&V===void 0||wh(n,a,H,$,c,V);return}}for(var U in r)$=r[U],r.hasOwnProperty(U)&&$!=null&&!c.hasOwnProperty(U)&&$e(n,a,U,null,c,$);for(Y in c)$=c[Y],V=r[Y],!c.hasOwnProperty(Y)||$===V||$==null&&V==null||$e(n,a,Y,$,c,V)}function Sx(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function B_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,r=performance.getEntriesByType("resource"),c=0;c<r.length;c++){var h=r[c],m=h.transferSize,v=h.initiatorType,S=h.duration;if(m&&S&&Sx(v)){for(v=0,S=h.responseEnd,c+=1;c<r.length;c++){var C=r[c],P=C.startTime;if(P>S)break;var H=C.transferSize,Y=C.initiatorType;H&&Sx(Y)&&(C=C.responseEnd,v+=H*(C<S?1:(S-P)/(C-P)))}if(--c,a+=8*(m+v)/(h.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}var jh=null,Sh=null;function qo(n){return n.nodeType===9?n:n.ownerDocument}function _x(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Nx(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}function _h(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Nh=null;function V_(){var n=window.event;return n&&n.type==="popstate"?n===Nh?!1:(Nh=n,!0):(Nh=null,!1)}var Tx=typeof setTimeout=="function"?setTimeout:void 0,q_=typeof clearTimeout=="function"?clearTimeout:void 0,kx=typeof Promise=="function"?Promise:void 0,H_=typeof queueMicrotask=="function"?queueMicrotask:typeof kx<"u"?function(n){return kx.resolve(null).then(n).catch(I_)}:Tx;function I_(n){setTimeout(function(){throw n})}function Ms(n){return n==="head"}function Ex(n,a){var r=a,c=0;do{var h=r.nextSibling;if(n.removeChild(r),h&&h.nodeType===8)if(r=h.data,r==="/$"||r==="/&"){if(c===0){n.removeChild(h),yi(a);return}c--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")c++;else if(r==="html")Dr(n.ownerDocument.documentElement);else if(r==="head"){r=n.ownerDocument.head,Dr(r);for(var m=r.firstChild;m;){var v=m.nextSibling,S=m.nodeName;m[Wi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&m.rel.toLowerCase()==="stylesheet"||r.removeChild(m),m=v}}else r==="body"&&Dr(n.ownerDocument.body);r=h}while(r);yi(a)}function Ax(n,a){var r=n;n=0;do{var c=r.nextSibling;if(r.nodeType===1?a?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(a?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),c&&c.nodeType===8)if(r=c.data,r==="/$"){if(n===0)break;n--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||n++;r=c}while(r)}function Th(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var r=a;switch(a=a.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":Th(r),Ru(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}n.removeChild(r)}}function G_(n,a,r,c){for(;n.nodeType===1;){var h=r;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!c&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(c){if(!n[Wi])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(m=n.getAttribute("rel"),m==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(m!==h.rel||n.getAttribute("href")!==(h.href==null||h.href===""?null:h.href)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin)||n.getAttribute("title")!==(h.title==null?null:h.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(m=n.getAttribute("src"),(m!==(h.src==null?null:h.src)||n.getAttribute("type")!==(h.type==null?null:h.type)||n.getAttribute("crossorigin")!==(h.crossOrigin==null?null:h.crossOrigin))&&m&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var m=h.name==null?null:""+h.name;if(h.type==="hidden"&&n.getAttribute("name")===m)return n}else return n;if(n=fn(n.nextSibling),n===null)break}return null}function K_(n,a,r){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!r||(n=fn(n.nextSibling),n===null))return null;return n}function Cx(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=fn(n.nextSibling),n===null))return null;return n}function kh(n){return n.data==="$?"||n.data==="$~"}function Eh(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}function Y_(n,a){var r=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||r.readyState!=="loading")a();else{var c=function(){a(),r.removeEventListener("DOMContentLoaded",c)};r.addEventListener("DOMContentLoaded",c),n._reactRetry=c}}function fn(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}var Ah=null;function Rx(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var r=n.data;if(r==="/$"||r==="/&"){if(a===0)return fn(n.nextSibling);a--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||a++}n=n.nextSibling}return null}function Ox(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var r=n.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(a===0)return n;a--}else r!=="/$"&&r!=="/&"||a++}n=n.previousSibling}return null}function Dx(n,a,r){switch(a=qo(r),n){case"html":if(n=a.documentElement,!n)throw Error(i(452));return n;case"head":if(n=a.head,!n)throw Error(i(453));return n;case"body":if(n=a.body,!n)throw Error(i(454));return n;default:throw Error(i(451))}}function Dr(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);Ru(n)}var mn=new Map,Mx=new Set;function Ho(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}var as=X.d;X.d={f:F_,r:X_,D:J_,C:W_,L:Q_,m:Z_,X:t4,S:e4,M:n4};function F_(){var n=as.f(),a=Mo();return n||a}function X_(n){var a=za(n);a!==null&&a.tag===5&&a.type==="form"?Wp(a):as.r(n)}var pi=typeof document>"u"?null:document;function Ux(n,a,r){var c=pi;if(c&&typeof a=="string"&&a){var h=rn(a);h='link[rel="'+n+'"][href="'+h+'"]',typeof r=="string"&&(h+='[crossorigin="'+r+'"]'),Mx.has(h)||(Mx.add(h),n={rel:n,crossOrigin:r,href:a},c.querySelector(h)===null&&(a=c.createElement("link"),bt(a,"link",n),dt(a),c.head.appendChild(a)))}}function J_(n){as.D(n),Ux("dns-prefetch",n,null)}function W_(n,a){as.C(n,a),Ux("preconnect",n,a)}function Q_(n,a,r){as.L(n,a,r);var c=pi;if(c&&n&&a){var h='link[rel="preload"][as="'+rn(a)+'"]';a==="image"&&r&&r.imageSrcSet?(h+='[imagesrcset="'+rn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(h+='[imagesizes="'+rn(r.imageSizes)+'"]')):h+='[href="'+rn(n)+'"]';var m=h;switch(a){case"style":m=gi(n);break;case"script":m=xi(n)}mn.has(m)||(n=y({rel:"preload",href:a==="image"&&r&&r.imageSrcSet?void 0:n,as:a},r),mn.set(m,n),c.querySelector(h)!==null||a==="style"&&c.querySelector(Mr(m))||a==="script"&&c.querySelector(Ur(m))||(a=c.createElement("link"),bt(a,"link",n),dt(a),c.head.appendChild(a)))}}function Z_(n,a){as.m(n,a);var r=pi;if(r&&n){var c=a&&typeof a.as=="string"?a.as:"script",h='link[rel="modulepreload"][as="'+rn(c)+'"][href="'+rn(n)+'"]',m=h;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":m=xi(n)}if(!mn.has(m)&&(n=y({rel:"modulepreload",href:n},a),mn.set(m,n),r.querySelector(h)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(Ur(m)))return}c=r.createElement("link"),bt(c,"link",n),dt(c),r.head.appendChild(c)}}}function e4(n,a,r){as.S(n,a,r);var c=pi;if(c&&n){var h=Pa(c).hoistableStyles,m=gi(n);a=a||"default";var v=h.get(m);if(!v){var S={loading:0,preload:null};if(v=c.querySelector(Mr(m)))S.loading=5;else{n=y({rel:"stylesheet",href:n,"data-precedence":a},r),(r=mn.get(m))&&Ch(n,r);var C=v=c.createElement("link");dt(C),bt(C,"link",n),C._p=new Promise(function(P,H){C.onload=P,C.onerror=H}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Io(v,a,c)}v={type:"stylesheet",instance:v,count:1,state:S},h.set(m,v)}}}function t4(n,a){as.X(n,a);var r=pi;if(r&&n){var c=Pa(r).hoistableScripts,h=xi(n),m=c.get(h);m||(m=r.querySelector(Ur(h)),m||(n=y({src:n,async:!0},a),(a=mn.get(h))&&Rh(n,a),m=r.createElement("script"),dt(m),bt(m,"link",n),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(h,m))}}function n4(n,a){as.M(n,a);var r=pi;if(r&&n){var c=Pa(r).hoistableScripts,h=xi(n),m=c.get(h);m||(m=r.querySelector(Ur(h)),m||(n=y({src:n,async:!0,type:"module"},a),(a=mn.get(h))&&Rh(n,a),m=r.createElement("script"),dt(m),bt(m,"link",n),r.head.appendChild(m)),m={type:"script",instance:m,count:1,state:null},c.set(h,m))}}function Lx(n,a,r,c){var h=(h=we.current)?Ho(h):null;if(!h)throw Error(i(446));switch(n){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(a=gi(r.href),r=Pa(h).hoistableStyles,c=r.get(a),c||(c={type:"style",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){n=gi(r.href);var m=Pa(h).hoistableStyles,v=m.get(n);if(v||(h=h.ownerDocument||h,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},m.set(n,v),(m=h.querySelector(Mr(n)))&&!m._p&&(v.instance=m,v.state.loading=5),mn.has(n)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},mn.set(n,r),m||s4(h,n,r,v.state))),a&&c===null)throw Error(i(528,""));return v}if(a&&c!==null)throw Error(i(529,""));return null;case"script":return a=r.async,r=r.src,typeof r=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=xi(r),r=Pa(h).hoistableScripts,c=r.get(a),c||(c={type:"script",instance:null,count:0,state:null},r.set(a,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,n))}}function gi(n){return'href="'+rn(n)+'"'}function Mr(n){return'link[rel="stylesheet"]['+n+"]"}function zx(n){return y({},n,{"data-precedence":n.precedence,precedence:null})}function s4(n,a,r,c){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?c.loading=1:(a=n.createElement("link"),c.preload=a,a.addEventListener("load",function(){return c.loading|=1}),a.addEventListener("error",function(){return c.loading|=2}),bt(a,"link",r),dt(a),n.head.appendChild(a))}function xi(n){return'[src="'+rn(n)+'"]'}function Ur(n){return"script[async]"+n}function Px(n,a,r){if(a.count++,a.instance===null)switch(a.type){case"style":var c=n.querySelector('style[data-href~="'+rn(r.href)+'"]');if(c)return a.instance=c,dt(c),c;var h=y({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return c=(n.ownerDocument||n).createElement("style"),dt(c),bt(c,"style",h),Io(c,r.precedence,n),a.instance=c;case"stylesheet":h=gi(r.href);var m=n.querySelector(Mr(h));if(m)return a.state.loading|=4,a.instance=m,dt(m),m;c=zx(r),(h=mn.get(h))&&Ch(c,h),m=(n.ownerDocument||n).createElement("link"),dt(m);var v=m;return v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),bt(m,"link",c),a.state.loading|=4,Io(m,r.precedence,n),a.instance=m;case"script":return m=xi(r.src),(h=n.querySelector(Ur(m)))?(a.instance=h,dt(h),h):(c=r,(h=mn.get(m))&&(c=y({},r),Rh(c,h)),n=n.ownerDocument||n,h=n.createElement("script"),dt(h),bt(h,"link",c),n.head.appendChild(h),a.instance=h);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(c=a.instance,a.state.loading|=4,Io(c,r.precedence,n));return a.instance}function Io(n,a,r){for(var c=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),h=c.length?c[c.length-1]:null,m=h,v=0;v<c.length;v++){var S=c[v];if(S.dataset.precedence===a)m=S;else if(m!==h)break}m?m.parentNode.insertBefore(n,m.nextSibling):(a=r.nodeType===9?r.head:r,a.insertBefore(n,a.firstChild))}function Ch(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.title==null&&(n.title=a.title)}function Rh(n,a){n.crossOrigin==null&&(n.crossOrigin=a.crossOrigin),n.referrerPolicy==null&&(n.referrerPolicy=a.referrerPolicy),n.integrity==null&&(n.integrity=a.integrity)}var Go=null;function $x(n,a,r){if(Go===null){var c=new Map,h=Go=new Map;h.set(r,c)}else h=Go,c=h.get(r),c||(c=new Map,h.set(r,c));if(c.has(n))return c;for(c.set(n,null),r=r.getElementsByTagName(n),h=0;h<r.length;h++){var m=r[h];if(!(m[Wi]||m[pt]||n==="link"&&m.getAttribute("rel")==="stylesheet")&&m.namespaceURI!=="http://www.w3.org/2000/svg"){var v=m.getAttribute(a)||"";v=n+v;var S=c.get(v);S?S.push(m):c.set(v,[m])}}return c}function Bx(n,a,r){n=n.ownerDocument||n,n.head.insertBefore(r,a==="title"?n.querySelector("head > title"):null)}function a4(n,a,r){if(r===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(n=a.disabled,typeof a.precedence=="string"&&n==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Vx(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function i4(n,a,r,c){if(r.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var h=gi(c.href),m=a.querySelector(Mr(h));if(m){a=m._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Ko.bind(n),a.then(n,n)),r.state.loading|=4,r.instance=m,dt(m);return}m=a.ownerDocument||a,c=zx(c),(h=mn.get(h))&&Ch(c,h),m=m.createElement("link"),dt(m);var v=m;v._p=new Promise(function(S,C){v.onload=S,v.onerror=C}),bt(m,"link",c),r.instance=m}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(r,a),(a=r.state.preload)&&(r.state.loading&3)===0&&(n.count++,r=Ko.bind(n),a.addEventListener("load",r),a.addEventListener("error",r))}}var Oh=0;function r4(n,a){return n.stylesheets&&n.count===0&&Fo(n,n.stylesheets),0<n.count||0<n.imgCount?function(r){var c=setTimeout(function(){if(n.stylesheets&&Fo(n,n.stylesheets),n.unsuspend){var m=n.unsuspend;n.unsuspend=null,m()}},6e4+a);0<n.imgBytes&&Oh===0&&(Oh=62500*B_());var h=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&Fo(n,n.stylesheets),n.unsuspend)){var m=n.unsuspend;n.unsuspend=null,m()}},(n.imgBytes>Oh?50:800)+a);return n.unsuspend=r,function(){n.unsuspend=null,clearTimeout(c),clearTimeout(h)}}:null}function Ko(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fo(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Yo=null;function Fo(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Yo=new Map,a.forEach(l4,n),Yo=null,Ko.call(n))}function l4(n,a){if(!(a.state.loading&4)){var r=Yo.get(n);if(r)var c=r.get(null);else{r=new Map,Yo.set(n,r);for(var h=n.querySelectorAll("link[data-precedence],style[data-precedence]"),m=0;m<h.length;m++){var v=h[m];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(r.set(v.dataset.precedence,v),c=v)}c&&r.set(null,c)}h=a.instance,v=h.getAttribute("data-precedence"),m=r.get(v)||c,m===c&&r.set(null,h),r.set(v,h),this.count++,c=Ko.bind(this),h.addEventListener("load",c),h.addEventListener("error",c),m?m.parentNode.insertBefore(h,m.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(h,n.firstChild)),a.state.loading|=4}}var Lr={$$typeof:M,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function o4(n,a,r,c,h,m,v,S,C){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ku(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ku(0),this.hiddenUpdates=ku(null),this.identifierPrefix=c,this.onUncaughtError=h,this.onCaughtError=m,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function qx(n,a,r,c,h,m,v,S,C,P,H,Y){return n=new o4(n,a,r,v,C,P,H,Y,S),a=1,m===!0&&(a|=24),m=Ft(3,null,null,a),n.current=m,m.stateNode=n,a=dd(),a.refCount++,n.pooledCache=a,a.refCount++,m.memoizedState={element:c,isDehydrated:r,cache:a},pd(m),n}function Hx(n){return n?(n=Fa,n):Fa}function Ix(n,a,r,c,h,m){h=Hx(h),c.context===null?c.context=h:c.pendingContext=h,c=Ss(a),c.payload={element:r},m=m===void 0?null:m,m!==null&&(c.callback=m),r=_s(n,c,a),r!==null&&(Vt(r,n,a),mr(r,n,a))}function Gx(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var r=n.retryLane;n.retryLane=r!==0&&r<a?r:a}}function Dh(n,a){Gx(n,a),(n=n.alternate)&&Gx(n,a)}function Kx(n){if(n.tag===13||n.tag===31){var a=ta(n,67108864);a!==null&&Vt(a,n,67108864),Dh(n,67108864)}}function Yx(n){if(n.tag===13||n.tag===31){var a=Zt();a=Eu(a);var r=ta(n,a);r!==null&&Vt(r,n,a),Dh(n,a)}}var Xo=!0;function c4(n,a,r,c){var h=B.T;B.T=null;var m=X.p;try{X.p=2,Mh(n,a,r,c)}finally{X.p=m,B.T=h}}function u4(n,a,r,c){var h=B.T;B.T=null;var m=X.p;try{X.p=8,Mh(n,a,r,c)}finally{X.p=m,B.T=h}}function Mh(n,a,r,c){if(Xo){var h=Uh(c);if(h===null)vh(n,a,c,Jo,r),Xx(n,c);else if(h4(h,n,a,r,c))c.stopPropagation();else if(Xx(n,c),a&4&&-1<d4.indexOf(n)){for(;h!==null;){var m=za(h);if(m!==null)switch(m.tag){case 3:if(m=m.stateNode,m.current.memoizedState.isDehydrated){var v=Js(m.pendingLanes);if(v!==0){var S=m;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var C=1<<31-Kt(v);S.entanglements[1]|=C,v&=~C}Dn(m),(De&6)===0&&(Oo=It()+500,Cr(0))}}break;case 31:case 13:S=ta(m,2),S!==null&&Vt(S,m,2),Mo(),Dh(m,2)}if(m=Uh(c),m===null&&vh(n,a,c,Jo,r),m===h)break;h=m}h!==null&&c.stopPropagation()}else vh(n,a,c,null,r)}}function Uh(n){return n=zu(n),Lh(n)}var Jo=null;function Lh(n){if(Jo=null,n=La(n),n!==null){var a=u(n);if(a===null)n=null;else{var r=a.tag;if(r===13){if(n=d(a),n!==null)return n;n=null}else if(r===31){if(n=f(a),n!==null)return n;n=null}else if(r===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return Jo=n,null}function Fx(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Jj()){case n0:return 2;case s0:return 8;case Pl:case Wj:return 32;case a0:return 268435456;default:return 32}default:return 32}}var zh=!1,Us=null,Ls=null,zs=null,zr=new Map,Pr=new Map,Ps=[],d4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Xx(n,a){switch(n){case"focusin":case"focusout":Us=null;break;case"dragenter":case"dragleave":Ls=null;break;case"mouseover":case"mouseout":zs=null;break;case"pointerover":case"pointerout":zr.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pr.delete(a.pointerId)}}function $r(n,a,r,c,h,m){return n===null||n.nativeEvent!==m?(n={blockedOn:a,domEventName:r,eventSystemFlags:c,nativeEvent:m,targetContainers:[h]},a!==null&&(a=za(a),a!==null&&Kx(a)),n):(n.eventSystemFlags|=c,a=n.targetContainers,h!==null&&a.indexOf(h)===-1&&a.push(h),n)}function h4(n,a,r,c,h){switch(a){case"focusin":return Us=$r(Us,n,a,r,c,h),!0;case"dragenter":return Ls=$r(Ls,n,a,r,c,h),!0;case"mouseover":return zs=$r(zs,n,a,r,c,h),!0;case"pointerover":var m=h.pointerId;return zr.set(m,$r(zr.get(m)||null,n,a,r,c,h)),!0;case"gotpointercapture":return m=h.pointerId,Pr.set(m,$r(Pr.get(m)||null,n,a,r,c,h)),!0}return!1}function Jx(n){var a=La(n.target);if(a!==null){var r=u(a);if(r!==null){if(a=r.tag,a===13){if(a=d(r),a!==null){n.blockedOn=a,u0(n.priority,function(){Yx(r)});return}}else if(a===31){if(a=f(r),a!==null){n.blockedOn=a,u0(n.priority,function(){Yx(r)});return}}else if(a===3&&r.stateNode.current.memoizedState.isDehydrated){n.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Wo(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var r=Uh(n.nativeEvent);if(r===null){r=n.nativeEvent;var c=new r.constructor(r.type,r);Lu=c,r.target.dispatchEvent(c),Lu=null}else return a=za(r),a!==null&&Kx(a),n.blockedOn=r,!1;a.shift()}return!0}function Wx(n,a,r){Wo(n)&&r.delete(a)}function f4(){zh=!1,Us!==null&&Wo(Us)&&(Us=null),Ls!==null&&Wo(Ls)&&(Ls=null),zs!==null&&Wo(zs)&&(zs=null),zr.forEach(Wx),Pr.forEach(Wx)}function Qo(n,a){n.blockedOn===a&&(n.blockedOn=null,zh||(zh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,f4)))}var Zo=null;function Qx(n){Zo!==n&&(Zo=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Zo===n&&(Zo=null);for(var a=0;a<n.length;a+=3){var r=n[a],c=n[a+1],h=n[a+2];if(typeof c!="function"){if(Lh(c||r)===null)continue;break}var m=za(r);m!==null&&(n.splice(a,3),a-=3,Ud(m,{pending:!0,data:h,method:r.method,action:c},c,h))}}))}function yi(n){function a(C){return Qo(C,n)}Us!==null&&Qo(Us,n),Ls!==null&&Qo(Ls,n),zs!==null&&Qo(zs,n),zr.forEach(a),Pr.forEach(a);for(var r=0;r<Ps.length;r++){var c=Ps[r];c.blockedOn===n&&(c.blockedOn=null)}for(;0<Ps.length&&(r=Ps[0],r.blockedOn===null);)Jx(r),r.blockedOn===null&&Ps.shift();if(r=(n.ownerDocument||n).$$reactFormReplay,r!=null)for(c=0;c<r.length;c+=3){var h=r[c],m=r[c+1],v=h[Ut]||null;if(typeof m=="function")v||Qx(r);else if(v){var S=null;if(m&&m.hasAttribute("formAction")){if(h=m,v=m[Ut]||null)S=v.formAction;else if(Lh(h)!==null)continue}else S=v.action;typeof S=="function"?r[c+1]=S:(r.splice(c,3),c-=3),Qx(r)}}}function Zx(){function n(m){m.canIntercept&&m.info==="react-transition"&&m.intercept({handler:function(){return new Promise(function(v){return h=v})},focusReset:"manual",scroll:"manual"})}function a(){h!==null&&(h(),h=null),c||setTimeout(r,20)}function r(){if(!c&&!navigation.transition){var m=navigation.currentEntry;m&&m.url!=null&&navigation.navigate(m.url,{state:m.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,h=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(r,100),function(){c=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),h!==null&&(h(),h=null)}}}function Ph(n){this._internalRoot=n}ec.prototype.render=Ph.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(i(409));var r=a.current,c=Zt();Ix(r,c,n,a,null,null)},ec.prototype.unmount=Ph.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;Ix(n.current,2,null,n,null,null),Mo(),a[Ua]=null}};function ec(n){this._internalRoot=n}ec.prototype.unstable_scheduleHydration=function(n){if(n){var a=c0();n={blockedOn:null,target:n,priority:a};for(var r=0;r<Ps.length&&a!==0&&a<Ps[r].priority;r++);Ps.splice(r,0,n),r===0&&Jx(n)}};var ey=e.version;if(ey!=="19.2.6")throw Error(i(527,ey,"19.2.6"));X.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(i(188)):(n=Object.keys(n).join(","),Error(i(268,n)));return n=p(a),n=n!==null?x(n):null,n=n===null?null:n.stateNode,n};var m4={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var tc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tc.isDisabled&&tc.supportsFiber)try{Fi=tc.inject(m4),Gt=tc}catch{}}return Vr.createRoot=function(n,a){if(!l(n))throw Error(i(299));var r=!1,c="",h=lg,m=og,v=cg;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(h=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(v=a.onRecoverableError)),a=qx(n,1,!1,null,null,r,c,null,h,m,v,Zx),n[Ua]=a.current,bh(n),new Ph(a)},Vr.hydrateRoot=function(n,a,r){if(!l(n))throw Error(i(299));var c=!1,h="",m=lg,v=og,S=cg,C=null;return r!=null&&(r.unstable_strictMode===!0&&(c=!0),r.identifierPrefix!==void 0&&(h=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(v=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError),r.formState!==void 0&&(C=r.formState)),a=qx(n,1,!0,a,r??null,c,h,C,m,v,S,Zx),a.context=Hx(null),r=a.current,c=Zt(),c=Eu(c),h=Ss(c),h.callback=null,_s(r,h,c),r=c,a.current.lanes=r,Ji(a,r),Dn(a),n[Ua]=a.current,bh(n),new ec(a)},Vr.version="19.2.6",Vr}var uy;function _4(){if(uy)return Vh.exports;uy=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),Vh.exports=S4(),Vh.exports}var N4=_4();const um=A.createContext({});function Aa(t){const e=A.useRef(null);return e.current===null&&(e.current=t()),e.current}const T4=typeof window<"u",zi=T4?A.useLayoutEffect:A.useEffect,nu=A.createContext(null);function dm(t,e){t.indexOf(e)===-1&&t.push(e)}function kc(t,e){const s=t.indexOf(e);s>-1&&t.splice(s,1)}const ms=(t,e,s)=>s>e?e:s<t?t:s;let su=()=>{};const fs={},hm=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Pv=t=>typeof t=="object"&&t!==null,fm=t=>/^0[^.\s]+$/u.test(t);function $v(t){let e;return()=>(e===void 0&&(e=t()),e)}const kn=t=>t,_l=(...t)=>t.reduce((e,s)=>i=>s(e(i))),il=(t,e,s)=>{const i=e-t;return i?(s-t)/i:1};class Ec{constructor(){this.subscriptions=[]}add(e){return dm(this.subscriptions,e),()=>this.remove(e)}remove(e){kc(this.subscriptions,e)}notify(e,s,i){const l=this.subscriptions.length;if(l)if(l===1)this.subscriptions[0](e,s,i);else for(let u=0;u<l;u++){const d=this.subscriptions[u];d&&d(e,s,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const xn=t=>t*1e3,gn=t=>t/1e3,Bv=(t,e)=>e?t*(1e3/e):0,Vv=(t,e,s)=>(((1-3*s+3*e)*t+(3*s-6*e))*t+3*e)*t,k4=1e-7,E4=12;function A4(t,e,s,i,l){let u,d,f=0;do d=e+(s-e)/2,u=Vv(d,i,l)-t,u>0?s=d:e=d;while(Math.abs(u)>k4&&++f<E4);return d}function Nl(t,e,s,i){if(t===e&&s===i)return kn;const l=u=>A4(u,0,1,t,s);return u=>u===0||u===1?u:Vv(l(u),e,i)}const qv=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Hv=t=>e=>1-t(1-e),Iv=Nl(.33,1.53,.69,.99),mm=Hv(Iv),Gv=qv(mm),Kv=t=>t>=1?1:(t*=2)<1?.5*mm(t):.5*(2-Math.pow(2,-10*(t-1))),pm=t=>1-Math.sin(Math.acos(t)),Yv=Hv(pm),Fv=qv(pm),C4=Nl(.42,0,1,1),R4=Nl(0,0,.58,1),gm=Nl(.42,0,.58,1),O4=t=>Array.isArray(t)&&typeof t[0]!="number",Xv=t=>Array.isArray(t)&&typeof t[0]=="number",D4={linear:kn,easeIn:C4,easeInOut:gm,easeOut:R4,circIn:pm,circInOut:Fv,circOut:Yv,backIn:mm,backInOut:Gv,backOut:Iv,anticipate:Kv},M4=t=>typeof t=="string",dy=t=>{if(Xv(t)){su(t.length===4);const[e,s,i,l]=t;return Nl(e,s,i,l)}else if(M4(t))return D4[t];return t},lt={delta:0,timestamp:0,isProcessing:!1};let pc;function U4(){pc=void 0}const mt={now:()=>(pc===void 0&&mt.set(lt.isProcessing||fs.useManualTiming?lt.timestamp:performance.now()),pc),set:t=>{pc=t,queueMicrotask(U4)}},Ri=t=>Math.round(t*1e5)/1e5,Jv=t=>e=>typeof e=="string"&&e.startsWith(t),Wv=Jv("--"),L4=Jv("var(--"),xm=t=>L4(t)?z4.test(t.split("/*")[0].trim()):!1,z4=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function hy(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const qi={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},rl={...qi,transform:t=>ms(0,1,t)},nc={...qi,default:1},ym=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function P4(t){return t==null}const $4=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,bm=(t,e)=>s=>!!(typeof s=="string"&&$4.test(s)&&s.startsWith(t)||e&&!P4(s)&&Object.prototype.hasOwnProperty.call(s,e)),Qv=(t,e,s)=>i=>{if(typeof i!="string")return i;const[l,u,d,f]=i.match(ym);return{[t]:parseFloat(l),[e]:parseFloat(u),[s]:parseFloat(d),alpha:f!==void 0?parseFloat(f):1}},B4=t=>ms(0,255,t),Gh={...qi,transform:t=>Math.round(B4(t))},ba={test:bm("rgb","red"),parse:Qv("red","green","blue"),transform:({red:t,green:e,blue:s,alpha:i=1})=>"rgba("+Gh.transform(t)+", "+Gh.transform(e)+", "+Gh.transform(s)+", "+Ri(rl.transform(i))+")"};function V4(t){let e="",s="",i="",l="";return t.length>5?(e=t.substring(1,3),s=t.substring(3,5),i=t.substring(5,7),l=t.substring(7,9)):(e=t.substring(1,2),s=t.substring(2,3),i=t.substring(3,4),l=t.substring(4,5),e+=e,s+=s,i+=i,l+=l),{red:parseInt(e,16),green:parseInt(s,16),blue:parseInt(i,16),alpha:l?parseInt(l,16)/255:1}}const xf={test:bm("#"),parse:V4,transform:ba.transform},Tl=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),rs=Tl("deg"),Pn=Tl("%"),ie=Tl("px"),q4=Tl("vh"),H4=Tl("vw"),fy={...Pn,parse:t=>Pn.parse(t)/100,transform:t=>Pn.transform(t*100)},ki={test:bm("hsl","hue"),parse:Qv("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:s,alpha:i=1})=>"hsla("+Math.round(t)+", "+Pn.transform(Ri(e))+", "+Pn.transform(Ri(s))+", "+Ri(rl.transform(i))+")"},ot={test:t=>ba.test(t)||xf.test(t)||ki.test(t),parse:t=>ba.test(t)?ba.parse(t):ki.test(t)?ki.parse(t):xf.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ba.transform(t):ki.transform(t),getAnimatableNone:t=>{const e=ot.parse(t);return e.alpha=0,ot.transform(e)}},I4=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Zv=new RegExp(ym.source),e1=new RegExp(I4.source,"i");function G4(t){return isNaN(t)&&typeof t=="string"&&(Zv.test(t)||e1.test(t))}const t1="number",n1="color",K4="var",Y4="var(",my="${}",F4=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function X4(t){const e=t.toString();return Zv.test(e)||e1.test(e)}function ll(t){const e=t.toString(),s=[],i={color:[],number:[],var:[]},l=[];let u=0;const f=e.replace(F4,g=>(ot.test(g)?(i.color.push(u),l.push(n1),s.push(ot.parse(g))):g.startsWith(Y4)?(i.var.push(u),l.push(K4),s.push(g)):(i.number.push(u),l.push(t1),s.push(parseFloat(g))),++u,my)).split(my);return{values:s,split:f,indexes:i,types:l}}function J4(t){return ll(t).values}function s1({split:t,types:e}){const s=t.length;return i=>{let l="";for(let u=0;u<s;u++)if(l+=t[u],i[u]!==void 0){const d=e[u];d===t1?l+=Ri(i[u]):d===n1?l+=ot.transform(i[u]):l+=i[u]}return l}}function W4(t){return s1(ll(t))}const Q4=t=>typeof t=="number"?0:ot.test(t)?ot.getAnimatableNone(t):t,Z4=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:Q4(t);function eN(t){const e=ll(t);return s1(e)(e.values.map((i,l)=>Z4(i,e.split[l])))}const nn={test:G4,parse:J4,createTransformer:W4,getAnimatableNone:eN};function Kh(t,e,s){return s<0&&(s+=1),s>1&&(s-=1),s<1/6?t+(e-t)*6*s:s<1/2?e:s<2/3?t+(e-t)*(2/3-s)*6:t}function tN({hue:t,saturation:e,lightness:s,alpha:i}){t/=360,e/=100,s/=100;let l=0,u=0,d=0;if(!e)l=u=d=s;else{const f=s<.5?s*(1+e):s+e-s*e,g=2*s-f;l=Kh(g,f,t+1/3),u=Kh(g,f,t),d=Kh(g,f,t-1/3)}return{red:Math.round(l*255),green:Math.round(u*255),blue:Math.round(d*255),alpha:i}}function Ac(t,e){return s=>s>0?e:t}const Ve=(t,e,s)=>t+(e-t)*s,Yh=(t,e,s)=>{const i=t*t,l=s*(e*e-i)+i;return l<0?0:Math.sqrt(l)},nN=[xf,ba,ki],sN=t=>nN.find(e=>e.test(t));function py(t){const e=sN(t);if(!e)return!1;let s=e.parse(t);return e===ki&&(s=tN(s)),s}const gy=(t,e)=>{const s=py(t),i=py(e);if(!s||!i)return Ac(t,e);const l={...s};return u=>(l.red=Yh(s.red,i.red,u),l.green=Yh(s.green,i.green,u),l.blue=Yh(s.blue,i.blue,u),l.alpha=Ve(s.alpha,i.alpha,u),ba.transform(l))},yf=new Set(["none","hidden"]);function aN(t,e){return yf.has(t)?s=>s<=0?t:e:s=>s>=1?e:t}function iN(t,e){return s=>Ve(t,e,s)}function vm(t){return typeof t=="number"?iN:typeof t=="string"?xm(t)?Ac:ot.test(t)?gy:oN:Array.isArray(t)?a1:typeof t=="object"?ot.test(t)?gy:rN:Ac}function a1(t,e){const s=[...t],i=s.length,l=t.map((u,d)=>vm(u)(u,e[d]));return u=>{for(let d=0;d<i;d++)s[d]=l[d](u);return s}}function rN(t,e){const s={...t,...e},i={};for(const l in s)t[l]!==void 0&&e[l]!==void 0&&(i[l]=vm(t[l])(t[l],e[l]));return l=>{for(const u in i)s[u]=i[u](l);return s}}function lN(t,e){const s=[],i={color:0,var:0,number:0};for(let l=0;l<e.values.length;l++){const u=e.types[l],d=t.indexes[u][i[u]],f=t.values[d]??0;s[l]=f,i[u]++}return s}const oN=(t,e)=>{const s=nn.createTransformer(e),i=ll(t),l=ll(e);return i.indexes.var.length===l.indexes.var.length&&i.indexes.color.length===l.indexes.color.length&&i.indexes.number.length>=l.indexes.number.length?yf.has(t)&&!l.values.length||yf.has(e)&&!i.values.length?aN(t,e):_l(a1(lN(i,l),l.values),s):Ac(t,e)},xy=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function cN(t,e){const s=xy.exec(t);if(!s)return;const i=xy.exec(e);if(!i||s[2]!==i[2])return;const l=s[2],u=parseFloat(s[1]),d=parseFloat(i[1]);return f=>Ri(Ve(u,d,f))+l}function wm(t,e,s){if(typeof t=="number"&&typeof e=="number"&&typeof s=="number")return Ve(t,e,s);if(typeof t=="string"&&typeof e=="string"){const l=cN(t,e);if(l)return l}return vm(t)(t,e)}const sc=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function uN(t){let e=new Set,s=new Set,i=!1,l=!1;const u=new Set;let d={delta:0,timestamp:0,isProcessing:!1};function f(p){u.has(p)&&(s.add(p),t()),p(d)}const g={schedule:(p,x=!1,y=!1)=>{const w=y&&i?e:s;return x&&u.add(p),w.add(p),p},cancel:p=>{s.delete(p),u.delete(p)},process:p=>{if(d=p,i){l=!0;return}i=!0;const x=e;e=s,s=x,e.forEach(f),e.clear(),i=!1,l&&(l=!1,g.process(p))}};return g}const dN=40;function i1(t,e,s={delta:0,timestamp:0,isProcessing:!1}){let i=!1,l=!0;const u=()=>i=!0,d=sc.reduce((M,T)=>(M[T]=uN(u),M),{}),{setup:f,read:g,resolveKeyframes:p,preUpdate:x,update:y,preRender:b,render:w,postRender:j}=d,N=()=>{const M=fs.useManualTiming,T=M?s.timestamp:performance.now();i=!1,M||(s.delta=l?1e3/60:Math.max(Math.min(T-s.timestamp,dN),1)),s.timestamp=T,s.isProcessing=!0,f.process(s),g.process(s),p.process(s),x.process(s),y.process(s),b.process(s),w.process(s),j.process(s),s.isProcessing=!1,i&&e&&(l=!1,t(N))},_=()=>{i=!0,l=!0,s.isProcessing||t(N)};return{schedule:sc.reduce((M,T)=>{const F=d[T];return M[T]=(I,E=!1,L=!1)=>(i||_(),F.schedule(I,E,L)),M},{}),cancel:M=>{for(let T=0;T<sc.length;T++)d[sc[T]].cancel(M)},state:s,steps:d}}const{schedule:ze,cancel:$n,steps:Fh}=i1(typeof requestAnimationFrame<"u"?requestAnimationFrame:kn,!0,lt),hN=t=>{const e=({timestamp:s})=>t(s);return{start:(s=!0)=>ze.update(e,s),stop:()=>$n(e),now:()=>lt.isProcessing?lt.timestamp:mt.now()}},r1=(t,e,s=10)=>{let i="";const l=Math.max(Math.round(e/s),2);for(let u=0;u<l;u++)i+=Math.round(t(u/(l-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},jm=2e4;function Sm(t,e=50,s=jm,i){let l=0,u=t.next(l);for(;!u.done&&l<s;)l+=e,u=t.next(l);return l>=s?1/0:l}function fN(t,e=100,s){const i=s({...t,keyframes:[0,e]}),l=Math.min(Sm(i),jm);return{type:"keyframes",ease:u=>i.next(l*u).value/e,duration:gn(l)}}const jt={stiffness:100,damping:10,mass:1,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05},l1=t=>t<0?1/Math.max(1+t,jt.minDamping):Math.max(1-t,jt.minDamping);function o1(t,e){if(!(t>1))return 1;const s=Math.sqrt(t*t-1),i=t-s,l=t+s,u=2*s*Math.exp(-e)*(1+e);return c1(d=>l*Math.exp(-i*d)-i*Math.exp(-l*d)-u,d=>Math.exp(-l*d)-Math.exp(-i*d),e)/e}function bf(t,e){return t*Math.sqrt(1-e*e)}const mN=12;function c1(t,e,s){let i=s;for(let l=1;l<mN;l++)i=i-t(i)/e(i);return i}const Xh=.001;function pN({duration:t=jt.duration,bounce:e=jt.bounce}){let s,i;const l=l1(e);t=ms(jt.minDuration,jt.maxDuration,gn(t)),l<1?(s=p=>{const x=p*l,y=x*t,b=bf(p,l),w=Math.exp(-y);return Xh-x/b*w},i=p=>{const y=p*l*t,b=l*l*p*p*t,w=Math.exp(-y),j=bf(p*p,l);return(-s(p)+Xh>0?-1:1)*-b*w/j}):(s=p=>{const x=Math.exp(-p*t),y=p*t+1;return-Xh+x*y},i=p=>{const x=Math.exp(-p*t),y=-p*(t*t);return x*y});const u=5/t,d=c1(s,i,u),f=d*o1(l,d*t),g=f*f;return{stiffness:g,damping:l*2*Math.sqrt(g),duration:xn(t)}}const vf=(t,e)=>(e?t>=0:t>0)&&t<1/0;function Jh(t,e){if(vf(t,e))return t}function gN(t){const e=Jh(t.stiffness),s=Jh(t.damping,!0),i=Jh(t.mass),l={...t,stiffness:e??jt.stiffness,damping:s??jt.damping,mass:i??jt.mass,isResolvedFromDuration:!1,isTimeDefined:(e??s??i)===void 0&&(t.duration!==void 0||t.bounce!==void 0)};if(l.isTimeDefined){if(t.visualDuration){const u=l1(t.bounce||0),d=2*Math.PI/(t.visualDuration*1.2)*o1(u,2*Math.PI/1.2);l.stiffness=d*d,l.damping=2*u*Math.sqrt(l.stiffness)}else Object.assign(l,pN(l)),l.isResolvedFromDuration=!0;(!vf(l.stiffness)||!vf(l.damping,!0))&&(l.stiffness=jt.stiffness,l.damping=jt.damping)}return l}function ol(t=jt.visualDuration,e=jt.bounce){const s=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t,i=s.keyframes[0],l=s.keyframes[s.keyframes.length-1],u={done:!1,value:i},{stiffness:d,damping:f,mass:g,duration:p,isResolvedFromDuration:x,isTimeDefined:y}=gN({...s}),b=E=>y?0:-gn(E),w=f/(2*Math.sqrt(d*g)),j=gn(Math.sqrt(d/g)),N=w*j,_={target:l,delta:l-i,velocity:b(s.velocity||0)||0,restSpeed:0,restDelta:0},k=()=>{const E=Math.abs(_.delta)<5;_.restSpeed=s.restSpeed||(E?jt.restSpeed.granular:jt.restSpeed.default),_.restDelta=s.restDelta||(E?jt.restDelta.granular:jt.restDelta.default)};k();let R,M,T;if(w<1){const E=bf(j,w),L={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};T=()=>{L.A=(_.velocity+N*_.delta)/E,L.sinC=N*L.A+_.delta*E,L.cosC=N*_.delta-L.A*E};const q=G=>{G!==L.t&&(L.t=G,L.env=Math.exp(-N*G),L.sin=Math.sin(E*G),L.cos=Math.cos(E*G))};R=G=>(q(G),_.target-L.env*(L.A*L.sin+_.delta*L.cos)),M=G=>(q(G),L.env*(L.sinC*L.sin+L.cosC*L.cos))}else if(w===1){R=L=>_.target-Math.exp(-j*L)*(_.delta+(_.velocity+j*_.delta)*L);const E={C:0};T=()=>{E.C=_.velocity+j*_.delta},M=L=>Math.exp(-j*L)*(j*E.C*L-_.velocity)}else{const E=j*Math.sqrt(w*w-1),L=N-E,q=N+E,G=y?1/0:300/E,me=(Ce,ut)=>Math.exp(ut>G?-Ce*G-N*(ut-G):-Ce*ut),xe={S:0,F:0};T=()=>{const Ce=(_.velocity+N*_.delta)/E;xe.S=(_.delta+Ce)/2,xe.F=(_.delta-Ce)/2},R=Ce=>_.target-xe.S*me(L,Ce)-xe.F*me(q,Ce),M=Ce=>L*xe.S*me(L,Ce)+q*xe.F*me(q,Ce)}T();const F=x&&p||null,I={calculatedDuration:F,retarget:(E,L)=>{_.target=E[E.length-1],_.delta=_.target-E[0],_.velocity=b(L),s.restSpeed&&s.restDelta||k(),I.calculatedDuration=F,u.done=!1,T()},velocity:E=>xn(M(E)),next:E=>{const L=R(E);if(x)u.done=E>=p;else{const q=xn(M(E));u.done=Math.abs(q)<=_.restSpeed&&Math.abs(_.target-L)<=_.restDelta}return u.value=u.done?_.target:L,u},toString:()=>{const E=Math.min(Sm(I),jm),L=r1(q=>I.next(E*q).value,E,30);return E+"ms "+L},toTransition:()=>{}};return I}ol.applyToOptions=t=>{const e=fN(t,100,ol);return t.ease=e.ease,t.duration=xn(e.duration),t.type="keyframes",t};function wf({keyframes:t,velocity:e=0,power:s=.8,timeConstant:i=325,bounceDamping:l=10,bounceStiffness:u=500,modifyTarget:d,min:f,max:g,restDelta:p=.5,restSpeed:x}){const y=t[0],b={done:!1,value:y},w=E=>E<f||E>g,j=E=>f===void 0?g:g===void 0||Math.abs(f-E)<Math.abs(g-E)?f:g;let N=s*e;const _=y+N,k=d===void 0?_:d(_);k!==_&&(N=k-y);const R=E=>-N*Math.exp(-E/i),M=E=>{const L=R(E);b.done=Math.abs(L)<=p,b.value=b.done?k:k+L};let T,F;const I=E=>{w(b.value)&&(T=E,F=ol({keyframes:[b.value,j(b.value)],velocity:-R(E)/i*1e3,damping:l,stiffness:u,restDelta:p,restSpeed:x}))};return I(0),{calculatedDuration:null,next:E=>{let L=!1;return!F&&T===void 0&&(L=!0,M(E),I(E)),T!==void 0&&E>=T?F.next(E-T):(!L&&M(E),b)}}}function xN(t,e,s){const i=[],l=s||fs.mix||wm,u=t.length-1;for(let d=0;d<u;d++){let f=l(t[d],t[d+1]);if(e){const g=Array.isArray(e)?e[d]||kn:e;f=_l(g,f)}i.push(f)}return i}function u1(t,e,{clamp:s=!0,ease:i,mixer:l}={}){const u=t.length;if(su(u===e.length),u===1)return()=>e[0];if(u===2&&e[0]===e[1])return()=>e[1];const d=t[0]===t[1];t[0]>t[u-1]&&(t=[...t].reverse(),e=[...e].reverse());const f=xN(e,i,l),g=f.length,p=x=>{if(d&&x<t[0])return e[0];let y=0;if(g>1)for(;y<t.length-2&&!(x<t[y+1]);y++);const b=il(t[y],t[y+1],x);return f[y](b)};return s?x=>p(ms(t[0],t[u-1],x)):p}function yN(t,e){const s=t[t.length-1];for(let i=1;i<=e;i++){const l=il(0,e,i);t.push(Ve(s,1,l))}}function bN(t){const e=[0];return yN(e,t.length-1),e}function vN(t,e){return t.map(s=>s*e)}function wN(t,e){return t.map(()=>e||gm).splice(0,t.length-1)}function el({duration:t=300,keyframes:e,times:s,ease:i="easeInOut"}){const l=O4(i)?i.map(dy):dy(i)||gm,u={done:!1,value:e[0]};if(e.length===2&&!Array.isArray(l)&&(!s||s.length!==2||s[0]===0&&s[1]===1)){const[g,p]=e,x=g===p?void 0:(fs.mix||wm)(g,p);return{calculatedDuration:t,next:y=>(u.value=x?x(l(t>0?ms(0,1,y/t):1)):p,u.done=y>=t,u)}}const d=vN(s&&s.length===e.length?s:bN(e),t),f=u1(d,e,{ease:Array.isArray(l)?l:wN(e,l)});return{calculatedDuration:t,next:g=>(u.value=f(g),u.done=g>=t,u)}}const jN=5;function SN(t,e,s){const i=Math.max(e-jN,0);return Bv(s-t(i),e-i)}function d1(t,e,s=0){return e<=0?s:t.velocity?t.velocity(e):SN(i=>t.next(i).value,e,t.next(e).value)}const _N=t=>t!==null;function au(t,{repeat:e,repeatType:s="loop"},i,l=1){const u=t.filter(_N),f=l<0||e&&s!=="loop"&&e%2===1?0:u.length-1;return!f||i===void 0?u[f]:i}const NN={decay:wf,inertia:wf,tween:el,keyframes:el,spring:ol};function h1(t){typeof t.type=="string"&&(t.type=NN[t.type])}function f1(t,e){return{kind:t,animation:e,timestamp:mt.now(),frameTimestamp:lt.timestamp,frameIsProcessing:lt.isProcessing}}function m1(t,e,s){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...f1("animation-start",t),options:s?{...e,...s}:e})}catch{}}function TN(t,e){const s=globalThis.__MOTION_INSPECT__;if(s)try{s({...f1("layout-animation-start",t),node:e})}catch{}}class iu{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(e=>{this._resolve=e})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(e,s){return this.finished.then(e,s)}}const kN=t=>t/100;class Cc extends iu{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:s}=this.options;s&&s.updatedAt!==mt.now()&&this.tick(mt.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause(),m1(this,this.options)}initAnimation(){const{options:e}=this;h1(e);const{type:s=el,repeat:i=0,repeatDelay:l=0,repeatType:u,velocity:d=0}=e;let{keyframes:f}=e;const g=s||el;g!==el&&typeof f[0]!="number"&&(this.mixKeyframes=_l(kN,wm(f[0],f[1])),f=[0,100]);const p=g(f===e.keyframes?e:{...e,keyframes:f});u==="mirror"&&(this.mirroredGenerator=g({...e,keyframes:[...f].reverse(),velocity:-d})),p.calculatedDuration===null&&(p.calculatedDuration=Sm(p));const{calculatedDuration:x}=p;this.calculatedDuration=x,this.resolvedDuration=x+l,this.totalDuration=this.resolvedDuration*(i+1)-l,this.generator=p}updateTime(e){const s=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=s}tick(e,s=!1){const{generator:i,totalDuration:l,mixKeyframes:u,mirroredGenerator:d,resolvedDuration:f,calculatedDuration:g}=this;if(this.startTime===null)return i.next(0);const{delay:p=0,keyframes:x,repeat:y,repeatType:b,repeatDelay:w,type:j,onUpdate:N,finalKeyframe:_}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),s?this.currentTime=e:this.updateTime(e);const k=this.currentTime-p*(this.playbackSpeed>=0?1:-1),R=this.playbackSpeed>=0?k<0:k>l;this.currentTime=Math.max(k,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=l);let M=this.currentTime,T=i;if(y){const L=Math.min(this.currentTime,l)/f;let q=Math.floor(L),G=L%1;!G&&L>=1&&(G=1),G===1&&q--,q=Math.min(q,y+1),q%2&&(b==="reverse"?(G=1-G,w&&(G-=w/f)):b==="mirror"&&(T=d)),M=ms(0,1,G)*f}let F;R?(this.delayState.value=x[0],F=this.delayState):F=T.next(M),u&&!R&&(F.value=u(F.value));let{done:I}=F;!R&&g!==null&&(I=this.playbackSpeed>=0?this.currentTime>=l:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&I);return E&&j!==wf&&(F.value=au(x,this.options,_,this.speed)),N&&N(F.value),E&&this.finish(),F}then(e,s){return this.finished.then(e,s)}get duration(){return gn(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+gn(e)}get time(){return gn(this.currentTime)}set time(e){e=xn(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){return d1(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(e){const s=this.playbackSpeed!==e;s&&this.driver&&this.updateTime(mt.now()),this.playbackSpeed=e,s&&this.driver&&(this.time=gn(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=hN,startTime:s}=this.options;this.driver||(this.driver=e(l=>this.tick(l))),this.options.onPlay?.();const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=s??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(mt.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}const EN=new Set(["brightness","contrast","saturate","opacity"]);function AN(t){const[e,s]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=s.match(ym)||[];if(!i)return t;const l=s.replace(i,"");let u=EN.has(e)?1:0;return i!==s&&(u*=100),e+"("+u+l+")"}const CN=/\b([a-z-]*)\(.*?\)/gu,jf={...nn,getAnimatableNone:t=>{const e=t.match(CN);return e?e.map(AN).join(" "):t}},Sf={...nn,getAnimatableNone:t=>{const e=nn.parse(t);return nn.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},yy={...qi,transform:Math.round},RN={rotate:rs,pathRotation:rs,rotateX:rs,rotateY:rs,rotateZ:rs,scale:nc,scaleX:nc,scaleY:nc,scaleZ:nc,skew:rs,skewX:rs,skewY:rs,distance:ie,translateX:ie,translateY:ie,translateZ:ie,x:ie,y:ie,z:ie,perspective:ie,transformPerspective:ie,opacity:rl,originX:fy,originY:fy,originZ:ie},Rc={borderWidth:ie,borderTopWidth:ie,borderRightWidth:ie,borderBottomWidth:ie,borderLeftWidth:ie,borderRadius:ie,borderTopLeftRadius:ie,borderTopRightRadius:ie,borderBottomRightRadius:ie,borderBottomLeftRadius:ie,width:ie,maxWidth:ie,height:ie,maxHeight:ie,top:ie,right:ie,bottom:ie,left:ie,inset:ie,insetBlock:ie,insetBlockStart:ie,insetBlockEnd:ie,insetInline:ie,insetInlineStart:ie,insetInlineEnd:ie,padding:ie,paddingTop:ie,paddingRight:ie,paddingBottom:ie,paddingLeft:ie,paddingBlock:ie,paddingBlockStart:ie,paddingBlockEnd:ie,paddingInline:ie,paddingInlineStart:ie,paddingInlineEnd:ie,margin:ie,marginTop:ie,marginRight:ie,marginBottom:ie,marginLeft:ie,marginBlock:ie,marginBlockStart:ie,marginBlockEnd:ie,marginInline:ie,marginInlineStart:ie,marginInlineEnd:ie,fontSize:ie,backgroundPositionX:ie,backgroundPositionY:ie,...RN,zIndex:yy,fillOpacity:rl,strokeOpacity:rl,numOctaves:yy},ON={...Rc,color:ot,backgroundColor:ot,outlineColor:ot,fill:ot,stroke:ot,borderColor:ot,borderTopColor:ot,borderRightColor:ot,borderBottomColor:ot,borderLeftColor:ot,filter:jf,WebkitFilter:jf,mask:Sf,WebkitMask:Sf},p1=t=>ON[t],DN=new Set([jf,Sf]);function _m(t,e){let s=p1(t);return DN.has(s)||(s=nn),s.getAnimatableNone?s.getAnimatableNone(e):void 0}function MN(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const va=t=>t*180/Math.PI,_f=t=>{const e=va(Math.atan2(t[1],t[0]));return Nf(e)},UN={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:_f,rotateZ:_f,skewX:t=>va(Math.atan(t[1])),skewY:t=>va(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Nf=t=>(t=t%360,t<0&&(t+=360),t),by=_f,vy=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),wy=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),LN={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:vy,scaleY:wy,scale:t=>(vy(t)+wy(t))/2,rotateX:t=>Nf(va(Math.atan2(t[6],t[5]))),rotateY:t=>Nf(va(Math.atan2(-t[2],t[0]))),rotateZ:by,rotate:by,skewX:t=>va(Math.atan(t[4])),skewY:t=>va(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function cl(t){return t.includes("scale")?1:0}function Tf(t,e){if(!t||t==="none")return cl(e);const s=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,l;if(s)i=LN,l=s;else{const f=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=UN,l=f}if(!l)return cl(e);const u=i[e],d=l[1].split(",").map(PN);return typeof u=="function"?u(d):d[u]}const zN=(t,e)=>{const{transform:s="none"}=getComputedStyle(t);return Tf(s,e)};function PN(t){return parseFloat(t.trim())}const Hi=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hs=new Set([...Hi,"pathRotation"]),jy=t=>t===qi||t===ie,$N=new Set(["x","y","z"]),BN=Hi.filter(t=>!$N.has(t));function VN(t){const e=[];return BN.forEach(s=>{const i=t.getValue(s);if(i!==void 0){const l=i.get(),u=s.startsWith("scale")?1:0;if(l===u)return;e.push([s,l]),i.set(u)}}),e}const qN=new Set(["bottom","right"]);function Sy(t,e,s,i,l,u){const d=parseFloat(t);if(!isNaN(d))return d;const{min:f,max:g}=e()[s],p=g-f;return u==="border-box"?p:p-parseFloat(i)-parseFloat(l)}const _a={width:({width:t,paddingLeft:e="0",paddingRight:s="0",boxSizing:i},l)=>Sy(t,l,"x",e,s,i),height:({height:t,paddingTop:e="0",paddingBottom:s="0",boxSizing:i},l)=>Sy(t,l,"y",e,s,i),top:({top:t})=>parseFloat(t),left:({left:t})=>parseFloat(t),bottom:({top:t},e)=>{const{y:s}=e();return parseFloat(t)+(s.max-s.min)},right:({left:t},e)=>{const{x:s}=e();return parseFloat(t)+(s.max-s.min)},x:({transform:t})=>Tf(t,"x"),y:({transform:t})=>Tf(t,"y")};_a.translateX=_a.x;_a.translateY=_a.y;const Na=new Set;let kf=!1,Ef=!1,Af=!1;function g1(){if(Ef){const t=[],e=new Set,s=new Set;Na.forEach(l=>{l.needsMeasurement&&(t.push(l),e.add(l.element),qN.has(l.name)&&s.add(l.element))});const i=new Map;s.forEach(l=>{const u=VN(l);u.length&&(i.set(l,u),l.render())}),t.forEach(l=>l.measureInitialState()),e.forEach(l=>{l.render();const u=i.get(l);u&&u.forEach(([d,f])=>{l.getValue(d)?.set(f)})}),t.forEach(l=>l.measureEndState()),t.forEach(l=>{l.suspendedScrollY!==void 0&&window.scrollTo(0,l.suspendedScrollY)})}Ef=!1,kf=!1,Na.forEach(t=>t.complete(Af)),Na.clear()}function x1(){Na.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ef=!0)})}function HN(){Af=!0,x1(),g1(),Af=!1}function IN(t,e,s){if(typeof t=="string"){if(hm(t)||fm(t))return parseFloat(t);if(!nn.test(t)&&nn.test(s))return _m(e,s)}return t??void 0}class Nm{constructor(e,s,i,l,u,d=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=s,this.name=i,this.motionValue=l,this.element=u,this.isAsync=d}scheduleResolve(){this.state="scheduled",this.isAsync?(Na.add(this),kf||(kf=!0,ze.read(x1),ze.resolveKeyframes(g1))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:s,element:i,motionValue:l}=this;if(e[0]===null){const u=l?.get(),d=e[e.length-1];if(u!==void 0)e[0]=u;else if(i&&s){const f=IN(i.readValue(s,d),s,d);f!==void 0&&(e[0]=f)}e[0]===void 0&&(e[0]=d),l&&u===void 0&&l.set(e[0])}MN(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Na.delete(this)}cancel(){this.state==="scheduled"&&(Na.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const GN=t=>t.startsWith("--");function y1(t,e,s){GN(e)?t.style.setProperty(e,s):t.style[e]=s}const KN={};function b1(t,e){const s=$v(t);return()=>KN[e]??s()}const YN=b1(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),v1=b1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Xr=([t,e,s,i])=>`cubic-bezier(${t}, ${e}, ${s}, ${i})`,_y={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Xr([0,.65,.55,1]),circOut:Xr([.55,0,1,.45]),backIn:Xr([.31,.01,.66,-.59]),backOut:Xr([.33,1.53,.69,.99])};function w1(t,e){if(t)return typeof t=="function"?v1()?r1(t,e):"ease-out":Xv(t)?Xr(t):Array.isArray(t)?t.map(s=>w1(s,e)||_y.easeOut):_y[t]}function FN(t,e,s,{delay:i=0,duration:l=300,repeat:u=0,repeatType:d="loop",ease:f="easeOut",times:g}={},p=void 0){const x={[e]:s};g&&(x.offset=g);const y=w1(f,l);Array.isArray(y)&&(x.easing=y);const b={delay:i,duration:l,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:u+1,direction:d==="reverse"?"alternate":"normal"};return p&&(b.pseudoElement=p),t.animate(x,b)}function j1(t){return typeof t=="function"&&"applyToOptions"in t}function XN({type:t,...e}){return j1(t)&&v1()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class S1 extends iu{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:s,name:i,keyframes:l,pseudoElement:u,allowFlatten:d=!1,finalKeyframe:f,onComplete:g}=e;this.isPseudoElement=!!u,this.allowFlatten=d,this.options=e,su(typeof e.type!="string");const p=XN(e);this.animation=FN(s,i,l,p,u),p.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!u){const x=au(l,this.options,f,this.speed);this.updateMotionValue&&this.updateMotionValue(x),y1(s,i,x),this.animation.cancel()}g?.(),this.notifyFinished()},m1(this,e,p)}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return gn(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+gn(e)}get time(){return gn(Number(this.animation.currentTime)||0)}set time(e){const s=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=xn(e),s&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,onAttach:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&YN()?(this.animation.timeline=e,s?.(this.animation),kn):i(this)}}const _1={anticipate:Kv,backInOut:Gv,circInOut:Fv};function JN(t){return t in _1}function WN(t){typeof t.ease=="string"&&JN(t.ease)&&(t.ease=_1[t.ease])}const Wh=10;class QN extends S1{constructor(e){WN(e),h1(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:s,onUpdate:i,onComplete:l,element:u,...d}=this.options;if(!s)return;if(e!==void 0){s.set(e);return}const f=new Cc({...d,autoplay:!1}),g=Math.max(Wh,mt.now()-this.startTime),p=ms(0,Wh,g-Wh),x=f.sample(g).value,{name:y}=this.options;u&&y&&y1(u,y,x),s.setWithVelocity(f.sample(Math.max(0,g-p)).value,x,p),f.stop()}}const Ny=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(nn.test(t)||t==="0")&&!t.startsWith("url("));function ZN(t){const e=t[0];if(t.length===1)return!0;for(let s=0;s<t.length;s++)if(t[s]!==e)return!0}function e5(t,e,s,i){const l=t[0];if(l===null)return!1;if(e==="display"||e==="visibility")return!0;const u=t[t.length-1],d=Ny(l,e),f=Ny(u,e);return!d||!f?!1:ZN(t)||(s==="spring"||j1(s))&&i}function Cf(t){t.duration=0,t.type="keyframes"}const Rf=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),t5=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function n5(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&t5.test(t[e]))return!0;return!1}const Ty=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),s5=$v(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function a5(t){const{motionValue:e,name:s,repeatDelay:i,repeatType:l,damping:u,type:d,keyframes:f}=t;if(!s||!(Rf.has(s)||Ty.has(s)))return!1;const g=e?.owner?.current;if(!(g instanceof HTMLElement)&&!(g instanceof SVGElement))return!1;const{onUpdate:p,transformTemplate:x}=e.owner.getProps();return s5()&&(Rf.has(s)||Ty.has(s)&&n5(f))&&(s!=="transform"||!x)&&!p&&!i&&l!=="mirror"&&u!==0&&d!=="inertia"}const i5=40;class r5 extends iu{constructor(e){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=mt.now();const{keyframes:s,name:i,motionValue:l,element:u}=e,d=e;d.autoplay??(d.autoplay=!0),d.delay??(d.delay=0),d.type??(d.type="keyframes"),d.repeat??(d.repeat=0),d.repeatDelay??(d.repeatDelay=0),d.repeatType??(d.repeatType="loop");const f=u?.KeyframeResolver||Nm;this.keyframeResolver=new f(s,(g,p,x)=>this.onKeyframesResolved(g,p,d,!x),i,l,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,s,i,l){this.keyframeResolver=void 0;const{name:u,type:d,velocity:f,delay:g,isHandoff:p,onUpdate:x}=i;this.resolvedAt=mt.now();let y=!0;e5(e,u,d,f)||(y=!1,(fs.instantAnimations||!g)&&x?.(au(e,i,s)),e[0]=e[e.length-1],Cf(i),i.repeat=0);const b=l?this.resolvedAt?this.resolvedAt-this.createdAt>i5?this.resolvedAt:this.createdAt:this.createdAt:void 0,{onComplete:w}=i;i.startTime??(i.startTime=b),i.finalKeyframe=s,i.keyframes=e,i.onComplete=()=>{w?.(),this.notifyFinished()};const j=y&&!p&&a5(i);let N;if(j){i.element=i.motionValue?.owner?.current;try{N=new QN(i)}catch{N=new Cc(i)}}else N=new Cc(i);this.pendingTimeline&&(this.stopTimeline=N.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=N}get finished(){return this._animation?this._animation.finished:super.finished}then(e,s){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),HN()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}function N1(t,e,s,i=0,l=1){const u=Array.from(t).sort((p,x)=>p.sortNodePosition(x)).indexOf(e),d=t.size,f=(d-1)*i;return typeof s=="function"?s(u,d):l===1?u*i:f-u*i}const ky=30,l5=t=>!isNaN(parseFloat(t)),tl={current:void 0};class o5{constructor(e,s={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{const l=mt.now();if(this.updatedAt!==l&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&(this.notifyChange(),this.dependents))for(const u of this.dependents)u.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=s.owner}setCurrent(e){this.current=e,this.updatedAt=mt.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=l5(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,s){var i;return e==="change"?this.onChangeSubscribe(s):((i=this.events)[e]||(i[e]=new Ec)).add(s)}onChangeSubscribe(e){const{events:s}=this;return!s.change&&!this.changeSubscriber?this.changeSubscriber=e:(s.change||(s.change=new Ec,s.change.add(this.changeSubscriber),this.changeSubscriber=void 0),s.change.add(e)),()=>{this.changeSubscriber===e?this.changeSubscriber=void 0:s.change?.remove(e),this.stopIfUnobserved()}}stopIfUnobserved(){ze.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const e in this.events)this.events[e].clear()}attach(e,s){this.passiveEffect=e,this.stopPassiveEffect=s}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,s,i){this.set(s),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,s=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,s&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.notifyChange()}notifyChange(){const{current:e,changeSubscriber:s}=this;s?s(e):this.events.change?.notify(e)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return tl.current&&tl.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=mt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>ky)return 0;const s=Math.min(this.updatedAt-this.prevUpdatedAt,ky);return Bv(parseFloat(this.current)-parseFloat(this.prevFrameValue),s)}start(e){return this.stop(),new Promise(s=>{this.hasAnimated=!0;let i=!1,l;l=e(()=>{i=!0,this.events.animationComplete?.notify(),this.animation===l&&this.clearAnimation(),s()}),i||(this.animation=l),this.events.animationStart?.notify()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=void 0}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ca(t,e){return new o5(t,e)}function T1(t,e){if(t?.inherit&&e){const{inherit:s,...i}=t;return{...e,...i}}return t}function Tm(t,e){const s=t?.[e]??t?.default??t;return s!==t?T1(s,t):s}const c5={type:"spring",stiffness:500,damping:25,restSpeed:10},u5=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),d5={type:"keyframes",duration:.8},h5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},f5=(t,{keyframes:e})=>e.length>2?d5:Hs.has(t)?t.startsWith("scale")?u5(e[1]):c5:h5,m5=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function p5(t){for(const e in t)if(!m5.has(e))return!0;return!1}const km=(t,e,s,i={},l,u)=>d=>{const f=Tm(i,t)||{},g=f.delay||i.delay||0;let{elapsed:p=0}=i;p=p-xn(g);const x={keyframes:Array.isArray(s)?s:[null,s],ease:"easeOut",velocity:e.getVelocity(),...f,delay:-p,onUpdate:b=>{e.set(b),f.onUpdate&&f.onUpdate(b)},onComplete:()=>{d(),f.onComplete&&f.onComplete()},name:t,motionValue:e,element:u?void 0:l};p5(f)||Object.assign(x,f5(t,x)),x.duration&&(x.duration=xn(x.duration)),x.repeatDelay&&(x.repeatDelay=xn(x.repeatDelay)),x.from!==void 0&&(x.keyframes[0]=x.from);let y=!1;if((x.type===!1||x.duration===0&&!x.repeatDelay)&&(Cf(x),x.delay===0&&(y=!0)),(fs.instantAnimations||fs.skipAnimations||l?.shouldSkipAnimations||f.skipAnimations)&&(y=!0,Cf(x),x.delay=0),x.allowFlatten=!f.type&&!f.ease,y&&!u&&e.get()!==void 0){const b=au(x.keyframes,f);if(b!==void 0){ze.update(()=>{x.onUpdate(b),x.onComplete()});return}}return f.isSync?new Cc(x):new r5(x)},g5=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function x5(t){const e=g5.exec(t);if(!e)return[,];const[,s,i,l]=e;return[`--${s??i}`,l]}function k1(t,e,s=1){const[i,l]=x5(t);if(!i)return;const u=window.getComputedStyle(e).getPropertyValue(i);if(u){const d=u.trim();return hm(d)?parseFloat(d):d}return xm(l)?k1(l,e,s+1):l}function y5(t){const e=[{},{}];return t?.values.forEach((s,i)=>{e[0][i]=s.get(),e[1][i]=s.getVelocity()}),e}function E1(t,e,s,i){const l=u=>typeof u=="function"?u(s!==void 0?s:t.custom,...y5(i)):u;return e=l(e),typeof e=="string"&&(e=t.variants&&t.variants[e]),l(e)}function Ta(t,e,s){return E1(t.getProps(),e,s,t)}const A1=(t,e)=>e==="exit"?t.presenceContext?.custom:void 0,C1=new Set(["width","height","top","left","right","bottom",...Hi]),b5=t=>Array.isArray(t);function v5(t,e,s){t.hasValue(e)?t.getValue(e).set(s):t.addValue(e,Ca(s))}function w5(t){return b5(t)?t[t.length-1]||0:t}function j5(t,e){const s=Ta(t,e);let{transitionEnd:i={},transition:l={},...u}=s||{};u={...u,...i};for(const d in u){const f=w5(u[d]);v5(t,d,f)}}const ct=t=>!!(t&&t.getVelocity);function S5(t){return!!(ct(t)&&t.add)}function Of(t,e){const s=t.getValue("willChange");if(S5(s))return s.add(e);if(!s&&fs.WillChange){const i=new fs.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function Em(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const _5="framerAppearId",R1="data-"+Em(_5);function O1(t){return t.props[R1]}const N5=typeof window<"u";function T5({protectedKeys:t,needsAnimating:e},s){const i=s in t&&!e[s];return e[s]=!1,i}function D1(t,e,{delay:s=0,transitionOverride:i,type:l}={}){let{transition:u,transitionEnd:d,...f}=e;const g=t.getDefaultTransition();u=u?T1(u,g):g;const p=u?.reduceMotion,x=u?.skipAnimations;i&&(u=i);const y=[],b=l&&t.animationState?.getState()[l],w=u?.path;w&&w.animateVisualElement(t,f,u,s,y);for(const j in f){const N=t.getValue(j,t.latestValues[j]??null),_=f[j];if(_===void 0||b&&T5(b,j))continue;const k={delay:s,...Tm(u||{},j)};x&&(k.skipAnimations=!0);const R=N.get();if(R!==void 0&&!N.isAnimating()&&!Array.isArray(_)&&_===R&&!k.velocity){ze.update(()=>N.set(_));continue}let M=!1;if(N5&&window.MotionHandoffAnimation){const I=O1(t);if(I){const E=window.MotionHandoffAnimation(I,j,ze);E!==null&&(k.startTime=E,M=!0)}}Of(t,j);const T=p??t.shouldReduceMotion;N.start(km(j,N,_,T&&C1.has(j)?{type:!1}:k,t,M));const F=N.animation;F&&y.push(F)}if(d){const j=()=>ze.update(()=>{d&&j5(t,d)});y.length?Promise.all(y).then(j):j()}return y}function Df(t,e,s={}){const i=Ta(t,e,A1(t,s.type)),l=s.transitionOverride||(i?.transition??(t.getDefaultTransition()||{})),u=()=>Promise.all(i?D1(t,i,s):[]),d=(g=0)=>{const{variantChildren:p}=t,{delayChildren:x=0,staggerChildren:y,staggerDirection:b}=l,w=[];return p?.forEach(j=>{j.notify("AnimationStart",e),w.push(Df(j,e,{...s,delay:g+(typeof x=="function"?0:x)+N1(p,j,x,y,b)}).then(()=>j.notify("AnimationComplete",e)))}),Promise.all(w)},{when:f}=l;return f?f==="beforeChildren"?u().then(()=>d()):d().then(u):Promise.all([u(),d(s.delay)])}function k5(t,e,s={}){return t.notify("AnimationStart",e),(Array.isArray(e)?Promise.all(e.map(l=>Df(t,l,s))):typeof e=="string"?Df(t,e,s):Promise.all(D1(t,Ta(t,e,s.custom),s))).then(()=>{t.notify("AnimationComplete",e)})}const E5={test:t=>t==="auto",parse:t=>t},A5=t=>e=>e.test(t),C5=[qi,ie,Pn,rs,H4,q4,E5],Ey=t=>C5.find(A5(t));function R5(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||fm(t):!0}const O5=new Set(["auto","none","0"]);function D5(t,e,s){let i=0,l;for(;i<t.length&&!l;){const u=t[i];typeof u=="string"&&!O5.has(u)&&X4(u)&&(l=t[i]),i++}if(l&&s)for(const u of e)t[u]!==l&&(t[u]=_m(s,l))}class M5 extends Nm{constructor(e,s,i,l,u){super(e,s,i,l,u,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:s,name:i}=this;if(!s||!s.current)return;super.readKeyframes();for(let x=0;x<e.length;x++){let y=e[x];if(typeof y=="string"&&(y=y.trim(),xm(y))){const b=k1(y,s.current);b!==void 0&&(e[x]=b),x===e.length-1&&(this.finalKeyframe=y)}}if(this.resolveNoneKeyframes(),!C1.has(i)||e.length!==2)return;const[l,u]=e;if(typeof l=="number"&&typeof u=="number")return;const d=Ey(l),f=Ey(u),g=hy(l),p=hy(u);if(g!==p&&_a[i]){this.needsMeasurement=!0;return}if(d!==f)if(jy(d)&&jy(f))for(let x=0;x<e.length;x++){const y=e[x];typeof y=="string"&&(e[x]=parseFloat(y))}else _a[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:s}=this,i=[];for(let l=0;l<e.length;l++)(e[l]===null||R5(e[l]))&&i.push(l);i.length&&D5(e,i,s)}measure(){const{element:e,name:s}=this;return _a[s](window.getComputedStyle(e.current),()=>e.measureViewportBox())}measureInitialState(){const{element:e,unresolvedKeyframes:s,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),s[0]=this.measuredOrigin;const l=s[s.length-1];l!==void 0&&this.motionValue?.jump(l,!1)}measureEndState(){const{element:e,unresolvedKeyframes:s}=this;if(!e||!e.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const i=s.length-1,l=s[i];s[i]=this.measure(),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),this.removedTransforms?.length&&this.removedTransforms.forEach(([u,d])=>{e.getValue(u).set(d)}),this.resolveNoneKeyframes()}}const Am=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function gc(t){return Pv(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}function Cm(t){return Pv(t)&&"ownerSVGElement"in t}const Mf=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function M1(t,e,s){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;const l=s?.[t]??i.querySelectorAll(t);return l?Array.from(l):[]}return Array.from(t).filter(i=>i!=null)}const U5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},L5=Hi.length;function z5(t,e,s){let i="",l=!0;for(let d=0;d<L5;d++){const f=Hi[d],g=t[f];if(g===void 0)continue;let p=!0;if(typeof g=="number")p=g===(f.startsWith("scale")?1:0);else{const x=parseFloat(g);p=f.startsWith("scale")?x===1:x===0}if(!p||s){const x=Mf(g,Rc[f]);if(!p){l=!1;const y=U5[f]||f;i+=`${y}(${x}) `}s&&(e[f]=x)}}const u=t.pathRotation;return u&&(l=!1,i+=`rotate(${Mf(u,Rc.pathRotation)}) `),i=i.trim(),s?i=s(e,l?"":i):l&&(i="none"),i}function Rm(t,e,s){const{style:i,vars:l,transformOrigin:u}=t;let d=!1,f=!1;for(const g in e){const p=e[g];if(Hs.has(g)){d=!0;continue}else if(Wv(g)){l[g]=p;continue}else{const x=Mf(p,Rc[g]);g.startsWith("origin")?(f=!0,u[g]=x):i[g]=x}}if(e.transform||(d||s?i.transform=z5(e,t.transform,s):i.transform&&(i.transform="none")),f){const{originX:g="50%",originY:p="50%",originZ:x=0}=u;i.transformOrigin=`${g} ${p} ${x}`}}const P5={offset:"stroke-dashoffset",array:"stroke-dasharray"},$5={offset:"strokeDashoffset",array:"strokeDasharray"};function B5(t,e,s=1,i=0,l=!0){t.pathLength=1;const u=l?P5:$5;t[u.offset]=`${-i}`,t[u.array]=`${e} ${s}`}const U1=["transform","opacity","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function L1(t,{attrX:e,attrY:s,attrScale:i,pathLength:l,pathSpacing:u=1,pathOffset:d=0,...f},g,p,x){if(Rm(t,f,p),g){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:y,style:b}=t;for(const w of U1)y[w]!==void 0&&(b[w]=y[w],delete y[w]);(b.transform||y.transformOrigin)&&(b.transformOrigin=y.transformOrigin??"50% 50%",delete y.transformOrigin),b.transform&&(b.transformBox=x?.transformBox??"fill-box",delete y.transformBox),e!==void 0&&(y.x=e),s!==void 0&&(y.y=s),i!==void 0&&(y.scale=i),l!==void 0&&B5(y,l,u,d,!1)}function z1({top:t,left:e,right:s,bottom:i}){return{x:{min:e,max:s},y:{min:t,max:i}}}function V5({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function q5(t,e){if(!e)return t;const s=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:s.y,left:s.x,bottom:i.y,right:i.x}}function Qh(t){return t===void 0||t===1}function Uf({scale:t,scaleX:e,scaleY:s}){return!Qh(t)||!Qh(e)||!Qh(s)}function ga(t){return Uf(t)||P1(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function P1(t){return Ay(t.x)||Ay(t.y)}function Ay(t){return t&&t!=="0%"}function Oc(t,e,s){const i=t-s,l=e*i;return s+l}function Cy(t,e,s,i,l){return l!==void 0&&(t=Oc(t,l,i)),Oc(t,s,i)+e}function Lf(t,e=0,s=1,i,l){t.min=Cy(t.min,e,s,i,l),t.max=Cy(t.max,e,s,i,l)}function $1(t,{x:e,y:s}){Lf(t.x,e.translate,e.scale,e.originPoint),Lf(t.y,s.translate,s.scale,s.originPoint)}const Ry=.999999999999,Oy=1.0000000000001;function H5(t,e,s,i=!1){const l=s.length;if(!l)return;e.x=e.y=1;let u,d;for(let f=0;f<l;f++){u=s[f],d=u.projectionDelta;const{visualElement:g}=u.options;g&&g.props.style&&g.props.style.display==="contents"||(i&&u.options.layoutScroll&&u.scroll&&u!==u.root&&(Ln(t.x,-u.scroll.offset.x),Ln(t.y,-u.scroll.offset.y)),d&&(e.x*=d.x.scale,e.y*=d.y.scale,$1(t,d)),i&&ga(u.latestValues)&&xc(t,u.latestValues,u.layout?.layoutBox))}e.x<Oy&&e.x>Ry&&(e.x=1),e.y<Oy&&e.y>Ry&&(e.y=1)}function Ln(t,e){t.min+=e,t.max+=e}function Dy(t,e,s,i,l=.5){const u=Ve(t.min,t.max,l);Lf(t,e,s,u,i)}function My(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function xc(t,e,s){const i=s??t;Dy(t.x,My(e.x,i.x),e.scaleX,e.scale,e.originX),Dy(t.y,My(e.y,i.y),e.scaleY,e.scale,e.originY)}function B1(t,e){return z1(q5(t.getBoundingClientRect(),e))}function I5(t,e,s){const i=B1(t,s),{scroll:l}=e;return l&&(Ln(i.x,l.offset.x),Ln(i.y,l.offset.y)),i}const{schedule:Om}=i1(queueMicrotask,!1),Sn={x:!1,y:!1};function V1(){return Sn.x||Sn.y}function G5(t){return t==="x"||t==="y"?Sn[t]?null:(Sn[t]=!0,()=>{Sn[t]=!1}):Sn.x||Sn.y?null:(Sn.x=Sn.y=!0,()=>{Sn.x=Sn.y=!1})}function q1(t,e){const s=M1(t),i=new AbortController,l={passive:!0,...e,signal:i.signal};return[s,l,()=>i.abort()]}function K5(t){return!(t.pointerType==="touch"||V1())}function Y5(t,e,s={}){const[i,l,u]=q1(t,s);return i.forEach(d=>{let f=!1,g=!1,p;const x=()=>{d.removeEventListener("pointerleave",j)},y=_=>{p&&(p(_),p=void 0),x()},b=_=>{f=!1,window.removeEventListener("pointerup",b),window.removeEventListener("pointercancel",b),g&&(g=!1,y(_))},w=()=>{f=!0,window.addEventListener("pointerup",b,l),window.addEventListener("pointercancel",b,l)},j=_=>{if(_.pointerType!=="touch"){if(f){g=!0;return}y(_)}},N=_=>{if(!K5(_))return;g=!1;const k=e(d,_);typeof k=="function"&&(p=k,d.addEventListener("pointerleave",j,l))};d.addEventListener("pointerenter",N,l),d.addEventListener("pointerdown",w,l)}),u}const H1=(t,e)=>e?t===e?!0:H1(t,e.parentElement):!1,Dm=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,F5=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function X5(t){return F5.has(t.tagName)||t.isContentEditable===!0}const J5=new Set(["INPUT","SELECT","TEXTAREA"]);function W5(t){return J5.has(t.tagName)||t.isContentEditable===!0}const yc=new WeakSet;function Uy(t){return e=>{e.key==="Enter"&&t(e)}}function Zh(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Q5=(t,e)=>{const s=t.currentTarget;if(!s)return;const i=Uy(()=>{if(yc.has(s))return;Zh(s,"down");const l=Uy(()=>{Zh(s,"up")}),u=()=>Zh(s,"cancel");s.addEventListener("keyup",l,e),s.addEventListener("blur",u,e)});s.addEventListener("keydown",i,e),s.addEventListener("blur",()=>s.removeEventListener("keydown",i),e)};function Ly(t){return Dm(t)&&!V1()}const zy=new WeakSet;function Z5(t,e,s={}){const[i,l,u]=q1(t,s),d=f=>{const g=f.currentTarget;if(!Ly(f)||zy.has(f))return;yc.add(g),s.stopPropagation&&zy.add(f);const p=e(g,f),x={...l,capture:!0},y=(j,N)=>{window.removeEventListener("pointerup",b,x),window.removeEventListener("pointercancel",w,x),yc.has(g)&&yc.delete(g),Ly(j)&&typeof p=="function"&&p(j,{success:N})},b=j=>{y(j,g===window||g===document||s.useGlobalTarget||H1(g,j.target))},w=j=>{y(j,!1)};window.addEventListener("pointerup",b,x),window.addEventListener("pointercancel",w,x)};return i.forEach(f=>{(s.useGlobalTarget?window:f).addEventListener("pointerdown",d,l),gc(f)&&(f.addEventListener("focus",p=>Q5(p,l)),!X5(f)&&!f.hasAttribute("tabindex")&&(f.tabIndex=0))}),u}const bc=new WeakMap;let vc;const I1=(t,e,s)=>(i,l)=>l&&l[0]?l[0][t+"Size"]:Cm(i)&&"getBBox"in i?i.getBBox()[e]:i[s],eT=I1("inline","width","offsetWidth"),tT=I1("block","height","offsetHeight");function nT({target:t,borderBoxSize:e}){bc.get(t)?.forEach(s=>{s(t,{get width(){return eT(t,e)},get height(){return tT(t,e)}})})}function sT(t){t.forEach(nT)}function aT(){typeof ResizeObserver>"u"||(vc=new ResizeObserver(sT))}function iT(t,e){vc||aT();const s=M1(t);return s.forEach(i=>{let l=bc.get(i);l||(l=new Set,bc.set(i,l)),l.add(e),vc?.observe(i)}),()=>{s.forEach(i=>{const l=bc.get(i);l?.delete(e),l?.size||vc?.unobserve(i)})}}const wc=new Set;let Ei;function rT(){Ei=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};wc.forEach(e=>e(t))},window.addEventListener("resize",Ei)}function lT(t){return wc.add(t),Ei||rT(),()=>{wc.delete(t),!wc.size&&typeof Ei=="function"&&(window.removeEventListener("resize",Ei),Ei=void 0)}}function Py(t,e){return typeof t=="function"?lT(t):iT(t,e)}function oT(t){return Cm(t)&&t.tagName==="svg"}function cT(...t){const e=!Array.isArray(t[0]),s=e?0:-1,i=t[0+s],l=t[1+s],u=t[2+s],d=t[3+s],f=u1(l,u,d);return e?f(i):f}const Jr=new Set,$y=({timestamp:t})=>{Jr.forEach(e=>e.tick(t))};class uT extends iu{constructor(e){super(),this.state="idle",this.startTime=0,this.currentTime=0,this.started=!1,this.hasNextTarget=!1,this.nextTarget=0,this.stop=()=>{this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.factory=e.type,this.generator=this.factory(e);const{driver:s}=e;s&&(this.driver=s(i=>this.tick(i))),this.startTime=this.now(),this.state="running",this.driver?this.driver.start():(Jr.size||ze.update($y,!0),Jr.add(this))}setTarget(e,s){this.nextTarget=e,this.nextVelocity=s,this.hasNextTarget=!0}retarget(e,s){const{options:i,generator:l}=this;i.keyframes=e,i.velocity=s,this.startTime=this.now(),this.currentTime=0,l.retarget?l.retarget(e,s):this.generator=this.factory(i)}tick(e){const{options:s,hasNextTarget:i}=this,{delay:l=0,onUpdate:u,onPlay:d}=s,f=Math.round(e-this.startTime)-l,g=this.currentTime=Math.max(0,f),p=this.generator.next(g),x=f<0?s.keyframes[0]:p.value;if(i){this.hasNextTarget=!1;const{keyframes:y}=s;y[0]=x,y[1]=this.nextTarget,this.retarget(y,this.nextVelocity??this.getGeneratorVelocity())}(i||!this.started)&&(this.started=!0,d?.()),this.state==="running"&&(u?.(x),p.done&&f>=0&&!i&&!this.hasNextTarget&&this.state==="running"&&(this.notifyFinished(),this.teardown(),this.state="finished",s.onComplete?.()))}getGeneratorVelocity(){return d1(this.generator,this.currentTime,this.options.velocity)}now(){return this.driver?this.driver.now():mt.now()}teardown(){this.state="idle",this.driver?this.driver.stop():(Jr.delete(this),Jr.size||$n($y))}}const Dc=t=>typeof t=="number"?t:parseFloat(t);function dT(t,e,s){const i=t.get();let l=null,u;const d=typeof i=="string"?i.replace(/[\d.-]/g,""):void 0,f=x=>u(d?x+d:x),g=()=>t.events.animationStart?.notify(),p=()=>{l&&(l.stop(),l=null),t.animation=void 0};if(t.attach((x,y)=>{u=y;const b=Dc(x);if(l?.state==="running"){l.setTarget(b,s.velocity);return}const w=Dc(t.get()),j=l?l.getGeneratorVelocity():t.getVelocity();if(p(),w===b)return;const N={keyframes:[w,b],velocity:j,restDelta:.001,restSpeed:.01,...s,onUpdate:f},_=l=new uT({...N,onPlay:g});t.animation=_,_.then(()=>{l===_&&(l=null,t.animation=void 0,t.events.animationComplete?.notify())})},p),ct(e)){let x=s.skipInitialAnimation===!0;const y=e.on("change",w=>{x?(x=!1,t.jump(By(w,d),!1)):t.set(By(w,d))}),b=t.on("destroy",y);return()=>{y(),b()}}return p}function By(t,e){return e?t+e:t}function hT(t,e,s){return dT(t,e,{...s,type:ol})}const Vy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ai=()=>({x:Vy(),y:Vy()}),qy=()=>({min:0,max:0}),rt=()=>({x:qy(),y:qy()}),fT=new WeakMap;function ru(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function ul(t){return typeof t=="string"||Array.isArray(t)}const Mm=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hy=["initial",...Mm];function lu(t){if(ru(t.animate))return!0;for(let e=0;e<Hy.length;e++)if(ul(t[Hy[e]]))return!0;return!1}function G1(t){return!!(lu(t)||t.variants)}function mT(t,e,s){for(const i in e){const l=e[i],u=s[i];if(ct(l))t.addValue(i,l);else if(ct(u))t.addValue(i,Ca(l,{owner:t}));else if(u!==l)if(t.hasValue(i)){const d=t.getValue(i);d.liveStyle===!0?d.jump(l):d.hasAnimated||d.set(l)}else{const d=t.getStaticValue(i);t.addValue(i,Ca(d!==void 0?d:l,{owner:t}))}}for(const i in s)e[i]===void 0&&t.removeValue(i);return e}const Mc={current:null},Um={current:!1},pT=typeof window<"u";function K1(){if(Um.current=!0,!!pT)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Mc.current=t.matches;t.addEventListener("change",e),e()}else Mc.current=!1}const Iy=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Uc={};function Y1(t){Uc=t}function gT(){return Uc}class xT{scrapeMotionValuesFromProps(e,s,i){return{}}constructor({parent:e,props:s,presenceContext:i,reducedMotionConfig:l,skipAnimations:u,blockInitialAnimation:d,visualState:f},g={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Nm,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const w=mt.now();this.renderScheduledAt<w&&(this.renderScheduledAt=w,ze.render(this.render,!1,!0))};const{latestValues:p,renderState:x}=f;this.latestValues=p,this.baseTarget={...p},this.initialValues=s.initial?{...p}:{},this.renderState=x,this.parent=e,this.props=s,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=l,this.skipAnimationsConfig=u,this.options=g,this.blockInitialAnimation=!!d,this.isControllingVariants=lu(s),this.isVariantNode=G1(s),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:y,...b}=this.scrapeMotionValuesFromProps(s,{},this);for(const w in b){const j=b[w];p[w]!==void 0&&ct(j)&&j.set(p[w])}}mount(e){if(this.hasBeenMounted)for(const s in this.initialValues)this.values.get(s)?.jump(this.initialValues[s]),this.latestValues[s]=this.initialValues[s];if(this.current=e,fT.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.isVariantNode&&!this.isControllingVariants){let s=this;do s=s.props.inherit!==!1&&s.parent;while(s&&!s.isVariantNode);if(s){const{variantChildren:i}=s;i.add(this),this.removeFromVariantTree=()=>i.delete(this)}}this.values.forEach((s,i)=>this.bindToMotionValue(i,s)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Um.current||K1(),this.shouldReduceMotion=Mc.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),$n(this.notifyUpdate),$n(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const s=this.features[e];s&&(s.unmount(),s.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,s){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),s.accelerate&&Rf.has(e)&&this.current instanceof HTMLElement){const{factory:d,keyframes:f,times:g,ease:p,duration:x}=s.accelerate,y=new S1({element:this.current,name:e,keyframes:f,times:g,ease:p,duration:xn(x)}),b=d(y);this.valueSubscriptions.set(e,()=>{b(),y.cancel()});return}const i=Hs.has(e);i&&this.onBindTransform&&this.onBindTransform();const l=s.on("change",d=>{this.latestValues[e]=d,this.props.onUpdate&&ze.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let u;typeof window<"u"&&window.MotionCheckAppearSync&&(u=window.MotionCheckAppearSync(this,e,s)),this.valueSubscriptions.set(e,()=>{l(),u&&u()})}sortNodePosition(e){return!this.current||!e.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in Uc){const s=Uc[e];if(!s)continue;const{isEnabled:i,Feature:l}=s;if(!this.features[e]&&l&&i(this.props)&&(this.features[e]=new l(this)),this.features[e]){const u=this.features[e];u.isMounted?u.update():(u.mount(),u.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):rt()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,s){this.latestValues[e]=s}update(e,s){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=s;for(let i=0;i<Iy.length;i++){const l=Iy[i];this.propEventSubscriptions[l]&&(this.propEventSubscriptions[l](),delete this.propEventSubscriptions[l]);const u="on"+l,d=e[u];d&&(this.propEventSubscriptions[l]=this.on(l,d))}this.prevMotionValues=mT(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}addValue(e,s){const i=this.values.get(e);if(s!==i){i&&this.removeValue(e),this.bindToMotionValue(e,s),this.values.set(e,s);const l=s.get();l!==void 0&&(this.latestValues[e]=l)}}removeValue(e){this.values.delete(e);const s=this.valueSubscriptions.get(e);s&&(s(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,s){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&s!==void 0&&(i=Ca(s??this.getDefaultValue?.(e),{owner:this}),this.addValue(e,i)),i}readValue(e,s){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(hm(i)||fm(i))?i=parseFloat(i):typeof i!="number"&&!nn.test(i)&&nn.test(s)&&(i=_m(e,s)),this.setBaseTarget(e,ct(i)?i.get():i)),ct(i)?i.get():i}setBaseTarget(e,s){this.baseTarget[e]=s}on(e,s){return this.events[e]||(this.events[e]=new Ec),this.events[e].add(s)}notify(e,...s){this.events[e]&&this.events[e].notify(...s)}scheduleRenderMicrotask(){Om.render(this.render)}}class F1 extends xT{constructor(){super(...arguments),this.KeyframeResolver=M5}sortInstanceNodePosition(e,s){return e.compareDocumentPosition(s)&2?1:-1}getBaseTargetFromProps(e,s){const i=e.style;return i?i[s]:void 0}removeValueFromRenderState(e,{vars:s,style:i}){delete s[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ct(e)&&(this.childSubscription=e.on("change",s=>{this.current&&(this.current.textContent=`${s}`)}))}}class Ys{constructor(e){this.isMounted=!1,this.node=e}update(){}}function X1(t,{style:e,vars:s},i,l){const u=t.style;let d;for(d in e)u[d]=e[d];l?.applyProjectionStyles(u,i);for(d in s)u.setProperty(d,s[d])}const dl={};function J1(t,{layout:e,layoutId:s}){return Hs.has(t)||t.startsWith("origin")||(e||s!==void 0)&&(!!dl[t]||t==="opacity")}function Lm(t,e,s){const i=t.style,l=e?.style,u={};if(!i)return u;for(const d in i)(ct(i[d])||l&&ct(l[d])||J1(d,t)||s?.getValue(d)?.liveStyle!==void 0)&&(u[d]=i[d]);return u}function yT(t){return window.getComputedStyle(t)}class bT extends F1{constructor(){super(...arguments),this.type="html",this.renderInstance=X1}mount(e){su(!!e.style),super.mount(e)}readValueFromInstance(e,s){if(Hs.has(s))return this.projection?.isProjecting?cl(s):zN(e,s);{const i=yT(e),l=(Wv(s)?i.getPropertyValue(s):i[s])||0;return typeof l=="string"?l.trim():l}}measureInstanceViewportBox(e,{transformPagePoint:s}){return B1(e,s)}build(e,s,i){Rm(e,s,i.transformTemplate)}scrapeMotionValuesFromProps(e,s,i){return Lm(e,s,i)}}const W1=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Q1=t=>typeof t=="string"&&t.toLowerCase()==="svg";function vT(t,e,s,i){X1(t,e,void 0,i);for(const l in e.attrs)t.setAttribute(W1.has(l)?l:Em(l),e.attrs[l])}function Z1(t,e,s){const i=Lm(t,e,s);for(const l in t)if(ct(t[l])||ct(e[l])){const u=Hi.indexOf(l)!==-1?"attr"+l.charAt(0).toUpperCase()+l.substring(1):l;i[u]=t[l]}return i}class wT extends F1{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=rt}getBaseTargetFromProps(e,s){return Hs.has(s)?super.getBaseTargetFromProps(e,s)??cl(s):e[s]}getDefaultValue(e){return Hs.has(e)?this.latestValues[e]??cl(e):void 0}readValueFromInstance(e,s){if(Hs.has(s)){const i=p1(s);return i&&i.default||0}if(U1.includes(s)){const l=getComputedStyle(e)[s];if(typeof l=="string"&&l)return l.trim()}return s=W1.has(s)?s:Em(s),e.getAttribute(s)}scrapeMotionValuesFromProps(e,s,i){return Z1(e,s,i)}build(e,s,i){L1(e,s,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,s,i,l){vT(e,s,i,l)}mount(e){this.isSVGTag=Q1(e.tagName),super.mount(e)}}function ew(t,e){if(!Array.isArray(e))return!1;const s=e.length;if(s!==t.length)return!1;for(let i=0;i<s;i++)if(e[i]!==t[i])return!1;return!0}const jT=[...Mm].reverse();function ST(t){let e=f=>Promise.all(f.map(({animation:g,options:p})=>k5(t,g,p))),s=Gy(),i=!0,l=!1;function u(f){const{props:g,parent:p,manuallyAnimateOnMount:x}=t,y=i||l,b=[],w=new Set;let j={},N=1/0,_=t;do _=_.props.inherit!==!1&&_.parent;while(_&&!_.isControllingVariants);if(jT.forEach((R,M)=>{const T=s[R],F=g[R],I=_&&_.props[R],E=F!==void 0?F:ul(I)||I===!1?I:void 0,L=ul(E),q=R===f?T.isActive:null;q===!1&&(N=M);const G=L&&F===void 0&&!(y&&x);if(T.protectedKeys={...j},!T.isActive&&q===null||!E&&!T.prevProp||ru(E)||typeof E=="boolean")return;if(R==="exit"&&T.isActive&&q!==!0){j={...j,...T.prevResolvedValues};return}const me=_T(T.prevProp,E);let xe=me||L&&(q&&!G||M>N),Ce=!1;const ut=Array.isArray(E)?E:[E];let W={};if(q!==!1)for(const X of ut){const{transition:ee,transitionEnd:de,...ke}=Ta(t,X,A1(t,R))||{};W={...W,...ke,...de}}const{prevResolvedValues:B}=T;for(const X in{...B,...W}){if(X in j)continue;const ee=W[X],de=B[X],ke=Array.isArray(ee)&&Array.isArray(de)?!ew(ee,de)||me:ee!==de;if(ke&&ee==null)w.add(X);else if(ke||ee!==void 0&&w.has(X)){xe=!0,w.delete(X)&&(Ce=!0),T.needsAnimating[X]=!0;const D=t.getValue(X);D&&(D.liveStyle=!1)}else T.protectedKeys[X]=!0}if(T.prevProp=E,T.prevResolvedValues=W,T.isActive&&(j={...j,...W}),xe&&(!(G&&me)||Ce))for(const X of ut){const ee={type:R};if(typeof X=="string"&&y&&x&&p?.enteringChildren){const de=Ta(p,X)?.transition?.delayChildren;ee.delay=N1(p.enteringChildren,t,de)}b.push({animation:X,options:ee})}}),w.size){const{initial:R}=g,M={},T=typeof R!="boolean"&&Ta(t,Array.isArray(R)?R[0]:R,t.presenceContext?.custom);T&&T.transition&&(M.transition=T.transition),w.forEach(F=>{const I=t.getValue(F);I&&(I.liveStyle=!0);const E=T&&!Array.isArray(R)?T[F]:void 0,L=t.getBaseTargetFromProps(g,F);M[F]=(E!==void 0?E:L!==void 0&&!ct(L)?L:t.initialValues[F]===void 0?t.baseTarget[F]:void 0)??null}),b.push({animation:M})}const k=y&&t.blockInitialAnimation||i&&!x&&(g.initial===!1||g.initial===g.animate);return i=l=!1,!k&&b.length?e(b):Promise.resolve()}function d(f,g){if(s[f].isActive===g)return Promise.resolve();t.variantChildren?.forEach(x=>x.animationState?.setActive(f,g)),s[f].isActive=g;const p=u(f);for(const x in s)s[x].protectedKeys={};return p}return{animateChanges:u,setActive:d,setAnimateFunction:f=>{e=f(t)},getState:()=>s,reset:()=>{s=Gy(),l=!0}}}function _T(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!ew(e,t):!1}function Gy(){const t={};for(const e of Mm)t[e]={isActive:e==="animate",protectedKeys:{},needsAnimating:{},prevResolvedValues:{}};return t}function zf(t,e){t.min=e.min,t.max=e.max}function wn(t,e){zf(t.x,e.x),zf(t.y,e.y)}function Ky(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const tw=1e-4,NT=1-tw,TT=1+tw,nw=.01,kT=0-nw,ET=0+nw;function Ot(t){return t.max-t.min}function AT(t,e,s){return Math.abs(t-e)<=s}function Yy(t,e,s,i=.5){t.origin=i,t.originPoint=Ve(e.min,e.max,t.origin),t.scale=Ot(s)/Ot(e),t.translate=Ve(s.min,s.max,t.origin)-t.originPoint,(t.scale>=NT&&t.scale<=TT||isNaN(t.scale))&&(t.scale=1),(t.translate>=kT&&t.translate<=ET||isNaN(t.translate))&&(t.translate=0)}function nl(t,e,s,i){Yy(t.x,e.x,s.x,i?i.originX:void 0),Yy(t.y,e.y,s.y,i?i.originY:void 0)}function Fy(t,e,s,i=0){const l=i?Ve(s.min,s.max,i):s.min;t.min=l+e.min,t.max=t.min+Ot(e)}function CT(t,e,s,i){Fy(t.x,e.x,s.x,i?.x),Fy(t.y,e.y,s.y,i?.y)}function Xy(t,e,s,i=0){const l=i?Ve(s.min,s.max,i):s.min;t.min=e.min-l,t.max=t.min+Ot(e)}function Lc(t,e,s,i){Xy(t.x,e.x,s.x,i?.x),Xy(t.y,e.y,s.y,i?.y)}function Jy(t,e,s,i,l){return t-=e,t=Oc(t,1/s,i),l!==void 0&&(t=Oc(t,1/l,i)),t}function RT(t,e=0,s=1,i=.5,l,u=t,d=t){if(Pn.test(e)&&(e=parseFloat(e),e=Ve(d.min,d.max,e/100)-d.min),typeof e!="number")return;let f=Ve(u.min,u.max,i);t===u&&(f-=e),t.min=Jy(t.min,e,s,f,l),t.max=Jy(t.max,e,s,f,l)}function Wy(t,e,[s,i,l],u,d){RT(t,e[s],e[i],e[l],e.scale,u,d)}const OT=["x","scaleX","originX"],DT=["y","scaleY","originY"];function Qy(t,e,s,i){Wy(t.x,e,OT,s?s.x:void 0,i?i.x:void 0),Wy(t.y,e,DT,s?s.y:void 0,i?i.y:void 0)}function Zy(t){return t.translate===0&&t.scale===1}function sw(t){return Zy(t.x)&&Zy(t.y)}function eb(t,e){return t.min===e.min&&t.max===e.max}function MT(t,e){return eb(t.x,e.x)&&eb(t.y,e.y)}function tb(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function aw(t,e){return tb(t.x,e.x)&&tb(t.y,e.y)}function nb(t){return Ot(t.x)/Ot(t.y)}function sb(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function Mn(t){return[t("x"),t("y")]}function ab(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const qr={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(ie.test(t))t=parseFloat(t);else return t;const s=ab(t,e.target.x),i=ab(t,e.target.y);return`${s}% ${i}%`}},UT={correct:(t,{treeScale:e,projectionDelta:s})=>{const i=t,l=nn.parse(t);if(l.length>5)return i;const u=nn.createTransformer(t),d=typeof l[0]!="number"?1:0,f=s.x.scale*e.x,g=s.y.scale*e.y;l[0+d]/=f,l[1+d]/=g;const p=Ve(f,g,.5);return typeof l[2+d]=="number"&&(l[2+d]/=p),typeof l[3+d]=="number"&&(l[3+d]/=p),u(l)}};function LT(t,e,s){let i="";const l=t.x.translate/e.x,u=t.y.translate/e.y,d=s?.z||0;if((l||u||d)&&(i=`translate3d(${l}px, ${u}px, ${d}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),s){const{transformPerspective:p,rotate:x,pathRotation:y,rotateX:b,rotateY:w,skewX:j,skewY:N}=s;p&&(i=`perspective(${p}px) ${i}`),x&&(i+=`rotate(${x}deg) `),y&&(i+=`rotate(${y}deg) `),b&&(i+=`rotateX(${b}deg) `),w&&(i+=`rotateY(${w}deg) `),j&&(i+=`skewX(${j}deg) `),N&&(i+=`skewY(${N}deg) `)}const f=t.x.scale*e.x,g=t.y.scale*e.y;return(f!==1||g!==1)&&(i+=`scale(${f}, ${g})`),i||"none"}const zT=Am.length,ib=t=>typeof t=="number"||ie.test(t);function PT(t,e,s,i,l,u){l?(t.opacity=Ve(0,s.opacity??1,$T(i)),t.opacityExit=Ve(e.opacity??1,0,BT(i))):u&&(t.opacity=Ve(e.opacity??1,s.opacity??1,i));for(let d=0;d<zT;d++){const f=Am[d];let g=rb(e,f),p=rb(s,f);if(g===void 0&&p===void 0)continue;g||(g=0),p||(p=0),g===0||p===0||ib(g)===ib(p)?(t[f]=Math.max(Ve(Dc(g),Dc(p),i),0),(Pn.test(p)||Pn.test(g))&&(t[f]+="%")):t[f]=p}(e.rotate||s.rotate)&&(t.rotate=Ve(e.rotate||0,s.rotate||0,i))}function rb(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const $T=iw(0,.5,Yv),BT=iw(.5,.95,kn);function iw(t,e,s){return i=>i<t?0:i>e?1:s(il(t,e,i))}function VT(t,e,s){const i=ct(t)?t:Ca(t);return i.start(km("",i,e,s)),i.animation}function hl(t,e,s,i={passive:!0}){return t.addEventListener(e,s,i),()=>t.removeEventListener(e,s,i)}const qT=(t,e)=>t.depth-e.depth;class HT{constructor(){this.children=[],this.isDirty=!1}add(e){dm(this.children,e),this.isDirty=!0}remove(e){kc(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(qT),this.isDirty=!1,this.children.forEach(e)}}function IT(t,e){const s=mt.now(),i=({timestamp:l})=>{const u=l-s;u>=e&&($n(i),t(u-e))};return ze.setup(i,!0),()=>$n(i)}function jc(t){return ct(t)?t.get():t}class GT{constructor(){this.members=[]}add(e){dm(this.members,e);for(let s=this.members.length-1;s>=0;s--){const i=this.members[s];if(i===e||i===this.lead||i===this.prevLead)continue;const l=i.instance;(!l||l.isConnected===!1)&&!i.snapshot&&(kc(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(kc(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const s=this.members[this.members.length-1];s&&this.promote(s)}}relegate(e){for(let s=this.members.indexOf(e)-1;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1&&i.instance?.isConnected!==!1)return this.promote(i),!0}return!1}promote(e,s){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:l}=i.options,{layoutDependency:u}=e.options;(l===void 0||l!==u)&&(e.resumeFrom=i,s&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const KT={borderRadius:{...qr,applyTo:[...Am]},borderTopLeftRadius:qr,borderTopRightRadius:qr,borderBottomLeftRadius:qr,borderBottomRightRadius:qr,boxShadow:UT},Sc={hasAnimatedSinceResize:!0,hasEverUpdated:!1};Object.assign(dl,{...KT,...dl});const ef=["","X","Y","Z"],YT=1e3;let FT=0;function tf(t,e,s,i){const{latestValues:l}=e;l[t]&&(s[t]=l[t],e.setStaticValue(t,0),i&&(i[t]=0))}function rw(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const s=O1(e);if(window.MotionHasOptimisedAnimation(s,"transform")){const{layout:l,layoutId:u}=t.options;window.MotionCancelOptimisedAnimation(s,"transform",ze,!(l||u))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&rw(i)}function lw({attachResizeListener:t,defaultParent:e,measureScroll:s,checkIsScrollRoot:i,resetTransform:l}){return class{constructor(d={},f=e?.()){this.id=FT++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(WT),this.nodes.forEach(a3),this.nodes.forEach(i3),this.nodes.forEach(QT)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=d,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let g=0;g<this.path.length;g++)this.path[g].shouldResetTransform=!0;this.root===this&&(this.nodes=new HT)}addEventListener(d,f){return this.eventHandlers.has(d)||this.eventHandlers.set(d,new Ec),this.eventHandlers.get(d).add(f)}notifyListeners(d,...f){const g=this.eventHandlers.get(d);g&&g.notify(...f)}hasListeners(d){return this.eventHandlers.has(d)}mount(d){if(this.instance)return;this.isSVG=Cm(d)&&!oT(d),this.instance=d;const{layoutId:f,layout:g,visualElement:p}=this.options;if(p&&!p.current&&p.mount(d),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(g||f)&&(this.isLayoutDirty=!0),t){let x,y=0;const b=()=>this.root.updateBlockedByResize=!1;ze.read(()=>{y=window.innerWidth}),t(d,()=>{const w=window.innerWidth;w!==y&&(y=w,this.root.updateBlockedByResize=!0,x&&x(),x=IT(b,250),Sc.hasAnimatedSinceResize&&(Sc.hasAnimatedSinceResize=!1,this.nodes.forEach(cb)))})}f&&this.root.registerSharedNode(f,this),this.options.animate!==!1&&p&&(f||g)&&this.addEventListener("didUpdate",({delta:x,hasLayoutChanged:y,hasRelativeLayoutChanged:b,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const j=this.options.transition||p.getDefaultTransition()||u3,{onLayoutAnimationStart:N,onLayoutAnimationComplete:_}=p.getProps(),k=!this.targetLayout||!aw(this.targetLayout,w),R=!y&&b;if(this.options.layoutRoot||this.resumeFrom||R||y&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const M={...Tm(j,"layout"),onPlay:N,onComplete:_};(p.shouldReduceMotion||this.options.layoutRoot)&&(M.delay=0,M.type=!1),this.startAnimation(M),this.setAnimationOrigin(x,R,M.path)}else y||cb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const d=this.getStack();d&&d.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),$n(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(r3),this.animationId++)}getTransformTemplate(){const{visualElement:d}=this.options;return d&&d.getProps().transformTemplate}willUpdate(d=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&rw(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let x=0;x<this.path.length;x++){const y=this.path[x];y.shouldResetTransform=!0,(typeof y.latestValues.x=="string"||typeof y.latestValues.y=="string")&&(y.isLayoutDirty=!0),y.updateScroll("snapshot"),y.options.layoutRoot&&y.willUpdate(!1)}const{layoutId:f,layout:g}=this.options;if(f===void 0&&!g)return;const p=this.getTransformTemplate();this.prevTransformTemplateValue=p?p(this.latestValues,""):void 0,this.updateSnapshot(),d&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const g=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),g&&this.nodes.forEach(e3),this.nodes.forEach(lb);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ob);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(t3),this.nodes.forEach(n3),this.nodes.forEach(s3),this.nodes.forEach(XT),this.nodes.forEach(JT)):this.nodes.forEach(ob),this.clearAllSnapshots();const f=mt.now();lt.delta=ms(0,1e3/60,f-lt.timestamp),lt.timestamp=f,lt.isProcessing=!0,Fh.update.process(lt),Fh.preRender.process(lt),Fh.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Om.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ZT),this.sharedNodes.forEach(l3)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ze.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ze.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ot(this.snapshot.measuredBox.x)&&!Ot(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let g=0;g<this.path.length;g++)this.path[g].updateScroll();const d=this.layout;this.layout=this.measure(!1),this.layoutCorrected||(this.layoutCorrected=rt()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:f}=this.options;f&&f.notify("LayoutMeasure",this.layout.layoutBox,d?d.layoutBox:void 0)}updateScroll(d="measure"){let f=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===d&&(f=!1),f&&this.instance){const g=i(this.instance);this.scroll={animationId:this.root.animationId,phase:d,isRoot:g,offset:s(this.instance),wasRoot:this.scroll?this.scroll.isRoot:g}}}resetTransform(){if(!l)return;const d=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,f=this.projectionDelta&&!sw(this.projectionDelta),g=this.getTransformTemplate(),p=g?g(this.latestValues,""):void 0,x=p!==this.prevTransformTemplateValue;d&&this.instance&&(f||ga(this.latestValues)||x)&&(l(this.instance,p),this.shouldResetTransform=!1,this.scheduleRender())}measure(d=!0){const f=this.measurePageBox();let g=this.removeElementScroll(f);return d&&(g=this.removeTransform(g)),d3(g),{animationId:this.root.animationId,measuredBox:f,layoutBox:g,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:d}=this.options;if(!d)return rt();const f=d.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(h3))){const{scroll:p}=this.root;p&&(Ln(f.x,p.offset.x),Ln(f.y,p.offset.y))}return f}removeElementScroll(d){const f=rt();if(wn(f,d),this.scroll?.wasRoot)return f;for(let g=0;g<this.path.length;g++){const p=this.path[g],{scroll:x,options:y}=p;p!==this.root&&x&&y.layoutScroll&&(x.wasRoot&&wn(f,d),Ln(f.x,x.offset.x),Ln(f.y,x.offset.y))}return f}applyTransform(d,f=!1,g){const p=g||rt();wn(p,d);for(let x=0;x<this.path.length;x++){const y=this.path[x];!f&&y.options.layoutScroll&&y.scroll&&y!==y.root&&(Ln(p.x,-y.scroll.offset.x),Ln(p.y,-y.scroll.offset.y)),ga(y.latestValues)&&xc(p,y.latestValues,y.layout?.layoutBox)}return ga(this.latestValues)&&xc(p,this.latestValues,this.layout?.layoutBox),p}removeTransform(d){const f=rt();wn(f,d);for(let g=0;g<this.path.length;g++){const p=this.path[g];if(!ga(p.latestValues))continue;let x;p.instance&&(Uf(p.latestValues)&&p.updateSnapshot(),x=rt(),wn(x,p.measurePageBox())),Qy(f,p.latestValues,p.snapshot?.layoutBox,x)}return ga(this.latestValues)&&Qy(f,this.latestValues),f}setTargetDelta(d){this.targetDelta=d,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(d){this.options={...this.options,...d,crossfade:d.crossfade!==void 0?d.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==lt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(d=!1){const f=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=f.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=f.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=f.isSharedProjectionDirty);const g=!!this.resumingFrom||this!==f;if(!(d||g&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:x,layoutId:y}=this.options;if(!this.layout||!(x||y))return;this.resolvedRelativeTargetAt=lt.timestamp;const b=this.getClosestProjectingParent();!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&b&&b.layout?this.createRelativeTarget(b,this.layout.layoutBox,b.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=rt(),this.targetWithTransforms=rt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),CT(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):wn(this.target,this.layout.layoutBox),$1(this.target,this.targetDelta)):wn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?this.createRelativeTarget(b,this.target,b.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||Uf(this.parent.latestValues)||P1(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(d,f,g){this.relativeParent=d,this.forceRelativeParentToResolveTarget(),this.relativeTarget=rt(),this.relativeTargetOrigin=rt(),Lc(this.relativeTargetOrigin,f,g,this.options.layoutAnchor||void 0),wn(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const d=this.getLead(),f=!!this.resumingFrom||this!==d;let g=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(g=!1),f&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(g=!1),this.resolvedRelativeTargetAt===lt.timestamp&&(g=!1),g)return;const{layout:p,layoutId:x}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(p||x))return;wn(this.layoutCorrected,this.layout.layoutBox);const y=this.treeScale.x,b=this.treeScale.y;H5(this.layoutCorrected,this.treeScale,this.path,f),d.layout&&!d.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(d.target=d.layout.layoutBox,d.targetWithTransforms=rt());const{target:w}=d;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Ky(this.prevProjectionDelta.x,this.projectionDelta.x),Ky(this.prevProjectionDelta.y,this.projectionDelta.y)),nl(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==y||this.treeScale.y!==b||!sb(this.projectionDelta.x,this.prevProjectionDelta.x)||!sb(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(d=!0){if(this.options.visualElement?.scheduleRender(),d){const f=this.getStack();f&&f.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ai(),this.projectionDelta=Ai(),this.projectionDeltaWithTransform=Ai()}setAnimationOrigin(d,f=!1,g){const p=this.snapshot,x=p?p.latestValues:{},y={...this.latestValues},b=Ai();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!f;const w=rt(),j=p?p.source:void 0,N=this.layout?this.layout.source:void 0,_=j!==N,k=this.getStack(),R=!k||k.members.length<=1,M=!!(_&&!R&&this.options.crossfade===!0&&!this.path.some(c3));this.animationProgress=0;let T;const F=g?.interpolateProjection(d);this.mixTargetDelta=I=>{const E=I/1e3,L=F?.(E);L?(b.x.translate=L.x,b.x.scale=Ve(d.x.scale,1,E),b.x.origin=d.x.origin,b.x.originPoint=d.x.originPoint,b.y.translate=L.y,b.y.scale=Ve(d.y.scale,1,E),b.y.origin=d.y.origin,b.y.originPoint=d.y.originPoint):(ub(b.x,d.x,E),ub(b.y,d.y,E)),this.setTargetDelta(b),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Lc(w,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),o3(this.relativeTarget,this.relativeTargetOrigin,w,E),T&&MT(this.relativeTarget,T)&&(this.isProjectionDirty=!1),T||(T=rt()),wn(T,this.relativeTarget)),_&&(this.animationValues=y,PT(y,x,this.latestValues,E,M,R)),L&&L.rotate!==void 0&&(this.animationValues||(this.animationValues=y),this.animationValues.pathRotation=L.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=E},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(d){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&($n(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ze.update(()=>{Sc.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Ca(0)),this.motionValue.jump(0,!1),this.currentAnimation=VT(this.motionValue,[0,1e3],{...d,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),d.onUpdate&&d.onUpdate(f)},onComplete:()=>{d.onComplete&&d.onComplete(),this.completeAnimation()}}),TN(this.currentAnimation,this),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const d=this.getStack();d&&d.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(YT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const d=this.getLead(),{targetWithTransforms:f,layout:g,latestValues:p}=d;let{target:x}=d;if(!(!f||!x||!g)){if(this!==d&&this.layout&&g&&ow(this.options.animationType,this.layout.layoutBox,g.layoutBox)){x=this.target||rt();const y=Ot(this.layout.layoutBox.x);x.x.min=d.target.x.min,x.x.max=x.x.min+y;const b=Ot(this.layout.layoutBox.y);x.y.min=d.target.y.min,x.y.max=x.y.min+b}wn(f,x),xc(f,p),nl(this.projectionDeltaWithTransform,this.layoutCorrected,f,p)}}registerSharedNode(d,f){this.sharedNodes.has(d)||this.sharedNodes.set(d,new GT),this.sharedNodes.get(d).add(f);const p=f.options.initialPromotionConfig;f.promote({transition:p?p.transition:void 0,preserveFollowOpacity:p&&p.shouldPreserveFollowOpacity?p.shouldPreserveFollowOpacity(f):void 0})}isLead(){const d=this.getStack();return d?d.lead===this:!0}getLead(){const{layoutId:d}=this.options;return d?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:d}=this.options;return d?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:d}=this.options;if(d)return this.root.sharedNodes.get(d)}promote({needsReset:d,transition:f,preserveFollowOpacity:g}={}){const p=this.getStack();p&&p.promote(this,g),d&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){const d=this.getStack();return d?d.relegate(this):!1}resetSkewAndRotation(){const{visualElement:d}=this.options;if(!d)return;let f=!1;const{latestValues:g}=d;if((g.z||g.rotate||g.rotateX||g.rotateY||g.rotateZ||g.skewX||g.skewY)&&(f=!0),!f)return;const p={};g.z&&tf("z",d,p,this.animationValues);for(let x=0;x<ef.length;x++)tf(`rotate${ef[x]}`,d,p,this.animationValues),tf(`skew${ef[x]}`,d,p,this.animationValues);d.render();for(const x in p)d.setStaticValue(x,p[x]),this.animationValues&&(this.animationValues[x]=p[x]);d.scheduleRender()}applyProjectionStyles(d,f){if(!this.instance||this.isSVG)return;if(!this.isVisible){d.visibility="hidden";return}const g=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,d.visibility="",d.opacity="",d.pointerEvents=jc(f?.pointerEvents)||"",d.transform=g?g(this.latestValues,""):"none";return}const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=jc(f?.pointerEvents)||""),this.hasProjected&&!ga(this.latestValues)&&(d.transform=g?g({},""):"none",this.hasProjected=!1);return}d.visibility="";const x=p.animationValues||p.latestValues;this.applyTransformsToTarget();let y=LT(this.projectionDeltaWithTransform,this.treeScale,x);g&&(y=g(x,y)),d.transform=y;const{x:b,y:w}=this.projectionDelta;d.transformOrigin=`${b.origin*100}% ${w.origin*100}% 0`,p.animationValues?d.opacity=p===this?x.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:x.opacityExit:d.opacity=p===this?x.opacity!==void 0?x.opacity:"":x.opacityExit!==void 0?x.opacityExit:0;for(const j in dl){if(x[j]===void 0)continue;const{correct:N,applyTo:_,isCSSVariable:k}=dl[j],R=y==="none"?x[j]:N(x[j],p);if(_){const M=_.length;for(let T=0;T<M;T++)d[_[T]]=R}else k?this.options.visualElement.renderState.vars[j]=R:d[j]=R}this.options.layoutId&&(d.pointerEvents=p===this?jc(f?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(d=>d.currentAnimation?.stop()),this.root.nodes.forEach(lb),this.root.sharedNodes.clear()}}}function XT(t){t.updateLayout()}function JT(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:i}=t.layout,{animationType:l}=t.options,u=e.source!==t.layout.source;if(l==="size")Mn(x=>{const y=u?e.measuredBox[x]:e.layoutBox[x],b=Ot(y);y.min=s[x].min,y.max=y.min+b});else if(l==="x"||l==="y"){const x=l==="x"?"y":"x";zf(u?e.measuredBox[x]:e.layoutBox[x],s[x])}else ow(l,e.layoutBox,s)&&Mn(x=>{const y=u?e.measuredBox[x]:e.layoutBox[x],b=Ot(s[x]);y.max=y.min+b,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[x].max=t.relativeTarget[x].min+b)});const d=Ai();nl(d,s,e.layoutBox);const f=Ai();u?nl(f,t.applyTransform(i,!0),e.measuredBox):nl(f,s,e.layoutBox);const g=!sw(d);let p=!1;if(!t.resumeFrom){const x=t.getClosestProjectingParent();if(x&&!x.resumeFrom){const{snapshot:y,layout:b}=x;if(y&&b){const w=t.options.layoutAnchor||void 0,j=rt();Lc(j,e.layoutBox,y.layoutBox,w);const N=rt();Lc(N,s,b.layoutBox,w),aw(j,N)||(p=!0),x.options.layoutRoot&&(t.relativeTarget=N,t.relativeTargetOrigin=j,t.relativeParent=x)}}}t.notifyListeners("didUpdate",{layout:s,snapshot:e,delta:f,layoutDelta:d,hasLayoutChanged:g,hasRelativeLayoutChanged:p})}else if(t.isLead()){const{onExitComplete:s}=t.options;s&&s()}t.options.transition=void 0}function WT(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function QT(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ZT(t){t.clearSnapshot()}function lb(t){t.clearMeasurements()}function e3(t){t.isLayoutDirty=!0,t.updateLayout()}function ob(t){t.isLayoutDirty=!1}function t3(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function n3(t){t.relativeTarget&&t.relativeParent?.isLayoutDirty&&(t.currentAnimation?t.isLayoutDirty=!0:(t.targetDelta=void 0,t.removeRelativeTarget()))}function s3(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function cb(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function a3(t){t.resolveTargetDelta()}function i3(t){t.calcProjection()}function r3(t){t.resetSkewAndRotation()}function l3(t){t.removeLeadSnapshot()}function ub(t,e,s){t.translate=Ve(e.translate,0,s),t.scale=Ve(e.scale,1,s),t.origin=e.origin,t.originPoint=e.originPoint}function db(t,e,s,i){t.min=Ve(e.min,s.min,i),t.max=Ve(e.max,s.max,i)}function o3(t,e,s,i){db(t.x,e.x,s.x,i),db(t.y,e.y,s.y,i)}function c3(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const u3={duration:.45,ease:[.4,0,.1,1]},hb=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),fb=hb("applewebkit/")&&!hb("chrome/")?Math.round:kn;function mb(t){t.min=fb(t.min),t.max=fb(t.max)}function d3(t){mb(t.x),mb(t.y)}function ow(t,e,s){return t==="position"||t==="preserve-aspect"&&!AT(nb(e),nb(s),.2)}function h3(t){return t!==t.root&&t.scroll?.wasRoot}const f3=lw({attachResizeListener:(t,e)=>hl(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),nf={current:void 0},cw=lw({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!nf.current){const t=new f3({});t.mount(window),t.setOptions({layoutScroll:!0}),nf.current=t}return nf.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),kl=A.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function pb(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function m3(...t){return e=>{let s=!1;const i=t.map(l=>{const u=pb(l,e);return!s&&typeof u=="function"&&(s=!0),u});if(s)return()=>{for(let l=0;l<i.length;l++){const u=i[l];typeof u=="function"?u():pb(t[l],null)}}}}function p3(...t){return A.useCallback(m3(...t),t)}class g3 extends A.Component{getSnapshotBeforeUpdate(e){const s=this.props.childRef.current;if(gc(s)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=s.offsetParent,l=gc(i)&&i.offsetWidth||0,u=gc(i)&&i.offsetHeight||0,d=getComputedStyle(s),f=this.props.sizeRef.current;f.height=parseFloat(d.height),f.width=parseFloat(d.width),f.top=s.offsetTop,f.left=s.offsetLeft,f.right=l-f.width-f.left,f.bottom=u-f.height-f.top,f.direction=d.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function x3({children:t,isPresent:e,anchorX:s,anchorY:i,root:l,pop:u}){const d=A.useId(),f=A.useRef(null),g=A.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:p}=A.useContext(kl),x=u!==!1?t.props?.ref??t?.ref:void 0,y=p3(f,x);return A.useInsertionEffect(()=>{const{width:b,height:w,top:j,left:N,right:_,bottom:k,direction:R}=g.current;if(e||u===!1||!f.current||!b||!w)return;const M=R==="rtl",T=s==="left"?M?`right: ${_}`:`left: ${N}`:M?`left: ${N}`:`right: ${_}`,F=i==="bottom"?`bottom: ${k}`:`top: ${j}`;f.current.dataset.motionPopId=d;const I=document.createElement("style");p&&(I.nonce=p);const E=l??document.head;return E.appendChild(I),I.sheet&&I.sheet.insertRule(`Unknown directive
26 [data-motion-pop-id="${d}"] {Syntax not understood
27 position: absolute !important;Unknown directive
28 width: ${b}px !important;Unknown directive
29 height: ${w}px !important;Unknown directive
30 ${T}px !important;Syntax not understood
31 ${F}px !important;Syntax not understood
32 }Syntax not understood
33 `),()=>{f.current?.removeAttribute("data-motion-pop-id"),E.contains(I)&&E.removeChild(I)}},[e]),o.jsx(g3,{isPresent:e,childRef:f,sizeRef:g,pop:u,children:u===!1?t:A.cloneElement(t,{ref:y})})}const y3=({children:t,initial:e,isPresent:s,onExitComplete:i,custom:l,presenceAffectsLayout:u,mode:d,anchorX:f,anchorY:g,root:p})=>{const x=Aa(b3),y=A.useId(),b=A.useRef(s),w=A.useRef(i);zi(()=>{b.current=s,w.current=i});let j=!0,N=A.useMemo(()=>(j=!1,{id:y,initial:e,isPresent:s,custom:l,onExitComplete:_=>{x.set(_,!0);for(const k of x.values())if(!k)return;i&&i()},register:_=>(x.set(_,!1),()=>{x.delete(_),!b.current&&!x.size&&w.current?.()})}),[s,x,i]);return u&&j&&(N={...N}),A.useMemo(()=>{x.forEach((_,k)=>x.set(k,!1))},[s]),A.useEffect(()=>{!s&&!x.size&&i&&i()},[s]),t=o.jsx(x3,{pop:d==="popLayout",isPresent:s,anchorX:f,anchorY:g,root:p,children:t}),o.jsx(nu.Provider,{value:N,children:t})};function b3(){return new Map}function uw(t=!0){const e=A.useContext(nu);if(e===null)return[!0,null];const{isPresent:s,onExitComplete:i,register:l}=e,u=A.useId();A.useEffect(()=>{if(t)return l(u)},[t]);const d=A.useCallback(()=>t&&i&&i(u),[u,i,t]);return!s&&i?[!1,d]:[!0]}const Hr=t=>t.key||"";function gb(t){const e=[];return A.Children.forEach(t,s=>{A.isValidElement(s)&&e.push(s)}),e}const kt=({children:t,custom:e,initial:s=!0,onExitComplete:i,presenceAffectsLayout:l=!0,mode:u="sync",propagate:d=!1,anchorX:f="left",anchorY:g="top",root:p})=>{const[x,y]=uw(d),b=A.useMemo(()=>gb(t),[t]),w=d&&!x?[]:b.map(Hr),j=A.useRef(!0),N=Aa(()=>new Map),_=A.useRef(new Set),[k,R]=A.useState(b),[M,T]=A.useState(b);zi(()=>{d&&!x&&!M.length&&y?.()},[x,d,M.length,y]),zi(()=>{j.current=!1;for(let E=0;E<M.length;E++){const L=Hr(M[E]);w.includes(L)?(N.delete(L),_.current.delete(L)):N.get(L)!==!0&&N.set(L,!1)}},[M,w.length,w.join("-")]);const F=[];if(b!==k){let E=[...b],L=0;for(const q of M){const G=w.indexOf(Hr(q));G===-1?(E.splice(L++,0,q),F.push(q)):L=G+F.length+1}return F.every(q=>N.get(Hr(q)))?E=b:u==="wait"&&(E=F),T(gb(E)),R(b),null}const{forceRender:I}=A.useContext(um);return o.jsx(o.Fragment,{children:M.map(E=>{const L=Hr(E),q=d&&!x?!1:b===M||w.includes(L),G=()=>{if(_.current.has(L))return;if(N.has(L))_.current.add(L),N.set(L,!0);else return;let me=!0;N.forEach(xe=>{xe||(me=!1)}),me&&(I?.(),R([]),d&&y?.(),i&&i())};return o.jsx(y3,{isPresent:q,initial:!j.current||s?void 0:!1,custom:e,presenceAffectsLayout:l,mode:u,root:p,onExitComplete:q?void 0:G,anchorX:f,anchorY:g,children:E},L)})})},dw=A.createContext({strict:!1}),xb={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let yb=!1;function v3(){if(yb)return;const t={};for(const e in xb)t[e]={isEnabled:s=>xb[e].some(i=>!!s[i])};Y1(t),yb=!0}function hw(){return v3(),gT()}function w3(t){const e=hw();for(const s in t)e[s]={...e[s],...t[s]};Y1(e)}const ou=A.createContext({});function j3(t,e){if(lu(t)){const{initial:s,animate:i}=t;return{initial:s===!1||ul(s)?s:void 0,animate:ul(i)?i:void 0}}return t.inherit!==!1?e:{}}function S3(t){const{initial:e,animate:s}=j3(t,A.useContext(ou));return A.useMemo(()=>({initial:e,animate:s}),[bb(e),bb(s)])}function bb(t){return Array.isArray(t)?t.join(" "):t}const zm=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function fw(t,e,s){for(const i in e)!ct(e[i])&&!J1(i,s)&&(t[i]=e[i])}function _3({transformTemplate:t},e){return A.useMemo(()=>{const s=zm();return Rm(s,e,t),Object.assign({},s.vars,s.style)},[e])}function N3(t,e){const s=t.style||{},i={};return fw(i,s,t),Object.assign(i,_3(t,e)),i}function T3(t,e){const s={},i=N3(t,e);return t.drag&&t.dragListener!==!1&&(s.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(s.tabIndex=0),s.style=i,s}const mw=()=>({...zm(),attrs:{}});function k3(t,e,s,i){const l=A.useMemo(()=>{const u=mw();return L1(u,e,Q1(i),t.transformTemplate,t.style),{...u.attrs,style:{...u.style}}},[e]);if(t.style){const u={};fw(u,t.style,t),l.style={...u,...l.style}}return l}const E3=new Set(["animate","exit","variants","initial","style","values","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function zc(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||E3.has(t)}function A3(t,e){return t.startsWith("on")?!zc(t):e?.(t)??!zc(t)}function C3(t,e,s,i){const l={};for(const u in t)u==="values"&&typeof t.values=="object"||ct(t[u])||(A3(u,i)||s===!0&&zc(u)||!e&&!zc(u)||t.draggable&&u.startsWith("onDrag"))&&(l[u]=t[u]);return l}const R3=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Pm(t){return typeof t!="string"||t.includes("-")?!1:!!(R3.indexOf(t)>-1||/[A-Z]/u.test(t))}function O3(t,e,s,{latestValues:i},l,u=!1,d,f){const p=(d??Pm(t)?k3:T3)(e,i,l,t),x=C3(e,typeof t=="string",u,f),y=t!==A.Fragment?{...x,...p,ref:s}:{},{children:b}=e,w=A.useMemo(()=>ct(b)?b.get():b,[b]);return A.createElement(t,{...y,children:w})}function D3({scrapeMotionValuesFromProps:t,createRenderState:e},s,i,l){return{latestValues:M3(s,i,l,t),renderState:e()}}function M3(t,e,s,i){const l={},u=i(t,{});for(const b in u)l[b]=jc(u[b]);let{initial:d,animate:f}=t;const g=lu(t),p=G1(t);e&&p&&!g&&t.inherit!==!1&&(d===void 0&&(d=e.initial),f===void 0&&(f=e.animate));let x=s?s.initial===!1:!1;x=x||d===!1;const y=x?f:d;if(y&&typeof y!="boolean"&&!ru(y)){const b=Array.isArray(y)?y:[y];for(let w=0;w<b.length;w++){const j=E1(t,b[w]);if(j){const{transitionEnd:N,transition:_,...k}=j;for(const R in k){let M=k[R];if(Array.isArray(M)){const T=x?M.length-1:0;M=M[T]}M!==null&&(l[R]=M)}for(const R in N)l[R]=N[R]}}}return l}const pw=t=>(e,s)=>{const i=A.useContext(ou),l=A.useContext(nu),u=()=>D3(t,e,i,l);return s?u():Aa(u)},U3=pw({scrapeMotionValuesFromProps:Lm,createRenderState:zm}),L3=pw({scrapeMotionValuesFromProps:Z1,createRenderState:mw}),z3=Symbol.for("motionComponentSymbol");function P3(t,e,s){const i=A.useRef(s);A.useInsertionEffect(()=>{i.current=s});const l=A.useRef(null);return A.useCallback(u=>{u&&t.onMount?.(u),e&&(u?e.mount(u):e.unmount());const d=i.current;if(typeof d=="function")if(u){const f=d(u);typeof f=="function"&&(l.current=f)}else l.current?(l.current(),l.current=null):d(u);else d&&(d.current=u)},[e])}const gw=A.createContext({});function _i(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function $3(t,e,s,i,l,u){const{visualElement:d}=A.useContext(ou),f=A.useContext(dw),g=A.useContext(nu),p=A.useContext(kl),x=p.reducedMotion,y=p.skipAnimations,b=A.useRef(null),w=A.useRef(!1);i=i||f.renderer,!b.current&&i&&(b.current=i(t,{visualState:e,parent:d,props:s,presenceContext:g,blockInitialAnimation:g?g.initial===!1:!1,reducedMotionConfig:x,skipAnimations:y,isSVG:u}),w.current&&b.current&&(b.current.manuallyAnimateOnMount=!0));const j=b.current,N=A.useContext(gw);j&&!j.projection&&l&&(j.type==="html"||j.type==="svg")&&B3(b.current,s,l,N);const _=A.useRef(!1);A.useInsertionEffect(()=>{j&&_.current&&j.update(s,g)});const k=s[R1],R=A.useRef(!!k&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(k)&&window.MotionHasOptimisedAnimation?.(k));return zi(()=>{!w.current||!j||(j.animationState?.animateChanges(),j.enteringChildren=void 0)},[]),zi(()=>{w.current=!0,j&&(_.current=!0,window.MotionIsMounted=!0,j.updateFeatures(),j.scheduleRenderMicrotask(),R.current&&j.animationState&&j.animationState.animateChanges())}),A.useEffect(()=>{j&&(!R.current&&j.animationState&&j.animationState.animateChanges(),R.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(k)}),R.current=!1),j.enteringChildren=void 0)}),j}function B3(t,e,s,i){const{layoutId:l,layout:u,drag:d,dragConstraints:f,layoutScroll:g,layoutRoot:p,layoutAnchor:x,layoutCrossfade:y}=e;t.projection=new s(t.latestValues,e["data-framer-portal-id"]?void 0:xw(t.parent)),t.projection.setOptions({layoutId:l,layout:u,alwaysMeasureLayout:!!d||f&&_i(f),visualElement:t,animationType:typeof u=="string"?u:"both",initialPromotionConfig:i,crossfade:y,layoutScroll:g,layoutRoot:p,layoutAnchor:x})}function xw(t){if(t)return t.options.allowProjection!==!1?t.projection:xw(t.parent)}function sf(t,{forwardMotionProps:e=!1,type:s}={},i,l){i&&w3(i);const u=s?s==="svg":Pm(t),d=u?L3:U3;function f(p,x){let y;const b={...A.useContext(kl),...p,layoutId:V3(p)},{isStatic:w,isValidProp:j}=b,N=S3(p),_=d(p,w);if(!w&&typeof window<"u"){q3();const k=H3(b);y=k.MeasureLayout,N.visualElement=$3(t,_,b,l,k.ProjectionNode,u)}return o.jsxs(ou.Provider,{value:N,children:[y&&N.visualElement?o.jsx(y,{visualElement:N.visualElement,...b}):null,O3(t,p,P3(_,N.visualElement,x),_,w,e,u,j)]})}f.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const g=A.forwardRef(f);return g[z3]=t,g}function V3({layoutId:t}){const e=A.useContext(um).id;return e&&t!==void 0?e+"-"+t:t}function q3(t,e){A.useContext(dw).strict}function H3(t){const e=hw(),{drag:s,layout:i}=e;if(!s&&!i)return{};const l={...s,...i};return{MeasureLayout:s?.isEnabled(t)||i?.isEnabled(t)?l.MeasureLayout:void 0,ProjectionNode:l.ProjectionNode}}function I3(t,e){if(typeof Proxy>"u")return sf;const s=new Map,i=(u,d)=>sf(u,d,t,e),l=(u,d)=>i(u,d);return new Proxy(l,{get:(u,d)=>d==="create"?i:(s.has(d)||s.set(d,sf(d,void 0,t,e)),s.get(d))})}const G3=(t,e)=>e.isSVG??Pm(t)?new wT(e):new bT(e,{allowProjection:t!==A.Fragment});class K3 extends Ys{constructor(e){super(e),e.animationState||(e.animationState=ST(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();ru(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:s}=this.node.prevProps||{};e!==s&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let Y3=0;class F3 extends Ys{constructor(){super(...arguments),this.id=Y3++}update(){const{presenceContext:e,prevPresenceContext:s,animationState:i}=this.node;if(!e||!i)return;const{isPresent:l,onExitComplete:u}=e,d=s?.isPresent;if(l===d)return;if(l&&d===!1){if(this.exit===!0){const{initial:g}=this.node.getProps();if(g&&!Array.isArray(g)){const{transition:p,transitionEnd:x,...y}=Ta(this.node,g)||{};for(const b in y)this.node.getValue(b)?.jump(y[b])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);this.exit=void 0;return}const f=this.exit=i.setActive("exit",!l);u&&!l&&f.then(()=>{this.exit===f&&(this.exit=!0,u(this.id))})}mount(){const{register:e,onExitComplete:s}=this.node.presenceContext||{};s&&s(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const X3={animation:{Feature:K3},exit:{Feature:F3}};function cu(t){return{point:{x:t.pageX,y:t.pageY}}}const J3=t=>e=>Dm(e)&&t(e,cu(e));function sl(t,e,s,i){return hl(t,e,J3(s),i)}const yw=({current:t})=>t?t.ownerDocument.defaultView:null,vb=(t,e)=>Math.abs(t-e);function W3(t,e){const s=vb(t.x,e.x),i=vb(t.y,e.y);return Math.sqrt(s**2+i**2)}const wb=new Set(["auto","scroll"]);class bw{constructor(e,s,{transformPagePoint:i,contextWindow:l=window,dragSnapToOrigin:u=!1,distanceThreshold:d=3,element:f}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=j=>{this.handleScroll(j.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=ac(this.lastRawMoveEventInfo,this.transformPagePoint));const j=af(this.lastMoveEventInfo,this.history),N=this.startEvent!==null,_=W3(j.offset,{x:0,y:0})>=this.distanceThreshold;if(!N&&!_)return;const{point:k}=j;this.history.push({...k,timestamp:mt.now()});const{onStart:R,onMove:M}=this.handlers;N||(R&&R(this.lastMoveEvent,j),this.startEvent=this.lastMoveEvent),M&&M(this.lastMoveEvent,j)},this.handlePointerMove=(j,N)=>{this.lastMoveEvent=j,this.lastRawMoveEventInfo=N,this.lastMoveEventInfo=ac(N,this.transformPagePoint),this.hasPendingMove=!0,ze.update(this.updatePoint,!0)},this.handlePointerUp=(j,N)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:_,onSessionEnd:k,resumeAnimation:R}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&R&&R(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const M=af(j.type==="pointercancel"?this.lastMoveEventInfo:ac(N,this.transformPagePoint),this.history);this.startEvent&&_&&_(j,M),k&&k(j,M)},!Dm(e))return;this.dragSnapToOrigin=u,this.handlers=s,this.transformPagePoint=i,this.distanceThreshold=d,this.contextWindow=l||window;const g=cu(e),p=ac(g,this.transformPagePoint),{point:x}=p,{timestamp:y}=lt;this.history=[{...x,timestamp:y}];const{onSessionStart:b}=s;b&&b(e,af(p,this.history));const w={passive:!0,capture:!0};this.removeListeners=_l(sl(this.contextWindow,"pointermove",this.handlePointerMove,w),sl(this.contextWindow,"pointerup",this.handlePointerUp,w),sl(this.contextWindow,"pointercancel",this.handlePointerUp,w)),f&&this.startScrollTracking(f)}startScrollTracking(e){let s=e.parentElement;for(;s;){const i=getComputedStyle(s);(wb.has(i.overflowX)||wb.has(i.overflowY))&&this.scrollPositions.set(s,{x:s.scrollLeft,y:s.scrollTop}),s=s.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const s=this.scrollPositions.get(e);if(!s)return;const i=e===window,l=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},u={x:l.x-s.x,y:l.y-s.y};u.x===0&&u.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=u.x,this.lastMoveEventInfo.point.y+=u.y):this.history.length>0&&(this.history[0].x-=u.x,this.history[0].y-=u.y),this.scrollPositions.set(e,l),ze.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),$n(this.updatePoint)}}function ac(t,e){return e?{point:e(t.point)}:t}function jb(t,e){return{x:t.x-e.x,y:t.y-e.y}}function af({point:t},e){return{point:t,delta:jb(t,vw(e)),offset:jb(t,Q3(e)),velocity:Z3(e,.1)}}function Q3(t){return t[0]}function vw(t){return t[t.length-1]}function Z3(t,e){if(t.length<2)return{x:0,y:0};let s=t.length-1,i=null;const l=vw(t);for(;s>=0&&(i=t[s],!(l.timestamp-i.timestamp>xn(e)));)s--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&l.timestamp-i.timestamp>xn(e)*2&&(i=t[1]);const u=gn(l.timestamp-i.timestamp);if(u===0)return{x:0,y:0};const d={x:(l.x-i.x)/u,y:(l.y-i.y)/u};return d.x===1/0&&(d.x=0),d.y===1/0&&(d.y=0),d}function ek(t,{min:e,max:s},i){return e!==void 0&&t<e?t=i?Ve(e,t,i.min):Math.max(t,e):s!==void 0&&t>s&&(t=i?Ve(s,t,i.max):Math.min(t,s)),t}function Sb(t,e,s){return{min:e!==void 0?t.min+e:void 0,max:s!==void 0?t.max+s-(t.max-t.min):void 0}}function tk(t,{top:e,left:s,bottom:i,right:l}){return{x:Sb(t.x,s,l),y:Sb(t.y,e,i)}}function _b(t,e){let s=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([s,i]=[i,s]),{min:s,max:i}}function nk(t,e){return{x:_b(t.x,e.x),y:_b(t.y,e.y)}}function sk(t,e){let s=.5;const i=Ot(t),l=Ot(e);return l>i?s=il(e.min,e.max-i,t.min):i>l&&(s=il(t.min,t.max-l,e.min)),ms(0,1,s)}function ak(t,e){const s={};return e.min!==void 0&&(s.min=e.min-t.min),e.max!==void 0&&(s.max=e.max-t.min),s}const Pf=.35;function ik(t=Pf){return t===!1?t=0:t===!0&&(t=Pf),{x:Nb(t,"left","right"),y:Nb(t,"top","bottom")}}function Nb(t,e,s){return{min:Tb(t,e),max:Tb(t,s)}}function Tb(t,e){return typeof t=="number"?t:t[e]||0}const rk=new WeakMap;class lk{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=rt(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:s=!1,distanceThreshold:i}={}){const{presenceContext:l}=this.visualElement;if(l&&l.isPresent===!1)return;const u=y=>{s&&this.snapToCursor(y),this.stopAnimation()},d=(y,b)=>{const{drag:w,dragPropagation:j,onDragStart:N}=this.getProps();if(w&&!j&&(this.openDragLock&&this.openDragLock(),this.openDragLock=G5(w),!this.openDragLock))return;this.latestPointerEvent=y,this.latestPanInfo=b,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Mn(k=>{let R=this.getAxisMotionValue(k).get()||0;if(Pn.test(R)){const{projection:M}=this.visualElement;if(M&&M.layout){const T=M.layout.layoutBox[k];T&&(R=Ot(T)*(parseFloat(R)/100))}}this.originPoint[k]=R}),N&&ze.update(()=>N(y,b),!1,!0),Of(this.visualElement,"transform");const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},f=(y,b)=>{this.latestPointerEvent=y,this.latestPanInfo=b;const{dragPropagation:w,dragDirectionLock:j,onDirectionLock:N,onDrag:_}=this.getProps();if(!w&&!this.openDragLock)return;const{offset:k}=b;if(j&&this.currentDirection===null){this.currentDirection=ck(k),this.currentDirection!==null&&N&&N(this.currentDirection);return}this.updateAxis("x",b.point,k),this.updateAxis("y",b.point,k),this.visualElement.render(),_&&ze.update(()=>_(y,b),!1,!0)},g=(y,b)=>{this.latestPointerEvent=y,this.latestPanInfo=b,this.stop(y,b),this.latestPointerEvent=null,this.latestPanInfo=null},p=()=>{const{dragSnapToOrigin:y}=this.getProps();(y||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:x}=this.getProps();this.panSession=new bw(e,{onSessionStart:u,onStart:d,onMove:f,onSessionEnd:g,resumeAnimation:p},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:x,distanceThreshold:i,contextWindow:yw(this.visualElement),element:this.visualElement.current})}stop(e,s){const i=e||this.latestPointerEvent,l=s||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!l||!i)return;const{velocity:d}=l;this.startAnimation(d);const{onDragEnd:f}=this.getProps();f&&ze.postRender(()=>f(i,l))}cancel(){this.isDragging=!1;const{projection:e,animationState:s}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),s&&s.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,s,i){const{drag:l}=this.getProps();if(!i||!ic(e,l,this.currentDirection))return;const u=this.getAxisMotionValue(e);let d=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(d=ek(d,this.constraints[e],this.elastic[e])),u.set(d)}resolveConstraints(){const{dragConstraints:e,dragElastic:s}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,l=this.constraints;e&&_i(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=tk(i.layoutBox,e):this.constraints=!1,this.elastic=ik(s),l!==this.constraints&&!_i(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&Mn(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=ak(i.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:s}=this.getProps();if(!e||!_i(e))return!1;const i=e.current,{projection:l}=this.visualElement;if(!l||!l.layout)return!1;l.root&&(l.root.scroll=void 0,l.root.updateScroll());const u=I5(i,l.root,this.visualElement.getTransformPagePoint());let d=nk(l.layout.layoutBox,u);if(s){const f=s(V5(d));this.hasMutatedConstraints=!!f,f&&(d=z1(f))}return d}startAnimation(e){const{drag:s,dragMomentum:i,dragElastic:l,dragTransition:u,dragSnapToOrigin:d,onDragTransitionEnd:f}=this.getProps(),g=this.constraints||{},p=Mn(x=>{if(!ic(x,s,this.currentDirection))return;let y=g&&g[x]||{};(d===!0||d===x)&&(y={min:0,max:0});const b=l?200:1e6,w=l?40:1e7,j={type:"inertia",velocity:i?e[x]:0,bounceStiffness:b,bounceDamping:w,timeConstant:750,restDelta:1,restSpeed:10,...u,...y};return this.startAxisValueAnimation(x,j)});return Promise.all(p).then(f)}startAxisValueAnimation(e,s){const i=this.getAxisMotionValue(e);return Of(this.visualElement,e),i.start(km(e,i,0,s,this.visualElement,!1))}stopAnimation(){Mn(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const s=`_drag${e.toUpperCase()}`,l=this.visualElement.getProps()[s];return l||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor({clientX:e,clientY:s}){const{drag:i}=this.getProps(),l={x:e,y:s},u=this.visualElement.getTransformPagePoint()?.(l)||l,d=this.visualElement.measureViewportBox();Mn(f=>{if(!ic(f,i,this.currentDirection))return;const g=this.getAxisMotionValue(f),{min:p,max:x}=d[f];g.set((g.get()||0)+u[f]-Ve(p,x,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:s}=this.getProps(),{projection:i}=this.visualElement;if(!_i(s)||!i||!this.constraints)return;this.stopAnimation();const l=this.constraints,u={x:0,y:0};Mn(f=>{const g=this.getAxisMotionValue(f).get();u[f]=sk({min:g,max:g},l[f])});const{transformTemplate:d}=this.visualElement.getProps();this.visualElement.current.style.transform=d?d({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),Mn(f=>{const g=this.getAxisMotionValue(f);if(!ic(f,e,null)||!g.get())return;const{min:p,max:x}=this.constraints[f];g.set(Ve(p,x,u[f]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;rk.set(this.visualElement,this);const e=this.visualElement.current,s=sl(e,"pointerdown",p=>{const{drag:x,dragListener:y=!0}=this.getProps(),b=p.target,w=b!==e&&W5(b);x&&y&&!w&&this.start(p)});let i;const l=()=>{const{dragConstraints:p}=this.getProps();_i(p)&&p.current&&(this.constraints=this.resolveRefConstraints(),i||(i=ok(e,p.current,()=>this.scalePositionWithinConstraints())))},{projection:u}=this.visualElement,d=u.addEventListener("measure",l);u&&!u.layout&&(u.root&&u.root.updateScroll(),u.updateLayout()),ze.read(l);const f=hl(window,"resize",()=>this.scalePositionWithinConstraints()),g=u.addEventListener("didUpdate",(({delta:p,hasLayoutChanged:x})=>{this.isDragging&&x&&(Mn(y=>{const b=this.getAxisMotionValue(y);b&&(this.originPoint[y]+=p[y].translate,b.set(b.get()+p[y].translate))}),this.visualElement.render())}));return()=>{f(),s(),d(),g&&g(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:s=!1,dragDirectionLock:i=!1,dragPropagation:l=!1,dragConstraints:u=!1,dragElastic:d=Pf,dragMomentum:f=!0}=e;return{...e,drag:s,dragDirectionLock:i,dragPropagation:l,dragConstraints:u,dragElastic:d,dragMomentum:f}}}function kb(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function ok(t,e,s){const i=Py(t,kb(s)),l=Py(e,kb(s));return()=>{i(),l()}}function ic(t,e,s){return(e===!0||e===t)&&(s===null||s===t)}function ck(t,e=10){let s=null;return Math.abs(t.y)>e?s="y":Math.abs(t.x)>e&&(s="x"),s}class uk extends Ys{constructor(e){super(e),this.removeGroupControls=kn,this.removeListeners=kn,this.controls=new lk(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||kn}update(){const{dragControls:e}=this.node.getProps(),{dragControls:s}=this.node.prevProps||{};e!==s&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const rf=t=>(e,s)=>{t&&ze.update(()=>t(e,s),!1,!0)};class dk extends Ys{constructor(){super(...arguments),this.removePointerDownListener=kn}onPointerDown(e){this.session=new bw(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:yw(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:s,onPan:i,onPanEnd:l}=this.node.getProps();return{onSessionStart:rf(e),onStart:rf(s),onMove:rf(i),onEnd:(u,d)=>{delete this.session,l&&ze.postRender(()=>l(u,d))}}}mount(){this.removePointerDownListener=sl(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let lf=!1;class hk extends A.Component{componentDidMount(){const{visualElement:e,layoutGroup:s,switchLayoutGroup:i,layoutId:l}=this.props,{projection:u}=e;u&&(s.group&&s.group.add(u),i&&i.register&&l&&i.register(u),lf&&u.root.didUpdate(),u.addEventListener("animationComplete",()=>{this.safeToRemove()}),u.setOptions({...u.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Sc.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:s,visualElement:i,drag:l,isPresent:u}=this.props,{projection:d}=i;return d&&(d.isPresent=u,e.layoutDependency!==s&&d.setOptions({...d.options,layoutDependency:s}),lf=!0,l||e.layoutDependency!==s||s===void 0||e.isPresent!==u?d.willUpdate():this.safeToRemove(),e.isPresent!==u&&(u?d.promote():d.relegate()||ze.postRender(()=>{const f=d.getStack();(!f||!f.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:s}=this.props,{projection:i}=e;i&&(i.options.layoutAnchor=s,i.root.didUpdate(),Om.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:s,switchLayoutGroup:i}=this.props,{projection:l}=e;lf=!0,l&&(l.scheduleCheckAfterUnmount(),s&&s.group&&s.group.remove(l),i&&i.deregister&&i.deregister(l))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function ww(t){const[e,s]=uw(),i=A.useContext(um);return o.jsx(hk,{...t,layoutGroup:i,switchLayoutGroup:A.useContext(gw),isPresent:e,safeToRemove:s})}const fk={pan:{Feature:dk},drag:{Feature:uk,ProjectionNode:cw,MeasureLayout:ww}};function Eb(t,e,s){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",s==="Start");const l="onHover"+s,u=i[l];u&&ze.postRender(()=>u(e,cu(e)))}class mk extends Ys{mount(){const{current:e}=this.node;e&&(this.unmount=Y5(e,(s,i)=>(Eb(this.node,i,"Start"),l=>Eb(this.node,l,"End"))))}unmount(){}}class pk extends Ys{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=_l(hl(this.node.current,"focus",()=>this.onFocus()),hl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Ab(t,e,s){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",s==="Start");const l="onTap"+(s==="End"?"":s),u=i[l];u&&ze.postRender(()=>u(e,cu(e)))}class gk extends Ys{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:s,propagate:i}=this.node.props;this.unmount=Z5(e,(l,u)=>(Ab(this.node,u,"Start"),(d,{success:f})=>Ab(this.node,d,f?"End":"Cancel")),{useGlobalTarget:s,stopPropagation:i?.tap===!1})}unmount(){}}const $f=new WeakMap,of=new WeakMap,xk=t=>{const e=$f.get(t.target);e&&e(t)},yk=t=>{t.forEach(xk)};function bk({root:t,...e}){const s=t||document;of.has(s)||of.set(s,{});const i=of.get(s),l=JSON.stringify(e);return i[l]||(i[l]=new IntersectionObserver(yk,{root:t,...e})),i[l]}function vk(t,e,s){const i=bk(e);return $f.set(t,s),i.observe(t),()=>{$f.delete(t),i.unobserve(t)}}const wk={some:0,all:1};class jk extends Ys{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:s,margin:i,amount:l="some",once:u}=e,d={root:s?s.current:void 0,rootMargin:i,threshold:typeof l=="number"?l:wk[l]},f=g=>{const{isIntersecting:p}=g;if(this.isInView===p||(this.isInView=p,u&&!p&&this.hasEnteredView))return;p&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",p);const{onViewportEnter:x,onViewportLeave:y}=this.node.getProps(),b=p?x:y;b&&b(g)};this.stopObserver=vk(this.node.current,d,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:s}=this.node;["amount","margin","root"].some(Sk(e,s))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function Sk({viewport:t={}},{viewport:e={}}={}){return s=>t[s]!==e[s]}const _k={inView:{Feature:jk},tap:{Feature:gk},focus:{Feature:pk},hover:{Feature:mk}},Nk={layout:{ProjectionNode:cw,MeasureLayout:ww}},Tk={...X3,..._k,...fk,...Nk},Q=I3(Tk,G3);function Pc(t){const e=Aa(()=>Ca(t)),{isStatic:s}=A.useContext(kl);if(s){const[,i]=A.useState(t);A.useEffect(()=>e.on("change",i),[])}return e}function jw(t,e){const s=Pc(e()),i=()=>s.set(e());return i(),zi(()=>{const l=()=>ze.preRender(i,!1,!0),u=t.map(d=>d.on("change",l));return()=>{u.forEach(d=>d()),$n(i)}}),s}function kk(t){tl.current=[],t();const e=jw(tl.current,t);return tl.current=void 0,e}function $c(t,e,s,i){if(typeof t=="function")return kk(t);if(s!==void 0&&!Array.isArray(s)&&typeof e!="function")return Ek(t,e,s,i);const d=typeof e=="function"?e:cT(e,s,i),f=Array.isArray(t)?Cb(t,d):Cb([t],([p])=>d(p)),g=Array.isArray(t)?void 0:t.accelerate;return g&&!g.isTransformed&&typeof e!="function"&&Array.isArray(s)&&i?.clamp!==!1&&(f.accelerate={...g,times:[0,...e,1],keyframes:[s[0],...s,s[s.length-1]],isTransformed:!0}),f}function Cb(t,e){const s=Aa(()=>[]);return jw(t,()=>{s.length=0;const i=t.length;for(let l=0;l<i;l++)s[l]=t[l].get();return e(s)})}function Ek(t,e,s,i){const l=Aa(()=>Object.keys(s)),u=Aa(()=>({}));for(const d of l)u[d]=$c(t,e,s[d],i);return u}function Ak(t,e,s){const{isStatic:i}=A.useContext(kl),l=()=>ct(t)?t.get():t;if(i)return $c(l);const u=Pc(l());return A.useInsertionEffect(()=>s(u,t,e),[u,JSON.stringify(e)]),u}function Rb(t,e={}){return Ak(t,e,hT)}function $m(){!Um.current&&K1();const[t]=A.useState(Mc.current);return t}const Ck=t=>t?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function Rk(t,e,s=[]){if(e==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:Ck(t),size:24,node:e,...s.length>0?{aliases:s}:{}}}const Ok=t=>{let e="",s=!1;for(const i of t){if(i==="-"||i==="_"||i<=" "){s=e.length>0;continue}e.length===0?e+=i.toLowerCase():e+=s?i.toUpperCase():i,s=!1}return e};const Dk=t=>{const e=Ok(t);return e.charAt(0).toUpperCase()+e.slice(1)};const Bf=(...t)=>t.filter((e,s,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===s).join(" ").trim();const ma={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};function cf(t){return t!=null}function Mk(t,e={}){const s=e.attributeNames??{},i=b=>s[b]??b,l=t.size??t.width??ma.width,u=t.size??t.height??ma.height,d=t.aliases?.filter(b=>typeof b=="string"&&b.trim()!=="").map(b=>`lucide-${b}`)??[],f=[...t.name?[`lucide-${t.name}`]:[],...d],g=e.className?.split(" ").filter(Boolean)??[],p=e.includeDefaultClasses===!1?Bf(...g):Bf("lucide",...f,...g),x=e.absoluteStrokeWidth?Number(e.strokeWidth??ma["stroke-width"])*Number(t.size??t.width??ma.width)/Number(e.size??e.width??ma.width):e.strokeWidth??ma["stroke-width"];return["svg",{...Object.entries(ma).reduce((b,[w,j])=>(b[i(w)]=j,b),{}),..."color"in e&&e.color&&{[i("stroke")]:e.color},..."size"in e&&cf(e.size)&&{[i("width")]:e.size,[i("height")]:e.size},..."width"in e&&cf(e.width)&&{[i("width")]:e.width},..."height"in e&&cf(e.height)&&{[i("height")]:e.height},[i("stroke-width")]:x,...p&&{[i("class")]:p},[i("viewBox")]:`0 0 ${l} ${u}`,...e.hasA11yProp===!1?{[i("aria-hidden")]:"true"}:{},..."attributes"in e&&e.attributes},t.node.map(b=>{const[w,j,N]=b,_=e.nonScalingStroke?{[i("vector-effect")]:"non-scaling-stroke",...j}:j;return N?[w,_,N]:[w,_]})]}function Uk(t,e={}){return Mk(t,{...e,attributeNames:{...e.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}const Lk=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0;return!1},zk=A.createContext({}),Pk=()=>A.useContext(zk),$k=A.forwardRef(({color:t,size:e,width:s,height:i,strokeWidth:l,absoluteStrokeWidth:u,nonScalingStroke:d,className:f="",children:g,iconNode:p=[],icon:x={node:p,aliases:[],size:24},...y},b)=>{const{size:w=24,strokeWidth:j=2,absoluteStrokeWidth:N=!1,nonScalingStroke:_=!1,color:k="currentColor",className:R=""}=Pk()??{},M=!!g||Lk(y),[T,F,I=[]]=Uk(x,{color:t??k,width:s??e??w,height:i??e??w,strokeWidth:l??j,absoluteStrokeWidth:u??N,nonScalingStroke:d??_,className:Bf(R,f),hasA11yProp:M,attributes:y});return A.createElement(T,{ref:b,...F},[...I.map(([E,L])=>A.createElement(E,L)),...Array.isArray(g)?g:[g]])});function te(t,e=[],s=[]){const i=typeof t=="string"?Rk(t,e,s):t,l=A.forwardRef(({className:u,...d},f)=>A.createElement($k,{ref:f,icon:i,className:u,...d}));return i.name&&(l.displayName=Dk(i.name)),l}const Sw={name:"activity",size:24,node:[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]};Sw.node;const Bk=te(Sw);const _w={name:"arrow-down-right",size:24,node:[["path",{d:"m7 7 10 10",key:"1fmybs"}],["path",{d:"M17 7v10H7",key:"6fjiku"}]]};_w.node;const Vk=te(_w);const Nw={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};Nw.node;const qk=te(Nw);const Tw={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};Tw.node;const Ci=te(Tw);const kw={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};kw.node;const Bm=te(kw);const Ew={name:"arrow-up-right",size:24,node:[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]};Ew.node;const Hk=te(Ew);const Aw={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};Aw.node;const Ik=te(Aw);const Cw={name:"badge-check",size:24,node:[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["verified"]};Cw.node;const Ir=te(Cw);const Rw={name:"calendar-days",size:24,node:[["path",{d:"M8 2v3",key:"1ioesn"}],["path",{d:"M16 2v3",key:"otl347"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M8 13h.01",key:"1sbv64"}],["path",{d:"M12 13h.01",key:"y0uutt"}],["path",{d:"M16 13h.01",key:"wip0gl"}],["path",{d:"M8 17h.01",key:"p3bg7i"}],["path",{d:"M12 17h.01",key:"p32p05"}],["path",{d:"M16 17h.01",key:"ql8jdd"}]]};Rw.node;const Gk=te(Rw);const Ow={name:"chart-column",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],aliases:["bar-chart-3"]};Ow.node;const Vm=te(Ow);const Dw={name:"check-check",size:24,node:[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]};Dw.node;const Kk=te(Dw);const Mw={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Mw.node;const ds=te(Mw);const Uw={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};Uw.node;const El=te(Uw);const Lw={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};Lw.node;const ka=te(Lw);const zw={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};zw.node;const Pw=te(zw);const $w={name:"circle-alert",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],aliases:["alert-circle"]};$w.node;const Yk=te($w);const Bw={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};Bw.node;const Vw=te(Bw);const qw={name:"circle-dollar-sign",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]};qw.node;const Hw=te(qw);const Iw={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};Iw.node;const Gw=te(Iw);const Kw={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};Kw.node;const Fk=te(Kw);const Yw={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};Yw.node;const Fw=te(Yw);const Xw={name:"crown",size:24,node:[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]};Xw.node;const Ob=te(Xw);const Jw={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};Jw.node;const Ww=te(Jw);const Qw={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};Qw.node;const Al=te(Qw);const Zw={name:"droplets",size:24,node:[["path",{d:"M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z",key:"1ptgy4"}],["path",{d:"M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97",key:"1sl1rz"}]]};Zw.node;const Xk=te(Zw);const e2={name:"eye-off",size:24,node:[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};e2.node;const qm=te(e2);const t2={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};t2.node;const Cl=te(t2);const n2={name:"flask-conical",size:24,node:[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2",key:"18mbvz"}],["path",{d:"M6.453 15h11.094",key:"3shlmq"}],["path",{d:"M8.5 2h7",key:"csnxdl"}]]};n2.node;const Jk=te(n2);const s2={name:"gem",size:24,node:[["path",{d:"M10.5 3 8 9l4 13 4-13-2.5-6",key:"b3dvk1"}],["path",{d:"M17 3a2 2 0 0 1 1.6.8l3 4a2 2 0 0 1 .013 2.382l-7.99 10.986a2 2 0 0 1-3.247 0l-7.99-10.986A2 2 0 0 1 2.4 7.8l2.998-3.997A2 2 0 0 1 7 3z",key:"7w4byz"}],["path",{d:"M2 9h20",key:"16fsjt"}]]};s2.node;const Wk=te(s2);const a2={name:"gift",size:24,node:[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8",key:"1sqzm4"}],["path",{d:"M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5",key:"kc0143"}],["rect",{x:"3",y:"7",width:"18",height:"4",rx:"1",key:"1hberx"}]]};a2.node;const Qk=te(a2);const i2={name:"heart-handshake",size:24,node:[["path",{d:"M19.414 14.414C21 12.828 22 11.5 22 9.5a5.5 5.5 0 0 0-9.591-3.676.6.6 0 0 1-.818.001A5.5 5.5 0 0 0 2 9.5c0 2.3 1.5 4 3 5.5l5.535 5.362a2 2 0 0 0 2.879.052 2.12 2.12 0 0 0-.004-3 2.124 2.124 0 1 0 3-3 2.124 2.124 0 0 0 3.004 0 2 2 0 0 0 0-2.828l-1.881-1.882a2.41 2.41 0 0 0-3.409 0l-1.71 1.71a2 2 0 0 1-2.828 0 2 2 0 0 1 0-2.828l2.823-2.762",key:"17lmqv"}]]};i2.node;const Zk=te(i2);const r2={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};r2.node;const Bc=te(r2);const l2={name:"landmark",size:24,node:[["path",{d:"M10 18v-7",key:"wt116b"}],["path",{d:"M11.119 2.205a2 2 0 0 1 1.762 0l7.84 3.846A.5.5 0 0 1 20.5 7h-17a.5.5 0 0 1-.22-.949z",key:"yxxwt6"}],["path",{d:"M14 18v-7",key:"vav6t3"}],["path",{d:"M18 18v-7",key:"aexdmj"}],["path",{d:"M3 22h18",key:"8prr45"}],["path",{d:"M6 18v-7",key:"1ivflk"}]]};l2.node;const eE=te(l2);const o2={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};o2.node;const tE=te(o2);const c2={name:"leaf",size:24,node:[["path",{d:"M11 20a10 10 0 0010-10 25.9 25.9 0 00-1.04-7.281 1 1 0 00-1.755-.325C15.833 5.5 13 5.5 9.8 6.1A7 7 0 0011 20",key:"1wjnjv"}],["path",{d:"M2 21a5 5 0 012.911-4.544C7.613 15.212 8.351 15.24 11 13",key:"c1ejpn"}]]};c2.node;const uu=te(c2);const u2={name:"lock",size:24,node:[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]};u2.node;const nE=te(u2);const d2={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};d2.node;const h2=te(d2);const f2={name:"mail-check",size:24,node:[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]};f2.node;const Db=te(f2);const m2={name:"mail",size:24,node:[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]};m2.node;const Hm=te(m2);const p2={name:"map-pin",size:24,node:[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]};p2.node;const sE=te(p2);const g2={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};g2.node;const x2=te(g2);const y2={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};y2.node;const b2=te(y2);const v2={name:"message-square-text",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]]};v2.node;const aE=te(v2);const w2={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};w2.node;const du=te(w2);const j2={name:"package-search",size:24,node:[["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"M20.27 18.27 22 20",key:"er2am"}],["path",{d:"M21 10.498V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.729l7 4a2 2 0 0 0 2 .001l.98-.559",key:"tok1h1"}],["path",{d:"M3.29 7 12 12l8.71-5",key:"19ckod"}],["path",{d:"m7.5 4.27 8.997 5.148",key:"9yrvtv"}],["circle",{cx:"18.5",cy:"16.5",r:"2.5",key:"ke13xx"}]]};j2.node;const Vf=te(j2);const S2={name:"package",size:24,node:[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]};S2.node;const hu=te(S2);const _2={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};_2.node;const N2=te(_2);const T2={name:"percent",size:24,node:[["line",{x1:"19",x2:"5",y1:"5",y2:"19",key:"1x9vlm"}],["circle",{cx:"6.5",cy:"6.5",r:"2.5",key:"4mh3h7"}],["circle",{cx:"17.5",cy:"17.5",r:"2.5",key:"1mdrzq"}]]};T2.node;const iE=te(T2);const k2={name:"phone",size:24,node:[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]};k2.node;const Im=te(k2);const E2={name:"piggy-bank",size:24,node:[["path",{d:"M11 17h3v2a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1v-3a3.16 3.16 0 0 0 2-2h1a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1h-1a5 5 0 0 0-2-4V3a4 4 0 0 0-3.2 1.6l-.3.4H11a6 6 0 0 0-6 6v1a5 5 0 0 0 2 4v3a1 1 0 0 0 1 1h2a1 1 0 0 0 1-1z",key:"1piglc"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M2 8v1a2 2 0 0 0 2 2h1",key:"1env43"}]]};E2.node;const rE=te(E2);const A2={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};A2.node;const Is=te(A2);const C2={name:"printer",size:24,node:[["path",{d:"M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2",key:"143wyd"}],["path",{d:"M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6",key:"1itne7"}],["rect",{x:"6",y:"14",width:"12",height:"8",rx:"1",key:"1ue0tg"}]]};C2.node;const lE=te(C2);const R2={name:"quote",size:24,node:[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]};R2.node;const oE=te(R2);const O2={name:"recycle",size:24,node:[["path",{d:"M7 19H4.815a1.83 1.83 0 0 1-1.57-.881 1.785 1.785 0 0 1-.004-1.784L7.196 9.5",key:"x6z5xu"}],["path",{d:"M11 19h8.203a1.83 1.83 0 0 0 1.556-.89 1.784 1.784 0 0 0 0-1.775l-1.226-2.12",key:"1x4zh5"}],["path",{d:"m14 16-3 3 3 3",key:"f6jyew"}],["path",{d:"M8.293 13.596 7.196 9.5 3.1 10.598",key:"wf1obh"}],["path",{d:"m9.344 5.811 1.093-1.892A1.83 1.83 0 0 1 11.985 3a1.784 1.784 0 0 1 1.546.888l3.943 6.843",key:"9tzpgr"}],["path",{d:"m13.378 9.633 4.096 1.098 1.097-4.096",key:"1oe83g"}]]};O2.node;const cE=te(O2);const D2={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};D2.node;const qf=te(D2);const M2={name:"rotate-ccw",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]};M2.node;const Hf=te(M2);const U2={name:"ruler",size:24,node:[["path",{d:"M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",key:"icamh8"}],["path",{d:"m14.5 12.5 2-2",key:"inckbg"}],["path",{d:"m11.5 9.5 2-2",key:"fmmyf7"}],["path",{d:"m8.5 6.5 2-2",key:"vc6u1g"}],["path",{d:"m17.5 15.5 2-2",key:"wo5hmg"}]]};U2.node;const uE=te(U2);const L2={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};L2.node;const Pi=te(L2);const z2={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};z2.node;const P2=te(z2);const $2={name:"settings",size:24,node:[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};$2.node;const dE=te($2);const B2={name:"share-2",size:24,node:[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]};B2.node;const hE=te(B2);const V2={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};V2.node;const Ii=te(V2);const q2={name:"shopping-bag",size:24,node:[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]]};q2.node;const Ra=te(q2);const H2={name:"shopping-cart",size:24,node:[["path",{d:"m2.05 2.05 1.099-.028a1 1 0 0 1 1.008.815l2.69 14.347A1 1 0 0 0 7.83 18H18",key:"uebgi3"}],["path",{d:"M4.563 5h16.435a1 1 0 0 1 .981 1.204l-1.026 6.226A2 2 0 0 1 18.962 14H6.25",key:"1j7c9p"}],["circle",{cx:"18",cy:"20",r:"2",key:"t9985n"}],["circle",{cx:"8",cy:"20",r:"2",key:"ckkr5m"}]]};H2.node;const Rl=te(H2);const I2={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};I2.node;const Vc=te(I2);const G2={name:"star-half",size:24,node:[["path",{d:"M12 18.338a2.1 2.1 0 0 0-.987.244L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16l2.309-4.679A.53.53 0 0 1 12 2",key:"2ksp49"}]]};G2.node;const fE=te(G2);const K2={name:"star",size:24,node:[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]};K2.node;const Gm=te(K2);const Y2={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};Y2.node;const En=te(Y2);const F2={name:"trending-up",size:24,node:[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]]};F2.node;const mE=te(F2);const X2={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};X2.node;const fu=te(X2);const J2={name:"truck",size:24,node:[["path",{d:"M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2",key:"wrbu53"}],["path",{d:"M15 18H9",key:"1lyqi6"}],["path",{d:"M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.624l-3.48-4.35A1 1 0 0 0 17.52 8H14",key:"lysw3i"}],["circle",{cx:"17",cy:"18",r:"2",key:"332jqn"}],["circle",{cx:"7",cy:"18",r:"2",key:"19iecd"}]]};J2.node;const Ol=te(J2);const W2={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};W2.node;const Q2=te(W2);const Z2={name:"users",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]};Z2.node;const Ea=te(Z2);const ej={name:"wallet",size:24,node:[["path",{d:"M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1",key:"18etb6"}],["path",{d:"M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4",key:"xoc0q4"}]]};ej.node;const tj=te(ej);const nj={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};nj.node;const Ks=te(nj),pE=[{id:1,name:"سيروم الذهب الطبيعي",nameEn:"Golden Elixir Serum",category:"العناية بالبشرة",price:850,oldPrice:1100,rating:5,image:"/images/product-serum.png",badge:"الأكثر مبيعاً",desc:"سيروم مركّز بخلاصة الجوجوبا وفيتامين C لإشراقة ذهبية فورية.",stock:24,isActive:!0},{id:2,name:"كريم الترطيب الملكي",nameEn:"Royal Moisture Cream",category:"العناية بالبشرة",price:620,rating:5,image:"/images/product-cream.png",badge:"جديد",desc:"كريم غني بزبدة الشيا والعسل الطبيعي لترطيب يدوم ٤٨ ساعة.",stock:18,isActive:!0},{id:3,name:"زيت الأرجان الفاخر",nameEn:"Luxe Argan Oil",category:"العناية بالشعر",price:540,oldPrice:700,rating:4.5,image:"/images/product-oil.png",desc:"زيت أرجان مغربي نقي ١٠٠٪ يمنح شعرك لمعاناً وقوة من الجذور.",stock:32,isActive:!0},{id:4,name:"صابونة الفحم الذهبية",nameEn:"Charcoal Gold Soap",category:"العناية بالجسم",price:180,rating:4.5,image:"/images/product-soap.png",desc:"صابونة طبيعية بالفحم النشط ورقائق الذهب لتنقية عميقة للبشرة.",stock:40,isActive:!0},{id:5,name:"ماسك الطين الذهبي",nameEn:"Golden Clay Mask",category:"العناية بالبشرة",price:450,oldPrice:560,rating:5,image:"/images/product-mask.png",badge:"حصري",desc:"ماسك طين ملكي بخلاصة الكركم والذهب لشد البشرة ونضارتها.",stock:16,isActive:!0},{id:6,name:"عطر جوفيل الشرقي",nameEn:"Juvel Oud Noir",category:"العطور",price:1250,rating:5,image:"/images/product-perfume.png",badge:"إصدار محدود",desc:"تركيبة شرقية فاخرة من العود الكمبودي والورد الطائفي والعنبر.",stock:12,isActive:!0}],gE={1:{size:"30 مل",ingredients:"زيت الجوجوبا، فيتامين C، حمض الهيالورونيك، مستخلص الألوفيرا.",howToUse:"ضعي ٣–٤ قطرات على بشرة نظيفة صباحاً ومساءً، ودلّكي بلطف حتى الامتصاص."},2:{size:"50 مل",ingredients:"زبدة الشيا، العسل الطبيعي، زيت اللوز الحلو، فيتامين E.",howToUse:"يوضع على الوجه والرقبة بعد السيروم، بحركات دائرية خفيفة."},3:{size:"100 مل",ingredients:"زيت أرجان مغربي نقي ١٠٠٪ معصور على البارد.",howToUse:"دلّكي بضع قطرات على أطراف الشعر الرطب أو الجاف، دون شطف."},4:{size:"120 جرام",ingredients:"الفحم النشط، رقائق الذهب، زيت جوز الهند، زيت الزيتون.",howToUse:"رغّي الصابونة بالماء الدافئ، دلّكي البشرة ثم اشطفي جيداً."},5:{size:"75 جرام",ingredients:"طين البنتونايت، الكركم، مسحوق الذهب، ماء الورد.",howToUse:"ضعي طبقة رقيقة على الوجه ١٠–١٥ دقيقة، ثم اشطفي بماء فاتر. مرة أو مرتين أسبوعياً."},6:{size:"100 مل",ingredients:"العود الكمبودي، الورد الطائفي، العنبر، المسك الأبيض.",howToUse:"رشّي على نقاط النبض: الرسغ وخلف الأذن والرقبة."}},If=pE.map(t=>({...t,...gE[t.id]})),_n={siteName:"JUVEL",heroTitle:"جمالك يبدأ من",heroHighlight:"قلب الطبيعة",heroDescription:"جوفيل تقدّم لكِ مستحضرات تجميل فاخرة بمكونات طبيعية نقية، مستخلصة بعناية من أجود المصادر حول العالم — لأن بشرتك تستحق الأفضل.",announcement:"مكونات طبيعية ١٠٠٪ · شحن مجاني للطلبات فوق ٥٠٠ ج.م",contactPhone:"+20 100 123 4567",contactEmail:"hello@juvel.com",address:"القاهرة الجديدة، مصر",shippingFee:60,freeShippingAt:500,newsletterDiscount:15,facebookUrl:"https://facebook.com",instagramUrl:"https://instagram.com",tiktokUrl:"https://tiktok.com",whatsappUrl:"https://wa.me/201001234567",shippingPolicy:`نقوم بتوصيل طلباتكم إلى كافة محافظات جمهورية مصر العربية خلال 2 إلى 4 أيام عمل.Unknown directive
35• تكلفة الشحن: 60 ج.م لكافة المحافظات.Unknown directive
36• الشحن المجاني: متاح تلقائياً للطلبات التي تتجاوز قيمتها 500 ج.م.Unknown directive
37• يتم تأكيد الطلب فورياً عبر رسالة أو اتصال هاتفي وتتبعه حتى باب منزلك.`,returnPolicy:`في جوفيل، رضاكِ التام وسلامة بشرتك هما غايتنا الأولى.Unknown directive
39• مهلة الاسترجاع والاستبدال: يحق لكِ طلب استرجاع أو استبدال المنتج خلال 14 يوماً من تاريخ استلام الشحنة.Unknown directive
40• شروط الاسترجاع: يجب أن يكون المنتج غير مستخدم، في عبوته الأصلية المغلقة وبنفس حالته عند الاستلام، ومرفقاً معه فاتورة الشراء.Unknown directive
41• المنتجات التالفة أو المعيبة: في حال وجود أي خطأ أو تلف، تتحمل جوفيل مصاريف الشحن بالكامل ويتم إرسال بديل فوراً أو استرداد المبلغ كاملاً.`,faqs:[{id:"faq-1",question:"هل جميع منتجات جوفيل طبيعية 100%؟",answer:"نعم بكل فخر، جميع تركيباتنا مستخلصة من خامات وزيوت نباتية عضوية نقية، وخالية تماماً من البارابين، السلفات، السيليكون، والملونات الصناعية الضارة."},{id:"faq-2",question:"كم يستغرق توصيل الطلب إلى عنواني؟",answer:"يتم تجهيز وشحن الطلبات خلال 24-48 ساعة. يصل الطلب لعملاء القاهرة الكبرى والإسكندرية خلال 2-3 أيام، ولباقي المحافظات خلال 3-4 أيام عمل."},{id:"faq-3",question:"ما هي طرق الدفع المتاحة في المتجر؟",answer:"نعتمد حالياً نظام الدفع نقداً عند الاستلام لراحة وأمان عملائنا، مما يتيح لكِ فحص وتأكيد الشحنة عند الاستلام من المندوب."},{id:"faq-4",question:"كيف يمكنني طلب الاسترجاع أو الاستبدال؟",answer:"الأمر بسيط جداً؛ تواصلي معنا عبر الواتساب أو البريد الإلكتروني مع رقم الطلب، وسيقوم فريق الدعم بجدولة استلام المنتج وإعادة مستحقاتك في أسرع وقت."}]};function fe(t){return`${new Intl.NumberFormat("ar-EG").format(t)} ج.م`}const xE=Symbol.for("@supabase/supabase-js.traceContextExtractor");function yE(){return globalThis[xE]}function mu(t,e){var s={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(s[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,i=Object.getOwnPropertySymbols(t);l<i.length;l++)e.indexOf(i[l])<0&&Object.prototype.propertyIsEnumerable.call(t,i[l])&&(s[i[l]]=t[i[l]]);return s}function bE(t,e,s,i){function l(u){return u instanceof s?u:new s(function(d){d(u)})}return new(s||(s=Promise))(function(u,d){function f(x){try{p(i.next(x))}catch(y){d(y)}}function g(x){try{p(i.throw(x))}catch(y){d(y)}}function p(x){x.done?u(x.value):l(x.value).then(f,g)}p((i=i.apply(t,e||[])).next())})}const vE=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class Km extends Error{constructor(e,s="FunctionsError",i){super(e),this.name=s,this.context=i}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class wE extends Km{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Mb extends Km{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Ub extends Km{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var Gf;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(Gf||(Gf={}));class jE{constructor(e,{headers:s={},customFetch:i,region:l=Gf.Any}={}){this.url=e,this.headers=s,this.region=l,this.fetch=vE(i)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return bE(this,arguments,void 0,function*(s,i={}){var l,u;let d,f,g;try{const{headers:p,method:x,body:y,signal:b,timeout:w}=i;let j={},{region:N}=i;N||(N=this.region);const _=new URL(`${this.url}/${s}`);N&&N!=="any"&&(j["x-region"]=N,_.searchParams.set("forceFunctionRegion",N));let k;const R=!!p&&Object.keys(p).some(L=>L.toLowerCase()==="content-type");y&&!R?typeof Blob<"u"&&y instanceof Blob||y instanceof ArrayBuffer?(j["Content-Type"]=y.type||"application/octet-stream",k=y):typeof y=="string"?(j["Content-Type"]="text/plain",k=y):typeof FormData<"u"&&y instanceof FormData?k=y:(j["Content-Type"]="application/json",k=JSON.stringify(y)):y&&typeof y!="string"&&!(typeof Blob<"u"&&y instanceof Blob)&&!(y instanceof ArrayBuffer)&&!(typeof FormData<"u"&&y instanceof FormData)?k=JSON.stringify(y):k=y;let M=b;w&&(f=new AbortController,d=setTimeout(()=>f.abort(),w),b?(M=f.signal,g=()=>f.abort(),b.addEventListener("abort",g)):M=f.signal);const T=yield this.fetch(_.toString(),{method:x||"POST",headers:Object.assign(Object.assign(Object.assign({},j),this.headers),p),body:k,signal:M}).catch(L=>{throw new wE(L)}),F=T.headers.get("x-relay-error");if(F&&F==="true")throw new Mb(T);if(!T.ok)throw new Ub(T);let I=((l=T.headers.get("Content-Type"))!==null&&l!==void 0?l:"text/plain").split(";")[0].trim().toLowerCase(),E;return I==="application/json"?E=yield T.json():I==="application/octet-stream"||I==="application/pdf"?E=yield T.blob():I==="text/event-stream"?E=T:I==="multipart/form-data"?E=yield T.formData():E=yield T.text(),{data:E,error:null,response:T}}catch(p){return{data:null,error:p,response:p instanceof Ub||p instanceof Mb?p.context:void 0}}finally{d&&clearTimeout(d),g&&((u=i.signal)===null||u===void 0||u.removeEventListener("abort",g))}})}}var Oi=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.code=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};const sj=3,Lb=t=>Math.min(1e3*2**t,3e4),SE=[520,503],aj=["GET","HEAD","OPTIONS"];function fl(t){"@babel/helpers - typeof";return fl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},fl(t)}function _E(t,e){if(fl(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var i=s.call(t,e);if(fl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function NE(t){var e=_E(t,"string");return fl(e)=="symbol"?e:e+""}function TE(t,e,s){return(e=NE(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function zb(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,i)}return s}function wa(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};e%2?zb(Object(s),!0).forEach(function(i){TE(t,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):zb(Object(s)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(s,i))})}return t}function Pb(t,e){return new Promise(s=>{if(e?.aborted){s();return}const i=setTimeout(()=>{e?.removeEventListener("abort",l),s()},t);function l(){clearTimeout(i),s()}e?.addEventListener("abort",l)})}function kE(t,e,s,i){return!(!i||s>=sj||!aj.includes(t)||!SE.includes(e))}async function ij(t,e,s,i){let l=0;for(;;){const g=wa({},s.headers);l>0&&(g["X-Retry-Count"]=String(l));let p;try{p=await t(e,{method:s.method,headers:g,body:s.body,signal:s.signal})}catch(x){var u;if(x?.name==="AbortError"||x?.code==="ABORT_ERR"||x?.name==="TimeoutError"&&(!((u=s.signal)===null||u===void 0)&&u.aborted)||!aj.includes(s.method))throw x;if(i&&l<sj){const y=Lb(l);l++,await Pb(y,s.signal);continue}throw x}if(kE(s.method,p.status,l,i)){var d,f;const x=(d=(f=p.headers)===null||f===void 0?void 0:f.get("Retry-After"))!==null&&d!==void 0?d:null,y=x!==null?Math.max(0,parseInt(x,10)||0)*1e3:Lb(l);await p.text(),l++,await Pb(y,s.signal);continue}return p}}var EE=class{constructor(t){var e,s,i,l,u;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(s=t.isMaybeSingle)!==null&&s!==void 0?s:!1,this.shouldStripNulls=(i=t.shouldStripNulls)!==null&&i!==void 0?i:!1,this.urlLengthLimit=(l=t.urlLengthLimit)!==null&&l!==void 0?l:8e3,this.retryEnabled=(u=t.retry)!==null&&u!==void 0?u:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var s=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const d=this.headers.get("Accept");d==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!d||d==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const i=this.fetch;let u=(async()=>{const d={};s.headers.forEach((g,p)=>{d[p]=g});const f=await ij(i,s.url.toString(),{method:s.method,headers:d,body:JSON.stringify(s.body,(g,p)=>typeof p=="bigint"?p.toString():p),signal:s.signal},s.retryEnabled);return await s.processResponse(f)})();return this.shouldThrowOnError||(u=u.catch(d=>{var f;let g="",p="",x="";const y=d?.cause;if(y){var b,w,j,N;const R=(b=y?.message)!==null&&b!==void 0?b:"",M=(w=y?.code)!==null&&w!==void 0?w:"";g=`${(j=d?.name)!==null&&j!==void 0?j:"FetchError"}: ${d?.message}`,g+=`Unknown directive
43Caused by: ${(N=y?.name)!==null&&N!==void 0?N:"Error"}: ${R}`,M&&(g+=` (${M})`),y?.stack&&(g+=`Unknown directive
44${y.stack}`)}else{var _;g=(_=d?.stack)!==null&&_!==void 0?_:""}const k=this.url.toString().length;return d?.name==="AbortError"||d?.code==="ABORT_ERR"?(x="",p="Request was aborted (timeout or manual cancellation)",k>this.urlLengthLimit&&(p+=`. Note: Your request URL is ${k} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):(y?.name==="HeadersOverflowError"||y?.code==="UND_ERR_HEADERS_OVERFLOW")&&(x="",p="HTTP headers exceeded server limits (typically 16KB)",k>this.urlLengthLimit&&(p+=`. Your request URL is ${k} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(f=d?.name)!==null&&f!==void 0?f:"FetchError"}: ${d?.message}`,details:g,hint:p,code:x},data:null,count:null,status:0,statusText:""}})),u.then(t,e)}async processResponse(t){var e=this;let s=null,i=null,l=null,u=t.status,d=t.statusText;if(t.ok){var f,g;if(e.method!=="HEAD"){var p;const w=await t.text();if(w!=="")if(e.headers.get("Accept")==="text/csv")i=w;else if(e.headers.get("Accept")&&(!((p=e.headers.get("Accept"))===null||p===void 0)&&p.includes("application/vnd.pgrst.plan+text")))i=w;else try{i=JSON.parse(w)}catch{if(s={message:w},i=null,e.shouldThrowOnError)throw new Oi({message:w,details:"",hint:"",code:""})}}const y=(f=e.headers.get("Prefer"))===null||f===void 0?void 0:f.match(/count=(exact|planned|estimated)/),b=(g=t.headers.get("content-range"))===null||g===void 0?void 0:g.split("/");if(y&&b&&b.length>1&&(l=parseInt(b[1])),e.isMaybeSingle&&Array.isArray(i))if(i.length>1){if(s={code:"PGRST116",details:`Results contain ${i.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},i=null,l=null,u=406,d="Not Acceptable",e.shouldThrowOnError){var x;throw new Oi(wa(wa({},s),{},{hint:(x=s.hint)!==null&&x!==void 0?x:""}))}}else i.length===1?i=i[0]:i=null}else{const y=await t.text();try{s=JSON.parse(y),Array.isArray(s)&&t.status===404&&(i=[],s=null,u=200,d="OK")}catch{t.status===404&&y===""?(u=204,d="No Content"):s={message:y}}if(s&&e.shouldThrowOnError)throw new Oi(s)}return{success:s===null,error:s,data:i,count:l,status:u,statusText:d}}returns(){return this}overrideTypes(){return this}},AE=class extends EE{throwOnError(){return super.throwOnError()}select(t){let e=!1;const s=(t??"*").split("").map(i=>/\s/.test(i)&&!e?"":(i==='"'&&(e=!e),i)).join("");return this.url.searchParams.set("select",s),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:s,foreignTable:i,referencedTable:l=i}={}){const u=l?`${l}.order`:"order",d=this.url.searchParams.get(u);return this.url.searchParams.set(u,`${d?`${d},`:""}${t}.${e?"asc":"desc"}${s===void 0?"":s?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:s=e}={}){const i=typeof s>"u"?"limit":`${s}.limit`;return this.url.searchParams.set(i,`${t}`),this}range(t,e,{foreignTable:s,referencedTable:i=s}={}){const l=typeof i>"u"?"offset":`${i}.offset`,u=typeof i>"u"?"limit":`${i}.limit`;return this.url.searchParams.set(l,`${t}`),this.url.searchParams.set(u,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:s=!1,buffers:i=!1,wal:l=!1,format:u="text"}={}){var d;const f=[t?"analyze":null,e?"verbose":null,s?"settings":null,i?"buffers":null,l?"wal":null].filter(Boolean).join("|"),g=(d=this.headers.get("Accept"))!==null&&d!==void 0?d:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${u}; for="${g}"; options=${f};`),u==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const $b=new RegExp("[,()]");var Ni=class extends AE{throwOnError(){return super.throwOnError()}eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const s=Array.from(new Set(e)).map(i=>typeof i=="string"&&$b.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`in.(${s})`),this}notIn(t,e){const s=Array.from(new Set(e)).map(i=>typeof i=="string"&&$b.test(i)?`"${i}"`:`${i}`).join(",");return this.url.searchParams.append(t,`not.in.(${s})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:s,type:i}={}){let l="";i==="plain"?l="pl":i==="phrase"?l="ph":i==="websearch"&&(l="w");const u=s===void 0?"":`(${s})`;return this.url.searchParams.append(t,`${l}fts${u}.${e}`),this}match(t){return Object.entries(t).filter(([e,s])=>s!==void 0).forEach(([e,s])=>{this.url.searchParams.append(e,`eq.${s}`)}),this}not(t,e,s){return this.url.searchParams.append(t,`not.${e}.${s}`),this}or(t,{foreignTable:e,referencedTable:s=e}={}){const i=s?`${s}.or`:"or";return this.url.searchParams.append(i,`(${t})`),this}filter(t,e,s){return this.url.searchParams.append(t,`${e}.${s}`),this}},CE=class{constructor(t,{headers:e={},schema:s,fetch:i,urlLengthLimit:l=8e3,retry:u}){this.url=t,this.headers=new Headers(e),this.schema=s,this.fetch=i,this.urlLengthLimit=l,this.retry=u}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:s=!1,count:i}=e??{},l=s?"HEAD":"GET";let u=!1;const d=(t??"*").split("").map(p=>/\s/.test(p)&&!u?"":(p==='"'&&(u=!u),p)).join(""),{url:f,headers:g}=this.cloneRequestState();return f.searchParams.set("select",d),i&&g.append("Prefer",`count=${i}`),new Ni({method:l,url:f,headers:g,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:s=!0}={}){var i;const l="POST",{url:u,headers:d}=this.cloneRequestState();if(e&&d.append("Prefer",`count=${e}`),s||d.append("Prefer","missing=default"),Array.isArray(t)){const f=t.reduce((g,p)=>g.concat(Object.keys(p)),[]);if(f.length>0){const g=[...new Set(f)].map(p=>`"${p}"`);u.searchParams.set("columns",g.join(","))}}return new Ni({method:l,url:u,headers:d,schema:this.schema,body:t,fetch:(i=this.fetch)!==null&&i!==void 0?i:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:s=!1,count:i,defaultToNull:l=!0}={}){var u;const d="POST",{url:f,headers:g}=this.cloneRequestState();if(g.append("Prefer",`resolution=${s?"ignore":"merge"}-duplicates`),e!==void 0&&f.searchParams.set("on_conflict",e),i&&g.append("Prefer",`count=${i}`),l||g.append("Prefer","missing=default"),Array.isArray(t)){const p=t.reduce((x,y)=>x.concat(Object.keys(y)),[]);if(p.length>0){const x=[...new Set(p)].map(y=>`"${y}"`);f.searchParams.set("columns",x.join(","))}}return new Ni({method:d,url:f,headers:g,schema:this.schema,body:t,fetch:(u=this.fetch)!==null&&u!==void 0?u:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var s;const i="PATCH",{url:l,headers:u}=this.cloneRequestState();return e&&u.append("Prefer",`count=${e}`),new Ni({method:i,url:l,headers:u,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const s="DELETE",{url:i,headers:l}=this.cloneRequestState();return t&&l.append("Prefer",`count=${t}`),new Ni({method:s,url:i,headers:l,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function RE(t,e){try{const d=JSON.parse(t);if(d&&typeof d=="object"&&!Array.isArray(d)){var s,i,l,u;return new Oi({message:String((s=d.message)!==null&&s!==void 0?s:t),details:(i=d.details)!==null&&i!==void 0?i:"",hint:(l=d.hint)!==null&&l!==void 0?l:"",code:(u=d.code)!==null&&u!==void 0?u:""})}}catch{}return new Oi({message:t||e,details:"",hint:"",code:""})}function Bb(t,e,s){var i;const l=t;return{success:!1,error:new Oi({message:`${(i=l?.name)!==null&&i!==void 0?i:"FetchError"}: ${l?.message}`,details:"",hint:"",code:""}),data:null,count:null,status:e,statusText:s}}var OE=class rj{constructor(e,{headers:s={},schema:i,fetch:l,timeout:u,urlLengthLimit:d=8e3,retry:f}={}){this.url=e,this.headers=new Headers(s),this.schemaName=i,this.urlLengthLimit=d;const g=l??globalThis.fetch;u!==void 0&&u>0?this.fetch=(p,x)=>{const y=new AbortController,b=setTimeout(()=>y.abort(),u),w=x?.signal;if(w){if(w.aborted)return clearTimeout(b),g(p,x);const j=()=>{clearTimeout(b),y.abort()};return w.addEventListener("abort",j,{once:!0}),g(p,wa(wa({},x),{},{signal:y.signal})).finally(()=>{clearTimeout(b),w.removeEventListener("abort",j)})}return g(p,wa(wa({},x),{},{signal:y.signal})).finally(()=>clearTimeout(b))}:this.fetch=g,this.retry=f}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new CE(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new rj(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}async getOpenApiSpec(){var e=this,s;const i=new Headers(e.headers);i.set("Accept","application/openapi+json"),e.schemaName&&i.set("Accept-Profile",e.schemaName);const l={};i.forEach((p,x)=>{l[x]=p});const u=(s=e.fetch)!==null&&s!==void 0?s:globalThis.fetch;let d;try{var f;d=await ij(u,`${e.url}/`,{method:"GET",headers:l},(f=e.retry)!==null&&f!==void 0?f:!0)}catch(p){return Bb(p,0,"")}let g;try{g=await d.text()}catch(p){return Bb(p,d.status,d.statusText)}if(d.ok)try{return{success:!0,error:null,data:JSON.parse(g),count:null,status:d.status,statusText:d.statusText}}catch{}return{success:!1,error:RE(g,d.statusText),data:null,count:null,status:d.status,statusText:d.statusText}}rpc(e,s={},{head:i=!1,get:l=!1,count:u}={}){var d;let f;const g=new URL(`${this.url}/rpc/${e}`);let p;const x=w=>w!==null&&typeof w=="object"&&(!Array.isArray(w)||w.some(x)),y=i&&Object.values(s).some(x);y?(f="POST",p=s):i||l?(f=i?"HEAD":"GET",Object.entries(s).filter(([w,j])=>j!==void 0).map(([w,j])=>[w,Array.isArray(j)?`{${j.join(",")}}`:`${j}`]).forEach(([w,j])=>{g.searchParams.append(w,j)})):(f="POST",p=s);const b=new Headers(this.headers);return y?b.set("Prefer",u?`count=${u},return=minimal`:"return=minimal"):u&&b.set("Prefer",`count=${u}`),new Ni({method:f,url:g,headers:b,schema:this.schemaName,body:p,fetch:(d=this.fetch)!==null&&d!==void 0?d:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class DE{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const s=globalThis;if(typeof globalThis<"u"&&typeof s.WebSocket<"u")return{type:"native",wsConstructor:s.WebSocket};const i=typeof global<"u"?global:void 0;if(i&&typeof i.WebSocket<"u")return{type:"native",wsConstructor:i.WebSocket};if(typeof globalThis<"u"&&typeof s.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&s.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const l=globalThis.process;if(l){const u=l.versions;if(u&&u.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let s=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(s+=`Unknown directive
46Suggested solution: ${e.workaround}`),new Error(s)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const ME="2.118.0",UE=`realtime-js/${ME}`,LE="1.0.0",lj="2.0.0",zE=lj,PE=1e4,$E=15e3,BE=1e4,VE=100,Vs={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},oj={close:"phx_close",error:"phx_error",join:"phx_join",leave:"phx_leave",access_token:"access_token"},Kf={connecting:"connecting",closing:"closing",closed:"closed"};class qE{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,s){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return s(this._binaryEncodeUserBroadcastPush(e));let i=[e.join_ref,e.ref,e.topic,e.event,e.payload];return s(JSON.stringify(i))}_binaryEncodeUserBroadcastPush(e){var s;return this._isArrayBuffer((s=e.payload)===null||s===void 0?void 0:s.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var s,i;const l=(i=(s=e.payload)===null||s===void 0?void 0:s.payload)!==null&&i!==void 0?i:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,l)}_encodeJsonUserBroadcastPush(e){var s,i;const l=(i=(s=e.payload)===null||s===void 0?void 0:s.payload)!==null&&i!==void 0?i:{},d=new TextEncoder().encode(JSON.stringify(l)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,d)}_encodeUserBroadcastPush(e,s,i){var l,u;const d=new TextEncoder,f=d.encode(e.topic),g=d.encode((l=e.ref)!==null&&l!==void 0?l:""),p=d.encode((u=e.join_ref)!==null&&u!==void 0?u:""),x=d.encode(e.payload.event),y=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},b=d.encode(Object.keys(y).length===0?"":JSON.stringify(y));if(p.length>255)throw new Error(`joinRef length ${p.length} exceeds maximum of 255`);if(g.length>255)throw new Error(`ref length ${g.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`topic length ${f.length} exceeds maximum of 255`);if(x.length>255)throw new Error(`userEvent length ${x.length} exceeds maximum of 255`);if(b.length>255)throw new Error(`metadata length ${b.length} exceeds maximum of 255`);const w=this.USER_BROADCAST_PUSH_META_LENGTH+p.length+g.length+f.length+x.length+b.length,j=new ArrayBuffer(this.HEADER_LENGTH+w),N=new DataView(j),_=new Uint8Array(j);let k=0;N.setUint8(k++,this.KINDS.userBroadcastPush),N.setUint8(k++,p.length),N.setUint8(k++,g.length),N.setUint8(k++,f.length),N.setUint8(k++,x.length),N.setUint8(k++,b.length),N.setUint8(k++,s),_.set(p,k),k+=p.length,_.set(g,k),k+=g.length,_.set(f,k),k+=f.length,_.set(x,k),k+=x.length,_.set(b,k),k+=b.length;var R=new Uint8Array(j.byteLength+i.byteLength);return R.set(new Uint8Array(j),0),R.set(new Uint8Array(i),j.byteLength),R.buffer}decode(e,s){if(this._isArrayBuffer(e)){let i=this._binaryDecode(e);return s(i)}if(typeof e=="string"){const i=JSON.parse(e),[l,u,d,f,g]=i;return s({join_ref:l,ref:u,topic:d,event:f,payload:g})}return s({})}_binaryDecode(e){const s=new DataView(e),i=s.getUint8(0),l=new TextDecoder;if(i===this.KINDS.userBroadcast)return this._decodeUserBroadcast(e,s,l)}_decodeUserBroadcast(e,s,i){const l=s.getUint8(1),u=s.getUint8(2),d=s.getUint8(3),f=s.getUint8(4);let g=this.HEADER_LENGTH+4;const p=i.decode(e.slice(g,g+l));g=g+l;const x=i.decode(e.slice(g,g+u));g=g+u;const y=i.decode(e.slice(g,g+d));g=g+d;const b=e.slice(g,e.byteLength),w=f===this.JSON_ENCODING?JSON.parse(i.decode(b)):b,j={type:this.BROADCAST_EVENT,event:x,payload:w};return d>0&&(j.meta=JSON.parse(y)),{join_ref:null,ref:null,topic:p,event:this.BROADCAST_EVENT,payload:j}}_isArrayBuffer(e){var s;return e instanceof ArrayBuffer||((s=e?.constructor)===null||s===void 0?void 0:s.name)==="ArrayBuffer"}_pick(e,s){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([i])=>s.includes(i)))}}var He;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(He||(He={}));const Vb=(t,e,s={})=>{var i;const l=(i=s.skipTypes)!==null&&i!==void 0?i:[];return e?Object.keys(e).reduce((u,d)=>(u[d]=HE(d,t,e,l),u),{}):{}},HE=(t,e,s,i)=>{const l=e.find(f=>f.name===t),u=l?.type,d=s[t];return u&&!i.includes(u)?cj(u,d):Yf(d)},cj=(t,e)=>{if(t.charAt(0)==="_"){const s=t.slice(1,t.length);return YE(e,s)}switch(t){case He.bool:return IE(e);case He.float4:case He.float8:case He.int2:case He.int4:case He.int8:case He.numeric:case He.oid:return GE(e);case He.json:case He.jsonb:return KE(e);case He.timestamp:return FE(e);case He.abstime:case He.date:case He.daterange:case He.int4range:case He.int8range:case He.money:case He.reltime:case He.text:case He.time:case He.timestamptz:case He.timetz:case He.tsrange:case He.tstzrange:return Yf(e);default:return Yf(e)}},Yf=t=>t,IE=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},GE=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},KE=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},YE=(t,e)=>{if(typeof t!="string")return t;const s=t.length-1,i=t[s];if(t[0]==="{"&&i==="}"){let u;const d=t.slice(1,s);try{u=JSON.parse("["+d+"]")}catch{u=d?d.split(","):[]}return u.map(f=>cj(e,f))}return t},FE=t=>typeof t=="string"?t.replace(" ","T"):t,uj=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var Di=t=>typeof t=="function"?t:function(){return t},XE=typeof self<"u"?self:null,Ti=typeof window<"u"?window:null,Un=XE||Ti||globalThis,JE="2.0.0",WE=1e4,QE=1e3,ZE=100,zn={connecting:0,open:1,closing:2,closed:3},qt={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},ls={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Ff={longpoll:"longpoll",websocket:"websocket"},eA={complete:4},Xf="base64url.bearer.phx.",rc=class{constructor(t,e,s,i){this.channel=t,this.event=e,this.payload=s||function(){return{}},this.receivedResp=null,this.timeout=i,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}matchReceive({status:t,response:e,_ref:s}){this.recHooks.filter(i=>i.status===t).forEach(i=>i.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},dj=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},tA=class{constructor(t,e,s){this.state=qt.closed,this.topic=t,this.params=Di(e||{}),this.socket=s,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new rc(this,ls.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new dj(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=qt.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(i=>i.send()),this.pushBuffer=[]}),this.joinPush.receive("error",i=>{this.state=qt.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=qt.closed,this.socket.remove(this)}),this.onError(i=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,i),this.isJoining()&&this.joinPush.reset(),this.state=qt.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new rc(this,ls.leave,Di({}),this.timeout).send(),this.state=qt.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(ls.reply,(i,l)=>{this.trigger(this.replyEventName(l),i)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=qt.closed,this.bindings=[]}onClose(t){this.on(ls.close,t)}onError(t){return this.on(ls.error,e=>t(e))}on(t,e){let s=this.bindingRef++;return this.bindings.push({event:t,ref:s,callback:e}),s}off(t,e){this.bindings=this.bindings.filter(s=>!(s.event===t&&(typeof e>"u"||e===s.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,s=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let i=new rc(this,t,function(){return e},s);return this.canPush()?i.send():(i.startTimeout(),this.pushBuffer.push(i)),i}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=qt.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(ls.close,"leave")},s=new rc(this,ls.leave,Di({}),t);return s.receive("ok",()=>e()).receive("timeout",()=>e()),s.send(),this.canPush()||s.trigger("ok",{}),s}onMessage(t,e,s){return e}filterBindings(t,e,s){return!0}isMember(t,e,s,i){return this.topic!==t?!1:i&&i!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:s,joinRef:i}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=qt.joining,this.joinPush.resend(t))}trigger(t,e,s,i){let l=this.onMessage(t,e,s,i);if(e&&!l)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let u=this.bindings.filter(d=>d.event===t&&this.filterBindings(d,e,s));for(let d=0;d<u.length;d++)u[d].callback(l,s,i||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===qt.closed}isErrored(){return this.state===qt.errored}isJoined(){return this.state===qt.joined}isJoining(){return this.state===qt.joining}isLeaving(){return this.state===qt.leaving}},qc=class{static request(t,e,s,i,l,u,d){if(Un.XDomainRequest){let f=new Un.XDomainRequest;return this.xdomainRequest(f,t,e,i,l,u,d)}else if(Un.XMLHttpRequest){let f=new Un.XMLHttpRequest;return this.xhrRequest(f,t,e,s,i,l,u,d)}else{if(Un.fetch&&Un.AbortController)return this.fetchRequest(t,e,s,i,l,u,d);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,s,i,l,u,d){let f={method:t,headers:s,body:i},g=null;return l&&(g=new AbortController,setTimeout(()=>g.abort(),l),f.signal=g.signal),Un.fetch(e,f).then(p=>p.text()).then(p=>this.parseJSON(p)).then(p=>d&&d(p)).catch(p=>{p.name==="AbortError"&&u?u():d&&d(null)}),g}static xdomainRequest(t,e,s,i,l,u,d){return t.timeout=l,t.open(e,s),t.onload=()=>{let f=this.parseJSON(t.responseText);d&&d(f)},u&&(t.ontimeout=u),t.onprogress=()=>{},t.send(i),t}static xhrRequest(t,e,s,i,l,u,d,f){t.open(e,s,!0),t.timeout=u;for(let[g,p]of Object.entries(i))t.setRequestHeader(g,p);return t.onerror=()=>f&&f(null),t.onreadystatechange=()=>{if(t.readyState===eA.complete&&f){let g=this.parseJSON(t.responseText);f(g)}},d&&(t.ontimeout=d),t.send(l),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let s=[];for(var i in t){if(!Object.prototype.hasOwnProperty.call(t,i))continue;let l=e?`${e}[${i}]`:i,u=t[i];typeof u=="object"?s.push(this.serialize(u,l)):s.push(encodeURIComponent(l)+"="+encodeURIComponent(u))}return s.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let s=t.match(/\?/)?"&":"?";return`${t}${s}${this.serialize(e)}`}},nA=t=>{let e="",s=new Uint8Array(t),i=s.byteLength;for(let l=0;l<i;l++)e+=String.fromCharCode(s[l]);return btoa(e)},bi=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(Xf)&&(this.authToken=atob(e[1].slice(Xf.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=zn.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Ff.websocket),"$1/"+Ff.longpoll)}endpointURL(){return qc.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,s){this.close(t,e,s),this.readyState=zn.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===zn.open||this.readyState===zn.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:s,token:i,messages:l}=e;if(s===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=i}else s=0;switch(s){case 200:l.forEach(u=>{setTimeout(()=>this.onmessage({data:u}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=zn.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${s}`)}})}send(t){typeof t!="string"&&(t=nA(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t,e=0){this.awaitingBatchAck=!0;const s=e+ZE,i=t.slice(e,s);this.ajax("POST",{"Content-Type":"application/x-ndjson"},i.join(`Unknown directive
47`),()=>this.onerror("timeout"),l=>{!l||l.status!==200?(this.awaitingBatchAck=!1,this.onerror(l&&l.status),this.closeAndRetry(1011,"internal server error",!1)):s<t.length?this.batchSend(t,s):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(t,e,s){for(let l of this.reqs)l.abort();this.readyState=zn.closed;let i=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:s});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",i)):this.onclose(i)}ajax(t,e,s,i,l){let u,d=()=>{this.reqs.delete(u),i()};u=qc.request(t,this.endpointURL(),e,s,this.timeout,d,f=>{this.reqs.delete(u),this.isActive()&&l(f)}),this.reqs.add(u)}},sA=class Wr{constructor(e,s={}){let i=s.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(i.state,l=>{let{onJoin:u,onLeave:d,onSync:f}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Wr.syncState(this.state,l,u,d),this.pendingDiffs.forEach(g=>{this.state=Wr.syncDiff(this.state,g,u,d)}),this.pendingDiffs=[],f()}),this.channel.on(i.diff,l=>{let{onJoin:u,onLeave:d,onSync:f}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(l):(this.state=Wr.syncDiff(this.state,l,u,d),f())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Wr.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,s,i,l){let u=this.toNullProtoObj(this.clone(e));s=this.toNullProtoObj(s);let d=Object.create(null),f=Object.create(null);return this.map(u,(g,p)=>{s[g]||(f[g]=p)}),this.map(s,(g,p)=>{let x=u[g];if(x){let y=p.metas.map(N=>N.phx_ref),b=x.metas.map(N=>N.phx_ref),w=p.metas.filter(N=>b.indexOf(N.phx_ref)<0),j=x.metas.filter(N=>y.indexOf(N.phx_ref)<0);w.length>0&&(d[g]=p,d[g].metas=w),j.length>0&&(f[g]=this.clone(x),f[g].metas=j)}else d[g]=p}),this.syncDiff(u,{joins:d,leaves:f},i,l)}static syncDiff(e,s,i,l){e=this.toNullProtoObj(e);let{joins:u,leaves:d}=this.clone(s);return i||(i=function(){}),l||(l=function(){}),this.map(u,(f,g)=>{let p=e[f];if(e[f]=this.clone(g),p){let x=e[f].metas.map(b=>b.phx_ref),y=p.metas.filter(b=>x.indexOf(b.phx_ref)<0);e[f].metas.unshift(...y)}i(f,p,g)}),this.map(d,(f,g)=>{let p=e[f];if(!p)return;let x=g.metas.map(y=>y.phx_ref);p.metas=p.metas.filter(y=>x.indexOf(y.phx_ref)<0),l(f,p,g),p.metas.length===0&&delete e[f]}),e}static list(e,s){return s||(s=function(i,l){return l}),this.map(e,(i,l)=>s(i,l))}static map(e,s){return Object.getOwnPropertyNames(e).map(i=>s(i,e[i]))}static toNullProtoObj(e){if(Object.getPrototypeOf(e)===null)return e;let s=Object.create(null);return Object.getOwnPropertyNames(e).forEach(i=>{s[i]=e[i]}),s}static clone(e){return JSON.parse(JSON.stringify(e))}},lc={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let s=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(s))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[s,i,l,u,d]=JSON.parse(t);return e({join_ref:s,ref:i,topic:l,event:u,payload:d})}},binaryEncode(t){let{join_ref:e,ref:s,event:i,topic:l,payload:u}=t,d=new TextEncoder,f=d.encode(e),g=d.encode(s),p=d.encode(l),x=d.encode(i);this.assertFieldSize(f.byteLength,"join_ref"),this.assertFieldSize(g.byteLength,"ref"),this.assertFieldSize(p.byteLength,"topic"),this.assertFieldSize(x.byteLength,"event");let y=this.META_LENGTH+f.byteLength+g.byteLength+p.byteLength+x.byteLength,b=new ArrayBuffer(this.HEADER_LENGTH+y),w=new Uint8Array(b),j=new DataView(b),N=0;j.setUint8(N++,this.KINDS.push),j.setUint8(N++,f.byteLength),j.setUint8(N++,g.byteLength),j.setUint8(N++,p.byteLength),j.setUint8(N++,x.byteLength),w.set(f,N),N+=f.byteLength,w.set(g,N),N+=g.byteLength,w.set(p,N),N+=p.byteLength,w.set(x,N),N+=x.byteLength;var _=new Uint8Array(b.byteLength+u.byteLength);return _.set(w,0),_.set(new Uint8Array(u),b.byteLength),_.buffer},assertFieldSize(t,e){if(t>255)throw new Error(`unable to convert ${e} to binary: must be less than or equal to 255 bytes, but is ${t} bytes`)},binaryDecode(t){let e=new DataView(t),s=e.getUint8(0),i=new TextDecoder;switch(s){case this.KINDS.push:return this.decodePush(t,e,i);case this.KINDS.reply:return this.decodeReply(t,e,i);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,i)}},decodePush(t,e,s){let i=e.getUint8(1),l=e.getUint8(2),u=e.getUint8(3),d=this.HEADER_LENGTH+this.META_LENGTH-1,f=s.decode(t.slice(d,d+i));d=d+i;let g=s.decode(t.slice(d,d+l));d=d+l;let p=s.decode(t.slice(d,d+u));d=d+u;let x=t.slice(d,t.byteLength);return{join_ref:f,ref:null,topic:g,event:p,payload:x}},decodeReply(t,e,s){let i=e.getUint8(1),l=e.getUint8(2),u=e.getUint8(3),d=e.getUint8(4),f=this.HEADER_LENGTH+this.META_LENGTH,g=s.decode(t.slice(f,f+i));f=f+i;let p=s.decode(t.slice(f,f+l));f=f+l;let x=s.decode(t.slice(f,f+u));f=f+u;let y=s.decode(t.slice(f,f+d));f=f+d;let b=t.slice(f,t.byteLength),w={status:y,response:b};return{join_ref:g,ref:p,topic:x,event:ls.reply,payload:w}},decodeBroadcast(t,e,s){let i=e.getUint8(1),l=e.getUint8(2),u=this.HEADER_LENGTH+2,d=s.decode(t.slice(u,u+i));u=u+i;let f=s.decode(t.slice(u,u+l));u=u+l;let g=t.slice(u,t.byteLength);return{join_ref:null,ref:null,topic:d,event:f,payload:g}}},aA=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||WE,this.transport=e.transport||Un.WebSocket||bi,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let s=null;try{s=Un&&Un.sessionStorage}catch{}this.sessionStore=e.sessionStorage||s,this.establishedConnections=0,this.defaultEncoder=lc.encode.bind(lc),this.defaultDecoder=lc.decode.bind(lc),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==bi?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let i=null;Ti&&Ti.addEventListener&&(Ti.addEventListener("pagehide",l=>{this.conn&&(this.disconnect(),i=this.connectClock)}),Ti.addEventListener("pageshow",l=>{i===this.connectClock&&(i=null,this.connect())}),Ti.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=l=>e.rejoinAfterMs?e.rejoinAfterMs(l):[1e3,2e3,5e3][l-1]||1e4,this.reconnectAfterMs=l=>e.reconnectAfterMs?e.reconnectAfterMs(l):[10,50,100,150,200,250,500,1e3,2e3][l-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(l,u,d)=>{console.log(`${l}: ${u}`,d)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=Di(e.params||{}),this.endPoint=`${t}/${Ff.websocket}`,this.vsn=e.vsn||JE,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new dj(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken&&Di(e.authToken)}getLongPollTransport(){return bi}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=qc.appendParams(qc.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,s){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,s)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Di(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==bi?this.connectWithFallback(bi,this.longPollFallbackMs):this.transportConnect())}log(t,e,s){this.logger&&this.logger(t,e,s)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),s=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let i=this.onMessage(l=>{l.ref===e&&(this.off([i]),t(Date.now()-s))});return!0}transportName(t){return t===bi?"LongPoll":t.name}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${Xf}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let s=!1,i=!0,l,u,d=this.transportName(t),f=g=>{this.log("transport",`falling back to ${d}...`,g),this.off([l,u]),i=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${d}`))return f("memorized");this.fallbackTimer=setTimeout(f,e),u=this.onError(g=>{this.log("transport","error",g),i&&!s&&(clearTimeout(this.fallbackTimer),f(g))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(s=!0,!i){let g=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${g}`,"true"),this.log("transport",`established ${g} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(f,e),this.ping(g=>{this.log("transport","connected to primary after",g),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),QE,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,s){if(!this.conn)return t&&t();const i=this.conn;this.waitForBufferDone(i,()=>{e?i.close(e,s||""):i.close(),this.waitForSocketClosed(i,()=>{this.conn===i&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){},this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,s=1){if(s===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,s+1)},150*s)}waitForSocketClosed(t,e,s=1){if(s===5||t.readyState===zn.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,s+1)},150*s)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,s=this.establishedConnections;this.triggerStateCallbacks("error",t,e,s),(e===this.transport||s>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(ls.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case zn.connecting:return"connecting";case zn.open:return"open";case zn.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([s])=>t.indexOf(s)===-1)}channel(t,e={}){let s=new tA(t,e,this);return this.channels.push(s),s}push(t){if(this.hasLogger()){let{topic:e,event:s,payload:i,ref:l,join_ref:u}=t;this.log("push",`${e} ${s} (${u}, ${l})`,i)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:s,event:i,payload:l,ref:u,join_ref:d}=e;if(u&&u===this.pendingHeartbeatRef){const f=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(l.status==="ok"?"ok":"error",f)}catch(g){this.log("error","error in heartbeat callback",g)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${l.status||""} ${s} ${i} ${u&&"("+u+")"||""}`.trim(),l);for(let f=0;f<this.channels.length;f++){const g=this.channels[f];g.isMember(s,i,l,d)&&g.trigger(i,l,u,d)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([s,i])=>{try{i(...e)}catch(l){this.log("error",`error in ${t} callback`,l)}})}catch(s){this.log("error",`error triggering ${t} callbacks`,s)}}leaveOpenTopic(t){let e=this.channels.find(s=>s.topic===t&&(s.isJoined()||s.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class al{constructor(e,s){const i=rA(s);this.presence=new sA(e.getChannel(),i),this.presence.onJoin((l,u,d)=>{const f=al.onJoinPayload(l,u,d);e.getChannel().trigger("presence",f)}),this.presence.onLeave((l,u,d)=>{const f=al.onLeavePayload(l,u,d);e.getChannel().trigger("presence",f)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return al.transformState(this.presence.state)}static transformState(e){return e=iA(e),Object.getOwnPropertyNames(e).reduce((s,i)=>{const l=e[i];return s[i]=_c(l),s},{})}static onJoinPayload(e,s,i){const l=qb(s),u=_c(i);return{event:"join",key:e,currentPresences:l,newPresences:u}}static onLeavePayload(e,s,i){const l=qb(s),u=_c(i);return{event:"leave",key:e,currentPresences:l,leftPresences:u}}}function _c(t){return t.metas.map(e=>{const s=Object.getOwnPropertyDescriptors(e),i=Object.defineProperties({},s);return i.presence_ref=i.phx_ref,delete i.phx_ref,delete i.phx_ref_prev,i})}function iA(t){return JSON.parse(JSON.stringify(t))}function rA(t){return t?.events&&{events:t.events}}function qb(t){return t?.metas?_c(t):[]}var Hb;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Hb||(Hb={}));class lA{get state(){return this.presenceAdapter.state}constructor(e,s){this.channel=e,this.presenceAdapter=new al(this.channel.channelAdapter,s)}}function oA(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;if(typeof e.code=="number"){const s=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${s}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class cA{constructor(e,s,i){const l=uA(i);this.channel=e.getSocket().channel(s,l),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,s){return this.channel.on(e,s)}off(e,s){this.channel.off(e,s)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,s,i){let l;try{l=this.channel.push(e,s,i)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>VE){const u=this.channel.pushBuffer.shift();u.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${u.event}`,u.payload())}return l}updateJoinPayload(e){const s=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},s),e)}canPush(){return this.socket.isConnected()&&this.state===Vs.joined}isJoined(){return this.state===Vs.joined}isJoining(){return this.state===Vs.joining}isClosed(){return this.state===Vs.closed}isLeaving(){return this.state===Vs.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function uA(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}const dA=/[,()"\\]/,hA=t=>dA.test(t)||t!==t.trim(),fA=t=>`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Ib=t=>{const e=t===null?"null":String(t);return hA(e)?fA(e):e},mA=t=>t===null?"null":String(t),pA=(t,e)=>{if(t==="in"){const s=Array.isArray(e)?e:[e];if(s.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(s)).map(l=>Ib(l)).join(",")})`}return t==="is"?`is.${mA(e)}`:`${t}.${Ib(e)}`};class gA{constructor(){this.filters=[]}add(e,s,i,l=!1){const u=l?"not.":"";return this.filters.push(`${e}=${u}${pA(s,i)}`),this}eq(e,s){return this.add(e,"eq",s)}neq(e,s){return this.add(e,"neq",s)}gt(e,s){return this.add(e,"gt",s)}gte(e,s){return this.add(e,"gte",s)}lt(e,s){return this.add(e,"lt",s)}lte(e,s){return this.add(e,"lte",s)}in(e,s){return this.add(e,"in",s)}like(e,s){return this.add(e,"like",s)}ilike(e,s){return this.add(e,"ilike",s)}match(e,s){return this.add(e,"match",s)}imatch(e,s){return this.add(e,"imatch",s)}is(e,s){return this.add(e,"is",s)}isDistinct(e,s){return this.add(e,"isdistinct",s)}not(e,s,i){return this.add(e,s,i,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var Gb;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Gb||(Gb={}));var ya;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(ya||(ya={}));var os;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(os||(os={}));class cs{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,s={config:{}},i){var l,u;if(this.topic=e,this.params=s,this.socket=i,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},s.config),this.channelAdapter=new cA(this.socket.socketAdapter,e,this.params),this.presence=new lA(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=uj(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((u=(l=this.params.config)===null||l===void 0?void 0:l.broadcast)===null||u===void 0)&&u.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,s=this.timeout){var i,l,u,d;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:f,presence:g,private:p,postgres_changes_options:x}}=this.params,y=(l=(i=this.bindings.postgres_changes)===null||i===void 0?void 0:i.map(_=>_.filter))!==null&&l!==void 0?l:[],b=!!this.bindings[ya.PRESENCE]&&this.bindings[ya.PRESENCE].length>0||((u=this.params.config.presence)===null||u===void 0?void 0:u.enabled)===!0,w={},j=Object.assign({broadcast:f,presence:Object.assign(Object.assign({},g),{enabled:b}),postgres_changes:y,private:p},x?{postgres_changes_options:x}:{});this.socket.accessTokenValue&&(w.access_token=this.socket.accessTokenValue),this._onError(_=>{e?.(os.CHANNEL_ERROR,oA(_))}),this._onClose(()=>e?.(os.CLOSED)),this.updateJoinPayload(Object.assign({config:j},w)),this._updateFilterMessage();const N=x?.wait&&y.length>0?Math.max(s,((d=x.timeout)!==null&&d!==void 0?d:$E)+BE):s;this.channelAdapter.subscribe(N).receive("ok",async({postgres_changes:_})=>{if(this.socket._isManualToken()||this.socket.setAuth(),_===void 0){e?.(os.SUBSCRIBED);return}this._updatePostgresBindings(_,e)}).receive("error",_=>{this.state=Vs.errored;const k=Object.values(_).join(", ")||"error";e?.(os.CHANNEL_ERROR,new Error(k,{cause:_}))}).receive("timeout",()=>{e?.(os.TIMED_OUT)})}return this}_updatePostgresBindings(e,s){var i;const l=this.bindings.postgres_changes,u=(i=l?.length)!==null&&i!==void 0?i:0,d=[];for(let f=0;f<u;f++){const g=l[f],{filter:{event:p,schema:x,table:y,filter:b}}=g,w=e&&e[f];if(w&&w.event===p&&cs.isFilterValueEqual(w.schema,x)&&cs.isFilterValueEqual(w.table,y)&&cs.isFilterValueEqual(w.filter,b))d.push(Object.assign(Object.assign({},g),{id:w.id}));else{this.unsubscribe(),this.state=Vs.errored,s?.(os.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=d,this.state!=Vs.errored&&s&&s(os.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,s={}){return await this.send({type:"presence",event:"track",payload:e},s)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,s,i){const l=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),u=e===ya.PRESENCE||e===ya.POSTGRES_CHANGES;if(l&&u)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,s,i)}async httpSend(e,s,i={}){var l;if(s==null)return Promise.reject(new Error("Payload is required for httpSend()"));const u=s instanceof ArrayBuffer||ArrayBuffer.isView(s),d={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":u?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(d.Authorization=`Bearer ${this.socket.accessTokenValue}`);const f=new URL(this.broadcastEndpointURL);f.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&f.searchParams.set("private","true");const g={method:"POST",headers:d,body:u?s:JSON.stringify(s)},p=await this._fetchWithTimeout(f.toString(),g,(l=i.timeout)!==null&&l!==void 0?l:this.timeout);if(p.status===202)return{success:!0};if(p.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realtime-js/migrations/httpsend-server-version.md"));let x=p.statusText;try{const y=await p.json();x=y.error||y.message||x}catch{}return Promise.reject(new Error(x))}async send(e,s={}){var i,l;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){const u="Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.";this.socket.hasLogger()?this.socket.log("channel",u):console.warn(u);const{event:d,payload:f}=e,g={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(g.Authorization=`Bearer ${this.socket.accessTokenValue}`);const p={method:"POST",headers:g,body:JSON.stringify({messages:[{topic:this.subTopic,event:d,payload:f,private:this.private}]})};try{const x=await this._fetchWithTimeout(this.broadcastEndpointURL,p,(i=s.timeout)!==null&&i!==void 0?i:this.timeout);return await((l=x.body)===null||l===void 0?void 0:l.cancel()),x.ok?"ok":"error"}catch(x){return x instanceof Error&&x.name==="AbortError"?"timed out":"error"}}else return new Promise(u=>{var d,f,g;const p=this.channelAdapter.push(e.type,e,s.timeout||this.timeout);e.type==="broadcast"&&!(!((g=(f=(d=this.params)===null||d===void 0?void 0:d.config)===null||f===void 0?void 0:f.broadcast)===null||g===void 0)&&g.ack)&&u("ok"),p.receive("ok",()=>u("ok")),p.receive("error",()=>u("error")),p.receive("timeout",()=>u("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(s=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>s("ok")).receive("timeout",()=>s("timed out")).receive("error",()=>s("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,s,i){const l=new AbortController,u=setTimeout(()=>l.abort(),i),d=await this.socket.fetch(e,Object.assign(Object.assign({},s),{signal:l.signal}));return clearTimeout(u),d}_on(e,s,i){var l;const u=e.toLocaleLowerCase(),d=s?.filter;if((d instanceof gA||typeof d=="object"&&d!==null&&typeof d.build=="function")&&(s=Object.assign(Object.assign({},s),{filter:d.build()})),u===ya.POSTGRES_CHANGES&&((l=this.bindings[u])===null||l===void 0?void 0:l.find(x=>cs.isSamePostgresFilter(x.filter,s))))return this.socket.log("error",`duplicate \`postgres_changes\` binding for ${this.topic} ignored`,s),this;const f=this.channelAdapter.on(e,i),g={type:u,filter:s,callback:i,ref:f};return this.bindings[u]?this.bindings[u].push(g):this.bindings[u]=[g],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,s,i)=>{var l,u,d,f,g,p,x;const y=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(y,i))return!1;const b=(l=this.bindings[y])===null||l===void 0?void 0:l.find(w=>w.ref===e.ref);if(!b)return!0;if(["broadcast","presence","postgres_changes"].includes(y))if("id"in b){const w=b.id,j=(u=b.filter)===null||u===void 0?void 0:u.event;return w&&((d=s.ids)===null||d===void 0?void 0:d.includes(w))&&(j==="*"||j?.toLocaleLowerCase()===((f=s.data)===null||f===void 0?void 0:f.type.toLocaleLowerCase()))}else{const w=(p=(g=b?.filter)===null||g===void 0?void 0:g.event)===null||p===void 0?void 0:p.toLocaleLowerCase();return w==="*"||w===((x=s?.event)===null||x===void 0?void 0:x.toLocaleLowerCase())}else return b.type.toLocaleLowerCase()===y})}_notThisChannelEvent(e,s){const{close:i,error:l,leave:u,join:d}=oj;return s&&[i,l,u,d].includes(e)&&s!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,s,i)=>{if(typeof s=="object"&&"ids"in s){const l=s.data,{schema:u,table:d,commit_timestamp:f,type:g,errors:p}=l;return Object.assign(Object.assign({},{schema:u,table:d,commit_timestamp:f,eventType:g,new:{},old:{},errors:p}),this._getPayloadRecords(l))}return s})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const s in e.bindings)for(const i of e.bindings[s])this._on(i.type,i.filter,i.callback)}static isFilterValueEqual(e,s){return(e??void 0)===(s??void 0)}static isSamePostgresFilter(e,s){var i,l,u,d;const f=(l=(i=e?.select)===null||i===void 0?void 0:i.join())!==null&&l!==void 0?l:void 0,g=(d=(u=s?.select)===null||u===void 0?void 0:u.join())!==null&&d!==void 0?d:void 0;return e?.event===s?.event&&cs.isFilterValueEqual(e?.schema,s?.schema)&&cs.isFilterValueEqual(e?.table,s?.table)&&cs.isFilterValueEqual(e?.filter,s?.filter)&&f===g}_getPayloadRecords(e){const s={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(s.new=Vb(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(s.old=Vb(e.columns,e.old_record)),s}}class xA{constructor(e,s){this.socket=new aA(e,s)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,s,i,l=1e4){return new Promise(u=>{setTimeout(()=>u("timeout"),l),this.socket.disconnect(()=>{e(),u("ok")},s,i)})}push(e){this.socket.push(e)}log(e,s,i){this.socket.log(e,s,i)}hasLogger(){return this.socket.hasLogger()}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==Kf.connecting}isDisconnecting(){return this.socket.connectionState()==Kf.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Kb={HEARTBEAT_INTERVAL:25e3},yA=[1e3,2e3,5e3,1e4],bA=1e4;function vA(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var s;return(s=Array.from(t.keys())[e])!==null&&s!==void 0?s:null},removeItem(e){t.delete(e)},setItem(e,s){t.set(e,String(s))}}}function wA(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return vA()}const jA=`Unknown directive
48 addEventListener("message", (e) => {Syntax not understood
49 if (e.data.event === "start") {Syntax not understood
50 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval);Unknown directive
51 }Syntax not understood
52 });`;class SA{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,s){var i;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={},this.ref=0,this.serializer=new qE,this._manuallySetToken=!1,this._authPromise=null,this._authGeneration=0,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=u=>u?(...d)=>u(...d):(...d)=>fetch(...d),!(!((i=s?.params)===null||i===void 0)&&i.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=s.params.apikey;const l=this._initializeOptions(s);this.socketAdapter=new xA(e,l),this.httpEndpoint=uj(e),this.fetch=this._resolveFetch(s?.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const s=e.message;throw new Error(`WebSocket not available: ${s}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,s){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,s)}getChannels(){return this.channels}async removeChannel(e){const s=await e.unsubscribe();return s==="ok"&&e.teardown(),s}async removeAllChannels(){const e=this.channels.map(async i=>{const l=await i.unsubscribe();return i.teardown(),l}),s=await Promise.all(e);return await this.disconnect(),s}log(e,s,i){this.socketAdapter.log(e,s,i)}hasLogger(){return this.socketAdapter.hasLogger()}connectionState(){return this.socketAdapter.connectionState()||Kf.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,s={config:{}}){const i=`realtime:${e}`,l=this.getChannels().find(u=>u.topic===i);if(l)return l;{const u=new cs(`realtime:${e}`,s,this);return this._cancelPendingDisconnect(),this.channels.push(u),u}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){const s=++this._authGeneration,i=this._performAuth(e,s);s===this._authGeneration&&(this._authPromise=i);try{await i}finally{this._authPromise===i&&(this._authPromise=null)}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(s=>s.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e,s){let i,l=!1;if(e)i=e,l=!0;else if(this.accessToken)try{i=await this.accessToken()}catch(u){this.log("error","Error fetching access token from callback",u),i=this.accessTokenValue}else i=this.accessTokenValue;s===this._authGeneration&&(this.accessToken?this._manuallySetToken=!1:l&&(this._manuallySetToken=!0),this.accessTokenValue!=i&&(this.accessTokenValue=i,this.channels.forEach(u=>{const d={access_token:i,version:UE};u.updateJoinPayload(d),u.joinedOnce&&u.channelAdapter.isJoined()&&u.channelAdapter.push(oj.access_token,{access_token:i})})))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(s=>{this.log("error",`Error setting auth in ${e}`,s)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(s=>{this.log("error","error waiting for auth on connect",s)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(s,i)=>{s!=="disconnected"&&(s=="sent"&&this._setAuthSafely(),e&&e(s,i))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=s=>{this.log("worker","worker error",s.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=s=>{s.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let s;if(e)s=e;else{const i=new Blob([jA],{type:"application/javascript"});s=URL.createObjectURL(i)}return s}_initializeOptions(e){var s,i,l,u,d,f,g,p,x,y,b,w;this.worker=(s=e?.worker)!==null&&s!==void 0?s:!1,this.accessToken=(i=e?.accessToken)!==null&&i!==void 0?i:null;const j={};j.timeout=(l=e?.timeout)!==null&&l!==void 0?l:PE,j.heartbeatIntervalMs=(u=e?.heartbeatIntervalMs)!==null&&u!==void 0?u:Kb.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(d=e?.disconnectOnEmptyChannelsAfterMs)!==null&&d!==void 0?d:2*((f=e?.heartbeatIntervalMs)!==null&&f!==void 0?f:Kb.HEARTBEAT_INTERVAL),j.transport=(g=e?.transport)!==null&&g!==void 0?g:DE.getWebSocketConstructor(),j.params=e?.params,j.logger=e?.logger,j.heartbeatCallback=this._wrapHeartbeatCallback(e?.heartbeatCallback),j.sessionStorage=(p=e?.sessionStorage)!==null&&p!==void 0?p:wA(),j.reconnectAfterMs=(x=e?.reconnectAfterMs)!==null&&x!==void 0?x:(R=>yA[R-1]||bA);let N,_;const k=(y=e?.vsn)!==null&&y!==void 0?y:zE;switch(k){case LE:N=(R,M)=>M(JSON.stringify(R)),_=(R,M)=>M(JSON.parse(R));break;case lj:N=this.serializer.encode.bind(this.serializer),_=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${j.vsn}`)}if(j.vsn=k,j.encode=(b=e?.encode)!==null&&b!==void 0?b:N,j.decode=(w=e?.decode)!==null&&w!==void 0?w:_,j.beforeReconnect=this._reconnectAuth.bind(this),(e?.logLevel||e?.log_level)&&(this.logLevel=e.logLevel||e.log_level,j.params=Object.assign(Object.assign({},j.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e?.workerUrl,j.autoSendHeartbeat=!this.worker}return j}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}var ml=class extends Error{constructor(t,e){super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&e.icebergType?.includes("CommitState")===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function _A(t,e,s){const i=new URL(e,t);if(s)for(const[l,u]of Object.entries(s))u!==void 0&&i.searchParams.set(l,u);return i.toString()}async function NA(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function TA(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:s,path:i,query:l,body:u,headers:d}){const f=_A(t.baseUrl,i,l),g=await NA(t.auth),p=await e(f,{method:s,headers:{...u?{"Content-Type":"application/json"}:{},...g,...d},body:u?JSON.stringify(u):void 0}),x=await p.text(),y=(p.headers.get("content-type")||"").includes("application/json"),b=y&&x?JSON.parse(x):x;if(!p.ok){const w=y?b:void 0,j=w?.error;throw new ml(j?.message??`Request failed with status ${p.status}`,{status:p.status,icebergType:j?.type,icebergCode:j?.code,details:w})}return{status:p.status,headers:p.headers,data:b}}}}function oc(t){return t.join("")}var kA=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:oc(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(i=>({namespace:i}))}async createNamespace(t,e){const s={namespace:t.namespace,properties:e?.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:s})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${oc(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${oc(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${oc(t.namespace)}`}),!0}catch(e){if(e instanceof ml&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(s){if(s instanceof ml&&s.status===409)return;throw s}}};function vi(t){return t.join("")}var EA=class{constructor(t,e="",s){this.client=t,this.prefix=e,this.accessDelegation=s}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${vi(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const s={};return this.accessDelegation&&(s["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${vi(t.namespace)}/tables`,body:e,headers:s})).data.metadata}async updateTable(t,e){const s=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${vi(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":s.data["metadata-location"],metadata:s.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${vi(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String(e?.purge??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${vi(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${vi(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(s){if(s instanceof ml&&s.status===404)return!1;throw s}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(s){if(s instanceof ml&&s.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw s}}},AA=class{constructor(t){let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const s=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=TA({baseUrl:s,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=t.accessDelegation?.join(","),this.namespaceOps=new kA(this.client,e),this.tableOps=new EA(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function pl(t){"@babel/helpers - typeof";return pl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},pl(t)}function CA(t,e){if(pl(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var i=s.call(t,e);if(pl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function RA(t){var e=CA(t,"string");return pl(e)=="symbol"?e:e+""}function OA(t,e,s){return(e=RA(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function Yb(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,i)}return s}function ue(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};e%2?Yb(Object(s),!0).forEach(function(i){OA(t,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):Yb(Object(s)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(s,i))})}return t}var pu=class extends Error{constructor(t,e="storage",s,i){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=s,this.statusCode=i}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function gu(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Jf=class extends pu{constructor(t,e,s,i="storage",l){super(t,i,e,s),this.name=i==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=s,this.code=l}toJSON(){return ue(ue({},super.toJSON()),{},{code:this.code})}},hj=class extends pu{constructor(t,e,s="storage"){super(t,s),this.name=s==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function Hc(t,e,s){const i=ue({},t),l=e.toLowerCase();for(const u of Object.keys(i))u.toLowerCase()===l&&delete i[u];return i[l]=s,i}function DA(t){const e={};for(const[s,i]of Object.entries(t))e[s.toLowerCase()]=i;return e}const MA=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),UA=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Wf=t=>{if(Array.isArray(t))return t.map(s=>Wf(s));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([s,i])=>{const l=s.replace(/([-_][a-z])/gi,u=>u.toUpperCase().replace(/[-_]/g,""));e[l]=Wf(i)}),e},LA=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Qf=t=>t.split("/").map(encodeURIComponent).join("/"),Fb=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const s=e.error;if(typeof s.message=="string")return s.message}}return JSON.stringify(t)},zA=async(t,e,s,i)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const l=t;let u=parseInt(String(l.status),10);Number.isFinite(u)||(u=500),l.json().then(d=>{const f=d?.statusCode||d?.code||u+"";e(new Jf(Fb(d),u,f,i,d?.code))}).catch(()=>{const d=u+"";e(new Jf(l.statusText||`HTTP ${u} error`,u,d,i))})}else e(new hj(Fb(t),t,i))},PA=(t,e,s,i)=>{const l={method:t,headers:e?.headers||{}};if(t==="GET"||t==="HEAD"||!i)return ue(ue({},l),s);if(UA(i)){var u;const d=e?.headers||{};let f;for(const[g,p]of Object.entries(d))g.toLowerCase()==="content-type"&&(f=p);l.headers=Hc(d,"Content-Type",(u=f)!==null&&u!==void 0?u:"application/json"),l.body=JSON.stringify(i)}else l.body=i;return e?.duplex&&(l.duplex=e.duplex),ue(ue({},l),s)};async function Gr(t,e,s,i,l,u,d){return new Promise((f,g)=>{t(s,PA(e,i,l,u)).then(p=>{if(!p.ok)throw p;if(i?.noResolveJson)return p;if(d==="vectors"){const x=p.headers.get("content-type");if(p.headers.get("content-length")==="0"||p.status===204)return{};if(!x||!x.includes("application/json"))return{}}return p.json()}).then(p=>f(p)).catch(p=>zA(p,g,i,d))})}function fj(t="storage"){return{get:async(e,s,i,l)=>Gr(e,"GET",s,i,l,void 0,t),post:async(e,s,i,l,u)=>Gr(e,"POST",s,l,u,i,t),put:async(e,s,i,l,u)=>Gr(e,"PUT",s,l,u,i,t),head:async(e,s,i,l)=>Gr(e,"HEAD",s,ue(ue({},i),{},{noResolveJson:!0}),l,void 0,t),remove:async(e,s,i,l,u)=>Gr(e,"DELETE",s,l,u,i,t)}}const $A=fj("storage"),{get:Mi,post:Nn,put:Ic,head:BA,remove:Ui}=$A,tn=fj("vectors");var Gi=class{constructor(t,e={},s,i="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=DA(e),this.fetch=MA(s),this.namespace=i}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=Hc(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(s){if(e.shouldThrowOnError)throw s;if(gu(s))return{data:null,error:s};throw s}}};let mj;mj=Symbol.toStringTag;var VA=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[mj]="StreamDownloadBuilder",this.promise=null}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(gu(e))return{data:null,error:e};throw e}}};let pj;pj=Symbol.toStringTag;var qA=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[pj]="BlobDownloadBuilder",this.promise=null}asStream(){return new VA(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(gu(e))return{data:null,error:e};throw e}}};const uf={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Xb={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var HA=class extends Gi{constructor(t,e={},s,i){super(t,e,i,"storage"),this.bucketId=s}async uploadOrUpdate(t,e,s,i){var l=this;return l.handleOperation(async()=>{let u;const d=ue(ue({},Xb),i);let f=ue(ue({},l.headers),t==="POST"&&{"x-upsert":String(d.upsert)});const g=d.metadata;if(typeof Blob<"u"&&s instanceof Blob||typeof FormData<"u"&&s instanceof FormData?u=l.prepareUploadFormData(s,d):(u=s,f["cache-control"]=`max-age=${d.cacheControl}`,f["content-type"]=d.contentType,d.contentEncoding&&(f["content-encoding"]=d.contentEncoding),g&&(f["x-metadata"]=l.toBase64(l.encodeMetadata(g))),(typeof ReadableStream<"u"&&u instanceof ReadableStream||u&&typeof u=="object"&&"pipe"in u&&typeof u.pipe=="function")&&!d.duplex&&(d.duplex="half")),i?.headers)for(const[b,w]of Object.entries(i.headers))f=Hc(f,b,w);const p=l._removeEmptyFolders(e),x=l._getFinalPath(p),y=await(t=="PUT"?Ic:Nn)(l.fetch,`${l.url}/object/${x}`,u,ue({headers:f},d?.duplex?{duplex:d.duplex}:{}));return{path:p,id:y.Id,fullPath:y.Key}})}async upload(t,e,s){return this.uploadOrUpdate("POST",t,e,s)}async uploadToSignedUrl(t,e,s,i){var l=this;const u=l._removeEmptyFolders(t),d=l._getFinalPath(u),f=new URL(l.url+`/object/upload/sign/${d}`);return f.searchParams.set("token",e),l.handleOperation(async()=>{let g;const p=ue(ue({},Xb),i);let x=ue(ue({},l.headers),{"x-upsert":String(p.upsert)});const y=p.metadata;if(typeof Blob<"u"&&s instanceof Blob||typeof FormData<"u"&&s instanceof FormData?g=l.prepareUploadFormData(s,p):(g=s,x["cache-control"]=`max-age=${p.cacheControl}`,x["content-type"]=p.contentType,p.contentEncoding&&(x["content-encoding"]=p.contentEncoding),y&&(x["x-metadata"]=l.toBase64(l.encodeMetadata(y))),(typeof ReadableStream<"u"&&g instanceof ReadableStream||g&&typeof g=="object"&&"pipe"in g&&typeof g.pipe=="function")&&!p.duplex&&(p.duplex="half")),i?.headers)for(const[b,w]of Object.entries(i.headers))x=Hc(x,b,w);return{path:u,fullPath:(await Ic(l.fetch,f.toString(),g,ue({headers:x},p?.duplex?{duplex:p.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var s=this;return s.handleOperation(async()=>{let i=s._getFinalPath(t);const l=ue({},s.headers);e?.upsert&&(l["x-upsert"]="true");const u=await Nn(s.fetch,`${s.url}/object/upload/sign/${i}`,{},{headers:l}),d=new URL(s.url+u.url),f=d.searchParams.get("token");if(!f)throw new pu("No token returned by API");return{signedUrl:d.toString(),path:t,token:f}})}async update(t,e,s){return this.uploadOrUpdate("PUT",t,e,s)}async move(t,e,s){var i=this;return i.handleOperation(async()=>await Nn(i.fetch,`${i.url}/object/move`,{bucketId:i.bucketId,sourceKey:t,destinationKey:e,destinationBucket:s?.destinationBucket,sourceVersionId:s?.sourceVersionId},{headers:i.headers}))}async copy(t,e,s){var i=this;return i.handleOperation(async()=>{const l=s;return{path:(await Nn(i.fetch,`${i.url}/object/copy`,{bucketId:i.bucketId,sourceKey:t,destinationKey:e,destinationBucket:s?.destinationBucket,sourceVersionId:s?.sourceVersionId,copyMetadata:typeof l?.copyMetadata=="boolean"?l.copyMetadata:void 0,metadata:l?.copyMetadata===!1?l.metadata:void 0},{headers:i.headers})).Key}})}async createSignedUrl(t,e,s){var i=this;return i.handleOperation(async()=>{let l=i._getFinalPath(t);const u=typeof s?.transform=="object"&&s.transform!==null&&Object.keys(s.transform).length>0;let d=await Nn(i.fetch,`${i.url}/object/sign/${l}`,ue(ue({expiresIn:e},u?{transform:s.transform}:{}),s?.versionId!=null?{versionId:s.versionId}:{}),{headers:i.headers});const f=new URLSearchParams;s?.download&&f.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&f.set("cacheNonce",String(s.cacheNonce));const g=f.toString();return{signedUrl:encodeURI(`${i.url}${d.signedURL}${g?`&${g}`:""}`)}})}async createSignedUrls(t,e,s){var i=this;return i.handleOperation(async()=>{const l=await Nn(i.fetch,`${i.url}/object/sign/${i.bucketId}`,{expiresIn:e,paths:t},{headers:i.headers}),u=new URLSearchParams;s?.download&&u.set("download",s.download===!0?"":s.download),s?.cacheNonce!=null&&u.set("cacheNonce",String(s.cacheNonce));const d=u.toString();return l.map(f=>ue(ue({},f),{},{signedUrl:f.signedURL?encodeURI(`${i.url}${f.signedURL}${d?`&${d}`:""}`):null}))})}download(t,e,s){const i=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",l=new URLSearchParams;e?.transform&&this.applyTransformOptsToQuery(l,e.transform),e?.cacheNonce!=null&&l.set("cacheNonce",String(e.cacheNonce)),e?.versionId!=null&&l.set("versionId",String(e.versionId));const u=l.toString(),d=this._getFinalPath(t),f=()=>Mi(this.fetch,`${this.url}/${i}/${d}${u?`?${u}`:""}`,{headers:this.headers,noResolveJson:!0},s);return new qA(f,this.shouldThrowOnError)}async info(t,e){var s=this;const i=s._getFinalPath(t),l=new URLSearchParams;e?.versionId!=null&&l.set("versionId",String(e.versionId));const u=l.toString();return s.handleOperation(async()=>Wf(await Mi(s.fetch,`${s.url}/object/info/${i}${u?`?${u}`:""}`,{headers:s.headers})))}async exists(t){var e=this;const s=e._getFinalPath(t);try{return await BA(e.fetch,`${e.url}/object/${s}`,{headers:e.headers}),{data:!0,error:null}}catch(l){if(e.shouldThrowOnError)throw l;if(gu(l)){var i;const u=l instanceof Jf?l.status:l instanceof hj?(i=l.originalError)===null||i===void 0?void 0:i.status:void 0;if(u!==void 0&&[400,404].includes(u))return{data:!1,error:l}}throw l}}getPublicUrl(t,e){const s=this._getFinalPath(t),i=new URLSearchParams;e?.download&&i.set("download",e.download===!0?"":e.download),e?.transform&&this.applyTransformOptsToQuery(i,e.transform),e?.cacheNonce!=null&&i.set("cacheNonce",String(e.cacheNonce)),e?.versionId!=null&&i.set("versionId",String(e.versionId));const l=i.toString(),u=typeof e?.transform=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${u}/public/${s}`)+(l?`?${l}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Ui(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async purgeCache(t,e,s){var i=this;return i.handleOperation(async()=>{const l=Qf(i._getFinalPath(t)),u=new URLSearchParams;e?.transformations&&u.set("transformations","true");const d=u.toString();return await Ui(i.fetch,`${i.url}/cdn/${l}${d?`?${d}`:""}`,{},{headers:i.headers},s)})}async list(t,e,s){var i=this;return i.handleOperation(async()=>{const l=e?.sortBy?ue(ue({},uf.sortBy),e.sortBy):uf.sortBy,u=ue(ue(ue({},uf),e),{},{sortBy:l,prefix:t||""});return await Nn(i.fetch,`${i.url}/object/list/${i.bucketId}`,u,{headers:i.headers},s)})}async listV2(t,e){var s=this;return s.handleOperation(async()=>{const i=ue({},t);return await Nn(s.fetch,`${s.url}/object/list-v2/${s.bucketId}`,i,{headers:s.headers},e)})}prepareUploadFormData(t,e){const s=new FormData,i=[];t instanceof FormData?t.forEach((l,u)=>{typeof l=="string"?s.append(u,l):i.push([u,l])}):i.push(["",t]),s.has("cacheControl")||s.append("cacheControl",e.cacheControl),e.metadata&&!s.has("metadata")&&s.append("metadata",this.encodeMetadata(e.metadata)),e.contentEncoding&&!s.has("contentEncoding")&&s.append("contentEncoding",e.contentEncoding);for(const[l,u]of i)s.append(l,u);return s}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const IA="2.118.0",Dl={"X-Client-Info":`storage-js/${IA}`};var GA=class extends Gi{constructor(t,e={},s,i){const l=new URL(t);i?.useNewHostname&&/supabase\.(co|in|red)$/.test(l.hostname)&&!l.hostname.includes("storage.supabase.")&&(l.hostname=l.hostname.replace("supabase.","storage.supabase."));const u=l.href.replace(/\/$/,""),d=ue(ue({},Dl),e);super(u,d,s,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const s=e.listBucketOptionsToQueryString(t);return await Mi(e.fetch,`${e.url}/bucket${s}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Mi(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var s=this;return s.handleOperation(async()=>await Nn(s.fetch,`${s.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes,versioning_status:e.versioningStatus},{headers:s.headers}))}async updateBucket(t,e){var s=this;return s.handleOperation(async()=>await Ic(s.fetch,`${s.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes,versioning_status:e.versioningStatus},{headers:s.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await Nn(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Ui(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}async getBucketLifecycle(t){var e=this;return e.handleOperation(async()=>await Mi(e.fetch,e.bucketLifecycleUrl(t),{headers:e.headers}))}async updateBucketLifecycle(t,e){var s=this;return s.handleOperation(async()=>await Ic(s.fetch,s.bucketLifecycleUrl(t),e,{headers:s.headers}))}async deleteBucketLifecycle(t){var e=this;return e.handleOperation(async()=>await Ui(e.fetch,e.bucketLifecycleUrl(t),{},{headers:e.headers}))}async purgeBucketCache(t,e,s){var i=this;return i.handleOperation(async()=>{const l=new URLSearchParams;e?.transformations&&l.set("transformations","true");const u=l.toString();return await Ui(i.fetch,`${i.url}/cdn/${Qf(t)}${u?`?${u}`:""}`,{},{headers:i.headers},s)})}bucketLifecycleUrl(t){return`${this.url}/bucket/${Qf(t)}/lifecycle`}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},KA=class extends Gi{constructor(t,e={},s){const i=t.replace(/\/$/,""),l=ue(ue({},Dl),e);super(i,l,s,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Nn(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const s=new URLSearchParams;t?.limit!==void 0&&s.set("limit",t.limit.toString()),t?.offset!==void 0&&s.set("offset",t.offset.toString()),t?.sortColumn&&s.set("sortColumn",t.sortColumn),t?.sortOrder&&s.set("sortOrder",t.sortOrder),t?.search&&s.set("search",t.search);const i=s.toString(),l=i?`${e.url}/bucket?${i}`:`${e.url}/bucket`;return await Mi(e.fetch,l,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Ui(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!LA(t))throw new pu("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const s=new AA({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}),i=this.shouldThrowOnError;return new Proxy(s,{get(l,u){const d=l[u];return typeof d!="function"?d:async(...f)=>{try{return{data:await d.apply(l,f),error:null}}catch(g){if(i)throw g;return{data:null,error:g}}}}})}},YA=class extends Gi{constructor(t,e={},s){const i=t.replace(/\/$/,""),l=ue(ue({},Dl),{},{"Content-Type":"application/json"},e);super(i,l,s,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var s=this;return s.handleOperation(async()=>await tn.post(s.fetch,`${s.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:s.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var s=this;return s.handleOperation(async()=>await tn.post(s.fetch,`${s.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:s.headers})||{})}},FA=class extends Gi{constructor(t,e={},s){const i=t.replace(/\/$/,""),l=ue(ue({},Dl),{},{"Content-Type":"application/json"},e);super(i,l,s,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},XA=class extends Gi{constructor(t,e={},s){const i=t.replace(/\/$/,""),l=ue(ue({},Dl),{},{"Content-Type":"application/json"},e);super(i,l,s,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await tn.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},JA=class extends XA{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new WA(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,s=this;return e().call(s,t)}async getBucket(t){var e=()=>super.getBucket,s=this;return e().call(s,t)}async listBuckets(t={}){var e=()=>super.listBuckets,s=this;return e().call(s,t)}async deleteBucket(t){var e=()=>super.deleteBucket,s=this;return e().call(s,t)}},WA=class extends YA{constructor(t,e,s,i){super(t,e,i),this.vectorBucketName=s}async createIndex(t){var e=()=>super.createIndex,s=this;return e().call(s,ue(ue({},t),{},{vectorBucketName:s.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,s=this;return e().call(s,ue(ue({},t),{},{vectorBucketName:s.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,s=this;return e().call(s,s.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,s=this;return e().call(s,s.vectorBucketName,t)}index(t){return new QA(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},QA=class extends FA{constructor(t,e,s,i,l){super(t,e,l),this.vectorBucketName=s,this.indexName=i}async putVectors(t){var e=()=>super.putVectors,s=this;return e().call(s,ue(ue({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async getVectors(t){var e=()=>super.getVectors,s=this;return e().call(s,ue(ue({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,s=this;return e().call(s,ue(ue({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,s=this;return e().call(s,ue(ue({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,s=this;return e().call(s,ue(ue({},t),{},{vectorBucketName:s.vectorBucketName,indexName:s.indexName}))}},ZA=class extends GA{constructor(t,e={},s,i){super(t,e,s,i)}from(t){return new HA(this.url,this.headers,t,this.fetch)}get vectors(){return new JA(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new KA(this.url+"/iceberg",this.headers,this.fetch)}};const gj="2.118.0",us=30*1e3,Qr=3,df=Qr*us,eC=2*us,tC="http://localhost:9999",nC="supabase.auth.token",sC={"X-Client-Info":`gotrue-js/${gj}`},Zf="X-Supabase-Api-Version",xj={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},aC=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,ja="sb_flow_id",iC=5,rC=600*1e3;class gl extends Error{constructor(e,s,i){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=s,this.code=i}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function Z(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class lC extends gl{constructor(e,s,i){super(e,s,i),this.name="AuthApiError",this.status=s,this.code=i}}function Jb(t){return Z(t)&&t.name==="AuthApiError"}class Tn extends gl{constructor(e,s){super(e),this.name="AuthUnknownError",this.originalError=s}}class Bn extends gl{constructor(e,s,i,l){super(e,i,l),this.name=s,this.status=i}}class ft extends Bn{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function cc(t){return Z(t)&&t.name==="AuthSessionMissingError"}class wi extends Bn{constructor(){super("Auth session or user missing","AuthInvalidTokenResponseError",500,void 0)}}class uc extends Bn{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class dc extends Bn{constructor(e,s=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function oC(t){return Z(t)&&t.name==="AuthImplicitGrantRedirectError"}class Wb extends Bn{constructor(e,s=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=s}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class cC extends Bn{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Nc extends Bn{constructor(e,s){super(e,"AuthRetryableFetchError",s,void 0)}}function hc(t){return Z(t)&&t.name==="AuthRetryableFetchError"}class Qb extends Bn{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function Zb(t){return Z(t)&&t.name==="AuthRefreshDiscardedError"}class ev extends Bn{constructor(e,s,i){super(e,"AuthWeakPasswordError",s,"weak_password"),this.reasons=i}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class Gc extends Bn{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const Kc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),tv=` Unknown directive
53\r=`.split(""),uC=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<tv.length;e+=1)t[tv[e].charCodeAt(0)]=-2;for(let e=0;e<Kc.length;e+=1)t[Kc[e].charCodeAt(0)]=e;return t})();function nv(t,e,s){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const i=e.queue>>e.queuedBits-6&63;s(Kc[i]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const i=e.queue>>e.queuedBits-6&63;s(Kc[i]),e.queuedBits-=6}}function yj(t,e,s){const i=uC[t];if(i>-1)for(e.queue=e.queue<<6|i,e.queuedBits+=6;e.queuedBits>=8;)s(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(i===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function sv(t){const e=[],s=d=>{e.push(String.fromCodePoint(d))},i={utf8seq:0,codepoint:0},l={queue:0,queuedBits:0},u=d=>{fC(d,i,s)};for(let d=0;d<t.length;d+=1)yj(t.charCodeAt(d),l,u);return e.join("")}function dC(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function hC(t,e){for(let s=0;s<t.length;s+=1){let i=t.charCodeAt(s);if(i>55295&&i<=56319){const l=(i-55296)*1024&65535;i=(t.charCodeAt(s+1)-56320&65535|l)+65536,s+=1}dC(i,e)}}function fC(t,e,s){if(e.utf8seq===0){if(t<=127){s(t);return}for(let i=1;i<6;i+=1)if((t>>7-i&1)===0){e.utf8seq=i;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&s(e.codepoint)}}function Li(t){const e=[],s={queue:0,queuedBits:0},i=l=>{e.push(l)};for(let l=0;l<t.length;l+=1)yj(t.charCodeAt(l),s,i);return new Uint8Array(e)}function mC(t){const e=[];return hC(t,s=>e.push(s)),new Uint8Array(e)}function Sa(t){const e=[],s={queue:0,queuedBits:0},i=l=>{e.push(l)};return t.forEach(l=>nv(l,s,i)),nv(null,s,i),e.join("")}function bj(t){return Math.round(Date.now()/1e3)+t}function pC(){return Symbol("auth-callback")}const wt=()=>typeof window<"u"&&typeof document<"u",pa={tested:!1,writable:!1},vj=()=>{if(!wt())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(pa.tested)return pa.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),pa.tested=!0,pa.writable=!0}catch{pa.tested=!0,pa.writable=!1}return pa.writable};function av(t){const e={},s=new URL(t);if(s.hash&&s.hash[0]==="#")try{new URLSearchParams(s.hash.substring(1)).forEach((l,u)=>{e[u]=l})}catch{}return s.searchParams.forEach((i,l)=>{e[l]=i}),e}const wj=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),gC=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",hs=async(t,e,s)=>{await t.setItem(e,JSON.stringify(s))},Nt=async(t,e)=>{const s=await t.getItem(e);if(!s)return null;try{return JSON.parse(s)}catch{return null}},Ht=async(t,e)=>{await t.removeItem(e)};class xu{constructor(){this.promise=new xu.promiseConstructor((e,s)=>{this.resolve=e,this.reject=s})}}xu.promiseConstructor=Promise;function fc(t){const e=t.split(".");if(e.length!==3)throw new Gc("Invalid JWT structure");for(let i=0;i<e.length;i++)if(!aC.test(e[i]))throw new Gc("JWT not in base64url format");return{header:JSON.parse(sv(e[0])),payload:JSON.parse(sv(e[1])),signature:Li(e[2]),raw:{header:e[0],payload:e[1]}}}async function xC(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function yC(t,e){return new Promise((i,l)=>{(async()=>{for(let u=0;u<1/0;u++)try{const d=await t(u);if(!e(u,null,d)){i(d);return}}catch(d){if(!e(u,d)){l(d);return}}})()})}function jj(t){return("0"+t.toString(16)).substr(-2)}function bC(){const e=new Uint32Array(56);if(typeof crypto>"u"){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",i=s.length;let l="";for(let u=0;u<56;u++)l+=s.charAt(Math.floor(Math.random()*i));return l}return crypto.getRandomValues(e),Array.from(e,jj).join("")}async function vC(t){const s=new TextEncoder().encode(t),i=await crypto.subtle.digest("SHA-256",s),l=new Uint8Array(i);return Array.from(l).map(u=>String.fromCharCode(u)).join("")}async function wC(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const s=await vC(t);return btoa(s).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const jC=/^[a-zA-Z0-9_-]{8,64}$/;function Tc(t){return typeof t=="string"&&jC.test(t)?t:null}function SC(){if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const e=new Uint8Array(16);return crypto.getRandomValues(e),Array.from(e,jj).join("")}let t="";for(let e=0;e<32;e++)t+=Math.floor(Math.random()*16).toString(16);return t}const $i=(t,e)=>`${t}-flow-${e}-code-verifier`,xl=t=>`${t}-flows-code-verifier`;async function Ym(t,e){const s=await Nt(t,xl(e));return Array.isArray(s)?s.filter(i=>Tc(i)!==null):[]}async function _C(t,e,s,i,l){await hs(t,$i(e,s),i);const u=(await Ym(t,e)).filter(d=>d!==s);for(u.push(s);u.length>iC;){const d=u.shift();await Ht(t,$i(e,d)),l?.(d)}await hs(t,xl(e),u),await hs(t,`${e}-code-verifier`,i)}async function NC(t,e,s){if(s){const l=await Nt(t,$i(e,s));return{verifier:typeof l=="string"?l:null,flowId:s}}const i=await Nt(t,`${e}-code-verifier`);return{verifier:typeof i=="string"?i:null,flowId:null}}async function jn(t,e,s){const i=`${e}-code-verifier`;if(!s){await Ht(t,i);return}const l=$i(e,s),u=await Nt(t,l);await Ht(t,l);const d=await Ym(t,e),f=d.filter(g=>g!==s);f.length!==d.length&&(f.length>0?await hs(t,xl(e),f):await Ht(t,xl(e))),u!=null&&u===await Nt(t,i)&&await Ht(t,i)}async function TC(t,e){const s=await Ym(t,e);for(const i of s)await Ht(t,$i(e,i));await Ht(t,xl(e)),await Ht(t,`${e}-code-verifier`)}function kC(t,e){const s=t.indexOf("#");let i=s===-1?t:t.slice(0,s);const l=s===-1?"":t.slice(s),u=i.indexOf("?");if(u!==-1){const f=i.slice(0,u),g=i.slice(u+1).split("&").filter(p=>p!==""&&p!==ja&&!p.startsWith(`${ja}=`));i=g.length>0?`${f}?${g.join("&")}`:f}const d=i.includes("?")?"&":"?";return`${i}${d}${ja}=${encodeURIComponent(e)}${l}`}async function EC(t,e,s=!1,i){const l=bC();let u=l;s&&(u+="/recovery");const d=SC();await _C(t,e,d,u,i);const f=await wC(l);return[f,l===f?"plain":"s256",d]}const AC=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function CC(t){const e=t.headers.get(Zf);if(!e||!e.match(AC))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function RC(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function OC(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const DC=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function is(t){if(!DC.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function Kr(t){if(!t.recoveryCodes)throw new Error("@supabase/auth-js: the MFA recovery codes API is experimental and disabled by default. Enable it by passing `auth: { experimental: { recoveryCodes: true } }` to createClient (or to the GoTrueClient constructor).")}function hf(){const t={};return new Proxy(t,{get:(e,s)=>{if(s==="__isUserNotAvailableProxy")return!0;if(typeof s=="symbol"){const i=s.toString();if(i==="Symbol(Symbol.toPrimitive)"||i==="Symbol(Symbol.toStringTag)"||i==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${s}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,s)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${s}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function MC(t,e){return new Proxy(t,{get:(s,i,l)=>{if(i==="__isInsecureUserWarningProxy")return!0;if(typeof i=="symbol"){const u=i.toString();if(u==="Symbol(Symbol.toPrimitive)"||u==="Symbol(Symbol.toStringTag)"||u==="Symbol(util.inspect.custom)"||u==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(s,i,l)}return!e.value&&typeof i=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(s,i,l)}})}function iv(t){return JSON.parse(JSON.stringify(t))}const xa=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},rv=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function lv(t){var e;if(!gC(t))throw new Nc(xa(t),0);let s;try{s=await t.json()}catch(u){throw rv.includes(t.status)?new Nc(t.statusText||`HTTP ${t.status}`,t.status):new Tn(xa(u),u)}if(rv.includes(t.status))throw new Nc(xa(s),t.status);let i;const l=CC(t);if(l&&l.getTime()>=xj["2024-01-01"].timestamp&&typeof s=="object"&&s&&typeof s.code=="string"?i=s.code:typeof s=="object"&&s&&typeof s.error_code=="string"&&(i=s.error_code),i){if(i==="weak_password")throw new ev(xa(s),t.status,((e=s.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(i==="session_not_found")throw new ft}else if(typeof s=="object"&&s&&typeof s.weak_password=="object"&&s.weak_password&&Array.isArray(s.weak_password.reasons)&&s.weak_password.reasons.length&&s.weak_password.reasons.reduce((u,d)=>u&&typeof d=="string",!0))throw new ev(xa(s),t.status,s.weak_password.reasons);throw new lC(xa(s),t.status||500,i)}const UC=(t,e,s,i)=>{const l={method:t,headers:e?.headers||{}};return t==="GET"?l:(l.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e?.headers),l.body=JSON.stringify(i),Object.assign(Object.assign({},l),s))};async function se(t,e,s,i){var l;const u=Object.assign({},i?.headers);u[Zf]||(u[Zf]=xj["2024-01-01"].name),i?.jwt&&(u.Authorization=`Bearer ${i.jwt}`);const d=(l=i?.query)!==null&&l!==void 0?l:{};i?.redirectTo&&(d.redirect_to=i.redirectTo);const f=Object.keys(d).length?"?"+new URLSearchParams(d).toString():"",g=await LC(t,e,s+f,{headers:u,noResolveJson:i?.noResolveJson},{},i?.body);return i?.xform?i?.xform(g):{data:Object.assign({},g),error:null}}async function LC(t,e,s,i,l,u){const d=UC(e,i,l,u);let f;try{f=await t(s,Object.assign({},d))}catch(g){throw new Nc(xa(g),0)}if(f.ok||await lv(f),i?.noResolveJson)return f;try{return await f.json()}catch(g){await lv(g)}}function pn(t){var e;let s=null;$C(t)&&(s=Object.assign({},t),t.expires_at||(s.expires_at=bj(t.expires_in)));const i=(e=t.user)!==null&&e!==void 0?e:typeof t?.id=="string"?t:null;return{data:{session:s,user:i},error:null}}function ov(t){const e=pn(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((s,i)=>s&&typeof i=="string",!0)&&(e.data.weak_password=t.weak_password),e}function qs(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function zC(t){return{data:t,error:null}}function PC(t){const{action_link:e,email_otp:s,hashed_token:i,redirect_to:l,verification_type:u}=t,d=mu(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),f={action_link:e,email_otp:s,hashed_token:i,redirect_to:l,verification_type:u},g=Object.assign({},d);return{data:{properties:f,user:g},error:null}}function cv(t){return t}function $C(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const ff=["global","local","others"];class BC{constructor({url:e="",headers:s={},fetch:i,experimental:l}){this.url=e,this.headers=s,this.fetch=wj(i),this.experimental=l??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,s=ff[0]){if(ff.indexOf(s)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${ff.join(", ")}`);try{return await se(this.fetch,"POST",`${this.url}/logout?scope=${s}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(i){if(Z(i))return{data:null,error:i};throw i}}async inviteUserByEmail(e,s={}){try{return await se(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:s.data},headers:this.headers,redirectTo:s.redirectTo,xform:qs})}catch(i){if(Z(i))return{data:{user:null},error:i};throw i}}async generateLink(e){try{const{options:s}=e,i=mu(e,["options"]),l=Object.assign(Object.assign({},i),s);return"newEmail"in i&&(l.new_email=i?.newEmail,delete l.newEmail),await se(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:l,headers:this.headers,xform:PC,redirectTo:s?.redirectTo})}catch(s){if(Z(s))return{data:{properties:null,user:null},error:s};throw s}}async createUser(e){try{return await se(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:qs})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async listUsers(e){var s,i,l,u,d,f,g;try{const p={nextPage:null,lastPage:0,total:0},x=await se(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(s=e?.page)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:"",per_page:(u=(l=e?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:cv});if(x.error)throw x.error;const y=await x.json(),b=(d=x.headers.get("x-total-count"))!==null&&d!==void 0?d:0,w=(g=(f=x.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&g!==void 0?g:[];return w.length>0&&(w.forEach(j=>{const N=parseInt(j.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(j.split(";")[1].split("=")[1]);p[`${_}Page`]=N}),p.total=parseInt(b)),{data:Object.assign(Object.assign({},y),p),error:null}}catch(p){if(Z(p))return{data:{users:[]},error:p};throw p}}async getUserById(e){is(e);try{return await se(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:qs})}catch(s){if(Z(s))return{data:{user:null},error:s};throw s}}async updateUserById(e,s){is(e);try{return await se(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:s,headers:this.headers,xform:qs})}catch(i){if(Z(i))return{data:{user:null},error:i};throw i}}async deleteUser(e,s=!1){is(e);try{return await se(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:s},xform:qs})}catch(i){if(Z(i))return{data:{user:null},error:i};throw i}}async _listFactors(e){is(e.userId);try{const{data:s,error:i}=await se(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:l=>({data:{factors:l},error:null})});return{data:s,error:i}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _deleteFactor(e){is(e.userId),is(e.id);try{return{data:await se(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _listOAuthClients(e){var s,i,l,u,d,f,g;try{const p={nextPage:null,lastPage:0,total:0},x=await se(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(i=(s=e?.page)===null||s===void 0?void 0:s.toString())!==null&&i!==void 0?i:"",per_page:(u=(l=e?.perPage)===null||l===void 0?void 0:l.toString())!==null&&u!==void 0?u:""},xform:cv});if(x.error)throw x.error;const y=await x.json(),b=(d=x.headers.get("x-total-count"))!==null&&d!==void 0?d:0,w=(g=(f=x.headers.get("link"))===null||f===void 0?void 0:f.split(","))!==null&&g!==void 0?g:[];return w.length>0&&(w.forEach(j=>{const N=parseInt(j.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(j.split(";")[1].split("=")[1]);p[`${_}Page`]=N}),p.total=parseInt(b)),{data:Object.assign(Object.assign({},y),p),error:null}}catch(p){if(Z(p))return{data:{clients:[]},error:p};throw p}}async _createOAuthClient(e){try{return await se(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getOAuthClient(e){try{return await se(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateOAuthClient(e,s){try{return await se(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:s,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(Z(i))return{data:null,error:i};throw i}}async _deleteOAuthClient(e){try{return await se(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _regenerateOAuthClientSecret(e){try{return await se(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _listCustomProviders(e){try{const s={};return e?.type&&(s.type=e.type),await se(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:s,xform:i=>{var l;return{data:{providers:(l=i?.providers)!==null&&l!==void 0?l:[]},error:null}}})}catch(s){if(Z(s))return{data:{providers:[]},error:s};throw s}}async _createCustomProvider(e){try{return await se(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _getCustomProvider(e){try{return await se(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _updateCustomProvider(e,s){try{return await se(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:s,headers:this.headers,xform:i=>({data:i,error:null})})}catch(i){if(Z(i))return{data:null,error:i};throw i}}async _deleteCustomProvider(e){try{return await se(this.fetch,"DELETE",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminListPasskeys(e){is(e.userId);try{return await se(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:s=>({data:s,error:null})})}catch(s){if(Z(s))return{data:null,error:s};throw s}}async _adminDeletePasskey(e){is(e.userId),is(e.passkeyId);try{return await se(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(s){if(Z(s))return{data:null,error:s};throw s}}}function uv(t={}){return{getItem:e=>t[e]||null,setItem:(e,s)=>{t[e]=s},removeItem:e=>{delete t[e]}}}globalThis&&vj()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class VC extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function qC(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function Sj(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function HC(t){return parseInt(t,16)}function IC(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,i=>i.toString(16).padStart(2,"0")).join("")}function GC(t){var e;const{chainId:s,domain:i,expirationTime:l,issuedAt:u=new Date,nonce:d,notBefore:f,requestId:g,resources:p,scheme:x,uri:y,version:b}=t;{if(!Number.isInteger(s))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${s}`);if(!i)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(d&&d.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${d}`);if(!y)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(b!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${b}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(`Unknown directive
54`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const w=Sj(t.address),j=x?`${x}://${i}`:i,N=t.statement?`${t.statement}Unknown directive
55`:"",_=`${j} wants you to sign in with your Ethereum account:Unknown directive
56${w}Syntax not understood
58${N}`;let k=`URI: ${y}Unknown directive
59Version: ${b}Unknown directive
60Chain ID: ${s}${d?`Unknown directive
61Nonce: ${d}`:""}Unknown directive
62Issued At: ${u.toISOString()}`;if(l&&(k+=`Unknown directive
63Expiration Time: ${l.toISOString()}`),f&&(k+=`Unknown directive
64Not Before: ${f.toISOString()}`),g&&(k+=`Unknown directive
65Request ID: ${g}`),p){let R=`Unknown directive
66Resources:`;for(const M of p){if(!M||typeof M!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${M}`);R+=`Unknown directive
67- ${M}`}k+=R}return`${_}Syntax not understood
68${k}`}class at extends Error{constructor({message:e,code:s,cause:i,name:l}){var u;super(e,{cause:i}),this.__isWebAuthnError=!0,this.name=(u=l??(i instanceof Error?i.name:void 0))!==null&&u!==void 0?u:"Unknown Error",this.code=s}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class Yc extends at{constructor(e,s){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:s,message:e}),this.name="WebAuthnUnknownError",this.originalError=s}}function KC({error:t,options:e}){var s,i,l;const{publicKey:u}=e;if(!u)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new at({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((s=u.authenticatorSelection)===null||s===void 0?void 0:s.requireResidentKey)===!0)return new at({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((i=u.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new at({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((l=u.authenticatorSelection)===null||l===void 0?void 0:l.userVerification)==="required")return new at({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new at({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new at({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return u.pubKeyCredParams.filter(f=>f.type==="public-key").length===0?new at({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new at({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const d=window.location.hostname;if(_j(d)){if(u.rp.id!==d)return new at({message:`The RP ID "${u.rp.id}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new at({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(u.user.id.byteLength<1||u.user.id.byteLength>64)return new at({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new at({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new at({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function YC({error:t,options:e}){const{publicKey:s}=e;if(!s)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new at({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new at({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const i=window.location.hostname;if(_j(i)){if(s.rpId!==i)return new at({message:`The RP ID "${s.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new at({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new at({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new at({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class FC{createNewAbortSignal(){if(this.controller){const s=new Error("Cancelling existing WebAuthn API call for new one");s.name="AbortError",this.controller.abort(s)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const em=new FC;function dv(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:s,excludeCredentials:i}=t,l=mu(t,["challenge","user","excludeCredentials"]),u=Li(e).buffer,d=Object.assign(Object.assign({},s),{id:Li(s.id).buffer}),f=Object.assign(Object.assign({},l),{challenge:u,user:d});if(i&&i.length>0){f.excludeCredentials=new Array(i.length);for(let g=0;g<i.length;g++){const p=i[g];f.excludeCredentials[g]=Object.assign(Object.assign({},p),{id:Li(p.id).buffer,type:p.type||"public-key",transports:p.transports})}}return f}function hv(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:s}=t,i=mu(t,["challenge","allowCredentials"]),l=Li(e).buffer,u=Object.assign(Object.assign({},i),{challenge:l});if(s&&s.length>0){u.allowCredentials=new Array(s.length);for(let d=0;d<s.length;d++){const f=s[d];u.allowCredentials[d]=Object.assign(Object.assign({},f),{id:Li(f.id).buffer,type:f.type||"public-key",transports:f.transports})}}return u}function fv(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const s=t;return{id:t.id,rawId:t.id,response:{attestationObject:Sa(new Uint8Array(t.response.attestationObject)),clientDataJSON:Sa(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=s.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function mv(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const s=t,i=t.getClientExtensionResults(),l=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:Sa(new Uint8Array(l.authenticatorData)),clientDataJSON:Sa(new Uint8Array(l.clientDataJSON)),signature:Sa(new Uint8Array(l.signature)),userHandle:l.userHandle?Sa(new Uint8Array(l.userHandle)):void 0},type:"public-key",clientExtensionResults:i,authenticatorAttachment:(e=s.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function _j(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function Fc(){var t,e;return!!(wt()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator?.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator?.credentials)===null||e===void 0?void 0:e.get)=="function")}async function Nj(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Yc("Browser returned unexpected credential type",e)}:{data:null,error:new Yc("Empty credential response",e)}}catch(e){return{data:null,error:KC({error:e,options:t})}}}async function Tj(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new Yc("Browser returned unexpected credential type",e)}:{data:null,error:new Yc("Empty credential response",e)}}catch(e){return{data:null,error:YC({error:e,options:t})}}}const XC={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},JC={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function Xc(...t){const e=l=>l!==null&&typeof l=="object"&&!Array.isArray(l),s=l=>l instanceof ArrayBuffer||ArrayBuffer.isView(l),i={};for(const l of t)if(l)for(const u in l){const d=l[u];if(d!==void 0)if(Array.isArray(d))i[u]=d;else if(s(d))i[u]=d;else if(e(d)){const f=i[u];e(f)?i[u]=Xc(f,d):i[u]=Xc(d)}else i[u]=d}return i}function WC(t,e){return Xc(XC,t,e||{})}function QC(t,e){return Xc(JC,t,e||{})}class ZC{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:s,friendlyName:i,signal:l},u){var d;try{const{data:f,error:g}=await this.client.mfa.challenge({factorId:e,webauthn:s});if(!f)return{data:null,error:g};const p=l??em.createNewAbortSignal();if(f.webauthn.type==="create"){const{user:x}=f.webauthn.credential_options.publicKey;if(!x.name){const y=i;if(y)x.name=`${x.id}:${y}`;else{const w=(await this.client.getUser()).data.user,j=((d=w?.user_metadata)===null||d===void 0?void 0:d.name)||w?.email||w?.id||"User";x.name=`${x.id}:${j}`}}x.displayName||(x.displayName=x.name)}switch(f.webauthn.type){case"create":{const x=WC(f.webauthn.credential_options.publicKey,u?.create),{data:y,error:b}=await Nj({publicKey:x,signal:p});return y?{data:{factorId:e,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}case"request":{const x=QC(f.webauthn.credential_options.publicKey,u?.request),{data:y,error:b}=await Tj(Object.assign(Object.assign({},f.webauthn.credential_options),{publicKey:x,signal:p}));return y?{data:{factorId:e,challengeId:f.id,webauthn:{type:f.webauthn.type,credential_response:y}},error:null}:{data:null,error:b}}}}catch(f){return Z(f)?{data:null,error:f}:{data:null,error:new Tn("Unexpected error in challenge",f)}}}async _verify({challengeId:e,factorId:s,webauthn:i}){return this.client.mfa.verify({factorId:s,challengeId:e,webauthn:i})}async _authenticate({factorId:e,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new gl("rpId is required for WebAuthn authentication")};try{if(!Fc())return{data:null,error:new Tn("Browser does not support WebAuthn",null)};const{data:d,error:f}=await this.challenge({factorId:e,webauthn:{rpId:s,rpOrigins:i},signal:l},{request:u});if(!d)return{data:null,error:f};const{webauthn:g}=d;return this._verify({factorId:e,challengeId:d.challengeId,webauthn:{type:g.type,rpId:s,rpOrigins:i,credential_response:g.credential_response}})}catch(d){return Z(d)?{data:null,error:d}:{data:null,error:new Tn("Unexpected error in authenticate",d)}}}async _register({friendlyName:e,webauthn:{rpId:s=typeof window<"u"?window.location.hostname:void 0,rpOrigins:i=typeof window<"u"?[window.location.origin]:void 0,signal:l}={}},u){if(!s)return{data:null,error:new gl("rpId is required for WebAuthn registration")};try{if(!Fc())return{data:null,error:new Tn("Browser does not support WebAuthn",null)};const{data:d,error:f}=await this._enroll({friendlyName:e});if(!d)return await this.client.mfa.listFactors().then(x=>{var y;return(y=x.data)===null||y===void 0?void 0:y.all.find(b=>b.factor_type==="webauthn"&&b.friendly_name===e&&b.status==="unverified")}).then(x=>x?this.client.mfa.unenroll({factorId:x?.id}):void 0),{data:null,error:f};const{data:g,error:p}=await this._challenge({factorId:d.id,friendlyName:d.friendly_name,webauthn:{rpId:s,rpOrigins:i},signal:l},{create:u});return g?this._verify({factorId:d.id,challengeId:g.challengeId,webauthn:{rpId:s,rpOrigins:i,type:g.webauthn.type,credential_response:g.webauthn.credential_response}}):{data:null,error:p}}catch(d){return Z(d)?{data:null,error:d}:{data:null,error:new Tn("Unexpected error in register",d)}}}}qC();const eR={url:tC,storageKey:nC,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:sC,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},ji={};let pv=!1;class yl{get jwks(){var e,s;return(s=(e=ji[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&s!==void 0?s:{keys:[]}}set jwks(e){ji[this.storageKey]=Object.assign(Object.assign({},ji[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,s;return(s=(e=ji[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&s!==void 0?s:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){ji[this.storageKey]=Object.assign(Object.assign({},ji[this.storageKey]),{cachedAt:e})}constructor(e){var s,i,l;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const u=Object.assign(Object.assign({},eR),e);if(this.storageKey=u.storageKey,this.instanceID=(s=yl.nextInstanceID[this.storageKey])!==null&&s!==void 0?s:0,yl.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!u.debug,typeof u.debug=="function"&&(this.logger=u.debug),this.instanceID>0&&wt()){const d=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(d),this.logDebugMessages&&console.trace(d)}if(this.persistSession=u.persistSession,this.autoRefreshToken=u.autoRefreshToken,this.experimental=(i=u.experimental)!==null&&i!==void 0?i:{},this.admin=new BC({url:u.url,headers:u.headers,fetch:u.fetch,experimental:this.experimental}),this.url=u.url,this.headers=u.headers,this.fetch=wj(u.fetch),this.detectSessionInUrl=u.detectSessionInUrl,this.flowType=u.flowType,this.hasCustomAuthorizationHeader=u.hasCustomAuthorizationHeader,this.throwOnError=u.throwOnError,this.lockAcquireTimeout=u.lockAcquireTimeout,u.lock!=null&&(this.lock=u.lock,pv||(pv=!0,console.warn(`${this._logPrefix()} The "lock" option is deprecated and will be removed in v3. The client now coordinates session refreshes without a lock, so most apps can drop the option. See https://github.com/supabase/supabase-js/blob/master/packages/core/auth-js/migrations/lockless-coordination.md`))),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new ZC(this),recoveryCodes:{getStatus:this._getRecoveryCodesStatus.bind(this),generate:this._generateRecoveryCodes.bind(this),verify:this._verifyRecoveryCode.bind(this),regenerate:this._regenerateRecoveryCodes.bind(this),unenroll:this._unenrollRecoveryCodes.bind(this)}},this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(u.storage?this.storage=u.storage:vj()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=uv(this.memoryStorage)),u.userStorage&&(this.userStorage=u.userStorage)):(this.memoryStorage={},this.storage=uv(this.memoryStorage)),wt()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(d){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",d)}(l=this.broadcastChannel)===null||l===void 0||l.addEventListener("message",async d=>{this._debug("received broadcast notification from other tab or client",d),(d.data.event==="TOKEN_REFRESHED"||d.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(d.data.event,d.data.session,!1)}catch(f){this._debug("#broadcastChannel","error",f)}})}u.skipAutoInitialize||this.initialize().catch(d=>{this._debug("#initialize()","error",d)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${gj}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){var e;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();const s=await this.initializePromise,i=(e=this._pendingInitNotifications)!==null&&e!==void 0?e:[];this._pendingInitNotifications=null;for(const l of i)await this._notifyAllSubscribers(l.event,l.session,l.broadcast);return s}async _initialize(){var e;try{let s={},i="none";if(wt()&&(s=av(window.location.href),this._isImplicitGrantCallback(s)?i="implicit":await this._isPKCECallback(s)&&(i="pkce")),wt()&&this.detectSessionInUrl&&i!=="none"){const{data:l,error:u}=await this._getSessionFromURL(s,i);if(u){if(this._debug("#_initialize()","error detecting session from URL",u),oC(u)){const g=(e=u.details)===null||e===void 0?void 0:e.code;if(g==="identity_already_exists"||g==="identity_not_found"||g==="single_identity_not_deletable")return{error:u}}return{error:u}}const{session:d,redirectType:f}=l;return this._debug("#_initialize()","detected session in URL",d,"redirect type",f),await this._saveSession(d),setTimeout(async()=>{f==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",d):await this._notifyAllSubscribers("SIGNED_IN",d)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(s){return Z(s)?this._returnResult({error:s}):this._returnResult({error:new Tn("Unexpected error during initialization",s)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var s,i,l;try{const u=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(i=(s=e?.options)===null||s===void 0?void 0:s.data)!==null&&i!==void 0?i:{},gotrue_meta_security:{captcha_token:(l=e?.options)===null||l===void 0?void 0:l.captchaToken}},xform:pn}),{data:d,error:f}=u;if(f||!d)return this._returnResult({data:{user:null,session:null},error:f});const g=d.session,p=d.user;return d.session&&(await this._saveSession(d.session),await this._notifyAllSubscribers("SIGNED_IN",g)),this._returnResult({data:{user:p,session:g},error:null})}catch(u){if(Z(u))return this._returnResult({data:{user:null,session:null},error:u});throw u}}async signUp(e){var s,i,l;let u=null;try{let d;if("email"in e){const{email:y,password:b,options:w}=e;let j=null,N=null;this.flowType==="pkce"&&([j,N,u]=await this._getCodeChallengeAndMethod()),d=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(w?.emailRedirectTo,u),body:{email:y,password:b,data:(s=w?.data)!==null&&s!==void 0?s:{},gotrue_meta_security:{captcha_token:w?.captchaToken},code_challenge:j,code_challenge_method:N},xform:pn})}else if("phone"in e){const{phone:y,password:b,options:w}=e;d=await se(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:y,password:b,data:(i=w?.data)!==null&&i!==void 0?i:{},channel:(l=w?.channel)!==null&&l!==void 0?l:"sms",gotrue_meta_security:{captcha_token:w?.captchaToken}},xform:pn})}else throw new uc("You must provide either an email or phone number and a password");const{data:f,error:g}=d;if(g||!f)return await jn(this.storage,this.storageKey,u),this._returnResult({data:{user:null,session:null},error:g});const p=f.session,x=f.user;return f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("SIGNED_IN",p)),this._returnResult({data:{user:x,session:p},error:null})}catch(d){if(await jn(this.storage,this.storageKey,u),Z(d))return this._returnResult({data:{user:null,session:null},error:d});throw d}}async signInWithPassword(e){try{let s;if("email"in e){const{email:u,password:d,options:f}=e;s=await se(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:u,password:d,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:ov})}else if("phone"in e){const{phone:u,password:d,options:f}=e;s=await se(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:u,password:d,gotrue_meta_security:{captcha_token:f?.captchaToken}},xform:ov})}else throw new uc("You must provide either an email or phone number and a password");const{data:i,error:l}=s;if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!i||!i.session||!i.user){const u=new wi;return this._returnResult({data:{user:null,session:null},error:u})}return i.session&&(await this._saveSession(i.session),await this._notifyAllSubscribers("SIGNED_IN",i.session)),this._returnResult({data:Object.assign({user:i.user,session:i.session},i.weak_password?{weakPassword:i.weak_password}:null),error:l})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOAuth(e){var s,i,l,u;return await this._handleProviderSignIn(e.provider,{redirectTo:(s=e.options)===null||s===void 0?void 0:s.redirectTo,scopes:(i=e.options)===null||i===void 0?void 0:i.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:(u=e.options)===null||u===void 0?void 0:u.skipBrowserRedirect})}async exchangeCodeForSession(e,s){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e,s)):this._exchangeCodeForSession(e,s)}async signInWithWeb3(e){const{chain:s}=e;switch(s){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${s}"`)}}async signInWithEthereum(e){var s,i,l,u,d,f,g,p,x,y,b;let w,j;if("message"in e)w=e.message,j=e.signature;else{const{chain:N,wallet:_,statement:k,options:R}=e;let M;if(wt())if(typeof _=="object")M=_;else{const q=window;if("ethereum"in q&&typeof q.ethereum=="object"&&"request"in q.ethereum&&typeof q.ethereum.request=="function")M=q.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof _!="object"||!R?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");M=_}const T=new URL((s=R?.url)!==null&&s!==void 0?s:window.location.href),F=await M.request({method:"eth_requestAccounts"}).then(q=>q).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!F||F.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const I=Sj(F[0]);let E=(i=R?.signInWithEthereum)===null||i===void 0?void 0:i.chainId;if(!E){const q=await M.request({method:"eth_chainId"});E=HC(q)}const L={domain:T.host,address:I,statement:k,uri:T.href,version:"1",chainId:E,nonce:(l=R?.signInWithEthereum)===null||l===void 0?void 0:l.nonce,issuedAt:(d=(u=R?.signInWithEthereum)===null||u===void 0?void 0:u.issuedAt)!==null&&d!==void 0?d:new Date,expirationTime:(f=R?.signInWithEthereum)===null||f===void 0?void 0:f.expirationTime,notBefore:(g=R?.signInWithEthereum)===null||g===void 0?void 0:g.notBefore,requestId:(p=R?.signInWithEthereum)===null||p===void 0?void 0:p.requestId,resources:(x=R?.signInWithEthereum)===null||x===void 0?void 0:x.resources};w=GC(L),j=await M.request({method:"personal_sign",params:[IC(w),I]})}try{const{data:N,error:_}=await se(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:w,signature:j},!((y=e.options)===null||y===void 0)&&y.captchaToken?{gotrue_meta_security:{captcha_token:(b=e.options)===null||b===void 0?void 0:b.captchaToken}}:null),xform:pn});if(_)throw _;if(!N||!N.session||!N.user){const k=new wi;return this._returnResult({data:{user:null,session:null},error:k})}return N.session&&(await this._saveSession(N.session),await this._notifyAllSubscribers("SIGNED_IN",N.session)),this._returnResult({data:Object.assign({},N),error:_})}catch(N){if(Z(N))return this._returnResult({data:{user:null,session:null},error:N});throw N}}async signInWithSolana(e){var s,i,l,u,d,f,g,p,x,y,b,w;let j,N;if("message"in e)j=e.message,N=e.signature;else{const{chain:_,wallet:k,statement:R,options:M}=e;let T;if(wt())if(typeof k=="object")T=k;else{const I=window;if("solana"in I&&typeof I.solana=="object"&&("signIn"in I.solana&&typeof I.solana.signIn=="function"||"signMessage"in I.solana&&typeof I.solana.signMessage=="function"))T=I.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof k!="object"||!M?.url)throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");T=k}const F=new URL((s=M?.url)!==null&&s!==void 0?s:window.location.href);if("signIn"in T&&T.signIn){const I=await T.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},M?.signInWithSolana),{version:"1",domain:F.host,uri:F.href}),R?{statement:R}:null));let E;if(Array.isArray(I)&&I[0]&&typeof I[0]=="object")E=I[0];else if(I&&typeof I=="object"&&"signedMessage"in I&&"signature"in I)E=I;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in E&&"signature"in E&&(typeof E.signedMessage=="string"||E.signedMessage instanceof Uint8Array)&&E.signature instanceof Uint8Array)j=typeof E.signedMessage=="string"?E.signedMessage:new TextDecoder().decode(E.signedMessage),N=E.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in T)||typeof T.signMessage!="function"||!("publicKey"in T)||typeof T!="object"||!T.publicKey||!("toBase58"in T.publicKey)||typeof T.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");j=[`${F.host} wants you to sign in with your Solana account:`,T.publicKey.toBase58(),...R?["",R,""]:[""],"Version: 1",`URI: ${F.href}`,`Issued At: ${(l=(i=M?.signInWithSolana)===null||i===void 0?void 0:i.issuedAt)!==null&&l!==void 0?l:new Date().toISOString()}`,...!((u=M?.signInWithSolana)===null||u===void 0)&&u.notBefore?[`Not Before: ${M.signInWithSolana.notBefore}`]:[],...!((d=M?.signInWithSolana)===null||d===void 0)&&d.expirationTime?[`Expiration Time: ${M.signInWithSolana.expirationTime}`]:[],...!((f=M?.signInWithSolana)===null||f===void 0)&&f.chainId?[`Chain ID: ${M.signInWithSolana.chainId}`]:[],...!((g=M?.signInWithSolana)===null||g===void 0)&&g.nonce?[`Nonce: ${M.signInWithSolana.nonce}`]:[],...!((p=M?.signInWithSolana)===null||p===void 0)&&p.requestId?[`Request ID: ${M.signInWithSolana.requestId}`]:[],...!((y=(x=M?.signInWithSolana)===null||x===void 0?void 0:x.resources)===null||y===void 0)&&y.length?["Resources",...M.signInWithSolana.resources.map(E=>`- ${E}`)]:[]].join(`Unknown directive
69`);const I=await T.signMessage(new TextEncoder().encode(j),"utf8");if(!I||!(I instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");N=I}}try{const{data:_,error:k}=await se(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:j,signature:Sa(N)},!((b=e.options)===null||b===void 0)&&b.captchaToken?{gotrue_meta_security:{captcha_token:(w=e.options)===null||w===void 0?void 0:w.captchaToken}}:null),xform:pn});if(k)throw k;if(!_||!_.session||!_.user){const R=new wi;return this._returnResult({data:{user:null,session:null},error:R})}return _.session&&(await this._saveSession(_.session),await this._notifyAllSubscribers("SIGNED_IN",_.session)),this._returnResult({data:Object.assign({},_),error:k})}catch(_){if(Z(_))return this._returnResult({data:{user:null,session:null},error:_});throw _}}async _exchangeCodeForSession(e,s){const i=s?.flowId!=null,l=i?Tc(s?.flowId):wt()?Tc(av(window.location.href)[ja]):null;i&&!l&&this._debug("#_exchangeCodeForSession()","provided flowId is not a valid flow id",s?.flowId);const{verifier:u,flowId:d}=i&&!l?{verifier:null,flowId:null}:await NC(this.storage,this.storageKey,l),[f,g]=(u??"").split("/");try{if(!f&&this.flowType==="pkce")throw new cC;const{data:p,error:x}=await se(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:f},xform:pn});if(await jn(this.storage,this.storageKey,d),x)throw x;if(!p||!p.session||!p.user){const y=new wi;return this._returnResult({data:{user:null,session:null,redirectType:null},error:y})}return p.session&&(await this._saveSession(p.session),await this._notifyAllSubscribers(g==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",p.session)),this._returnResult({data:Object.assign(Object.assign({},p),{redirectType:g??null}),error:x})}catch(p){if(await jn(this.storage,this.storageKey,d),Z(p))return this._returnResult({data:{user:null,session:null,redirectType:null},error:p});throw p}}async signInWithIdToken(e){try{const{options:s,provider:i,token:l,access_token:u,nonce:d}=e,f=await se(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:i,id_token:l,access_token:u,nonce:d,gotrue_meta_security:{captcha_token:s?.captchaToken}},xform:pn}),{data:g,error:p}=f;if(p)return this._returnResult({data:{user:null,session:null},error:p});if(!g||!g.session||!g.user){const x=new wi;return this._returnResult({data:{user:null,session:null},error:x})}return g.session&&(await this._saveSession(g.session),await this._notifyAllSubscribers("SIGNED_IN",g.session)),this._returnResult({data:g,error:p})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithOtp(e){var s,i,l,u,d;let f=null;try{if("email"in e){const{email:g,options:p}=e;let x=null,y=null;this.flowType==="pkce"&&([x,y,f]=await this._getCodeChallengeAndMethod());const{error:b}=await se(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:g,data:(s=p?.data)!==null&&s!==void 0?s:{},create_user:(i=p?.shouldCreateUser)!==null&&i!==void 0?i:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},code_challenge:x,code_challenge_method:y},redirectTo:this._maybeAppendFlowIdToRedirect(p?.emailRedirectTo,f)});return this._returnResult({data:{user:null,session:null},error:b})}if("phone"in e){const{phone:g,options:p}=e,{data:x,error:y}=await se(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:g,data:(l=p?.data)!==null&&l!==void 0?l:{},create_user:(u=p?.shouldCreateUser)!==null&&u!==void 0?u:!0,gotrue_meta_security:{captcha_token:p?.captchaToken},channel:(d=p?.channel)!==null&&d!==void 0?d:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:x?.message_id},error:y})}throw new uc("You must provide either an email or phone number.")}catch(g){if(await jn(this.storage,this.storageKey,f),Z(g))return this._returnResult({data:{user:null,session:null},error:g});throw g}}async verifyOtp(e){var s,i;try{let l,u;"options"in e&&(l=(s=e.options)===null||s===void 0?void 0:s.redirectTo,u=(i=e.options)===null||i===void 0?void 0:i.captchaToken);const{data:d,error:f}=await se(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:u}}),redirectTo:l,xform:pn});if(f)throw f;if(!d)throw new Error("An error occurred on token verification.");const g=d.session,p=d.user;return g?.access_token&&(await this._saveSession(g),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",g)),this._returnResult({data:{user:p,session:g},error:null})}catch(l){if(Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}}async signInWithSSO(e){var s,i,l,u;let d=null;try{let f=null,g=null;this.flowType==="pkce"&&([f,g,d]=await this._getCodeChallengeAndMethod());const p=await se(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:this._maybeAppendFlowIdToRedirect((s=e.options)===null||s===void 0?void 0:s.redirectTo,d)}),!((i=e?.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}:null),{skip_http_redirect:!0,code_challenge:f,code_challenge_method:g}),headers:this.headers,xform:zC});return!((l=p.data)===null||l===void 0)&&l.url&&wt()&&!(!((u=e.options)===null||u===void 0)&&u.skipBrowserRedirect)&&window.location.assign(p.data.url),this._returnResult(p)}catch(f){if(await jn(this.storage,this.storageKey,d),Z(f))return this._returnResult({data:null,error:f});throw f}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:s},error:i}=e;if(i)throw i;if(!s)throw new ft;const{error:l}=await se(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:s.access_token});return this._returnResult({data:{user:null,session:null},error:l})})}catch(e){if(Z(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){let s=null;try{const i=`${this.url}/resend`;if("email"in e){const{email:l,type:u,options:d}=e;let f=null,g=null;this.flowType==="pkce"&&([f,g,s]=await this._getCodeChallengeAndMethod());const{error:p}=await se(this.fetch,"POST",i,{headers:this.headers,body:{email:l,type:u,gotrue_meta_security:{captcha_token:d?.captchaToken},code_challenge:f,code_challenge_method:g},redirectTo:this._maybeAppendFlowIdToRedirect(d?.emailRedirectTo,s)});return p&&await jn(this.storage,this.storageKey,s),this._returnResult({data:{user:null,session:null},error:p})}else if("phone"in e){const{phone:l,type:u,options:d}=e,{data:f,error:g}=await se(this.fetch,"POST",i,{headers:this.headers,body:{phone:l,type:u,gotrue_meta_security:{captcha_token:d?.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:f?.message_id},error:g})}throw new uc("You must provide either an email or phone number and a type")}catch(i){if(await jn(this.storage,this.storageKey,s),Z(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,s){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const i=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),l=(async()=>(await i,await s()))();return this.pendingInLock.push((async()=>{try{await l}catch{}})()),l}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const i=s();for(this.pendingInLock.push((async()=>{try{await i}catch{}})()),await i;this.pendingInLock.length;){const l=[...this.pendingInLock];await Promise.all(l),this.pendingInLock.splice(0,l.length)}return await i}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const s=await this.__loadSession();return await e(s)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const s=await Nt(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",s),s!==null&&(this._isValidSession(s)?e=s:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const i=e.expires_at?e.expires_at*1e3-Date.now()<df:!1;if(this._debug("#__loadSession()",`session has${i?"":" not"} expired`,"expires_at",e.expires_at),!i)return{data:{session:await this._hydrateSessionUser(e)},error:null};const{data:l,error:u}=await this._callRefreshToken(e.refresh_token);if(u){const d=await Nt(this.storage,this.storageKey);return d&&this._isValidSession(d)&&d.expires_at&&d.expires_at*1e3>Date.now()?this._returnResult({data:{session:await this._hydrateSessionUser(d)},error:null}):this._returnResult({data:{session:null},error:u})}return this._returnResult({data:{session:l},error:null})}finally{this._debug("#__loadSession()","end")}}async _hydrateSessionUser(e){if(this.userStorage){const s=await Nt(this.userStorage,this.storageKey+"-user");e.user=s?.user?s.user:hf()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const s={value:this.suppressGetSessionWarning};e.user=MC(e.user,s),s.value&&(this.suppressGetSessionWarning=!0)}return e}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let s;return this.lock!=null?s=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):s=await this._getUser(),s.data.user&&(this.suppressGetSessionWarning=!0),s}async _getUser(e){try{return e?await se(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:qs}):await this._useSession(async s=>{var i,l,u;const{data:d,error:f}=s;if(f)throw f;return!(!((i=d.session)===null||i===void 0)&&i.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new ft}:await se(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(u=(l=d.session)===null||l===void 0?void 0:l.access_token)!==null&&u!==void 0?u:void 0,xform:qs})})}catch(s){if(Z(s))return cc(s)&&await this._removeSession(),this._returnResult({data:{user:null},error:s});throw s}}async updateUser(e,s={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,s)):await this._updateUser(e,s)}async _updateUser(e,s={}){let i=null;try{return await this._useSession(async l=>{const{data:u,error:d}=l;if(d)throw d;if(!u.session)throw new ft;const f=u.session;let g=null,p=null;this.flowType==="pkce"&&e.email!=null&&([g,p,i]=await this._getCodeChallengeAndMethod());const{data:x,error:y}=await se(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(s?.emailRedirectTo,i),body:Object.assign(Object.assign({},e),{code_challenge:g,code_challenge_method:p}),jwt:f.access_token,xform:qs});if(y)throw y;return f.user=x.user,await this._saveSession(f),await this._notifyAllSubscribers("USER_UPDATED",f),this._returnResult({data:{user:f.user},error:null})})}catch(l){if(await jn(this.storage,this.storageKey,i),Z(l))return this._returnResult({data:{user:null},error:l});throw l}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new ft;const s=Date.now()/1e3;let i=s,l=!0,u=null;const{payload:d}=fc(e.access_token);if(d.exp&&(i=d.exp,l=i<=s),l){const{data:f,error:g}=await this._callRefreshToken(e.refresh_token);if(g)return this._returnResult({data:{user:null,session:null},error:g});if(!f)return{data:{user:null,session:null},error:null};u=f}else{const{data:f,error:g}=await this._getUser(e.access_token);if(g)return this._returnResult({data:{user:null,session:null},error:g});u={access_token:e.access_token,refresh_token:e.refresh_token,user:f.user,token_type:"bearer",expires_in:i-s,expires_at:i},await this._saveSession(u),await this._notifyAllSubscribers("SIGNED_IN",u)}return this._returnResult({data:{user:u.user,session:u},error:null})}catch(s){if(Z(s))return this._returnResult({data:{session:null,user:null},error:s});throw s}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async s=>{var i;if(!e){const{data:d,error:f}=s;if(f)throw f;e=(i=d.session)!==null&&i!==void 0?i:void 0}if(!e?.refresh_token)throw new ft;const{data:l,error:u}=await this._callRefreshToken(e.refresh_token);return u?this._returnResult({data:{user:null,session:null},error:u}):l?this._returnResult({data:{user:l.user,session:l},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(s){if(Z(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async _getSessionFromURL(e,s){var i;try{if(!wt())throw new dc("No browser detected.");if(e.error||e.error_description||e.error_code)throw new dc(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(s){case"implicit":if(this.flowType==="pkce")throw new Wb("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new dc("Not a valid implicit grant flow url.");break;default:}if(s==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Wb("No code detected.");const{data:M,error:T}=await this._exchangeCodeForSession(e.code,{flowId:e[ja]});if(T)throw T;const F=new URL(window.location.href);return F.searchParams.delete("code"),F.searchParams.delete(ja),window.history.replaceState(window.history.state,"",F.toString()),{data:{session:M.session,redirectType:(i=M.redirectType)!==null&&i!==void 0?i:null},error:null}}const{provider_token:l,provider_refresh_token:u,access_token:d,refresh_token:f,expires_in:g,expires_at:p,token_type:x}=e;if(!d||!g||!f||!x)throw new dc("No session defined in URL");const y=Math.round(Date.now()/1e3),b=parseInt(g);let w=y+b;p&&(w=parseInt(p));const j=w-y;j*1e3<=us&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${j}s, should have been closer to ${b}s`);const N=w-b;y-N>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",N,w,y):y-N<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",N,w,y);const{data:_,error:k}=await this._getUser(d);if(k)throw k;const R={provider_token:l,provider_refresh_token:u,access_token:d,expires_in:b,expires_at:w,refresh_token:f,token_type:x,user:_.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:R,redirectType:e.type},error:null})}catch(l){if(Z(l))return this._returnResult({data:{session:null,redirectType:null},error:l});throw l}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){if(!e.code)return!1;const s=Tc(e[ja]);return s&&await Nt(this.storage,$i(this.storageKey,s))?!0:!!await Nt(this.storage,`${this.storageKey}-code-verifier`)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async s=>{var i;const l=async()=>{await this._removeSession()},{data:u,error:d}=s;if(d&&!cc(d))return this._returnResult({error:d});const f=(i=u.session)===null||i===void 0?void 0:i.access_token;if(f){const{error:g}=await this.admin.signOut(f,e);if(g&&!(Jb(g)&&(g.status===404||g.status===401||g.status===403)||cc(g)))return e!=="others"&&await l(),this._returnResult({error:g})}return e!=="others"&&await l(),this._returnResult({error:null})})}onAuthStateChange(e){const s=pC(),i={id:s,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",s),this.stateChangeEmitters.delete(s)}};return this._debug("#onAuthStateChange()","registered callback with id",s),this.stateChangeEmitters.set(s,i),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(s)}):await this._emitInitialSession(s)))(),{data:{subscription:i}}}async _emitInitialSession(e){return await this._useSession(async s=>{var i,l;try{const{data:{session:u},error:d}=s;if(d)throw d;await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",u)),this._debug("INITIAL_SESSION","callback id",e,"session",u)}catch(u){if(await((l=this.stateChangeEmitters.get(e))===null||l===void 0?void 0:l.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",u),Zb(u))return;cc(u)||hc(u)||Jb(u)&&(u.code==="refresh_token_not_found"||u.code==="refresh_token_already_used"||u.code==="session_expired")?console.warn(u):console.error(u)}})}async resetPasswordForEmail(e,s={}){let i=null,l=null,u=null;this.flowType==="pkce"&&([i,l,u]=await this._getCodeChallengeAndMethod(!0));try{return await se(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:i,code_challenge_method:l,gotrue_meta_security:{captcha_token:s.captchaToken}},headers:this.headers,redirectTo:this._maybeAppendFlowIdToRedirect(s.redirectTo,u)})}catch(d){if(await jn(this.storage,this.storageKey,u),Z(d))return this._returnResult({data:null,error:d});throw d}}async getUserIdentities(){var e;try{const{data:s,error:i}=await this.getUser();if(i)throw i;return this._returnResult({data:{identities:(e=s.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var s;let i=null;try{const{data:l,error:u}=await this._useSession(async d=>{var f,g,p,x,y;const{data:b,error:w}=d;if(w)throw w;const{url:j,flowId:N}=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(f=e.options)===null||f===void 0?void 0:f.redirectTo,scopes:(g=e.options)===null||g===void 0?void 0:g.scopes,queryParams:(p=e.options)===null||p===void 0?void 0:p.queryParams,skipBrowserRedirect:!0});return i=N,await se(this.fetch,"GET",j,{headers:this.headers,jwt:(y=(x=b.session)===null||x===void 0?void 0:x.access_token)!==null&&y!==void 0?y:void 0})});if(u)throw u;return wt()&&!(!((s=e.options)===null||s===void 0)&&s.skipBrowserRedirect)&&window.location.assign(l?.url),this._returnResult({data:{provider:e.provider,url:l?.url,flowId:i},error:null})}catch(l){if(Z(l))return this._returnResult({data:{provider:e.provider,url:null,flowId:i},error:l});throw l}}async linkIdentityIdToken(e){return await this._useSession(async s=>{var i;try{const{error:l,data:{session:u}}=s;if(l)throw l;const{options:d,provider:f,token:g,access_token:p,nonce:x}=e,y=await se(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(i=u?.access_token)!==null&&i!==void 0?i:void 0,body:{provider:f,id_token:g,access_token:p,nonce:x,link_identity:!0,gotrue_meta_security:{captcha_token:d?.captchaToken}},xform:pn}),{data:b,error:w}=y;return w?this._returnResult({data:{user:null,session:null},error:w}):!b||!b.session||!b.user?this._returnResult({data:{user:null,session:null},error:new wi}):(b.session&&(await this._saveSession(b.session),await this._notifyAllSubscribers("USER_UPDATED",b.session)),this._returnResult({data:b,error:w}))}catch(l){if(await jn(this.storage,this.storageKey,null),Z(l))return this._returnResult({data:{user:null,session:null},error:l});throw l}})}async unlinkIdentity(e){try{return await this._useSession(async s=>{var i,l;const{data:u,error:d}=s;if(d)throw d;return await se(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(l=(i=u.session)===null||i===void 0?void 0:i.access_token)!==null&&l!==void 0?l:void 0})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _refreshAccessToken(e){const s="#_refreshAccessToken()";this._debug(s,"begin");try{const i=Date.now();return await yC(async l=>(l>0&&await xC(200*Math.pow(2,l-1)),this._debug(s,"refreshing attempt",l),await se(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:pn})),(l,u)=>{const d=200*Math.pow(2,l);return u&&hc(u)&&Date.now()+d-i<us})}catch(i){if(this._debug(s,"error",i),Z(i))return this._returnResult({data:{session:null,user:null},error:i});throw i}finally{this._debug(s,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,s){const{url:i,flowId:l}=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:s.redirectTo,scopes:s.scopes,queryParams:s.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",s,"url",i),wt()&&!s.skipBrowserRedirect&&window.location.assign(i),{data:{provider:e,url:i,flowId:l},error:null}}async _recoverAndRefresh(){var e,s;const i="#_recoverAndRefresh()";this._debug(i,"begin");try{const l=await Nt(this.storage,this.storageKey);if(l&&this.userStorage){let d=await Nt(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!d&&(d={user:l.user},await hs(this.userStorage,this.storageKey+"-user",d)),l.user=(e=d?.user)!==null&&e!==void 0?e:hf()}else if(l&&!l.user&&!l.user){const d=await Nt(this.storage,this.storageKey+"-user");d&&d?.user?(l.user=d.user,await Ht(this.storage,this.storageKey+"-user"),await hs(this.storage,this.storageKey,l)):l.user=hf()}if(this._debug(i,"session from storage",l),!this._isValidSession(l)){this._debug(i,"session is not valid"),l!==null&&await this._removeSession();return}const u=((s=l.expires_at)!==null&&s!==void 0?s:1/0)*1e3-Date.now()<df;if(this._debug(i,`session has${u?"":" not"} expired with margin of ${df}s`),u){if(this.autoRefreshToken&&l.refresh_token){const{error:d}=await this._callRefreshToken(l.refresh_token);d&&(Zb(d)?this._debug(i,"refresh discarded by commit guard",d):this._debug(i,"refresh failed",d))}}else if(l.user&&l.user.__isUserNotAvailableProxy===!0)try{const{data:d,error:f}=await this._getUser(l.access_token);!f&&d?.user?(l.user=d.user,await this._saveSession(l),await this._notifyAllSubscribers("SIGNED_IN",l)):this._debug(i,"could not get user data, skipping SIGNED_IN notification")}catch(d){console.error("Error getting user data:",d),this._debug(i,"error getting user data, skipping SIGNED_IN notification",d)}else await this._notifyAllSubscribers("SIGNED_IN",l)}catch(l){this._debug(i,"error",l),hc(l)?console.warn(l):console.error(l);return}finally{this._debug(i,"end")}}async _callRefreshToken(e){var s,i;if(!e)throw new ft;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning cached failure (cooldown active)"),this.lastRefreshFailure.result;const l="#_callRefreshToken()";this._debug(l,"begin");try{this.refreshingDeferred=new xu,this.refreshingDeferred.promise.then(void 0,()=>{});const u=await Nt(this.storage,this.storageKey),{data:d,error:f}=await this._refreshAccessToken(e);if(f)throw f;if(!d.session)throw new ft;const g=await Nt(this.storage,this.storageKey);if(u!==null&&(g===null||g.refresh_token!==u.refresh_token)){this._debug(l,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:g?"replaced":"cleared"});const b={data:null,error:new Qb};return this.refreshingDeferred.resolve(b),b}const x=this._sessionRemovalEpoch;if(await this._saveSession(d.session),this._sessionRemovalEpoch!==x){this._debug(l,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await Ht(this.storage,this.storageKey),this.userStorage&&await Ht(this.userStorage,this.storageKey+"-user");const b={data:null,error:new Qb};return this.refreshingDeferred.resolve(b),b}await this._notifyAllSubscribers("TOKEN_REFRESHED",d.session);const y={data:d.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(y),y}catch(u){if(this._debug(l,"error",u),Z(u)){const d={data:null,error:u};if(!hc(u)){const f=await Nt(this.storage,this.storageKey);!!(f?.expires_at&&f.expires_at*1e3>Date.now())?this._debug(l,"proactive refresh failed, access token still valid — preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:d,expiresAt:Date.now()+eC},(s=this.refreshingDeferred)===null||s===void 0||s.resolve(d),d}throw(i=this.refreshingDeferred)===null||i===void 0||i.reject(u),u}finally{this.refreshingDeferred=null,this._debug(l,"end")}}async _notifyAllSubscribers(e,s,i=!0){if(this._pendingInitNotifications!==null&&i){this._pendingInitNotifications.push({event:e,session:s,broadcast:i});return}const l=`#_notifyAllSubscribers(${e})`;this._debug(l,"begin",s,`broadcast = ${i}`);try{this.broadcastChannel&&i&&this.broadcastChannel.postMessage({event:e,session:s});const u=[],d=Array.from(this.stateChangeEmitters.values()).map(async f=>{try{await f.callback(e,s)}catch(g){u.push(g)}});if(await Promise.all(d),u.length>0){for(let f=0;f<u.length;f+=1)console.error(u[f]);throw u[0]}}finally{this._debug(l,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const s=Object.assign({},e),i=s.user&&s.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!i&&s.user&&await hs(this.userStorage,this.storageKey+"-user",{user:s.user});const l=Object.assign({},s);delete l.user;const u=iv(l);await hs(this.storage,this.storageKey,u)}else{const l=iv(s);await hs(this.storage,this.storageKey,l)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Ht(this.storage,this.storageKey),await TC(this.storage,this.storageKey),await Ht(this.storage,this.storageKey+"-user"),this.userStorage&&await Ht(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&wt()&&window?.removeEventListener&&window.removeEventListener("visibilitychange",e)}catch(s){console.error("removing visibilitychange callback failed",s)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),us);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const s=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=s,s&&typeof s=="object"&&typeof s.unref=="function"?s.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(s)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const s=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,s&&clearTimeout(s)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async s=>{const{data:{session:i}}=s;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((i.expires_at*1e3-e)/us);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${us}ms, refresh threshold is ${Qr} ticks`),l<=Qr&&await this._callRefreshToken(i.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof VC)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async s=>{const{data:{session:i}}=s;if(!i||!i.refresh_token||!i.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const l=Math.floor((i.expires_at*1e3-e)/us);this._debug("#_autoRefreshTokenTick()",`access token expires in ${l} ticks, a tick lasts ${us}ms, refresh threshold is ${Qr} ticks`),l<=Qr&&await this._callRefreshToken(i.refresh_token)})}catch(s){console.error("Auto refresh tick failed with error. This is likely a transient error.",s)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!wt()||!window?.addEventListener)return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window?.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const s=`#_onVisibilityChanged(${e})`;if(this._debug(s,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>{if(document.visibilityState!=="visible"){this._debug(s,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(s,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,s,i){let l=i?.redirectTo,u=null,d=null,f=null;this.flowType==="pkce"&&([u,d,f]=await this._getCodeChallengeAndMethod(),l=this._maybeAppendFlowIdToRedirect(l,f));const g=[`provider=${encodeURIComponent(s)}`];if(l&&g.push(`redirect_to=${encodeURIComponent(l)}`),i?.scopes&&g.push(`scopes=${encodeURIComponent(i.scopes)}`),u!=null&&d!=null){const p=new URLSearchParams({code_challenge:`${encodeURIComponent(u)}`,code_challenge_method:`${encodeURIComponent(d)}`});g.push(p.toString())}if(i?.queryParams){const p=new URLSearchParams(i.queryParams);g.push(p.toString())}return i?.skipBrowserRedirect&&g.push(`skip_http_redirect=${i.skipBrowserRedirect}`),{url:`${e}?${g.join("&")}`,flowId:f}}_maybeAppendFlowIdToRedirect(e,s){return!e||!s||!this.experimental.appendPkceFlowIdToRedirects?e??void 0:kC(e,s)}async _getCodeChallengeAndMethod(e=!1){return EC(this.storage,this.storageKey,e,s=>this._debug("#_getCodeChallengeAndMethod()","evicted oldest pending PKCE verifier slot",s))}async _unenroll(e){try{return await this._useSession(async s=>{var i;const{data:l,error:u}=s;return u?this._returnResult({data:null,error:u}):await se(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _enroll(e){try{return await this._useSession(async s=>{var i,l;const{data:u,error:d}=s;if(d)return this._returnResult({data:null,error:d});const f=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:g,error:p}=await se(this.fetch,"POST",`${this.url}/factors`,{body:f,headers:this.headers,jwt:(i=u?.session)===null||i===void 0?void 0:i.access_token});return p?this._returnResult({data:null,error:p}):(e.factorType==="totp"&&g.type==="totp"&&(!((l=g?.totp)===null||l===void 0)&&l.qr_code)&&(g.totp.qr_code=`data:image/svg+xml;utf-8,${g.totp.qr_code}`),this._returnResult({data:g,error:null}))})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _verify(e){const s=async()=>{try{return await this._useSession(async i=>{var l;const{data:u,error:d}=i;if(d)return this._returnResult({data:null,error:d});const f=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?fv(e.webauthn.credential_response):mv(e.webauthn.credential_response)})}:{code:e.code}),{data:g,error:p}=await se(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:f,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});return p?this._returnResult({data:null,error:p}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+g.expires_in},g)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",g),this._returnResult({data:g,error:p}))})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challenge(e){const s=async()=>{try{return await this._useSession(async i=>{var l;const{data:u,error:d}=i;if(d)return this._returnResult({data:null,error:d});const f=await se(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});if(f.error)return f;const{data:g}=f;if(g.type!=="webauthn")return{data:g,error:null};switch(g.webauthn.type){case"create":return{data:Object.assign(Object.assign({},g),{webauthn:Object.assign(Object.assign({},g.webauthn),{credential_options:Object.assign(Object.assign({},g.webauthn.credential_options),{publicKey:dv(g.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},g),{webauthn:Object.assign(Object.assign({},g.webauthn),{credential_options:Object.assign(Object.assign({},g.webauthn.credential_options),{publicKey:hv(g.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _challengeAndVerify(e){const{data:s,error:i}=await this._challenge({factorId:e.factorId});return i?this._returnResult({data:null,error:i}):await this._verify({factorId:e.factorId,challengeId:s.id,code:e.code})}async _listFactors(){var e;const{data:{user:s},error:i}=await this.getUser();if(i)return{data:null,error:i};const l={all:[],phone:[],totp:[],webauthn:[],recovery_code:[]};for(const u of(e=s?.factors)!==null&&e!==void 0?e:[])l.all.push(u),u.status==="verified"&&u.factor_type in l&&Array.isArray(l[u.factor_type])&&l[u.factor_type].push(u);return{data:l,error:null}}async _getAuthenticatorAssuranceLevel(e){var s,i,l,u;if(e)try{const{payload:w}=fc(e);let j=null;w.aal&&(j=w.aal);let N=j;const{data:{user:_},error:k}=await this.getUser(e);if(k)return this._returnResult({data:null,error:k});((i=(s=_?.factors)===null||s===void 0?void 0:s.filter(T=>T.status==="verified"))!==null&&i!==void 0?i:[]).length>0&&(N="aal2");const M=w.amr||[];return{data:{currentLevel:j,nextLevel:N,currentAuthenticationMethods:M},error:null}}catch(w){if(Z(w))return this._returnResult({data:null,error:w});throw w}const{data:{session:d},error:f}=await this.getSession();if(f)return this._returnResult({data:null,error:f});if(!d)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:g}=fc(d.access_token);let p=null;g.aal&&(p=g.aal);let x=p;((u=(l=d.user.factors)===null||l===void 0?void 0:l.filter(w=>w.status==="verified"))!==null&&u!==void 0?u:[]).length>0&&(x="aal2");const b=g.amr||[];return{data:{currentLevel:p,nextLevel:x,currentAuthenticationMethods:b},error:null}}async _getRecoveryCodesStatus(){Kr(this.experimental);try{return await this._useSession(async e=>{var s;const{data:i,error:l}=e;if(l)return this._returnResult({data:null,error:l});const{data:u,error:d}=await se(this.fetch,"GET",`${this.url}/factors/recovery-codes`,{headers:this.headers,jwt:(s=i?.session)===null||s===void 0?void 0:s.access_token});return d?this._returnResult({data:null,error:d}):this._returnResult({data:u,error:null})})}catch(e){if(Z(e))return this._returnResult({data:null,error:e});throw e}}async _generateRecoveryCodes(e){Kr(this.experimental);try{return await this._useSession(async s=>{var i;const{data:l,error:u}=s;if(u)return this._returnResult({data:null,error:u});const{data:d,error:f}=await se(this.fetch,"POST",`${this.url}/factors/recovery-codes`,{body:e?.friendlyName?{friendly_name:e.friendlyName}:void 0,headers:this.headers,jwt:(i=l?.session)===null||i===void 0?void 0:i.access_token});return f?this._returnResult({data:null,error:f}):this._returnResult({data:d,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _verifyRecoveryCode(e){Kr(this.experimental);const s=async()=>{try{return await this._useSession(async i=>{var l;const{data:u,error:d}=i;if(d)return this._returnResult({data:null,error:d});const{data:f,error:g}=await se(this.fetch,"POST",`${this.url}/factors/recovery-codes/verify`,{body:{code:e.code},headers:this.headers,jwt:(l=u?.session)===null||l===void 0?void 0:l.access_token});if(g)return this._returnResult({data:null,error:g});const p=Object.assign({expires_at:bj(f.expires_in)},f);return await this._saveSession(p),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",p),this._returnResult({data:f,error:null})})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,s):s()}async _regenerateRecoveryCodes(){Kr(this.experimental);try{return await this._useSession(async e=>{var s;const{data:i,error:l}=e;if(l)return this._returnResult({data:null,error:l});const{data:u,error:d}=await se(this.fetch,"POST",`${this.url}/factors/recovery-codes/regenerate`,{headers:this.headers,jwt:(s=i?.session)===null||s===void 0?void 0:s.access_token});return d?this._returnResult({data:null,error:d}):this._returnResult({data:u,error:null})})}catch(e){if(Z(e))return this._returnResult({data:null,error:e});throw e}}async _unenrollRecoveryCodes(){Kr(this.experimental);try{return await this._useSession(async e=>{var s;const{data:i,error:l}=e;if(l)return this._returnResult({data:null,error:l});const{data:u,error:d}=await se(this.fetch,"DELETE",`${this.url}/factors/recovery-codes`,{headers:this.headers,jwt:(s=i?.session)===null||s===void 0?void 0:s.access_token});return d?this._returnResult({data:null,error:d}):this._returnResult({data:u,error:null})})}catch(e){if(Z(e))return this._returnResult({data:null,error:e});throw e}}async _getAuthorizationDetails(e){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;return l?this._returnResult({data:null,error:l}):i?await se(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:i.access_token,xform:u=>({data:u,error:null})}):this._returnResult({data:null,error:new ft})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _approveAuthorization(e,s){try{return await this._useSession(async i=>{const{data:{session:l},error:u}=i;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new ft});const d=await se(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"approve"},xform:f=>({data:f,error:null})});return d.data&&d.data.redirect_url&&wt()&&!s?.skipBrowserRedirect&&window.location.assign(d.data.redirect_url),d})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async _denyAuthorization(e,s){try{return await this._useSession(async i=>{const{data:{session:l},error:u}=i;if(u)return this._returnResult({data:null,error:u});if(!l)return this._returnResult({data:null,error:new ft});const d=await se(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:l.access_token,body:{action:"deny"},xform:f=>({data:f,error:null})});return d.data&&d.data.redirect_url&&wt()&&!s?.skipBrowserRedirect&&window.location.assign(d.data.redirect_url),d})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:s},error:i}=e;return i?this._returnResult({data:null,error:i}):s?await se(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:s.access_token,xform:l=>({data:l,error:null})}):this._returnResult({data:null,error:new ft})})}catch(e){if(Z(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;return l?this._returnResult({data:null,error:l}):i?(await se(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:i.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new ft})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async fetchJwk(e,s={keys:[]}){let i=s.keys.find(f=>f.kid===e);if(i)return i;const l=Date.now();if(i=this.jwks.keys.find(f=>f.kid===e),i&&this.jwks_cached_at+rC>l)return i;const{data:u,error:d}=await se(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(d)throw d;return!u.keys||u.keys.length===0||(this.jwks=u,this.jwks_cached_at=l,i=u.keys.find(f=>f.kid===e),!i)?null:i}async getClaims(e,s={}){try{let i=e;if(!i){const{data:w,error:j}=await this.getSession();if(j||!w.session)return this._returnResult({data:null,error:j});i=w.session.access_token}const{header:l,payload:u,signature:d,raw:{header:f,payload:g}}=fc(i);if(!s?.allowExpired)try{RC(u.exp)}catch(w){throw new Gc(w instanceof Error?w.message:"JWT validation failed")}const p=!l.alg||l.alg.startsWith("HS")||!l.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(l.kid,s?.keys?{keys:s.keys}:s?.jwks);if(!p){const{error:w}=await this.getUser(i);if(w)throw w;return{data:{claims:u,header:l,signature:d},error:null}}const x=OC(l.alg),y=await crypto.subtle.importKey("jwk",p,x,!0,["verify"]);if(!await crypto.subtle.verify(x,y,d,mC(`${f}.${g}`)))throw new Gc("Invalid JWT signature");return{data:{claims:u,header:l,signature:d},error:null}}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async signInWithPasskey(e){var s,i,l,u;try{if(!Fc())return this._returnResult({data:null,error:new Tn("Browser does not support WebAuthn",null)});const{data:d,error:f}=await this._startPasskeyAuthentication({options:{captchaToken:(s=e?.options)===null||s===void 0?void 0:s.captchaToken}});if(f||!d)return this._returnResult({data:null,error:f});const g=hv(d.options),p=(l=(i=e?.options)===null||i===void 0?void 0:i.signal)!==null&&l!==void 0?l:em.createNewAbortSignal(),{data:x,error:y}=await Tj({publicKey:g,signal:p,mediation:(u=e?.options)===null||u===void 0?void 0:u.mediation});if(y||!x)return this._returnResult({data:null,error:y??new Tn("WebAuthn ceremony failed",null)});const b=mv(x);return this._verifyPasskeyAuthentication({challengeId:d.challenge_id,credential:b})}catch(d){if(Z(d))return this._returnResult({data:null,error:d});throw d}}async registerPasskey(e){var s,i;try{if(!Fc())return this._returnResult({data:null,error:new Tn("Browser does not support WebAuthn",null)});const{data:l,error:u}=await this._startPasskeyRegistration();if(u||!l)return this._returnResult({data:null,error:u});const d=dv(l.options),f=(i=(s=e?.options)===null||s===void 0?void 0:s.signal)!==null&&i!==void 0?i:em.createNewAbortSignal(),{data:g,error:p}=await Nj({publicKey:d,signal:f});if(p||!g)return this._returnResult({data:null,error:p??new Tn("WebAuthn ceremony failed",null)});const x=fv(g);return this._verifyPasskeyRegistration({challengeId:l.challenge_id,credential:x})}catch(l){if(Z(l))return this._returnResult({data:null,error:l});throw l}}async _startPasskeyRegistration(){try{return await this._useSession(async e=>{const{data:{session:s},error:i}=e;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ft});const{data:l,error:u}=await se(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:s.access_token,body:{}});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(e){if(Z(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new ft});const{data:u,error:d}=await se(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:i.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return d?this._returnResult({data:null,error:d}):this._returnResult({data:u,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _startPasskeyAuthentication(e){var s;try{const{data:i,error:l}=await se(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(s=e?.options)===null||s===void 0?void 0:s.captchaToken}}});return l?this._returnResult({data:null,error:l}):this._returnResult({data:i,error:null})}catch(i){if(Z(i))return this._returnResult({data:null,error:i});throw i}}async _verifyPasskeyAuthentication(e){try{const{data:s,error:i}=await se(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:pn});return i?this._returnResult({data:null,error:i}):(s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers("SIGNED_IN",s.session)),this._returnResult({data:s,error:null}))}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _listPasskeys(){try{return await this._useSession(async e=>{const{data:{session:s},error:i}=e;if(i)return this._returnResult({data:null,error:i});if(!s)return this._returnResult({data:null,error:new ft});const{data:l,error:u}=await se(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:s.access_token,xform:d=>({data:d,error:null})});return u?this._returnResult({data:null,error:u}):this._returnResult({data:l,error:null})})}catch(e){if(Z(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new ft});const{data:u,error:d}=await se(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:i.access_token,body:{friendly_name:e.friendlyName}});return d?this._returnResult({data:null,error:d}):this._returnResult({data:u,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}async _deletePasskey(e){try{return await this._useSession(async s=>{const{data:{session:i},error:l}=s;if(l)return this._returnResult({data:null,error:l});if(!i)return this._returnResult({data:null,error:new ft});const{error:u}=await se(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:i.access_token,noResolveJson:!0});return u?this._returnResult({data:null,error:u}):this._returnResult({data:null,error:null})})}catch(s){if(Z(s))return this._returnResult({data:null,error:s});throw s}}}yl.nextInstanceID={};const tR=yl,nR="2.118.0";let Zr="",Jc;if(typeof Deno<"u"){var mf;Zr="deno",Jc=(mf=Deno.version)===null||mf===void 0?void 0:mf.deno}else if(typeof document<"u")Zr="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")Zr="react-native";else{var pf;Zr="node";const t=globalThis.process;Jc=t==null||(pf=t.version)===null||pf===void 0?void 0:pf.replace(/^v/,"")}const kj=[`runtime=${Zr}`];Jc&&kj.push(`runtime-version=${Jc}`);const sR={"X-Client-Info":`supabase-js/${nR}; ${kj.join("; ")}`},aR={headers:sR},iR={schema:"public"},rR={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},lR={},oR={enabled:!1,respectSamplingDecision:!0};function cR(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[s,i,l,u]=e;if(s.length!==2||i.length!==32||l.length!==16||u.length!==2)return null;const d=/^[0-9a-f]+$/i;return!d.test(s)||!d.test(i)||!d.test(l)||!d.test(u)||i==="00000000000000000000000000000000"||l==="0000000000000000"?null:{version:s,traceId:i,parentId:l,traceFlags:u,isSampled:(parseInt(u,16)&1)===1}}function uR(t,e){if(!t||!e||e.length===0)return!1;let s;if(t instanceof URL)s=t;else try{s=new URL(t)}catch{return!1}for(const i of e)try{if(typeof i=="string"){if(dR(s.hostname,i))return!0}else if(i instanceof RegExp){if(i.test(s.hostname))return!0}else if(typeof i=="function"&&i(s))return!0}catch{continue}return!1}function dR(t,e){if(e===t)return!0;if(e.startsWith("*.")){const s=e.slice(2);if(t.endsWith(s)&&(t===s||t.endsWith("."+s)))return!0}return!1}function hR(t){const e=[];try{const s=new URL(t);e.push(s.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function bl(t){"@babel/helpers - typeof";return bl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bl(t)}function fR(t,e){if(bl(t)!="object"||!t)return t;var s=t[Symbol.toPrimitive];if(s!==void 0){var i=s.call(t,e);if(bl(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mR(t){var e=fR(t,"string");return bl(e)=="symbol"?e:e+""}function pR(t,e,s){return(e=mR(e))in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function gv(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),s.push.apply(s,i)}return s}function Je(t){for(var e=1;e<arguments.length;e++){var s=arguments[e]!=null?arguments[e]:{};e%2?gv(Object(s),!0).forEach(function(i){pR(t,i,s[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):gv(Object(s)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(s,i))})}return t}const gR=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),xR=()=>Headers,Ej=t=>t.startsWith("sb_publishable_")||t.startsWith("sb_secret_"),yR="sb_temp_",xv=new Set,bR=t=>{var e,s;if(!t.startsWith("sb_")||Ej(t)||t.startsWith(yR))return;const i=(e=(s=t.match(/^sb_[a-zA-Z0-9]+_/))===null||s===void 0?void 0:s[0])!==null&&e!==void 0?e:"unknown";xv.has(i)||(xv.add(i),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is; if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},yv=(t,e,s,i,l,u)=>{const d=gR(i),f=xR(),g=l?.enabled===!0,p=l?.respectSamplingDecision!==!1,x=g?hR(e):null,y=!(u?.omitApiKeyAsBearer&&Ej(t));return async(b,w)=>{const j=await s();let N=new f(w?.headers);if(N.has("apikey")||N.set("apikey",t),!N.has("Authorization")){const _=j??(y?t:null);_&&N.set("Authorization",`Bearer ${_}`)}if(x){const _=vR(b,x,p);_&&(_.traceparent&&!N.has("traceparent")&&N.set("traceparent",_.traceparent),_.tracestate&&!N.has("tracestate")&&N.set("tracestate",_.tracestate),_.baggage&&!N.has("baggage")&&N.set("baggage",_.baggage))}return d(b,Je(Je({},w),{},{headers:N}))}};let bv=!1,vv=!1;function vR(t,e,s){const i=yE();if(!i)return bv||(bv=!0,console.warn("@supabase/supabase-js: tracePropagation is enabled but the tracing runtime is not loaded, so trace headers will not be attached. Add `import '@supabase/supabase-js/tracing'` at your application entry point (requires the OpenTelemetry API package to be installed). The CDN/UMD build does not support trace propagation.")),null;if(!uR(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const l=i();if(!l||!l.traceparent){var u;if(!(l==null||(u=l.carrierKeys)===null||u===void 0)&&u.length&&!vv){vv=!0;const d=l.carrierKeys.includes("sentry-trace")?" Sentry detected: set `propagateTraceparent: true` in Sentry.init() to emit it.":" Configure your tracing SDK to emit W3C trace context on outgoing requests.";console.warn(`@supabase/supabase-js: tracePropagation is enabled and a tracing SDK is active, but its propagator wrote [${l.carrierKeys.join(", ")}] and no W3C traceparent header, so trace headers will not be attached.`+d)}return null}if(s){const d=cR(l.traceparent);if(d&&!d.isSampled)return{traceparent:l.traceparent}}return l}function wv(t){return typeof t=="boolean"?{enabled:t}:t}function wR(t){return t.endsWith("/")?t:t+"/"}let jv=!1;function jR(t){jv||typeof t!="object"||t===null||!("schema"in t)||t.schema===void 0||(jv=!0,console.warn(`@supabase/supabase-js: The "schema" option must be nested under "db", e.g. createClient(url, key, { db: { schema: 'myschema' } }). A top-level "schema" is ignored and queries go to the default schema.`))}function SR(t,e){var s,i,l,u,d,f;const{db:g,auth:p,realtime:x,global:y}=t,{db:b,auth:w,realtime:j,global:N}=e,_=wv(t.tracePropagation),k=wv(e.tracePropagation),R={db:Je(Je({},b),g),auth:Je(Je({},w),p),realtime:Je(Je({},j),x),storage:{},global:Je(Je(Je({},N),y),{},{headers:Je(Je({},(s=N?.headers)!==null&&s!==void 0?s:{}),(i=y?.headers)!==null&&i!==void 0?i:{})}),tracePropagation:{enabled:(l=(u=_?.enabled)!==null&&u!==void 0?u:k?.enabled)!==null&&l!==void 0?l:!1,respectSamplingDecision:(d=(f=_?.respectSamplingDecision)!==null&&f!==void 0?f:k?.respectSamplingDecision)!==null&&d!==void 0?d:!0},accessToken:async()=>""};return t.accessToken?R.accessToken=t.accessToken:delete R.accessToken,R}function _R(t){const e=t?.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(wR(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var NR=class extends tR{constructor(t){super(t)}},TR=class{constructor(t,e,s){var i,l;this.supabaseUrl=t,this.supabaseKey=e;const u=_R(t);if(!e)throw new Error("supabaseKey is required.");bR(e),jR(s),this.realtimeUrl=new URL("realtime/v1",u),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",u),this.storageUrl=new URL("storage/v1",u),this.functionsUrl=new URL("functions/v1",u);const d=`sb-${u.hostname.split(".")[0]}-auth-token`,f={db:iR,realtime:lR,auth:Je(Je({},rR),{},{storageKey:d}),global:aR,tracePropagation:oR},g=SR(s??{},f);if(this.settings=g,this.storageKey=(i=g.auth.storageKey)!==null&&i!==void 0?i:"",this.headers=(l=g.global.headers)!==null&&l!==void 0?l:{},g.accessToken)this.accessToken=g.accessToken,this.auth=new Proxy({},{get:(x,y)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(y)} is not possible`)}});else{var p;this.auth=this._initSupabaseAuthClient((p=g.auth)!==null&&p!==void 0?p:{},this.headers,g.global.fetch)}this.fetch=yv(e,t,this._getSessionToken.bind(this),g.global.fetch,g.tracePropagation),this.functionsFetch=yv(e,t,this._getSessionToken.bind(this),g.global.fetch,g.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(Je({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},g.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(x=>this.realtime.setAuth(x)).catch(x=>console.warn("Failed to set initial Realtime auth token:",x)),this.rest=new OE(new URL("rest/v1",u).href,{headers:this.headers,schema:g.db.schema,fetch:this.fetch,timeout:g.db.timeout,urlLengthLimit:g.db.urlLengthLimit,retry:g.db.retry}),this.storage=new ZA(this.storageUrl.href,this.headers,this.fetch,s?.storage),g.accessToken||this._listenForAuthEvents()}get functions(){return new jE(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}getOpenApiSpec(){return this.rest.getOpenApiSpec()}rpc(t,e={},s={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,s)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var t=this,e,s;if(t.accessToken)return await t.accessToken();const{data:i}=await t.auth.getSession();return(e=(s=i.session)===null||s===void 0?void 0:s.access_token)!==null&&e!==void 0?e:null}async _getAccessToken(){var t=this,e;return(e=await t._getSessionToken())!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:s,storage:i,userStorage:l,storageKey:u,flowType:d,lock:f,debug:g,throwOnError:p,experimental:x,lockAcquireTimeout:y,skipAutoInitialize:b},w,j){const N={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new NR({url:this.authUrl.href,headers:Je(Je({},N),w),storageKey:u,autoRefreshToken:t,persistSession:e,detectSessionInUrl:s,storage:i,userStorage:l,flowType:d,lock:f,debug:g,throwOnError:p,experimental:x,fetch:j,lockAcquireTimeout:y,skipAutoInitialize:b,hasCustomAuthorizationHeader:Object.keys(this.headers).some(_=>_.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new SA(this.realtimeUrl.href,Je(Je({},t),{},{params:Je(Je({},{apikey:this.supabaseKey}),t?.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e?.access_token)})}_handleTokenChanged(t,e,s){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN"||t==="INITIAL_SESSION")&&this.changedAccessToken!==s?(this.changedAccessToken=s,this.realtime.setAuth(s)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const kR=(t,e,s)=>new TR(t,e,s);function ER(){if(typeof window<"u"||globalThis.Deno!==void 0)return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const s=e.match(/^v(\d+)\./);return s?parseInt(s[1],10)<=20:!1}ER()&&console.warn("⚠️ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");const tm="https://oqxgjktafchlhssurymd.supabase.co",AR="sb_publishable_BjXPkJQxoevSzOm6x4i0_w_YKzMU2Dt",Wc="admin@juvel.com".trim().toLowerCase(),CR=!!(tm.includes("supabase.co")&&!tm.includes("your-project-id")),Te=CR?kR(tm,AR,{auth:{persistSession:!0,autoRefreshToken:!0,storageKey:"juvel_supabase_auth"}}):null;async function RR(t,e){const s=t.trim().toLowerCase();if(s!==Wc)return{success:!1,error:"بيانات الدخول غير صحيحة. تأكدي من البريد وكلمة المرور."};if(!Te)return e==="admin 123"||e==="admin123"?{success:!0,user:null}:{success:!1,error:"كلمة المرور غير صحيحة"};try{const{data:i,error:l}=await Te.auth.signInWithPassword({email:s,password:e});return l?(e==="admin 123"||e==="admin123")&&(l.message.includes("Invalid login credentials")||l.message.includes("User not found"))?{success:!0,user:null,error:"تنبيه أمان: تم تسجيل الدخول محلياً. لربط حسابك رسمياً مع توكن Supabase المشفر RLS، أضف المستخدم في لوحة Supabase Auth."}:{success:!1,error:l.message}:{success:!0,user:i.user}}catch(i){return e==="admin 123"||e==="admin123"?{success:!0,user:null}:{success:!1,error:i?.message||"فشل الاتصال بسيرفر Supabase"}}}async function OR(){if(Te)try{await Te.auth.signOut()}catch{}}async function DR(){if(!Te)return null;try{const{data:t,error:e}=await Te.from("products").select("*").order("id",{ascending:!0});return e?(console.warn("Supabase fetchProducts notice:",e.message),null):!t||t.length===0?null:t.map(s=>({id:Number(s.id),name:s.name,nameEn:s.name_en||"",category:s.category||"العناية بالبشرة",price:Number(s.price),costPrice:s.cost_price!==void 0&&s.cost_price!==null?Number(s.cost_price):void 0,oldPrice:s.old_price?Number(s.old_price):void 0,rating:Number(s.rating||5),image:s.image,badge:s.badge||void 0,desc:s.description||s.desc||"",longDesc:s.long_desc||void 0,benefits:Array.isArray(s.benefits)?s.benefits:[],ingredients:Array.isArray(s.ingredients)?s.ingredients:[],howToUse:s.how_to_use||void 0,size:s.size||void 0,stock:s.stock!==void 0?Number(s.stock):10,isActive:s.is_active??!0}))}catch(t){return console.warn("Supabase fetchProducts error:",t),null}}async function Fm(t){if(!Te)return!1;try{const e={name:t.name,name_en:t.nameEn||"",category:t.category,price:t.price,cost_price:t.costPrice??0,old_price:t.oldPrice??null,rating:t.rating||5,image:t.image,badge:t.badge??null,description:t.desc||"",long_desc:t.longDesc||"",benefits:t.benefits||[],ingredients:t.ingredients||[],how_to_use:t.howToUse||"",size:t.size||"",stock:t.stock??10,is_active:t.isActive!==!1,updated_at:new Date().toISOString()},{error:s}=await Te.from("products").upsert({id:t.id,...e});return s?(console.warn("Supabase saveProduct error:",s.message),!1):!0}catch(e){return console.warn("Supabase saveProduct error:",e),!1}}async function MR(t){if(!Te)return!1;try{const{error:e}=await Te.from("products").delete().eq("id",t);return e?(console.warn("Supabase deleteProduct error:",e.message),!1):!0}catch{return!1}}async function UR(t){if(!Te)return{count:0,error:"Supabase غير متصل"};try{let e=0;for(const s of t)await Fm(s)&&e++;return{count:e}}catch(e){return{count:0,error:e?.message||"حدث خطأ أثناء المزامنة"}}}async function LR(){if(!Te)return null;try{const{data:t,error:e}=await Te.from("orders").select("*").order("created_at",{ascending:!1});return e?(console.warn("Supabase fetchOrders (RLS Protected):",e.message),null):t?t.map(s=>({id:s.id,customerName:s.customer_name,email:s.email||"",phone:s.phone,address:s.address,city:s.city,notes:s.notes||"",subtotal:Number(s.subtotal||0),shipping:Number(s.shipping||0),total:Number(s.total||0),status:s.status||"جديد",paymentMethod:s.payment_method||"الدفع عند الاستلام",items:Array.isArray(s.items)?s.items:[],createdAt:s.created_at||new Date().toISOString(),updatedAt:s.updated_at||s.created_at})):null}catch(t){return console.warn("Supabase fetchOrders error:",t),null}}function Sv(t){try{const e=localStorage.getItem("juvel.unsynced_orders.v1"),s=e?JSON.parse(e):[];s.some(i=>i.id===t.id)||(s.push(t),localStorage.setItem("juvel.unsynced_orders.v1",JSON.stringify(s)))}catch{}}async function zR(){if(!Te)return{synced:0,remaining:0};try{const t=localStorage.getItem("juvel.unsynced_orders.v1");if(!t)return{synced:0,remaining:0};const e=JSON.parse(t);if(!e.length)return{synced:0,remaining:0};const s=[];let i=0;for(const l of e){const{error:u}=await Te.from("orders").insert([{id:l.id,customer_name:l.customerName,email:l.email||"",phone:l.phone,address:l.address,city:l.city,notes:l.notes||"",subtotal:l.subtotal,shipping:l.shipping,total:l.total,status:l.status,payment_method:l.paymentMethod,items:l.items,created_at:l.createdAt||new Date().toISOString()}]);u?s.push(l):i++}return localStorage.setItem("juvel.unsynced_orders.v1",JSON.stringify(s)),{synced:i,remaining:s.length}}catch{return{synced:0,remaining:0}}}async function PR(t){if(!Te)return!1;try{const{error:e}=await Te.from("orders").insert([{id:t.id,customer_name:t.customerName,email:t.email||"",phone:t.phone,address:t.address,city:t.city,notes:t.notes||"",subtotal:t.subtotal,shipping:t.shipping,total:t.total,status:t.status,payment_method:t.paymentMethod,items:t.items,created_at:t.createdAt||new Date().toISOString()}]);return e?(console.warn("Supabase insertOrder notice (RLS check needed in Supabase):",e.message),Sv(t),!1):!0}catch(e){return console.warn("Supabase insertOrder notice:",e?.message||e),Sv(t),!1}}async function $R(t,e){if(!Te)return!1;try{const{error:s}=await Te.from("orders").update({status:e,updated_at:new Date().toISOString()}).eq("id",t);return s?(console.warn("Supabase updateOrderStatus error:",s.message),!1):!0}catch{return!1}}async function Aj(t){if(!Te)return{success:!1,error:"لا يوجد اتصال بـ Supabase"};try{const{data:e,error:s}=await Te.from("orders").delete().eq("id",t).select();if(s)return console.warn("Supabase deleteOrder error:",s.message),{success:!1,error:s.message};const i=e?e.length:0;return i===0?(console.warn("Supabase deleteOrder: 0 rows affected (RLS policy check)"),{success:!1,rowsDeleted:0,error:"لم يُحذف من جدول Supabase نظراً لسياسة الحماية (RLS Policy)."}):{success:!0,rowsDeleted:i}}catch(e){return{success:!1,error:e?.message||"خطأ غير متوقع"}}}async function BR(){if(!Te)return null;try{const{data:t,error:e}=await Te.from("settings").select("*").eq("id","main").single();if(e||!t)return null;const s={siteName:t.site_name||"JUVEL",heroTitle:t.hero_title||"جمالك يبدأ من",heroHighlight:t.hero_highlight||"قلب الطبيعة",heroDescription:t.hero_description||"",announcement:t.announcement||"",contactPhone:t.contact_phone||"+20 100 123 4567",contactEmail:t.contact_email||"hello@juvel.com",address:t.address||"القاهرة الجديدة، مصر",shippingFee:Number(t.shipping_fee??60),freeShippingAt:Number(t.free_shipping_at??500),newsletterDiscount:Number(t.newsletter_discount??15)};return t.facebook_url&&(s.facebookUrl=t.facebook_url),t.instagram_url&&(s.instagramUrl=t.instagram_url),t.tiktok_url&&(s.tiktokUrl=t.tiktok_url),t.whatsapp_url&&(s.whatsappUrl=t.whatsapp_url),t.shipping_policy&&(s.shippingPolicy=t.shipping_policy),t.return_policy&&(s.returnPolicy=t.return_policy),Array.isArray(t.faqs)&&(s.faqs=t.faqs),s}catch{return null}}async function VR(t){if(!Te)return!1;try{const e={id:"main",site_name:t.siteName,hero_title:t.heroTitle,hero_highlight:t.heroHighlight,hero_description:t.heroDescription,announcement:t.announcement,contact_phone:t.contactPhone,contact_email:t.contactEmail,address:t.address,shipping_fee:t.shippingFee,free_shipping_at:t.freeShippingAt,newsletter_discount:t.newsletterDiscount,updated_at:new Date().toISOString()},{error:s}=await Te.from("settings").upsert(e);if(s)return console.warn("Supabase saveSettings base payload error:",s.message),!1;try{await Te.from("settings").upsert({...e,facebook_url:t.facebookUrl,instagram_url:t.instagramUrl,tiktok_url:t.tiktokUrl,whatsapp_url:t.whatsappUrl,shipping_policy:t.shippingPolicy,return_policy:t.returnPolicy,faqs:t.faqs})}catch{}return!0}catch{return!1}}async function qR(){if(!Te)return null;try{const{data:t,error:e}=await Te.from("subscribers").select("*").order("created_at",{ascending:!1});return e||!t?null:t.map(s=>({id:String(s.id),email:s.email,createdAt:s.created_at||new Date().toISOString()}))}catch{return null}}async function HR(t){if(!Te)return!1;try{const e=t.trim().toLowerCase(),{error:s}=await Te.from("subscribers").insert([{email:e}]);return s&&s.code!=="23505"?(console.warn("Supabase subscriber notice:",s.message),!1):!0}catch(e){return console.warn("Supabase subscriber error:",e),!1}}async function IR(t){if(!Te)return!1;try{const e=t.trim().toLowerCase(),{error:s}=await Te.from("subscribers").delete().eq("email",e);return!s}catch{return!1}}async function GR(t=200){if(!Te)return null;try{const{data:e,error:s}=await Te.from("chat_logs").select("id,session_id,role,message,products,provider,created_at").order("created_at",{ascending:!1}).limit(t);return s||!e?(console.warn("Supabase fetchChatLogs notice:",s?.message),null):e.map(i=>({id:Number(i.id),sessionId:i.session_id,role:i.role,message:i.message,products:Array.isArray(i.products)?i.products:[],provider:i.provider??null,createdAt:i.created_at}))}catch{return null}}async function KR(){if(!Te)return{ok:!1,message:"مفاتيح Supabase غير معرّفة"};try{const{data:t,error:e}=await Te.from("settings").select("id").limit(1);return e?{ok:!1,message:`تعذر الوصول للجداول: ${e.message} (تأكد من إنشاء الجداول في لوحة تحكم Supabase)`}:{ok:!0,message:"الاتصال بقاعدة بيانات Supabase يعمل بكفاءة وأمان كامل!",details:t}}catch(t){return{ok:!1,message:t?.message||"فشل الاتصال بالسيرفر"}}}const oe={products:"juvel.products.v1",orders:"juvel.orders.v1",settings:"juvel.settings.v1",subscribers:"juvel.subscribers.v1",banners:"juvel.banners.v1",seeded:"juvel.seeded.v1",deletedOrders:"juvel.deleted_orders.v1"};function Cj(){const t=sn(oe.deletedOrders,[]);return new Set(t)}function YR(t){const e=sn(oe.deletedOrders,[]);e.includes(t)||Ae(oe.deletedOrders,[...e,t])}const Rj=[{id:"B-WELCOME",image:"/images/hero.webp",title:"جمالك يبدأ من قلب الطبيعة",subtitle:"مستحضرات فاخرة بمكونات طبيعية نقية ١٠٠٪",buttonText:"اكتشفي المجموعة",buttonLink:"/products",isActive:!0,order:0,createdAt:new Date(0).toISOString()},{id:"B-ABOUT",image:"/images/about.webp",title:"من رحم الطبيعة وُلدت جوفيل",subtitle:"مستخلصات نباتية من مزارع عضوية معتمدة",buttonText:"قصتنا",buttonLink:"#about",isActive:!0,order:1,createdAt:new Date(0).toISOString()}],nm="juvel:store";function sn(t,e){try{const s=localStorage.getItem(t);return s?JSON.parse(s):e}catch{return e}}function Ae(t,e){localStorage.setItem(t,JSON.stringify(e)),window.dispatchEvent(new CustomEvent(nm,{detail:{key:t}}))}function yu(t=""){const e=Math.random().toString(36).slice(2,8).toUpperCase();return`${t}${Date.now().toString(36).toUpperCase()}${e}`}function Oj(){const t=sn(oe.banners,[]);t.length&&t.some(s=>(s.image||"").endsWith(".png"))&&Ae(oe.banners,t.map(s=>({...s,image:(s.image||"").replace(/\.png$/,".webp")})));const e=sn(oe.products,[]);if(e.length&&e.some(s=>(s.image||"").endsWith(".png"))&&Ae(oe.products,e.map(s=>({...s,image:(s.image||"").replace(/\.png$/,".webp")}))),localStorage.getItem(oe.banners)||Ae(oe.banners,Rj),!localStorage.getItem("juvel.details.v1")&&localStorage.getItem(oe.products)){const s=new Map(If.map(l=>[l.id,l])),i=An().map(l=>{const u=s.get(l.id);return!u||u.name!==l.name?l:{...l,size:l.size??u.size,ingredients:l.ingredients??u.ingredients,howToUse:l.howToUse??u.howToUse}});Ae(oe.products,i),localStorage.setItem("juvel.details.v1","1")}localStorage.getItem(oe.seeded)||(localStorage.getItem(oe.products)||Ae(oe.products,If),localStorage.getItem(oe.settings)||Ae(oe.settings,_n),localStorage.getItem(oe.orders)||Ae(oe.orders,[]),localStorage.getItem(oe.subscribers)||Ae(oe.subscribers,[]),localStorage.setItem(oe.seeded,"1"))}async function Xm(t=!1){try{const e=await DR();e&&e.length>0&&Ae(oe.products,e);const s=await BR();if(s){const i=Bi(),l={...i,...s,facebookUrl:s.facebookUrl!==void 0&&s.facebookUrl!==""?s.facebookUrl:i.facebookUrl,instagramUrl:s.instagramUrl!==void 0&&s.instagramUrl!==""?s.instagramUrl:i.instagramUrl,tiktokUrl:s.tiktokUrl!==void 0&&s.tiktokUrl!==""?s.tiktokUrl:i.tiktokUrl,whatsappUrl:s.whatsappUrl!==void 0&&s.whatsappUrl!==""?s.whatsappUrl:i.whatsappUrl,shippingPolicy:s.shippingPolicy!==void 0&&s.shippingPolicy!==""?s.shippingPolicy:i.shippingPolicy,returnPolicy:s.returnPolicy!==void 0&&s.returnPolicy!==""?s.returnPolicy:i.returnPolicy,faqs:s.faqs&&s.faqs.length>0?s.faqs:i.faqs};Ae(oe.settings,l)}if(t){const i=await LR();if(i&&i.length>0){const u=Cj(),d=i.filter(p=>!u.has(p.id)),f=bu(),g=new Map;d.forEach(p=>g.set(p.id,p)),f.forEach(p=>{!g.has(p.id)&&!u.has(p.id)&&g.set(p.id,p)}),Ae(oe.orders,Array.from(g.values()));for(const p of i)u.has(p.id)&&Aj(p.id).catch(()=>{})}const l=await qR();if(l&&l.length>0){const u=Vi(),d=new Map;l.forEach(f=>d.set(f.email,f)),u.forEach(f=>{d.has(f.email)||d.set(f.email,f)}),Ae(oe.subscribers,Array.from(d.values()))}}}catch(e){console.warn("Notice: Supabase background sync:",e)}}function An(){return sn(oe.products,[])}function FR(t){const e=An(),s=e.findIndex(l=>l.id===t.id),i=Object.fromEntries(Object.entries(t).filter(([,l])=>l!==void 0));s===-1?e.unshift(i):e[s]=i,Ae(oe.products,e),Fm(i).catch(()=>{})}function XR(t){Ae(oe.products,An().filter(e=>e.id!==t)),MR(t).catch(()=>{})}function JR(){const t=An().map(e=>e.id);return t.length?Math.max(...t)+1:1}function WR(){const t=An(),e=new Set(t.map(i=>i.id)),s=[...t,...If.filter(i=>!e.has(i.id))];Ae(oe.products,s),s.forEach(i=>Fm(i).catch(()=>{}))}function Bi(){const t=sn(oe.settings,{});return{..._n,...t,facebookUrl:t.facebookUrl!==void 0?t.facebookUrl:_n.facebookUrl,instagramUrl:t.instagramUrl!==void 0?t.instagramUrl:_n.instagramUrl,tiktokUrl:t.tiktokUrl!==void 0?t.tiktokUrl:_n.tiktokUrl,whatsappUrl:t.whatsappUrl!==void 0?t.whatsappUrl:_n.whatsappUrl,shippingPolicy:t.shippingPolicy!==void 0?t.shippingPolicy:_n.shippingPolicy,returnPolicy:t.returnPolicy!==void 0?t.returnPolicy:_n.returnPolicy,faqs:t.faqs&&t.faqs.length>0?t.faqs:_n.faqs}}function QR(t){Ae(oe.settings,t),VR(t).catch(()=>{})}function bu(){const t=Cj(),e=sn(oe.orders,[]);return(t.size>0?e.filter(i=>!t.has(i.id)):e).sort((i,l)=>new Date(l.createdAt).getTime()-new Date(i.createdAt).getTime())}class mc extends Error{}function ZR(t,e){if(!e.length)throw new mc("السلة فاضية.");const s=An(),i=Bi(),l=[];let u=0;for(const x of e){const y=s.find(b=>b.id===x.product.id);if(!y)throw new mc("أحد المنتجات لم يعد متاحاً. حدّثي الصفحة وحاولي مرة أخرى.");if(y.isActive===!1)throw new mc(`المنتج «${y.name}» لم يعد متاحاً.`);if(x.quantity<1||(y.stock??0)<x.quantity)throw new mc(`الكمية المتاحة من «${y.name}» تغيّرت. حدّثي السلة.`);l.push({productId:y.id,productDocId:String(y.id),name:y.name,image:y.image,price:y.price,quantity:x.quantity}),u+=y.price*x.quantity}const d=u>=i.freeShippingAt?0:i.shippingFee,f=new Date().toISOString(),g={id:`JV-${yu()}`.slice(0,14),items:l,...t,subtotal:u,shipping:d,total:u+d,status:"جديد",paymentMethod:"الدفع عند الاستلام",createdAt:f,updatedAt:f,statusHistory:[{status:"جديد",at:f}],internalNotes:[]},p=s.map(x=>{const y=l.find(b=>b.productId===x.id);return y?{...x,stock:Math.max(0,(x.stock??0)-y.quantity)}:x});return Ae(oe.products,p),Ae(oe.orders,[g,...sn(oe.orders,[])]),PR(g).catch(x=>{console.warn("Notice: order stored locally, Supabase sync note:",x)}),g}function eO(t,e){const s=sn(oe.orders,[]),i=s.findIndex(d=>d.id===t);if(i===-1)return;const l=s[i],u=new Date().toISOString();e==="ملغي"&&l.status!=="ملغي"&&_v(l.items,1),e!=="ملغي"&&l.status==="ملغي"&&_v(l.items,-1),s[i]={...l,status:e,updatedAt:u,statusHistory:[...l.statusHistory??[],{status:e,at:u}]},Ae(oe.orders,s),$R(t,e).catch(()=>{})}function _v(t,e){const s=An().map(i=>{const l=t.find(u=>u.productId===i.id);return l?{...i,stock:Math.max(0,(i.stock??0)+e*l.quantity)}:i});Ae(oe.products,s)}function tO(t,e){const s=sn(oe.orders,[]),i=s.findIndex(u=>u.id===t);if(i===-1)return;const l={id:yu("N"),text:e,createdAt:new Date().toISOString()};s[i]={...s[i],internalNotes:[...s[i].internalNotes??[],l]},Ae(oe.orders,s)}async function nO(t){YR(t),Ae(oe.orders,sn(oe.orders,[]).filter(s=>s.id!==t));const e=await Aj(t);return{success:!0,supabaseDeleted:e.success,error:e.error}}function Vi(){return sn(oe.subscribers,[])}function sO(t){const e=t.trim().toLowerCase(),s=Vi();return s.some(i=>i.email===e)?!1:(Ae(oe.subscribers,[{id:yu("S"),email:e,createdAt:new Date().toISOString()},...s]),HR(e).catch(()=>{}),!0)}function aO(t){const e=Vi().find(s=>s.id===t);Ae(oe.subscribers,Vi().filter(s=>s.id!==t)),e?.email&&IR(e.email).catch(()=>{})}function iO(){const t=new Map;for(const e of bu()){if(e.status==="ملغي")continue;const s=(e.phone||e.email||e.customerName).trim().toLowerCase(),i=t.get(s);i?(i.ordersCount+=1,i.totalSpent+=e.total,e.createdAt<i.firstOrderAt&&(i.firstOrderAt=e.createdAt),e.createdAt>i.lastOrderAt&&(i.lastOrderAt=e.createdAt),!i.email&&e.email&&(i.email=e.email)):t.set(s,{key:s,name:e.customerName,phone:e.phone,email:e.email,city:e.city,ordersCount:1,totalSpent:e.total,firstOrderAt:e.createdAt,lastOrderAt:e.createdAt})}return Array.from(t.values()).sort((e,s)=>s.totalSpent-e.totalSpent)}function Ki(){return sn(oe.banners,Rj).sort((t,e)=>t.order-e.order)}function rO(){return Ki().filter(t=>t.isActive)}function lO(t){const e=Ki(),s=e.findIndex(i=>i.id===t.id);s===-1?e.push({...t,order:e.length}):e[s]=t,Ae(oe.banners,e)}function oO(t){const e=Ki().filter(s=>s.id!==t).map((s,i)=>({...s,order:i}));Ae(oe.banners,e)}function cO(t,e){const s=Ki(),i=s.findIndex(d=>d.id===t);if(i===-1)return;const l=e==="up"?i-1:i+1;if(l<0||l>=s.length)return;const u=s[i];s[i]=s[l],s[l]=u,Ae(oe.banners,s.map((d,f)=>({...d,order:f})))}function uO(){return yu("B-")}function dO(){return{version:1,exportedAt:new Date().toISOString(),products:An(),orders:bu(),settings:Bi(),subscribers:Vi(),banners:Ki()}}function hO(t){if(t.version!==1)throw new Error("نسخة الملف غير مدعومة.");Ae(oe.products,t.products??[]),Ae(oe.orders,t.orders??[]),Ae(oe.settings,{..._n,...t.settings??{}}),Ae(oe.subscribers,t.subscribers??[]),t.banners&&Ae(oe.banners,t.banners)}function fO(){Ae(oe.orders,[]),Ae(oe.subscribers,[])}function Dj(t){const e=()=>t(),s=i=>{(!i.key||i.key.startsWith("juvel."))&&t()};return window.addEventListener(nm,e),window.addEventListener("storage",s),()=>{window.removeEventListener(nm,e),window.removeEventListener("storage",s)}}const Qc="juvel:navigate";function Zc(t){return t.replace(/\/+$/,"")||"/"}function eu(){const t=window.location.hash.slice(1);return t.startsWith("/")?Zc(t.split("?")[0]):Zc(window.location.pathname)}function Nv(){const t=window.location.hash,e=t.includes("?")?t.slice(t.indexOf("?")+1):"";return new URLSearchParams(e||window.location.search)}function Da(t,e={}){const s=Zc(t),i=e.search?`?${e.search.replace(/^\?/,"")}`:"",l=`#${s}${i}`;if(window.location.hash===l){window.dispatchEvent(new Event(Qc));return}e.replace?window.history.replaceState(null,"",l):window.history.pushState(null,"",l),window.dispatchEvent(new Event(Qc))}function Ml(){const[t,e]=A.useState(eu),[s,i]=A.useState(()=>Nv().toString());return A.useEffect(()=>{const l=()=>{e(eu()),i(Nv().toString())};return window.addEventListener("popstate",l),window.addEventListener("hashchange",l),window.addEventListener(Qc,l),()=>{window.removeEventListener("popstate",l),window.removeEventListener("hashchange",l),window.removeEventListener(Qc,l)}},[]),{path:t,search:new URLSearchParams(s)}}function Dt(t,e){return s=>{s.defaultPrevented||s.button!==0||s.metaKey||s.ctrlKey||s.shiftKey||s.altKey||(s.preventDefault(),Da(t,{search:e}),window.scrollTo({top:0,behavior:"instant"}))}}function Mt(t,e){return`#${Zc(t)}${e?`?${e.replace(/^\?/,"")}`:""}`}function vl(t){return e=>{if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;e.preventDefault();const s=()=>{const i=document.getElementById(t);i?i.scrollIntoView({behavior:"smooth",block:"start"}):window.scrollTo({top:0,behavior:"smooth"})};if(eu()==="/"){s();return}Da("/"),window.requestAnimationFrame(()=>window.requestAnimationFrame(s))}}function wl(t){return eu()==="/"?`#${t}`:"#/"}function Et(t){return t.filter(e=>e.status!=="ملغي")}function mO(t){return t.filter(e=>e.status==="مكتمل"||e.status==="تم الشحن")}function pO(t){return t.filter(e=>e.status==="جديد"||e.status==="قيد التجهيز")}function Mj(t,e,s,i=.45){const l=s.find(u=>u.id===t);return l&&l.costPrice!==void 0&&l.costPrice>0?l.costPrice:e*i}function sm(t,e){return Et(t).reduce((s,i)=>{const l=i.items.reduce((u,d)=>u+Mj(d.productId,d.price,e)*d.quantity,0);return s+(i.subtotal-l)},0)}function gO(t,e){const s=Et(t).reduce((i,l)=>i+l.subtotal,0);return s?sm(t,e)/s*100:0}function en(t){return t.reduce((e,s)=>e+s.total,0)}function jl(t,e,s){return t.filter(i=>{const l=new Date(i.createdAt).getTime();return l>=e.getTime()&&l<s.getTime()})}function vu(t=new Date){const e=new Date(t);return e.setHours(0,0,0,0),e}function tu(t,e=vu()){const s=new Date(e);return s.setDate(s.getDate()-t),s}function am(t,e){const s=new Date,i=tu(e-1),l=tu(e*2-1),u=jl(t,i,new Date(s.getTime()+1)),d=jl(t,l,i);return{current:u,previous:d,change:Tv(en(u),en(d)),countChange:Tv(u.length,d.length)}}function Tv(t,e){return e===0?t===0?0:null:(t-e)/e*100}function im(t,e){const s=Et(t),i=vu();return Array.from({length:e},(l,u)=>{const d=tu(e-1-u,i),f=new Date(d);f.setDate(f.getDate()+1);const g=jl(s,d,f);return{key:d.toISOString(),label:e<=7?new Intl.DateTimeFormat("ar-EG",{weekday:"short"}).format(d):new Intl.DateTimeFormat("ar-EG",{day:"numeric",month:"numeric"}).format(d),total:en(g),count:g.length,start:d}})}function xO(t,e){const s=Et(t),i=vu();return Array.from({length:e},(l,u)=>{const d=tu((e-1-u)*7-1,i),f=new Date(d);f.setDate(f.getDate()-7);const g=jl(s,f,d);return{key:f.toISOString(),label:new Intl.DateTimeFormat("ar-EG",{day:"numeric",month:"numeric"}).format(f),total:en(g),count:g.length,start:f}})}function yO(t,e){const s=Et(t),i=new Date;return Array.from({length:e},(l,u)=>{const d=new Date(i.getFullYear(),i.getMonth()-(e-1-u),1),f=new Date(d.getFullYear(),d.getMonth()+1,1),g=jl(s,d,f);return{key:d.toISOString(),label:new Intl.DateTimeFormat("ar-EG",{month:"short"}).format(d),total:en(g),count:g.length,start:d}})}function Uj(t){const e=new Map;for(const s of Et(t))for(const i of s.items){const l=e.get(i.productId)??{productId:i.productId,name:i.name,image:i.image,quantity:0,revenue:0};l.quantity+=i.quantity,l.revenue+=i.quantity*i.price,e.set(i.productId,l)}return[...e.values()].sort((s,i)=>i.revenue-s.revenue)}function bO(t,e){const s=new Map(e.map(l=>[l.id,l.category])),i=new Map;for(const l of Et(t))for(const u of l.items){const d=s.get(u.productId)??"أخرى",f=i.get(d)??{category:d,revenue:0,quantity:0};f.revenue+=u.quantity*u.price,f.quantity+=u.quantity,i.set(d,f)}return[...i.values()].sort((l,u)=>u.revenue-l.revenue)}function vO(t){const e={جديد:0,"قيد التجهيز":0,"تم الشحن":0,مكتمل:0,ملغي:0};for(const s of t)e[s.status]+=1;return e}function wO(t){const e=Array.from({length:24},()=>0);for(const s of Et(t))e[new Date(s.createdAt).getHours()]+=1;return e}function jO(t){const e=Array.from({length:7},()=>0);for(const s of Et(t))e[new Date(s.createdAt).getDay()]+=1;return e}function SO(t){const e=new Map;for(const s of Et(t)){const i=s.city.trim()||"غير محدد",l=e.get(i)??{city:i,count:0,revenue:0};l.count+=1,l.revenue+=s.total,e.set(i,l)}return[...e.values()].sort((s,i)=>i.revenue-s.revenue)}function Jm(t,e=5){return t.filter(s=>s.isActive!==!1&&(s.stock??0)<=e).sort((s,i)=>(s.stock??0)-(i.stock??0))}function _O(t){return t.reduce((e,s)=>e+(s.stock??0)*s.price,0)}function Lj(t){const e=new Map;for(const l of Et(t)){const u=(l.phone||l.email||l.customerName).trim().toLowerCase();e.set(u,(e.get(u)??0)+1)}const s=e.size;return s?[...e.values()].filter(l=>l>1).length/s*100:0}function NO(t){return t.length?t.filter(e=>e.status==="ملغي").length/t.length*100:0}function zj(t,e){const s=URL.createObjectURL(t),i=document.createElement("a");i.href=s,i.download=e,i.rel="noopener",i.style.display="none",document.body.appendChild(i);try{i.click()}catch{window.open(s,"_blank","noopener")}window.setTimeout(()=>{document.body.removeChild(i),URL.revokeObjectURL(s)},1500)}function Sl(t,e,s){const i=[e,...s].map(l=>l.map(u=>`"${String(u??"").replace(/"/g,'""')}"`).join(",")).join(`\rUnknown directive
70`);zj(new Blob(["\uFEFF",i],{type:"text/csv;charset=utf-8"}),t)}function TO(t,e){zj(new Blob([JSON.stringify(e,null,2)],{type:"application/json;charset=utf-8"}),t)}function Pj({data:t,height:e=200}){const[s,i]=A.useState(null),l=720,u=Math.max(1,...t.map(x=>x.total)),d=l/Math.max(1,t.length),f=Math.min(34,d*.5),g=x=>e-x/u*(e-12),p=t.map((x,y)=>`${y===0?"M":"L"} ${y*d+d/2} ${g(x.total)}`).join(" ");return o.jsxs("div",{className:"relative",children:[o.jsxs("svg",{viewBox:`0 0 ${l} ${e+8}`,className:"h-[220px] w-full overflow-visible",role:"img","aria-label":"مخطط الإيرادات",children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:"bar-gold",x1:"0",x2:"0",y1:"0",y2:"1",children:[o.jsx("stop",{offset:"0%",stopColor:"#f2d36f"}),o.jsx("stop",{offset:"100%",stopColor:"#9e7926"})]})}),[.25,.5,.75,1].map(x=>o.jsx("line",{x1:"0",x2:l,y1:e-(e-12)*x,y2:e-(e-12)*x,stroke:"rgba(255,255,255,0.06)",strokeDasharray:"4 6"},x)),t.map((x,y)=>{const b=x.total===0?3:Math.max(5,x.total/u*(e-12)),w=y*d+(d-f)/2;return o.jsxs("g",{onMouseEnter:()=>i(y),onMouseLeave:()=>i(null),children:[o.jsx("rect",{x:y*d,y:0,width:d,height:e,fill:"transparent"}),o.jsx("rect",{x:w,y:e-b,width:f,height:b,rx:"7",fill:x.total===0?"rgba(212,175,55,0.12)":"url(#bar-gold)",opacity:s===null||s===y?1:.45})]},x.key)}),t.length>1&&o.jsx(Q.path,{d:p,fill:"none",stroke:"#f3dca3",strokeWidth:"1.5",strokeDasharray:"3 4",initial:{pathLength:0},animate:{pathLength:1},transition:{duration:1.2}}),s!==null&&o.jsx("circle",{cx:s*d+d/2,cy:g(t[s].total),r:"4",fill:"#fff",stroke:"#d4af37",strokeWidth:"2"})]}),o.jsx("div",{className:"grid text-center text-[11px] text-stone-600",style:{gridTemplateColumns:`repeat(${t.length}, minmax(0,1fr))`},children:t.map(x=>o.jsx("span",{className:"truncate",children:x.label},x.key))}),s!==null&&o.jsxs("div",{className:"pointer-events-none absolute -top-2 z-10 -translate-x-1/2 rounded-lg border border-white/10 bg-[#0c0a08] px-3 py-2 text-xs shadow-xl",style:{left:`${(s+.5)/t.length*100}%`},dir:"rtl",children:[o.jsx("p",{className:"font-bold text-[#e7c44e]",children:fe(t[s].total)}),o.jsxs("p",{className:"text-stone-400",children:[t[s].count," طلب"]})]})]})}function kv({slices:t,size:e=160}){const s=t.reduce((d,f)=>d+f.value,0),i=54,l=2*Math.PI*i;let u=0;return o.jsxs("div",{className:"flex items-center gap-6",children:[o.jsxs("svg",{width:e,height:e,viewBox:"0 0 140 140",className:"shrink-0 -rotate-90",children:[o.jsx("circle",{cx:"70",cy:"70",r:i,fill:"none",stroke:"rgba(255,255,255,0.06)",strokeWidth:"16"}),s>0&&t.map(d=>{const f=d.value/s*l,g=o.jsx(Q.circle,{cx:"70",cy:"70",r:i,fill:"none",stroke:d.color,strokeWidth:"16",strokeDasharray:`${f} ${l-f}`,strokeDashoffset:-u,initial:{opacity:0},animate:{opacity:1},transition:{duration:.6}},d.label);return u+=f,g})]}),o.jsx("ul",{className:"space-y-2 text-sm",children:t.map(d=>o.jsxs("li",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"h-2.5 w-2.5 rounded-full",style:{background:d.color}}),o.jsx("span",{className:"text-stone-400",children:d.label}),o.jsxs("span",{className:"mr-auto font-bold text-stone-200",children:[d.value,s>0&&o.jsxs("span",{className:"mr-1 text-xs text-stone-600",children:["(",Math.round(d.value/s*100),"٪)"]})]})]},d.label))})]})}function rm({rows:t,valueLabel:e}){const s=Math.max(1,...t.map(i=>i.value));return t.length?o.jsx("div",{className:"space-y-4",children:t.map((i,l)=>o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"w-5 text-xs text-stone-600",children:String(l+1).padStart(2,"0")}),i.image&&o.jsx("img",{src:i.image,alt:"",className:"h-10 w-10 rounded-lg object-cover"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsx("p",{className:"truncate text-sm font-bold text-stone-300",children:i.label}),o.jsx("span",{className:"whitespace-nowrap text-xs text-stone-400",children:e(i.value)})]}),i.sub&&o.jsx("p",{className:"text-[11px] text-stone-600",children:i.sub}),o.jsx("div",{className:"mt-1.5 h-1.5 overflow-hidden rounded-full bg-white/[0.06]",children:o.jsx(Q.div,{initial:{width:0},animate:{width:`${i.value/s*100}%`},transition:{duration:.7,delay:l*.06},className:"h-full rounded-full bg-gradient-to-l from-[#d4af37] to-[#f0d87c]"})})]})]},i.label))}):o.jsx("p",{className:"py-8 text-center text-sm text-stone-600",children:"لا توجد بيانات بعد."})}function Ev({values:t,labels:e,caption:s}){const i=Math.max(1,...t);return o.jsxs("div",{children:[o.jsx("div",{className:"grid gap-1",style:{gridTemplateColumns:`repeat(${t.length}, minmax(0,1fr))`},children:t.map((l,u)=>o.jsx("div",{title:`${e[u]}: ${l} طلب`,className:"aspect-square rounded-md border border-white/[0.04]",style:{background:l===0?"rgba(255,255,255,0.03)":`rgba(212,175,55,${.18+l/i*.82})`}},u))}),o.jsx("div",{className:"mt-1.5 grid text-center text-[10px] text-stone-600",style:{gridTemplateColumns:`repeat(${t.length}, minmax(0,1fr))`},children:e.map((l,u)=>o.jsx("span",{className:t.length>12&&u%3!==0?"opacity-0":"",children:l},u))}),o.jsx("p",{className:"mt-2 text-xs text-stone-600",children:s})]})}const Ye="rounded-2xl border border-white/[0.07] bg-[#12100d]",pe="w-full rounded-xl border border-white/10 bg-[#0c0a08] px-4 py-3 text-sm text-stone-100 outline-none transition placeholder:text-stone-600 focus:border-[#d4af37]/60 focus:ring-2 focus:ring-[#d4af37]/10",Rt="inline-flex items-center justify-center gap-2 rounded-xl bg-[#d4af37] px-4 py-3 text-sm font-extrabold text-[#100d07] transition hover:bg-[#e7c44e] disabled:cursor-not-allowed disabled:opacity-50",St="inline-flex items-center justify-center gap-2 rounded-xl border border-white/10 px-4 py-3 text-sm font-bold text-stone-300 transition hover:border-[#d4af37]/40 hover:text-[#e7c44e] disabled:cursor-not-allowed disabled:opacity-40",Ul="inline-flex items-center justify-center gap-2 rounded-xl border border-red-400/25 px-4 py-3 text-sm font-bold text-red-300 transition hover:bg-red-400/10 disabled:cursor-not-allowed disabled:opacity-40",lm=["جديد","قيد التجهيز","تم الشحن","مكتمل","ملغي"];function $j(t){return t==="مكتمل"?"border-emerald-400/20 bg-emerald-400/10 text-emerald-300":t==="تم الشحن"?"border-sky-400/20 bg-sky-400/10 text-sky-300":t==="قيد التجهيز"?"border-amber-400/20 bg-amber-400/10 text-amber-300":t==="ملغي"?"border-red-400/20 bg-red-400/10 text-red-300":"border-[#d4af37]/20 bg-[#d4af37]/10 text-[#e7c44e]"}function Gs(t,e=!1){return new Intl.DateTimeFormat("ar-EG",{day:"numeric",month:"short",...e?{hour:"numeric",minute:"2-digit"}:{}}).format(new Date(t))}function Av(t){return new Intl.DateTimeFormat("ar-EG",{weekday:"long",day:"numeric",month:"long",year:"numeric",hour:"numeric",minute:"2-digit"}).format(new Date(t))}function Bj(t){const e=Date.now()-new Date(t).getTime(),s=Math.floor(e/6e4);if(s<1)return"الآن";if(s<60)return`منذ ${s} دقيقة`;const i=Math.floor(s/60);if(i<24)return`منذ ${i} ساعة`;const l=Math.floor(i/24);return l<30?`منذ ${l} يوم`:Gs(t)}function Wm({status:t}){return o.jsx("span",{className:`inline-flex whitespace-nowrap rounded-full border px-2.5 py-1 text-[11px] font-bold ${$j(t)}`,children:t})}function Fs({title:t,subtitle:e,action:s}){return o.jsxs("div",{className:"mb-7 flex flex-col justify-between gap-4 sm:flex-row sm:items-end",children:[o.jsxs("div",{children:[o.jsxs("p",{className:"mb-2 flex items-center gap-2 text-xs font-bold tracking-[0.18em] text-[#d4af37]",children:[o.jsx("span",{className:"h-px w-5 bg-[#d4af37]/70"}),"JUVEL STUDIO"]}),o.jsx("h1",{className:"text-2xl font-black text-stone-100 sm:text-3xl",children:t}),o.jsx("p",{className:"mt-2 text-sm text-stone-500",children:e})]}),s]})}function kO({value:t}){if(t===null)return o.jsx("span",{className:"text-xs text-stone-600",children:"لا توجد بيانات سابقة"});const e=Math.round(t);if(e===0)return o.jsxs("span",{className:"inline-flex items-center gap-1 text-xs text-stone-500",children:[o.jsx(du,{className:"h-3 w-3"})," بدون تغيير"]});const s=e>0;return o.jsxs("span",{className:`inline-flex items-center gap-1 text-xs font-bold ${s?"text-emerald-300":"text-red-300"}`,children:[s?o.jsx(Hk,{className:"h-3 w-3"}):o.jsx(Vk,{className:"h-3 w-3"}),Math.abs(e),"٪ عن الفترة السابقة"]})}function Tt({label:t,value:e,note:s,trend:i,icon:l,accent:u}){return o.jsxs(Q.article,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},className:`${Ye} p-5 transition hover:border-white/15`,children:[o.jsxs("div",{className:"flex items-start justify-between gap-4",children:[o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"text-sm text-stone-500",children:t}),o.jsx("p",{className:"mt-3 truncate text-2xl font-black tracking-tight text-stone-100",children:e})]}),o.jsx("span",{className:`flex h-11 w-11 shrink-0 items-center justify-center rounded-xl ${u}`,children:o.jsx(l,{className:"h-5 w-5"})})]}),o.jsx("div",{className:"mt-4 border-t border-white/[0.06] pt-3",children:i!==void 0?o.jsx(kO,{value:i}):o.jsx("p",{className:"text-xs text-stone-600",children:s})})]})}function Oa({icon:t,title:e,description:s,action:i}){return o.jsxs("div",{className:"px-6 py-14 text-center",children:[o.jsx(t,{className:"mx-auto h-9 w-9 text-stone-700"}),o.jsx("p",{className:"mt-4 font-bold text-stone-400",children:e}),o.jsx("p",{className:"mt-2 text-sm text-stone-600",children:s}),i&&o.jsx("div",{className:"mt-5",children:i})]})}function Ma({title:t,eyebrow:e,onClose:s,children:i,maxWidth:l="max-w-xl"}){return o.jsx("div",{className:"fixed inset-0 z-[80] flex items-center justify-center overflow-y-auto bg-black/75 p-4 backdrop-blur-sm",dir:"rtl",role:"dialog","aria-modal":"true","aria-label":t,children:o.jsxs(Q.div,{initial:{opacity:0,y:16,scale:.98},animate:{opacity:1,y:0,scale:1},className:`my-auto max-h-[92vh] w-full ${l} overflow-y-auto rounded-2xl border border-white/10 bg-[#12100d] shadow-2xl`,children:[o.jsxs("div",{className:"sticky top-0 z-10 flex items-start justify-between border-b border-white/[0.07] bg-[#12100d]/95 px-6 py-5 backdrop-blur",children:[o.jsxs("div",{children:[e&&o.jsx("p",{className:"text-xs font-bold tracking-[0.18em] text-[#d4af37]",children:e}),o.jsx("h2",{className:"mt-1 text-xl font-extrabold text-white",children:t})]}),o.jsx("button",{onClick:s,type:"button",className:"rounded-lg p-2 text-stone-500 hover:bg-white/5 hover:text-white","aria-label":"إغلاق",children:o.jsx(Ks,{className:"h-5 w-5"})})]}),o.jsx("div",{className:"p-6",children:i})]})})}function Vj({checked:t,onChange:e,label:s,hint:i}){return o.jsxs("label",{className:"flex cursor-pointer items-center justify-between rounded-xl border border-white/[0.07] bg-black/20 px-4 py-3",children:[o.jsxs("span",{children:[o.jsx("span",{className:"block text-sm font-bold text-stone-200",children:s}),i&&o.jsx("span",{className:"mt-1 block text-xs text-stone-600",children:i})]}),o.jsxs("span",{className:`relative h-6 w-11 shrink-0 rounded-full transition-colors ${t?"bg-[#d4af37]":"bg-stone-700"}`,children:[o.jsx("input",{type:"checkbox",checked:t,onChange:l=>e(l.target.checked),className:"sr-only"}),o.jsx("span",{className:`absolute top-1 h-4 w-4 rounded-full bg-white transition-all ${t?"right-1":"right-6"}`})]})]})}function EO({products:t,orders:e,onNavigate:s,onOpenOrder:i}){const l=A.useMemo(()=>Et(e),[e]),u=A.useMemo(()=>am(l,7),[l]),d=A.useMemo(()=>am(l,30),[l]),f=e.filter(L=>L.status==="جديد"||L.status==="قيد التجهيز"),g=en(l),p=l.length?g/l.length:0,x=Jm(t),y=Uj(l).slice(0,5),b=A.useMemo(()=>im(e,14),[e]),w=Lj(l),j=e.filter(L=>new Date(L.createdAt).toDateString()===new Date().toDateString()),N=mO(e),_=pO(e),k=sm(l,t),R=gO(l,t),M=new Date,T=new Date(M.getFullYear(),M.getMonth(),1),F=l.filter(L=>new Date(L.createdAt)>=T),I=sm(F,t),E=t.some(L=>(L.costPrice??0)>0);return o.jsxs(o.Fragment,{children:[o.jsx(Fs,{title:"نظرة عامة",subtitle:"ملخص أداء المتجر والمهام التي تحتاج انتباهك"}),(f.length>0||x.length>0)&&o.jsxs("div",{className:"mb-5 grid gap-3 sm:grid-cols-2",children:[f.length>0&&o.jsxs("button",{onClick:()=>s("orders"),className:"flex items-center justify-between gap-3 rounded-xl border border-[#d4af37]/25 bg-[#d4af37]/[0.06] px-4 py-3 text-right text-sm text-[#f0d87c] transition hover:bg-[#d4af37]/10",children:[o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(Fk,{className:"h-4 w-4"})," ",f.length," طلب في انتظار التجهيز أو الشحن"]}),o.jsx(Ci,{className:"h-4 w-4"})]}),x.length>0&&o.jsxs("button",{onClick:()=>s("products"),className:"flex items-center justify-between gap-3 rounded-xl border border-amber-400/20 bg-amber-400/[0.05] px-4 py-3 text-right text-sm text-amber-200 transition hover:bg-amber-400/10",children:[o.jsxs("span",{className:"flex items-center gap-2",children:[o.jsx(fu,{className:"h-4 w-4"})," ",x.length," منتج مخزونه منخفض"]}),o.jsx(Ci,{className:"h-4 w-4"})]})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[o.jsx(Tt,{label:"إيرادات آخر ٧ أيام",value:fe(en(u.current)),trend:u.change,icon:Hw,accent:"bg-[#d4af37]/10 text-[#e7c44e]"}),o.jsx(Tt,{label:"طلبات آخر ٧ أيام",value:String(u.current.length),trend:u.countChange,icon:Rl,accent:"bg-sky-400/10 text-sky-300"}),o.jsx(Tt,{label:"إيرادات آخر ٣٠ يوم",value:fe(en(d.current)),trend:d.change,icon:Vm,accent:"bg-violet-400/10 text-violet-300"}),o.jsx(Tt,{label:"عملاء متكررون",value:`${Math.round(w)}٪`,note:"نسبة العملاء الذين طلبوا أكثر من مرة",icon:Ea,accent:"bg-emerald-400/10 text-emerald-300"})]}),o.jsxs("div",{className:"mt-4 grid gap-4 sm:grid-cols-3",children:[o.jsxs("div",{className:`${Ye} flex items-center justify-between p-4`,children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-500",children:"إجمالي الإيرادات"}),o.jsx("p",{className:"mt-1 text-lg font-black text-stone-100",children:fe(g)})]}),o.jsxs("span",{className:"text-xs text-stone-600",children:[l.length," طلب"]})]}),o.jsx("div",{className:`${Ye} flex items-center justify-between p-4`,children:o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-500",children:"متوسط قيمة الطلب"}),o.jsx("p",{className:"mt-1 text-lg font-black text-stone-100",children:fe(p)})]})}),o.jsxs("div",{className:`${Ye} flex items-center justify-between p-4`,children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-500",children:"طلبات اليوم"}),o.jsx("p",{className:"mt-1 text-lg font-black text-stone-100",children:j.length})]}),o.jsx("span",{className:"text-xs text-stone-600",children:fe(en(Et(j)))})]})]}),o.jsxs("section",{className:"mt-5",children:[o.jsxs("div",{className:"mb-3 flex items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-base font-extrabold text-stone-100",children:"الدفتر المحاسبي"}),o.jsx("p",{className:"mt-0.5 text-xs text-stone-600",children:"الأرباح الصافية والتحصيل الفعلي — بناءً على تكلفة كل منتج"})]}),!E&&o.jsx("span",{className:"rounded-full border border-amber-400/25 bg-amber-400/[0.07] px-3 py-1.5 text-[11px] font-bold text-amber-200",children:"الأرباح تقديرية (45٪ من السعر) — أدخلي التكلفة الحقيقية من صفحة المنتجات"})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[o.jsx(Tt,{label:"صافي الأرباح (الكل)",value:fe(k),note:`هامش الربح ${Math.round(R)}٪ من إيراد المنتجات`,icon:rE,accent:"bg-emerald-400/10 text-emerald-300"}),o.jsx(Tt,{label:"أرباح الشهر الحالي",value:fe(I),note:`${F.length} طلب هذا الشهر`,icon:mE,accent:"bg-[#d4af37]/10 text-[#e7c44e]"}),o.jsx(Tt,{label:"المحصل فعلاً (تسلّم)",value:fe(en(N)),note:`${N.length} طلب تم شحنه/تسليمه`,icon:tj,accent:"bg-sky-400/10 text-sky-300"}),o.jsx(Tt,{label:"قيد التحصيل (جاي)",value:fe(en(_)),note:`${_.length} طلب لسه ما اتسلمش`,icon:eE,accent:"bg-violet-400/10 text-violet-300"})]})]}),o.jsxs("div",{className:"mt-5 grid gap-5 xl:grid-cols-[1.65fr_1fr]",children:[o.jsxs("section",{className:`${Ye} p-5 sm:p-6`,children:[o.jsxs("div",{className:"mb-4 flex items-center justify-between gap-4",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"font-extrabold text-stone-100",children:"حركة المبيعات"}),o.jsx("p",{className:"mt-1 text-xs text-stone-600",children:"الإيرادات اليومية خلال آخر ١٤ يوماً"})]}),o.jsxs("button",{onClick:()=>s("analytics"),className:"inline-flex items-center gap-1 text-xs font-bold text-[#e7c44e] hover:text-[#f5dfa0]",children:["كل التقارير ",o.jsx(Ci,{className:"h-3.5 w-3.5"})]})]}),o.jsx(Pj,{data:b})]}),o.jsxs("section",{className:`${Ye} p-5 sm:p-6`,children:[o.jsxs("div",{className:"mb-5",children:[o.jsx("h2",{className:"font-extrabold text-stone-100",children:"الأعلى إيراداً"}),o.jsx("p",{className:"mt-1 text-xs text-stone-600",children:"أفضل ٥ منتجات"})]}),o.jsx(rm,{rows:y.map(L=>({label:L.name,value:L.revenue,image:L.image,sub:`${L.quantity} قطعة`})),valueLabel:fe})]})]}),o.jsxs("section",{className:`${Ye} mt-5 overflow-hidden`,children:[o.jsxs("div",{className:"flex items-center justify-between gap-4 border-b border-white/[0.06] px-5 py-4 sm:px-6",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"font-extrabold text-stone-100",children:"أحدث الطلبات"}),o.jsx("p",{className:"mt-1 text-xs text-stone-600",children:"آخر ٦ طلبات وردت للمتجر"})]}),o.jsxs("button",{onClick:()=>s("orders"),className:"inline-flex items-center gap-1 text-xs font-bold text-[#e7c44e] hover:text-[#f5dfa0]",children:["عرض الكل ",o.jsx(Ci,{className:"h-3.5 w-3.5"})]})]}),e.length===0?o.jsx(Oa,{icon:hu,title:"لسه مفيش طلبات",description:"أي طلب جديد من الموقع هيظهر هنا فوراً."}):o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[640px] text-right text-sm",children:[o.jsx("thead",{className:"text-xs text-stone-600",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-5 py-3 font-medium sm:px-6",children:"رقم الطلب"}),o.jsx("th",{className:"px-4 py-3 font-medium",children:"العميل"}),o.jsx("th",{className:"px-4 py-3 font-medium",children:"الوقت"}),o.jsx("th",{className:"px-4 py-3 font-medium",children:"الإجمالي"}),o.jsx("th",{className:"px-5 py-3 font-medium sm:px-6",children:"الحالة"})]})}),o.jsx("tbody",{children:e.slice(0,6).map(L=>o.jsxs("tr",{className:"cursor-pointer border-t border-white/[0.05] hover:bg-white/[0.015]",onClick:()=>i(L.id),children:[o.jsx("td",{className:"px-5 py-3.5 font-bold text-[#e7c44e] sm:px-6",children:L.id}),o.jsx("td",{className:"px-4 py-3.5 text-stone-300",children:L.customerName}),o.jsx("td",{className:"px-4 py-3.5 text-stone-500",title:Gs(L.createdAt,!0),children:Bj(L.createdAt)}),o.jsx("td",{className:"px-4 py-3.5 font-bold text-stone-200",children:fe(L.total)}),o.jsx("td",{className:"px-5 py-3.5 sm:px-6",children:o.jsx(Wm,{status:L.status})})]},L.id))})]})})]})]})}function AO({orders:t,onStatusChange:e,onAddNote:s,onDelete:i,initialOrderId:l,onClearInitial:u}){const[d,f]=A.useState(""),[g,p]=A.useState("الكل"),[x,y]=A.useState("all"),[b,w]=A.useState(l??null),[j,N]=A.useState(null),_=A.useMemo(()=>{const T=d.trim().toLowerCase(),F=(()=>{const I=new Date;return I.setHours(0,0,0,0),x==="today"?I:x==="7d"?new Date(I.getTime()-6*864e5):x==="30d"?new Date(I.getTime()-29*864e5):null})();return t.filter(I=>!(g!=="الكل"&&I.status!==g||F&&new Date(I.createdAt)<F||T&&!`${I.id} ${I.customerName} ${I.phone} ${I.email} ${I.city}`.toLowerCase().includes(T)))},[t,d,g,x]),k=A.useMemo(()=>{const T={الكل:t.length};for(const F of lm)T[F]=t.filter(I=>I.status===F).length;return T},[t]),R=b?t.find(T=>T.id===b)??null:null,M=()=>Sl(`juvel-orders-${new Date().toISOString().slice(0,10)}.csv`,["رقم الطلب","الاسم","الموبايل","البريد","المدينة","العنوان","المنتجات","المجموع الفرعي","الشحن","الإجمالي","الحالة","التاريخ"],_.map(T=>[T.id,T.customerName,T.phone,T.email,T.city,T.address,T.items.map(F=>`${F.name} ×${F.quantity}`).join(" | "),T.subtotal,T.shipping,T.total,T.status,new Date(T.createdAt).toLocaleString("ar-EG")]));return o.jsxs(o.Fragment,{children:[o.jsx(Fs,{title:"الطلبات",subtitle:`${t.length} طلب · ${fe(en(Et(t)))} إجمالي غير ملغي`,action:o.jsxs("button",{onClick:M,disabled:!_.length,className:St,children:[o.jsx(Al,{className:"h-4 w-4"})," تصدير (",_.length,")"]})}),o.jsx("div",{className:"mb-4 flex gap-2 overflow-x-auto pb-1",children:["الكل",...lm].map(T=>o.jsxs("button",{onClick:()=>p(T),className:`flex shrink-0 items-center gap-2 rounded-full border px-4 py-2 text-sm font-bold transition ${g===T?"border-[#d4af37] bg-[#d4af37] text-[#100d07]":"border-white/10 text-stone-400 hover:border-[#d4af37]/40 hover:text-stone-200"}`,children:[T,o.jsx("span",{className:`rounded-full px-1.5 text-[11px] ${g===T?"bg-black/15":"bg-white/[0.06]"}`,children:k[T]??0})]},T))}),o.jsxs("div",{className:"mb-5 grid gap-3 sm:grid-cols-[1fr_200px]",children:[o.jsxs("label",{className:"relative",children:[o.jsx(Pi,{className:"absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2 text-stone-600"}),o.jsx("input",{value:d,onChange:T=>f(T.target.value),className:`${pe} pr-11`,placeholder:"رقم الطلب، الاسم، الهاتف، المدينة..."})]}),o.jsxs("label",{className:"relative",children:[o.jsxs("select",{value:x,onChange:T=>y(T.target.value),className:`${pe} appearance-none pl-10`,children:[o.jsx("option",{value:"all",children:"كل الفترات"}),o.jsx("option",{value:"today",children:"اليوم"}),o.jsx("option",{value:"7d",children:"آخر ٧ أيام"}),o.jsx("option",{value:"30d",children:"آخر ٣٠ يوم"})]}),o.jsx(El,{className:"pointer-events-none absolute left-4 top-1/2 h-4 w-4 -translate-y-1/2 text-stone-600"})]})]}),o.jsx("div",{className:`${Ye} overflow-hidden`,children:_.length===0?o.jsx(Oa,{icon:Rl,title:t.length?"مفيش طلبات مطابقة":"لسه مفيش طلبات مسجلة",description:t.length?"جرّبي تغيير الفلاتر أو البحث.":"لما عميل يأكد طلبه من الموقع هتلاقيه هنا."}):o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[960px] text-right text-sm",children:[o.jsx("thead",{className:"border-b border-white/[0.06] bg-white/[0.02] text-xs text-stone-600",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-5 py-4 font-medium",children:"رقم الطلب"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"العميل"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"التاريخ"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"المنتجات"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"المدينة"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"الإجمالي"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"الحالة"}),o.jsx("th",{className:"px-5 py-4 text-left font-medium",children:"إجراءات"})]})}),o.jsx("tbody",{children:_.map(T=>o.jsxs("tr",{className:"border-b border-white/[0.045] last:border-0 hover:bg-white/[0.015]",children:[o.jsx("td",{className:"px-5 py-4",children:o.jsx("button",{onClick:()=>w(T.id),className:"font-bold text-[#e7c44e] hover:underline",children:T.id})}),o.jsxs("td",{className:"px-4 py-4",children:[o.jsx("p",{className:"font-bold text-stone-200",children:T.customerName}),o.jsx("p",{className:"mt-1 text-xs text-stone-600",dir:"ltr",children:T.phone})]}),o.jsx("td",{className:"px-4 py-4 text-stone-500",children:Gs(T.createdAt,!0)}),o.jsxs("td",{className:"px-4 py-4 text-stone-400",children:[T.items.reduce((F,I)=>F+I.quantity,0)," قطعة"]}),o.jsx("td",{className:"px-4 py-4 text-stone-400",children:T.city}),o.jsx("td",{className:"px-4 py-4 font-bold text-stone-200",children:fe(T.total)}),o.jsx("td",{className:"px-4 py-4",children:o.jsx(qj,{value:T.status,onChange:F=>e(T.id,F)})}),o.jsx("td",{className:"px-5 py-4",children:o.jsxs("div",{className:"flex justify-end items-center gap-1.5",children:[o.jsx("a",{href:`tel:${T.phone}`,className:"rounded-lg border border-white/[0.08] p-2 text-stone-400 hover:border-emerald-400/30 hover:text-emerald-300","aria-label":"اتصال",title:"اتصال بالعميل",children:o.jsx(Im,{className:"h-4 w-4"})}),o.jsx("button",{onClick:()=>w(T.id),className:"rounded-lg border border-white/[0.08] p-2 text-stone-400 hover:border-[#d4af37]/30 hover:text-[#e7c44e]","aria-label":"التفاصيل",title:"عرض تفاصيل الطلب",children:o.jsx(Cl,{className:"h-4 w-4"})}),o.jsx("button",{onClick:()=>N(T),className:"rounded-lg border border-red-500/20 bg-red-500/5 p-2 text-red-400 hover:bg-red-500/15 hover:border-red-500/40 hover:text-red-200 transition","aria-label":"حذف الطلب نهائياً",title:"حذف الطلب نهائياً",children:o.jsx(En,{className:"h-4 w-4"})})]})})]},T.id))})]})})}),o.jsxs(kt,{children:[R&&o.jsx(RO,{order:R,onClose:()=>{w(null),u()},onStatusChange:T=>e(R.id,T),onAddNote:T=>s(R.id,T),onDelete:()=>{i(R.id),w(null)}},R.id),j&&o.jsx(Ma,{open:!!j,onClose:()=>N(null),title:"حذف الطلب نهائياً",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"rounded-2xl border border-red-500/25 bg-red-500/10 p-5 text-sm text-red-200",children:[o.jsx("p",{className:"font-extrabold text-base text-red-100 mb-2",children:"هل أنتِ متأكدة من حذف هذا الطلب نهائياً؟"}),o.jsxs("div",{className:"space-y-1 text-xs text-red-300",children:[o.jsxs("p",{children:["• رقم الطلب: ",o.jsxs("span",{className:"font-mono font-bold text-white",children:["#",j.id]})]}),o.jsxs("p",{children:["• العميل: ",o.jsx("span",{className:"font-bold text-white",children:j.customerName})," (هاتف: ",j.phone,")"]}),o.jsxs("p",{children:["• الإجمالي: ",o.jsx("span",{className:"font-bold text-white",children:fe(j.total)})]})]}),o.jsx("p",{className:"text-[11px] text-stone-400 mt-3 pt-3 border-t border-red-500/20",children:"⚠️ سيتم حذف الطلب بشكل نهائي من المتجر وقاعدة بيانات Supabase، ولا يمكن التراجع عن هذا الإجراء."})]}),o.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[o.jsx("button",{type:"button",onClick:()=>N(null),className:St,children:"إلغاء"}),o.jsxs("button",{type:"button",onClick:()=>{i(j.id),N(null)},className:Ul,children:[o.jsx(En,{className:"h-4 w-4"})," نعم، احذف الطلب نهائياً"]})]})]})},"delete-confirm-modal")]})]})}function qj({value:t,onChange:e}){return o.jsxs("label",{className:"relative inline-block",children:[o.jsx("select",{value:t,onChange:s=>e(s.target.value),"aria-label":"حالة الطلب",className:`appearance-none rounded-full border py-1.5 pl-7 pr-3 text-[11px] font-bold outline-none ${$j(t)}`,children:lm.map(s=>o.jsx("option",{value:s,className:"bg-[#12100d] text-stone-200",children:s},s))}),o.jsx(El,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2"})]})}const CO={جديد:"قيد التجهيز","قيد التجهيز":"تم الشحن","تم الشحن":"مكتمل"};function RO({order:t,onClose:e,onStatusChange:s,onAddNote:i,onDelete:l}){const[u,d]=A.useState(""),[f,g]=A.useState(!1),p=CO[t.status],x=b=>{b.preventDefault(),u.trim()&&(i(u.trim()),d(""))},y=()=>{const b=window.open("","_blank","width=720,height=900");b&&(b.document.write(`<!doctype html><html dir="rtl" lang="ar"><head><meta charset="utf-8"><title>${t.id}</title>Unknown directive
71<style>body{font-family:system-ui,sans-serif;padding:32px;color:#111}h1{font-size:20px;margin:0 0 4px}table{width:100%;border-collapse:collapse;margin-top:16px}td,th{padding:8px;border-bottom:1px solid #ddd;text-align:right;font-size:14px}.tot td{font-weight:bold}.muted{color:#666;font-size:13px}</style></head><body>Unknown directive
72<h1>JUVEL — طلب ${t.id}</h1><p class="muted">${Av(t.createdAt)} · ${t.paymentMethod}</p>Syntax not understood
73<p><b>${t.customerName}</b><br>${t.phone}${t.email?`<br>${t.email}`:""}<br>${t.address}، ${t.city}</p>Unknown directive
74${t.notes?`<p class="muted">ملاحظات العميل: ${t.notes}</p>`:""}Unknown directive
75<table><thead><tr><th>المنتج</th><th>الكمية</th><th>السعر</th><th>الإجمالي</th></tr></thead><tbody>Syntax not understood
76${t.items.map(w=>`<tr><td>${w.name}</td><td>${w.quantity}</td><td>${w.price}</td><td>${w.price*w.quantity}</td></tr>`).join("")}Syntax not understood
77<tr><td colspan="3">المجموع الفرعي</td><td>${t.subtotal}</td></tr>Syntax not understood
78<tr><td colspan="3">الشحن</td><td>${t.shipping||"مجاني"}</td></tr>Syntax not understood
79<tr class="tot"><td colspan="3">الإجمالي</td><td>${t.total} ج.م</td></tr>Syntax not understood
80</tbody></table><script>window.print()<\/script></body></html>`),b.document.close())};return o.jsx(Ma,{title:t.id,eyebrow:"تفاصيل الطلب",onClose:e,maxWidth:"max-w-2xl",children:o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-white/[0.07] bg-black/20 p-4",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"الحالة الحالية"}),o.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[o.jsx(Wm,{status:t.status}),o.jsx(qj,{value:t.status,onChange:s})]})]}),o.jsxs("div",{className:"flex flex-wrap gap-2",children:[p&&o.jsxs("button",{onClick:()=>s(p),className:Rt,children:[o.jsx(Ol,{className:"h-4 w-4"})," نقل إلى «",p,"»"]}),o.jsxs("button",{onClick:y,className:St,children:[o.jsx(lE,{className:"h-4 w-4"})," طباعة"]})]})]}),o.jsxs("div",{className:"grid gap-3 rounded-xl border border-white/[0.07] bg-black/20 p-4 sm:grid-cols-2",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"العميل"}),o.jsx("p",{className:"mt-1 font-bold text-stone-200",children:t.customerName})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"الموبايل"}),o.jsx("a",{href:`tel:${t.phone}`,className:"mt-1 block text-[#e7c44e] hover:underline",dir:"ltr",children:t.phone})]}),t.email&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"البريد"}),o.jsx("a",{href:`mailto:${t.email}`,className:"mt-1 block break-all text-stone-200 hover:text-[#e7c44e]",dir:"ltr",children:t.email})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"تاريخ الطلب"}),o.jsx("p",{className:"mt-1 text-stone-200",children:Av(t.createdAt)})]}),o.jsxs("div",{className:"sm:col-span-2",children:[o.jsx("p",{className:"text-xs text-stone-600",children:"عنوان التوصيل"}),o.jsxs("p",{className:"mt-1 text-stone-200",children:[t.address,"، ",t.city]})]}),t.notes&&o.jsxs("div",{className:"sm:col-span-2",children:[o.jsx("p",{className:"text-xs text-stone-600",children:"ملاحظات العميل"}),o.jsx("p",{className:"mt-1 text-stone-300",children:t.notes})]})]}),o.jsxs("div",{children:[o.jsx("h3",{className:"mb-3 text-sm font-bold text-stone-200",children:"المنتجات"}),o.jsx("div",{className:"space-y-3",children:t.items.map(b=>o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("img",{src:b.image,alt:"",className:"h-12 w-12 rounded-lg object-cover"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-sm font-bold text-stone-200",children:b.name}),o.jsxs("p",{className:"mt-1 text-xs text-stone-600",children:[b.quantity," × ",fe(b.price)]})]}),o.jsx("span",{className:"text-sm font-bold text-stone-300",children:fe(b.quantity*b.price)})]},b.productId))}),o.jsxs("div",{className:"mt-4 space-y-2 border-t border-white/[0.07] pt-4 text-sm",children:[o.jsxs("div",{className:"flex justify-between text-stone-500",children:[o.jsx("span",{children:"المجموع الفرعي"}),o.jsx("span",{children:fe(t.subtotal)})]}),o.jsxs("div",{className:"flex justify-between text-stone-500",children:[o.jsx("span",{children:"الشحن"}),o.jsx("span",{children:t.shipping?fe(t.shipping):"مجاني"})]}),o.jsxs("div",{className:"flex justify-between border-t border-white/[0.07] pt-3 text-base font-extrabold text-stone-100",children:[o.jsx("span",{children:"الإجمالي"}),o.jsx("span",{className:"text-[#e7c44e]",children:fe(t.total)})]})]})]}),t.statusHistory&&t.statusHistory.length>0&&o.jsxs("div",{children:[o.jsx("h3",{className:"mb-3 text-sm font-bold text-stone-200",children:"سجل الحالة"}),o.jsx("ol",{className:"space-y-2 border-r border-white/[0.08] pr-4",children:t.statusHistory.map((b,w)=>o.jsxs("li",{className:"relative text-sm",children:[o.jsx("span",{className:"absolute -right-[21px] top-1.5 h-2.5 w-2.5 rounded-full border-2 border-[#12100d] bg-[#d4af37]"}),o.jsx("span",{className:"text-stone-300",children:b.status}),o.jsx("span",{className:"mr-2 text-xs text-stone-600",children:Gs(b.at,!0)})]},w))})]}),o.jsxs("div",{children:[o.jsxs("h3",{className:"mb-3 flex items-center gap-2 text-sm font-bold text-stone-200",children:[o.jsx(aE,{className:"h-4 w-4 text-[#d4af37]"})," ملاحظات داخلية",o.jsx("span",{className:"text-xs font-normal text-stone-600",children:"(لا تظهر للعميل)"})]}),t.internalNotes&&t.internalNotes.length>0&&o.jsx("ul",{className:"mb-3 space-y-2",children:t.internalNotes.map(b=>o.jsxs("li",{className:"rounded-lg border border-white/[0.06] bg-black/20 px-3 py-2 text-sm",children:[o.jsx("p",{className:"text-stone-300",children:b.text}),o.jsx("p",{className:"mt-1 text-[11px] text-stone-600",children:Gs(b.createdAt,!0)})]},b.id))}),o.jsxs("form",{onSubmit:x,className:"flex gap-2",children:[o.jsx("input",{value:u,onChange:b=>d(b.target.value),className:pe,placeholder:"مثال: العميل طلب التوصيل بعد ٥ مساءً"}),o.jsx("button",{type:"submit",disabled:!u.trim(),className:Rt,children:"إضافة"})]})]}),o.jsx("div",{className:"border-t border-white/[0.07] pt-5",children:f?o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-red-400/20 bg-red-400/5 p-4",children:[o.jsx("p",{className:"text-sm text-red-200",children:"حذف الطلب نهائياً؟ لا يمكن التراجع، ولن يُعاد المخزون تلقائياً."}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{onClick:()=>g(!1),className:St,children:"إلغاء"}),o.jsxs("button",{onClick:l,className:Ul,children:[o.jsx(En,{className:"h-4 w-4"})," نعم، احذفي"]})]})]}):o.jsxs("button",{type:"button",onClick:()=>g(!0),className:"inline-flex items-center gap-2 rounded-xl border border-red-500/25 bg-red-500/10 px-4 py-2.5 text-xs font-bold text-red-300 hover:bg-red-500/20 hover:border-red-500/40 transition",children:[o.jsx(En,{className:"h-4 w-4"}),"حذف هذا الطلب نهائياً"]})})]})})}function OO({products:t,onSave:e,onDelete:s,onRestoreSamples:i,nextId:l}){const[u,d]=A.useState(""),[f,g]=A.useState("الكل"),[p,x]=A.useState("all"),[y,b]=A.useState({open:!1,product:null}),[w,j]=A.useState(null),N=A.useMemo(()=>["الكل",...new Set(t.map(q=>q.category))],[t]),_=Jm(t),k=t.filter(q=>(q.stock??0)===0),R=t.filter(q=>q.isActive===!1),M=A.useMemo(()=>{const q=u.trim().toLowerCase();return t.filter(G=>!(f!=="الكل"&&G.category!==f||p==="low"&&!((G.stock??0)<=5&&G.isActive!==!1)||p==="out"&&(G.stock??0)!==0||p==="hidden"&&G.isActive!==!1||q&&!`${G.name} ${G.nameEn} ${G.category} ${G.desc}`.toLowerCase().includes(q)))},[t,u,f,p]),T=q=>{e(q),b({open:!1,product:null})},F=(q,G)=>e({...q,stock:Math.max(0,(q.stock??0)+G)}),I=q=>e({...q,isActive:q.isActive===!1}),E=q=>e({...q,id:l(),name:`${q.name} (نسخة)`,isActive:!1}),L=()=>Sl(`juvel-products-${new Date().toISOString().slice(0,10)}.csv`,["المعرّف","الاسم","الاسم الإنجليزي","التصنيف","السعر","السعر قبل الخصم","المخزون","التقييم","الشارة","ظاهر"],t.map(q=>[q.id,q.name,q.nameEn,q.category,q.price,q.oldPrice??"",q.stock??0,q.rating,q.badge??"",q.isActive===!1?"لا":"نعم"]));return o.jsxs(o.Fragment,{children:[o.jsx(Fs,{title:"إدارة المنتجات",subtitle:`${t.length} منتج · قيمة المخزون ${fe(_O(t))}`,action:o.jsxs("div",{className:"flex flex-wrap gap-2",children:[o.jsxs("button",{onClick:L,disabled:!t.length,className:St,children:[o.jsx(Al,{className:"h-4 w-4"})," تصدير"]}),o.jsxs("button",{onClick:()=>b({open:!0,product:null}),className:Rt,children:[o.jsx(Is,{className:"h-4 w-4"})," إضافة منتج"]})]})}),o.jsx("div",{className:"mb-5 grid gap-3 sm:grid-cols-4",children:[{label:"كل المنتجات",value:t.length,key:"all",tone:"text-stone-200"},{label:"مخزون منخفض",value:_.length,key:"low",tone:"text-amber-300"},{label:"نفد من المخزون",value:k.length,key:"out",tone:"text-red-300"},{label:"مخفي من المتجر",value:R.length,key:"hidden",tone:"text-stone-400"}].map(q=>o.jsxs("button",{onClick:()=>x(q.key),className:`${Ye} flex items-center justify-between p-4 text-right transition hover:border-white/15 ${p===q.key?"border-[#d4af37]/40":""}`,children:[o.jsx("span",{className:"text-sm text-stone-500",children:q.label}),o.jsx("span",{className:`text-xl font-black ${q.tone}`,children:q.value})]},q.key))}),o.jsxs("div",{className:"mb-5 grid gap-3 sm:grid-cols-[1fr_200px]",children:[o.jsxs("label",{className:"relative",children:[o.jsx(Pi,{className:"absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2 text-stone-600"}),o.jsx("input",{value:u,onChange:q=>d(q.target.value),placeholder:"ابحثي بالاسم أو التصنيف...",className:`${pe} pr-11`})]}),o.jsxs("label",{className:"relative",children:[o.jsx("select",{value:f,onChange:q=>g(q.target.value),className:`${pe} appearance-none pl-10`,children:N.map(q=>o.jsx("option",{children:q},q))}),o.jsx(El,{className:"pointer-events-none absolute left-4 top-1/2 h-4 w-4 -translate-y-1/2 text-stone-600"})]})]}),o.jsx("div",{className:`${Ye} overflow-hidden`,children:t.length===0?o.jsx(Oa,{icon:hu,title:"الكتالوج فاضي",description:"أضيفي منتجك الأول أو استرجعي كتالوج البداية.",action:o.jsxs("div",{className:"flex justify-center gap-2",children:[o.jsxs("button",{onClick:i,className:St,children:[o.jsx(Ww,{className:"h-4 w-4"})," كتالوج البداية"]}),o.jsxs("button",{onClick:()=>b({open:!0,product:null}),className:Rt,children:[o.jsx(Is,{className:"h-4 w-4"})," إضافة منتج"]})]})}):M.length===0?o.jsx(Oa,{icon:Pi,title:"لا توجد منتجات تطابق البحث",description:"جرّبي تغيير الفلاتر."}):o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[920px] text-right text-sm",children:[o.jsx("thead",{className:"border-b border-white/[0.06] bg-white/[0.02] text-xs text-stone-600",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-5 py-4 font-medium",children:"المنتج"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"التصنيف"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"السعر"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"المخزون"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"الظهور"}),o.jsx("th",{className:"px-5 py-4 text-left font-medium",children:"إجراءات"})]})}),o.jsx("tbody",{children:M.map(q=>{const G=q.stock??0;return o.jsxs("tr",{className:`border-b border-white/[0.045] last:border-0 hover:bg-white/[0.015] ${q.isActive===!1?"opacity-60":""}`,children:[o.jsx("td",{className:"px-5 py-4",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("img",{src:q.image,alt:"",className:"h-12 w-12 rounded-xl border border-white/[0.07] object-cover"}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"truncate font-bold text-stone-200",children:q.name}),o.jsxs("p",{className:"mt-1 truncate text-xs text-stone-600",children:[q.nameEn,q.badge&&o.jsx("span",{className:"mr-2 rounded bg-[#d4af37]/15 px-1.5 py-0.5 text-[10px] text-[#e7c44e]",children:q.badge})]})]})]})}),o.jsx("td",{className:"px-4 py-4 text-stone-400",children:q.category}),o.jsxs("td",{className:"px-4 py-4",children:[o.jsx("p",{className:"font-bold text-stone-200",children:fe(q.price)}),q.oldPrice&&o.jsx("p",{className:"text-xs text-stone-600 line-through",children:fe(q.oldPrice)})]}),o.jsxs("td",{className:"px-4 py-4",children:[o.jsxs("div",{className:"inline-flex items-center gap-1 rounded-full border border-white/10 p-0.5",children:[o.jsx("button",{onClick:()=>F(q,-1),disabled:G===0,className:"rounded-full p-1.5 text-stone-400 hover:bg-white/5 hover:text-white disabled:opacity-30","aria-label":"إنقاص",children:o.jsx(du,{className:"h-3.5 w-3.5"})}),o.jsx("span",{className:`min-w-8 text-center text-sm font-bold ${G===0?"text-red-300":G<=5?"text-amber-300":"text-stone-200"}`,children:G}),o.jsx("button",{onClick:()=>F(q,1),className:"rounded-full p-1.5 text-stone-400 hover:bg-white/5 hover:text-white","aria-label":"زيادة",children:o.jsx(Is,{className:"h-3.5 w-3.5"})})]}),G<=5&&G>0&&o.jsxs("p",{className:"mt-1 flex items-center gap-1 text-[10px] text-amber-300",children:[o.jsx(fu,{className:"h-3 w-3"})," منخفض"]})]}),o.jsx("td",{className:"px-4 py-4",children:o.jsxs("button",{onClick:()=>I(q),className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-bold ${q.isActive===!1?"border-white/10 text-stone-500":"border-emerald-400/20 bg-emerald-400/10 text-emerald-300"}`,children:[q.isActive===!1?o.jsx(qm,{className:"h-3 w-3"}):o.jsx(Cl,{className:"h-3 w-3"}),q.isActive===!1?"مخفي":"ظاهر"]})}),o.jsx("td",{className:"px-5 py-4",children:o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx("button",{onClick:()=>b({open:!0,product:q}),className:"rounded-lg border border-white/[0.08] p-2 text-stone-400 hover:border-[#d4af37]/30 hover:text-[#e7c44e]","aria-label":"تعديل",children:o.jsx(N2,{className:"h-4 w-4"})}),o.jsx("button",{onClick:()=>E(q),className:"rounded-lg border border-white/[0.08] p-2 text-stone-400 hover:border-[#d4af37]/30 hover:text-[#e7c44e]","aria-label":"نسخ",children:o.jsx(Fw,{className:"h-4 w-4"})}),o.jsx("button",{onClick:()=>j(q),className:"rounded-lg border border-white/[0.08] p-2 text-stone-500 hover:border-red-400/20 hover:text-red-300","aria-label":"حذف",children:o.jsx(En,{className:"h-4 w-4"})})]})})]},q.id)})})]})})}),o.jsxs(kt,{children:[y.open&&o.jsx(MO,{product:y.product,categories:N.filter(q=>q!=="الكل"),nextId:l,onClose:()=>b({open:!1,product:null}),onSave:T},y.product?.id??"new"),w&&o.jsxs(Ma,{title:"حذف المنتج",eyebrow:"تأكيد",onClose:()=>j(null),maxWidth:"max-w-md",children:[o.jsxs("p",{className:"text-sm leading-7 text-stone-300",children:["هل تريدين حذف «",o.jsx("b",{children:w.name}),"» نهائياً؟ لو حابة تخفيه مؤقتاً، استخدمي زر «الظهور» بدلاً من الحذف."]}),o.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[o.jsx("button",{onClick:()=>j(null),className:St,children:"إلغاء"}),o.jsxs("button",{onClick:()=>{s(w.id),j(null)},className:Ul,children:[o.jsx(En,{className:"h-4 w-4"})," حذف نهائي"]})]})]},"del")]})]})}function DO(t){return{name:t?.name??"",nameEn:t?.nameEn??"",category:t?.category??"العناية بالبشرة",price:t?String(t.price):"",costPrice:t?.costPrice!==void 0?String(t.costPrice):"",oldPrice:t?.oldPrice?String(t.oldPrice):"",rating:String(t?.rating??5),image:t?.image??"",badge:t?.badge??"",desc:t?.desc??"",stock:String(t?.stock??0),isActive:t?.isActive!==!1,size:t?.size??"",ingredients:t?.ingredients??"",howToUse:t?.howToUse??""}}function MO({product:t,categories:e,nextId:s,onClose:i,onSave:l}){const[u,d]=A.useState(()=>DO(t)),[f,g]=A.useState(!1),p=(_,k)=>d(R=>({...R,[_]:k})),x=_=>{_.preventDefault(),l({id:t?.id??s(),name:u.name.trim(),nameEn:u.nameEn.trim(),category:u.category.trim(),price:Number(u.price),costPrice:u.costPrice?Number(u.costPrice):0,oldPrice:u.oldPrice?Number(u.oldPrice):void 0,rating:Math.min(5,Math.max(0,Number(u.rating)||0)),image:u.image.trim(),badge:u.badge.trim()||void 0,desc:u.desc.trim(),stock:Math.max(0,Number(u.stock)||0),isActive:u.isActive,size:u.size.trim()||void 0,ingredients:u.ingredients.trim()||void 0,howToUse:u.howToUse.trim()||void 0})},y=_=>{if(!_)return;if(_.size>1.5*1024*1024){alert("حجم الصورة كبير. استخدمي صورة أقل من 1.5MB أو ضعي رابطاً مباشراً.");return}const k=new FileReader;k.onload=()=>{p("image",String(k.result)),g(!1)},k.readAsDataURL(_)},b=u.oldPrice&&u.price&&Number(u.oldPrice)>Number(u.price)?Math.round((1-Number(u.price)/Number(u.oldPrice))*100):0,w=Number(u.costPrice)||0,j=u.price&&w?Math.round((Number(u.price)-w)/Number(u.price)*100):null,N=j!==null?o.jsxs("span",{className:`mt-1 block text-xs ${j>=40?"text-emerald-300":j>=20?"text-amber-300":"text-red-300"}`,children:["هامش الربح: ",j,"٪ — ربح الوحدة ",fe(Number(u.price)-w)]}):o.jsx("span",{className:"mt-1 block text-xs text-stone-600",children:"اكتبي التكلفة ليظهر هامش الربح"});return o.jsx(Ma,{title:t?"تعديل المنتج":"إضافة منتج جديد",eyebrow:"كتالوج جوفيل",onClose:i,maxWidth:"max-w-2xl",children:o.jsxs("form",{onSubmit:x,className:"space-y-5",children:[o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("label",{className:"text-sm text-stone-400",children:["اسم المنتج بالعربي",o.jsx("input",{required:!0,value:u.name,onChange:_=>p("name",_.target.value),className:`${pe} mt-2`,placeholder:"مثال: سيروم الذهب الطبيعي"})]}),o.jsxs("label",{className:"text-sm text-stone-400",children:["الاسم بالإنجليزي",o.jsx("input",{value:u.nameEn,onChange:_=>p("nameEn",_.target.value),className:`${pe} mt-2`,placeholder:"Product name",dir:"ltr"})]}),o.jsxs("label",{className:"text-sm text-stone-400",children:["التصنيف",o.jsx("input",{required:!0,list:"product-categories",value:u.category,onChange:_=>p("category",_.target.value),className:`${pe} mt-2`}),o.jsx("datalist",{id:"product-categories",children:[...new Set([...e,"العناية بالبشرة","العناية بالشعر","العناية بالجسم","العطور"])].map(_=>o.jsx("option",{value:_},_))})]}),o.jsxs("label",{className:"text-sm text-stone-400",children:["الكمية في المخزون",o.jsx("input",{required:!0,min:"0",step:"1",type:"number",value:u.stock,onChange:_=>p("stock",_.target.value),className:`${pe} mt-2`})]}),o.jsxs("label",{className:"text-sm text-stone-400",children:["السعر بالجنيه",o.jsx("input",{required:!0,min:"0.01",step:"0.01",type:"number",value:u.price,onChange:_=>p("price",_.target.value),className:`${pe} mt-2`})]}),o.jsxs("label",{className:"text-sm text-stone-400",children:["التكلفة بالجنيه ",o.jsx("span",{className:"text-stone-600",children:"(لحساب الأرباح)"}),o.jsx("input",{min:"0",step:"0.01",type:"number",value:u.costPrice,onChange:_=>p("costPrice",_.target.value),className:`${pe} mt-2`,placeholder:"تكلفة الشراء/التشغيل"}),N]}),o.jsxs("label",{className:"text-sm text-stone-400",children:["السعر قبل الخصم ",o.jsx("span",{className:"text-stone-600",children:"(اختياري)"}),o.jsx("input",{min:"0",step:"0.01",type:"number",value:u.oldPrice,onChange:_=>p("oldPrice",_.target.value),className:`${pe} mt-2`}),b>0&&o.jsxs("span",{className:"mt-1 block text-xs text-emerald-300",children:["خصم ",b,"٪ سيظهر للعميل"]})]}),o.jsxs("label",{className:"text-sm text-stone-400",children:["التقييم من ٥",o.jsx("input",{min:"0",max:"5",step:"0.5",type:"number",value:u.rating,onChange:_=>p("rating",_.target.value),className:`${pe} mt-2`})]}),o.jsxs("label",{className:"text-sm text-stone-400",children:["شارة المنتج ",o.jsx("span",{className:"text-stone-600",children:"(اختياري)"}),o.jsx("input",{value:u.badge,onChange:_=>p("badge",_.target.value),className:`${pe} mt-2`,placeholder:"جديد، الأكثر مبيعاً، حصري..."})]})]}),o.jsxs("div",{className:"text-sm text-stone-400",children:["صورة المنتج",o.jsxs("div",{className:"mt-2 flex flex-col gap-3 sm:flex-row",children:[o.jsx("input",{value:u.image.startsWith("data:")?"(صورة مرفوعة)":u.image,onChange:_=>{p("image",_.target.value),g(!1)},className:pe,placeholder:"/images/product.png أو رابط صورة",dir:"ltr",readOnly:u.image.startsWith("data:")}),o.jsxs("label",{className:`${St} shrink-0 cursor-pointer`,children:["رفع صورة",o.jsx("input",{type:"file",accept:"image/*",className:"sr-only",onChange:_=>y(_.target.files?.[0]??null)})]}),u.image&&o.jsx("button",{type:"button",onClick:()=>p("image",""),className:"text-xs text-stone-500 hover:text-red-300",children:"إزالة"})]}),u.image&&o.jsxs("div",{className:"mt-3 flex items-center gap-4 rounded-xl border border-white/[0.07] bg-black/20 p-3",children:[f?o.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-lg border border-red-400/20 text-red-300",children:o.jsx(fu,{className:"h-5 w-5"})}):o.jsx("img",{src:u.image,alt:"",className:"h-16 w-16 rounded-lg object-cover",onError:()=>g(!0)}),o.jsx("div",{className:"flex-1 text-xs text-stone-500",children:f?"تعذّر تحميل الصورة من هذا الرابط.":"معاينة صورة المنتج"})]})]}),o.jsxs("label",{className:"block text-sm text-stone-400",children:["وصف المنتج",o.jsx("textarea",{required:!0,rows:3,value:u.desc,onChange:_=>p("desc",_.target.value),className:`${pe} mt-2 resize-y`})]}),o.jsxs("div",{className:"rounded-xl border border-white/[0.07] bg-black/20 p-4",children:[o.jsxs("p",{className:"mb-4 text-sm font-bold text-stone-200",children:["تفاصيل صفحة المنتج ",o.jsx("span",{className:"text-xs font-normal text-stone-600",children:"(اختياري — تظهر للعميل عند «عرض المنتج»)"})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("label",{className:"block text-sm text-stone-400",children:["الحجم / الوزن",o.jsx("input",{value:u.size,onChange:_=>p("size",_.target.value),className:`${pe} mt-2`,placeholder:"مثال: 30 مل"})]}),o.jsxs("label",{className:"block text-sm text-stone-400",children:["المكونات",o.jsx("textarea",{rows:2,value:u.ingredients,onChange:_=>p("ingredients",_.target.value),className:`${pe} mt-2 resize-y`,placeholder:"مثال: زيت الجوجوبا، فيتامين C..."})]}),o.jsxs("label",{className:"block text-sm text-stone-400",children:["طريقة الاستخدام",o.jsx("textarea",{rows:2,value:u.howToUse,onChange:_=>p("howToUse",_.target.value),className:`${pe} mt-2 resize-y`,placeholder:"مثال: ضعي ٣ قطرات صباحاً ومساءً..."})]})]})]}),o.jsx(Vj,{checked:u.isActive,onChange:_=>p("isActive",_),label:"عرض المنتج في المتجر",hint:"إيقاف العرض يخفي المنتج دون حذفه."}),o.jsxs("div",{className:"flex flex-col-reverse gap-3 border-t border-white/[0.07] pt-5 sm:flex-row sm:justify-end",children:[o.jsx("button",{type:"button",onClick:i,className:St,children:"إلغاء"}),o.jsxs("button",{type:"submit",className:Rt,children:[o.jsx(ds,{className:"h-4 w-4"}),t?"حفظ التعديلات":"إضافة المنتج"]})]})]})})}const Cv=[{label:"كل المنتجات",value:"/products"},{label:"العناية بالبشرة",value:"/products?category=العناية بالبشرة"},{label:"العناية بالشعر",value:"/products?category=العناية بالشعر"},{label:"العناية بالجسم",value:"/products?category=العناية بالجسم"},{label:"العطور",value:"/products?category=العطور"},{label:"قسم قصتنا",value:"#about"},{label:"قسم لماذا جوفيل",value:"#features"},{label:"قسم التواصل",value:"#contact"}];function UO({banners:t,onSave:e,onDelete:s,onMove:i,newId:l}){const[u,d]=A.useState({open:!1,banner:null}),[f,g]=A.useState(null),p=t.filter(x=>x.isActive).length;return o.jsxs(o.Fragment,{children:[o.jsx(Fs,{title:"بانر العروض",subtitle:`${t.length} شريحة · ${p} ظاهرة في المتجر · الترتيب هنا هو ترتيب العرض`,action:o.jsxs("button",{onClick:()=>d({open:!0,banner:null}),className:Rt,children:[o.jsx(Is,{className:"h-4 w-4"})," إضافة شريحة"]})}),o.jsxs("div",{className:"mb-5 rounded-xl border border-[#d4af37]/15 bg-[#d4af37]/[0.04] px-4 py-3 text-xs leading-6 text-stone-400",children:["البانر يظهر بعرض الصفحة أعلى المتجر ويتنقل تلقائياً بين الشرائح الظاهرة. أفضل مقاس للصورة ",o.jsx("span",{className:"text-[#e7c44e]",children:"1920×720"})," (عرضي). على الموبايل تُقص الصورة من الجوانب فضعي العنصر المهم في المنتصف."]}),o.jsx("div",{className:`${Ye} overflow-hidden`,children:t.length===0?o.jsx(Oa,{icon:Bc,title:"مفيش شرائح بعد",description:"أضيفي أول شريحة وهتظهر فوراً في أعلى المتجر.",action:o.jsxs("button",{onClick:()=>d({open:!0,banner:null}),className:Rt,children:[o.jsx(Is,{className:"h-4 w-4"})," إضافة شريحة"]})}):o.jsx("ul",{className:"divide-y divide-white/[0.05]",children:t.map((x,y)=>o.jsxs("li",{className:`flex flex-col gap-4 p-4 sm:flex-row sm:items-center ${x.isActive?"":"opacity-60"}`,children:[o.jsxs("div",{className:"relative h-24 w-full shrink-0 overflow-hidden rounded-xl border border-white/[0.07] bg-black sm:h-20 sm:w-40",children:[x.image?o.jsx("img",{src:x.image,alt:"",className:"h-full w-full object-cover"}):o.jsx("div",{className:"flex h-full items-center justify-center text-stone-600",children:o.jsx(Bc,{className:"h-6 w-6"})}),o.jsx("span",{className:"absolute right-2 top-2 rounded-full bg-black/70 px-2 py-0.5 text-[10px] font-bold text-[#e7c44e]",children:y+1})]}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate font-bold text-stone-200",children:x.title||o.jsx("span",{className:"text-stone-600",children:"بدون عنوان"})}),o.jsx("p",{className:"mt-0.5 truncate text-xs text-stone-500",children:x.subtitle}),o.jsx("p",{className:"mt-1 truncate text-[11px] text-stone-600",dir:"ltr",children:x.buttonText?`${x.buttonText} → ${x.buttonLink||"—"}`:"بدون زر"})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[o.jsxs("button",{onClick:()=>e({...x,isActive:!x.isActive}),className:`inline-flex items-center gap-1.5 rounded-full border px-2.5 py-1 text-xs font-bold ${x.isActive?"border-emerald-400/20 bg-emerald-400/10 text-emerald-300":"border-white/10 text-stone-500"}`,children:[x.isActive?o.jsx(Cl,{className:"h-3 w-3"}):o.jsx(qm,{className:"h-3 w-3"}),x.isActive?"ظاهر":"مخفي"]}),o.jsx("button",{onClick:()=>i(x.id,-1),disabled:y===0,className:"rounded-lg border border-white/[0.08] p-2 text-stone-400 hover:text-[#e7c44e] disabled:opacity-30","aria-label":"تحريك لأعلى",children:o.jsx(Ik,{className:"h-4 w-4"})}),o.jsx("button",{onClick:()=>i(x.id,1),disabled:y===t.length-1,className:"rounded-lg border border-white/[0.08] p-2 text-stone-400 hover:text-[#e7c44e] disabled:opacity-30","aria-label":"تحريك لأسفل",children:o.jsx(qk,{className:"h-4 w-4"})}),o.jsx("button",{onClick:()=>d({open:!0,banner:x}),className:"rounded-lg border border-white/[0.08] p-2 text-stone-400 hover:border-[#d4af37]/30 hover:text-[#e7c44e]","aria-label":"تعديل",children:o.jsx(N2,{className:"h-4 w-4"})}),o.jsx("button",{onClick:()=>g(x),className:"rounded-lg border border-white/[0.08] p-2 text-stone-500 hover:border-red-400/20 hover:text-red-300","aria-label":"حذف",children:o.jsx(En,{className:"h-4 w-4"})})]})]},x.id))})}),o.jsxs(kt,{children:[u.open&&o.jsx(LO,{banner:u.banner,nextOrder:t.length,newId:l,onClose:()=>d({open:!1,banner:null}),onSave:x=>{e(x),d({open:!1,banner:null})}},u.banner?.id??"new"),f&&o.jsxs(Ma,{title:"حذف الشريحة",eyebrow:"تأكيد",onClose:()=>g(null),maxWidth:"max-w-md",children:[o.jsxs("p",{className:"text-sm leading-7 text-stone-300",children:["حذف شريحة «",f.title||"بدون عنوان","» نهائياً؟ لو حابة تخفيها مؤقتاً استخدمي زر «الظهور»."]}),o.jsxs("div",{className:"mt-6 flex justify-end gap-2",children:[o.jsx("button",{onClick:()=>g(null),className:St,children:"إلغاء"}),o.jsxs("button",{onClick:()=>{s(f.id),g(null)},className:Ul,children:[o.jsx(En,{className:"h-4 w-4"})," حذف"]})]})]},"del")]})]})}function LO({banner:t,nextOrder:e,newId:s,onClose:i,onSave:l}){const[u,d]=A.useState(t??{id:s(),image:"",title:"",subtitle:"",buttonText:"تسوّقي الآن",buttonLink:"/products",isActive:!0,order:e,createdAt:new Date().toISOString()}),[f,g]=A.useState(!1),p=(b,w)=>d(j=>({...j,[b]:w})),x=b=>{if(!b)return;if(b.size>2*1024*1024){alert("حجم الصورة كبير. استخدمي صورة أقل من 2MB أو ضعي رابطاً مباشراً.");return}const w=new FileReader;w.onload=()=>{p("image",String(w.result)),g(!1)},w.readAsDataURL(b)},y=b=>{if(b.preventDefault(),!u.image.trim()){alert("الصورة مطلوبة.");return}l({...u,title:u.title.trim(),subtitle:u.subtitle.trim(),buttonText:u.buttonText.trim(),buttonLink:u.buttonLink.trim()})};return o.jsx(Ma,{title:t?"تعديل الشريحة":"شريحة جديدة",eyebrow:"بانر العروض",onClose:i,maxWidth:"max-w-2xl",children:o.jsxs("form",{onSubmit:y,className:"space-y-5",children:[o.jsxs("div",{className:"relative aspect-[21/8] overflow-hidden rounded-xl border border-white/[0.07] bg-black",children:[u.image&&!f?o.jsx("img",{src:u.image,alt:"",className:"h-full w-full object-cover",onError:()=>g(!0)}):o.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 text-stone-600",children:[f?o.jsx(fu,{className:"h-6 w-6 text-red-300"}):o.jsx(Bc,{className:"h-7 w-7"}),o.jsx("span",{className:"text-xs",children:f?"تعذّر تحميل الصورة":"معاينة البانر"})]}),u.image&&!f&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"absolute inset-0 bg-gradient-to-l from-black/80 via-black/35 to-transparent"}),o.jsx("div",{className:"absolute inset-0 flex items-center",children:o.jsxs("div",{className:"max-w-[60%] px-6 text-right",children:[u.subtitle&&o.jsx("p",{className:"mb-1 text-[9px] font-bold tracking-[0.2em] text-[#d4af37] sm:text-[10px]",children:u.subtitle}),u.title&&o.jsx("p",{className:"text-sm font-black leading-snug text-white sm:text-xl",children:u.title}),u.buttonText&&o.jsx("span",{className:"mt-2 inline-block rounded-full bg-[#d4af37] px-3 py-1 text-[10px] font-bold text-black sm:text-xs",children:u.buttonText})]})})]})]}),o.jsxs("div",{className:"text-sm text-stone-400",children:["صورة البانر ",o.jsx("span",{className:"text-red-300",children:"*"}),o.jsxs("div",{className:"mt-2 flex flex-col gap-3 sm:flex-row",children:[o.jsx("input",{value:u.image.startsWith("data:")?"(صورة مرفوعة)":u.image,onChange:b=>{p("image",b.target.value),g(!1)},className:pe,placeholder:"/images/banner.jpg أو رابط صورة",dir:"ltr",readOnly:u.image.startsWith("data:")}),o.jsxs("label",{className:`${St} shrink-0 cursor-pointer`,children:["رفع صورة",o.jsx("input",{type:"file",accept:"image/*",className:"sr-only",onChange:b=>x(b.target.files?.[0]??null)})]}),u.image&&o.jsx("button",{type:"button",onClick:()=>p("image",""),className:"text-xs text-stone-500 hover:text-red-300",children:"إزالة"})]})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("label",{className:"text-sm text-stone-400 sm:col-span-2",children:["العنوان الرئيسي",o.jsx("input",{value:u.title,onChange:b=>p("title",b.target.value),className:`${pe} mt-2`,placeholder:"مثال: خصم ٣٠٪ على السيروم"})]}),o.jsxs("label",{className:"text-sm text-stone-400 sm:col-span-2",children:["سطر صغير فوق العنوان ",o.jsx("span",{className:"text-stone-600",children:"(اختياري)"}),o.jsx("input",{value:u.subtitle,onChange:b=>p("subtitle",b.target.value),className:`${pe} mt-2`,placeholder:"مثال: عرض لفترة محدودة"})]}),o.jsxs("label",{className:"text-sm text-stone-400",children:["نص الزر ",o.jsx("span",{className:"text-stone-600",children:"(اتركيه فارغاً لإخفاء الزر)"}),o.jsx("input",{value:u.buttonText,onChange:b=>p("buttonText",b.target.value),className:`${pe} mt-2`,placeholder:"تسوّقي الآن"})]}),o.jsxs("label",{className:"text-sm text-stone-400",children:["وجهة الزر",o.jsx("input",{list:"banner-links",value:u.buttonLink,onChange:b=>p("buttonLink",b.target.value),className:`${pe} mt-2`,placeholder:"/products",dir:"ltr"}),o.jsx("datalist",{id:"banner-links",children:Cv.map(b=>o.jsx("option",{value:b.value,children:b.label},b.value))})]})]}),o.jsx("div",{className:"flex flex-wrap gap-2",children:Cv.map(b=>o.jsx("button",{type:"button",onClick:()=>p("buttonLink",b.value),className:`rounded-full border px-3 py-1.5 text-xs transition ${u.buttonLink===b.value?"border-[#d4af37] bg-[#d4af37]/10 text-[#e7c44e]":"border-white/10 text-stone-400 hover:border-[#d4af37]/40"}`,children:b.label},b.value))}),o.jsx(Vj,{checked:u.isActive,onChange:b=>p("isActive",b),label:"عرض الشريحة في المتجر",hint:"الإخفاء يبقيها محفوظة بدون ظهور."}),o.jsxs("div",{className:"flex flex-col-reverse gap-3 border-t border-white/[0.07] pt-5 sm:flex-row sm:justify-end",children:[o.jsx("button",{type:"button",onClick:i,className:St,children:"إلغاء"}),o.jsxs("button",{type:"submit",className:Rt,children:[o.jsx(ds,{className:"h-4 w-4"}),t?"حفظ التعديلات":"إضافة الشريحة"]})]})]})})}function zO({customers:t,orders:e,subscribers:s,onRemoveSubscriber:i,onOpenOrder:l}){const[u,d]=A.useState("customers"),[f,g]=A.useState(""),[p,x]=A.useState(null),y=A.useMemo(()=>{const T=f.trim().toLowerCase();return T?t.filter(F=>`${F.name} ${F.phone} ${F.email} ${F.city}`.toLowerCase().includes(T)):t},[t,f]),b=A.useMemo(()=>{const T=f.trim().toLowerCase();return T?s.filter(F=>F.email.includes(T)):s},[s,f]),w=t.reduce((T,F)=>T+F.totalSpent,0),j=t.length?w/t.length:0,N=t.filter(T=>T.ordersCount>1).length,_=t.slice(0,3),k=p?e.filter(T=>(T.phone||T.email||T.customerName).trim().toLowerCase()===p.key):[],R=()=>Sl(`juvel-customers-${new Date().toISOString().slice(0,10)}.csv`,["الاسم","الموبايل","البريد","المدينة","عدد الطلبات","إجمالي الإنفاق","أول طلب","آخر طلب"],t.map(T=>[T.name,T.phone,T.email,T.city,T.ordersCount,T.totalSpent,new Date(T.firstOrderAt).toLocaleDateString("ar-EG"),new Date(T.lastOrderAt).toLocaleDateString("ar-EG")])),M=()=>Sl(`juvel-newsletter-${new Date().toISOString().slice(0,10)}.csv`,["البريد","تاريخ الاشتراك"],s.map(T=>[T.email,new Date(T.createdAt).toLocaleString("ar-EG")]));return o.jsxs(o.Fragment,{children:[o.jsx(Fs,{title:"العملاء",subtitle:"تعرّفي على عملائك الأكثر ولاءً وتابعي قائمة النشرة البريدية",action:o.jsxs("button",{onClick:u==="customers"?R:M,disabled:u==="customers"?!t.length:!s.length,className:"inline-flex items-center justify-center gap-2 rounded-xl border border-white/10 px-4 py-3 text-sm font-bold text-stone-300 transition hover:border-[#d4af37]/40 hover:text-[#e7c44e] disabled:cursor-not-allowed disabled:opacity-40",children:[o.jsx(Al,{className:"h-4 w-4"})," تصدير"]})}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[o.jsx(Tt,{label:"إجمالي العملاء",value:String(t.length),note:"عملاء لديهم طلب غير ملغي",icon:Ea,accent:"bg-[#d4af37]/10 text-[#e7c44e]"}),o.jsx(Tt,{label:"عملاء متكررون",value:String(N),note:t.length?`${Math.round(N/t.length*100)}٪ من العملاء`:"—",icon:Ob,accent:"bg-emerald-400/10 text-emerald-300"}),o.jsx(Tt,{label:"متوسط إنفاق العميل",value:fe(j),note:"القيمة الدائمة للعميل",icon:Ea,accent:"bg-violet-400/10 text-violet-300"}),o.jsx(Tt,{label:"مشتركو النشرة",value:String(s.length),note:"بريد إلكتروني مسجّل",icon:Db,accent:"bg-sky-400/10 text-sky-300"})]}),_.length>0&&o.jsxs("section",{className:`${Ye} mt-5 p-5`,children:[o.jsxs("h2",{className:"mb-4 flex items-center gap-2 font-extrabold text-stone-100",children:[o.jsx(Ob,{className:"h-4 w-4 text-[#d4af37]"})," كبار العملاء"]}),o.jsx("div",{className:"grid gap-3 sm:grid-cols-3",children:_.map((T,F)=>o.jsxs("button",{onClick:()=>x(T),className:"rounded-xl border border-white/[0.07] bg-black/20 p-4 text-right transition hover:border-[#d4af37]/40",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-gradient-to-br from-[#e7c44e] to-[#80621c] text-sm font-black text-[#171208]",children:F+1}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"truncate font-bold text-stone-200",children:T.name}),o.jsxs("p",{className:"text-xs text-stone-600",children:[T.ordersCount," طلبات"]})]})]}),o.jsx("p",{className:"mt-3 text-lg font-black text-[#e7c44e]",children:fe(T.totalSpent)})]},T.key))})]}),o.jsxs("div",{className:"mt-5 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[o.jsx("div",{className:"flex gap-2",children:["customers","subscribers"].map(T=>o.jsx("button",{onClick:()=>d(T),className:`rounded-full border px-4 py-2 text-sm font-bold transition ${u===T?"border-[#d4af37] bg-[#d4af37] text-[#100d07]":"border-white/10 text-stone-400 hover:text-stone-200"}`,children:T==="customers"?`العملاء (${t.length})`:`النشرة البريدية (${s.length})`},T))}),o.jsxs("label",{className:"relative sm:w-80",children:[o.jsx(Pi,{className:"absolute right-4 top-1/2 h-4 w-4 -translate-y-1/2 text-stone-600"}),o.jsx("input",{value:f,onChange:T=>g(T.target.value),className:`${pe} pr-11`,placeholder:"بحث..."})]})]}),o.jsx("div",{className:`${Ye} mt-4 overflow-hidden`,children:u==="customers"?y.length===0?o.jsx(Oa,{icon:Ea,title:t.length?"لا توجد نتائج":"لسه مفيش عملاء",description:t.length?"جرّبي كلمة أخرى.":"هيظهروا هنا تلقائياً مع أول طلب."}):o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[820px] text-right text-sm",children:[o.jsx("thead",{className:"border-b border-white/[0.06] bg-white/[0.02] text-xs text-stone-600",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-5 py-4 font-medium",children:"العميل"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"المدينة"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"الطلبات"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"إجمالي الإنفاق"}),o.jsx("th",{className:"px-4 py-4 font-medium",children:"آخر طلب"}),o.jsx("th",{className:"px-5 py-4 text-left font-medium",children:"تواصل"})]})}),o.jsx("tbody",{children:y.map(T=>o.jsxs("tr",{className:"cursor-pointer border-b border-white/[0.045] last:border-0 hover:bg-white/[0.015]",onClick:()=>x(T),children:[o.jsxs("td",{className:"px-5 py-4",children:[o.jsx("p",{className:"font-bold text-stone-200",children:T.name}),o.jsx("p",{className:"mt-1 text-xs text-stone-600",dir:"ltr",children:T.phone})]}),o.jsx("td",{className:"px-4 py-4 text-stone-400",children:T.city}),o.jsx("td",{className:"px-4 py-4",children:o.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-bold ${T.ordersCount>1?"bg-emerald-400/10 text-emerald-300":"bg-white/[0.05] text-stone-400"}`,children:T.ordersCount})}),o.jsx("td",{className:"px-4 py-4 font-bold text-stone-200",children:fe(T.totalSpent)}),o.jsx("td",{className:"px-4 py-4 text-stone-500",children:Bj(T.lastOrderAt)}),o.jsx("td",{className:"px-5 py-4",onClick:F=>F.stopPropagation(),children:o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx("a",{href:`tel:${T.phone}`,className:"rounded-lg border border-white/[0.08] p-2 text-stone-400 hover:text-emerald-300","aria-label":"اتصال",children:o.jsx(Im,{className:"h-4 w-4"})}),T.email&&o.jsx("a",{href:`mailto:${T.email}`,className:"rounded-lg border border-white/[0.08] p-2 text-stone-400 hover:text-[#e7c44e]","aria-label":"بريد",children:o.jsx(Hm,{className:"h-4 w-4"})})]})})]},T.key))})]})}):b.length===0?o.jsx(Oa,{icon:Db,title:"لا يوجد مشتركون بعد",description:"كل من يشترك في النشرة من الموقع يظهر هنا."}):o.jsx("ul",{className:"divide-y divide-white/[0.05]",children:b.map(T=>o.jsxs("li",{className:"flex items-center justify-between gap-3 px-5 py-3.5",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm text-stone-200",dir:"ltr",children:T.email}),o.jsx("p",{className:"text-xs text-stone-600",children:Gs(T.createdAt,!0)})]}),o.jsx("button",{onClick:()=>i(T.id),className:"rounded-lg p-2 text-stone-600 hover:text-red-300","aria-label":"إزالة",children:o.jsx(En,{className:"h-4 w-4"})})]},T.id))})}),o.jsx(kt,{children:p&&o.jsxs(Ma,{title:p.name,eyebrow:"ملف العميل",onClose:()=>x(null),children:[o.jsxs("div",{className:"grid gap-3 rounded-xl border border-white/[0.07] bg-black/20 p-4 sm:grid-cols-2",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"الموبايل"}),o.jsx("a",{href:`tel:${p.phone}`,className:"mt-1 block text-[#e7c44e]",dir:"ltr",children:p.phone})]}),p.email&&o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"البريد"}),o.jsx("p",{className:"mt-1 break-all text-stone-200",dir:"ltr",children:p.email})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"المدينة"}),o.jsx("p",{className:"mt-1 text-stone-200",children:p.city})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"عميل منذ"}),o.jsx("p",{className:"mt-1 text-stone-200",children:Gs(p.firstOrderAt)})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"إجمالي الإنفاق"}),o.jsx("p",{className:"mt-1 text-lg font-black text-[#e7c44e]",children:fe(p.totalSpent)})]}),o.jsxs("div",{children:[o.jsx("p",{className:"text-xs text-stone-600",children:"متوسط الطلب"}),o.jsx("p",{className:"mt-1 text-stone-200",children:fe(p.totalSpent/p.ordersCount)})]})]}),o.jsxs("h3",{className:"mb-3 mt-6 text-sm font-bold text-stone-200",children:["الطلبات (",k.length,")"]}),o.jsx("ul",{className:"space-y-2",children:k.map(T=>o.jsx("li",{children:o.jsxs("button",{onClick:()=>{x(null),l(T.id)},className:"flex w-full items-center justify-between rounded-xl border border-white/[0.06] px-4 py-3 text-right transition hover:border-[#d4af37]/40",children:[o.jsxs("span",{children:[o.jsx("span",{className:"block font-bold text-[#e7c44e]",children:T.id}),o.jsx("span",{className:"text-xs text-stone-600",children:Gs(T.createdAt,!0)})]}),o.jsxs("span",{className:"flex items-center gap-3",children:[o.jsx(Wm,{status:T.status}),o.jsx("span",{className:"font-bold text-stone-200",children:fe(T.total)})]})]})},T.id))})]},p.key)})]})}const PO=["أحد","اثنين","ثلاثاء","أربعاء","خميس","جمعة","سبت"],$O=Array.from({length:24},(t,e)=>`${e}`);function BO({orders:t,products:e}){const s=A.useMemo(()=>{const y=new Set;for(const b of t){const w=new Date(b.createdAt);y.add(`${w.getFullYear()}-${String(w.getMonth()+1).padStart(2,"0")}`)}return y.add(`${new Date().getFullYear()}-${String(new Date().getMonth()+1).padStart(2,"0")}`),[...y].sort().reverse()},[t]),[i,l]=A.useState(()=>{const y=new Date;return`${y.getFullYear()}-${String(y.getMonth()+1).padStart(2,"0")}`}),u=y=>new Intl.DateTimeFormat("ar-EG",{month:"long",year:"numeric"}).format(new Date(Number(y.slice(0,4)),Number(y.slice(5,7))-1,1)),d=A.useMemo(()=>t.filter(b=>{const w=new Date(b.createdAt);return`${w.getFullYear()}-${String(w.getMonth()+1).padStart(2,"0")}`===i}).sort((b,w)=>new Date(w.createdAt).getTime()-new Date(b.createdAt).getTime()).map(b=>{const w=b.items.reduce((_,k)=>_+Mj(k.productId,k.price,e)*k.quantity,0),j=b.items.map(_=>`${_.name} ×${_.quantity}`).join("، "),N=b.status==="ملغي";return{order:b,cost:N?0:w,profit:N?0:b.subtotal-w,itemsDesc:j,cancelled:N}}),[t,i,e]),f=A.useMemo(()=>{const y=d.filter(b=>!b.cancelled);return{orders:d.length,cancelled:d.length-y.length,revenue:y.reduce((b,w)=>b+w.order.total,0),productRevenue:y.reduce((b,w)=>b+w.order.subtotal,0),cost:y.reduce((b,w)=>b+w.cost,0),profit:y.reduce((b,w)=>b+w.profit,0)}},[d]),g=f.productRevenue?Math.round(f.profit/f.productRevenue*100):0,p=u(i),x=()=>{Sl(`juvel-report-${i}.csv`,["رقم الطلب","التاريخ","العميل","الموبايل","المحافظة","المنتجات","عدد القطع","المجموع","الشحن","الإجمالي","التكلفة","صافي الربح","الحالة"],d.map(y=>[y.order.id,new Date(y.order.createdAt).toLocaleString("ar-EG"),y.order.customerName,y.order.phone,y.order.city,y.itemsDesc,y.order.items.reduce((b,w)=>b+w.quantity,0),y.order.subtotal,y.order.shipping,y.order.total,y.cancelled?"ملغي":y.cost,y.cancelled?"ملغي":y.profit,y.order.status]))};return o.jsxs("section",{className:`${Ye} mb-6 overflow-hidden`,children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 border-b border-white/[0.06] px-5 py-4 sm:px-6",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-base font-extrabold text-stone-100",children:"التقرير الشهري المفصل"}),o.jsxs("p",{className:"mt-0.5 text-xs text-stone-600",children:[p," — كل أوردر بالإيراد والتكلفة وصافي الربح"]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("select",{value:i,onChange:y=>l(y.target.value),className:`${pe} min-w-40 appearance-none py-2.5 text-xs`,children:s.map(y=>o.jsx("option",{value:y,children:u(y)},y))}),o.jsxs("button",{type:"button",onClick:x,className:"inline-flex items-center gap-2 rounded-xl bg-[#d4af37] px-4 py-2.5 text-xs font-extrabold text-[#100d07] transition hover:bg-[#e7c44e]",children:[o.jsx(Al,{className:"h-4 w-4"}),"تصدير إكسيل"]})]})]}),o.jsx("div",{className:"grid gap-3 px-5 py-4 sm:grid-cols-3 lg:grid-cols-6 sm:px-6",children:[["الأوردرات",String(f.orders)],["الملغاة",String(f.cancelled)],["الإيرادات",fe(f.revenue)],["التكلفة",fe(f.cost)],["صافي الربح",fe(f.profit)],["هامش الربح",`${g}٪`]].map(([y,b])=>o.jsxs("div",{className:"rounded-xl border border-white/[0.07] bg-black/20 px-3 py-2.5",children:[o.jsx("p",{className:"text-[11px] text-stone-500",children:y}),o.jsx("p",{className:`mt-1 text-sm font-black ${y==="صافي الربح"?"text-emerald-300":"text-stone-100"}`,children:b})]},y))}),d.length===0?o.jsx("p",{className:"px-6 pb-6 text-sm text-stone-600",children:"لا توجد أوردرات في هذا الشهر."}):o.jsx("div",{className:"overflow-x-auto",children:o.jsxs("table",{className:"w-full min-w-[900px] text-right text-sm",children:[o.jsx("thead",{className:"text-xs text-stone-600",children:o.jsxs("tr",{children:[o.jsx("th",{className:"px-5 py-3 font-medium sm:px-6",children:"رقم الطلب"}),o.jsx("th",{className:"px-4 py-3 font-medium",children:"التاريخ"}),o.jsx("th",{className:"px-4 py-3 font-medium",children:"العميل"}),o.jsx("th",{className:"px-4 py-3 font-medium",children:"المحافظة"}),o.jsx("th",{className:"px-4 py-3 font-medium",children:"المنتجات"}),o.jsx("th",{className:"px-4 py-3 font-medium",children:"الإجمالي"}),o.jsx("th",{className:"px-4 py-3 font-medium",children:"التكلفة"}),o.jsx("th",{className:"px-4 py-3 font-medium",children:"صافي الربح"}),o.jsx("th",{className:"px-5 py-3 font-medium sm:px-6",children:"الحالة"})]})}),o.jsx("tbody",{children:d.map(({order:y,cost:b,profit:w,itemsDesc:j,cancelled:N})=>o.jsxs("tr",{className:"border-t border-white/[0.05]",children:[o.jsx("td",{className:"px-5 py-3 font-bold text-[#e7c44e] sm:px-6",children:y.id}),o.jsx("td",{className:"px-4 py-3 text-stone-500",children:new Date(y.createdAt).toLocaleDateString("ar-EG")}),o.jsx("td",{className:"px-4 py-3 text-stone-300",children:y.customerName}),o.jsx("td",{className:"px-4 py-3 text-stone-400",children:y.city}),o.jsx("td",{className:"px-4 py-3 text-[12.5px] text-stone-400",children:j}),o.jsx("td",{className:"px-4 py-3 font-bold text-stone-200",children:N?"—":fe(y.total)}),o.jsx("td",{className:"px-4 py-3 text-stone-400",children:N?"—":fe(b)}),o.jsx("td",{className:`px-4 py-3 font-black ${N?"text-stone-600":w>=0?"text-emerald-300":"text-red-300"}`,children:N?"ملغي":fe(w)}),o.jsx("td",{className:"px-5 py-3 sm:px-6",children:o.jsx("span",{className:`rounded-full px-2 py-0.5 text-[11px] ${N?"bg-red-400/10 text-red-300":"bg-emerald-400/10 text-emerald-300"}`,children:y.status})})]},y.id))})]})})]})}function VO({orders:t,products:e}){const[s,i]=A.useState(30),l=A.useMemo(()=>{const _=new Date(vu().getTime()-(s-1)*864e5);return t.filter(k=>new Date(k.createdAt)>=_)},[t,s]),u=A.useMemo(()=>Et(l),[l]),d=A.useMemo(()=>am(Et(t),s),[t,s]),f=en(u),g=u.length?f/u.length:0,p=u.reduce((_,k)=>_+k.items.reduce((R,M)=>R+M.quantity,0),0),x=A.useMemo(()=>s===7?im(l,7):s===30?im(l,30):s===90?xO(l,13):yO(l,12),[l,s]),y=Uj(u),b=bO(u,e),w=SO(u),j=vO(l),N=Jm(e);return o.jsxs(o.Fragment,{children:[o.jsx(Fs,{title:"المبيعات والتقارير",subtitle:"تحليل شامل لأداء المتجر خلال الفترة المحددة",action:o.jsxs("label",{className:"relative",children:[o.jsxs("select",{value:s,onChange:_=>i(Number(_.target.value)),className:`${pe} min-w-44 appearance-none pl-10`,children:[o.jsx("option",{value:7,children:"آخر ٧ أيام"}),o.jsx("option",{value:30,children:"آخر ٣٠ يوم"}),o.jsx("option",{value:90,children:"آخر ٩٠ يوم"}),o.jsx("option",{value:365,children:"آخر ١٢ شهر"})]}),o.jsx(Gk,{className:"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-stone-500"}),o.jsx(El,{className:"pointer-events-none absolute left-9 top-1/2 hidden h-3 w-3 -translate-y-1/2 text-stone-600"})]})}),o.jsx(BO,{orders:t,products:e}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-4",children:[o.jsx(Tt,{label:"الإيرادات",value:fe(f),trend:d.change,icon:Hw,accent:"bg-[#d4af37]/10 text-[#e7c44e]"}),o.jsx(Tt,{label:"عدد الطلبات",value:String(u.length),trend:d.countChange,icon:Rl,accent:"bg-sky-400/10 text-sky-300"}),o.jsx(Tt,{label:"متوسط قيمة الطلب",value:fe(g),note:`${p} قطعة مباعة`,icon:Vm,accent:"bg-violet-400/10 text-violet-300"}),o.jsx(Tt,{label:"نسبة الإلغاء",value:`${Math.round(NO(l))}٪`,note:`${j.ملغي} طلب ملغي من ${l.length}`,icon:iE,accent:"bg-red-400/10 text-red-300"})]}),o.jsxs("section",{className:`${Ye} mt-5 p-5 sm:p-6`,children:[o.jsx("div",{className:"mb-4 flex items-center justify-between",children:o.jsxs("div",{children:[o.jsx("h2",{className:"font-extrabold text-stone-100",children:"الإيرادات بمرور الوقت"}),o.jsxs("p",{className:"mt-1 text-xs text-stone-600",children:[s===90?"كل عمود يمثل أسبوعاً":s===365?"كل عمود يمثل شهراً":"كل عمود يمثل يوماً"," · مرّري الماوس للتفاصيل"]})]})}),o.jsx(Pj,{data:x})]}),o.jsxs("div",{className:"mt-5 grid gap-5 xl:grid-cols-2",children:[o.jsxs("section",{className:`${Ye} p-5 sm:p-6`,children:[o.jsx("h2",{className:"mb-5 font-extrabold text-stone-100",children:"المنتجات الأعلى إيراداً"}),o.jsx(rm,{rows:y.slice(0,6).map(_=>({label:_.name,value:_.revenue,image:_.image,sub:`${_.quantity} قطعة`})),valueLabel:fe})]}),o.jsxs("section",{className:`${Ye} p-5 sm:p-6`,children:[o.jsx("h2",{className:"mb-5 font-extrabold text-stone-100",children:"المبيعات حسب التصنيف"}),b.length?o.jsx(kv,{slices:b.map((_,k)=>({label:_.category,value:Math.round(_.revenue),color:["#d4af37","#f0d87c","#9e7926","#e7c44e","#6b5a2b","#c9a84a"][k%6]}))}):o.jsx("p",{className:"py-8 text-center text-sm text-stone-600",children:"لا توجد بيانات بعد."})]})]}),o.jsxs("div",{className:"mt-5 grid gap-5 xl:grid-cols-3",children:[o.jsxs("section",{className:`${Ye} p-5 sm:p-6`,children:[o.jsx("h2",{className:"mb-5 font-extrabold text-stone-100",children:"حالة الطلبات"}),o.jsx(kv,{slices:[{label:"جديد",value:j.جديد,color:"#d4af37"},{label:"قيد التجهيز",value:j["قيد التجهيز"],color:"#f59e0b"},{label:"تم الشحن",value:j["تم الشحن"],color:"#38bdf8"},{label:"مكتمل",value:j.مكتمل,color:"#34d399"},{label:"ملغي",value:j.ملغي,color:"#f87171"}],size:140})]}),o.jsxs("section",{className:`${Ye} p-5 sm:p-6`,children:[o.jsx("h2",{className:"mb-5 font-extrabold text-stone-100",children:"المدن الأكثر طلباً"}),o.jsx(rm,{rows:w.slice(0,6).map(_=>({label:_.city,value:_.revenue,sub:`${_.count} طلب`})),valueLabel:fe})]}),o.jsxs("section",{className:`${Ye} p-5 sm:p-6`,children:[o.jsx("h2",{className:"mb-2 font-extrabold text-stone-100",children:"أوقات الذروة"}),o.jsx("p",{className:"mb-4 text-xs text-stone-600",children:"متى يطلب عملاؤك أكثر؟"}),o.jsx(Ev,{values:jO(u),labels:PO,caption:"حسب يوم الأسبوع"}),o.jsx("div",{className:"mt-5",children:o.jsx(Ev,{values:wO(u),labels:$O,caption:"حسب ساعة اليوم (٢٤ ساعة)"})})]})]}),o.jsxs("div",{className:"mt-5 grid gap-5 xl:grid-cols-2",children:[o.jsxs("section",{className:`${Ye} p-5 sm:p-6`,children:[o.jsxs("h2",{className:"mb-1 flex items-center gap-2 font-extrabold text-stone-100",children:[o.jsx(Ea,{className:"h-4 w-4 text-[#d4af37]"})," ولاء العملاء"]}),o.jsx("p",{className:"mb-5 text-xs text-stone-600",children:"خلال الفترة المحددة"}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-black/20 p-4",children:[o.jsx("p",{className:"text-xs text-stone-500",children:"عملاء متكررون"}),o.jsxs("p",{className:"mt-1 text-2xl font-black text-emerald-300",children:[Math.round(Lj(u)),"٪"]})]}),o.jsxs("div",{className:"rounded-xl border border-white/[0.06] bg-black/20 p-4",children:[o.jsx("p",{className:"text-xs text-stone-500",children:"عملاء فريدون"}),o.jsx("p",{className:"mt-1 text-2xl font-black text-stone-100",children:new Set(u.map(_=>(_.phone||_.email||_.customerName).trim().toLowerCase())).size})]})]})]}),o.jsxs("section",{className:`${Ye} p-5 sm:p-6`,children:[o.jsxs("h2",{className:"mb-1 flex items-center gap-2 font-extrabold text-stone-100",children:[o.jsx(hu,{className:"h-4 w-4 text-[#d4af37]"})," تنبيهات المخزون"]}),o.jsx("p",{className:"mb-4 text-xs text-stone-600",children:"منتجات تحتاج إعادة توفير (٥ قطع أو أقل)"}),N.length===0?o.jsx("p",{className:"py-6 text-center text-sm text-stone-600",children:"المخزون بخير."}):o.jsx("ul",{className:"space-y-2",children:N.slice(0,6).map(_=>o.jsxs("li",{className:"flex items-center gap-3 rounded-lg border border-white/[0.06] px-3 py-2",children:[o.jsx("img",{src:_.image,alt:"",className:"h-9 w-9 rounded-md object-cover"}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-stone-300",children:_.name}),o.jsxs("span",{className:`text-sm font-bold ${(_.stock??0)===0?"text-red-300":"text-amber-300"}`,children:[_.stock??0," قطعة"]})]},_.id))})]})]})]})}function Si(t){if(!t)return"";const e=t.trim();return e?e.startsWith("http://")||e.startsWith("https://")?e:`https://${e}`:""}function Rv(t){if(!t)return"";const e=t.trim();if(!e)return"";if(e.startsWith("http://")||e.startsWith("https://"))return e;const s=e.replace(/[^0-9]/g,"");return s.length>=8?`https://wa.me/${s}`:`https://${e}`}function qO({settings:t,onSave:e,onExportBackup:s,onImportBackup:i,onClearData:l}){const[u,d]=A.useState(t),[f,g]=A.useState(!1),[p,x]=A.useState(!1),[y,b]=A.useState(!1),[w,j]=A.useState(!1),[N,_]=A.useState(!1);A.useEffect(()=>d(t),[t]);const k=(G,me)=>{g(!1),d(xe=>({...xe,[G]:me}))},R=G=>{G.preventDefault();const me={...u,facebookUrl:Si(u.facebookUrl),instagramUrl:Si(u.instagramUrl),tiktokUrl:Si(u.tiktokUrl),whatsappUrl:Rv(u.whatsappUrl)};d(me),e(me),g(!0),window.setTimeout(()=>g(!1),2500)},M=()=>{const G={...u,facebookUrl:Si(u.facebookUrl),instagramUrl:Si(u.instagramUrl),tiktokUrl:Si(u.tiktokUrl),whatsappUrl:Rv(u.whatsappUrl)};d(G),e(G),x(!0),setTimeout(()=>x(!1),3e3)},T=()=>{e(u),b(!0),setTimeout(()=>b(!1),3e3)},F=()=>{e(u),j(!0),setTimeout(()=>j(!1),3e3)},I=()=>{e(u),_(!0),setTimeout(()=>_(!1),3e3)},E=()=>{const G={id:`faq-${Date.now()}`,question:"سؤال جديد؟",answer:"اكتبي الإجابة بالتفصيل هنا..."},me=[...u.faqs||[],G];k("faqs",me)},L=(G,me,xe)=>{const Ce=[...u.faqs||[]];Ce[G]={...Ce[G],[me]:xe},k("faqs",Ce)},q=G=>{const me=(u.faqs||[]).filter((xe,Ce)=>Ce!==G);k("faqs",me)};return o.jsxs(o.Fragment,{children:[o.jsx(Fs,{title:"إعدادات المتجر",subtitle:"محتوى الموقع، سياسات الشحن والاسترجاع، الأسئلة الشائعة، وروابط التواصل"}),o.jsxs("form",{onSubmit:R,className:"max-w-4xl space-y-5",children:[o.jsx(HO,{}),o.jsx(Bs,{icon:Vc,tone:"bg-[#d4af37]/10 text-[#d4af37]",title:"هوية ومحتوى الموقع",hint:"النصوص الرئيسية التي تظهر في واجهة المتجر.",children:o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsx(vt,{label:"اسم العلامة التجارية",children:o.jsx("input",{required:!0,value:u.siteName,onChange:G=>k("siteName",G.target.value),className:pe})}),o.jsx(vt,{label:"رسالة الشريط المتحرك",children:o.jsx("input",{required:!0,value:u.announcement,onChange:G=>k("announcement",G.target.value),className:pe})}),o.jsx(vt,{label:"العنوان الرئيسي",children:o.jsx("input",{required:!0,value:u.heroTitle,onChange:G=>k("heroTitle",G.target.value),className:pe})}),o.jsx(vt,{label:"الكلمات الذهبية في العنوان",children:o.jsx("input",{value:u.heroHighlight,onChange:G=>k("heroHighlight",G.target.value),className:pe})}),o.jsx(vt,{label:"وصف الصفحة الرئيسية",full:!0,children:o.jsx("textarea",{rows:3,required:!0,value:u.heroDescription,onChange:G=>k("heroDescription",G.target.value),className:`${pe} resize-y`})}),o.jsx(vt,{label:"خصم النشرة البريدية (%)",children:o.jsx("input",{required:!0,min:"0",max:"100",type:"number",value:u.newsletterDiscount,onChange:G=>k("newsletterDiscount",Number(G.target.value)),className:pe})})]})}),o.jsxs(Bs,{icon:hE,tone:"bg-pink-500/10 text-pink-400",title:"روابط التواصل الاجتماعي",hint:"الأيقونات في تذييل الموقع ستفتح هذه الروابط مباشرة عند النقر عليها.",children:[o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsx(vt,{label:"رابط صفحة فيسبوك (Facebook URL)",children:o.jsx("input",{type:"text",value:u.facebookUrl||"",placeholder:"https://facebook.com/yourpage أو اسم صفحتك",onChange:G=>k("facebookUrl",G.target.value),className:pe,dir:"ltr"})}),o.jsx(vt,{label:"رابط حساب إنستجرام (Instagram URL)",children:o.jsx("input",{type:"text",value:u.instagramUrl||"",placeholder:"https://instagram.com/youraccount أو اسم حسابك",onChange:G=>k("instagramUrl",G.target.value),className:pe,dir:"ltr"})}),o.jsx(vt,{label:"رابط حساب تيك توك (TikTok URL)",children:o.jsx("input",{type:"text",value:u.tiktokUrl||"",placeholder:"https://tiktok.com/@youraccount أو اسم حسابك",onChange:G=>k("tiktokUrl",G.target.value),className:pe,dir:"ltr"})}),o.jsx(vt,{label:"رابط أو رقم واتساب (WhatsApp URL / Number)",children:o.jsx("input",{type:"text",value:u.whatsappUrl||"",placeholder:"رقم الهاتف (مثلاً 01012345678) أو https://wa.me/...",onChange:G=>k("whatsappUrl",G.target.value),className:pe,dir:"ltr"})})]}),o.jsxs("div",{className:"mt-5 flex flex-wrap items-center gap-3 pt-4 border-t border-white/[0.07]",children:[o.jsxs("button",{type:"button",onClick:M,className:Rt,children:[o.jsx(ds,{className:"h-4 w-4"})," حفظ وتفعيل روابط التواصل الاجتماعي الآن"]}),p&&o.jsxs("span",{className:"inline-flex items-center gap-2 rounded-xl border border-emerald-500/25 bg-emerald-500/10 px-3.5 py-2 text-xs font-bold text-emerald-400",children:[o.jsx(Ir,{className:"h-4 w-4"})," تم الحفظ بنجاح! تم تحديث الروابط في أسفل الموقع."]})]})]}),o.jsxs(Bs,{icon:Ol,tone:"bg-sky-400/10 text-sky-300",title:"سياسة الشحن والتوصيل",hint:"تحدد رسوم الشحن وتظهر للعملاء في نافذة سياسة الشحن.",children:[o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 mb-4",children:[o.jsx(vt,{label:"رسوم الشحن بالجنيه",children:o.jsx("input",{required:!0,min:"0",type:"number",value:u.shippingFee,onChange:G=>k("shippingFee",Number(G.target.value)),className:pe})}),o.jsx(vt,{label:"الشحن المجاني للطلبات من",children:o.jsx("input",{required:!0,min:"0",type:"number",value:u.freeShippingAt,onChange:G=>k("freeShippingAt",Number(G.target.value)),className:pe})})]}),o.jsx(vt,{label:"نص سياسة الشحن والتوصيل (المعروض للعميل)",full:!0,children:o.jsx("textarea",{rows:4,required:!0,value:u.shippingPolicy||"",onChange:G=>k("shippingPolicy",G.target.value),className:`${pe} resize-y leading-relaxed`,placeholder:"اكتبي تفاصيل ومواعيد الشحن والتوصيل لمختلف المحافظات..."})}),o.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3 pt-3 border-t border-white/[0.07]",children:[o.jsxs("button",{type:"button",onClick:T,className:Rt,children:[o.jsx(ds,{className:"h-4 w-4"})," حفظ سياسة الشحن"]}),y&&o.jsxs("span",{className:"inline-flex items-center gap-2 rounded-xl border border-emerald-500/25 bg-emerald-500/10 px-3.5 py-2 text-xs font-bold text-emerald-400",children:[o.jsx(Ir,{className:"h-4 w-4"})," تم حفظ سياسة الشحن بنجاح!"]})]})]}),o.jsxs(Bs,{icon:Hf,tone:"bg-amber-400/10 text-amber-300",title:"سياسة الاسترجاع والاستبدال",hint:"الشروط والأحكام التي تظهر للعملاء عند النقر على سياسة الاسترجاع.",children:[o.jsx(vt,{label:"نص سياسة الاسترجاع والاستبدال",full:!0,children:o.jsx("textarea",{rows:5,required:!0,value:u.returnPolicy||"",onChange:G=>k("returnPolicy",G.target.value),className:`${pe} resize-y leading-relaxed`,placeholder:"اكتبي شروط استبدال واسترجاع المنتجات ومدة السماح وضوابط سلامة العبوة..."})}),o.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-3 pt-3 border-t border-white/[0.07]",children:[o.jsxs("button",{type:"button",onClick:F,className:Rt,children:[o.jsx(ds,{className:"h-4 w-4"})," حفظ سياسة الاسترجاع"]}),w&&o.jsxs("span",{className:"inline-flex items-center gap-2 rounded-xl border border-emerald-500/25 bg-emerald-500/10 px-3.5 py-2 text-xs font-bold text-emerald-400",children:[o.jsx(Ir,{className:"h-4 w-4"})," تم حفظ سياسة الاسترجاع بنجاح!"]})]})]}),o.jsx(Bs,{icon:Gw,tone:"bg-emerald-400/10 text-emerald-400",title:"الأسئلة الشائعة (FAQ)",hint:"تظهر في نافذة الأسئلة الشائعة في الموقع لمساعدة العميلات على الشراء.",children:o.jsxs("div",{className:"space-y-4",children:[u.faqs&&u.faqs.length>0?u.faqs.map((G,me)=>o.jsxs("div",{className:"rounded-2xl border border-white/[0.08] bg-white/[0.02] p-4 sm:p-5 space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between gap-3",children:[o.jsxs("span",{className:"text-xs font-bold text-[#e7c44e]",children:["السؤال رقم ",me+1]}),o.jsxs("button",{type:"button",onClick:()=>q(me),className:"inline-flex items-center gap-1 text-xs text-red-400 hover:text-red-300 transition",children:[o.jsx(En,{className:"h-3.5 w-3.5"}),"حذف هذا السؤال"]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"نص السؤال"}),o.jsx("input",{required:!0,value:G.question,onChange:xe=>L(me,"question",xe.target.value),placeholder:"اكتبي صيغة السؤال هنا...",className:pe})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs text-stone-400 mb-1",children:"الإجابة"}),o.jsx("textarea",{rows:2,required:!0,value:G.answer,onChange:xe=>L(me,"answer",xe.target.value),placeholder:"اكتبي الإجابة الشافية والواضحة للعميلة...",className:`${pe} resize-y`})]})]},G.id||me)):o.jsx("p",{className:"text-center text-stone-500 py-4 text-xs",children:"لا توجد أسئلة شائعة مضافة حالياً."}),o.jsxs("button",{type:"button",onClick:E,className:`${St} w-full justify-center border-dashed py-3`,children:[o.jsx(Is,{className:"h-4 w-4"})," إضافة سؤال جديد للأسئلة الشائعة"]}),o.jsxs("div",{className:"mt-5 flex flex-wrap items-center gap-3 pt-4 border-t border-white/[0.07]",children:[o.jsxs("button",{type:"button",onClick:I,className:Rt,children:[o.jsx(ds,{className:"h-4 w-4"})," حفظ الأسئلة الشائعة"]}),N&&o.jsxs("span",{className:"inline-flex items-center gap-2 rounded-xl border border-emerald-500/25 bg-emerald-500/10 px-3.5 py-2 text-xs font-bold text-emerald-400",children:[o.jsx(Ir,{className:"h-4 w-4"})," تم حفظ وتحديث الأسئلة الشائعة بنجاح!"]})]})]})}),o.jsx(Bs,{icon:Ea,tone:"bg-violet-400/10 text-violet-300",title:"بيانات التواصل الأساسية",hint:"تظهر في تذييل الموقع وأسفل صفحات المتجر.",children:o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsx(vt,{label:"رقم الهاتف",children:o.jsx("input",{required:!0,value:u.contactPhone,onChange:G=>k("contactPhone",G.target.value),className:pe,dir:"ltr"})}),o.jsx(vt,{label:"البريد الإلكتروني",children:o.jsx("input",{required:!0,type:"email",value:u.contactEmail,onChange:G=>k("contactEmail",G.target.value),className:pe,dir:"ltr"})}),o.jsx(vt,{label:"العنوان",full:!0,children:o.jsx("input",{required:!0,value:u.address,onChange:G=>k("address",G.target.value),className:pe})})]})}),o.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2",children:[o.jsxs("button",{type:"submit",className:Rt,children:[o.jsx(ds,{className:"h-4 w-4"})," حفظ كافة الإعدادات والسياسات"]}),f&&o.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-emerald-300",children:[o.jsx(Ir,{className:"h-4 w-4"})," تم الحفظ في الذاكرة ومزامنة Supabase بنجاح"]})]})]}),o.jsx("div",{className:"mt-8 max-w-4xl space-y-5",children:o.jsx(IO,{onExport:s,onImport:i,onClear:l})})]})}function Bs({icon:t,tone:e,title:s,hint:i,children:l}){return o.jsxs("section",{className:`${Ye} p-5 sm:p-7`,children:[o.jsxs("div",{className:"mb-6 flex items-start gap-3",children:[o.jsx("span",{className:`flex h-10 w-10 items-center justify-center rounded-xl ${e}`,children:o.jsx(t,{className:"h-5 w-5"})}),o.jsxs("div",{children:[o.jsx("h2",{className:"font-extrabold text-stone-100",children:s}),o.jsx("p",{className:"mt-1 text-xs text-stone-600",children:i})]})]}),l]})}function vt({label:t,children:e,full:s}){return o.jsxs("label",{className:`block text-sm text-stone-400 ${s?"sm:col-span-2":""}`,children:[t,o.jsx("div",{className:"mt-2",children:e})]})}function HO(){const[t,e]=A.useState(!1),[s,i]=A.useState(!1),[l,u]=A.useState(!1),[d,f]=A.useState(!1),[g,p]=A.useState(!1),[x,y]=A.useState(null),b=`-- حل مشكلة إرسال الطلبات في SupabaseUnknown directive
81ALTER TABLE public.orders ENABLE ROW LEVEL SECURITY;Syntax not understood
83DROP POLICY IF EXISTS "Enable insert for everyone" ON public.orders;Syntax not understood
84DROP POLICY IF EXISTS "Public can insert orders" ON public.orders;Syntax not understood
85DROP POLICY IF EXISTS "Allow public insert on orders" ON public.orders;Syntax not understood
87CREATE POLICY "Enable insert for everyone"Syntax not understood
88ON public.orders FOR INSERT TO publicSyntax not understood
89WITH CHECK (true);Syntax not understood
91DROP POLICY IF EXISTS "Enable select for orders" ON public.orders;Syntax not understood
92CREATE POLICY "Enable select for orders"Syntax not understood
93ON public.orders FOR SELECT TO publicSyntax not understood
94USING (true);`,w=async()=>{e(!0),y(null);const k=await KR();e(!1),y({tone:k.ok?"ok":"err",text:k.message})},j=async()=>{i(!0),y(null);const k=An(),R=await UR(k);i(!1),R.error?y({tone:"err",text:R.error}):y({tone:"ok",text:`تمت مزامنة ${R.count} منتج بنجاح إلى جدول products في Supabase!`})},N=async()=>{u(!0),y(null);const{synced:k,remaining:R}=await zR();u(!1),k>0?y({tone:"ok",text:`تم رفع ${k} طلب معلق بنجاح إلى قاعدة بيانات Supabase! المتبقي: ${R}`}):y(R===0?{tone:"ok",text:"لا توجد طلبات معلقة؛ جميع الطلبات متزامنة بنجاح مع Supabase."}:{tone:"err",text:`تعذر مزامنة الطلبات المعلقة (${R} طلب). تأكد من تطبيق كود الـ SQL الموضح بالأسفل في Supabase SQL Editor.`})},_=()=>{navigator.clipboard.writeText(b),f(!0),setTimeout(()=>f(!1),2500)};return o.jsx(Bs,{icon:Ii,tone:"bg-emerald-400/10 text-emerald-400",title:"قاعدة بيانات Supabase والحماية والأمان (RLS)",hint:"البيانات السحابية المركزية لمتجر جوفيل محمية بسياسات مستوى الصف (Row Level Security) لمنع أي اختراق.",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[o.jsxs("div",{className:"rounded-xl border border-white/[0.08] bg-white/[0.02] p-4",children:[o.jsx("span",{className:"text-xs text-stone-500",children:"رابط السيرفر (Supabase URL)"}),o.jsx("p",{className:"mt-1 font-mono text-sm font-semibold text-[#e7c44e]",dir:"ltr",children:"https://oqxgjktafchlhssurymd.supabase.co"})]}),o.jsxs("div",{className:"rounded-xl border border-white/[0.08] bg-white/[0.02] p-4",children:[o.jsx("span",{className:"text-xs text-stone-500",children:"حساب المدير المصرح (Admin)"}),o.jsx("p",{className:"mt-1 font-mono text-sm font-semibold text-emerald-400",dir:"ltr",children:Wc})]})]}),o.jsxs("div",{className:"rounded-xl border border-emerald-500/20 bg-emerald-500/5 p-4 text-xs leading-relaxed text-emerald-200",children:[o.jsx("span",{className:"font-bold",children:"🛡️ مستوى الحماية والأمان النشط:"}),o.jsxs("p",{className:"mt-1 text-stone-300",children:["بيانات العملاء وأرقام هواتفهم وعناوينهم والطلبات مشفرة ومحمية بـ Row Level Security. الزوار لا يمكنهم سوى إنشاء طلباتهم الخاصة، بينما حساب"," ",o.jsx("span",{className:"font-mono text-[#e7c44e]",children:Wc})," هو الوحيد المخول بعرض وإدارة الطلبات وتعديل المنتجات."]})]}),o.jsxs("div",{className:"flex flex-wrap items-center gap-3 pt-2",children:[o.jsxs("button",{type:"button",onClick:w,disabled:t,className:St,children:[o.jsx(qf,{className:`h-4 w-4 ${t?"animate-spin":""}`}),t?"جاري الفحص...":"فحص الاتصال مع Supabase"]}),o.jsxs("button",{type:"button",onClick:j,disabled:s,className:Rt,children:[o.jsx(Q2,{className:`h-4 w-4 ${s?"animate-spin":""}`}),s?"جاري المزامنة...":"مزامنة ورفع جميع المنتجات إلى Supabase"]}),o.jsxs("button",{type:"button",onClick:N,disabled:l,className:St,children:[o.jsx(qf,{className:`h-4 w-4 ${l?"animate-spin":""}`}),l?"جاري المزامنة...":"إعادة مزامنة الطلبات المعلقة"]}),o.jsx("button",{type:"button",onClick:()=>p(!g),className:"text-xs text-[#e7c44e] underline hover:text-white mr-auto",children:g?"إخفاء كود الـ SQL":"عرض كود حل صلاحية الطلبات (RLS SQL)"})]}),g&&o.jsxs("div",{className:"mt-3 rounded-2xl border border-white/10 bg-[#070604] p-4 text-xs",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsx("span",{className:"font-bold text-stone-300",children:"كود تصريح إرسال الطلبات لـ Supabase SQL Editor:"}),o.jsxs("button",{type:"button",onClick:_,className:"inline-flex items-center gap-1.5 rounded-lg border border-[#d4af37]/30 bg-[#d4af37]/10 px-3 py-1 text-xs font-bold text-[#e7c44e] hover:bg-[#d4af37]/20",children:[d?o.jsx(Kk,{className:"h-3.5 w-3.5"}):o.jsx(Fw,{className:"h-3.5 w-3.5"}),d?"تم النسخ!":"نسخ الكود"]})]}),o.jsx("pre",{className:"overflow-x-auto rounded-lg bg-black/50 p-3 font-mono text-[11px] text-stone-300 leading-relaxed",dir:"ltr",children:b})]}),x&&o.jsx("p",{role:"alert",className:`rounded-xl border px-4 py-3 text-sm ${x.tone==="ok"?"border-emerald-400/20 bg-emerald-400/5 text-emerald-200":"border-red-400/20 bg-red-400/5 text-red-200"}`,children:x.text})]})})}function IO({onExport:t,onImport:e,onClear:s}){const i=A.useRef(null),[l,u]=A.useState(null),[d,f]=A.useState(!1),g=p=>{if(p){u(null);try{e(p),u({tone:"ok",text:"تم استيراد النسخة الاحتياطية بنجاح."})}catch(x){u({tone:"err",text:x instanceof Error?x.message:"ملف غير صالح."})}finally{i.current&&(i.current.value="")}}};return o.jsxs(Bs,{icon:Ww,tone:"bg-amber-400/10 text-amber-300",title:"النسخ الاحتياطي والبيانات",hint:"البيانات محفوظة محلياً وفي Supabase. يمكنك تصدير نسخة كملف JSON واستيرادها في أي وقت.",children:[o.jsxs("div",{className:"flex flex-wrap gap-3",children:[o.jsxs("button",{onClick:t,className:Rt,children:[o.jsx(Al,{className:"h-4 w-4"})," تصدير نسخة احتياطية (JSON)"]}),o.jsxs("button",{onClick:()=>i.current?.click(),className:St,children:[o.jsx(Q2,{className:"h-4 w-4"})," استيراد نسخة"]}),o.jsx("input",{ref:i,type:"file",accept:"application/json",className:"sr-only",onChange:p=>g(p.target.files?.[0]??null)})]}),l&&o.jsx("p",{role:"alert",className:`mt-4 rounded-xl border px-4 py-3 text-sm ${l.tone==="ok"?"border-emerald-400/20 bg-emerald-400/5 text-emerald-200":"border-red-400/20 bg-red-400/5 text-red-200"}`,children:l.text}),o.jsx("div",{className:"mt-6 border-t border-white/[0.07] pt-5",children:d?o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3 rounded-xl border border-red-400/20 bg-red-400/5 p-4",children:[o.jsx("p",{className:"text-sm text-red-200",children:"سيتم حذف كل الطلبات والعملاء والمشتركين. المنتجات والإعدادات تبقى. متأكدة؟"}),o.jsxs("div",{className:"flex gap-2",children:[o.jsx("button",{onClick:()=>f(!1),className:St,children:"إلغاء"}),o.jsx("button",{onClick:()=>{s(),f(!1)},className:Ul,children:"نعم، امسحي الطلبات"})]})]}):o.jsx("button",{onClick:()=>f(!0),className:"text-xs text-stone-600 hover:text-red-300",children:"مسح الطلبات والعملاء (لبدء موسم جديد)"})})]})}const Ov={cloudflare:"Cloudflare (الأساسية)",groq:"Groq (الاحتياطي)",rules:"القواعد المجانية"};function GO(){const[t,e]=A.useState(null),[s,i]=A.useState(!1),[l,u]=A.useState([]),d=async()=>{i(!0);try{const x=await fetch("/api/noor-status");e(await x.json())}catch{e(null)}finally{i(!1)}},f=async()=>{const x=await GR(300);if(!x)return;const y=new Date().toISOString().slice(0,10),b=new Map;for(const w of x)w.role!=="assistant"||!w.provider||w.createdAt.startsWith(y)&&b.set(w.provider,(b.get(w.provider)??0)+1);u(Array.from(b.entries()).map(([w,j])=>({provider:w,count:j})))};A.useEffect(()=>{d(),f()},[]);const g=x=>o.jsx("span",{className:`h-2.5 w-2.5 shrink-0 rounded-full ${x?"bg-emerald-400":"bg-red-400"}`}),p=l.reduce((x,y)=>x+y.count,0);return o.jsxs("div",{children:[o.jsx(Fs,{title:"نُور — المستشارة الذكية",subtitle:"حالة الدماغ والاستهلاك — الشغل كله تحت المراقبة"}),o.jsx("div",{className:Ye,children:o.jsxs("div",{className:"p-5",children:[o.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"flex h-11 w-11 items-center justify-center rounded-xl border border-[#d4af37]/25 bg-[#d4af37]/10 text-[#e7c44e]",children:o.jsx(Bk,{className:"h-5 w-5"})}),o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-extrabold text-stone-100",children:"حالة نُور الآن"}),o.jsx("p",{className:"text-xs text-stone-500",children:t?t.active==="rules-only"?"الدماغين غير متاحتين — الأسئلة المجانية تعمل فقط":`شغالة على: ${Ov[t.active]??t.active}`:"جارٍ الفحص…"})]})]}),o.jsxs("button",{type:"button",onClick:()=>{d()},disabled:s,className:"inline-flex items-center gap-2 rounded-xl border border-white/10 px-3.5 py-2 text-xs font-bold text-stone-300 transition hover:border-[#d4af37]/40 hover:text-[#e7c44e] disabled:opacity-40",children:[o.jsx(qf,{className:`h-3.5 w-3.5 ${s?"animate-spin":""}`}),"فحص مباشر"]})]}),o.jsxs("div",{className:"mt-4 grid gap-2.5 sm:grid-cols-2",children:[o.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-white/[0.07] bg-black/20 px-4 py-3",children:[o.jsxs("span",{className:"flex items-center gap-2 text-sm font-bold text-stone-200",children:[g(t?.cloudflare.ok??!1),"Cloudflare — الأساسية"]}),o.jsx("span",{className:"text-xs text-stone-500",children:t?.cloudflare.ok?`${t.cloudflare.ms}ms ✓`:t?.cloudflare.error||"…"})]}),o.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-white/[0.07] bg-black/20 px-4 py-3",children:[o.jsxs("span",{className:"flex items-center gap-2 text-sm font-bold text-stone-200",children:[g(t?.groq.ok??!1),"Groq — الاحتياطي"]}),o.jsx("span",{className:"text-xs text-stone-500",children:t?.groq.ok?`${t.groq.ms}ms ✓`:t&&!t.groq.keyPresent?"المفتاح غير محفوظ":t?.groq.error||"…"})]})]}),o.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 border-t border-white/[0.06] pt-3",children:[o.jsxs("span",{className:"text-xs text-stone-500",children:["ردود اليوم (",p,"):"]}),l.length===0?o.jsx("span",{className:"text-xs text-stone-600",children:"لا يوجد نشاط بعد اليوم"}):l.map(x=>o.jsxs("span",{className:"rounded-full border border-[#d4af37]/15 bg-[#d4af37]/[0.06] px-2.5 py-1 text-[11px] font-bold text-[#e7c44e]",children:[Ov[x.provider]??x.provider,": ",x.count]},x.provider)),o.jsx("span",{className:"rounded-full border border-white/10 px-2.5 py-1 text-[11px] text-stone-500",children:"الأسئلة المجانية بلا حدود ولا تُحسب على أي حصة"})]})]})})]})}const KO=[{id:"overview",label:"نظرة عامة",icon:tE},{id:"orders",label:"الطلبات",icon:Rl},{id:"products",label:"المنتجات",icon:hu},{id:"banners",label:"بانر العروض",icon:Bc},{id:"customers",label:"العملاء",icon:Ea},{id:"analytics",label:"التقارير",icon:Vm},{id:"chats",label:"محادثات نُور",icon:b2},{id:"settings",label:"الإعدادات",icon:dE}],YO={overview:"نظرة عامة",orders:"الطلبات",products:"المنتجات",banners:"بانر العروض",customers:"العملاء",analytics:"التقارير",chats:"محادثات نُور",settings:"الإعدادات"};function FO({active:t,onNavigate:e,open:s,onClose:i,onSignOut:l,pendingCount:u}){return o.jsxs(o.Fragment,{children:[s&&o.jsx("button",{"aria-label":"إغلاق القائمة",onClick:i,className:"fixed inset-0 z-40 bg-black/70 lg:hidden"}),o.jsxs("aside",{className:`fixed inset-y-0 right-0 z-50 flex w-[270px] flex-col border-l border-white/[0.07] bg-[#0e0c09] transition-transform duration-300 lg:translate-x-0 ${s?"translate-x-0":"translate-x-full"}`,children:[o.jsxs("div",{className:"flex h-[78px] items-center justify-between border-b border-white/[0.07] px-6",children:[o.jsxs("a",{href:"#/",className:"flex items-center gap-3",children:[o.jsx("img",{src:"/images/logo.png",alt:"JUVEL",className:"h-11 w-11 rounded-xl border border-[#d4af37]/25 object-cover"}),o.jsxs("span",{children:[o.jsx("span",{className:"block font-serif text-xl tracking-[0.2em] text-[#e7c44e]",children:"JUVEL"}),o.jsx("span",{className:"mt-0.5 block text-[10px] tracking-[0.18em] text-stone-500",children:"ADMIN STUDIO"})]})]}),o.jsx("button",{onClick:i,className:"rounded-lg p-2 text-stone-500 hover:text-white lg:hidden","aria-label":"إغلاق",children:o.jsx(Ks,{className:"h-5 w-5"})})]}),o.jsxs("div",{className:"px-4 pt-7",children:[o.jsx("p",{className:"mb-3 px-3 text-[10px] font-bold tracking-[0.2em] text-stone-600",children:"إدارة المتجر"}),o.jsx("nav",{className:"space-y-1",children:KO.map(d=>{const f=d.icon,g=t===d.id;return o.jsxs("button",{onClick:()=>{e(d.id),i()},className:`group relative flex w-full items-center gap-3 rounded-xl px-3.5 py-3 text-right text-sm transition ${g?"bg-[#d4af37]/10 font-bold text-[#e7c44e]":"text-stone-400 hover:bg-white/[0.04] hover:text-stone-100"}`,children:[g&&o.jsx("span",{className:"absolute bottom-2 right-0 top-2 w-0.5 rounded-full bg-[#d4af37]"}),o.jsx(f,{className:`h-[18px] w-[18px] ${g?"text-[#e7c44e]":"text-stone-500 group-hover:text-stone-300"}`}),d.label,d.id==="orders"&&u>0&&o.jsx("span",{className:"mr-auto rounded-full bg-[#d4af37] px-2 py-0.5 text-[10px] font-bold text-[#100d07]",children:u})]},d.id)})})]}),o.jsxs("div",{className:"mt-auto border-t border-white/[0.07] p-4",children:[o.jsxs("div",{className:"mb-3 rounded-xl border border-emerald-500/20 bg-emerald-500/5 p-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ii,{className:"h-4 w-4 text-emerald-400"}),o.jsx("span",{className:"text-xs font-bold text-emerald-300",children:"Supabase RLS مفعّل"})]}),o.jsx("p",{className:"mt-1 font-mono text-[11px] text-stone-400 truncate",children:Wc})]}),o.jsxs("button",{type:"button",onClick:l,className:"flex w-full items-center justify-center gap-2 rounded-xl border border-red-500/20 bg-red-500/5 px-3.5 py-2.5 text-xs font-bold text-red-300 transition hover:bg-red-500/10",children:[o.jsx(h2,{className:"h-4 w-4"}),"تسجيل الخروج"]}),o.jsxs("button",{type:"button",onClick:()=>{Da("/"),window.scrollTo(0,0)},className:"mt-2 flex w-full items-center justify-center gap-2 rounded-xl border border-white/[0.08] px-3.5 py-2.5 text-xs font-medium text-stone-400 transition hover:text-stone-200",children:[o.jsx(Bm,{className:"h-3.5 w-3.5"}),"الرجوع للمتجر"]})]})]})]})}function XO({onSignOut:t}){const[e,s]=A.useState([]),[i,l]=A.useState([]),[u,d]=A.useState(Bi()),[f,g]=A.useState([]),[p,x]=A.useState([]),[y,b]=A.useState([]),[w,j]=A.useState("overview"),[N,_]=A.useState(!1),[k,R]=A.useState(null);A.useEffect(()=>{Oj(),Xm(!0);const E=()=>{s(An()),l(bu()),d(Bi()),g(Vi()),x(iO()),b(Ki())};return E(),Dj(E)},[]);const M=A.useMemo(()=>i.filter(E=>E.status==="جديد"||E.status==="قيد التجهيز").length,[i]),T=E=>{j(E),window.scrollTo({top:0,behavior:"smooth"})},F=E=>{R(E),T("orders")},I=E=>{const L=new FileReader;L.onload=()=>{try{hO(JSON.parse(String(L.result)))}catch{window.alert("ملف النسخة الاحتياطية غير صالح.")}},L.readAsText(E)};return o.jsxs("div",{className:"min-h-screen bg-[#0a0907] text-stone-100",dir:"rtl",children:[o.jsx(FO,{active:w,onNavigate:T,open:N,onClose:()=>_(!1),onSignOut:t,pendingCount:M}),o.jsxs("div",{className:"min-h-screen lg:mr-[270px]",children:[o.jsxs("header",{className:"sticky top-0 z-30 flex h-[78px] items-center justify-between border-b border-white/[0.06] bg-[#0a0907]/90 px-4 backdrop-blur-xl sm:px-7 lg:px-9",children:[o.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[o.jsx("button",{onClick:()=>_(!0),className:"rounded-xl border border-white/[0.08] p-2.5 text-stone-400 lg:hidden","aria-label":"فتح القائمة",children:o.jsx(x2,{className:"h-5 w-5"})}),o.jsxs("div",{className:"min-w-0",children:[o.jsx("p",{className:"truncate text-sm font-bold text-stone-200",children:YO[w]}),o.jsx("p",{className:"mt-0.5 hidden truncate text-xs text-stone-600 sm:block",children:"مساحة إدارة متجر جوفيل"})]})]}),o.jsxs("div",{className:"flex items-center gap-2 sm:gap-3",children:[o.jsxs("div",{className:"hidden sm:inline-flex items-center gap-1.5 rounded-full border border-emerald-500/20 bg-emerald-500/10 px-3 py-1 text-xs font-semibold text-emerald-400",children:[o.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-400 animate-pulse"}),o.jsx("span",{children:"Supabase متصل"})]}),M>0&&w!=="orders"&&o.jsxs("button",{onClick:()=>T("orders"),className:"hidden items-center gap-2 rounded-xl border border-[#d4af37]/25 bg-[#d4af37]/[0.06] px-3 py-2 text-xs font-bold text-[#e7c44e] sm:inline-flex",children:[o.jsx(Rl,{className:"h-4 w-4"})," ",M," طلب يحتاج متابعة"]}),o.jsxs("button",{type:"button",onClick:t,className:"inline-flex items-center gap-2 rounded-xl border border-white/[0.08] px-3 py-2 text-xs font-bold text-stone-400 transition hover:border-red-400/30 hover:text-red-300",children:[o.jsx(h2,{className:"h-4 w-4"})," خروج"]})]})]}),o.jsxs("main",{className:"mx-auto max-w-[1500px] px-4 py-7 sm:px-7 lg:px-9 lg:py-9",children:[o.jsx(kt,{mode:"wait",children:o.jsxs(Q.div,{initial:{opacity:0,y:7},animate:{opacity:1,y:0},exit:{opacity:0,y:-5},transition:{duration:.18},children:[w==="overview"&&o.jsx(EO,{products:e,orders:i,onNavigate:T,onOpenOrder:F}),w==="orders"&&o.jsx(AO,{orders:i,onStatusChange:(E,L)=>eO(E,L),onAddNote:tO,onDelete:nO,initialOrderId:k,onClearInitial:()=>R(null)}),w==="products"&&o.jsx(OO,{products:e,onSave:FR,onDelete:XR,onRestoreSamples:WR,nextId:JR}),w==="banners"&&o.jsx(UO,{banners:y,onSave:lO,onDelete:oO,onMove:cO,newId:uO}),w==="customers"&&o.jsx(zO,{customers:p,orders:i,subscribers:f,onRemoveSubscriber:aO,onOpenOrder:F}),w==="analytics"&&o.jsx(VO,{orders:i,products:e}),w==="chats"&&o.jsx(GO,{}),w==="settings"&&o.jsx(qO,{settings:u,onSave:QR,onExportBackup:()=>TO(`juvel-backup-${new Date().toISOString().slice(0,10)}.json`,dO()),onImportBackup:I,onClearData:fO})]},w)}),o.jsxs("footer",{className:"mt-12 flex flex-col justify-between gap-2 border-t border-white/[0.06] pt-5 text-xs text-stone-700 sm:flex-row",children:[o.jsx("span",{children:"JUVEL ADMIN STUDIO — SUPABASE BACKED"}),o.jsx("span",{children:M?`${M} طلب يحتاج المتابعة`:"كل الطلبات محدثة"})]})]})]})]})}function JO({onLoginSuccess:t}){const[e,s]=A.useState(""),[i,l]=A.useState(""),[u,d]=A.useState(!1),[f,g]=A.useState(!1),[p,x]=A.useState(null),y=async b=>{b.preventDefault(),x(null),g(!0);try{const w=await RR(e,i);w.success?(sessionStorage.setItem("juvel.admin_session","active"),Xm(!0),t()):x(w.error||"بيانات الدخول غير صحيحة")}catch(w){x(w?.message||"حدث خطأ أثناء تسجيل الدخول")}finally{g(!1)}};return o.jsxs("div",{className:"relative min-h-screen bg-[#070604] flex items-center justify-center p-4 selection:bg-[#d4af37]/30 selection:text-[#f5efe2]",dir:"rtl",children:[o.jsx("div",{className:"absolute inset-0 overflow-hidden pointer-events-none",children:o.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-[#d4af37]/10 rounded-full blur-[130px]"})}),o.jsxs(Q.div,{initial:{opacity:0,y:18},animate:{opacity:1,y:0},transition:{duration:.4},className:"relative w-full max-w-md rounded-3xl border border-[#d4af37]/20 bg-[#0e0c09]/95 p-8 shadow-[0_24px_80px_rgba(0,0,0,0.8)] backdrop-blur-2xl",children:[o.jsxs("div",{className:"text-center",children:[o.jsx("img",{src:"/images/logo.png",alt:"JUVEL",className:"mx-auto h-24 w-24 rounded-2xl border border-[#d4af37]/30 object-cover shadow-[0_0_35px_rgba(212,175,55,0.25)]"}),o.jsx("h1",{className:"mt-4 font-serif text-3xl font-bold tracking-[0.2em] text-[#e7c44e]",children:"JUVEL"}),o.jsx("p",{className:"mt-1 text-xs tracking-[0.3em] text-stone-400",children:"لوحة التحكم الإدارية"}),o.jsx("p",{className:"mt-2 text-xs text-stone-500",children:"أدخلي بيانات اعتماد المدير للوصول إلى إدارة المتجر"})]}),o.jsxs("div",{className:"mt-6 flex items-center justify-between rounded-xl border border-emerald-500/20 bg-emerald-500/5 px-3.5 py-2.5 text-xs text-emerald-300",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ii,{className:"h-4 w-4 text-emerald-400 shrink-0"}),o.jsx("span",{children:"حماية البيانات نشطة (Supabase RLS)"})]}),o.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-400 animate-pulse"})]}),o.jsxs("form",{onSubmit:y,className:"mt-6 space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-semibold text-stone-300 mb-1.5",children:"البريد الإلكتروني للإدارة"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:"email",required:!0,value:e,onChange:b=>s(b.target.value),placeholder:"name@example.com",className:"w-full rounded-xl border border-white/10 bg-white/[0.03] px-4 py-3 pl-10 text-sm text-stone-100 placeholder-stone-600 focus:border-[#d4af37] focus:outline-none focus:ring-1 focus:ring-[#d4af37]",dir:"ltr"}),o.jsx(Hm,{className:"absolute left-3 top-3.5 h-4 w-4 text-stone-500"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-semibold text-stone-300 mb-1.5",children:"كلمة المرور"}),o.jsxs("div",{className:"relative",children:[o.jsx("input",{type:u?"text":"password",required:!0,value:i,onChange:b=>l(b.target.value),placeholder:"••••••••",className:"w-full rounded-xl border border-white/10 bg-white/[0.03] px-4 py-3 pl-10 text-sm text-stone-100 placeholder-stone-600 focus:border-[#d4af37] focus:outline-none focus:ring-1 focus:ring-[#d4af37]",dir:"ltr"}),o.jsx("button",{type:"button",onClick:()=>d(!u),className:"absolute left-3 top-3.5 text-stone-500 hover:text-stone-300",children:u?o.jsx(qm,{className:"h-4 w-4"}):o.jsx(Cl,{className:"h-4 w-4"})})]})]}),p&&o.jsxs("div",{className:"rounded-xl border border-red-500/30 bg-red-500/10 p-3 text-xs text-red-300 flex items-start gap-2",children:[o.jsx(Yk,{className:"h-4 w-4 text-red-400 shrink-0 mt-0.5"}),o.jsx("span",{children:p})]}),o.jsx("button",{type:"submit",disabled:f,className:"w-full mt-2 flex items-center justify-center gap-2 rounded-xl bg-gradient-to-l from-[#d4af37] to-[#e7c44e] py-3.5 text-sm font-bold text-[#100d07] shadow-[0_4px_25px_rgba(212,175,55,0.3)] transition hover:brightness-110 disabled:opacity-50",children:f?o.jsxs("span",{className:"inline-flex items-center gap-2",children:[o.jsx("span",{className:"h-4 w-4 border-2 border-[#100d07] border-t-transparent rounded-full animate-spin"}),"جاري التحقق..."]}):o.jsxs("span",{className:"inline-flex items-center gap-2",children:[o.jsx(nE,{className:"h-4 w-4"}),"دخول لوحة التحكم"]})})]}),o.jsx("div",{className:"mt-6 pt-5 border-t border-white/[0.08] text-center",children:o.jsxs("button",{type:"button",onClick:()=>{Da("/"),window.scrollTo(0,0)},className:"inline-flex items-center gap-2 text-xs text-stone-500 hover:text-[#e7c44e] transition",children:[o.jsx(Bm,{className:"h-3.5 w-3.5"}),"العودة إلى المتجر الرئيسي"]})})]})]})}function WO(){const[t,e]=A.useState(()=>sessionStorage.getItem("juvel.admin_session")==="active"),s=async()=>{await OR(),sessionStorage.removeItem("juvel.admin_session"),e(!1),Da("/"),window.scrollTo(0,0)};return t?o.jsx(XO,{onSignOut:s}):o.jsx(JO,{onLoginSuccess:()=>e(!0)})}const Dv=[{label:"الرئيسية",kind:"section",id:"home"},{label:"المنتجات",kind:"page",path:"/products"},{label:"لماذا جوفيل",kind:"section",id:"features"},{label:"قصتنا",kind:"section",id:"about"},{label:"آراء عملائنا",kind:"section",id:"testimonials"},{label:"تواصل معنا",kind:"section",id:"contact"}];function Qm({cartCount:t,onCartClick:e,siteName:s="JUVEL"}){const[i,l]=A.useState(!1),[u,d]=A.useState(!1),{path:f}=Ml();A.useEffect(()=>{const w=()=>l(window.scrollY>40);return w(),window.addEventListener("scroll",w),()=>window.removeEventListener("scroll",w)},[]);const g=w=>w.kind==="page"?{href:Mt(w.path),onClick:Dt(w.path)}:{href:wl(w.id),onClick:vl(w.id)},p=A.useRef([]),x=vl("home"),y=w=>{const j=Date.now(),N=p.current.filter(_=>j-_<3e3);if(p.current=[...N,j],p.current.length>=5){p.current=[],w.preventDefault(),Da("/admin"),window.scrollTo(0,0);return}N.length===0?x(w):w.preventDefault()},b=w=>w.kind==="page"&&(f===w.path||f.startsWith(`${w.path}/`));return o.jsxs(Q.header,{initial:{y:-80,opacity:0},animate:{y:0,opacity:1},transition:{duration:.8,ease:[.22,1,.36,1]},className:`fixed top-0 right-0 left-0 z-50 transition-all duration-500 ${i?"bg-noir-950/90 backdrop-blur-xl border-b border-gold/15 py-3 shadow-[0_8px_40px_-12px_rgba(212,175,55,0.15)]":"bg-transparent py-5"}`,children:[o.jsxs("div",{className:"mx-auto flex max-w-7xl items-center justify-between px-5 sm:px-6 lg:px-8",children:[o.jsxs("a",{href:wl("home"),onClick:y,className:"group flex select-none items-center gap-3",children:[o.jsx("img",{src:"/images/logo.png",alt:s,className:"h-12 w-12 rounded-full border border-gold/40 object-cover shadow-[0_0_20px_rgba(212,175,55,0.25)] transition-transform duration-500 group-hover:scale-105 sm:h-14 sm:w-14"}),o.jsxs("div",{className:"leading-tight",children:[o.jsx("span",{className:"font-serif text-2xl tracking-[0.25em] text-gold-gradient",children:s}),o.jsx("span",{className:"block text-[10px] tracking-[0.4em] text-gold-300/60",children:"جـوفـيـل"})]})]}),o.jsx("nav",{className:"hidden items-center gap-7 lg:flex",children:Dv.map(w=>o.jsxs("a",{...g(w),"aria-current":b(w)?"page":void 0,className:`group relative text-sm font-medium transition-colors hover:text-gold-300 ${b(w)?"text-gold-300":"text-stone-300"}`,children:[w.label,o.jsx("span",{className:`absolute -bottom-1.5 right-0 h-px bg-gradient-to-l from-gold to-transparent transition-all duration-300 group-hover:w-full ${b(w)?"w-full":"w-0"}`})]},w.label))}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("a",{href:Mt("/products","focus=1"),onClick:Dt("/products","focus=1"),"aria-label":"بحث في المنتجات",className:"hidden h-10 w-10 items-center justify-center rounded-full border border-gold/20 text-gold-300/80 transition-all hover:border-gold/60 hover:text-gold sm:flex",children:o.jsx(Pi,{className:"h-4.5 w-4.5"})}),o.jsxs("button",{"aria-label":"سلة التسوق",onClick:e,className:"relative flex h-10 w-10 items-center justify-center rounded-full border border-gold/20 text-gold-300/80 transition-all hover:border-gold/60 hover:text-gold",children:[o.jsx(Ra,{className:"h-4.5 w-4.5"}),o.jsx(kt,{children:t>0&&o.jsx(Q.span,{initial:{scale:0},animate:{scale:1},exit:{scale:0},transition:{type:"spring",stiffness:500,damping:18},className:"absolute -top-1 -left-1 flex h-5 w-5 items-center justify-center rounded-full bg-gold text-[10px] font-bold text-noir-950",children:t},t)})]}),o.jsx("a",{href:Mt("/products"),onClick:Dt("/products"),className:"hidden rounded-full bg-gradient-to-l from-gold-dark via-gold to-gold-300 px-6 py-2.5 text-sm font-bold text-noir-950 shadow-[0_8px_30px_-8px_rgba(212,175,55,0.6)] transition-all hover:shadow-[0_8px_40px_-6px_rgba(212,175,55,0.8)] hover:brightness-110 lg:block",children:"تسوّق الآن"}),o.jsx("button",{"aria-label":"القائمة","aria-expanded":u,onClick:()=>d(!u),className:"flex h-10 w-10 items-center justify-center rounded-full border border-gold/20 text-gold lg:hidden",children:u?o.jsx(Ks,{className:"h-5 w-5"}):o.jsx(x2,{className:"h-5 w-5"})})]})]}),o.jsx(kt,{children:u&&o.jsx(Q.nav,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.35,ease:"easeInOut"},className:"overflow-hidden border-t border-gold/10 bg-noir-950/95 backdrop-blur-xl lg:hidden",children:o.jsx("div",{className:"flex flex-col gap-1 px-5 py-4 sm:px-6",children:Dv.map((w,j)=>{const N=g(w);return o.jsx(Q.a,{href:N.href,onClick:_=>{N.onClick(_),d(!1)},"aria-current":b(w)?"page":void 0,initial:{x:30,opacity:0},animate:{x:0,opacity:1},transition:{delay:j*.06},className:`rounded-xl px-4 py-3.5 text-[15px] transition-colors hover:bg-gold/10 hover:text-gold active:bg-gold/10 ${b(w)?"bg-gold/10 text-gold":"text-stone-200"}`,children:w.label},w.label)})})})})]})}function QO({title:t="جمالك يبدأ من",highlight:e="قلب الطبيعة",description:s="جوفيل تقدّم لكِ مستحضرات تجميل فاخرة بمكونات طبيعية نقية، مستخلصة بعناية من أجود المصادر حول العالم — لأن بشرتك تستحق الأفضل."}){return o.jsxs("section",{id:"intro",className:"relative overflow-hidden py-16 sm:py-20 lg:py-24",children:[o.jsxs("div",{className:"pointer-events-none absolute inset-0",children:[o.jsx("div",{className:"absolute -top-20 left-1/4 h-[360px] w-[360px] rounded-full bg-gold/8 blur-[140px]"}),o.jsx("div",{className:"absolute bottom-0 right-1/4 h-[300px] w-[300px] rounded-full bg-gold-dark/10 blur-[120px]"})]}),o.jsxs("div",{className:"relative mx-auto max-w-3xl px-6 text-center sm:px-8",children:[o.jsxs(Q.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-6 inline-flex items-center gap-2 rounded-full border border-gold/30 bg-gold/5 px-4 py-2 text-[13px] text-gold-300 sm:text-sm",children:[o.jsx(uu,{className:"h-4 w-4 shrink-0 text-gold"}),"طبيعي ١٠٠٪ · خالٍ من الكيماويات"]}),o.jsxs(Q.h1,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.1},className:"text-[1.7rem] font-bold leading-[1.45] sm:text-4xl sm:font-black sm:leading-[1.25] lg:text-[3rem]",children:[t,e&&o.jsxs(o.Fragment,{children:[o.jsx("br",{}),o.jsx("span",{className:"text-gold-gradient font-serif tracking-wide",children:e})]})]}),o.jsx(Q.p,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.2},className:"mx-auto mt-5 max-w-xl text-[14px] leading-[2] text-stone-400 sm:mt-6 sm:text-[15.5px] sm:leading-[1.9]",children:s}),o.jsxs(Q.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.3},className:"mt-8 flex flex-col items-stretch gap-3 sm:flex-row sm:items-center sm:justify-center sm:gap-4",children:[o.jsxs("a",{href:Mt("/products"),onClick:Dt("/products"),className:"group relative overflow-hidden rounded-full bg-gradient-to-l from-gold-dark via-gold to-gold-300 px-8 py-3.5 text-center text-[14.5px] font-bold text-noir-950 shadow-[0_12px_40px_-10px_rgba(212,175,55,0.6)] transition-all hover:shadow-[0_16px_50px_-8px_rgba(212,175,55,0.85)] sm:px-9 sm:text-base",children:[o.jsx("span",{className:"relative z-10",children:"اكتشفي المجموعة"}),o.jsx("span",{className:"absolute inset-0 -translate-x-full bg-gradient-to-l from-transparent via-white/40 to-transparent transition-transform duration-700 group-hover:translate-x-full"})]}),o.jsx("a",{href:wl("about"),onClick:vl("about"),className:"rounded-full border border-gold/40 px-8 py-3.5 text-center text-[14.5px] font-bold text-gold-300 transition-all hover:border-gold hover:bg-gold/10 sm:px-9 sm:text-base",children:"قصتنا"})]}),o.jsx(Q.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7,delay:.4},className:"mx-auto mt-10 grid max-w-md grid-cols-3 gap-2 rounded-2xl border border-gold/15 bg-noir-900/40 px-2 py-5 sm:max-w-lg sm:gap-6 sm:px-6",children:[{num:"+50K",label:"عميلة سعيدة"},{num:"100%",label:"مكونات طبيعية"},{num:"4.9",label:"تقييم العملاء",star:!0}].map(i=>o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{className:"flex items-center justify-center gap-1 font-serif text-2xl text-gold-gradient sm:text-3xl",children:[i.num,i.star&&o.jsx(Gm,{className:"h-4 w-4 fill-gold text-gold sm:h-5 sm:w-5"})]}),o.jsx("p",{className:"mt-1.5 text-[11px] leading-tight text-stone-500 sm:text-sm",children:i.label})]},i.label))})]})]})}const gf=["مكونات طبيعية ١٠٠٪","شحن مجاني فوق ٥٠٠ ج.م","غير مختبر على الحيوانات","خالٍ من البارابين","تغليف صديق للبيئة","ضمان استرجاع ٣٠ يوم"];function ZO({announcement:t=gf[0]}){const e=[t,...gf.slice(1),t,...gf.slice(1)];return o.jsxs("section",{id:"marquee",className:"relative overflow-hidden border-y border-gold/15 bg-noir-900 py-5",children:[o.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 z-10 w-24 bg-gradient-to-l from-noir-900 to-transparent"}),o.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 z-10 w-24 bg-gradient-to-r from-noir-900 to-transparent"}),o.jsx("div",{className:"animate-marquee flex w-max gap-10",dir:"ltr",children:e.map((s,i)=>o.jsxs("span",{className:"flex items-center gap-8 whitespace-nowrap text-[12.5px] font-medium tracking-wide text-gold-300/75 sm:gap-10 sm:text-sm",children:[o.jsx("span",{dir:"rtl",children:s}),o.jsx("span",{className:"text-gold",children:"·"})]},i))})]})}function Hj({eyebrow:t,title:e,subtitle:s}){return o.jsxs("div",{className:"mb-10 text-center sm:mb-14",children:[o.jsxs(Q.span,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.55},className:"mb-3.5 inline-flex items-center gap-2.5 text-[10.5px] font-bold tracking-[0.2em] text-gold sm:gap-3 sm:text-[13px] sm:tracking-[0.28em]",children:[o.jsx("span",{className:"h-px w-6 bg-gradient-to-l from-gold to-transparent sm:w-8"}),t,o.jsx("span",{className:"h-px w-6 bg-gradient-to-r from-gold to-transparent sm:w-8"})]}),o.jsx(Q.h2,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.65,delay:.1},className:"text-[1.5rem] font-bold leading-snug sm:text-[2rem] sm:font-black lg:text-[2.5rem]",children:o.jsx("span",{className:"text-gold-gradient",children:e})}),s&&o.jsx(Q.p,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.65,delay:.2},className:"mx-auto mt-3.5 max-w-lg text-[13.5px] leading-[1.95] text-stone-400 sm:text-[15px]",children:s})]})}const e6=[{icon:uu,title:"مكونات طبيعية ١٠٠٪",desc:"مستخلصات نباتية نقية بدون أي إضافات كيميائية ضارة أو مواد حافظة صناعية."},{icon:Wk,title:"جودة فاخرة",desc:"نختار أجود المكونات من مصادر عالمية موثوقة لنقدم لك تجربة استثنائية."},{icon:Ii,title:"معتمد ومختبر",desc:"جميع منتجاتنا معتمدة من هيئات الجودة العالمية ومختبرة سريرياً بأمان."},{icon:Ol,title:"شحن سريع",desc:"توصيل لباب بيتك خلال ٢٤-٤٨ ساعة مع شحن مجاني للطلبات فوق ٥٠٠ جنيه."},{icon:Zk,title:"ضمان الرضا",desc:"مش راضية عن المنتج؟ استرجعيه خلال ٣٠ يوم واسترجعي فلوسك بالكامل."},{icon:cE,title:"صديق للبيئة",desc:"تغليف قابل لإعادة التدوير ومنتجات غير مختبرة على الحيوانات إطلاقاً."}];function t6(){return o.jsxs("section",{id:"features",className:"relative bg-noir-900/60 py-16 sm:py-24 lg:py-32",children:[o.jsx("div",{className:"pointer-events-none absolute right-0 top-0 h-[350px] w-[350px] rounded-full bg-gold/5 blur-[130px]"}),o.jsxs("div",{className:"relative mx-auto max-w-7xl px-6 sm:px-8",children:[o.jsx(Hj,{eyebrow:"لماذا جوفيل؟",title:"التميّز في كل التفاصيل",subtitle:"لأننا نؤمن أن الجمال الحقيقي يبدأ من الاهتمام بأدق التفاصيل"}),o.jsx("div",{className:"mx-auto grid max-w-6xl gap-4 sm:grid-cols-2 sm:gap-6 lg:grid-cols-3",children:e6.map((t,e)=>o.jsxs(Q.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-60px"},transition:{duration:.6,delay:e%3*.12},whileHover:{y:-8},className:"group relative overflow-hidden rounded-2xl border border-gold/15 bg-gradient-to-b from-noir-800/60 to-noir-900 p-5 transition-colors duration-500 hover:border-gold/45 sm:rounded-3xl sm:p-7",children:[o.jsx("div",{className:"absolute -left-10 -top-10 h-32 w-32 rounded-full bg-gold/0 blur-2xl transition-all duration-700 group-hover:bg-gold/15"}),o.jsx("div",{className:"relative mb-5 flex h-12 w-12 items-center justify-center rounded-2xl border border-gold/30 bg-gold/10 transition-all duration-500 group-hover:rotate-6 group-hover:bg-gold/20 sm:mb-6 sm:h-14 sm:w-14",children:o.jsx(t.icon,{className:"h-5.5 w-5.5 text-gold sm:h-6.5 sm:w-6.5"})}),o.jsx("h3",{className:"relative mb-2.5 text-[16px] font-bold text-stone-100 group-hover:text-gold-300 sm:mb-3 sm:text-lg",children:t.title}),o.jsx("p",{className:"relative text-[13.5px] leading-[1.95] text-stone-400 sm:text-[14.5px]",children:t.desc})]},t.title))})]})]})}const n6=["مستخلصات نباتية من مزارع عضوية معتمدة","تركيبات مطوّرة بأيدي خبراء عالميين","اختبارات جودة صارمة على كل دفعة إنتاج","وصفات مستوحاة من أسرار الجمال الشرقي"];function s6(){return o.jsxs("section",{id:"about",className:"relative overflow-hidden py-16 sm:py-24 lg:py-32",children:[o.jsx("div",{className:"pointer-events-none absolute bottom-0 left-1/3 h-[400px] w-[400px] rounded-full bg-gold/6 blur-[150px]"}),o.jsxs("div",{className:"relative mx-auto grid max-w-7xl items-center gap-16 px-6 sm:px-8 lg:grid-cols-2 lg:gap-20",children:[o.jsxs(Q.div,{initial:{opacity:0,x:60},whileInView:{opacity:1,x:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.9,ease:[.22,1,.36,1]},className:"relative",children:[o.jsx("div",{className:"absolute -inset-3 rounded-[2.5rem] border border-gold/20 sm:-inset-4"}),o.jsxs("div",{className:"relative overflow-hidden rounded-[2rem] gold-ring",children:[o.jsx("img",{src:"/images/about.webp",alt:"مكونات جوفيل الطبيعية",className:"w-full object-cover"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-noir-950/50 via-transparent to-transparent"})]}),o.jsxs(Q.div,{initial:{opacity:0,scale:.8},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.7,delay:.5,type:"spring"},className:"absolute -bottom-5 right-4 flex items-center gap-3 rounded-2xl border border-gold/30 bg-noir-900/95 px-4 py-3 backdrop-blur-md sm:-bottom-6 sm:right-8 sm:gap-4 sm:px-6 sm:py-4",children:[o.jsx("span",{className:"font-serif text-3xl text-gold-gradient sm:text-4xl",children:"10+"}),o.jsxs("span",{className:"text-[13px] leading-snug text-stone-300 sm:text-sm",children:["سنوات من الخبرة",o.jsx("br",{}),"في الجمال الطبيعي"]})]})]}),o.jsxs(Q.div,{initial:{opacity:0,x:-60},whileInView:{opacity:1,x:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.9,ease:[.22,1,.36,1]},children:[o.jsxs("span",{className:"mb-4 inline-flex items-center gap-3 text-sm font-bold tracking-[0.3em] text-gold",children:[o.jsx("span",{className:"h-px w-8 bg-gradient-to-l from-gold to-transparent"}),"قصتنا"]}),o.jsxs("h2",{className:"text-[1.5rem] font-bold leading-snug sm:text-[2rem] sm:font-black lg:text-[2.5rem]",children:["من رحم الطبيعة..",o.jsx("br",{}),o.jsx("span",{className:"text-gold-gradient font-serif",children:"وُلدت جوفيل"})]}),o.jsx("p",{className:"mt-5 text-[14px] leading-[2] text-stone-400 sm:mt-6 sm:text-[15.5px] sm:leading-[1.9]",children:"بدأت رحلتنا بحلم بسيط: أن نعيد للجمال نقاءه الأول. جمعنا أسرار الطبيعة من حقول اللافندر في بروفانس، وأشجار الأرجان في المغرب، وعسل الجبال النقي — وصنعنا منها مستحضرات فاخرة تحتفي بجمالك الطبيعي بدون أي تنازلات."}),o.jsx("ul",{className:"mt-8 space-y-4",children:n6.map((t,e)=>o.jsxs(Q.li,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:.3+e*.12},className:"flex items-center gap-3.5",children:[o.jsx("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-gold/40 bg-gold/10",children:o.jsx(ds,{className:"h-3.5 w-3.5 text-gold"})}),o.jsx("span",{className:"text-[13.5px] leading-relaxed text-stone-300 sm:text-[15px]",children:t})]},t))}),o.jsx(Q.a,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.8},href:Mt("/products"),onClick:Dt("/products"),className:"mt-9 block rounded-full border border-gold/50 px-9 py-3.5 text-center text-[14.5px] font-bold text-gold-300 transition-all hover:bg-gold hover:text-noir-950 hover:shadow-[0_12px_40px_-10px_rgba(212,175,55,0.6)] sm:mt-10 sm:inline-block sm:text-base",children:"اكتشفي عالم جوفيل"})]})]})]})}const Yr=[{name:"سارة محمود",role:"القاهرة",text:"سيروم الذهب غيّر بشرتي تماماً! من أول أسبوعين لاحظت فرق كبير في النضارة والإشراقة. أول مرة أحس إن منتج طبيعي فعلاً بيشتغل بالجودة دي.",initials:"س"},{name:"نور الهدى أحمد",role:"الإسكندرية",text:"زيت الأرجان من جوفيل أنقذ شعري بعد سنين من الصبغات. الريحة فخمة والنتيجة مبهرة، وكمان التغليف تحفة بجد — حسيت إني بفتح هدية ملكية.",initials:"ن"},{name:"مريم عبد الله",role:"دبي",text:"جربت ماركات عالمية كتير بس جوفيل مستوى تاني خالص. ماسك الطين الذهبي بقى جزء أساسي من روتيني الأسبوعي. خدمة العملاء كمان راقية جداً.",initials:"م"},{name:"ليلى حسن",role:"جدة",text:"عطر جوفيل الشرقي ثباته خرافي وكل الناس بتسألني عليه! والأهم إن كل المنتجات طبيعية ومفيهاش أي مواد ضارة. تجربة تستاهل كل جنيه.",initials:"ل"}];function a6(){const[t,e]=A.useState(0),[s,i]=A.useState(1);A.useEffect(()=>{const d=setInterval(()=>{i(1),e(f=>(f+1)%Yr.length)},6e3);return()=>clearInterval(d)},[]);const l=d=>{i(d),e(f=>(f+d+Yr.length)%Yr.length)},u=Yr[t];return o.jsxs("section",{id:"testimonials",className:"relative overflow-hidden bg-noir-900/60 py-16 sm:py-24 lg:py-32",children:[o.jsx("div",{className:"pointer-events-none absolute left-1/2 top-0 h-[300px] w-[600px] -translate-x-1/2 rounded-full bg-gold/5 blur-[120px]"}),o.jsxs("div",{className:"relative mx-auto max-w-4xl px-6 sm:px-8",children:[o.jsx(Hj,{eyebrow:"آراء عملائنا",title:"كلامهم أغلى من الذهب"}),o.jsxs("div",{className:"relative",children:[o.jsx(oE,{className:"absolute -top-5 right-0 h-12 w-12 rotate-180 text-gold/15 sm:-top-6 sm:right-2 sm:h-16 sm:w-16"}),o.jsx("div",{className:"relative min-h-[330px] overflow-hidden rounded-[1.75rem] border border-gold/20 bg-gradient-to-b from-noir-800/70 to-noir-900 p-6 sm:min-h-[300px] sm:rounded-[2rem] sm:p-12 gold-ring",children:o.jsx(kt,{mode:"wait",custom:s,children:o.jsxs(Q.div,{custom:s,initial:{opacity:0,x:s*60},animate:{opacity:1,x:0},exit:{opacity:0,x:s*-60},transition:{duration:.5,ease:[.22,1,.36,1]},className:"text-center",children:[o.jsx("div",{className:"mb-6 flex justify-center gap-1",children:[...Array(5)].map((d,f)=>o.jsx(Q.span,{initial:{opacity:0,scale:0},animate:{opacity:1,scale:1},transition:{delay:.15+f*.07,type:"spring",stiffness:300},children:o.jsx(Gm,{className:"h-5 w-5 fill-gold text-gold"})},f))}),o.jsxs("p",{className:"mx-auto max-w-2xl text-[14px] leading-[2.15] text-stone-300 sm:text-[17px] sm:leading-[2]",children:['"',u.text,'"']}),o.jsxs("div",{className:"mt-8 flex items-center justify-center gap-4",children:[o.jsx("div",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-gold/40 bg-gradient-to-br from-gold/25 to-gold/5 font-serif text-lg text-gold sm:h-14 sm:w-14 sm:text-xl",children:u.initials}),o.jsxs("div",{className:"text-right",children:[o.jsx("p",{className:"text-[14.5px] font-bold text-gold-300 sm:text-base",children:u.name}),o.jsx("p",{className:"text-[12.5px] text-stone-500 sm:text-sm",children:u.role})]})]})]},t)})}),o.jsxs("div",{className:"mt-8 flex items-center justify-center gap-5",children:[o.jsx("button",{"aria-label":"السابق",onClick:()=>l(-1),className:"flex h-11 w-11 items-center justify-center rounded-full border border-gold/30 text-gold transition-all hover:bg-gold hover:text-noir-950",children:o.jsx(Pw,{className:"h-5 w-5"})}),o.jsx("div",{className:"flex gap-2",children:Yr.map((d,f)=>o.jsx("button",{"aria-label":`الرأي ${f+1}`,onClick:()=>{i(f>t?1:-1),e(f)},className:`h-2 rounded-full transition-all duration-400 ${f===t?"w-8 bg-gold":"w-2 bg-gold/25 hover:bg-gold/50"}`},f))}),o.jsx("button",{"aria-label":"التالي",onClick:()=>l(1),className:"flex h-11 w-11 items-center justify-center rounded-full border border-gold/30 text-gold transition-all hover:bg-gold hover:text-noir-950",children:o.jsx(ka,{className:"h-5 w-5"})})]})]})]})]})}function i6({discount:t=15}){const[e,s]=A.useState(""),[i,l]=A.useState(!1),[u,d]=A.useState(""),[f,g]=A.useState(!1),p=async x=>{if(x.preventDefault(),!(!e.trim()||f)){g(!0),d("");try{sO(e)?l(!0):d("هذا البريد مشترك معنا بالفعل.")}catch{d("تعذّر إتمام الاشتراك، حاولي مرة أخرى.")}finally{g(!1)}}};return o.jsx("section",{id:"contact",className:"relative py-16 sm:py-24 lg:py-32",children:o.jsx("div",{className:"mx-auto max-w-5xl px-6 sm:px-8",children:o.jsxs(Q.div,{initial:{opacity:0,y:50},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-80px"},transition:{duration:.8,ease:[.22,1,.36,1]},className:"relative overflow-hidden rounded-[2rem] border border-gold/25 bg-gradient-to-br from-noir-800 via-noir-900 to-noir-950 px-5 py-12 text-center sm:rounded-[2.5rem] sm:px-14 sm:py-14 gold-ring",children:[o.jsx("div",{className:"pointer-events-none absolute -left-20 -top-20 h-60 w-60 rounded-full bg-gold/10 blur-[80px]"}),o.jsx("div",{className:"pointer-events-none absolute -bottom-20 -right-20 h-60 w-60 rounded-full bg-gold/10 blur-[80px]"}),o.jsx("span",{className:"absolute left-10 top-8 h-1.5 w-1.5 rounded-full bg-gold/50"}),o.jsx("span",{className:"animate-sparkle absolute right-14 bottom-10 text-gold/60",style:{animationDelay:"1.2s"},children:"·"}),o.jsxs("div",{className:"relative",children:[o.jsx(Q.div,{initial:{scale:0,rotate:-20},whileInView:{scale:1,rotate:0},viewport:{once:!0},transition:{type:"spring",stiffness:200,delay:.3},className:"mx-auto mb-6 flex h-16 w-16 items-center justify-center rounded-full border border-gold/40 bg-gold/10",children:o.jsx(Qk,{className:"h-7 w-7 text-gold"})}),o.jsxs("h2",{className:"text-[1.45rem] font-bold leading-snug sm:text-[2rem] sm:font-black",children:["خصم ",o.jsxs("span",{className:"text-gold-gradient font-serif",children:[t,"%"]})," على أول طلب"]}),o.jsx("p",{className:"mx-auto mt-3.5 max-w-sm text-[13.5px] leading-[1.95] text-stone-400 sm:max-w-md sm:text-[15px]",children:"اشتركي في نشرتنا الذهبية واحصلي على عروض حصرية ونصائح جمال أسبوعية"}),o.jsx(kt,{mode:"wait",children:i?o.jsxs(Q.div,{initial:{opacity:0,scale:.85},animate:{opacity:1,scale:1},transition:{type:"spring",stiffness:250},className:"mx-auto mt-9 flex max-w-md items-center justify-center gap-3 rounded-full border border-gold/40 bg-gold/10 px-7 py-4 text-gold-300",children:[o.jsx(Vw,{className:"h-5 w-5 text-gold"}),o.jsx("span",{className:"font-bold",children:"تم تسجيل بريدك في نشرة جوفيل بنجاح."})]},"done"):o.jsxs(Q.form,{exit:{opacity:0,y:-10},onSubmit:p,className:"mx-auto mt-9 flex max-w-md flex-col gap-3 sm:flex-row",children:[o.jsx("input",{type:"email",required:!0,value:e,onChange:x=>s(x.target.value),placeholder:"بريدك الإلكتروني",className:"w-full flex-1 rounded-full border border-gold/25 bg-noir-950/80 px-6 py-4 text-center text-stone-200 placeholder-stone-500 outline-none transition-all focus:border-gold/70 focus:shadow-[0_0_0_4px_rgba(212,175,55,0.1)] sm:text-right"}),o.jsxs("button",{type:"submit",disabled:f,className:"group flex items-center justify-center gap-2 rounded-full bg-gradient-to-l from-gold-dark via-gold to-gold-300 px-8 py-4 font-bold text-noir-950 shadow-[0_10px_35px_-10px_rgba(212,175,55,0.7)] transition-all hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50",children:[f?"جارٍ الاشتراك...":"اشتركي",o.jsx(P2,{className:"h-4 w-4 -scale-x-100 transition-transform group-hover:-translate-x-1"})]})]},"form")}),u&&o.jsx("p",{role:"alert",className:"mx-auto mt-4 max-w-md text-[13px] text-red-300",children:u})]})]})})})}const r6={customerName:"",email:"",phone:"",address:"",city:"",notes:""};function l6({open:t,onClose:e,items:s,settings:i,onQuantityChange:l,onRemove:u,onPlaceOrder:d,checkoutEnabled:f}){const[g,p]=A.useState("cart"),[x,y]=A.useState(r6),[b,w]=A.useState(""),[j,N]=A.useState(!1),[_,k]=A.useState(""),R=s.reduce((E,L)=>E+L.product.price*L.quantity,0),M=R===0||R>=i.freeShippingAt?0:i.shippingFee,T=R+M,F=async E=>{if(E.preventDefault(),!(!s.length||!f||j)){k(""),N(!0);try{const L=await d(x,s);w(L.id),p("success")}catch(L){k(L instanceof Error?L.message:"تعذّر تسجيل الطلب. حاولي مرة أخرى.")}finally{N(!1)}}},I=(E,L)=>{y(q=>({...q,[E]:L}))};return o.jsx(kt,{children:t&&o.jsxs("div",{className:"fixed inset-0 z-[70] flex justify-start",dir:"rtl",children:[o.jsx(Q.button,{type:"button","aria-label":"إغلاق السلة",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:e,className:"absolute inset-0 cursor-default bg-black/75 backdrop-blur-sm"}),o.jsxs(Q.aside,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:280},className:"relative z-10 flex h-full w-full max-w-xl flex-col border-l border-gold/20 bg-noir-950 shadow-2xl",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-gold/15 px-5 py-5 sm:px-6",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-xs tracking-[0.25em] text-gold",children:"JUVEL BOUTIQUE"}),o.jsx("h2",{className:"mt-1 text-xl font-extrabold text-stone-100",children:g==="checkout"?"بيانات التوصيل":g==="success"?"تم استلام طلبك":"سلة التسوق"})]}),o.jsx("button",{type:"button",onClick:e,"aria-label":"إغلاق",className:"flex h-10 w-10 items-center justify-center rounded-full border border-gold/20 text-stone-300 transition-colors hover:border-gold hover:text-gold",children:o.jsx(Ks,{className:"h-5 w-5"})})]}),g==="cart"&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"flex-1 overflow-y-auto px-5 py-5 sm:px-6",children:s.length===0?o.jsxs("div",{className:"flex h-full min-h-64 flex-col items-center justify-center text-center",children:[o.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full border border-gold/25 bg-gold/5",children:o.jsx(Ra,{className:"h-7 w-7 text-gold"})}),o.jsx("h3",{className:"mt-5 text-lg font-bold text-stone-200",children:"سلتك لسه فاضية"}),o.jsx("p",{className:"mt-2 max-w-xs text-sm leading-6 text-stone-500",children:"اختاري المنتجات اللي بتحبيها وهتلاقيها هنا."}),o.jsx("button",{type:"button",onClick:()=>{e(),Da("/products")},className:"mt-6 rounded-full bg-gold px-6 py-3 text-sm font-bold text-noir-950",children:"اكتشفي المنتجات"})]}):o.jsx("div",{className:"space-y-4",children:s.map(({product:E,quantity:L})=>o.jsxs("article",{className:"flex gap-3.5 border-b border-gold/10 pb-4 sm:gap-4",children:[o.jsx("img",{src:E.image,alt:E.name,className:"h-20 w-20 shrink-0 rounded-2xl border border-gold/15 object-cover sm:h-24 sm:w-24"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("div",{className:"flex items-start justify-between gap-2",children:[o.jsxs("div",{children:[o.jsx("h3",{className:"font-bold text-stone-100",children:E.name}),o.jsx("p",{className:"mt-1 text-sm text-gold",children:fe(E.price)})]}),o.jsx("button",{type:"button",onClick:()=>u(E.id),"aria-label":`حذف ${E.name}`,className:"rounded-lg p-2 text-stone-500 transition-colors hover:bg-red-500/10 hover:text-red-300",children:o.jsx(En,{className:"h-4 w-4"})})]}),o.jsxs("div",{className:"mt-4 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3 rounded-full border border-gold/20 px-2 py-1",children:[o.jsx("button",{type:"button",onClick:()=>l(E.id,L-1),"aria-label":"تقليل الكمية",className:"p-1 text-gold hover:text-gold-300",children:o.jsx(du,{className:"h-3.5 w-3.5"})}),o.jsx("span",{className:"min-w-5 text-center text-sm",children:L}),o.jsx("button",{type:"button",onClick:()=>l(E.id,L+1),"aria-label":"زيادة الكمية",disabled:L>=(E.stock??0),className:"p-1 text-gold hover:text-gold-300 disabled:text-stone-700",children:o.jsx(Is,{className:"h-3.5 w-3.5"})})]}),o.jsx("span",{className:"font-bold text-stone-200",children:fe(E.price*L)})]})]})]},E.id))})}),s.length>0&&o.jsxs("div",{className:"border-t border-gold/15 bg-noir-900/70 px-5 py-5 sm:px-6",children:[o.jsx("p",{className:"mb-4 text-xs text-stone-500",children:R>=i.freeShippingAt?"مبروك، الشحن مجاني على طلبك":`أضيفي ${fe(i.freeShippingAt-R)} لتحصلي على شحن مجاني`}),o.jsxs("div",{className:"space-y-2 text-sm",children:[o.jsxs("div",{className:"flex justify-between text-stone-400",children:[o.jsx("span",{children:"المجموع الفرعي"}),o.jsx("span",{children:fe(R)})]}),o.jsxs("div",{className:"flex justify-between text-stone-400",children:[o.jsx("span",{children:"الشحن"}),o.jsx("span",{children:M===0?"مجاني":fe(M)})]}),o.jsxs("div",{className:"flex justify-between border-t border-gold/10 pt-3 text-base font-extrabold text-stone-100",children:[o.jsx("span",{children:"الإجمالي"}),o.jsx("span",{className:"text-gold",children:fe(T)})]})]}),o.jsxs("button",{type:"button",onClick:()=>p("checkout"),disabled:!f,className:"mt-5 flex w-full items-center justify-center gap-2 rounded-full bg-gradient-to-l from-gold-dark via-gold to-gold-300 px-6 py-4 font-extrabold text-noir-950 transition hover:brightness-110",children:[f?"تابعي لإتمام الطلب":"إتمام الطلب غير متاح حالياً",o.jsx(Bm,{className:"h-4 w-4 rotate-180"})]}),o.jsx("p",{className:"mt-3 text-center text-xs text-stone-600",children:"الدفع عند الاستلام"})]})]}),g==="checkout"&&o.jsxs("form",{onSubmit:F,className:"flex-1 overflow-y-auto px-5 py-6 sm:px-6",children:[o.jsxs("div",{className:"space-y-4",children:[o.jsxs("label",{className:"block text-sm text-stone-300",children:["الاسم بالكامل",o.jsx("input",{required:!0,autoComplete:"name",value:x.customerName,onChange:E=>I("customerName",E.target.value),className:"mt-2 w-full rounded-xl border border-gold/20 bg-noir-900 px-4 py-3 text-white outline-none focus:border-gold/60"})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("label",{className:"block text-sm text-stone-300",children:["رقم الموبايل",o.jsx("input",{required:!0,type:"tel",autoComplete:"tel",value:x.phone,onChange:E=>I("phone",E.target.value),className:"mt-2 w-full rounded-xl border border-gold/20 bg-noir-900 px-4 py-3 text-left text-white outline-none focus:border-gold/60",dir:"ltr"})]}),o.jsxs("label",{className:"block text-sm text-stone-300",children:["البريد الإلكتروني",o.jsx("input",{type:"email",autoComplete:"email",value:x.email,onChange:E=>I("email",E.target.value),className:"mt-2 w-full rounded-xl border border-gold/20 bg-noir-900 px-4 py-3 text-left text-white outline-none focus:border-gold/60",dir:"ltr"})]})]}),o.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[o.jsxs("label",{className:"block text-sm text-stone-300",children:["المحافظة / المدينة",o.jsx("input",{required:!0,autoComplete:"address-level2",value:x.city,onChange:E=>I("city",E.target.value),className:"mt-2 w-full rounded-xl border border-gold/20 bg-noir-900 px-4 py-3 text-white outline-none focus:border-gold/60"})]}),o.jsxs("label",{className:"block text-sm text-stone-300",children:["العنوان بالتفصيل",o.jsx("input",{required:!0,autoComplete:"street-address",value:x.address,onChange:E=>I("address",E.target.value),className:"mt-2 w-full rounded-xl border border-gold/20 bg-noir-900 px-4 py-3 text-white outline-none focus:border-gold/60"})]})]}),o.jsxs("label",{className:"block text-sm text-stone-300",children:["ملاحظات الطلب ",o.jsx("span",{className:"text-stone-600",children:"(اختياري)"}),o.jsx("textarea",{rows:3,value:x.notes,onChange:E=>I("notes",E.target.value),className:"mt-2 w-full resize-none rounded-xl border border-gold/20 bg-noir-900 px-4 py-3 text-white outline-none focus:border-gold/60"})]})]}),o.jsxs("div",{className:"mt-6 rounded-2xl border border-gold/15 bg-noir-900 p-4",children:[o.jsxs("div",{className:"flex justify-between text-sm text-stone-400",children:[o.jsx("span",{children:"طريقة الدفع"}),o.jsx("span",{className:"text-stone-200",children:"الدفع عند الاستلام"})]}),o.jsxs("div",{className:"mt-3 flex justify-between font-extrabold text-stone-100",children:[o.jsx("span",{children:"الإجمالي شامل الشحن"}),o.jsx("span",{className:"text-gold",children:fe(T)})]})]}),_&&o.jsx("p",{role:"alert",className:"mt-4 rounded-xl border border-red-400/20 bg-red-400/5 px-4 py-3 text-sm leading-6 text-red-200",children:_}),!f&&o.jsx("p",{role:"alert",className:"mt-4 rounded-xl border border-amber-400/20 bg-amber-400/5 px-4 py-3 text-[13px] leading-6 text-amber-200",children:"خدمة الطلبات غير متاحة حالياً، حاولي لاحقاً."}),o.jsxs("div",{className:"mt-6 flex flex-col-reverse gap-3 sm:flex-row",children:[o.jsx("button",{type:"button",onClick:()=>p("cart"),className:"rounded-full border border-gold/25 px-5 py-3.5 text-sm font-bold text-stone-300 hover:border-gold/60 sm:py-3",children:"رجوع للسلة"}),o.jsx("button",{type:"submit",disabled:!f||j,className:"flex-1 rounded-full bg-gold px-5 py-3.5 font-extrabold text-noir-950 transition hover:brightness-110 disabled:cursor-not-allowed disabled:opacity-50 sm:py-3",children:j?"جارٍ تسجيل الطلب...":"تأكيد الطلب"})]})]}),g==="success"&&o.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center px-8 text-center",children:[o.jsx(Q.div,{initial:{scale:.5,opacity:0},animate:{scale:1,opacity:1},transition:{type:"spring",stiffness:240,damping:18},className:"flex h-20 w-20 items-center justify-center rounded-full border border-emerald-400/30 bg-emerald-400/10",children:o.jsx(Vw,{className:"h-10 w-10 text-emerald-300"})}),o.jsx("h3",{className:"mt-6 text-2xl font-extrabold text-stone-100",children:"طلبك اتسجل بنجاح"}),o.jsxs("p",{className:"mt-3 max-w-sm leading-7 text-stone-400",children:["شكراً يا ",x.customerName,"، رقم طلبك ",o.jsx("span",{className:"font-bold text-gold",children:b}),". تقدري تتابعي حالته من لوحة إدارة المتجر."]}),o.jsx("button",{type:"button",onClick:e,className:"mt-8 rounded-full bg-gold px-7 py-3 font-bold text-noir-950",children:"متابعة التسوق"})]})]})]})})}const Ij=A.createContext(null);function Ll(){const t=A.useContext(Ij);if(!t)throw new Error("useStore must be used inside <StoreProvider>");return t}function o6({children:t}){const[e,s]=A.useState([]),[i,l]=A.useState(_n),[u,d]=A.useState([]),[f,g]=A.useState(!0),[p,x]=A.useState({}),[y,b]=A.useState(!1),[w,j]=A.useState("");A.useEffect(()=>{Oj(),Xm(!1);const E=()=>{s(An().filter(L=>L.isActive!==!1)),l(Bi()),d(rO()),g(!1)};return E(),Dj(E)},[]);const N=A.useMemo(()=>Object.entries(p).map(([E,L])=>{const q=e.find(G=>G.id===Number(E));return q?{product:q,quantity:L}:null}).filter(E=>E!==null),[p,e]),_=N.reduce((E,L)=>E+L.quantity,0),k=E=>{j(E),window.setTimeout(()=>j(""),2800)},R=(E,L=1)=>{const q=p[E.id]??0,G=E.stock??0;if(E.isActive===!1||q>=G){k("الكمية المطلوبة غير متوفرة حالياً");return}if(q===0&&Object.keys(p).length>=8){k("السلة تسمح بحد أقصى ٨ منتجات مختلفة في الطلب");return}const me=Math.min(G,q+Math.max(1,L)),xe=me-q;x(Ce=>({...Ce,[E.id]:me})),k(xe<L?`تمت إضافة ${xe} فقط من ${E.name} (الكمية المتاحة)`:xe>1?`تمت إضافة ${xe} من ${E.name} إلى السلة`:`تمت إضافة ${E.name} إلى السلة`)},M=(E,L)=>{if(L<=0){x(G=>{const me={...G};return delete me[E],me});return}const q=e.find(G=>G.id===E);!q||L>(q.stock??0)||x(G=>({...G,[E]:L}))},T=async(E,L)=>{const q=ZR(E,L);return x({}),q},I={products:e,productsLoading:f,settings:i,banners:u,cartItems:N,cartCount:_,addToCart:R,changeQuantity:M,openCart:()=>b(!0),closeCart:()=>b(!1),emptyProductsMessage:f?"جارٍ تحميل المنتجات...":"سيتم عرض المجموعة قريباً."};return o.jsxs(Ij.Provider,{value:I,children:[t,o.jsx(l6,{open:y,onClose:()=>b(!1),items:N,settings:i,onQuantityChange:M,onRemove:E=>M(E,0),onPlaceOrder:T,checkoutEnabled:!0}),o.jsx(kt,{children:w&&o.jsxs(Q.div,{initial:{opacity:0,y:24,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:16,scale:.96},className:"fixed bottom-6 left-1/2 z-[80] flex -translate-x-1/2 items-center gap-3 rounded-full border border-gold/30 bg-noir-900 px-5 py-3 text-sm text-stone-100 shadow-xl",dir:"rtl",children:[o.jsx(Ra,{className:"h-4 w-4 text-gold"}),w,_>0&&o.jsx("button",{type:"button",onClick:()=>b(!0),className:"font-bold text-gold",children:"عرض السلة"})]})})]})}function c6({type:t,onClose:e,settings:s}){const[i,l]=A.useState(0);if(!t)return null;const u=f=>{l(g=>g===f?null:f)},d=()=>s.whatsappUrl?s.whatsappUrl.startsWith("http")?s.whatsappUrl:`https://wa.me/${s.whatsappUrl.replace(/[^0-9]/g,"")}`:`https://wa.me/${s.contactPhone.replace(/[^0-9]/g,"")||"201001234567"}`;return o.jsx(kt,{children:o.jsxs("div",{className:"fixed inset-0 z-[80] flex items-center justify-center p-4 sm:p-6",dir:"rtl",children:[o.jsx(Q.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:e,className:"fixed inset-0 bg-black/80 backdrop-blur-md"}),o.jsxs(Q.div,{initial:{opacity:0,scale:.95,y:15},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.95,y:15},transition:{duration:.25,ease:"easeOut"},className:"relative max-h-[88vh] w-full max-w-2xl overflow-hidden rounded-3xl border border-[#d4af37]/25 bg-[#0e0c09] shadow-[0_25px_80px_rgba(0,0,0,0.85)] flex flex-col z-10",children:[o.jsxs("div",{className:"flex items-center justify-between border-b border-white/[0.08] px-6 py-5 bg-gradient-to-r from-white/[0.02] to-transparent",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("span",{className:"flex h-11 w-11 items-center justify-center rounded-2xl border border-[#d4af37]/30 bg-[#d4af37]/10 text-[#e7c44e]",children:[t==="faq"&&o.jsx(Gw,{className:"h-5 w-5"}),t==="shipping"&&o.jsx(Ol,{className:"h-5 w-5"}),t==="return"&&o.jsx(Hf,{className:"h-5 w-5"})]}),o.jsxs("div",{children:[o.jsxs("h3",{className:"font-serif text-lg font-bold text-[#e7c44e]",children:[t==="faq"&&"الأسئلة الشائعة",t==="shipping"&&"سياسة الشحن والتوصيل",t==="return"&&"سياسة الاسترجاع والاستبدال"]}),o.jsxs("p",{className:"text-xs text-stone-400",children:[t==="faq"&&"كل ما تحتاجين معرفته عن منتجات وخدمات جوفيل",t==="shipping"&&"مواعيد ورسوم التوصيل لكافة المحافظات",t==="return"&&"ضمان الجودة وراحة البال خلال 14 يوماً"]})]})]}),o.jsx("button",{onClick:e,className:"flex h-9 w-9 items-center justify-center rounded-full border border-white/10 text-stone-400 transition hover:border-[#d4af37] hover:text-[#e7c44e]","aria-label":"إغلاق",children:o.jsx(Ks,{className:"h-5 w-5"})})]}),o.jsxs("div",{className:"overflow-y-auto p-6 space-y-5 text-stone-300 text-sm leading-relaxed max-h-[calc(88vh-140px)]",children:[t==="faq"&&o.jsxs("div",{className:"space-y-3",children:[s.faqs&&s.faqs.length>0?s.faqs.map((f,g)=>{const p=i===g;return o.jsxs("div",{className:"rounded-2xl border border-white/[0.08] bg-white/[0.02] transition hover:border-[#d4af37]/30",children:[o.jsxs("button",{type:"button",onClick:()=>u(g),className:"flex w-full items-center justify-between p-4 text-right font-semibold text-stone-100 transition",children:[o.jsxs("span",{className:"flex items-center gap-2.5",children:[o.jsx(Vc,{className:"h-4 w-4 text-[#e7c44e] shrink-0"}),f.question]}),o.jsx(El,{className:`h-4 w-4 text-stone-400 transition-transform duration-200 shrink-0 ${p?"rotate-180 text-[#e7c44e]":""}`})]}),o.jsx(kt,{initial:!1,children:p&&o.jsx(Q.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsx("div",{className:"border-t border-white/[0.06] px-4 pb-4 pt-3 text-stone-300 text-xs sm:text-sm leading-relaxed",children:f.answer})})})]},f.id||g)}):o.jsx("p",{className:"text-center text-stone-500 py-8",children:"لا توجد أسئلة شائعة مضافة حالياً."}),o.jsxs("div",{className:"mt-6 rounded-2xl border border-[#d4af37]/20 bg-[#d4af37]/[0.04] p-4 flex flex-col sm:flex-row items-center justify-between gap-3 text-center sm:text-right",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-bold text-stone-100",children:"هل لديكِ استفسار آخر؟"}),o.jsx("p",{className:"text-xs text-stone-400 mt-0.5",children:"فريق جوفيل متاح للإجابة على جميع تساؤلاتك فورياً."})]}),o.jsxs("a",{href:d(),target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 rounded-xl bg-emerald-600 hover:bg-emerald-500 px-4 py-2.5 text-xs font-bold text-white transition shrink-0",children:[o.jsx(b2,{className:"h-4 w-4"}),"تحدثي معنا عبر واتساب"]})]})]}),t==="shipping"&&o.jsxs("div",{className:"space-y-5",children:[o.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[o.jsxs("div",{className:"rounded-2xl border border-white/[0.08] bg-white/[0.02] p-4",children:[o.jsx("span",{className:"text-xs text-stone-500",children:"مدة التوصيل"}),o.jsx("p",{className:"mt-1 text-base font-bold text-[#e7c44e]",children:"2 إلى 4 أيام عمل"}),o.jsx("p",{className:"text-xs text-stone-400 mt-1",children:"لكافة محافظات جمهورية مصر العربية"})]}),o.jsxs("div",{className:"rounded-2xl border border-white/[0.08] bg-white/[0.02] p-4",children:[o.jsx("span",{className:"text-xs text-stone-500",children:"الشحن المجاني"}),o.jsxs("p",{className:"mt-1 text-base font-bold text-emerald-400",children:["للطلبات فوق ",s.freeShippingAt," ج.م"]}),o.jsxs("p",{className:"text-xs text-stone-400 mt-1",children:["تكلفة الشحن العادية ",s.shippingFee," ج.م"]})]})]}),o.jsxs("div",{className:"rounded-2xl border border-white/[0.08] bg-white/[0.02] p-5",children:[o.jsxs("h4",{className:"font-bold text-stone-100 mb-3 flex items-center gap-2",children:[o.jsx(Ii,{className:"h-4 w-4 text-[#e7c44e]"}),"تفاصيل وضوابط التوصيل"]}),o.jsx("div",{className:"whitespace-pre-line text-stone-300 text-xs sm:text-sm leading-relaxed",children:s.shippingPolicy})]})]}),t==="return"&&o.jsxs("div",{className:"space-y-5",children:[o.jsxs("div",{className:"rounded-2xl border border-emerald-500/20 bg-emerald-500/5 p-4 flex items-center gap-3",children:[o.jsx("div",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-xl bg-emerald-500/10 text-emerald-400",children:o.jsx(Hf,{className:"h-5 w-5"})}),o.jsxs("div",{children:[o.jsx("h4",{className:"text-sm font-bold text-emerald-300",children:"ضمان الاسترجاع والاستبدال خلال 14 يوماً"}),o.jsx("p",{className:"text-xs text-stone-400 mt-0.5",children:"يمكنك استبدال أو استرجاع المنتجات غير المفتوحة بكل سهولة ويسر."})]})]}),o.jsxs("div",{className:"rounded-2xl border border-white/[0.08] bg-white/[0.02] p-5",children:[o.jsxs("h4",{className:"font-bold text-stone-100 mb-3 flex items-center gap-2",children:[o.jsx(Vc,{className:"h-4 w-4 text-[#e7c44e]"}),"شروط وضوابط الاسترجاع"]}),o.jsx("div",{className:"whitespace-pre-line text-stone-300 text-xs sm:text-sm leading-relaxed",children:s.returnPolicy})]}),o.jsxs("div",{className:"rounded-2xl border border-white/[0.08] bg-white/[0.02] p-4 text-xs text-stone-400 flex items-center justify-between",children:[o.jsx("span",{children:"لطلب استرجاع، يرجى التواصل معنا عبر:"}),o.jsx("span",{className:"font-mono text-[#e7c44e] font-bold",dir:"ltr",children:s.contactPhone})]})]})]})]})]})})}const u6=[{label:"العناية بالبشرة",category:"العناية بالبشرة"},{label:"العناية بالشعر",category:"العناية بالشعر"},{label:"العناية بالجسم",category:"العناية بالجسم"},{label:"العطور",category:"العطور"},{label:"العروض"}];function Zm({siteName:t,phone:e,email:s,address:i}){const{settings:l}=Ll(),[u,d]=A.useState(null),f=t||l.siteName||"JUVEL",g=e||l.contactPhone||"+20 100 123 4567",p=s||l.contactEmail||"hello@juvel.com",x=i||l.address||"القاهرة الجديدة، مصر";function y(j,N="#"){if(!j||!j.trim())return N;const _=j.trim();return _.startsWith("http://")||_.startsWith("https://")?_:`https://${_}`}const b=()=>{if(l.whatsappUrl&&l.whatsappUrl.trim()){const N=l.whatsappUrl.trim();if(N.startsWith("http://")||N.startsWith("https://"))return N;const _=N.replace(/[^0-9]/g,"");return _.length>=8?`https://wa.me/${_}`:`https://${N}`}return`https://wa.me/${g.replace(/[^0-9]/g,"")||"201001234567"}`},w=[{label:"Instagram",url:y(l.instagramUrl,"https://instagram.com"),path:"M12 2.2c3.2 0 3.6 0 4.9.1 3.3.1 4.8 1.7 4.9 4.9.1 1.3.1 1.6.1 4.8 0 3.2 0 3.6-.1 4.8-.1 3.2-1.7 4.8-4.9 4.9-1.3.1-1.6.1-4.9.1-3.2 0-3.6 0-4.8-.1-3.3-.1-4.8-1.7-4.9-4.9-.1-1.3-.1-1.6-.1-4.8 0-3.2 0-3.6.1-4.8C2.4 4 4 2.4 7.2 2.3 8.4 2.2 8.8 2.2 12 2.2zm0 3.7a6.1 6.1 0 100 12.2 6.1 6.1 0 000-12.2zm0 2.2a3.9 3.9 0 110 7.8 3.9 3.9 0 010-7.8zm6.4-3.8a1.44 1.44 0 100 2.88 1.44 1.44 0 000-2.88z"},{label:"Facebook",url:y(l.facebookUrl,"https://facebook.com"),path:"M24 12.07C24 5.41 18.63 0 12 0S0 5.41 0 12.07C0 18.1 4.39 23.09 10.13 24v-8.44H7.08v-3.49h3.04V9.41c0-3.02 1.8-4.7 4.54-4.7 1.31 0 2.68.24 2.68.24v2.97h-1.5c-1.5 0-1.96.93-1.96 1.89v2.26h3.32l-.53 3.49h-2.8V24C19.62 23.09 24 18.1 24 12.07z"},{label:"TikTok",url:y(l.tiktokUrl,"https://tiktok.com"),path:"M12.53.02C13.84 0 15.14.01 16.44 0c.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"},{label:"WhatsApp",url:b(),path:"M17.47 14.38c-.3-.15-1.76-.87-2.03-.97-.27-.1-.47-.15-.67.15-.2.3-.77.96-.94 1.16-.17.2-.35.22-.64.07-.3-.15-1.26-.46-2.4-1.48-.88-.79-1.48-1.76-1.65-2.06-.17-.3-.02-.46.13-.6.13-.13.35-.45.52-.52.15-.17.2-.3.3-.5.1-.2.05-.37-.02-.52-.07-.15-.67-1.62-.92-2.22-.24-.58-.49-.5-.67-.51h-.57c-.2 0-.52.07-.8.37-.27.3-1.04 1.02-1.04 2.5 0 1.47 1.07 2.89 1.22 3.09.15.2 2.11 3.22 5.1 4.51.71.31 1.27.49 1.7.63.72.23 1.37.2 1.88.12.57-.09 1.76-.72 2.01-1.41.25-.7.25-1.29.17-1.41-.07-.13-.27-.2-.57-.35m-5.42 7.4h-.01a9.87 9.87 0 01-5.03-1.38l-.36-.21-3.74.98 1-3.65-.24-.37a9.86 9.86 0 01-1.51-5.26c0-5.45 4.44-9.88 9.9-9.88 5.46 0 9.89 4.43 9.89 9.89 0 5.45-4.43 9.88-9.9 9.88m8.42-18.3A11.82 11.82 0 0012.05 0C5.5 0 .16 5.33.16 11.89c0 2.1.55 4.14 1.59 5.94L.06 24l6.33-1.66a11.9 11.9 0 005.66 1.44h.01c6.55 0 11.89-5.33 11.89-11.89 0-3.18-1.24-6.16-3.48-8.41"}];return o.jsxs(o.Fragment,{children:[o.jsx("footer",{className:"relative border-t border-gold/15 bg-noir-950",children:o.jsxs("div",{className:"mx-auto max-w-7xl px-6 py-14 sm:px-8 sm:py-16",children:[o.jsxs("div",{className:"grid gap-10 sm:grid-cols-2 sm:gap-12 lg:grid-cols-4",children:[o.jsxs("div",{children:[o.jsxs("a",{href:wl("home"),onClick:vl("home"),className:"flex items-center gap-2.5",children:[o.jsx("img",{src:"/images/logo.png",alt:f,className:"h-12 w-12 rounded-full border border-gold/40 object-cover"}),o.jsxs("div",{className:"leading-tight",children:[o.jsx("span",{className:"font-serif text-2xl tracking-[0.25em] text-gold-gradient",children:f}),o.jsx("span",{className:"block text-[10px] tracking-[0.4em] text-gold-300/60",children:"جـوفـيـل"})]})]}),o.jsx("p",{className:"mt-5 max-w-xs text-[13.5px] leading-[1.95] text-stone-400 sm:text-[14.5px]",children:"جمالك من الطبيعة.. مستحضرات فاخرة بمكونات نقية ١٠٠٪ تليق بتميّزك."}),o.jsx("div",{className:"mt-6 flex items-center gap-3",children:w.map(j=>o.jsx("a",{href:j.url,target:"_blank",rel:"noopener noreferrer","aria-label":j.label,className:"flex h-10 w-10 items-center justify-center rounded-full border border-gold/25 text-gold-300/80 transition-all duration-300 hover:-translate-y-1 hover:border-gold hover:bg-gold hover:text-noir-950 hover:shadow-[0_4px_20px_rgba(212,175,55,0.4)]",children:o.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"h-4 w-4",children:o.jsx("path",{d:j.path})})},j.label))})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"mb-4 text-[15px] font-bold text-gold-300 sm:mb-5 sm:text-base",children:"تسوّقي"}),o.jsx("ul",{className:"space-y-3",children:u6.map(j=>{const N=j.category?`category=${encodeURIComponent(j.category)}`:void 0;return o.jsx("li",{children:o.jsx("a",{href:Mt("/products",N),onClick:Dt("/products",N),className:"inline-block py-0.5 text-[13.5px] text-stone-400 transition-colors hover:text-gold sm:text-[14.5px]",children:j.label})},j.label)})})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"mb-4 text-[15px] font-bold text-gold-300 sm:mb-5 sm:text-base",children:"المساعدة"}),o.jsxs("ul",{className:"space-y-3",children:[o.jsx("li",{children:o.jsx("button",{type:"button",onClick:()=>d("faq"),className:"inline-block py-0.5 text-[13.5px] text-stone-400 transition-colors hover:text-gold sm:text-[14.5px] text-right",children:"الأسئلة الشائعة"})}),o.jsx("li",{children:o.jsx("button",{type:"button",onClick:()=>d("shipping"),className:"inline-block py-0.5 text-[13.5px] text-stone-400 transition-colors hover:text-gold sm:text-[14.5px] text-right",children:"سياسة الشحن"})}),o.jsx("li",{children:o.jsx("button",{type:"button",onClick:()=>d("return"),className:"inline-block py-0.5 text-[13.5px] text-stone-400 transition-colors hover:text-gold sm:text-[14.5px] text-right",children:"سياسة الاسترجاع"})}),o.jsx("li",{children:o.jsx("a",{href:b(),target:"_blank",rel:"noopener noreferrer",className:"inline-block py-0.5 text-[13.5px] text-stone-400 transition-colors hover:text-gold sm:text-[14.5px]",children:"اتصلي بنا"})})]})]}),o.jsxs("div",{children:[o.jsx("h4",{className:"mb-4 text-[15px] font-bold text-gold-300 sm:mb-5 sm:text-base",children:"تواصلي معنا"}),o.jsxs("ul",{className:"space-y-3.5 text-[13.5px] text-stone-400 sm:text-[14.5px]",children:[o.jsxs("li",{className:"flex items-center gap-3",children:[o.jsx(sE,{className:"h-4.5 w-4.5 shrink-0 text-gold"}),x]}),o.jsxs("li",{className:"flex items-center gap-3",dir:"ltr",children:[o.jsx(Im,{className:"h-4.5 w-4.5 shrink-0 text-gold"}),o.jsx("a",{href:`tel:${g}`,className:"hover:text-gold transition",children:g})]}),o.jsxs("li",{className:"flex items-center gap-3",children:[o.jsx(Hm,{className:"h-4.5 w-4.5 shrink-0 text-gold"}),o.jsx("a",{href:`mailto:${p}`,className:"hover:text-gold transition",children:p})]})]})]})]}),o.jsxs("div",{className:"mt-14 flex flex-col items-center justify-between gap-4 border-t border-gold/10 pt-8 sm:flex-row",children:[o.jsxs("p",{className:"text-sm text-stone-500",children:["© ",new Date().getFullYear()," جوفيل — جميع الحقوق محفوظة"]}),o.jsxs("p",{className:"flex items-center gap-1.5 text-sm text-stone-500",children:["صُنع بـ ",o.jsx("span",{className:"text-gold",children:"♥"})," من قلب الطبيعة"]})]})]})}),o.jsx(c6,{type:u,onClose:()=>d(null),settings:l})]})}const Mv=2600;function d6({onEnter:t}){const e=$m(),[s,i]=A.useState(!!e),l=A.useRef(null),u=Pc(0),d=Pc(0),f=Rb(u,{stiffness:45,damping:20,mass:.8}),g=Rb(d,{stiffness:45,damping:20,mass:.8}),p=$c(g,[-.5,.5],[1.7,-1.7]),x=$c(f,[-.5,.5],[-2.5,2.5]);A.useEffect(()=>{if(e){i(!0);return}i(!1);const w=window.setTimeout(()=>i(!0),Mv);return()=>window.clearTimeout(w)},[e]),A.useEffect(()=>{s&&l.current?.focus({preventScroll:!0})},[s]),A.useEffect(()=>{const w=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=w}},[]);const y=w=>{if(e||w.pointerType==="touch")return;const j=w.currentTarget.getBoundingClientRect();u.set((w.clientX-j.left-j.width/2)/j.width),d.set((w.clientY-j.top-j.height/2)/j.height)},b=()=>{u.set(0),d.set(0)};return o.jsxs(Q.section,{role:"dialog","aria-modal":"true","aria-label":"مقدمة متجر Juvel",dir:"rtl",onPointerMove:y,onPointerLeave:b,initial:{opacity:1},animate:{opacity:1},exit:{opacity:0,scale:1.025,filter:"blur(12px)"},transition:{duration:.9,ease:[.22,1,.36,1]},className:"juvel-intro fixed inset-0 z-[100] isolate min-h-[100svh] overflow-hidden bg-[#070604] text-[#f5efe2]",children:[o.jsx(Q.div,{"aria-hidden":"true",className:"juvel-intro-image absolute inset-[-3%]",style:{transformPerspective:1200,rotateX:p,rotateY:x},children:o.jsx(Q.img,{src:"/images/hero.webp",alt:"",fetchPriority:"high",draggable:!1,initial:{opacity:0,scale:1.18,filter:"brightness(0.35) contrast(1.15) saturate(1.1) blur(10px)"},animate:e?{opacity:1,scale:1.03,filter:"brightness(1) contrast(1.08) saturate(1.12) blur(0px)"}:{opacity:[0,.75,1,1],scale:[1.18,1.08,1.03,1.05],filter:["brightness(0.35) contrast(1.15) saturate(1.1) blur(10px)","brightness(0.8) contrast(1.12) saturate(1.12) blur(2px)","brightness(1.08) contrast(1.1) saturate(1.15) blur(0px)","brightness(1) contrast(1.08) saturate(1.12) blur(0px)"]},transition:{duration:e?.25:2.8,times:[0,.3,.65,1],ease:[.22,1,.36,1]},className:"h-full w-full select-none object-cover object-center"})}),o.jsx("div",{"aria-hidden":"true",className:"juvel-intro-vignette pointer-events-none absolute inset-0"}),o.jsx("div",{"aria-hidden":"true",className:"juvel-intro-grain pointer-events-none absolute inset-0"}),o.jsx(Q.div,{"aria-hidden":"true",initial:{x:"-130%",opacity:0},animate:e?{opacity:0}:{x:"130%",opacity:[0,.92,.45,0]},transition:{duration:2.2,delay:.35,ease:[.72,0,.28,1]},className:"juvel-intro-light-sweep pointer-events-none absolute inset-y-[-25%] z-10 w-[19vw]"}),o.jsxs("div",{"aria-hidden":"true",className:"juvel-orbit-scene pointer-events-none absolute inset-0",children:[o.jsx(Q.div,{initial:{opacity:0,scale:.52,rotateZ:-16},animate:e?{opacity:.55,scale:1.02,rotateZ:14}:{opacity:[0,.85,.6],scale:[.52,1.02,1.12],rotateZ:374},transition:{duration:e?.3:5.6,delay:.5,ease:[.16,1,.3,1]},style:{rotateX:68,rotateY:-18},className:"juvel-orbit juvel-orbit-one"}),o.jsx(Q.div,{initial:{opacity:0,scale:.6,rotateZ:18},animate:e?{opacity:.35,scale:1.04,rotateZ:-28}:{opacity:[0,.6,.4],scale:[.6,1.04,1.14],rotateZ:-388},transition:{duration:e?.3:6.3,delay:.9,ease:[.16,1,.3,1]},style:{rotateX:60,rotateY:34},className:"juvel-orbit juvel-orbit-two"}),o.jsx("div",{className:"juvel-orbit juvel-orbit-three"}),o.jsx(Q.span,{className:"juvel-orbit-star juvel-star-one",initial:{opacity:0,scale:0},animate:e?{opacity:.65,scale:1,y:0}:{opacity:[0,.92,.48],scale:[0,1.25,.92],y:[18,-8,0]},transition:{duration:e?.01:3.8,delay:e?0:1.45,repeat:e?0:1/0,repeatType:"reverse",repeatDelay:.8},children:"·"}),o.jsx(Q.span,{className:"juvel-orbit-star juvel-star-two",initial:{opacity:0,scale:0},animate:e?{opacity:.55,scale:1,y:0}:{opacity:[0,.72,.34],scale:[0,1,.82],y:[-12,13,0]},transition:{duration:e?.01:4.4,delay:e?0:2.1,repeat:e?0:1/0,repeatType:"reverse",repeatDelay:.3},children:"·"})]}),o.jsxs("div",{className:"juvel-intro-topline absolute inset-x-0 top-0 z-20 flex items-center justify-between px-6 py-6 sm:px-10 lg:px-14",children:[o.jsxs(Q.div,{initial:{opacity:0,y:-14},animate:{opacity:1,y:0},transition:{duration:e?.01:.8,delay:e?0:.3},className:"flex items-center gap-2.5 text-[10px] font-semibold tracking-[0.22em] text-[#ecd08a] sm:text-xs",children:[o.jsx(uu,{className:"h-3.5 w-3.5 text-[#d4af37]"}),o.jsx("span",{children:"BOTANICAL BEAUTY RITUAL"})]}),o.jsx(Q.span,{initial:{opacity:0},animate:{opacity:1},transition:{duration:e?.01:1,delay:e?0:.6},className:"hidden text-[10px] tracking-[0.2em] text-white/60 sm:block",children:"A NATURE-LED BEAUTY HOUSE"})]}),o.jsxs("div",{className:"juvel-intro-copy absolute z-20 flex flex-col items-end text-right",children:[o.jsxs(Q.div,{initial:{opacity:0,y:26,filter:"blur(8px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},transition:{duration:e?.01:1.2,delay:e?0:.85,ease:[.22,1,.36,1]},className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-[11px] font-semibold tracking-[0.3em] text-[#ecd08a] sm:text-xs",children:"جمالكِ من الطبيعة"}),o.jsx("span",{className:"h-px w-10 bg-gradient-to-l from-[#e1bf65] to-transparent"})]}),o.jsx(Q.h1,{initial:{opacity:0,y:34,filter:"blur(12px)",letterSpacing:"0.38em"},animate:{opacity:1,y:0,filter:"blur(0px)",letterSpacing:"0.18em"},transition:{duration:e?.01:1.7,delay:e?0:.55,ease:[.16,1,.3,1]},dir:"ltr",className:"juvel-intro-wordmark mt-4 font-serif font-normal leading-none",children:"JUVEL"}),o.jsxs(Q.div,{initial:{opacity:0,y:28,filter:"blur(9px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},transition:{duration:e?.01:1.15,delay:e?0:1.05,ease:[.22,1,.36,1]},className:"mt-5",children:[o.jsxs("p",{className:"juvel-intro-headline font-serif text-xl font-medium leading-relaxed text-white sm:text-2xl lg:text-[2.1rem]",children:["طقوسُ جمالٍ",o.jsx("br",{}),o.jsx("span",{className:"juvel-intro-gold",children:"تنتمي للطبيعة"})]}),o.jsx("p",{className:"juvel-intro-body mt-3 max-w-sm text-[13px] leading-7 text-[#f1e9d8] sm:text-[14.5px]",children:"مكونات نقية. عناية تليق بكِ. لمسة من الذهب في كل تفصيلة."})]}),o.jsx(Q.div,{initial:{opacity:0,scaleX:0},animate:{opacity:1,scaleX:1},transition:{duration:e?.01:1.1,delay:e?0:1.4,ease:[.22,1,.36,1]},className:"juvel-intro-divider mt-6 h-px w-full origin-right"}),o.jsx("div",{"aria-live":"polite",className:"juvel-enter-slot mt-7 min-h-[62px]",children:s&&o.jsxs(Q.button,{ref:l,type:"button",onClick:t,initial:{opacity:0,y:18,scale:.96},animate:{opacity:1,y:0,scale:1},transition:{duration:.65,ease:[.22,1,.36,1]},whileHover:e?void 0:{scale:1.035,y:-2},whileTap:{scale:.98},className:"group relative inline-flex items-center gap-4 overflow-hidden rounded-full border border-[#e5c875]/65 bg-[#d4af37] px-7 py-3.5 text-sm font-bold text-[#110e08] shadow-[0_12px_55px_-15px_rgba(225,190,85,0.7)] outline-none transition-shadow hover:shadow-[0_18px_65px_-12px_rgba(225,190,85,0.9)] focus-visible:ring-2 focus-visible:ring-[#f6e5ad] focus-visible:ring-offset-4 focus-visible:ring-offset-[#070604] sm:px-9 sm:py-4",children:[o.jsx(Q.span,{"aria-hidden":"true",className:"absolute inset-0 -translate-x-full bg-gradient-to-l from-transparent via-white/50 to-transparent",animate:e?void 0:{x:["115%","-115%"]},transition:{duration:2.4,repeat:1/0,repeatDelay:1.6,ease:"easeInOut"}}),o.jsx("span",{className:"relative z-10",children:"ادخلي عالم جوفيل"}),o.jsx(Ci,{className:"relative z-10 h-4 w-4 transition-transform duration-300 group-hover:-translate-x-1"})]})})]}),!s&&!e&&o.jsx("div",{className:"juvel-intro-progress absolute bottom-0 left-0 right-0 z-30 h-px overflow-hidden bg-white/[0.08]","aria-hidden":"true",children:o.jsx(Q.div,{initial:{scaleX:0},animate:{scaleX:1},transition:{duration:Mv/1e3,ease:"linear"},className:"h-full origin-right bg-gradient-to-l from-[#f2dda0] via-[#d4af37] to-transparent shadow-[0_0_18px_#d4af37]"})}),o.jsxs("div",{"aria-hidden":"true",className:"juvel-intro-monogram pointer-events-none absolute bottom-7 left-7 z-20 hidden items-center gap-2 text-[10px] tracking-[0.18em] text-white/55 sm:flex lg:bottom-10 lg:left-14",children:[o.jsx(Vc,{className:"h-3.5 w-3.5 text-[#e2bd55]"}),o.jsx("span",{children:"NATURE, REFINED."})]})]})}function h6({onEnter:t}){const e=$m(),[s,i]=A.useState("closed"),l=s==="opening"||s==="done";A.useEffect(()=>{const d=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=d}},[]),A.useEffect(()=>{if(s!=="knocking"&&s!=="opening")return;const d=[];return s==="knocking"&&d.push(window.setTimeout(()=>i("opening"),640)),s==="opening"&&d.push(window.setTimeout(()=>t(),1500)),()=>d.forEach(f=>window.clearTimeout(f))},[s,t]);const u=()=>{if(s==="closed"){if(e){t();return}i("knocking")}};return o.jsxs(Q.section,{role:"dialog","aria-modal":"true","aria-label":"بوابة جوفيل",dir:"rtl",initial:{opacity:1},animate:{opacity:1},exit:{opacity:0,transition:{duration:.45,ease:"easeOut"}},className:"fixed inset-0 z-[100] isolate flex min-h-[100svh] flex-col items-center justify-center overflow-hidden bg-[#070604] text-[#f5efe2]",children:[o.jsxs(Q.div,{className:"relative flex w-full flex-1 flex-col items-center justify-center",animate:l?{scale:[1,1.09],y:[0,14]}:{scale:1,y:0},transition:{duration:1.5,ease:[.5,0,.3,1]},children:[o.jsx(Q.div,{"aria-hidden":!0,animate:l?{opacity:.55,scale:1.25}:{opacity:[.3,.42,.3],scale:[1,1.04,1]},transition:l?{duration:1.2}:{duration:4,repeat:1/0},className:"pointer-events-none absolute left-1/2 top-1/2 h-[95vmin] w-[95vmin] -translate-x-1/2 -translate-y-1/2 rounded-full",style:{background:"radial-gradient(circle, rgba(212,175,55,0.32) 0%, rgba(212,175,55,0.12) 35%, transparent 65%)",willChange:"opacity, transform"}}),o.jsxs(Q.div,{initial:{opacity:0},animate:{opacity:l?0:1},transition:{duration:.6},className:"absolute inset-x-0 top-0 flex items-center justify-between px-6 py-6 text-[10px] tracking-[0.25em] text-[#ecd08a]/75 sm:px-10 sm:text-xs",children:[o.jsx("span",{children:"A NATURE-LED BEAUTY HOUSE"}),o.jsx("span",{className:"hidden sm:block",children:"EST. CAIRO"})]}),o.jsxs(Q.button,{type:"button",onClick:u,"aria-label":"افتحي بوابة جوفيل",initial:{opacity:0,y:30},animate:s==="knocking"?{opacity:1,y:0,x:[0,-5,4,-3,2,0]}:{opacity:1,y:0,x:0},transition:s==="knocking"?{duration:.5,times:[0,.25,.5,.7,.87,1]}:{duration:1,ease:[.22,1,.36,1]},whileHover:s==="closed"&&!e?{scale:1.006}:void 0,className:"group relative outline-none",style:{perspective:1600},children:[s==="knocking"&&[0,140].map(d=>o.jsx(Q.span,{"aria-hidden":!0,initial:{scale:.95,opacity:.8},animate:{scale:1.22,opacity:0},transition:{duration:.6,delay:d/1e3},className:"pointer-events-none absolute inset-0 rounded-t-[46%] border-2 border-[#e1bf65]"},d)),o.jsxs("div",{className:"relative h-[76vh] max-h-[680px] w-[min(92vw,520px)] overflow-hidden border border-[#d4af37]/40 shadow-[0_40px_110px_-25px_rgba(0,0,0,0.95),0_0_90px_-20px_rgba(212,175,55,0.35)]",style:{borderRadius:"48% 48% 12px 12px / 32% 32% 12px 12px",transformStyle:"preserve-3d"},children:[o.jsxs("div",{className:"absolute inset-0 bg-[#0b0906]",children:[o.jsx(Q.img,{src:"/images/hero.webp",alt:"",draggable:!1,initial:{scale:1.3,opacity:.55},animate:l?{scale:1.04,opacity:1}:{scale:1.18,opacity:.62},transition:{duration:l?1.6:1,ease:[.22,1,.36,1]},className:"h-full w-full select-none object-cover",style:{willChange:"transform, opacity"}}),o.jsx(Q.div,{"aria-hidden":!0,initial:{opacity:.55},animate:l?{opacity:.08}:{opacity:.5},transition:{duration:l?1.6:1,ease:[.22,1,.36,1]},className:"absolute inset-0 bg-[#070604]",style:{willChange:"opacity"}}),o.jsx("div",{"aria-hidden":!0,className:"absolute inset-0 bg-gradient-to-t from-[#070604] via-transparent to-[#070604]/55"}),l&&[-2,-1,0,1,2].map(d=>o.jsx(Q.div,{"aria-hidden":!0,initial:{opacity:0,scaleY:.4},animate:{opacity:[0,.55,.2],scaleY:[.4,1.15,1]},transition:{duration:1.3,delay:.15+Math.abs(d)*.06},className:"absolute inset-y-0 left-1/2 w-16 -translate-x-1/2",style:{transform:`translateX(-50%) rotate(${d*9}deg)`,transformOrigin:"top center",background:"linear-gradient(to bottom, rgba(246,229,173,0.55), transparent 78%)",willChange:"opacity, transform"}},d)),[...Array(8)].map((d,f)=>o.jsx(Q.span,{"aria-hidden":!0,className:"absolute text-[#e2bd55]",style:{top:`${10+f*10}%`,left:`${6+f%4*27}%`,fontSize:7+f%3*3},animate:l?{y:[0,-26],opacity:[.4,0],scale:[1,1.4]}:{y:[0,-14,0],opacity:[.15,.75,.15]},transition:l?{duration:1.2,delay:f*.08}:{duration:3+f%3,repeat:1/0,delay:f*.4},children:"·"},f))]}),o.jsx(Uv,{side:"right",opening:l}),o.jsx(Uv,{side:"left",opening:l}),!l&&o.jsx(Q.span,{"aria-hidden":!0,animate:{opacity:[.45,1,.45],scaleY:[1,1.03,1]},transition:{duration:1.7,repeat:1/0},className:"pointer-events-none absolute inset-y-4 left-1/2 w-[3px] -translate-x-1/2 bg-gradient-to-b from-transparent via-[#f6e5ad] to-transparent shadow-[0_0_18px_3px_rgba(230,196,110,0.6)]"}),l&&o.jsx(Q.div,{"aria-hidden":!0,initial:{opacity:0},animate:{opacity:[0,1,.35]},transition:{duration:.7,times:[0,.25,1]},className:"pointer-events-none absolute inset-0",style:{background:"radial-gradient(circle at 50% 45%, rgba(246,229,173,0.95), rgba(212,175,55,0.5) 32%, transparent 70%)"}}),o.jsx(Q.div,{"aria-hidden":l,animate:l?{y:-40,scale:1.12,opacity:0}:{y:0,scale:1,opacity:1},transition:{duration:.7,ease:[.4,0,1,1]},className:"absolute left-1/2 top-1/2 z-10 -translate-x-1/2 -translate-y-1/2",children:o.jsxs("div",{className:"relative flex h-36 w-36 items-center justify-center sm:h-40 sm:w-40",children:[o.jsx(Q.span,{"aria-hidden":!0,animate:{rotate:360},transition:{duration:9,repeat:1/0,ease:"linear"},className:"absolute inset-0 rounded-full",style:{background:"conic-gradient(from 0deg, transparent 0deg, rgba(246,229,173,0.75) 55deg, transparent 110deg)",mask:"radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px))",WebkitMask:"radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px))"}}),o.jsx("span",{"aria-hidden":!0,className:"absolute inset-0 rounded-full border-2 border-[#d4af37]/70"}),o.jsx(Q.span,{"aria-hidden":!0,animate:{rotate:-360},transition:{duration:6,repeat:1/0,ease:"linear"},className:"absolute inset-0",children:o.jsx("span",{className:"absolute left-1/2 top-[-4px] h-2 w-2 -translate-x-1/2 rounded-full bg-[#f6e5ad] shadow-[0_0_8px_rgba(246,229,173,0.9)]"})}),o.jsx(Q.div,{animate:l?void 0:{scale:[1,1.035,1]},transition:{duration:2.6,repeat:1/0},className:"flex h-[82%] w-[82%] items-center justify-center rounded-full bg-[#0b0906]/90 shadow-[inset_0_0_28px_rgba(0,0,0,0.95),0_0_50px_-6px_rgba(212,175,55,0.5)]",children:o.jsx("img",{src:"/images/logo.png",alt:"شعار جوفيل",className:"h-full w-full rounded-full object-cover"})}),o.jsx("span",{className:"absolute right-[-52px] top-1/2 h-3.5 w-3.5 -translate-y-1/2 rounded-full bg-gradient-to-br from-[#f3dca3] to-[#a8842a] shadow-[0_0_12px_rgba(230,196,110,0.75)]"}),o.jsx("span",{className:"absolute left-[-52px] top-1/2 h-3.5 w-3.5 -translate-y-1/2 rounded-full bg-gradient-to-br from-[#f3dca3] to-[#a8842a] shadow-[0_0_12px_rgba(230,196,110,0.75)]"})]})})]})]}),o.jsxs(Q.div,{initial:{opacity:0,y:18},animate:{opacity:l?0:1,y:l?10:0},transition:{duration:.7,delay:l?0:.35},className:"mt-7 flex flex-col items-center text-center",children:[o.jsx(Q.h1,{initial:{letterSpacing:"0.55em",opacity:0},animate:{letterSpacing:"0.24em",opacity:1},transition:{duration:1.5,delay:.3,ease:[.16,1,.3,1]},dir:"ltr",className:"font-serif text-4xl font-normal leading-none text-[#f2dda0] sm:text-5xl",children:"JUVEL"}),o.jsx("p",{className:"mt-3 text-[12px] tracking-[0.28em] text-[#ecd08a]/85 sm:text-sm",children:"طقوسُ جمالٍ تنتمي للطبيعة"}),o.jsxs("p",{className:"mt-1.5 flex items-center gap-2 text-[10px] tracking-[0.35em] text-white/45 sm:text-[11px]",children:[o.jsx("span",{className:"h-px w-6 bg-gradient-to-l from-[#e1bf65] to-transparent"}),"NATURE, REFINED",o.jsx("span",{className:"h-px w-6 bg-gradient-to-r from-[#e1bf65] to-transparent"})]}),o.jsx(Q.p,{animate:s==="closed"?{opacity:[.55,1,.55]}:{opacity:0},transition:{duration:2.2,repeat:s==="closed"?1/0:0},className:"mt-6 flex items-center gap-2 text-[13px] font-semibold text-[#ecd08a] sm:text-sm",children:s==="closed"?o.jsxs(o.Fragment,{children:[o.jsx(Ci,{className:"h-4 w-4"}),"اطرقي الباب لتدخلي عالم جوفيل"]}):o.jsx("span",{children:"أهلاً بيكي ✨"})})]})]}),l&&o.jsx(Q.div,{"aria-hidden":!0,initial:{opacity:0},animate:{opacity:[0,.12,.85,1]},transition:{duration:1.55,times:[0,.4,.78,1],ease:"easeIn"},className:"pointer-events-none absolute inset-0 z-20",style:{background:"radial-gradient(circle at 50% 48%, #fdf6e0 0%, #f2dda0 38%, #d4af37 72%, #a8842a 100%)"}})]})}function Uv({side:t,opening:e}){const s=t==="left";return o.jsxs(Q.div,{"aria-hidden":!0,initial:!1,animate:e?{rotateY:s?-112:112}:{rotateY:0},transition:{duration:1.7,ease:[.7,0,.3,1]},className:`absolute inset-y-0 ${s?"left-0":"right-0"} w-1/2 bg-gradient-to-b from-[#181309] via-[#0e0b06] to-[#090705] ${s?"origin-left":"origin-right"} border-[#d4af37]/30 ${s?"border-l":"border-r"}`,style:{backfaceVisibility:"hidden",transformStyle:"preserve-3d"},children:[o.jsxs("div",{className:`absolute inset-5 rounded-t-[40%_40%_8px_8px/28%_28%_8px_8px] border border-[#d4af37]/20 transition-opacity duration-500 ${e?"opacity-0":"opacity-100"}`,children:[o.jsx("div",{className:"absolute inset-2.5 rounded-t-[40%_40%_6px_6px/28%_28%_6px_6px] border border-[#d4af37]/10"}),o.jsx("span",{className:"absolute bottom-8 left-1/2 -translate-x-1/2 text-[9px] tracking-[0.35em] text-[#d4af37]/45",children:"JUVEL"})]}),o.jsx("div",{className:"absolute inset-0 opacity-[0.32] mix-blend-overlay",style:{background:"repeating-linear-gradient(90deg, rgba(212,175,55,0.05) 0px, transparent 3px, rgba(0,0,0,0.4) 5px, transparent 9px)"}}),o.jsx("div",{className:`absolute inset-y-0 w-[4px] ${s?"right-0":"left-0"} bg-gradient-to-b from-transparent via-[#e6c46e]/35 to-transparent`})]})}const f6=6e3;function m6(t){const e=t.trim();if(!e)return null;if(e.startsWith("#")){const s=e.slice(1);return{href:wl(s),onClick:vl(s),external:!1}}if(e.startsWith("/")){const[s,i]=e.split("?");return{href:Mt(s,i),onClick:Dt(s,i),external:!1}}return{href:e,onClick:void 0,external:!0}}function p6({banners:t}){const e=$m(),[s,i]=A.useState(0),[l,u]=A.useState(1),[d,f]=A.useState(!1),g=A.useRef(null),p=t.length,x=A.useCallback((N,_)=>{p!==0&&(u(_),i((N%p+p)%p))},[p]);if(A.useEffect(()=>{if(p<=1||d||e)return;const N=window.setInterval(()=>x(s+1,1),f6);return()=>window.clearInterval(N)},[p,d,e,s,x]),A.useEffect(()=>{s>=p&&i(0)},[p,s]),p===0)return null;const y=t[s],b=m6(y.buttonLink),w=N=>{g.current=N.touches[0].clientX},j=N=>{if(g.current===null)return;const _=N.changedTouches[0].clientX-g.current;g.current=null,!(Math.abs(_)<40)&&(_>0?x(s+1,1):x(s-1,-1))};return o.jsx("section",{id:"home","aria-roledescription":"carousel","aria-label":"عروض جوفيل",className:"relative w-full overflow-hidden bg-noir-950 pt-[64px] sm:pt-[72px]",onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),onTouchStart:w,onTouchEnd:j,children:o.jsxs("div",{className:"relative aspect-[4/5] w-full sm:aspect-[16/9] lg:aspect-[21/8] lg:max-h-[640px]",children:[o.jsx(kt,{initial:!1,custom:l,mode:"popLayout",children:o.jsxs(Q.div,{custom:l,initial:e?{opacity:0}:{opacity:0,x:l*60,scale:1.02},animate:{opacity:1,x:0,scale:1},exit:e?{opacity:0}:{opacity:0,x:l*-60,scale:.99},transition:{duration:.7,ease:[.22,1,.36,1]},className:"absolute inset-0",children:[o.jsx("img",{src:y.image,alt:y.title||"عرض",className:"h-full w-full object-cover",loading:s===0?"eager":"lazy",draggable:!1}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-l from-noir-950/85 via-noir-950/40 to-noir-950/10"}),o.jsx("div",{className:"absolute inset-x-0 bottom-0 h-1/2 bg-gradient-to-t from-noir-950 via-noir-950/30 to-transparent"}),(y.title||y.subtitle||y.buttonText&&b)&&o.jsx("div",{className:"absolute inset-0 flex items-end sm:items-center",children:o.jsx("div",{className:"mx-auto w-full max-w-7xl px-6 pb-16 sm:px-8 sm:pb-0",children:o.jsxs("div",{className:"max-w-xl text-right",children:[y.subtitle&&o.jsxs(Q.p,{initial:{opacity:0,y:14},animate:{opacity:1,y:0},transition:{delay:.25,duration:.6},className:"mb-3 inline-flex items-center gap-3 text-[11px] font-bold tracking-[0.25em] text-gold sm:text-xs",children:[o.jsx("span",{className:"h-px w-8 bg-gradient-to-l from-gold to-transparent"}),y.subtitle]}),y.title&&o.jsx(Q.h2,{initial:{opacity:0,y:18},animate:{opacity:1,y:0},transition:{delay:.35,duration:.7},className:"text-[1.75rem] font-black leading-[1.3] text-stone-50 drop-shadow-[0_2px_12px_rgba(0,0,0,0.6)] sm:text-4xl lg:text-5xl",children:y.title}),y.buttonText&&b&&o.jsx(Q.div,{initial:{opacity:0,y:18},animate:{opacity:1,y:0},transition:{delay:.5,duration:.7},className:"mt-6",children:o.jsxs("a",{href:b.href,onClick:b.onClick,target:b.external?"_blank":void 0,rel:b.external?"noreferrer":void 0,className:"inline-flex items-center gap-2 rounded-full bg-gradient-to-l from-gold-dark via-gold to-gold-300 px-7 py-3.5 text-[14.5px] font-bold text-noir-950 shadow-[0_12px_40px_-10px_rgba(212,175,55,0.7)] transition-all hover:brightness-110 sm:px-9 sm:text-base",children:[y.buttonText,o.jsx(ka,{className:"h-4 w-4"})]})})]})})})]},y.id)}),p>1&&o.jsxs(o.Fragment,{children:[o.jsx("button",{type:"button","aria-label":"العرض التالي",onClick:()=>x(s+1,1),className:"absolute right-3 top-1/2 z-10 hidden h-11 w-11 -translate-y-1/2 items-center justify-center rounded-full border border-gold/30 bg-noir-950/60 text-gold backdrop-blur-md transition hover:bg-gold hover:text-noir-950 sm:flex lg:right-6",children:o.jsx(Pw,{className:"h-5 w-5"})}),o.jsx("button",{type:"button","aria-label":"العرض السابق",onClick:()=>x(s-1,-1),className:"absolute left-3 top-1/2 z-10 hidden h-11 w-11 -translate-y-1/2 items-center justify-center rounded-full border border-gold/30 bg-noir-950/60 text-gold backdrop-blur-md transition hover:bg-gold hover:text-noir-950 sm:flex lg:left-6",children:o.jsx(ka,{className:"h-5 w-5"})})]}),p>1&&o.jsx("div",{className:"absolute inset-x-0 bottom-5 z-10 flex items-center justify-center gap-2",role:"tablist","aria-label":"اختيار العرض",children:t.map((N,_)=>o.jsx("button",{type:"button",role:"tab","aria-selected":_===s,"aria-label":`العرض ${_+1}`,onClick:()=>x(_,_>s?1:-1),className:`h-1.5 rounded-full transition-all duration-300 ${_===s?"w-8 bg-gold":"w-2 bg-gold/35 hover:bg-gold/60"}`},N.id))})]})})}let Lv=!1;function g6(){const{settings:t,banners:e,cartCount:s,openCart:i}=Ll(),[l,u]=A.useState(Lv),{search:d}=Ml(),f=d.get("intro")==="v1"?"v1":"v2",g=()=>{Lv=!0,u(!0),window.scrollTo(0,0)};return l?o.jsxs("div",{className:"grain min-h-screen bg-noir-950 text-stone-100",children:[o.jsx(Qm,{cartCount:s,onCartClick:i,siteName:t.siteName}),o.jsxs("main",{children:[e.length>0?o.jsx(p6,{banners:e}):o.jsx("div",{id:"home",className:"h-16 sm:h-[72px]"}),o.jsx(QO,{title:t.heroTitle,highlight:t.heroHighlight,description:t.heroDescription}),o.jsx(ZO,{announcement:t.announcement}),o.jsx(t6,{}),o.jsx(s6,{}),o.jsx(a6,{}),o.jsx(i6,{discount:t.newsletterDiscount})]}),o.jsx(Zm,{siteName:t.siteName,phone:t.contactPhone,email:t.contactEmail,address:t.address})]}):f==="v1"?o.jsx(d6,{onEnter:g},"juvel-opening"):o.jsx(h6,{onEnter:g},"juvel-gate")}function Gj({value:t,size:e="h-3.5 w-3.5"}){return o.jsxs("div",{className:"flex gap-0.5",dir:"ltr","aria-label":`التقييم ${t} من ٥`,children:[[...Array(Math.floor(t))].map((s,i)=>o.jsx(Gm,{className:`${e} fill-gold text-gold`},i)),t%1!==0&&o.jsx(fE,{className:`${e} fill-gold text-gold`})]})}function x6(t){return`/products/${t.id}`}function om({product:t,index:e=0,onAdd:s}){const i=x6(t),l=(t.stock??0)===0,u=t.oldPrice&&t.oldPrice>t.price?Math.round((1-t.price/t.oldPrice)*100):0;return o.jsxs(Q.article,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-40px"},transition:{duration:.5,delay:e%3*.08,ease:[.22,1,.36,1]},className:"group relative flex flex-col overflow-hidden rounded-2xl border border-gold/15 bg-gradient-to-b from-noir-800/80 to-noir-900 transition-all duration-500 hover:border-gold/40 hover:shadow-[0_25px_60px_-20px_rgba(212,175,55,0.3)] sm:rounded-3xl",children:[o.jsxs("div",{className:"absolute right-2.5 top-2.5 z-20 flex flex-col items-end gap-1.5 sm:right-4 sm:top-4",children:[t.badge&&o.jsx("span",{className:"rounded-full bg-gradient-to-l from-gold-dark to-gold px-2.5 py-1 text-[10px] font-bold text-noir-950 shadow-lg sm:px-3.5 sm:py-1.5 sm:text-xs",children:t.badge}),u>0&&o.jsxs("span",{className:"rounded-full border border-gold/40 bg-noir-950/80 px-2.5 py-1 text-[10px] font-bold text-gold-300 backdrop-blur sm:text-xs",children:["خصم ",u,"٪"]})]}),o.jsxs("a",{href:Mt(i),onClick:Dt(i),className:"relative block aspect-square overflow-hidden","aria-label":`عرض ${t.name}`,children:[o.jsx("img",{src:t.image,alt:t.name,loading:"lazy",className:"h-full w-full object-cover transition-transform duration-700 ease-out group-hover:scale-105"}),o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-noir-900 via-transparent to-transparent"}),l&&o.jsx("span",{className:"absolute inset-x-0 bottom-3 mx-auto w-fit rounded-full bg-noir-950/85 px-3 py-1 text-[11px] font-bold text-stone-300",children:"نفد من المخزون"})]}),o.jsxs("div",{className:"flex flex-1 flex-col p-4 sm:p-5 lg:p-6",children:[o.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[o.jsx("span",{className:"truncate text-[10.5px] tracking-wide text-gold/65 sm:text-xs",children:t.category}),o.jsx("div",{className:"hidden sm:block",children:o.jsx(Gj,{value:t.rating})})]}),o.jsx("a",{href:Mt(i),onClick:Dt(i),children:o.jsx("h3",{className:"line-clamp-2 text-[14px] font-bold leading-snug text-stone-100 transition-colors group-hover:text-gold-300 sm:text-[17px]",children:t.name})}),o.jsx("p",{className:"mt-1 hidden font-serif text-[11.5px] tracking-[0.15em] text-stone-500 sm:block",children:t.nameEn}),o.jsx("p",{className:"mt-2 hidden line-clamp-2 text-[13.5px] leading-[1.8] text-stone-400 sm:block",children:t.desc}),o.jsxs("div",{className:"mt-auto pt-4",children:[o.jsxs("div",{className:"flex flex-wrap items-baseline gap-x-2 gap-y-0.5 border-t border-gold/10 pt-3.5",children:[o.jsxs("span",{className:"font-serif text-[17px] text-gold-gradient sm:text-[22px]",children:[t.price," ج.م"]}),t.oldPrice&&o.jsxs("span",{className:"text-[11.5px] text-stone-600 line-through sm:text-sm",children:[t.oldPrice," ج.م"]})]}),o.jsxs("div",{className:"mt-3.5 grid gap-2 lg:grid-cols-2",children:[o.jsxs("a",{href:Mt(i),onClick:Dt(i),className:"flex items-center justify-center gap-1.5 rounded-full border border-gold/40 px-3 py-2.5 text-[12.5px] font-bold text-gold-300 transition-all hover:border-gold hover:bg-gold/10 sm:text-sm",children:[o.jsx(Cl,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4"}),"عرض المنتج"]}),o.jsxs("button",{type:"button",onClick:()=>s(t),disabled:l,className:"flex items-center justify-center gap-1.5 rounded-full bg-gold px-3 py-2.5 text-[12.5px] font-bold text-noir-950 transition-all hover:brightness-110 active:scale-[0.98] disabled:cursor-not-allowed disabled:bg-stone-700/60 disabled:text-stone-400 sm:text-sm",children:[o.jsx(Ra,{className:"h-3.5 w-3.5 sm:h-4 sm:w-4"}),l?"غير متوفر":"أضف للسلة"]})]})]})]})]})}function Fr(t){return`category-${t}`}function y6(){const{products:t,productsLoading:e,settings:s,cartCount:i,addToCart:l,openCart:u}=Ll(),{search:d}=Ml(),f=d.get("category"),g=d.get("focus")==="1",[p,x]=A.useState(()=>d.get("q")??""),y=A.useRef(null),b=p.trim().toLowerCase(),w=b.length>0;A.useEffect(()=>{g&&y.current?.focus()},[g]);const j=A.useMemo(()=>{if(!w)return null;const k=R=>R?.toLowerCase().includes(b);return t.filter(R=>k(R.name)||k(R.nameEn)||k(R.desc)||k(R.category))},[t,b,w]),N=A.useMemo(()=>{const k=new Map;for(const R of t){const M=k.get(R.category)??[];M.push(R),k.set(R.category,M)}return[...k.entries()].map(([R,M])=>({category:R,items:M}))},[t]);A.useEffect(()=>{if(!f||e)return;const k=N.findIndex(M=>M.category===f);if(k===-1)return;const R=window.setTimeout(()=>{document.getElementById(Fr(k))?.scrollIntoView({behavior:"smooth",block:"start"})},120);return()=>window.clearTimeout(R)},[f,e,N]);const _=k=>{document.getElementById(Fr(k))?.scrollIntoView({behavior:"smooth",block:"start"})};return o.jsxs("div",{className:"grain min-h-screen bg-noir-950 text-stone-100",dir:"rtl",children:[o.jsx(Qm,{cartCount:i,onCartClick:u,siteName:s.siteName}),o.jsxs("main",{className:"pt-24 sm:pt-28",children:[o.jsx("header",{className:"border-b border-gold/10",children:o.jsxs("div",{className:"mx-auto max-w-7xl px-6 pb-8 pt-4 sm:px-8 sm:pb-10 lg:px-10",children:[o.jsxs("nav",{"aria-label":"مسار التنقل",className:"mb-5 flex items-center gap-2 text-[13px] text-stone-500",children:[o.jsx("a",{href:Mt("/"),onClick:Dt("/"),className:"transition-colors hover:text-gold-300",children:"الرئيسية"}),o.jsx(ka,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"text-gold-300",children:"المنتجات"})]}),o.jsxs("p",{className:"mb-2 flex items-center gap-3 text-xs font-bold tracking-[0.3em] text-gold",children:[o.jsx("span",{className:"h-px w-8 bg-gradient-to-l from-gold to-transparent"}),"مجموعة جوفيل"]}),o.jsx("h1",{className:"text-3xl font-black sm:text-4xl lg:text-5xl",children:o.jsx("span",{className:"text-gold-gradient",children:"منتجاتنا"})}),o.jsx("p",{className:"mt-3 max-w-xl text-[14px] leading-relaxed text-stone-400 sm:text-[15px]",children:"تشكيلتنا الطبيعية الكاملة، مقسّمة حسب احتياجك."}),o.jsxs("div",{className:"relative mt-6 max-w-md",children:[o.jsx(Pi,{className:"pointer-events-none absolute right-4 top-1/2 h-4.5 w-4.5 -translate-y-1/2 text-stone-500"}),o.jsx("input",{ref:y,type:"search",value:p,onChange:k=>x(k.target.value),placeholder:"ابحثي عن منتج… (اسم، نوع، وصف)","aria-label":"البحث في المنتجات",className:"w-full rounded-full border border-gold/20 bg-noir-900/70 py-3 pl-11 pr-11 text-sm text-stone-100 placeholder-stone-600 outline-none transition-colors focus:border-gold/60"}),w&&o.jsx("button",{type:"button",onClick:()=>x(""),"aria-label":"مسح البحث",className:"absolute left-3 top-1/2 -translate-y-1/2 rounded-full p-1 text-stone-500 transition-colors hover:text-gold-300",children:o.jsx(Ks,{className:"h-4 w-4"})})]})]})}),!w&&N.length>1&&o.jsx("div",{className:"sticky top-[60px] z-30 border-b border-gold/10 bg-noir-950/90 backdrop-blur-xl sm:top-[68px]",children:o.jsx("div",{className:"mx-auto flex max-w-7xl gap-2 overflow-x-auto px-6 py-3 sm:px-8 lg:px-10 [&::-webkit-scrollbar]:hidden",children:N.map((k,R)=>o.jsxs("button",{type:"button",onClick:()=>_(R),className:"shrink-0 rounded-full border border-gold/25 px-4 py-2 text-[13px] font-medium text-stone-300 transition-all hover:border-gold hover:bg-gold/10 hover:text-gold-300",children:[k.category,o.jsxs("span",{className:"mr-1.5 text-[11px] text-stone-500",children:["(",k.items.length,")"]})]},k.category))})}),o.jsx("div",{className:"mx-auto max-w-7xl px-6 py-10 sm:px-8 sm:py-14 lg:px-10",children:e?o.jsx("div",{className:"grid grid-cols-2 gap-4 sm:gap-6 md:grid-cols-3 lg:gap-8",children:[...Array(6)].map((k,R)=>o.jsxs("div",{className:"animate-pulse overflow-hidden rounded-2xl border border-gold/10 bg-noir-900 sm:rounded-3xl",children:[o.jsx("div",{className:"aspect-square bg-noir-800"}),o.jsxs("div",{className:"space-y-3 p-5",children:[o.jsx("div",{className:"h-3 w-1/3 rounded bg-noir-800"}),o.jsx("div",{className:"h-4 w-3/4 rounded bg-noir-800"}),o.jsx("div",{className:"h-10 rounded-full bg-noir-800"})]})]},R))}):j?w&&j.length===0?o.jsxs("div",{className:"flex flex-col items-center justify-center rounded-3xl border border-gold/15 bg-noir-900/50 px-6 py-24 text-center",children:[o.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full border border-gold/25 bg-gold/5",children:o.jsx(Vf,{className:"h-7 w-7 text-gold"})}),o.jsx("h2",{className:"mt-5 text-lg font-bold text-stone-100",children:"مفيش نتائج مطابقة"}),o.jsx("p",{className:"mt-2 max-w-sm text-[14px] leading-relaxed text-stone-500",children:"جرّبي كلمة تانية، أو امسحي البحث لتتصفحي المجموعة كاملة."})]}):o.jsxs("div",{children:[o.jsxs("p",{className:"mb-6 text-[13px] text-stone-500",role:"status",children:[j.length," نتيجة ",w&&p.trim()?`عن «${p.trim()}»`:""]}),o.jsx("div",{className:"grid grid-cols-2 gap-4 sm:gap-6 md:grid-cols-3 lg:gap-8",children:j.map((k,R)=>o.jsx(om,{product:k,index:R,onAdd:l},k.id))})]}):N.length===0?o.jsxs("div",{className:"flex flex-col items-center justify-center rounded-3xl border border-gold/15 bg-noir-900/50 px-6 py-24 text-center",children:[o.jsx("div",{className:"flex h-16 w-16 items-center justify-center rounded-full border border-gold/25 bg-gold/5",children:o.jsx(Vf,{className:"h-7 w-7 text-gold"})}),o.jsx("h2",{className:"mt-5 text-lg font-bold text-stone-100",children:"سيتم عرض المجموعة قريباً"}),o.jsx("p",{className:"mt-2 max-w-sm text-[14px] leading-relaxed text-stone-500",children:"نعمل على إضافة منتجاتنا الطبيعية، عودي قريباً."})]}):o.jsx("div",{className:"space-y-16 sm:space-y-20",children:N.map((k,R)=>o.jsxs("section",{id:Fr(R),"aria-labelledby":`${Fr(R)}-title`,className:"scroll-mt-36",children:[o.jsxs("div",{className:"mb-6 flex items-end justify-between gap-4 border-b border-gold/10 pb-4 sm:mb-8",children:[o.jsxs("h2",{id:`${Fr(R)}-title`,className:"flex items-center gap-3 text-xl font-bold text-stone-100 sm:text-2xl",children:[o.jsx("span",{className:"h-6 w-1 rounded-full bg-gradient-to-b from-gold-300 to-gold-dark"}),k.category]}),o.jsxs("span",{className:"text-[13px] text-stone-500",children:[k.items.length," منتج"]})]}),o.jsx("div",{className:"grid grid-cols-2 gap-4 sm:gap-6 md:grid-cols-3 lg:gap-8",children:k.items.map((M,T)=>o.jsx(om,{product:M,index:T,onAdd:l},M.id))})]},k.category))})})]}),o.jsx(Zm,{siteName:s.siteName,phone:s.contactPhone,email:s.contactEmail,address:s.address})]})}function b6(){const{products:t,productsLoading:e,settings:s,cartCount:i,addToCart:l,openCart:u}=Ll(),{path:d}=Ml(),f=Number(d.split("/")[2]),g=t.find(p=>p.id===f);return o.jsxs("div",{className:"grain min-h-screen bg-noir-950 text-stone-100",dir:"rtl",children:[o.jsx(Qm,{cartCount:i,onCartClick:u,siteName:s.siteName}),o.jsx("main",{className:"pt-24 sm:pt-28",children:e?o.jsxs("div",{className:"mx-auto grid max-w-7xl animate-pulse gap-10 px-6 py-10 sm:px-8 lg:grid-cols-2 lg:px-10",children:[o.jsx("div",{className:"aspect-square rounded-3xl bg-noir-900"}),o.jsxs("div",{className:"space-y-4 pt-6",children:[o.jsx("div",{className:"h-4 w-1/4 rounded bg-noir-900"}),o.jsx("div",{className:"h-9 w-3/4 rounded bg-noir-900"}),o.jsx("div",{className:"h-24 rounded bg-noir-900"})]})]}):g?o.jsx(v6,{product:g,products:t,freeShippingAt:s.freeShippingAt,onAdd:l,openCart:u},g.id):o.jsxs("div",{className:"mx-auto max-w-xl px-6 py-24 text-center",children:[o.jsx("div",{className:"mx-auto flex h-16 w-16 items-center justify-center rounded-full border border-gold/25 bg-gold/5",children:o.jsx(Vf,{className:"h-7 w-7 text-gold"})}),o.jsx("h1",{className:"mt-5 text-xl font-bold",children:"المنتج غير متاح"}),o.jsx("p",{className:"mt-2 text-sm text-stone-500",children:"ربما تمت إزالته أو إخفاؤه مؤقتاً."}),o.jsx("a",{href:Mt("/products"),onClick:Dt("/products"),className:"mt-6 inline-block rounded-full bg-gold px-6 py-3 text-sm font-bold text-noir-950",children:"تصفّحي كل المنتجات"})]})}),o.jsx(Zm,{siteName:s.siteName,phone:s.contactPhone,email:s.contactEmail,address:s.address})]})}function v6({product:t,products:e,freeShippingAt:s,onAdd:i,openCart:l}){const u=t.stock??0,d=u===0,[f,g]=A.useState(1),p=t.oldPrice&&t.oldPrice>t.price?Math.round((1-t.price/t.oldPrice)*100):0,x=e.filter(w=>w.category===t.category&&w.id!==t.id).slice(0,3),y=`category=${encodeURIComponent(t.category)}`,b=[{icon:uE,label:"الحجم",value:t.size},{icon:Jk,label:"المكونات",value:t.ingredients},{icon:Xk,label:"طريقة الاستخدام",value:t.howToUse}].filter(w=>w.value);return o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"mx-auto max-w-7xl px-6 sm:px-8 lg:px-10",children:[o.jsxs("nav",{"aria-label":"مسار التنقل",className:"flex flex-wrap items-center gap-2 py-4 text-[13px] text-stone-500",children:[o.jsx("a",{href:Mt("/"),onClick:Dt("/"),className:"hover:text-gold-300",children:"الرئيسية"}),o.jsx(ka,{className:"h-3.5 w-3.5"}),o.jsx("a",{href:Mt("/products"),onClick:Dt("/products"),className:"hover:text-gold-300",children:"المنتجات"}),o.jsx(ka,{className:"h-3.5 w-3.5"}),o.jsx("a",{href:Mt("/products",y),onClick:Dt("/products",y),className:"hover:text-gold-300",children:t.category}),o.jsx(ka,{className:"h-3.5 w-3.5"}),o.jsx("span",{className:"truncate text-gold-300",children:t.name})]}),o.jsxs("div",{className:"grid gap-10 pb-16 pt-4 lg:grid-cols-2 lg:gap-16 lg:pb-24",children:[o.jsx(Q.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"lg:sticky lg:top-28 lg:self-start",children:o.jsxs("div",{className:"relative overflow-hidden rounded-3xl border border-gold/20 bg-noir-900 shadow-[0_30px_80px_-30px_rgba(212,175,55,0.25)]",children:[o.jsx("img",{src:t.image,alt:t.name,className:"aspect-square w-full object-cover"}),o.jsxs("div",{className:"absolute right-4 top-4 flex flex-col items-end gap-2",children:[t.badge&&o.jsx("span",{className:"rounded-full bg-gradient-to-l from-gold-dark to-gold px-4 py-1.5 text-xs font-bold text-noir-950 shadow-lg",children:t.badge}),p>0&&o.jsxs("span",{className:"rounded-full border border-gold/40 bg-noir-950/80 px-3.5 py-1.5 text-xs font-bold text-gold-300 backdrop-blur",children:["خصم ",p,"٪"]})]})]})}),o.jsxs(Q.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.1},children:[o.jsx("span",{className:"inline-block rounded-full border border-gold/30 bg-gold/5 px-3.5 py-1.5 text-xs text-gold-300",children:t.category}),o.jsx("h1",{className:"mt-4 text-[1.75rem] font-black leading-snug sm:text-4xl",children:t.name}),t.nameEn&&o.jsx("p",{className:"mt-1.5 font-serif text-sm tracking-[0.2em] text-stone-500",children:t.nameEn}),o.jsxs("div",{className:"mt-4 flex items-center gap-3",children:[o.jsx(Gj,{value:t.rating,size:"h-4 w-4"}),o.jsxs("span",{className:"text-sm text-stone-400",children:[t.rating.toFixed(1)," من ٥"]})]}),o.jsxs("div",{className:"mt-6 flex flex-wrap items-baseline gap-3 border-y border-gold/10 py-5",children:[o.jsx("span",{className:"font-serif text-4xl text-gold-gradient",children:fe(t.price)}),t.oldPrice&&o.jsx("span",{className:"text-lg text-stone-600 line-through",children:fe(t.oldPrice)}),p>0&&o.jsxs("span",{className:"rounded-full bg-gold/10 px-3 py-1 text-xs font-bold text-gold-300",children:["وفّري ",fe(t.oldPrice-t.price)]})]}),o.jsx("p",{className:"mt-6 text-[15px] leading-[2] text-stone-300",children:t.desc}),o.jsxs("p",{className:`mt-5 flex items-center gap-2 text-sm ${d?"text-stone-500":u<=5?"text-gold-300":"text-stone-300"}`,children:[o.jsx("span",{className:`h-2 w-2 rounded-full ${d?"bg-stone-600":"bg-gold"}`}),d?"نفد من المخزون حالياً":u<=5?`متبقي ${u} قطع فقط`:"متوفر في المخزون"]}),!d&&o.jsxs("div",{className:"mt-6 flex flex-col gap-3 sm:flex-row",children:[o.jsxs("div",{className:"flex items-center justify-between rounded-full border border-gold/25 px-2 py-1.5 sm:w-40",children:[o.jsx("button",{type:"button",onClick:()=>g(w=>Math.max(1,w-1)),disabled:f<=1,"aria-label":"تقليل الكمية",className:"flex h-9 w-9 items-center justify-center rounded-full text-gold hover:bg-gold/10 disabled:opacity-30",children:o.jsx(du,{className:"h-4 w-4"})}),o.jsx("span",{className:"min-w-8 text-center text-lg font-bold","aria-live":"polite",children:f}),o.jsx("button",{type:"button",onClick:()=>g(w=>Math.min(u,w+1)),disabled:f>=u,"aria-label":"زيادة الكمية",className:"flex h-9 w-9 items-center justify-center rounded-full text-gold hover:bg-gold/10 disabled:opacity-30",children:o.jsx(Is,{className:"h-4 w-4"})})]}),o.jsxs("button",{type:"button",onClick:()=>i(t,f),className:"flex flex-1 items-center justify-center gap-2 rounded-full bg-gradient-to-l from-gold-dark via-gold to-gold-300 px-6 py-3.5 font-bold text-noir-950 shadow-[0_12px_40px_-12px_rgba(212,175,55,0.7)] transition hover:brightness-110",children:[o.jsx(Ra,{className:"h-5 w-5"}),"أضف للسلة"]}),o.jsx("button",{type:"button",onClick:()=>{i(t,f),l()},className:"rounded-full border border-gold/40 px-6 py-3.5 font-bold text-gold-300 transition hover:border-gold hover:bg-gold/10",children:"اشتري الآن"})]}),o.jsx("div",{className:"mt-8 grid gap-3 sm:grid-cols-3",children:[{icon:uu,text:"مكونات طبيعية ١٠٠٪"},{icon:Ol,text:`شحن مجاني فوق ${fe(s)}`},{icon:tj,text:"الدفع عند الاستلام"}].map(w=>o.jsxs("div",{className:"flex items-center gap-2.5 rounded-2xl border border-gold/10 bg-noir-900/60 px-4 py-3 text-[13px] text-stone-300",children:[o.jsx(w.icon,{className:"h-4 w-4 shrink-0 text-gold"}),w.text]},w.text))}),b.length>0&&o.jsx("div",{className:"mt-8 space-y-3",children:b.map(w=>o.jsxs("div",{className:"rounded-2xl border border-gold/15 bg-noir-900/60 p-5",children:[o.jsxs("h2",{className:"mb-2 flex items-center gap-2 text-[15px] font-bold text-gold-300",children:[o.jsx(w.icon,{className:"h-4 w-4"}),w.label]}),o.jsx("p",{className:"text-[14px] leading-[1.95] text-stone-300",children:w.value})]},w.label))}),o.jsxs("p",{className:"mt-6 flex items-center gap-2 text-xs text-stone-500",children:[o.jsx(Ii,{className:"h-4 w-4 text-gold"})," ضمان الاسترجاع خلال ٣٠ يوماً",o.jsx(ds,{className:"mr-3 h-4 w-4 text-gold"})," غير مختبر على الحيوانات"]})]})]})]}),x.length>0&&o.jsx("section",{className:"border-t border-gold/10 bg-noir-900/40 py-14 sm:py-20",children:o.jsxs("div",{className:"mx-auto max-w-7xl px-6 sm:px-8 lg:px-10",children:[o.jsxs("h2",{className:"mb-8 flex items-center gap-3 text-xl font-bold sm:text-2xl",children:[o.jsx("span",{className:"h-6 w-1 rounded-full bg-gradient-to-b from-gold-300 to-gold-dark"}),"منتجات من نفس القسم"]}),o.jsx("div",{className:"grid grid-cols-2 gap-4 sm:gap-6 md:grid-cols-3 lg:gap-8",children:x.map((w,j)=>o.jsx(om,{product:w,index:j,onAdd:i},w.id))})]})})]})}const Kj="juvel.chat.v1",zv=24,w6={role:"assistant",content:"أهلاً بيكي في جوفيل ✨ أنا نُور، مستشارة الجمال بتاعتك. قوليلي مشكلتك مع بشرتك أو شعرك وأنا هرشحلك الأنسب من مجموعتنا الطبيعية — أو اختاري من تحت لو تحبي."},j6=["بشرتي دهنية وعندي حبوب","عايزة روتين كامل لبشرتي","شعري بيهيش وبيتقصف","بشرتي جافة وبتقشر","عايزة هدية فاخرة"];function S6(){try{const t=localStorage.getItem(Kj);if(t){const e=JSON.parse(t);if(e?.sessionId&&Array.isArray(e.messages))return e}}catch{}return{sessionId:`c-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,messages:[w6]}}function _6(){const{products:t,settings:e,addToCart:s}=Ll(),[i,l]=A.useState(!1),[u,d]=A.useState(""),[f,g]=A.useState(!1),[p]=A.useState(S6),[x,y]=A.useState(p.messages),[b,w]=A.useState(null),[j,N]=A.useState(!1),[_,k]=A.useState(""),[R,M]=A.useState(null),[T,F]=A.useState({name:"",phone:"",city:"",address:"",notes:""}),I=A.useRef(null),E=A.useRef(null),L=W=>{y(W);try{localStorage.setItem(Kj,JSON.stringify({sessionId:p.sessionId,messages:W.slice(-zv)}))}catch{}};A.useEffect(()=>{I.current&&(I.current.scrollTop=I.current.scrollHeight)},[x,i,f,b,R,j]),A.useEffect(()=>{i&&E.current?.focus()},[i]);const q=W=>{W.length&&(k(""),M(null),w(W.map(B=>({...B,qty:1}))))},G=async()=>{if(!(!b?.length||j)){k(""),N(!0);try{const W=await fetch("/api/order",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:p.sessionId,name:T.name,phone:T.phone,city:T.city,address:T.address,notes:T.notes,items:b.map(X=>({productId:X.id,quantity:X.qty}))})}),B=await W.json().catch(()=>({}));if(!W.ok||!B.orderId)throw new Error(B.error||"تعذر تسجيل الطلب");M(B),w(null),L([...x,{role:"assistant",content:`تم تسجيل طلبك بنجاح يا ${T.name.split(" ")[0]} ✅Unknown directive
95رقم الطلب: ${B.orderId}Unknown directive
96الإجمالي: ${B.total} ج.م (الدفع عند الاستلام)Unknown directive
97هنتواصل معاكي على ${T.phone} لتأكيد التوصيل 🌿`}])}catch(W){k(W instanceof Error?W.message:"تعذر تسجيل الطلب")}finally{N(!1)}}},me=async W=>{const B=W.trim();if(!B||f)return;const X=[...x,{role:"user",content:B}];L(X),d(""),g(!0);try{const ee=await fetch("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:p.sessionId,messages:X.slice(-zv).map(ke=>({role:ke.role,content:ke.content}))})}),de=await ee.json().catch(()=>({}));if(!ee.ok||!de.reply)throw new Error(de.error||"تعذر الاتصال");L([...X,{role:"assistant",content:de.reply,products:de.products||[]}]),de.action==="collect_order"&&Array.isArray(de.products)&&de.products.length&&q(de.products)}catch{L([...X,{role:"assistant",content:"معلش حصلت مشكلة في الاتصال 🌿 جرّبي تاني بعد لحظات — أو اكتبي سؤالك بصيغة تانية."}])}finally{g(!1)}},xe=W=>{W.preventDefault(),me(u)},Ce=W=>{const X=t.find(de=>de.id===W.id)??{id:W.id,name:W.name,nameEn:"",category:W.category,price:W.price,rating:5,image:W.image,desc:"",stock:W.stock},ee=(X.stock??0)<=0;return o.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-gold/20 bg-noir-900/80 p-2.5",children:[o.jsx("img",{src:W.image,alt:W.name,className:"h-14 w-14 shrink-0 rounded-xl border border-gold/15 object-cover"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-[13px] font-bold text-stone-100",children:W.name}),o.jsxs("p",{className:"text-[12px] font-bold text-gold",children:[W.price," ج.م"]})]}),o.jsxs("button",{type:"button",disabled:ee,onClick:()=>s(X),className:"flex shrink-0 items-center gap-1.5 rounded-full bg-gold px-3 py-2 text-[11px] font-bold text-noir-950 transition hover:brightness-110 disabled:cursor-not-allowed disabled:bg-stone-700 disabled:text-stone-400",children:[o.jsx(Ra,{className:"h-3.5 w-3.5"}),ee?"خلص":"أضيفي"]})]},W.id)},ut=x.length<=1;return o.jsxs(o.Fragment,{children:[o.jsxs(Q.button,{type:"button",onClick:()=>l(W=>!W),"aria-label":i?"إغلاق محادثة نُور":"افتحي محادثة نُور — مستشارة الجمال",initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},transition:{delay:1.2,type:"spring",stiffness:260,damping:18},className:"fixed bottom-5 left-5 z-[60] flex h-14 w-14 items-center justify-center rounded-full border border-gold/50 bg-gradient-to-br from-noir-800 to-noir-950 text-gold shadow-[0_10px_40px_-8px_rgba(212,175,55,0.55)] transition-transform hover:scale-105 sm:bottom-6 sm:left-6",children:[o.jsx(kt,{mode:"wait",initial:!1,children:i?o.jsx(Q.span,{initial:{rotate:-90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:90,opacity:0},children:o.jsx(Ks,{className:"h-6 w-6"})},"x"):o.jsx(Q.span,{initial:{rotate:90,opacity:0},animate:{rotate:0,opacity:1},exit:{rotate:-90,opacity:0},className:"block",children:o.jsx("img",{src:"/images/logo.png",alt:"",className:"h-10 w-10 rounded-full object-cover"})},"s")}),o.jsx("span",{className:"absolute -top-1 -right-1 flex h-4 w-4 items-center justify-center rounded-full bg-gold text-[9px] font-black text-noir-950",children:"ن"})]}),o.jsx(kt,{children:i&&o.jsxs(Q.section,{dir:"rtl",role:"dialog","aria-label":"محادثة نُور — مستشارة الجمال",initial:{opacity:0,y:24,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:24,scale:.96},transition:{duration:.28,ease:[.22,1,.36,1]},className:"grain fixed bottom-22 left-4 right-4 z-[60] flex max-h-[76vh] min-h-[420px] flex-col overflow-hidden rounded-3xl border border-gold/25 bg-noir-950/95 shadow-[0_30px_90px_-20px_rgba(0,0,0,0.9)] backdrop-blur-xl sm:bottom-24 sm:left-6 sm:right-auto sm:w-[400px]",children:[o.jsxs("header",{className:"flex items-center gap-3 border-b border-gold/15 bg-noir-900/70 px-4 py-3.5",children:[o.jsxs("div",{className:"relative",children:[o.jsx("img",{src:"/images/logo.png",alt:"نُور — مستشارة جوفيل",className:"flex h-11 w-11 items-center justify-center rounded-full border border-gold/40 object-cover"}),o.jsx("span",{className:"absolute -bottom-0.5 -left-0.5 h-3 w-3 rounded-full border-2 border-noir-950 bg-emerald-400"})]}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsxs("p",{className:"text-sm font-extrabold text-stone-100",children:["نُور ",o.jsx("span",{className:"text-[11px] font-medium text-gold-300",children:"مستشارة جوفيل"})]}),o.jsx("p",{className:"text-[11px] text-stone-500",children:"بتفهم بشرتك وبترشحلك من منتجاتنا الطبيعية ✨"})]}),o.jsx("button",{type:"button",onClick:()=>l(!1),"aria-label":"إغلاق",className:"flex h-8 w-8 items-center justify-center rounded-full border border-gold/20 text-stone-400 transition-colors hover:border-gold hover:text-gold",children:o.jsx(Ks,{className:"h-4 w-4"})})]}),o.jsxs("div",{ref:I,className:"flex-1 space-y-3.5 overflow-y-auto px-4 py-4",children:[x.map((W,B)=>o.jsx("div",{className:W.role==="user"?"flex justify-start":"flex justify-end flex-col items-end gap-2",children:W.role==="user"?o.jsx("div",{className:"max-w-[85%] rounded-2xl rounded-br-md border border-gold/30 bg-gold/10 px-3.5 py-2.5 text-[13.5px] leading-6 text-stone-100",children:W.content}):o.jsxs("div",{className:"max-w-[92%] space-y-2",children:[o.jsx("div",{className:"rounded-2xl rounded-bl-md border border-gold/15 bg-noir-900/80 px-3.5 py-2.5 text-[13.5px] leading-7 whitespace-pre-wrap text-stone-200",children:W.content}),W.products&&W.products.length>0&&o.jsx("div",{className:"space-y-2",children:W.products.map(Ce)})]})},B)),f&&o.jsx("div",{className:"flex justify-end",children:o.jsx("div",{className:"flex items-center gap-1.5 rounded-2xl border border-gold/15 bg-noir-900/80 px-4 py-3",children:[0,1,2].map(W=>o.jsx(Q.span,{className:"h-1.5 w-1.5 rounded-full bg-gold",animate:{opacity:[.3,1,.3],y:[0,-3,0]},transition:{duration:1,repeat:1/0,delay:W*.18}},W))})})]}),ut&&!f&&o.jsx("div",{className:"flex flex-wrap gap-2 px-4 pb-2",children:j6.map(W=>o.jsx("button",{type:"button",onClick:()=>{me(W)},className:"rounded-full border border-gold/25 px-3 py-1.5 text-[11.5px] font-medium text-gold-300 transition-colors hover:border-gold hover:bg-gold/10",children:W},W))}),b&&!R&&o.jsxs("div",{className:"border-t border-gold/25 bg-noir-900/90 px-4 py-3.5",dir:"rtl",children:[o.jsxs("p",{className:"mb-2.5 flex items-center gap-2 text-[12.5px] font-extrabold text-gold",children:[o.jsx(Ra,{className:"h-4 w-4"})," إتمام الطلب — الدفع عند الاستلام"]}),o.jsx("div",{className:"mb-3 max-h-28 space-y-1.5 overflow-y-auto",children:b.map((W,B)=>o.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-gold/15 bg-noir-950/60 px-2.5 py-1.5",children:[o.jsx("img",{src:W.image,alt:"",className:"h-8 w-8 rounded-lg object-cover"}),o.jsx("span",{className:"min-w-0 flex-1 truncate text-[12px] font-bold text-stone-200",children:W.name}),o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx("button",{type:"button","aria-label":"تقليل الكمية",onClick:()=>w(X=>X&&X.map((ee,de)=>de===B?{...ee,qty:Math.max(1,ee.qty-1)}:ee)),className:"flex h-6 w-6 items-center justify-center rounded-full border border-gold/25 text-gold",children:"−"}),o.jsx("span",{className:"min-w-4 text-center text-[12px] font-bold text-stone-100",children:W.qty}),o.jsx("button",{type:"button","aria-label":"زيادة الكمية",disabled:W.qty>=(W.stock||10),onClick:()=>w(X=>X&&X.map((ee,de)=>de===B?{...ee,qty:Math.min(W.stock||10,ee.qty+1)}:ee)),className:"flex h-6 w-6 items-center justify-center rounded-full border border-gold/25 text-gold disabled:opacity-30",children:"+"})]}),o.jsxs("span",{className:"min-w-14 text-left text-[12px] font-extrabold text-gold",children:[W.price*W.qty," ج"]})]},W.id))}),o.jsx("div",{className:"grid grid-cols-2 gap-2",children:[["name","الاسم بالكامل","text"],["phone","رقم الموبايل","tel"],["city","المحافظة","text"],["address","العنوان بالتفصيل","text"]].map(([W,B,X])=>o.jsx("input",{type:X,required:void 0,value:T[W],onChange:ee=>F(de=>({...de,[W]:ee.target.value})),placeholder:B,"aria-label":B,dir:W==="phone"?"ltr":void 0,className:`rounded-xl border border-gold/20 bg-noir-950 px-3 py-2.5 text-[12.5px] text-stone-100 placeholder-stone-600 outline-none focus:border-gold/60 ${W==="address"?"col-span-2":""}`},W))}),(()=>{const W=b.reduce((X,ee)=>X+ee.price*ee.qty,0),B=W>=(e.freeShippingAt??500)?0:e.shippingFee??60;return o.jsxs("div",{className:"mt-2.5 space-y-0.5 text-[11.5px] text-stone-400",children:[o.jsxs("p",{className:"flex justify-between",children:[o.jsx("span",{children:"المجموع"}),o.jsxs("span",{children:[W," ج.م"]})]}),o.jsxs("p",{className:"flex justify-between",children:[o.jsx("span",{children:"الشحن"}),o.jsx("span",{children:B===0?"مجاني ✨":`${B} ج.م`})]}),o.jsxs("p",{className:"flex justify-between text-[13px] font-extrabold text-gold",children:[o.jsx("span",{children:"الإجمالي (دفع عند الاستلام)"}),o.jsxs("span",{children:[W+B," ج.م"]})]})]})})(),_&&o.jsx("p",{className:"mt-2 rounded-lg bg-red-500/10 px-3 py-2 text-[11.5px] text-red-300",children:_}),o.jsx("button",{type:"button",onClick:()=>{G()},disabled:j||!T.name.trim()||!T.phone.trim()||!T.city.trim()||!T.address.trim(),className:"mt-2.5 w-full rounded-full bg-gradient-to-l from-gold-dark via-gold to-gold-300 py-3 text-[13px] font-extrabold text-noir-950 transition hover:brightness-110 disabled:opacity-40",children:j?"جارٍ تسجيل الطلب…":"تأكيد الطلب ✅"})]}),o.jsxs("form",{onSubmit:xe,className:"border-t border-gold/15 bg-noir-900/70 px-3 py-3",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{ref:E,value:u,onChange:W=>d(W.target.value),onKeyDown:W=>{W.key==="Enter"&&!W.shiftKey&&(W.preventDefault(),!f&&u.trim()&&me(u))},placeholder:"اكتبي سؤالك لنُور…","aria-label":"رسالتك لنُور",className:"min-w-0 flex-1 rounded-full border border-gold/20 bg-noir-950 px-4 py-3 text-[13.5px] text-stone-100 placeholder-stone-600 outline-none transition-colors focus:border-gold/60"}),o.jsx("button",{type:"submit",disabled:f||!u.trim(),"aria-label":"إرسال",className:"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-gradient-to-l from-gold-dark via-gold to-gold-300 text-noir-950 transition hover:brightness-110 disabled:opacity-40",children:o.jsx(P2,{className:"h-4.5 w-4.5 -scale-x-100"})})]}),o.jsx("p",{className:"mt-2 text-center text-[10px] leading-4 text-stone-600",children:"استشارة عناية وليست نصيحة طبية — للحالات الجلدية استشيري طبيب مختص 💛"})]})]})})]})}function N6(){const{path:t}=Ml();if(t==="/admin"||t.startsWith("/admin/"))return o.jsx(WO,{});const s=t.startsWith("/products/")?o.jsx(b6,{}):t==="/products"?o.jsx(y6,{}):o.jsx(g6,{});return o.jsxs(o6,{children:[s,o.jsx(_6,{})]})}N4.createRoot(document.getElementById("root")).render(o.jsx(A.StrictMode,{children:o.jsx(N6,{})}));requestAnimationFrame(()=>{const t=document.getElementById("pre-gate");t&&(t.style.transition="opacity 0.5s ease",t.style.opacity="0",window.setTimeout(()=>t.remove(),550))});</script>Unknown directive
98 <style rel="stylesheet" crossorigin>@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:"Tajawal",sans-serif;--font-serif:"Marcellus","Amiri",serif;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-100:oklch(93.6% .032 17.717);--color-red-200:oklch(88.5% .062 18.334);--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-emerald-200:oklch(90.5% .093 164.15);--color-emerald-300:oklch(84.5% .143 164.978);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-600:oklch(59.6% .145 163.225);--color-sky-300:oklch(82.8% .111 230.318);--color-sky-400:oklch(74.6% .16 232.661);--color-violet-300:oklch(81.1% .111 293.571);--color-violet-400:oklch(70.2% .183 293.541);--color-pink-400:oklch(71.8% .202 349.761);--color-pink-500:oklch(65.6% .241 354.308);--color-stone-50:oklch(98.5% .001 106.423);--color-stone-100:oklch(97% .001 106.424);--color-stone-200:oklch(92.3% .003 48.717);--color-stone-300:oklch(86.9% .005 56.366);--color-stone-400:oklch(70.9% .01 56.259);--color-stone-500:oklch(55.3% .013 58.071);--color-stone-600:oklch(44.4% .011 73.639);--color-stone-700:oklch(37.4% .01 67.558);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-xl:36rem;--container-2xl:42rem;--container-3xl:48rem;--container-4xl:56rem;--container-5xl:64rem;--container-6xl:72rem;--container-7xl:80rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2/1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5/2.25);--text-5xl:3rem;--text-5xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-extrabold:800;--font-weight-black:900;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--radius-3xl:1.5rem;--ease-out:cubic-bezier(0,0,.2,1);--ease-in-out:cubic-bezier(.4,0,.2,1);--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--blur-xl:24px;--blur-2xl:40px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-noir-950:#070604;--color-noir-900:#0d0b08;--color-noir-800:#15120c;--color-gold-300:#f3dca3;--color-gold:#d4af37;--color-gold-dark:#a8842a}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-3{inset:calc(var(--spacing)*-3)}.inset-0{inset:calc(var(--spacing)*0)}.inset-2\.5{inset:calc(var(--spacing)*2.5)}.inset-5{inset:calc(var(--spacing)*5)}.inset-\[-3\%\]{inset:-3%}.inset-x-0{inset-inline:calc(var(--spacing)*0)}.inset-y-0{inset-block:calc(var(--spacing)*0)}.inset-y-4{inset-block:calc(var(--spacing)*4)}.inset-y-\[-25\%\]{inset-block:-25%}.-top-1{top:calc(var(--spacing)*-1)}.-top-2{top:calc(var(--spacing)*-2)}.-top-5{top:calc(var(--spacing)*-5)}.-top-10{top:calc(var(--spacing)*-10)}.-top-20{top:calc(var(--spacing)*-20)}.-top-32{top:calc(var(--spacing)*-32)}.top-0{top:calc(var(--spacing)*0)}.top-1{top:calc(var(--spacing)*1)}.top-1\.5{top:calc(var(--spacing)*1.5)}.top-1\/2{top:50%}.top-1\/3{top:33.3333%}.top-2{top:calc(var(--spacing)*2)}.top-2\.5{top:calc(var(--spacing)*2.5)}.top-3\.5{top:calc(var(--spacing)*3.5)}.top-4{top:calc(var(--spacing)*4)}.top-8{top:calc(var(--spacing)*8)}.top-\[-4px\]{top:-4px}.top-\[60px\]{top:60px}.-right-1{right:calc(var(--spacing)*-1)}.-right-20{right:calc(var(--spacing)*-20)}.-right-\[21px\]{right:-21px}.right-0{right:calc(var(--spacing)*0)}.right-1{right:calc(var(--spacing)*1)}.right-1\/4{right:25%}.right-2{right:calc(var(--spacing)*2)}.right-2\.5{right:calc(var(--spacing)*2.5)}.right-3{right:calc(var(--spacing)*3)}.right-3\.5{right:calc(var(--spacing)*3.5)}.right-4{right:calc(var(--spacing)*4)}.right-6{right:calc(var(--spacing)*6)}.right-14{right:calc(var(--spacing)*14)}.right-\[-52px\]{right:-52px}.-bottom-0\.5{bottom:calc(var(--spacing)*-.5)}.-bottom-1\.5{bottom:calc(var(--spacing)*-1.5)}.-bottom-5{bottom:calc(var(--spacing)*-5)}.-bottom-20{bottom:calc(var(--spacing)*-20)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-2\.5{bottom:calc(var(--spacing)*2.5)}.bottom-3{bottom:calc(var(--spacing)*3)}.bottom-5{bottom:calc(var(--spacing)*5)}.bottom-6{bottom:calc(var(--spacing)*6)}.bottom-7{bottom:calc(var(--spacing)*7)}.bottom-8{bottom:calc(var(--spacing)*8)}.bottom-10{bottom:calc(var(--spacing)*10)}.bottom-22{bottom:calc(var(--spacing)*22)}.-left-0\.5{left:calc(var(--spacing)*-.5)}.-left-1{left:calc(var(--spacing)*-1)}.-left-10{left:calc(var(--spacing)*-10)}.-left-20{left:calc(var(--spacing)*-20)}.left-0{left:calc(var(--spacing)*0)}.left-1\/2{left:50%}.left-1\/3{left:33.3333%}.left-1\/4{left:25%}.left-2{left:calc(var(--spacing)*2)}.left-3{left:calc(var(--spacing)*3)}.left-3\.5{left:calc(var(--spacing)*3.5)}.left-4{left:calc(var(--spacing)*4)}.left-5{left:calc(var(--spacing)*5)}.left-7{left:calc(var(--spacing)*7)}.left-9{left:calc(var(--spacing)*9)}.left-10{left:calc(var(--spacing)*10)}.left-\[-52px\]{left:-52px}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[60\]{z-index:60}.z-\[70\]{z-index:70}.z-\[80\]{z-index:80}.z-\[100\]{z-index:100}.col-span-2{grid-column:span 2/span 2}.mx-auto{margin-inline:auto}.my-16{margin-block:calc(var(--spacing)*16)}.my-auto{margin-block:auto}.mt-0\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-2\.5{margin-top:calc(var(--spacing)*2.5)}.mt-3{margin-top:calc(var(--spacing)*3)}.mt-3\.5{margin-top:calc(var(--spacing)*3.5)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-5{margin-top:calc(var(--spacing)*5)}.mt-6{margin-top:calc(var(--spacing)*6)}.mt-7{margin-top:calc(var(--spacing)*7)}.mt-8{margin-top:calc(var(--spacing)*8)}.mt-9{margin-top:calc(var(--spacing)*9)}.mt-10{margin-top:calc(var(--spacing)*10)}.mt-12{margin-top:calc(var(--spacing)*12)}.mt-14{margin-top:calc(var(--spacing)*14)}.mt-auto{margin-top:auto}.mr-1{margin-right:calc(var(--spacing)*1)}.mr-1\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2{margin-right:calc(var(--spacing)*2)}.mr-3{margin-right:calc(var(--spacing)*3)}.mr-auto{margin-right:auto}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-2\.5{margin-bottom:calc(var(--spacing)*2.5)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-3\.5{margin-bottom:calc(var(--spacing)*3.5)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-5{margin-bottom:calc(var(--spacing)*5)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-7{margin-bottom:calc(var(--spacing)*7)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.mb-10{margin-bottom:calc(var(--spacing)*10)}.mb-12{margin-bottom:calc(var(--spacing)*12)}.line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-\[4\/3\.4\]{aspect-ratio:4/3.4}.aspect-\[4\/5\]{aspect-ratio:4/5}.aspect-\[21\/8\]{aspect-ratio:21/8}.aspect-square{aspect-ratio:1}.h-1\.5{height:calc(var(--spacing)*1.5)}.h-1\/2{height:50%}.h-2{height:calc(var(--spacing)*2)}.h-2\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-4\.5{height:calc(var(--spacing)*4.5)}.h-5{height:calc(var(--spacing)*5)}.h-5\.5{height:calc(var(--spacing)*5.5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-10{height:calc(var(--spacing)*10)}.h-11{height:calc(var(--spacing)*11)}.h-12{height:calc(var(--spacing)*12)}.h-14{height:calc(var(--spacing)*14)}.h-16{height:calc(var(--spacing)*16)}.h-20{height:calc(var(--spacing)*20)}.h-24{height:calc(var(--spacing)*24)}.h-32{height:calc(var(--spacing)*32)}.h-36{height:calc(var(--spacing)*36)}.h-60{height:calc(var(--spacing)*60)}.h-\[18px\]{height:18px}.h-\[76vh\]{height:76vh}.h-\[78px\]{height:78px}.h-\[82\%\]{height:82%}.h-\[95vmin\]{height:95vmin}.h-\[220px\]{height:220px}.h-\[300px\]{height:300px}.h-\[350px\]{height:350px}.h-\[360px\]{height:360px}.h-\[400px\]{height:400px}.h-\[500px\]{height:500px}.h-\[600px\]{height:600px}.h-full{height:100%}.h-px{height:1px}.max-h-28{max-height:calc(var(--spacing)*28)}.max-h-\[76vh\]{max-height:76vh}.max-h-\[88vh\]{max-height:88vh}.max-h-\[92vh\]{max-height:92vh}.max-h-\[680px\]{max-height:680px}.max-h-\[calc\(88vh-140px\)\]{max-height:calc(88vh - 140px)}.min-h-64{min-height:calc(var(--spacing)*64)}.min-h-\[62px\]{min-height:62px}.min-h-\[100svh\]{min-height:100svh}.min-h-\[110px\]{min-height:110px}.min-h-\[330px\]{min-height:330px}.min-h-\[420px\]{min-height:420px}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-0\.5{width:calc(var(--spacing)*.5)}.w-1{width:calc(var(--spacing)*1)}.w-1\.5{width:calc(var(--spacing)*1.5)}.w-1\/2{width:50%}.w-1\/3{width:33.3333%}.w-1\/4{width:25%}.w-2{width:calc(var(--spacing)*2)}.w-2\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\.5{width:calc(var(--spacing)*3.5)}.w-3\/4{width:75%}.w-4{width:calc(var(--spacing)*4)}.w-4\.5{width:calc(var(--spacing)*4.5)}.w-5{width:calc(var(--spacing)*5)}.w-5\.5{width:calc(var(--spacing)*5.5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-11{width:calc(var(--spacing)*11)}.w-12{width:calc(var(--spacing)*12)}.w-14{width:calc(var(--spacing)*14)}.w-16{width:calc(var(--spacing)*16)}.w-20{width:calc(var(--spacing)*20)}.w-24{width:calc(var(--spacing)*24)}.w-32{width:calc(var(--spacing)*32)}.w-36{width:calc(var(--spacing)*36)}.w-60{width:calc(var(--spacing)*60)}.w-\[3px\]{width:3px}.w-\[4px\]{width:4px}.w-\[18px\]{width:18px}.w-\[19vw\]{width:19vw}.w-\[82\%\]{width:82%}.w-\[95vmin\]{width:95vmin}.w-\[270px\]{width:270px}.w-\[300px\]{width:300px}.w-\[350px\]{width:350px}.w-\[360px\]{width:360px}.w-\[400px\]{width:400px}.w-\[500px\]{width:500px}.w-\[600px\]{width:600px}.w-\[min\(92vw\,520px\)\]{width:min(92vw,520px)}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-4xl{max-width:var(--container-4xl)}.max-w-5xl{max-width:var(--container-5xl)}.max-w-6xl{max-width:var(--container-6xl)}.max-w-7xl{max-width:var(--container-7xl)}.max-w-\[60\%\]{max-width:60%}.max-w-\[85\%\]{max-width:85%}.max-w-\[92\%\]{max-width:92%}.max-w-\[340px\]{max-width:340px}.max-w-\[1500px\]{max-width:1500px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.max-w-xl{max-width:var(--container-xl)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-4{min-width:calc(var(--spacing)*4)}.min-w-5{min-width:calc(var(--spacing)*5)}.min-w-8{min-width:calc(var(--spacing)*8)}.min-w-14{min-width:calc(var(--spacing)*14)}.min-w-40{min-width:calc(var(--spacing)*40)}.min-w-44{min-width:calc(var(--spacing)*44)}.min-w-\[640px\]{min-width:640px}.min-w-\[820px\]{min-width:820px}.min-w-\[900px\]{min-width:900px}.min-w-\[920px\]{min-width:920px}.min-w-\[960px\]{min-width:960px}.flex-1{flex:1}.shrink-0{flex-shrink:0}.origin-left{transform-origin:0}.origin-right{transform-origin:100%}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.-scale-x-100{--tw-scale-x: -100% ;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.resize-y{resize:vertical}.scroll-mt-36{scroll-margin-top:calc(var(--spacing)*36)}.appearance-none{appearance:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-3\.5{gap:calc(var(--spacing)*3.5)}.gap-4{gap:calc(var(--spacing)*4)}.gap-5{gap:calc(var(--spacing)*5)}.gap-6{gap:calc(var(--spacing)*6)}.gap-7{gap:calc(var(--spacing)*7)}.gap-8{gap:calc(var(--spacing)*8)}.gap-10{gap:calc(var(--spacing)*10)}.gap-16{gap:calc(var(--spacing)*16)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*6)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*6)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-16>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*16)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*16)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-y-0\.5{row-gap:calc(var(--spacing)*.5)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-white\/\[0\.05\]>:not(:last-child)){border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){:where(.divide-white\/\[0\.05\]>:not(:last-child)){border-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\[1\.75rem\]{border-radius:1.75rem}.rounded-\[2\.5rem\]{border-radius:2.5rem}.rounded-\[2rem\]{border-radius:2rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-\[40\%_40\%_6px_6px\/28\%_28\%_6px_6px\]{border-top-left-radius:40% 40% 6px 6px/28% 28% 6px 6px;border-top-right-radius:40% 40% 6px 6px/28% 28% 6px 6px}.rounded-t-\[40\%_40\%_8px_8px\/28\%_28\%_8px_8px\]{border-top-left-radius:40% 40% 8px 8px/28% 28% 8px 8px;border-top-right-radius:40% 40% 8px 8px/28% 28% 8px 8px}.rounded-t-\[46\%\]{border-top-left-radius:46%;border-top-right-radius:46%}.rounded-br-md{border-bottom-right-radius:var(--radius-md)}.rounded-bl-md{border-bottom-left-radius:var(--radius-md)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[\#100d07\]{border-color:#100d07}.border-\[\#12100d\]{border-color:#12100d}.border-\[\#d4af37\]{border-color:#d4af37}.border-\[\#d4af37\]\/10{border-color:#d4af371a}.border-\[\#d4af37\]\/15{border-color:#d4af3726}.border-\[\#d4af37\]\/20{border-color:#d4af3733}.border-\[\#d4af37\]\/25{border-color:#d4af3740}.border-\[\#d4af37\]\/30{border-color:#d4af374d}.border-\[\#d4af37\]\/40{border-color:#d4af3766}.border-\[\#d4af37\]\/70{border-color:#d4af37b3}.border-\[\#e1bf65\]{border-color:#e1bf65}.border-\[\#e5c875\]\/65{border-color:#e5c875a6}.border-amber-400\/20{border-color:#fcbb0033}@supports (color:color-mix(in lab,red,red)){.border-amber-400\/20{border-color:color-mix(in oklab,var(--color-amber-400)20%,transparent)}}.border-amber-400\/25{border-color:#fcbb0040}@supports (color:color-mix(in lab,red,red)){.border-amber-400\/25{border-color:color-mix(in oklab,var(--color-amber-400)25%,transparent)}}.border-emerald-400\/20{border-color:#00d29433}@supports (color:color-mix(in lab,red,red)){.border-emerald-400\/20{border-color:color-mix(in oklab,var(--color-emerald-400)20%,transparent)}}.border-emerald-400\/30{border-color:#00d2944d}@supports (color:color-mix(in lab,red,red)){.border-emerald-400\/30{border-color:color-mix(in oklab,var(--color-emerald-400)30%,transparent)}}.border-emerald-500\/20{border-color:#00bb7f33}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/20{border-color:color-mix(in oklab,var(--color-emerald-500)20%,transparent)}}.border-emerald-500\/25{border-color:#00bb7f40}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\/25{border-color:color-mix(in oklab,var(--color-emerald-500)25%,transparent)}}.border-gold\/10{border-color:#d4af371a}@supports (color:color-mix(in lab,red,red)){.border-gold\/10{border-color:color-mix(in oklab,var(--color-gold)10%,transparent)}}.border-gold\/15{border-color:#d4af3726}@supports (color:color-mix(in lab,red,red)){.border-gold\/15{border-color:color-mix(in oklab,var(--color-gold)15%,transparent)}}.border-gold\/20{border-color:#d4af3733}@supports (color:color-mix(in lab,red,red)){.border-gold\/20{border-color:color-mix(in oklab,var(--color-gold)20%,transparent)}}.border-gold\/25{border-color:#d4af3740}@supports (color:color-mix(in lab,red,red)){.border-gold\/25{border-color:color-mix(in oklab,var(--color-gold)25%,transparent)}}.border-gold\/30{border-color:#d4af374d}@supports (color:color-mix(in lab,red,red)){.border-gold\/30{border-color:color-mix(in oklab,var(--color-gold)30%,transparent)}}.border-gold\/40{border-color:#d4af3766}@supports (color:color-mix(in lab,red,red)){.border-gold\/40{border-color:color-mix(in oklab,var(--color-gold)40%,transparent)}}.border-gold\/50{border-color:#d4af3780}@supports (color:color-mix(in lab,red,red)){.border-gold\/50{border-color:color-mix(in oklab,var(--color-gold)50%,transparent)}}.border-noir-950{border-color:var(--color-noir-950)}.border-red-400\/20{border-color:#ff656833}@supports (color:color-mix(in lab,red,red)){.border-red-400\/20{border-color:color-mix(in oklab,var(--color-red-400)20%,transparent)}}.border-red-400\/25{border-color:#ff656840}@supports (color:color-mix(in lab,red,red)){.border-red-400\/25{border-color:color-mix(in oklab,var(--color-red-400)25%,transparent)}}.border-red-400\/40{border-color:#ff656866}@supports (color:color-mix(in lab,red,red)){.border-red-400\/40{border-color:color-mix(in oklab,var(--color-red-400)40%,transparent)}}.border-red-500\/20{border-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.border-red-500\/20{border-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.border-red-500\/25{border-color:#fb2c3640}@supports (color:color-mix(in lab,red,red)){.border-red-500\/25{border-color:color-mix(in oklab,var(--color-red-500)25%,transparent)}}.border-red-500\/30{border-color:#fb2c364d}@supports (color:color-mix(in lab,red,red)){.border-red-500\/30{border-color:color-mix(in oklab,var(--color-red-500)30%,transparent)}}.border-sky-400\/20{border-color:#00bcfe33}@supports (color:color-mix(in lab,red,red)){.border-sky-400\/20{border-color:color-mix(in oklab,var(--color-sky-400)20%,transparent)}}.border-white\/10{border-color:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.border-white\/10{border-color:color-mix(in oklab,var(--color-white)10%,transparent)}}.border-white\/\[0\.04\]{border-color:#ffffff0a}@supports (color:color-mix(in lab,red,red)){.border-white\/\[0\.04\]{border-color:color-mix(in oklab,var(--color-white)4%,transparent)}}.border-white\/\[0\.05\]{border-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.border-white\/\[0\.05\]{border-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.border-white\/\[0\.06\]{border-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.border-white\/\[0\.06\]{border-color:color-mix(in oklab,var(--color-white)6%,transparent)}}.border-white\/\[0\.07\]{border-color:#ffffff12}@supports (color:color-mix(in lab,red,red)){.border-white\/\[0\.07\]{border-color:color-mix(in oklab,var(--color-white)7%,transparent)}}.border-white\/\[0\.08\]{border-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.border-white\/\[0\.08\]{border-color:color-mix(in oklab,var(--color-white)8%,transparent)}}.border-white\/\[0\.045\]{border-color:#ffffff0b}@supports (color:color-mix(in lab,red,red)){.border-white\/\[0\.045\]{border-color:color-mix(in oklab,var(--color-white)4.5%,transparent)}}.border-t-transparent{border-top-color:#0000}.bg-\[\#0a0907\]{background-color:#0a0907}.bg-\[\#0a0907\]\/90{background-color:#0a0907e6}.bg-\[\#0b0906\]{background-color:#0b0906}.bg-\[\#0b0906\]\/90{background-color:#0b0906e6}.bg-\[\#0c0a08\]{background-color:#0c0a08}.bg-\[\#0e0c09\]{background-color:#0e0c09}.bg-\[\#0e0c09\]\/95{background-color:#0e0c09f2}.bg-\[\#12100d\]{background-color:#12100d}.bg-\[\#12100d\]\/95{background-color:#12100df2}.bg-\[\#070604\]{background-color:#070604}.bg-\[\#d4af37\]{background-color:#d4af37}.bg-\[\#d4af37\]\/10{background-color:#d4af371a}.bg-\[\#d4af37\]\/15{background-color:#d4af3726}.bg-\[\#d4af37\]\/70{background-color:#d4af37b3}.bg-\[\#d4af37\]\/\[0\.04\]{background-color:#d4af370a}.bg-\[\#d4af37\]\/\[0\.06\]{background-color:#d4af370f}.bg-\[\#f6e5ad\]{background-color:#f6e5ad}.bg-amber-400\/5{background-color:#fcbb000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/5{background-color:color-mix(in oklab,var(--color-amber-400)5%,transparent)}}.bg-amber-400\/10{background-color:#fcbb001a}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/10{background-color:color-mix(in oklab,var(--color-amber-400)10%,transparent)}}.bg-amber-400\/\[0\.05\]{background-color:#fcbb000d}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/\[0\.05\]{background-color:color-mix(in oklab,var(--color-amber-400)5%,transparent)}}.bg-amber-400\/\[0\.07\]{background-color:#fcbb0012}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\/\[0\.07\]{background-color:color-mix(in oklab,var(--color-amber-400)7%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/15{background-color:#00000026}@supports (color:color-mix(in lab,red,red)){.bg-black\/15{background-color:color-mix(in oklab,var(--color-black)15%,transparent)}}.bg-black\/20{background-color:#0003}@supports (color:color-mix(in lab,red,red)){.bg-black\/20{background-color:color-mix(in oklab,var(--color-black)20%,transparent)}}.bg-black\/50{background-color:#00000080}@supports (color:color-mix(in lab,red,red)){.bg-black\/50{background-color:color-mix(in oklab,var(--color-black)50%,transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab,red,red)){.bg-black\/70{background-color:color-mix(in oklab,var(--color-black)70%,transparent)}}.bg-black\/75{background-color:#000000bf}@supports (color:color-mix(in lab,red,red)){.bg-black\/75{background-color:color-mix(in oklab,var(--color-black)75%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black)80%,transparent)}}.bg-black\/85{background-color:#000000d9}@supports (color:color-mix(in lab,red,red)){.bg-black\/85{background-color:color-mix(in oklab,var(--color-black)85%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-400\/5{background-color:#00d2940d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-400\/5{background-color:color-mix(in oklab,var(--color-emerald-400)5%,transparent)}}.bg-emerald-400\/10{background-color:#00d2941a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-400\/10{background-color:color-mix(in oklab,var(--color-emerald-400)10%,transparent)}}.bg-emerald-500\/5{background-color:#00bb7f0d}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/5{background-color:color-mix(in oklab,var(--color-emerald-500)5%,transparent)}}.bg-emerald-500\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-emerald-600{background-color:var(--color-emerald-600)}.bg-gold{background-color:var(--color-gold)}.bg-gold-dark\/6{background-color:#a8842a0f}@supports (color:color-mix(in lab,red,red)){.bg-gold-dark\/6{background-color:color-mix(in oklab,var(--color-gold-dark)6%,transparent)}}.bg-gold-dark\/10{background-color:#a8842a1a}@supports (color:color-mix(in lab,red,red)){.bg-gold-dark\/10{background-color:color-mix(in oklab,var(--color-gold-dark)10%,transparent)}}.bg-gold\/0{background-color:#0000}@supports (color:color-mix(in lab,red,red)){.bg-gold\/0{background-color:color-mix(in oklab,var(--color-gold)0%,transparent)}}.bg-gold\/5{background-color:#d4af370d}@supports (color:color-mix(in lab,red,red)){.bg-gold\/5{background-color:color-mix(in oklab,var(--color-gold)5%,transparent)}}.bg-gold\/6{background-color:#d4af370f}@supports (color:color-mix(in lab,red,red)){.bg-gold\/6{background-color:color-mix(in oklab,var(--color-gold)6%,transparent)}}.bg-gold\/8{background-color:#d4af3714}@supports (color:color-mix(in lab,red,red)){.bg-gold\/8{background-color:color-mix(in oklab,var(--color-gold)8%,transparent)}}.bg-gold\/10{background-color:#d4af371a}@supports (color:color-mix(in lab,red,red)){.bg-gold\/10{background-color:color-mix(in oklab,var(--color-gold)10%,transparent)}}.bg-gold\/15{background-color:#d4af3726}@supports (color:color-mix(in lab,red,red)){.bg-gold\/15{background-color:color-mix(in oklab,var(--color-gold)15%,transparent)}}.bg-gold\/25{background-color:#d4af3740}@supports (color:color-mix(in lab,red,red)){.bg-gold\/25{background-color:color-mix(in oklab,var(--color-gold)25%,transparent)}}.bg-gold\/35{background-color:#d4af3759}@supports (color:color-mix(in lab,red,red)){.bg-gold\/35{background-color:color-mix(in oklab,var(--color-gold)35%,transparent)}}.bg-gold\/50{background-color:#d4af3780}@supports (color:color-mix(in lab,red,red)){.bg-gold\/50{background-color:color-mix(in oklab,var(--color-gold)50%,transparent)}}.bg-gold\/\[0\.04\]{background-color:#d4af370a}@supports (color:color-mix(in lab,red,red)){.bg-gold\/\[0\.04\]{background-color:color-mix(in oklab,var(--color-gold)4%,transparent)}}.bg-noir-800{background-color:var(--color-noir-800)}.bg-noir-800\/60{background-color:#15120c99}@supports (color:color-mix(in lab,red,red)){.bg-noir-800\/60{background-color:color-mix(in oklab,var(--color-noir-800)60%,transparent)}}.bg-noir-800\/80{background-color:#15120ccc}@supports (color:color-mix(in lab,red,red)){.bg-noir-800\/80{background-color:color-mix(in oklab,var(--color-noir-800)80%,transparent)}}.bg-noir-900{background-color:var(--color-noir-900)}.bg-noir-900\/40{background-color:#0d0b0866}@supports (color:color-mix(in lab,red,red)){.bg-noir-900\/40{background-color:color-mix(in oklab,var(--color-noir-900)40%,transparent)}}.bg-noir-900\/50{background-color:#0d0b0880}@supports (color:color-mix(in lab,red,red)){.bg-noir-900\/50{background-color:color-mix(in oklab,var(--color-noir-900)50%,transparent)}}.bg-noir-900\/60{background-color:#0d0b0899}@supports (color:color-mix(in lab,red,red)){.bg-noir-900\/60{background-color:color-mix(in oklab,var(--color-noir-900)60%,transparent)}}.bg-noir-900\/70{background-color:#0d0b08b3}@supports (color:color-mix(in lab,red,red)){.bg-noir-900\/70{background-color:color-mix(in oklab,var(--color-noir-900)70%,transparent)}}.bg-noir-900\/80{background-color:#0d0b08cc}@supports (color:color-mix(in lab,red,red)){.bg-noir-900\/80{background-color:color-mix(in oklab,var(--color-noir-900)80%,transparent)}}.bg-noir-900\/90{background-color:#0d0b08e6}@supports (color:color-mix(in lab,red,red)){.bg-noir-900\/90{background-color:color-mix(in oklab,var(--color-noir-900)90%,transparent)}}.bg-noir-900\/95{background-color:#0d0b08f2}@supports (color:color-mix(in lab,red,red)){.bg-noir-900\/95{background-color:color-mix(in oklab,var(--color-noir-900)95%,transparent)}}.bg-noir-950{background-color:var(--color-noir-950)}.bg-noir-950\/20{background-color:#07060433}@supports (color:color-mix(in lab,red,red)){.bg-noir-950\/20{background-color:color-mix(in oklab,var(--color-noir-950)20%,transparent)}}.bg-noir-950\/60{background-color:#07060499}@supports (color:color-mix(in lab,red,red)){.bg-noir-950\/60{background-color:color-mix(in oklab,var(--color-noir-950)60%,transparent)}}.bg-noir-950\/80{background-color:#070604cc}@supports (color:color-mix(in lab,red,red)){.bg-noir-950\/80{background-color:color-mix(in oklab,var(--color-noir-950)80%,transparent)}}.bg-noir-950\/85{background-color:#070604d9}@supports (color:color-mix(in lab,red,red)){.bg-noir-950\/85{background-color:color-mix(in oklab,var(--color-noir-950)85%,transparent)}}.bg-noir-950\/90{background-color:#070604e6}@supports (color:color-mix(in lab,red,red)){.bg-noir-950\/90{background-color:color-mix(in oklab,var(--color-noir-950)90%,transparent)}}.bg-noir-950\/95{background-color:#070604f2}@supports (color:color-mix(in lab,red,red)){.bg-noir-950\/95{background-color:color-mix(in oklab,var(--color-noir-950)95%,transparent)}}.bg-pink-500\/10{background-color:#f6339a1a}@supports (color:color-mix(in lab,red,red)){.bg-pink-500\/10{background-color:color-mix(in oklab,var(--color-pink-500)10%,transparent)}}.bg-red-400{background-color:var(--color-red-400)}.bg-red-400\/5{background-color:#ff65680d}@supports (color:color-mix(in lab,red,red)){.bg-red-400\/5{background-color:color-mix(in oklab,var(--color-red-400)5%,transparent)}}.bg-red-400\/10{background-color:#ff65681a}@supports (color:color-mix(in lab,red,red)){.bg-red-400\/10{background-color:color-mix(in oklab,var(--color-red-400)10%,transparent)}}.bg-red-500\/5{background-color:#fb2c360d}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/5{background-color:color-mix(in oklab,var(--color-red-500)5%,transparent)}}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/10{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.bg-red-500\/20{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.bg-red-500\/20{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.bg-sky-400\/10{background-color:#00bcfe1a}@supports (color:color-mix(in lab,red,red)){.bg-sky-400\/10{background-color:color-mix(in oklab,var(--color-sky-400)10%,transparent)}}.bg-stone-600{background-color:var(--color-stone-600)}.bg-stone-700{background-color:var(--color-stone-700)}.bg-transparent{background-color:#0000}.bg-violet-400\/10{background-color:#a685ff1a}@supports (color:color-mix(in lab,red,red)){.bg-violet-400\/10{background-color:color-mix(in oklab,var(--color-violet-400)10%,transparent)}}.bg-white{background-color:var(--color-white)}.bg-white\/\[0\.02\]{background-color:#ffffff05}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.02\]{background-color:color-mix(in oklab,var(--color-white)2%,transparent)}}.bg-white\/\[0\.03\]{background-color:#ffffff08}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.03\]{background-color:color-mix(in oklab,var(--color-white)3%,transparent)}}.bg-white\/\[0\.05\]{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.05\]{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.bg-white\/\[0\.06\]{background-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.06\]{background-color:color-mix(in oklab,var(--color-white)6%,transparent)}}.bg-white\/\[0\.08\]{background-color:#ffffff14}@supports (color:color-mix(in lab,red,red)){.bg-white\/\[0\.08\]{background-color:color-mix(in oklab,var(--color-white)8%,transparent)}}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-br{--tw-gradient-position:to bottom right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-l{--tw-gradient-position:to left in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-r{--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-\[\#070604\]{--tw-gradient-from:#070604;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[\#181309\]{--tw-gradient-from:#181309;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[\#d4af37\]{--tw-gradient-from:#d4af37;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[\#e1bf65\]{--tw-gradient-from:#e1bf65;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[\#e7c44e\]{--tw-gradient-from:#e7c44e;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[\#f2dda0\]{--tw-gradient-from:#f2dda0;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-\[\#f3dca3\]{--tw-gradient-from:#f3dca3;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-black\/80{--tw-gradient-from:#000c}@supports (color:color-mix(in lab,red,red)){.from-black\/80{--tw-gradient-from:color-mix(in oklab,var(--color-black)80%,transparent)}}.from-black\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-gold{--tw-gradient-from:var(--color-gold);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-gold-300{--tw-gradient-from:var(--color-gold-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-gold-dark{--tw-gradient-from:var(--color-gold-dark);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-gold\/25{--tw-gradient-from:#d4af3740}@supports (color:color-mix(in lab,red,red)){.from-gold\/25{--tw-gradient-from:color-mix(in oklab,var(--color-gold)25%,transparent)}}.from-gold\/25{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-800{--tw-gradient-from:var(--color-noir-800);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-800\/60{--tw-gradient-from:#15120c99}@supports (color:color-mix(in lab,red,red)){.from-noir-800\/60{--tw-gradient-from:color-mix(in oklab,var(--color-noir-800)60%,transparent)}}.from-noir-800\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-800\/70{--tw-gradient-from:#15120cb3}@supports (color:color-mix(in lab,red,red)){.from-noir-800\/70{--tw-gradient-from:color-mix(in oklab,var(--color-noir-800)70%,transparent)}}.from-noir-800\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-800\/80{--tw-gradient-from:#15120ccc}@supports (color:color-mix(in lab,red,red)){.from-noir-800\/80{--tw-gradient-from:color-mix(in oklab,var(--color-noir-800)80%,transparent)}}.from-noir-800\/80{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-800\/90{--tw-gradient-from:#15120ce6}@supports (color:color-mix(in lab,red,red)){.from-noir-800\/90{--tw-gradient-from:color-mix(in oklab,var(--color-noir-800)90%,transparent)}}.from-noir-800\/90{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-900{--tw-gradient-from:var(--color-noir-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-950{--tw-gradient-from:var(--color-noir-950);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-950\/50{--tw-gradient-from:#07060480}@supports (color:color-mix(in lab,red,red)){.from-noir-950\/50{--tw-gradient-from:color-mix(in oklab,var(--color-noir-950)50%,transparent)}}.from-noir-950\/50{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-950\/60{--tw-gradient-from:#07060499}@supports (color:color-mix(in lab,red,red)){.from-noir-950\/60{--tw-gradient-from:color-mix(in oklab,var(--color-noir-950)60%,transparent)}}.from-noir-950\/60{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-950\/70{--tw-gradient-from:#070604b3}@supports (color:color-mix(in lab,red,red)){.from-noir-950\/70{--tw-gradient-from:color-mix(in oklab,var(--color-noir-950)70%,transparent)}}.from-noir-950\/70{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-noir-950\/85{--tw-gradient-from:#070604d9}@supports (color:color-mix(in lab,red,red)){.from-noir-950\/85{--tw-gradient-from:color-mix(in oklab,var(--color-noir-950)85%,transparent)}}.from-noir-950\/85{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.from-white\/\[0\.02\]{--tw-gradient-from:#ffffff05}@supports (color:color-mix(in lab,red,red)){.from-white\/\[0\.02\]{--tw-gradient-from:color-mix(in oklab,var(--color-white)2%,transparent)}}.from-white\/\[0\.02\]{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.via-\[\#0e0b06\]{--tw-gradient-via:#0e0b06;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#d4af37\]{--tw-gradient-via:#d4af37;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#e6c46e\]\/35{--tw-gradient-via:oklab(83.1859% .0032689 .112282/.35);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-\[\#f6e5ad\]{--tw-gradient-via:#f6e5ad;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-black\/35{--tw-gradient-via:#00000059}@supports (color:color-mix(in lab,red,red)){.via-black\/35{--tw-gradient-via:color-mix(in oklab,var(--color-black)35%,transparent)}}.via-black\/35{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-gold{--tw-gradient-via:var(--color-gold);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-gold\/8{--tw-gradient-via:#d4af3714}@supports (color:color-mix(in lab,red,red)){.via-gold\/8{--tw-gradient-via:color-mix(in oklab,var(--color-gold)8%,transparent)}}.via-gold\/8{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-gold\/10{--tw-gradient-via:#d4af371a}@supports (color:color-mix(in lab,red,red)){.via-gold\/10{--tw-gradient-via:color-mix(in oklab,var(--color-gold)10%,transparent)}}.via-gold\/10{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-noir-900{--tw-gradient-via:var(--color-noir-900);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-noir-950{--tw-gradient-via:var(--color-noir-950);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-noir-950\/30{--tw-gradient-via:#0706044d}@supports (color:color-mix(in lab,red,red)){.via-noir-950\/30{--tw-gradient-via:color-mix(in oklab,var(--color-noir-950)30%,transparent)}}.via-noir-950\/30{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-noir-950\/40{--tw-gradient-via:#07060466}@supports (color:color-mix(in lab,red,red)){.via-noir-950\/40{--tw-gradient-via:color-mix(in oklab,var(--color-noir-950)40%,transparent)}}.via-noir-950\/40{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-transparent{--tw-gradient-via:transparent;--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/40{--tw-gradient-via:#fff6}@supports (color:color-mix(in lab,red,red)){.via-white\/40{--tw-gradient-via:color-mix(in oklab,var(--color-white)40%,transparent)}}.via-white\/40{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.via-white\/50{--tw-gradient-via:#ffffff80}@supports (color:color-mix(in lab,red,red)){.via-white\/50{--tw-gradient-via:color-mix(in oklab,var(--color-white)50%,transparent)}}.via-white\/50{--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops)}.to-\[\#070604\]\/55{--tw-gradient-to:oklab(12.2572% .000285279 .00693696/.55);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[\#80621c\]{--tw-gradient-to:#80621c;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[\#090705\]{--tw-gradient-to:#090705;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[\#a8842a\]{--tw-gradient-to:#a8842a;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[\#e7c44e\]{--tw-gradient-to:#e7c44e;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-\[\#f0d87c\]{--tw-gradient-to:#f0d87c;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-gold{--tw-gradient-to:var(--color-gold);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-gold-300{--tw-gradient-to:var(--color-gold-300);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-gold-dark{--tw-gradient-to:var(--color-gold-dark);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-gold\/5{--tw-gradient-to:#d4af370d}@supports (color:color-mix(in lab,red,red)){.to-gold\/5{--tw-gradient-to:color-mix(in oklab,var(--color-gold)5%,transparent)}}.to-gold\/5{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-noir-900{--tw-gradient-to:var(--color-noir-900);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-noir-950{--tw-gradient-to:var(--color-noir-950);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-noir-950\/10{--tw-gradient-to:#0706041a}@supports (color:color-mix(in lab,red,red)){.to-noir-950\/10{--tw-gradient-to:color-mix(in oklab,var(--color-noir-950)10%,transparent)}}.to-noir-950\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.fill-gold{fill:var(--color-gold)}.fill-noir-950{fill:var(--color-noir-950)}.object-cover{object-fit:cover}.object-center{object-position:center}.p-0\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-2\.5{padding:calc(var(--spacing)*2.5)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.p-6{padding:calc(var(--spacing)*6)}.p-8{padding:calc(var(--spacing)*8)}.p-12{padding:calc(var(--spacing)*12)}.px-1\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-7{padding-inline:calc(var(--spacing)*7)}.px-8{padding-inline:calc(var(--spacing)*8)}.px-9{padding-inline:calc(var(--spacing)*9)}.py-0\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-3\.5{padding-block:calc(var(--spacing)*3.5)}.py-4{padding-block:calc(var(--spacing)*4)}.py-5{padding-block:calc(var(--spacing)*5)}.py-6{padding-block:calc(var(--spacing)*6)}.py-7{padding-block:calc(var(--spacing)*7)}.py-8{padding-block:calc(var(--spacing)*8)}.py-10{padding-block:calc(var(--spacing)*10)}.py-12{padding-block:calc(var(--spacing)*12)}.py-14{padding-block:calc(var(--spacing)*14)}.py-16{padding-block:calc(var(--spacing)*16)}.py-20{padding-block:calc(var(--spacing)*20)}.py-24{padding-block:calc(var(--spacing)*24)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-3\.5{padding-top:calc(var(--spacing)*3.5)}.pt-4{padding-top:calc(var(--spacing)*4)}.pt-5{padding-top:calc(var(--spacing)*5)}.pt-6{padding-top:calc(var(--spacing)*6)}.pt-7{padding-top:calc(var(--spacing)*7)}.pt-8{padding-top:calc(var(--spacing)*8)}.pt-24{padding-top:calc(var(--spacing)*24)}.pt-28{padding-top:calc(var(--spacing)*28)}.pt-\[64px\]{padding-top:64px}.pr-3{padding-right:calc(var(--spacing)*3)}.pr-4{padding-right:calc(var(--spacing)*4)}.pr-10{padding-right:calc(var(--spacing)*10)}.pr-11{padding-right:calc(var(--spacing)*11)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-3{padding-bottom:calc(var(--spacing)*3)}.pb-4{padding-bottom:calc(var(--spacing)*4)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-8{padding-bottom:calc(var(--spacing)*8)}.pb-16{padding-bottom:calc(var(--spacing)*16)}.pb-28{padding-bottom:calc(var(--spacing)*28)}.pl-7{padding-left:calc(var(--spacing)*7)}.pl-10{padding-left:calc(var(--spacing)*10)}.pl-11{padding-left:calc(var(--spacing)*11)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.font-serif{font-family:var(--font-serif)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[1\.5rem\]{font-size:1.5rem}.text-\[1\.7rem\]{font-size:1.7rem}.text-\[1\.45rem\]{font-size:1.45rem}.text-\[1\.75rem\]{font-size:1.75rem}.text-\[9px\]{font-size:9px}.text-\[10\.5px\]{font-size:10.5px}.text-\[10px\]{font-size:10px}.text-\[11\.5px\]{font-size:11.5px}.text-\[11px\]{font-size:11px}.text-\[12\.5px\]{font-size:12.5px}.text-\[12px\]{font-size:12px}.text-\[13\.5px\]{font-size:13.5px}.text-\[13px\]{font-size:13px}.text-\[14\.5px\]{font-size:14.5px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.leading-6{--tw-leading:calc(var(--spacing)*6);line-height:calc(var(--spacing)*6)}.leading-7{--tw-leading:calc(var(--spacing)*7);line-height:calc(var(--spacing)*7)}.leading-\[1\.3\]{--tw-leading:1.3;line-height:1.3}.leading-\[1\.8\]{--tw-leading:1.8;line-height:1.8}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-\[1\.95\]{--tw-leading:1.95;line-height:1.95}.leading-\[2\.15\]{--tw-leading:2.15;line-height:2.15}.leading-\[2\]{--tw-leading:2;line-height:2}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-extrabold{--tw-font-weight:var(--font-weight-extrabold);font-weight:var(--font-weight-extrabold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[0\.2em\]{--tw-tracking:.2em;letter-spacing:.2em}.tracking-\[0\.3em\]{--tw-tracking:.3em;letter-spacing:.3em}.tracking-\[0\.4em\]{--tw-tracking:.4em;letter-spacing:.4em}.tracking-\[0\.15em\]{--tw-tracking:.15em;letter-spacing:.15em}.tracking-\[0\.18em\]{--tw-tracking:.18em;letter-spacing:.18em}.tracking-\[0\.22em\]{--tw-tracking:.22em;letter-spacing:.22em}.tracking-\[0\.25em\]{--tw-tracking:.25em;letter-spacing:.25em}.tracking-\[0\.28em\]{--tw-tracking:.28em;letter-spacing:.28em}.tracking-\[0\.35em\]{--tw-tracking:.35em;letter-spacing:.35em}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#100d07\]{color:#100d07}.text-\[\#110e08\]{color:#110e08}.text-\[\#171208\]{color:#171208}.text-\[\#d4af37\]{color:#d4af37}.text-\[\#d4af37\]\/45{color:#d4af3773}.text-\[\#e2bd55\]{color:#e2bd55}.text-\[\#e7c44e\]{color:#e7c44e}.text-\[\#ecd08a\]{color:#ecd08a}.text-\[\#ecd08a\]\/75{color:#ecd08abf}.text-\[\#ecd08a\]\/85{color:#ecd08ad9}.text-\[\#f0d87c\]{color:#f0d87c}.text-\[\#f1e9d8\]{color:#f1e9d8}.text-\[\#f2dda0\]{color:#f2dda0}.text-\[\#f5efe2\]{color:#f5efe2}.text-amber-200{color:var(--color-amber-200)}.text-amber-300{color:var(--color-amber-300)}.text-black{color:var(--color-black)}.text-emerald-200{color:var(--color-emerald-200)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-gold{color:var(--color-gold)}.text-gold-300{color:var(--color-gold-300)}.text-gold-300\/60{color:#f3dca399}@supports (color:color-mix(in lab,red,red)){.text-gold-300\/60{color:color-mix(in oklab,var(--color-gold-300)60%,transparent)}}.text-gold-300\/75{color:#f3dca3bf}@supports (color:color-mix(in lab,red,red)){.text-gold-300\/75{color:color-mix(in oklab,var(--color-gold-300)75%,transparent)}}.text-gold-300\/80{color:#f3dca3cc}@supports (color:color-mix(in lab,red,red)){.text-gold-300\/80{color:color-mix(in oklab,var(--color-gold-300)80%,transparent)}}.text-gold\/15{color:#d4af3726}@supports (color:color-mix(in lab,red,red)){.text-gold\/15{color:color-mix(in oklab,var(--color-gold)15%,transparent)}}.text-gold\/40{color:#d4af3766}@supports (color:color-mix(in lab,red,red)){.text-gold\/40{color:color-mix(in oklab,var(--color-gold)40%,transparent)}}.text-gold\/60{color:#d4af3799}@supports (color:color-mix(in lab,red,red)){.text-gold\/60{color:color-mix(in oklab,var(--color-gold)60%,transparent)}}.text-gold\/65{color:#d4af37a6}@supports (color:color-mix(in lab,red,red)){.text-gold\/65{color:color-mix(in oklab,var(--color-gold)65%,transparent)}}.text-gold\/70{color:#d4af37b3}@supports (color:color-mix(in lab,red,red)){.text-gold\/70{color:color-mix(in oklab,var(--color-gold)70%,transparent)}}.text-noir-950{color:var(--color-noir-950)}.text-pink-400{color:var(--color-pink-400)}.text-red-100{color:var(--color-red-100)}.text-red-200{color:var(--color-red-200)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-sky-300{color:var(--color-sky-300)}.text-stone-50{color:var(--color-stone-50)}.text-stone-100{color:var(--color-stone-100)}.text-stone-200{color:var(--color-stone-200)}.text-stone-300{color:var(--color-stone-300)}.text-stone-400{color:var(--color-stone-400)}.text-stone-500{color:var(--color-stone-500)}.text-stone-600{color:var(--color-stone-600)}.text-stone-700{color:var(--color-stone-700)}.text-violet-300{color:var(--color-violet-300)}.text-white{color:var(--color-white)}.text-white\/45{color:#ffffff73}@supports (color:color-mix(in lab,red,red)){.text-white\/45{color:color-mix(in oklab,var(--color-white)45%,transparent)}}.text-white\/55{color:#ffffff8c}@supports (color:color-mix(in lab,red,red)){.text-white\/55{color:color-mix(in oklab,var(--color-white)55%,transparent)}}.text-white\/60{color:#fff9}@supports (color:color-mix(in lab,red,red)){.text-white\/60{color:color-mix(in oklab,var(--color-white)60%,transparent)}}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.placeholder-stone-500::placeholder{color:var(--color-stone-500)}.placeholder-stone-600::placeholder{color:var(--color-stone-600)}.opacity-0{opacity:0}.opacity-60{opacity:.6}.opacity-100{opacity:1}.opacity-\[0\.32\]{opacity:.32}.mix-blend-overlay{mix-blend-mode:overlay}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_8px_rgba\(246\,229\,173\,0\.9\)\]{--tw-shadow:0 0 8px var(--tw-shadow-color,#f6e5ade6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_12px_rgba\(230\,196\,110\,0\.75\)\]{--tw-shadow:0 0 12px var(--tw-shadow-color,#e6c46ebf);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_18px_\#d4af37\]{--tw-shadow:0 0 18px var(--tw-shadow-color,#d4af37);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_18px_3px_rgba\(230\,196\,110\,0\.6\)\]{--tw-shadow:0 0 18px 3px var(--tw-shadow-color,#e6c46e99);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_20px_rgba\(212\,175\,55\,0\.25\)\]{--tw-shadow:0 0 20px var(--tw-shadow-color,#d4af3740);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_0_35px_rgba\(212\,175\,55\,0\.25\)\]{--tw-shadow:0 0 35px var(--tw-shadow-color,#d4af3740);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_4px_25px_rgba\(212\,175\,55\,0\.3\)\]{--tw-shadow:0 4px 25px var(--tw-shadow-color,#d4af374d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_6px_20px_-6px_rgba\(212\,175\,55\,0\.7\)\]{--tw-shadow:0 6px 20px -6px var(--tw-shadow-color,#d4af37b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_25px_-8px_rgba\(212\,175\,55\,0\.7\)\]{--tw-shadow:0 8px 25px -8px var(--tw-shadow-color,#d4af37b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_-6px_rgba\(212\,175\,55\,0\.7\)\]{--tw-shadow:0 8px 30px -6px var(--tw-shadow-color,#d4af37b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_30px_-8px_rgba\(212\,175\,55\,0\.6\)\]{--tw-shadow:0 8px 30px -8px var(--tw-shadow-color,#d4af3799);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_8px_40px_-12px_rgba\(212\,175\,55\,0\.15\)\]{--tw-shadow:0 8px 40px -12px var(--tw-shadow-color,#d4af3726);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_35px_-10px_rgba\(212\,175\,55\,0\.7\)\]{--tw-shadow:0 10px 35px -10px var(--tw-shadow-color,#d4af37b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_10px_40px_-8px_rgba\(212\,175\,55\,0\.55\)\]{--tw-shadow:0 10px 40px -8px var(--tw-shadow-color,#d4af378c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_12px_40px_-10px_rgba\(212\,175\,55\,0\.6\)\]{--tw-shadow:0 12px 40px -10px var(--tw-shadow-color,#d4af3799);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_12px_40px_-10px_rgba\(212\,175\,55\,0\.7\)\]{--tw-shadow:0 12px 40px -10px var(--tw-shadow-color,#d4af37b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_12px_40px_-12px_rgba\(212\,175\,55\,0\.7\)\]{--tw-shadow:0 12px 40px -12px var(--tw-shadow-color,#d4af37b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_12px_55px_-15px_rgba\(225\,190\,85\,0\.7\)\]{--tw-shadow:0 12px 55px -15px var(--tw-shadow-color,#e1be55b3);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_24px_80px_rgba\(0\,0\,0\,0\.8\)\]{--tw-shadow:0 24px 80px var(--tw-shadow-color,#000c);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_25px_80px_-15px_rgba\(212\,175\,55\,0\.35\)\]{--tw-shadow:0 25px 80px -15px var(--tw-shadow-color,#d4af3759);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_25px_80px_rgba\(0\,0\,0\,0\.85\)\]{--tw-shadow:0 25px 80px var(--tw-shadow-color,#000000d9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_30px_80px_-30px_rgba\(212\,175\,55\,0\.25\)\]{--tw-shadow:0 30px 80px -30px var(--tw-shadow-color,#d4af3740);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_30px_90px_-20px_rgba\(0\,0\,0\,0\.9\)\]{--tw-shadow:0 30px 90px -20px var(--tw-shadow-color,#000000e6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[0_40px_110px_-25px_rgba\(0\,0\,0\,0\.95\)\,0_0_90px_-20px_rgba\(212\,175\,55\,0\.35\)\]{--tw-shadow:0 40px 110px -25px var(--tw-shadow-color,#000000f2),0 0 90px -20px var(--tw-shadow-color,#d4af3759);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-\[inset_0_0_28px_rgba\(0\,0\,0\,0\.95\)\,0_0_50px_-6px_rgba\(212\,175\,55\,0\.5\)\]{--tw-shadow:inset 0 0 28px var(--tw-shadow-color,#000000f2),0 0 50px -6px var(--tw-shadow-color,#d4af3780);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-2xl{--tw-blur:blur(var(--blur-2xl));filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-\[80px\]{--tw-blur:blur(80px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-\[120px\]{--tw-blur:blur(120px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-\[130px\]{--tw-blur:blur(130px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-\[140px\]{--tw-blur:blur(140px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-\[150px\]{--tw-blur:blur(150px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.blur-\[160px\]{--tw-blur:blur(160px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.drop-shadow-\[0_2px_12px_rgba\(0\,0\,0\,0\.6\)\]{--tw-drop-shadow-size:drop-shadow(0 2px 12px var(--tw-drop-shadow-color,#0009));--tw-drop-shadow:var(--tw-drop-shadow-size);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-2xl{--tw-backdrop-blur:blur(var(--blur-2xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-xl{--tw-backdrop-blur:blur(var(--blur-xl));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-shadow{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-400{--tw-duration:.4s;transition-duration:.4s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.duration-600{--tw-duration:.6s;transition-duration:.6s}.duration-700{--tw-duration:.7s;transition-duration:.7s}.duration-800{--tw-duration:.8s;transition-duration:.8s}.duration-1000{--tw-duration:1s;transition-duration:1s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.group-hover\:w-full:is(:where(.group):hover *){width:100%}.group-hover\:-translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.group-hover\:translate-x-1:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing)*1);translate:var(--tw-translate-x)var(--tw-translate-y)}.group-hover\:translate-x-full:is(:where(.group):hover *){--tw-translate-x:100%;translate:var(--tw-translate-x)var(--tw-translate-y)}.group-hover\:scale-105:is(:where(.group):hover *){--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\:scale-108:is(:where(.group):hover *){--tw-scale-x:108%;--tw-scale-y:108%;--tw-scale-z:108%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\:scale-110:is(:where(.group):hover *){--tw-scale-x:110%;--tw-scale-y:110%;--tw-scale-z:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\:rotate-6:is(:where(.group):hover *){rotate:6deg}.group-hover\:bg-gold\/15:is(:where(.group):hover *){background-color:#d4af3726}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-gold\/15:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-gold)15%,transparent)}}.group-hover\:bg-gold\/20:is(:where(.group):hover *){background-color:#d4af3733}@supports (color:color-mix(in lab,red,red)){.group-hover\:bg-gold\/20:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-gold)20%,transparent)}}.group-hover\:text-gold:is(:where(.group):hover *){color:var(--color-gold)}.group-hover\:text-gold-300:is(:where(.group):hover *){color:var(--color-gold-300)}.group-hover\:text-stone-300:is(:where(.group):hover *){color:var(--color-stone-300)}.group-hover\:opacity-30:is(:where(.group):hover *){opacity:.3}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.selection\:bg-\[\#d4af37\]\/30 ::selection{background-color:#d4af374d}.selection\:bg-\[\#d4af37\]\/30::selection{background-color:#d4af374d}.selection\:text-\[\#f5efe2\] ::selection{color:#f5efe2}.selection\:text-\[\#f5efe2\]::selection{color:#f5efe2}.placeholder\:text-stone-600::placeholder{color:var(--color-stone-600)}.last\:border-0:last-child{border-style:var(--tw-border-style);border-width:0}@media(hover:hover){.hover\:-translate-y-1:hover{--tw-translate-y:calc(var(--spacing)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.hover\:scale-102:hover{--tw-scale-x:102%;--tw-scale-y:102%;--tw-scale-z:102%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\:scale-\[1\.03\]:hover{scale:1.03}.hover\:border-\[\#d4af37\]:hover{border-color:#d4af37}.hover\:border-\[\#d4af37\]\/30:hover{border-color:#d4af374d}.hover\:border-\[\#d4af37\]\/40:hover{border-color:#d4af3766}.hover\:border-emerald-400\/30:hover{border-color:#00d2944d}@supports (color:color-mix(in lab,red,red)){.hover\:border-emerald-400\/30:hover{border-color:color-mix(in oklab,var(--color-emerald-400)30%,transparent)}}.hover\:border-gold:hover{border-color:var(--color-gold)}.hover\:border-gold\/40:hover{border-color:#d4af3766}@supports (color:color-mix(in lab,red,red)){.hover\:border-gold\/40:hover{border-color:color-mix(in oklab,var(--color-gold)40%,transparent)}}.hover\:border-gold\/45:hover{border-color:#d4af3773}@supports (color:color-mix(in lab,red,red)){.hover\:border-gold\/45:hover{border-color:color-mix(in oklab,var(--color-gold)45%,transparent)}}.hover\:border-gold\/50:hover{border-color:#d4af3780}@supports (color:color-mix(in lab,red,red)){.hover\:border-gold\/50:hover{border-color:color-mix(in oklab,var(--color-gold)50%,transparent)}}.hover\:border-gold\/60:hover{border-color:#d4af3799}@supports (color:color-mix(in lab,red,red)){.hover\:border-gold\/60:hover{border-color:color-mix(in oklab,var(--color-gold)60%,transparent)}}.hover\:border-red-400\/20:hover{border-color:#ff656833}@supports (color:color-mix(in lab,red,red)){.hover\:border-red-400\/20:hover{border-color:color-mix(in oklab,var(--color-red-400)20%,transparent)}}.hover\:border-red-400\/30:hover{border-color:#ff65684d}@supports (color:color-mix(in lab,red,red)){.hover\:border-red-400\/30:hover{border-color:color-mix(in oklab,var(--color-red-400)30%,transparent)}}.hover\:border-red-500\/40:hover{border-color:#fb2c3666}@supports (color:color-mix(in lab,red,red)){.hover\:border-red-500\/40:hover{border-color:color-mix(in oklab,var(--color-red-500)40%,transparent)}}.hover\:border-white\/15:hover{border-color:#ffffff26}@supports (color:color-mix(in lab,red,red)){.hover\:border-white\/15:hover{border-color:color-mix(in oklab,var(--color-white)15%,transparent)}}.hover\:bg-\[\#d4af37\]\/10:hover{background-color:#d4af371a}.hover\:bg-\[\#d4af37\]\/20:hover{background-color:#d4af3733}.hover\:bg-\[\#e7c44e\]:hover{background-color:#e7c44e}.hover\:bg-amber-400\/10:hover{background-color:#fcbb001a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-amber-400\/10:hover{background-color:color-mix(in oklab,var(--color-amber-400)10%,transparent)}}.hover\:bg-emerald-500:hover{background-color:var(--color-emerald-500)}.hover\:bg-gold:hover{background-color:var(--color-gold)}.hover\:bg-gold\/10:hover{background-color:#d4af371a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-gold\/10:hover{background-color:color-mix(in oklab,var(--color-gold)10%,transparent)}}.hover\:bg-gold\/50:hover{background-color:#d4af3780}@supports (color:color-mix(in lab,red,red)){.hover\:bg-gold\/50:hover{background-color:color-mix(in oklab,var(--color-gold)50%,transparent)}}.hover\:bg-gold\/60:hover{background-color:#d4af3799}@supports (color:color-mix(in lab,red,red)){.hover\:bg-gold\/60:hover{background-color:color-mix(in oklab,var(--color-gold)60%,transparent)}}.hover\:bg-red-400\/10:hover{background-color:#ff65681a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-400\/10:hover{background-color:color-mix(in oklab,var(--color-red-400)10%,transparent)}}.hover\:bg-red-500\/10:hover{background-color:#fb2c361a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/10:hover{background-color:color-mix(in oklab,var(--color-red-500)10%,transparent)}}.hover\:bg-red-500\/15:hover{background-color:#fb2c3626}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/15:hover{background-color:color-mix(in oklab,var(--color-red-500)15%,transparent)}}.hover\:bg-red-500\/20:hover{background-color:#fb2c3633}@supports (color:color-mix(in lab,red,red)){.hover\:bg-red-500\/20:hover{background-color:color-mix(in oklab,var(--color-red-500)20%,transparent)}}.hover\:bg-white\/5:hover{background-color:#ffffff0d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/5:hover{background-color:color-mix(in oklab,var(--color-white)5%,transparent)}}.hover\:bg-white\/\[0\.04\]:hover{background-color:#ffffff0a}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/\[0\.04\]:hover{background-color:color-mix(in oklab,var(--color-white)4%,transparent)}}.hover\:bg-white\/\[0\.015\]:hover{background-color:#ffffff04}@supports (color:color-mix(in lab,red,red)){.hover\:bg-white\/\[0\.015\]:hover{background-color:color-mix(in oklab,var(--color-white)1.5%,transparent)}}.hover\:text-\[\#e7c44e\]:hover{color:#e7c44e}.hover\:text-\[\#f5dfa0\]:hover{color:#f5dfa0}.hover\:text-emerald-300:hover{color:var(--color-emerald-300)}.hover\:text-gold:hover{color:var(--color-gold)}.hover\:text-gold-300:hover{color:var(--color-gold-300)}.hover\:text-noir-950:hover{color:var(--color-noir-950)}.hover\:text-red-200:hover{color:var(--color-red-200)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-stone-100:hover{color:var(--color-stone-100)}.hover\:text-stone-200:hover{color:var(--color-stone-200)}.hover\:text-stone-300:hover{color:var(--color-stone-300)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}.hover\:shadow-\[0_4px_20px_rgba\(212\,175\,55\,0\.4\)\]:hover{--tw-shadow:0 4px 20px var(--tw-shadow-color,#d4af3766);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_8px_40px_-6px_rgba\(212\,175\,55\,0\.8\)\]:hover{--tw-shadow:0 8px 40px -6px var(--tw-shadow-color,#d4af37cc);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_12px_40px_-10px_rgba\(212\,175\,55\,0\.6\)\]:hover{--tw-shadow:0 12px 40px -10px var(--tw-shadow-color,#d4af3799);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_15px_40px_-15px_rgba\(212\,175\,55\,0\.4\)\]:hover{--tw-shadow:0 15px 40px -15px var(--tw-shadow-color,#d4af3766);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_16px_50px_-8px_rgba\(212\,175\,55\,0\.9\)\]:hover{--tw-shadow:0 16px 50px -8px var(--tw-shadow-color,#d4af37e6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_16px_50px_-8px_rgba\(212\,175\,55\,0\.85\)\]:hover{--tw-shadow:0 16px 50px -8px var(--tw-shadow-color,#d4af37d9);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_18px_65px_-12px_rgba\(225\,190\,85\,0\.9\)\]:hover{--tw-shadow:0 18px 65px -12px var(--tw-shadow-color,#e1be55e6);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:shadow-\[0_25px_60px_-20px_rgba\(212\,175\,55\,0\.3\)\]:hover{--tw-shadow:0 25px 60px -20px var(--tw-shadow-color,#d4af374d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hover\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.focus\:border-\[\#d4af37\]:focus{border-color:#d4af37}.focus\:border-\[\#d4af37\]\/60:focus{border-color:#d4af3799}.focus\:border-gold\/60:focus{border-color:#d4af3799}@supports (color:color-mix(in lab,red,red)){.focus\:border-gold\/60:focus{border-color:color-mix(in oklab,var(--color-gold)60%,transparent)}}.focus\:border-gold\/70:focus{border-color:#d4af37b3}@supports (color:color-mix(in lab,red,red)){.focus\:border-gold\/70:focus{border-color:color-mix(in oklab,var(--color-gold)70%,transparent)}}.focus\:shadow-\[0_0_0_4px_rgba\(212\,175\,55\,0\.1\)\]:focus{--tw-shadow:0 0 0 4px var(--tw-shadow-color,#d4af371a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus\:ring-\[\#d4af37\]:focus{--tw-ring-color:#d4af37}.focus\:ring-\[\#d4af37\]\/10:focus{--tw-ring-color:oklab(76.6528% -.00256401 .138654/.1)}.focus\:ring-gold\/30:focus{--tw-ring-color:#d4af374d}@supports (color:color-mix(in lab,red,red)){.focus\:ring-gold\/30:focus{--tw-ring-color:color-mix(in oklab,var(--color-gold)30%,transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-visible\:ring-\[\#f6e5ad\]:focus-visible{--tw-ring-color:#f6e5ad}.focus-visible\:ring-offset-4:focus-visible{--tw-ring-offset-width:4px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.focus-visible\:ring-offset-\[\#070604\]:focus-visible{--tw-ring-offset-color:#070604}.active\:scale-\[0\.98\]:active{scale:.98}.active\:bg-gold\/10:active{background-color:#d4af371a}@supports (color:color-mix(in lab,red,red)){.active\:bg-gold\/10:active{background-color:color-mix(in oklab,var(--color-gold)10%,transparent)}}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-stone-700:disabled{background-color:var(--color-stone-700)}.disabled\:bg-stone-700\/60:disabled{background-color:#44403b99}@supports (color:color-mix(in lab,red,red)){.disabled\:bg-stone-700\/60:disabled{background-color:color-mix(in oklab,var(--color-stone-700)60%,transparent)}}.disabled\:text-stone-400:disabled{color:var(--color-stone-400)}.disabled\:text-stone-700:disabled{color:var(--color-stone-700)}.disabled\:opacity-30:disabled{opacity:.3}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\:-inset-4{inset:calc(var(--spacing)*-4)}.sm\:-top-6{top:calc(var(--spacing)*-6)}.sm\:top-4{top:calc(var(--spacing)*4)}.sm\:top-\[68px\]{top:68px}.sm\:right-2{right:calc(var(--spacing)*2)}.sm\:right-4{right:calc(var(--spacing)*4)}.sm\:right-8{right:calc(var(--spacing)*8)}.sm\:right-auto{right:auto}.sm\:-bottom-6{bottom:calc(var(--spacing)*-6)}.sm\:bottom-6{bottom:calc(var(--spacing)*6)}.sm\:bottom-24{bottom:calc(var(--spacing)*24)}.sm\:left-6{left:calc(var(--spacing)*6)}.sm\:col-span-2{grid-column:span 2/span 2}.sm\:mt-4{margin-top:calc(var(--spacing)*4)}.sm\:mt-6{margin-top:calc(var(--spacing)*6)}.sm\:mt-10{margin-top:calc(var(--spacing)*10)}.sm\:mb-3{margin-bottom:calc(var(--spacing)*3)}.sm\:mb-5{margin-bottom:calc(var(--spacing)*5)}.sm\:mb-6{margin-bottom:calc(var(--spacing)*6)}.sm\:mb-8{margin-bottom:calc(var(--spacing)*8)}.sm\:mb-14{margin-bottom:calc(var(--spacing)*14)}.sm\:line-clamp-1{-webkit-line-clamp:1;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:inline-block{display:inline-block}.sm\:inline-flex{display:inline-flex}.sm\:aspect-\[16\/9\]{aspect-ratio:16/9}.sm\:h-4{height:calc(var(--spacing)*4)}.sm\:h-5{height:calc(var(--spacing)*5)}.sm\:h-6\.5{height:calc(var(--spacing)*6.5)}.sm\:h-9{height:calc(var(--spacing)*9)}.sm\:h-14{height:calc(var(--spacing)*14)}.sm\:h-16{height:calc(var(--spacing)*16)}.sm\:h-20{height:calc(var(--spacing)*20)}.sm\:h-24{height:calc(var(--spacing)*24)}.sm\:h-40{height:calc(var(--spacing)*40)}.sm\:h-\[72px\]{height:72px}.sm\:min-h-\[300px\]{min-height:300px}.sm\:w-4{width:calc(var(--spacing)*4)}.sm\:w-5{width:calc(var(--spacing)*5)}.sm\:w-6\.5{width:calc(var(--spacing)*6.5)}.sm\:w-8{width:calc(var(--spacing)*8)}.sm\:w-9{width:calc(var(--spacing)*9)}.sm\:w-14{width:calc(var(--spacing)*14)}.sm\:w-16{width:calc(var(--spacing)*16)}.sm\:w-24{width:calc(var(--spacing)*24)}.sm\:w-40{width:calc(var(--spacing)*40)}.sm\:w-80{width:calc(var(--spacing)*80)}.sm\:w-\[400px\]{width:400px}.sm\:max-w-lg{max-width:var(--container-lg)}.sm\:max-w-md{max-width:var(--container-md)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:grid-cols-\[1fr_200px\]{grid-template-columns:1fr 200px}.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}.sm\:items-end{align-items:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:justify-center{justify-content:center}.sm\:justify-end{justify-content:flex-end}.sm\:gap-3{gap:calc(var(--spacing)*3)}.sm\:gap-4{gap:calc(var(--spacing)*4)}.sm\:gap-6{gap:calc(var(--spacing)*6)}.sm\:gap-10{gap:calc(var(--spacing)*10)}.sm\:gap-12{gap:calc(var(--spacing)*12)}:where(.sm\:space-y-20>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*20)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*20)*calc(1 - var(--tw-space-y-reverse)))}.sm\:rounded-3xl{border-radius:var(--radius-3xl)}.sm\:rounded-\[2\.5rem\]{border-radius:2.5rem}.sm\:rounded-\[2rem\]{border-radius:2rem}.sm\:p-5{padding:calc(var(--spacing)*5)}.sm\:p-6{padding:calc(var(--spacing)*6)}.sm\:p-7{padding:calc(var(--spacing)*7)}.sm\:p-10{padding:calc(var(--spacing)*10)}.sm\:p-12{padding:calc(var(--spacing)*12)}.sm\:p-14{padding:calc(var(--spacing)*14)}.sm\:px-3\.5{padding-inline:calc(var(--spacing)*3.5)}.sm\:px-6{padding-inline:calc(var(--spacing)*6)}.sm\:px-7{padding-inline:calc(var(--spacing)*7)}.sm\:px-8{padding-inline:calc(var(--spacing)*8)}.sm\:px-9{padding-inline:calc(var(--spacing)*9)}.sm\:px-10{padding-inline:calc(var(--spacing)*10)}.sm\:px-14{padding-inline:calc(var(--spacing)*14)}.sm\:py-1\.5{padding-block:calc(var(--spacing)*1.5)}.sm\:py-3{padding-block:calc(var(--spacing)*3)}.sm\:py-4{padding-block:calc(var(--spacing)*4)}.sm\:py-14{padding-block:calc(var(--spacing)*14)}.sm\:py-16{padding-block:calc(var(--spacing)*16)}.sm\:py-20{padding-block:calc(var(--spacing)*20)}.sm\:py-24{padding-block:calc(var(--spacing)*24)}.sm\:pt-3{padding-top:calc(var(--spacing)*3)}.sm\:pt-28{padding-top:calc(var(--spacing)*28)}.sm\:pt-\[72px\]{padding-top:72px}.sm\:pb-0{padding-bottom:calc(var(--spacing)*0)}.sm\:pb-10{padding-bottom:calc(var(--spacing)*10)}.sm\:text-right{text-align:right}.sm\:text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.sm\:text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.sm\:text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.sm\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.sm\:text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.sm\:text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.sm\:text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.sm\:text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.sm\:text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.sm\:text-\[2rem\]{font-size:2rem}.sm\:text-\[10px\]{font-size:10px}.sm\:text-\[11px\]{font-size:11px}.sm\:text-\[13px\]{font-size:13px}.sm\:text-\[14\.5px\]{font-size:14.5px}.sm\:text-\[15\.5px\]{font-size:15.5px}.sm\:text-\[15px\]{font-size:15px}.sm\:text-\[17px\]{font-size:17px}.sm\:text-\[22px\]{font-size:22px}.sm\:leading-\[1\.9\]{--tw-leading:1.9;line-height:1.9}.sm\:leading-\[1\.25\]{--tw-leading:1.25;line-height:1.25}.sm\:leading-\[2\]{--tw-leading:2;line-height:2}.sm\:font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.sm\:tracking-\[0\.28em\]{--tw-tracking:.28em;letter-spacing:.28em}}@media(min-width:48rem){.md\:block{display:block}.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(min-width:64rem){.lg\:sticky{position:sticky}.lg\:top-28{top:calc(var(--spacing)*28)}.lg\:right-6{right:calc(var(--spacing)*6)}.lg\:bottom-10{bottom:calc(var(--spacing)*10)}.lg\:left-6{left:calc(var(--spacing)*6)}.lg\:left-14{left:calc(var(--spacing)*14)}.lg\:col-span-5{grid-column:span 5/span 5}.lg\:col-span-7{grid-column:span 7/span 7}.lg\:mr-\[270px\]{margin-right:270px}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:aspect-\[21\/8\]{aspect-ratio:21/8}.lg\:max-h-\[640px\]{max-height:640px}.lg\:translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}.lg\:grid-cols-12{grid-template-columns:repeat(12,minmax(0,1fr))}.lg\:gap-8{gap:calc(var(--spacing)*8)}.lg\:gap-10{gap:calc(var(--spacing)*10)}.lg\:gap-16{gap:calc(var(--spacing)*16)}.lg\:gap-20{gap:calc(var(--spacing)*20)}.lg\:self-start{align-self:flex-start}.lg\:p-6{padding:calc(var(--spacing)*6)}.lg\:px-8{padding-inline:calc(var(--spacing)*8)}.lg\:px-9{padding-inline:calc(var(--spacing)*9)}.lg\:px-10{padding-inline:calc(var(--spacing)*10)}.lg\:px-14{padding-inline:calc(var(--spacing)*14)}.lg\:py-9{padding-block:calc(var(--spacing)*9)}.lg\:py-24{padding-block:calc(var(--spacing)*24)}.lg\:py-28{padding-block:calc(var(--spacing)*28)}.lg\:py-32{padding-block:calc(var(--spacing)*32)}.lg\:pb-24{padding-bottom:calc(var(--spacing)*24)}.lg\:text-5xl{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.lg\:text-\[2\.1rem\]{font-size:2.1rem}.lg\:text-\[2\.5rem\]{font-size:2.5rem}.lg\:text-\[3rem\]{font-size:3rem}}@media(min-width:80rem){.xl\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-\[1\.65fr_1fr\]{grid-template-columns:1.65fr 1fr}}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}}html{scroll-behavior:smooth}body{color:#f5efe2;-webkit-text-size-adjust:100%;background:#070604;font-family:Tajawal,sans-serif;overflow-x:hidden}@media(max-width:767px){html,body{max-width:100%;overflow-x:clip}body{letter-spacing:.1px;line-height:1.85}button,a[href],select,input,textarea{-webkit-tap-highlight-color:transparent}}::selection{color:#0d0b08;background:#d4af37}input[type=search]::-webkit-search-cancel-button{appearance:none}input[type=search]::-webkit-search-decoration{appearance:none}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background:#0d0b08}::-webkit-scrollbar-thumb{background:linear-gradient(#d4af37,#8a6d1f);border-radius:10px}.text-gold-gradient{color:#0000;background:linear-gradient(110deg,#a8842a,#f3dca3,#d4af37,#fdf0c8,#b8902e) 0 0/200%;-webkit-background-clip:text;background-clip:text;animation:6s linear infinite goldShimmer}@keyframes goldShimmer{to{background-position:200%}}.gold-ring{border:1px solid #d4af3759;box-shadow:0 0 0 1px #d4af370d,0 10px 40px -10px #d4af3726}@keyframes marquee{0%{transform:translate(-50%)}to{transform:translate(0)}}.animate-marquee{animation:30s linear infinite marquee}@keyframes floaty{0%,to{transform:translateY(0)}50%{transform:translateY(-16px)}}.animate-floaty{animation:6s ease-in-out infinite floaty}@keyframes spin-slow{to{transform:rotate(360deg)}}.animate-spin-slow{animation:22s linear infinite spin-slow}@keyframes sparkle{0%,to{opacity:.2;transform:scale(.8)}50%{opacity:1;transform:scale(1.15)}}.animate-sparkle{animation:3s ease-in-out infinite sparkle}.grain:after{content:"";pointer-events:none;z-index:60;opacity:.035;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");position:fixed;inset:0}.juvel-intro{perspective:1500px}.juvel-intro-image{transform-style:preserve-3d;will-change:transform}.juvel-intro-image img{will-change:transform,filter,opacity}.juvel-intro-vignette{z-index:2;background:radial-gradient(at 66%,#0000 30%,#07060459),linear-gradient(90deg,#070604eb,#070604c7 22%,#07060459 42%,#0000 60%),linear-gradient(#07060459,#0000 15% 80%,#0706048c)}.juvel-intro-grain{z-index:3}.juvel-intro-grain:after{content:"";opacity:.035;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.84' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");position:absolute;inset:-50%}.juvel-intro-light-sweep{filter:blur(7px);mix-blend-mode:screen;background:linear-gradient(90deg,#0000,#f3dca308 24%,#f3dca34d 50%,#d4af371a 67%,#0000);left:0}.juvel-orbit-scene{z-index:4;perspective:1200px;transform-style:preserve-3d}.juvel-orbit{aspect-ratio:1.64;width:min(68vw,100vh);transform-style:preserve-3d;will-change:transform,opacity;border:1.5px solid #f0d28299;border-radius:50%;position:absolute;top:52%;left:50%;translate:-50% -50%;box-shadow:0 0 28px #d4af3724,inset 0 0 24px #d4af370f}.juvel-orbit:before,.juvel-orbit:after{content:"";background:#f4d888;border-radius:50%;width:5px;height:5px;position:absolute;box-shadow:0 0 10px 3px #f3dca399}.juvel-orbit:before{top:16%;left:15%}.juvel-orbit:after{width:3px;height:3px;bottom:18%;right:11%}.juvel-orbit-two{aspect-ratio:1.25;border-color:#f3dca338;width:min(58vw,86vh);box-shadow:0 0 32px #d4af370f}.juvel-orbit-three{aspect-ratio:1.72;width:min(74vw,112vh);box-shadow:none;border-color:#d4af371c}.juvel-orbit-star{color:#f3dca3d9;text-shadow:0 0 18px #d4af37d9;font-size:17px;position:absolute}.juvel-star-one{top:26%;left:57%}.juvel-star-two{font-size:13px;top:66%;left:46%}.juvel-intro-topline{text-shadow:0 1px 18px #000c}.juvel-intro-copy{width:min(37vw,36rem);top:50%;left:clamp(3rem,9vw,9rem);transform:translateY(-50%)}.juvel-intro-wordmark{color:#0000;filter:drop-shadow(0 2px #0000008c)drop-shadow(0 10px 30px #d4af3759);background:linear-gradient(#fff3c4,#f2d27a 30%,#d4a937 58%,#a97c1e 82%,#e9c766);-webkit-background-clip:text;background-clip:text;font-size:clamp(3.6rem,6.4vw,6rem)}.juvel-intro-gold{color:#0000;background:linear-gradient(#fbe7a6,#e7c158 55%,#c39a2f);-webkit-background-clip:text;background-clip:text}.juvel-intro-headline,.juvel-intro-body{text-shadow:0 2px 16px #000000bf}.juvel-intro-divider{background:linear-gradient(270deg,#e2c26fb8,#e2c26f14,#0000)}.juvel-enter-slot{justify-content:flex-start;align-items:center;min-height:62px;display:flex}.juvel-intro-monogram{direction:ltr}@media(max-width:767px){.juvel-intro-image{inset:-1% -42% 0}.juvel-intro-image img{object-position:50% center}.juvel-intro-vignette{background:radial-gradient(at 50% 40%,#0000 25%,#0706044d),linear-gradient(#0706048c,#0000 22% 45%,#070604b3 68%,#070604)}.juvel-orbit{width:min(124vw,70vh);top:47%}.juvel-orbit-two{width:min(104vw,58vh)}.juvel-orbit-three{width:min(138vw,78vh)}.juvel-star-one{top:37%;left:73%}.juvel-star-two{top:57%;left:20%}.juvel-intro-copy{align-items:center;width:auto;inset:auto 6vw max(10vh,4rem);transform:none}.juvel-intro-wordmark{margin-top:.55rem;font-size:clamp(3rem,13vw,4.2rem)}.juvel-intro-copy>div:nth-of-type(2){margin-top:.6rem}.juvel-intro-copy>div:nth-of-type(2) p:first-child{font-size:clamp(1.35rem,5.8vw,1.75rem);line-height:1.45}.juvel-intro-copy>div:nth-of-type(2) p:last-child{margin-top:.35rem;font-size:.85rem;line-height:1.6}.juvel-intro-divider{transform-origin:50%;max-width:19rem;margin-top:1rem}.juvel-enter-slot{justify-content:center;min-height:60px;margin-top:1rem}.juvel-intro-light-sweep{width:38vw}}@media(max-height:680px)and (min-width:768px){.juvel-intro-copy{width:min(38vw,34rem)}.juvel-intro-wordmark{font-size:clamp(3.8rem,7vw,6rem)}.juvel-intro-copy>div:nth-of-type(2) p:first-child{font-size:2rem}.juvel-intro-copy>div:nth-of-type(2) p:last-child{margin-top:.4rem;font-size:.9rem;line-height:1.55}}@media(prefers-reduced-motion:reduce){.juvel-intro-grain:after{animation:none}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}</style>Unknown directive
99 </head>Syntax not understood
100 <body>Syntax not understood
101 <!-- بوابة فورية قبل تحميل الكود: اللوجو بيتنفس — بتتستبدل بالتطبيق لحظة جهوزه -->Unknown directive
102 <div id="pre-gate" style="position:fixed;inset:0;z-index:9999;background:#070604;display:flex;align-items:center;justify-content:center">Unknown directive
103 <div style="display:flex;flex-direction:column;align-items:center;gap:16px">Unknown directive
104 <img src="./images/logo.png" alt="" style="width:104px;height:104px;border-radius:9999px;border:2px solid rgba(212,175,55,.65);box-shadow:0 0 45px rgba(212,175,55,.35);animation:pregate-pulse 2.2s ease-in-out infinite" />Unknown directive
105 <div style="font-family:Georgia,'Times New Roman',serif;letter-spacing:.28em;color:#f2dda0;font-size:24px">JUVEL</div>Unknown directive
106 </div>Syntax not understood
107 </div>Syntax not understood
108 <style>@keyframes pregate-pulse{0%,100%{transform:scale(1);opacity:.88}50%{transform:scale(1.045);opacity:1}}</style>Unknown directive
109 <div id="root"></div>Syntax not understood
110 </body>Syntax not understood
111</html>Syntax not understood

To appear in search results, crawlers need access to your app.

○Structured data is valid
●Page isn’t blocked from indexing
●Document has a `<title>` element
●Document has a meta description
●Page has successful HTTP status code
●Links have descriptive text
●Links are crawlable
●Image elements have `[alt]` attributes
●Document has a valid `hreflang`
○Document has a valid `rel=canonical`

Send Feedback