vendor: 4,185 bytes, lines 1-9
1var jH=Object.defineProperty;var dP=e=>{throw TypeError(e)};var wH=(e,t,n)=>t in e?jH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var zt=(e,t,n)=>wH(e,typeof t!="symbol"?t+"":t,n),b0=(e,t,n)=>t.has(e)||dP("Cannot "+n);var Q=(e,t,n)=>(b0(e,t,"read from private field"),n?n.call(e):t.get(e)),Qe=(e,t,n)=>t.has(e)?dP("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),De=(e,t,n,s)=>(b0(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),bt=(e,t,n)=>(b0(e,t,"access private method"),n);var Tp=(e,t,n,s)=>({set _(a){De(e,t,a,n)},get _(){return Q(e,t,s)}});function NH(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(s,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>s[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var Ep=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Et(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var j0={exports:{}},Ju={},w0={exports:{}},gt={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var uP;function _H(){if(uP)return gt;uP=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),f=Symbol.iterator;function p(B){return B===null||typeof B!="object"?null:(B=f&&B[f]||B["@@iterator"],typeof B=="function"?B:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,g={};function y(B,z,he){this.props=B,this.context=z,this.refs=g,this.updater=he||b}y.prototype.isReactComponent={},y.prototype.setState=function(B,z){if(typeof B!="object"&&typeof B!="function"&&B!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,z,"setState")},y.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};function w(){}w.prototype=y.prototype;function N(B,z,he){this.props=B,this.context=z,this.refs=g,this.updater=he||b}var S=N.prototype=new w;S.constructor=N,v(S,y.prototype),S.isPureReactComponent=!0;var A=Array.isArray,k=Object.prototype.hasOwnProperty,C={current:null},T={key:!0,ref:!0,__self:!0,__source:!0};function P(B,z,he){var fe,be={},xe=null,pe=null;if(z!=null)for(fe in z.ref!==void 0&&(pe=z.ref),z.key!==void 0&&(xe=""+z.key),z)k.call(z,fe)&&!T.hasOwnProperty(fe)&&(be[fe]=z[fe]);var Ae=arguments.length-2;if(Ae===1)be.children=he;else if(1<Ae){for(var ie=Array(Ae),Ne=0;Ne<Ae;Ne++)ie[Ne]=arguments[Ne+2];be.children=ie}if(B&&B.defaultProps)for(fe in Ae=B.defaultProps,Ae)be[fe]===void 0&&(be[fe]=Ae[fe]);return{$$typeof:e,type:B,key:xe,ref:pe,props:be,_owner:C.current}}function R(B,z){return{$$typeof:e,type:B.type,key:z,ref:B.ref,props:B.props,_owner:B._owner}}
vendor: 11,622 bytes, lines 9-33
9function M(B){return typeof B=="object"&&B!==null&&B.$$typeof===e}function D(B){var z={"=":"=0",":":"=2"};return"$"+B.replace(/[=:]/g,function(he){return z[he]})}var $=/\/+/g;function q(B,z){return typeof B=="object"&&B!==null&&B.key!=null?D(""+B.key):z.toString(36)}function H(B,z,he,fe,be){var xe=typeof B;(xe==="undefined"||xe==="boolean")&&(B=null);var pe=!1;if(B===null)pe=!0;else switch(xe){case"string":case"number":pe=!0;break;case"object":switch(B.$$typeof){case e:case t:pe=!0}}if(pe)return pe=B,be=be(pe),B=fe===""?"."+q(pe,0):fe,A(be)?(he="",B!=null&&(he=B.replace($,"$&/")+"/"),H(be,z,he,"",function(Ne){return Ne})):be!=null&&(M(be)&&(be=R(be,he+(!be.key||pe&&pe.key===be.key?"":(""+be.key).replace($,"$&/")+"/")+B)),z.push(be)),1;if(pe=0,fe=fe===""?".":fe+":",A(B))for(var Ae=0;Ae<B.length;Ae++){xe=B[Ae];var ie=fe+q(xe,Ae);pe+=H(xe,z,he,ie,be)}else if(ie=p(B),typeof ie=="function")for(B=ie.call(B),Ae=0;!(xe=B.next()).done;)xe=xe.value,ie=fe+q(xe,Ae++),pe+=H(xe,z,he,ie,be);else if(xe==="object")throw z=String(B),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.");return pe}function L(B,z,he){if(B==null)return B;var fe=[],be=0;return H(B,fe,"","",function(xe){return z.call(he,xe,be++)}),fe}function F(B){if(B._status===-1){var z=B._result;z=z(),z.then(function(he){(B._status===0||B._status===-1)&&(B._status=1,B._result=he)},function(he){(B._status===0||B._status===-1)&&(B._status=2,B._result=he)}),B._status===-1&&(B._status=0,B._result=z)}if(B._status===1)return B._result.default;throw B._result}var Y={current:null},U={transition:null},re={ReactCurrentDispatcher:Y,ReactCurrentBatchConfig:U,ReactCurrentOwner:C};function G(){throw Error("act(...) is not supported in production builds of React.")}return gt.Children={map:L,forEach:function(B,z,he){L(B,function(){z.apply(this,arguments)},he)},count:function(B){var z=0;return L(B,function(){z++}),z},toArray:function(B){return L(B,function(z){return z})||[]},only:function(B){if(!M(B))throw Error("React.Children.only expected to receive a single React element child.");return B}},gt.Component=y,gt.Fragment=n,gt.Profiler=a,gt.PureComponent=N,gt.StrictMode=s,gt.Suspense=c,gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,gt.act=G,gt.cloneElement=function(B,z,he){if(B==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var fe=v({},B.props),be=B.key,xe=B.ref,pe=B._owner;if(z!=null){if(z.ref!==void 0&&(xe=z.ref,pe=C.current),z.key!==void 0&&(be=""+z.key),B.type&&B.type.defaultProps)var Ae=B.type.defaultProps;for(ie in z)k.call(z,ie)&&!T.hasOwnProperty(ie)&&(fe[ie]=z[ie]===void 0&&Ae!==void 0?Ae[ie]:z[ie])}var ie=arguments.length-2;if(ie===1)fe.children=he;else if(1<ie){Ae=Array(ie);for(var Ne=0;Ne<ie;Ne++)Ae[Ne]=arguments[Ne+2];fe.children=Ae}return{$$typeof:e,type:B.type,key:be,ref:xe,props:fe,_owner:pe}},gt.createContext=function(B){return B={$$typeof:o,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},B.Provider={$$typeof:i,_context:B},B.Consumer=B},gt.createElement=P,gt.createFactory=function(B){var z=P.bind(null,B);return z.type=B,z},gt.createRef=function(){return{current:null}},gt.forwardRef=function(B){return{$$typeof:l,render:B}},gt.isValidElement=M,gt.lazy=function(B){return{$$typeof:m,_payload:{_status:-1,_result:B},_init:F}},gt.memo=function(B,z){return{$$typeof:u,type:B,compare:z===void 0?null:z}},gt.startTransition=function(B){var z=U.transition;U.transition={};try{B()}finally{U.transition=z}},gt.unstable_act=G,gt.useCallback=function(B,z){return Y.current.useCallback(B,z)},gt.useContext=function(B){return Y.current.useContext(B)},gt.useDebugValue=function(){},gt.useDeferredValue=function(B){return Y.current.useDeferredValue(B)},gt.useEffect=function(B,z){return Y.current.useEffect(B,z)},gt.useId=function(){return Y.current.useId()},gt.useImperativeHandle=function(B,z,he){return Y.current.useImperativeHandle(B,z,he)},gt.useInsertionEffect=function(B,z){return Y.current.useInsertionEffect(B,z)},gt.useLayoutEffect=function(B,z){return Y.current.useLayoutEffect(B,z)},gt.useMemo=function(B,z){return Y.current.useMemo(B,z)},gt.useReducer=function(B,z,he){return Y.current.useReducer(B,z,he)},gt.useRef=function(B){return Y.current.useRef(B)},gt.useState=function(B){return Y.current.useState(B)},gt.useSyncExternalStore=function(B,z,he){return Y.current.useSyncExternalStore(B,z,he)},gt.useTransition=function(){return Y.current.useTransition()},gt.version="18.3.1",gt}var hP;function ek(){return hP||(hP=1,w0.exports=_H()),w0.exports}/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var mP;function SH(){if(mP)return Ju;mP=1;var e=ek(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,u){var m,f={},p=null,b=null;u!==void 0&&(p=""+u),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(b=c.ref);for(m in c)s.call(c,m)&&!i.hasOwnProperty(m)&&(f[m]=c[m]);if(l&&l.defaultProps)for(m in c=l.defaultProps,c)f[m]===void 0&&(f[m]=c[m]);return{$$typeof:t,type:l,key:p,ref:b,props:f,_owner:a.current}}return Ju.Fragment=n,Ju.jsx=o,Ju.jsxs=o,Ju}var fP;function kH(){return fP||(fP=1,j0.exports=SH()),j0.exports}var r=kH(),j=ek();const X=Et(j),cy=NH({__proto__:null,default:X},[j]);var Pp={},N0={exports:{}},An={},_0={exports:{}},S0={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var pP;function CH(){return pP||(pP=1,(function(e){function t(U,re){var G=U.length;U.push(re);e:for(;0<G;){var B=G-1>>>1,z=U[B];if(0<a(z,re))U[B]=re,U[G]=z,G=B;else break e}}function n(U){return U.length===0?null:U[0]}function s(U){if(U.length===0)return null;var re=U[0],G=U.pop();if(G!==re){U[0]=G;e:for(var B=0,z=U.length,he=z>>>1;B<he;){var fe=2*(B+1)-1,be=U[fe],xe=fe+1,pe=U[xe];if(0>a(be,G))xe<z&&0>a(pe,be)?(U[B]=pe,U[xe]=G,B=xe):(U[B]=be,U[fe]=G,B=fe);else if(xe<z&&0>a(pe,G))U[B]=pe,U[xe]=G,B=xe;else break e}}return re}function a(U,re){var G=U.sortIndex-re.sortIndex;return G!==0?G:U.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],m=1,f=null,p=3,b=!1,v=!1,g=!1,y=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(U){for(var re=n(u);re!==null;){if(re.callback===null)s(u);else if(re.startTime<=U)s(u),re.sortIndex=re.expirationTime,t(c,re);else break;re=n(u)}}function A(U){if(g=!1,S(U),!v)if(n(c)!==null)v=!0,F(k);else{var re=n(u);re!==null&&Y(A,re.startTime-U)}}function k(U,re){v=!1,g&&(g=!1,w(P),P=-1),b=!0;var G=p;try{for(S(re),f=n(c);f!==null&&(!(f.expirationTime>re)||U&&!D());){var B=f.callback;if(typeof B=="function"){f.callback=null,p=f.priorityLevel;var z=B(f.expirationTime<=re);re=e.unstable_now(),typeof z=="function"?f.callback=z:f===n(c)&&s(c),S(re)}else s(c);f=n(c)}if(f!==null)var he=!0;else{var fe=n(u);fe!==null&&Y(A,fe.startTime-re),he=!1}return he}finally{f=null,p=G,b=!1}}var C=!1,T=null,P=-1,R=5,M=-1;function D(){return!(e.unstable_now()-M<R)}function $(){if(T!==null){var U=e.unstable_now();M=U;var re=!0;try{re=T(!0,U)}finally{re?q():(C=!1,T=null)}}else C=!1}var q;if(typeof N=="function")q=function(){N($)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,L=H.port2;H.port1.onmessage=$,q=function(){L.postMessage(null)}}else q=function(){y($,0)};function F(U){T=U,C||(C=!0,q())}function Y(U,re){P=y(function(){U(e.unstable_now())},re)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_continueExecution=function(){v||b||(v=!0,F(k))},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(U){switch(p){case 1:case 2:case 3:var re=3;break;default:re=p}var G=p;p=re;try{return U()}finally{p=G}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(U,re){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var G=p;p=U;try{return re()}finally{p=G}},e.unstable_scheduleCallback=function(U,re,G){var B=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?B+G:B):G=B,U){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=G+z,U={id:m++,callback:re,priorityLevel:U,startTime:G,expirationTime:z,sortIndex:-1},G>B?(U.sortIndex=G,t(u,U),n(c)===null&&U===n(u)&&(g?(w(P),P=-1):g=!0,Y(A,G-B))):(U.sortIndex=z,t(c,U),v||b||(v=!0,F(k))),U},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(U){var re=p;return function(){var G=p;p=re;try{return U.apply(this,arguments)}finally{p=G}}}})(S0)),S0}var xP;function AH(){return xP||(xP=1,_0.exports=CH()),_0.exports}/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var gP;function TH(){if(gP)return An;gP=1;var e=ek(),t=AH();function n(d){for(var h="https://reactjs.org/docs/error-decoder.html?invariant="+d,x=1;x<arguments.length;x++)h+="&args[]="+encodeURIComponent(arguments[x]);return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,a={};function i(d,h){o(d,h),o(d+"Capture",h)}function o(d,h){for(a[d]=h,d=0;d<h.length;d++)s.add(h[d])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,u=/^[: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]*$/,m={},f={};function p(d){return c.call(f,d)?!0:c.call(m,d)?!1:u.test(d)?f[d]=!0:(m[d]=!0,!1)}function b(d,h,x,_){if(x!==null&&x.type===0)return!1;switch(typeof h){case"function":case"symbol":return!0;case"boolean":return _?!1:x!==null?!x.acceptsBooleans:(d=d.toLowerCase().slice(0,5),d!=="data-"&&d!=="aria-");default:return!1}}function v(d,h,x,_){if(h===null||typeof h>"u"||b(d,h,x,_))return!0;
vendor: 23,547 bytes, lines 33-37
33if(_)return!1;if(x!==null)switch(x.type){case 3:return!h;case 4:return h===!1;case 5:return isNaN(h);case 6:return isNaN(h)||1>h}return!1}function g(d,h,x,_,E,O,I){this.acceptsBooleans=h===2||h===3||h===4,this.attributeName=_,this.attributeNamespace=E,this.mustUseProperty=x,this.propertyName=d,this.type=h,this.sanitizeURL=O,this.removeEmptyString=I}var y={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(d){y[d]=new g(d,0,!1,d,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(d){var h=d[0];y[h]=new g(h,1,!1,d[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(d){y[d]=new g(d,2,!1,d.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(d){y[d]=new g(d,2,!1,d,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(d){y[d]=new g(d,3,!1,d.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(d){y[d]=new g(d,3,!0,d,null,!1,!1)}),["capture","download"].forEach(function(d){y[d]=new g(d,4,!1,d,null,!1,!1)}),["cols","rows","size","span"].forEach(function(d){y[d]=new g(d,6,!1,d,null,!1,!1)}),["rowSpan","start"].forEach(function(d){y[d]=new g(d,5,!1,d.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function N(d){return d[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(d){var h=d.replace(w,N);y[h]=new g(h,1,!1,d,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(d){var h=d.replace(w,N);y[h]=new g(h,1,!1,d,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(d){var h=d.replace(w,N);y[h]=new g(h,1,!1,d,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(d){y[d]=new g(d,1,!1,d.toLowerCase(),null,!1,!1)}),y.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(d){y[d]=new g(d,1,!1,d.toLowerCase(),null,!0,!0)});function S(d,h,x,_){var E=y.hasOwnProperty(h)?y[h]:null;(E!==null?E.type!==0:_||!(2<h.length)||h[0]!=="o"&&h[0]!=="O"||h[1]!=="n"&&h[1]!=="N")&&(v(h,x,E,_)&&(x=null),_||E===null?p(h)&&(x===null?d.removeAttribute(h):d.setAttribute(h,""+x)):E.mustUseProperty?d[E.propertyName]=x===null?E.type===3?!1:"":x:(h=E.attributeName,_=E.attributeNamespace,x===null?d.removeAttribute(h):(E=E.type,x=E===3||E===4&&x===!0?"":""+x,_?d.setAttributeNS(_,h,x):d.setAttribute(h,x))))}var A=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,k=Symbol.for("react.element"),C=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),P=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),D=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),Y=Symbol.for("react.offscreen"),U=Symbol.iterator;function re(d){return d===null||typeof d!="object"?null:(d=U&&d[U]||d["@@iterator"],typeof d=="function"?d:null)}var G=Object.assign,B;function z(d){if(B===void 0)try{throw Error()}catch(x){var h=x.stack.trim().match(/\n( *(at )?)/);B=h&&h[1]||""}return` 34`+B+d}var he=!1;function fe(d,h){if(!d||he)return"";he=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(h)if(h=function(){throw Error()},Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(le){var _=le}Reflect.construct(d,[],h)}else{try{h.call()}catch(le){_=le}d.call(h.prototype)}else{try{throw Error()}catch(le){_=le}d()}}catch(le){if(le&&_&&typeof le.stack=="string"){for(var E=le.stack.split(` 35`),O=_.stack.split(` 36`),I=E.length-1,V=O.length-1;1<=I&&0<=V&&E[I]!==O[V];)V--;for(;1<=I&&0<=V;I--,V--)if(E[I]!==O[V]){if(I!==1||V!==1)do if(I--,V--,0>V||E[I]!==O[V]){var J=` 37`+E[I].replace(" at new "," at ");return d.displayName&&J.includes("<anonymous>")&&(J=J.replace("<anonymous>",d.displayName)),J}while(1<=I&&0<=V);break}}}finally{he=!1,Error.prepareStackTrace=x}return(d=d?d.displayName||d.name:"")?z(d):""}function be(d){switch(d.tag){case 5:return z(d.type);case 16:return z("Lazy");case 13:return z("Suspense");case 19:return z("SuspenseList");case 0:case 2:case 15:return d=fe(d.type,!1),d;case 11:return d=fe(d.type.render,!1),d;case 1:return d=fe(d.type,!0),d;default:return""}}function xe(d){if(d==null)return null;if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case T:return"Fragment";case C:return"Portal";case R:return"Profiler";case P:return"StrictMode";case q:return"Suspense";case H:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case D:return(d.displayName||"Context")+".Consumer";case M:return(d._context.displayName||"Context")+".Provider";case $:var h=d.render;return d=d.displayName,d||(d=h.displayName||h.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case L:return h=d.displayName||null,h!==null?h:xe(d.type)||"Memo";case F:h=d._payload,d=d._init;try{return xe(d(h))}catch{}}return null}function pe(d){var h=d.type;switch(d.tag){case 24:return"Cache";case 9:return(h.displayName||"Context")+".Consumer";case 10:return(h._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return d=h.render,d=d.displayName||d.name||"",h.displayName||(d!==""?"ForwardRef("+d+")":"ForwardRef");case 7:return"Fragment";case 5:return h;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return xe(h);case 8:return h===P?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof h=="function")return h.displayName||h.name||null;if(typeof h=="string")return h}return null}function Ae(d){switch(typeof d){case"boolean":case"number":case"string":case"undefined":return d;case"object":return d;default:return""}}function ie(d){var h=d.type;return(d=d.nodeName)&&d.toLowerCase()==="input"&&(h==="checkbox"||h==="radio")}function Ne(d){var h=ie(d)?"checked":"value",x=Object.getOwnPropertyDescriptor(d.constructor.prototype,h),_=""+d[h];if(!d.hasOwnProperty(h)&&typeof x<"u"&&typeof x.get=="function"&&typeof x.set=="function"){var E=x.get,O=x.set;return Object.defineProperty(d,h,{configurable:!0,get:function(){return E.call(this)},set:function(I){_=""+I,O.call(this,I)}}),Object.defineProperty(d,h,{enumerable:x.enumerable}),{getValue:function(){return _},setValue:function(I){_=""+I},stopTracking:function(){d._valueTracker=null,delete d[h]}}}}function Se(d){d._valueTracker||(d._valueTracker=Ne(d))}function te(d){if(!d)return!1;var h=d._valueTracker;if(!h)return!0;var x=h.getValue(),_="";return d&&(_=ie(d)?d.checked?"true":"false":d.value),d=_,d!==x?(h.setValue(d),!0):!1}function Oe(d){if(d=d||(typeof document<"u"?document:void 0),typeof d>"u")return null;try{return d.activeElement||d.body}catch{return d.body}}function ye(d,h){var x=h.checked;return G({},h,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:x??d._wrapperState.initialChecked})}function Ee(d,h){var x=h.defaultValue==null?"":h.defaultValue,_=h.checked!=null?h.checked:h.defaultChecked;x=Ae(h.value!=null?h.value:x),d._wrapperState={initialChecked:_,initialValue:x,controlled:h.type==="checkbox"||h.type==="radio"?h.checked!=null:h.value!=null}}function ke(d,h){h=h.checked,h!=null&&S(d,"checked",h,!1)}function ze(d,h){ke(d,h);var x=Ae(h.value),_=h.type;if(x!=null)_==="number"?(x===0&&d.value===""||d.value!=x)&&(d.value=""+x):d.value!==""+x&&(d.value=""+x);else if(_==="submit"||_==="reset"){d.removeAttribute("value");return}h.hasOwnProperty("value")?Ze(d,h.type,x):h.hasOwnProperty("defaultValue")&&Ze(d,h.type,Ae(h.defaultValue)),h.checked==null&&h.defaultChecked!=null&&(d.defaultChecked=!!h.defaultChecked)}function xt(d,h,x){if(h.hasOwnProperty("value")||h.hasOwnProperty("defaultValue")){var _=h.type;if(!(_!=="submit"&&_!=="reset"||h.value!==void 0&&h.value!==null))return;h=""+d._wrapperState.initialValue,x||h===d.value||(d.value=h),d.defaultValue=h}x=d.name,x!==""&&(d.name=""),d.defaultChecked=!!d._wrapperState.initialChecked,x!==""&&(d.name=x)}function Ze(d,h,x){(h!=="number"||Oe(d.ownerDocument)!==d)&&(x==null?d.defaultValue=""+d._wrapperState.initialValue:d.defaultValue!==""+x&&(d.defaultValue=""+x))}var it=Array.isArray;function ot(d,h,x,_){if(d=d.options,h){h={};for(var E=0;E<x.length;E++)h["$"+x[E]]=!0;for(x=0;x<d.length;x++)E=h.hasOwnProperty("$"+d[x].value),d[x].selected!==E&&(d[x].selected=E),E&&_&&(d[x].defaultSelected=!0)}else{for(x=""+Ae(x),h=null,E=0;E<d.length;E++){if(d[E].value===x){d[E].selected=!0,_&&(d[E].defaultSelected=!0);return}h!==null||d[E].disabled||(h=d[E])}h!==null&&(h.selected=!0)}}function We(d,h){if(h.dangerouslySetInnerHTML!=null)throw Error(n(91));return G({},h,{value:void 0,defaultValue:void 0,children:""+d._wrapperState.initialValue})}function Nt(d,h){var x=h.value;if(x==null){if(x=h.children,h=h.defaultValue,x!=null){if(h!=null)throw Error(n(92));if(it(x)){if(1<x.length)throw Error(n(93));x=x[0]}h=x}h==null&&(h=""),x=h}d._wrapperState={initialValue:Ae(x)}}function mr(d,h){var x=Ae(h.value),_=Ae(h.defaultValue);x!=null&&(x=""+x,x!==d.value&&(d.value=x),h.defaultValue==null&&d.defaultValue!==x&&(d.defaultValue=x)),_!=null&&(d.defaultValue=""+_)}function wn(d){var h=d.textContent;h===d._wrapperState.initialValue&&h!==""&&h!==null&&(d.value=h)}function Ss(d){switch(d){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ks(d,h){return d==null||d==="http://www.w3.org/1999/xhtml"?Ss(h):d==="http://www.w3.org/2000/svg"&&h==="foreignObject"?"http://www.w3.org/1999/xhtml":d}var Ao,fu=(function(d){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(h,x,_,E){MSApp.execUnsafeLocalFunction(function(){return d(h,x,_,E)})}:d})(function(d,h){if(d.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in d)d.innerHTML=h;else{for(Ao=Ao||document.createElement("div"),Ao.innerHTML="<svg>"+h.valueOf().toString()+"</svg>",h=Ao.firstChild;d.firstChild;)d.removeChild(d.firstChild);for(;h.firstChild;)d.appendChild(h.firstChild)}});function To(d,h){if(h){var x=d.firstChild;if(x&&x===d.lastChild&&x.nodeType===3){x.nodeValue=h;return}}d.textContent=h}var Eo={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ev=["Webkit","ms","Moz","O"];Object.keys(Eo).forEach(function(d){Ev.forEach(function(h){h=h+d.charAt(0).toUpperCase()+d.substring(1),Eo[h]=Eo[d]})});function Js(d,h,x){return h==null||typeof h=="boolean"||h===""?"":x||typeof h!="number"||h===0||Eo.hasOwnProperty(d)&&Eo[d]?(""+h).trim():h+"px"}function sc(d,h){d=d.style;for(var x in h)if(h.hasOwnProperty(x)){var _=x.indexOf("--")===0,E=Js(x,h[x],_);x==="float"&&(x="cssFloat"),_?d.setProperty(x,E):d[x]=E}}var Pv=G({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Ov(d,h){if(h){if(Pv[d]&&(h.children!=null||h.dangerouslySetInnerHTML!=null))throw Error(n(137,d));if(h.dangerouslySetInnerHTML!=null){if(h.children!=null)throw Error(n(60));if(typeof h.dangerouslySetInnerHTML!="object"||!("__html"in h.dangerouslySetInnerHTML))throw Error(n(61))}if(h.style!=null&&typeof h.style!="object")throw Error(n(62))}}function Mv(d,h){if(d.indexOf("-")===-1)return typeof h.is=="string";switch(d){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 Rv=null;function Iv(d){return d=d.target||d.srcElement||window,d.correspondingUseElement&&(d=d.correspondingUseElement),d.nodeType===3?d.parentNode:d}var Dv=null,ac=null,ic=null;function CA(d){if(d=Du(d)){if(typeof Dv!="function")throw Error(n(280));var h=d.stateNode;h&&(h=zf(h),Dv(d.stateNode,d.type,h))}}function AA(d){ac?ic?ic.push(d):ic=[d]:ac=d}function TA(){if(ac){var d=ac,h=ic;if(ic=ac=null,CA(d),h)for(d=0;d<h.length;d++)CA(h[d])}}function EA(d,h){return d(h)}function PA(){}var Lv=!1;function OA(d,h,x){if(Lv)return d(h,x);Lv=!0;try{return EA(d,h,x)}finally{Lv=!1,(ac!==null||ic!==null)&&(PA(),TA())}}function pu(d,h){var x=d.stateNode;if(x===null)return null;var _=zf(x);if(_===null)return null;x=_[h];e:switch(h){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(_=!_.disabled)||(d=d.type,_=!(d==="button"||d==="input"||d==="select"||d==="textarea")),d=!_;break e;default:d=!1}if(d)return null;if(x&&typeof x!="function")throw Error(n(231,h,typeof x));return x}var $v=!1;if(l)try{var xu={};Object.defineProperty(xu,"passive",{get:function(){$v=!0}}),window.addEventListener("test",xu,xu),window.removeEventListener("test",xu,xu)}catch{$v=!1}function C9(d,h,x,_,E,O,I,V,J){var le=Array.prototype.slice.call(arguments,3);try{h.apply(x,le)}catch(we){this.onError(we)}}var gu=!1,wf=null,Nf=!1,Fv=null,A9={onError:function(d){gu=!0,wf=d}};function T9(d,h,x,_,E,O,I,V,J){gu=!1,wf=null,C9.apply(A9,arguments)}function E9(d,h,x,_,E,O,I,V,J){if(T9.apply(this,arguments),gu){if(gu){var le=wf;gu=!1,wf=null}else throw Error(n(198));Nf||(Nf=!0,Fv=le)}}function Po(d){var h=d,x=d;if(d.alternate)for(;h.return;)h=h.return;else{d=h;do h=d,(h.flags&4098)!==0&&(x=h.return),d=h.return;while(d)}return h.tag===3?x:null}function MA(d){if(d.tag===13){var h=d.memoizedState;if(h===null&&(d=d.alternate,d!==null&&(h=d.memoizedState)),h!==null)return h.dehydrated}return null}function RA(d){if(Po(d)!==d)throw Error(n(188))}function P9(d){var h=d.alternate;if(!h){if(h=Po(d),h===null)throw Error(n(188));return h!==d?null:d}for(var x=d,_=h;;){var E=x.return;if(E===null)break;var O=E.alternate;if(O===null){if(_=E.return,_!==null){x=_;continue}break}if(E.child===O.child){for(O=E.child;O;){if(O===x)return RA(E),d;if(O===_)return RA(E),h;O=O.sibling}throw Error(n(188))}if(x.return!==_.return)x=E,_=O;else{for(var I=!1,V=E.child;V;){if(V===x){I=!0,x=E,_=O;break}if(V===_){I=!0,_=E,x=O;break}V=V.sibling}if(!I){for(V=O.child;V;){if(V===x){I=!0,x=O,_=E;break}if(V===_){I=!0,_=O,x=E;break}V=V.sibling}if(!I)throw Error(n(189))}}if(x.alternate!==_)throw Error(n(190))}if(x.tag!==3)throw Error(n(188));return x.stateNode.current===x?d:h}function IA(d){return d=P9(d),d!==null?DA(d):null}function DA(d){if(d.tag===5||d.tag===6)return d;for(d=d.child;d!==null;){var h=DA(d);if(h!==null)return h;d=d.sibling}return null}var LA=t.unstable_scheduleCallback,$A=t.unstable_cancelCallback,O9=t.unstable_shouldYield,M9=t.unstable_requestPaint,fr=t.unstable_now,R9=t.unstable_getCurrentPriorityLevel,Bv=t.unstable_ImmediatePriority,FA=t.unstable_UserBlockingPriority,_f=t.unstable_NormalPriority,I9=t.unstable_LowPriority,BA=t.unstable_IdlePriority,Sf=null,Qs=null;function D9(d){if(Qs&&typeof Qs.onCommitFiberRoot=="function")try{Qs.onCommitFiberRoot(Sf,d,void 0,(d.current.flags&128)===128)}catch{}}var Cs=Math.clz32?Math.clz32:F9,L9=Math.log,$9=Math.LN2;function F9(d){return d>>>=0,d===0?32:31-(L9(d)/$9|0)|0}var kf=64,Cf=4194304;function yu(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Af(d,h){var x=d.pendingLanes;if(x===0)return 0;var _=0,E=d.suspendedLanes,O=d.pingedLanes,I=x&268435455;if(I!==0){var V=I&~E;V!==0?_=yu(V):(O&=I,O!==0&&(_=yu(O)))}else I=x&~E,I!==0?_=yu(I):O!==0&&(_=yu(O));if(_===0)return 0;if(h!==0&&h!==_&&(h&E)===0&&(E=_&-_,O=h&-h,E>=O||E===16&&(O&4194240)!==0))return h;if((_&4)!==0&&(_|=x&16),h=d.entangledLanes,h!==0)for(d=d.entanglements,h&=_;0<h;)x=31-Cs(h),E=1<<x,_|=d[x],h&=~E;return _}function B9(d,h){switch(d){case 1:case 2:case 4:return h+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return h+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function q9(d,h){for(var x=d.suspendedLanes,_=d.pingedLanes,E=d.expirationTimes,O=d.pendingLanes;0<O;){var I=31-Cs(O),V=1<<I,J=E[I];J===-1?((V&x)===0||(V&_)!==0)&&(E[I]=B9(V,h)):J<=h&&(d.expiredLanes|=V),O&=~V}}function qv(d){return d=d.pendingLanes&-1073741825,d!==0?d:d&1073741824?1073741824:0}function qA(){var d=kf;return kf<<=1,(kf&4194240)===0&&(kf=64),d}function Vv(d){for(var h=[],x=0;31>x;x++)h.push(d);return h}function vu(d,h,x){d.pendingLanes|=h,h!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,h=31-Cs(h),d[h]=x}function V9(d,h){var x=d.pendingLanes&~h;d.pendingLanes=h,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=h,d.mutableReadLanes&=h,d.entangledLanes&=h,h=d.entanglements;var _=d.eventTimes;for(d=d.expirationTimes;0<x;){var E=31-Cs(x),O=1<<E;h[E]=0,_[E]=-1,d[E]=-1,x&=~O}}function Uv(d,h){var x=d.entangledLanes|=h;for(d=d.entanglements;x;){var _=31-Cs(x),E=1<<_;E&h|d[_]&h&&(d[_]|=h),x&=~E}}var It=0;function VA(d){return d&=-d,1<d?4<d?(d&268435455)!==0?16:536870912:4:1}var UA,zv,zA,WA,HA,Wv=!1,Tf=[],pi=null,xi=null,gi=null,bu=new Map,ju=new Map,yi=[],U9="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 submit".split(" ");function GA(d,h){switch(d){case"focusin":case"focusout":pi=null;break;case"dragenter":case"dragleave":xi=null;break;case"mouseover":case"mouseout":gi=null;break;case"pointerover":case"pointerout":bu.delete(h.pointerId);break;case"gotpointercapture":case"lostpointercapture":ju.delete(h.pointerId)}}function wu(d,h,x,_,E,O){return d===null||d.nativeEvent!==O?(d={blockedOn:h,domEventName:x,eventSystemFlags:_,nativeEvent:O,targetContainers:[E]},h!==null&&(h=Du(h),h!==null&&zv(h)),d):(d.eventSystemFlags|=_,h=d.targetContainers,E!==null&&h.indexOf(E)===-1&&h.push(E),d)}function z9(d,h,x,_,E){switch(h){case"focusin":return pi=wu(pi,d,h,x,_,E),!0;case"dragenter":return xi=wu(xi,d,h,x,_,E),!0;case"mouseover":return gi=wu(gi,d,h,x,_,E),!0;case"pointerover":var O=E.pointerId;return bu.set(O,wu(bu.get(O)||null,d,h,x,_,E)),!0;case"gotpointercapture":return O=E.pointerId,ju.set(O,wu(ju.get(O)||null,d,h,x,_,E)),!0}return!1}function KA(d){var h=Oo(d.target);if(h!==null){var x=Po(h);if(x!==null){if(h=x.tag,h===13){if(h=MA(x),h!==null){d.blockedOn=h,HA(d.priority,function(){zA(x)});return}}else if(h===3&&x.stateNode.current.memoizedState.isDehydrated){d.blockedOn=x.tag===3?x.stateNode.containerInfo:null;return}}}d.blockedOn=null}function Ef(d){if(d.blockedOn!==null)return!1;for(var h=d.targetContainers;0<h.length;){var x=Gv(d.domEventName,d.eventSystemFlags,h[0],d.nativeEvent);if(x===null){x=d.nativeEvent;var _=new x.constructor(x.type,x);Rv=_,x.target.dispatchEvent(_),Rv=null}else return h=Du(x),h!==null&&zv(h),d.blockedOn=x,!1;h.shift()}return!0}function YA(d,h,x){Ef(d)&&x.delete(h)}function W9(){Wv=!1,pi!==null&&Ef(pi)&&(pi=null),xi!==null&&Ef(xi)&&(xi=null),gi!==null&&Ef(gi)&&(gi=null),bu.forEach(YA),ju.forEach(YA)}function Nu(d,h){d.blockedOn===h&&(d.blockedOn=null,Wv||(Wv=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,W9)))}function _u(d){function h(E){return Nu(E,d)}if(0<Tf.length){Nu(Tf[0],d);for(var x=1;x<Tf.length;x++){var _=Tf[x];_.blockedOn===d&&(_.blockedOn=null)}}for(pi!==null&&Nu(pi,d),xi!==null&&Nu(xi,d),gi!==null&&Nu(gi,d),bu.forEach(h),ju.forEach(h),x=0;x<yi.length;x++)_=yi[x],_.blockedOn===d&&(_.blockedOn=null);for(;0<yi.length&&(x=yi[0],x.blockedOn===null);)KA(x),x.blockedOn===null&&yi.shift()}var oc=A.ReactCurrentBatchConfig,Pf=!0;function H9(d,h,x,_){var E=It,O=oc.transition;oc.transition=null;try{It=1,Hv(d,h,x,_)}finally{It=E,oc.transition=O}}function G9(d,h,x,_){var E=It,O=oc.transition;oc.transition=null;try{It=4,Hv(d,h,x,_)}finally{It=E,oc.transition=O}}function Hv(d,h,x,_){if(Pf){var E=Gv(d,h,x,_);if(E===null)db(d,h,_,Of,x),GA(d,_);else if(z9(E,d,h,x,_))_.stopPropagation();else if(GA(d,_),h&4&&-1<U9.indexOf(d)){for(;E!==null;){var O=Du(E);if(O!==null&&UA(O),O=Gv(d,h,x,_),O===null&&db(d,h,_,Of,x),O===E)break;E=O}E!==null&&_.stopPropagation()}else db(d,h,_,null,x)}}var Of=null;function Gv(d,h,x,_){if(Of=null,d=Iv(_),d=Oo(d),d!==null)if(h=Po(d),h===null)d=null;else if(x=h.tag,x===13){if(d=MA(h),d!==null)return d;d=null}else if(x===3){if(h.stateNode.current.memoizedState.isDehydrated)return h.tag===3?h.stateNode.containerInfo:null;d=null}else h!==d&&(d=null);return Of=d,null}function XA(d){switch(d){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"invali
37d":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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(R9()){case Bv:return 1;case FA:return 4;case _f:case I9:return 16;case BA:return 536870912;default:return 16}default:return 16}}var vi=null,Kv=null,Mf=null;function JA(){if(Mf)return Mf;var d,h=Kv,x=h.length,_,E="value"in vi?vi.value:vi.textContent,O=E.length;for(d=0;d<x&&h[d]===E[d];d++);var I=x-d;for(_=1;_<=I&&h[x-_]===E[O-_];_++);return Mf=E.slice(d,1<_?1-_:void 0)}function Rf(d){var h=d.keyCode;return"charCode"in d?(d=d.charCode,d===0&&h===13&&(d=13)):d=h,d===10&&(d=13),32<=d||d===13?d:0}function If(){return!0}function QA(){return!1}function qn(d){function h(x,_,E,O,I){this._reactName=x,this._targetInst=E,this.type=_,this.nativeEvent=O,this.target=I,this.currentTarget=null;for(var V in d)d.hasOwnProperty(V)&&(x=d[V],this[V]=x?x(O):O[V]);return this.isDefaultPrevented=(O.defaultPrevented!=null?O.defaultPrevented:O.returnValue===!1)?If:QA,this.isPropagationStopped=QA,this}return G(h.prototype,{preventDefault:function(){this.defaultPrevented=!0;var x=this.nativeEvent;x&&(x.preventDefault?x.preventDefault():typeof x.returnValue!="unknown"&&(x.returnValue=!1),this.isDefaultPrevented=If)},stopPropagation:function(){var x=this.nativeEvent;x&&(x.stopPropagation?x.stopPropagation():typeof x.cancelBubble!="unknown"&&(x.cancelBubble=!0),this.isPropagationStopped=If)},persist:function(){},isPersistent:If}),h}var lc={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(d){return d.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yv=qn(lc),Su=G({},lc,{view:0,detail:0}),K9=qn(Su),Xv,Jv,ku,Df=G({},Su,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zv,button:0,buttons:0,relatedTarget:function(d){return d.relatedTarget===void 0?d.fromElement===d.srcElement?d.toElement:d.fromElement:d.relatedTarget},movementX:function(d){return"movementX"in d?d.movementX:(d!==ku&&(ku&&d.type==="mousemove"?(Xv=d.screenX-ku.screenX,Jv=d.screenY-ku.screenY):Jv=Xv=0,ku=d),Xv)},movementY:function(d){return"movementY"in d?d.movementY:Jv}}),ZA=qn(Df),Y9=G({},Df,{dataTransfer:0}),X9=qn(Y9),J9=G({},Su,{relatedTarget:0}),Qv=qn(J9),Q9=G({},lc,{animationName:0,elapsedTime:0,pseudoElement:0}),Z9=qn(Q9),eW=G({}
vendor: 9,361 bytes, line 37
37,lc,{clipboardData:function(d){return"clipboardData"in d?d.clipboardData:window.clipboardData}}),tW=qn(eW),rW=G({},lc,{data:0}),eT=qn(rW),nW={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sW={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"},aW={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function iW(d){var h=this.nativeEvent;return h.getModifierState?h.getModifierState(d):(d=aW[d])?!!h[d]:!1}function Zv(){return iW}var oW=G({},Su,{key:function(d){if(d.key){var h=nW[d.key]||d.key;if(h!=="Unidentified")return h}return d.type==="keypress"?(d=Rf(d),d===13?"Enter":String.fromCharCode(d)):d.type==="keydown"||d.type==="keyup"?sW[d.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zv,charCode:function(d){return d.type==="keypress"?Rf(d):0},keyCode:function(d){return d.type==="keydown"||d.type==="keyup"?d.keyCode:0},which:function(d){return d.type==="keypress"?Rf(d):d.type==="keydown"||d.type==="keyup"?d.keyCode:0}}),lW=qn(oW),cW=G({},Df,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tT=qn(cW),dW=G({},Su,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zv}),uW=qn(dW),hW=G({},lc,{propertyName:0,elapsedTime:0,pseudoElement:0}),mW=qn(hW),fW=G({},Df,{deltaX:function(d){return"deltaX"in d?d.deltaX:"wheelDeltaX"in d?-d.wheelDeltaX:0},deltaY:function(d){return"deltaY"in d?d.deltaY:"wheelDeltaY"in d?-d.wheelDeltaY:"wheelDelta"in d?-d.wheelDelta:0},deltaZ:0,deltaMode:0}),pW=qn(fW),xW=[9,13,27,32],eb=l&&"CompositionEvent"in window,Cu=null;l&&"documentMode"in document&&(Cu=document.documentMode);var gW=l&&"TextEvent"in window&&!Cu,rT=l&&(!eb||Cu&&8<Cu&&11>=Cu),nT=" ",sT=!1;function aT(d,h){switch(d){case"keyup":return xW.indexOf(h.keyCode)!==-1;case"keydown":return h.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function iT(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var cc=!1;function yW(d,h){switch(d){case"compositionend":return iT(h);case"keypress":return h.which!==32?null:(sT=!0,nT);case"textInput":return d=h.data,d===nT&&sT?null:d;default:return null}}function vW(d,h){if(cc)return d==="compositionend"||!eb&&aT(d,h)?(d=JA(),Mf=Kv=vi=null,cc=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(h.ctrlKey||h.altKey||h.metaKey)||h.ctrlKey&&h.altKey){if(h.char&&1<h.char.length)return h.char;if(h.which)return String.fromCharCode(h.which)}return null;case"compositionend":return rT&&h.locale!=="ko"?null:h.data;default:return null}}var bW={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 oT(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h==="input"?!!bW[d.type]:h==="textarea"}function lT(d,h,x,_){AA(_),h=qf(h,"onChange"),0<h.length&&(x=new Yv("onChange","change",null,x,_),d.push({event:x,listeners:h}))}var Au=null,Tu=null;function jW(d){kT(d,0)}function Lf(d){var h=fc(d);if(te(h))return d}function wW(d,h){if(d==="change")return h}var cT=!1;if(l){var tb;if(l){var rb="oninput"in document;if(!rb){var dT=document.createElement("div");dT.setAttribute("oninput","return;"),rb=typeof dT.oninput=="function"}tb=rb}else tb=!1;cT=tb&&(!document.documentMode||9<document.documentMode)}function uT(){Au&&(Au.detachEvent("onpropertychange",hT),Tu=Au=null)}function hT(d){if(d.propertyName==="value"&&Lf(Tu)){var h=[];lT(h,Tu,d,Iv(d)),OA(jW,h)}}function NW(d,h,x){d==="focusin"?(uT(),Au=h,Tu=x,Au.attachEvent("onpropertychange",hT)):d==="focusout"&&uT()}function _W(d){if(d==="selectionchange"||d==="keyup"||d==="keydown")return Lf(Tu)}function SW(d,h){if(d==="click")return Lf(h)}function kW(d,h){if(d==="input"||d==="change")return Lf(h)}function CW(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var As=typeof Object.is=="function"?Object.is:CW;function Eu(d,h){if(As(d,h))return!0;if(typeof d!="object"||d===null||typeof h!="object"||h===null)return!1;var x=Object.keys(d),_=Object.keys(h);if(x.length!==_.length)return!1;for(_=0;_<x.length;_++){var E=x[_];if(!c.call(h,E)||!As(d[E],h[E]))return!1}return!0}function mT(d){for(;d&&d.firstChild;)d=d.firstChild;return d}function fT(d,h){var x=mT(d);d=0;for(var _;x;){if(x.nodeType===3){if(_=d+x.textContent.length,d<=h&&_>=h)return{node:x,offset:h-d};d=_}e:{for(;x;){if(x.nextSibling){x=x.nextSibling;break e}x=x.parentNode}x=void 0}x=mT(x)}}function pT(d,h){return d&&h?d===h?!0:d&&d.nodeType===3?!1:h&&h.nodeType===3?pT(d,h.parentNode):"contains"in d?d.contains(h):d.compareDocumentPosition?!!(d.compareDocumentPosition(h)&16):!1:!1}function xT(){for(var d=window,h=Oe();h instanceof d.HTMLIFrameElement;){try{var x=typeof h.contentWindow.location.href=="string"}catch{x=!1}if(x)d=h.contentWindow;else break;h=Oe(d.document)}return h}function nb(d){var h=d&&d.nodeName&&d.nodeName.toLowerCase();return h&&(h==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||h==="textarea"||d.contentEditable==="true")}function AW(d){var h=xT(),x=d.focusedElem,_=d.selectionRange;if(h!==x&&x&&x.ownerDocument&&pT(x.ownerDocument.documentElement,x)){if(_!==null&&nb(x)){if(h=_.start,d=_.end,d===void 0&&(d=h),"selectionStart"in x)x.selectionStart=h,x.selectionEnd=Math.min(d,x.value.length);else if(d=(h=x.ownerDocument||document)&&h.defaultView||window,d.getSelection){d=d.getSelection();var E=x.textContent.length,O=Math.min(_.start,E);_=_.end===void 0?O:Math.min(_.end,E),!d.extend&&O>_&&(E=_,_=O,O=E),E=fT(x,O);var I=fT(x,_);E&&I&&(d.rangeCount!==1||d.anchorNode!==E.node||d.anchorOffset!==E.offset||d.focusNode!==I.node||d.focusOffset!==I.offset)&&(h=h.createRange(),h.setStart(E.node,E.offset),d.removeAllRanges(),O>_?(d.addRange(h),d.extend(I.node,I.offset)):(h.setEnd(I.node,I.offset),d.addRange(h)))}}for(h=[],d=x;d=d.parentNode;)d.nodeType===1&&h.push({element:d,left:d.scrollLeft,top:d.scrollTop});for(typeof x.focus=="function"&&x.focus(),x=0;x<h.length;x++)d=h[x],d.element.scrollLeft=d.left,d.element.scrollTop=d.top}}var TW=l&&"documentMode"in document&&11>=document.documentMode,dc=null,sb=null,Pu=null,ab=!1;function gT(d,h,x){var _=x.window===x?x.document:x.nodeType===9?x:x.ownerDocument;ab||dc==null||dc!==Oe(_)||(_=dc,"selectionStart"in _&&nb(_)?_={start:_.selectionStart,end:_.selectionEnd}:(_=(_.ownerDocument&&_.ownerDocument.defaultView||window).getSelection(),_={anchorNode:_.anchorNode,anchorOffset:_.anchorOffset,focusNode:_.focusNode,focusOffset:_.focusOffset}),Pu&&Eu(Pu,_)||(Pu=_,_=qf(sb,"onSelect"),0<_.length&&(h=new Yv("onSelect","select",null,h,x),d.push({event:h,listeners:_}),h.target=dc)))}function $f(d,h){var x={};return x[d.toLowerCase()]=h.toLowerCase(),x["Webkit"+d]="webkit"+h,x["Moz"+d]="moz"+h,x}var uc={animationend:$f("Animation","AnimationEnd"),animationiteration:$f("Animation","AnimationIteration"),animationstart:$f("Animation","AnimationStart"),transitionend:$f("Transition","TransitionEnd")},ib={},yT={};l&&(yT=document.createElement("div").style,"AnimationEvent"in window||(delete uc.animationend.animation,delete uc.animationiteration.animation,delete uc.animationstart.animation),"TransitionEvent"in window||delete uc.transitionend.transition);function Ff(d){if(ib[d])return ib[d];if(!uc[d])return d;var h=uc[d],x;for(x in h)if(h.hasOwnProperty(x)&&x in yT)return ib[d]=h[x];return d}var vT=Ff("animationend"),bT=Ff("animationiteration"),jT=Ff("animationstart"),wT=Ff("transitionend"),NT=new Map,_T="abort auxClick 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(" ");function bi(d,h){NT.set(d,h),i(h,[d])}for(var ob=0;ob<_T.length;ob++){var lb=_T[ob],EW=lb.toLowerCase(),PW=lb[0].toUpperCase()+lb.slice(1);bi(EW,"on"+PW)}bi(vT,"onAnimationEnd"),bi(bT,"onAnimationIteration"),bi(jT,"onAnimationStart"),bi("dblclick","onDoubleClick"),bi("focusin","onFocus"),bi("focusout","onBlur"),bi(wT,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),i("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),i("onSelect","focusout contextmenu dragend focu
37sin keydown keyup mousedown mouseup selectionchange".split(" ")),i("onBeforeInput",["compositionend","keypress","textInput","paste"]),i("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),i("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ou="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(" "),OW=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ou));function ST(d,h,x){var _=d.type||"unknown-event";d.currentTarget=x,E9(_,h,void 0,d),d.currentTarget=null}function kT(d,h){h=(h&4)!==0;for(var x=0;x<d.length;x++){var _=d[x],E=_.event;_=_.listeners;e:{var O=void 0;if(h)for(var I=_.length-1;0<=I;I--){var V=_[I],J=V.instance,le=V.currentTarget;if(V=V.listener,J!==O&&E.isPropagationStopped())break e;ST(E,V,le),O=J}else for(I=0;I<_.length;I++){if(V=_[I],J=V.instance,le=V.currentTarget,V=V.listener,J!==O&&E.isPropagationStopped())break e;ST(E,V,le),O=J}}}if(Nf)throw d=Fv,Nf=!1,Fv=null,d}function Kt(d,h){var x=h[xb];x===void 0&&(x=h[xb]=new Set);var _=d+"__bubble";x.has(_)||(CT(h,d,2,!1),x.add(_))}function cb(d,h,x){var _=0;h&&(_|=4),CT(x,d,_,h)}var Bf="_reactListening"+Math.random().toString(36).slice(2);function Mu(d){if(!d[Bf]){d[Bf]=!0,s.forEach(function(x){x!=="selectionchange"&&(OW.has(x)||cb(x,!1,d),cb(x,!0,d))});var h=d.nodeType===9?d:d.ownerDocument;h===null||h[Bf]||(h[Bf]=!0,cb("selectionchange",!1,h))}}function CT(d,h,x,_){switch(XA(h)){case 1:var E=H9;break;case 4:E=G9;break;default:E=Hv}x=E.bind(null,h,x,d),E=void 0,!$v||h!=="touchstart"&&h!=="touchmove"&&h!=="wheel"||(E=!0),_?E!==void 0?d.addEventListener(h,x,{capture:!0,passive:E}):d.addEventListener(h,x,!0):E!==void 0?d.addEventListener(h,x,{passive:E}):d.addEventListener(h,x,!1)}function db(d,h,x,_,E){var O=_;if((h&1)===0&&(h&2)===0&&_!==null)e:for(;;){if(_===null)return;var I=_.tag;if(I===3||I===4){var V=_.stateNode.containerInfo;if(V===E||V.nodeType===8&&V.parentNode===E)break;if(I===4)for(I=_.return;I!==null;){var J=I.tag;if((J===3||J===4)&&(J=I.stateNode.containerInfo,J===E||J.nodeType===8&&J.parentNode===E))return;I=I.return}for(;V!==null;){if(I=Oo(V),I===null)return;if(J=I.tag,J===5||J===6){_=O=I;continue e}V=V.parentNode}}_=_.return}OA(function(){var le=O,we=Iv(x),_e=[];e:{var je=NT.get(d);if(je!==void 0){var Ie=Yv,Fe=d;switch(d){case"keypress":if(Rf(x)===0)break e;case"keydown":case"keyup":Ie=lW;break;case"focusin":Fe="focus",Ie=Qv;break;case"focusout":Fe="blur",Ie=Qv;break;case"beforeblur":case"afterblur":Ie=Qv;break;case"click":if(x.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Ie=ZA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ie=X9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ie=uW;break;case vT:case bT:case jT:Ie=Z9;break;case wT:Ie=mW;break;case"scroll":Ie=K9;break;case"wheel":Ie=pW;break;case"copy":case"cut":case"paste":Ie=tW;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ie=tT}var Ve=(h&4)!==0,pr=!Ve&&d==="scroll",ne=Ve?je!==null?je+"Capture":null:je;Ve=[];for(var ee=le,ae;ee!==null;){ae=ee;var Ce=ae.stateNode;if(ae.tag===5&&Ce!==null&&(ae=Ce,ne!==null&&(Ce=pu(ee,ne),Ce!=null&&Ve.push(Ru(ee,Ce,ae)))),pr)break;ee=ee.return}0<Ve.length&&(je=new Ie(je,Fe,null,x,we),_e.push({event:je,listeners:Ve}))}}if((h&7)===0){e:{if(je=d==="mouseover"||d==="pointerover",Ie=d==="mouseout"||d==="pointerout",je&&x!==Rv&&(Fe=x.relatedTarget||x.fromElement)&&(Oo(Fe)||Fe[Oa]))break e;if((Ie||je)&&(je=we.window===we?we:(je=we.ownerDocument)?je.defaultView||je.parentWindow:window,Ie?(Fe=x.relatedTarget||x.toElement,Ie=le,Fe=Fe?Oo(Fe):null,Fe!==null&&(pr=Po(Fe),Fe!==pr||Fe.tag!==5&&Fe.tag!==6)&&(Fe=null)):(Ie=null,Fe=le),Ie!==Fe)){if(Ve=ZA,Ce="onMouseLeave",ne="onMouseEnter",ee="mouse",(d==="pointerout"||d==="pointerover")&&(Ve=tT,Ce="onPointerLeave",ne="onPointerEnter",ee="pointer"),pr=Ie==null?je:fc(Ie),ae=Fe==null?je:fc(Fe),je=new Ve(Ce,ee+"leave",Ie,x,we),je.target=pr,je.relatedTarget=ae,Ce=null,Oo(we)===le&&(Ve=new Ve(ne,ee+"enter",Fe,x,we),Ve.target=ae,Ve.relatedTarget=pr,Ce=Ve),pr=Ce,Ie&&Fe)t:{for(Ve=Ie,ne=Fe,ee=0,ae=Ve;ae;ae=hc(ae))ee++;for(ae=0,Ce=ne;Ce;Ce=hc(Ce))ae++;for(;0<ee-ae;)Ve=hc(Ve),ee--;for(;0<ae-ee;)ne=hc(ne),ae--;for(;ee--;
vendor: 6,464 bytes, lines 37-38
37){if(Ve===ne||ne!==null&&Ve===ne.alternate)break t;Ve=hc(Ve),ne=hc(ne)}Ve=null}else Ve=null;Ie!==null&&AT(_e,je,Ie,Ve,!1),Fe!==null&&pr!==null&&AT(_e,pr,Fe,Ve,!0)}}e:{if(je=le?fc(le):window,Ie=je.nodeName&&je.nodeName.toLowerCase(),Ie==="select"||Ie==="input"&&je.type==="file")var Ue=wW;else if(oT(je))if(cT)Ue=kW;else{Ue=_W;var Ke=NW}else(Ie=je.nodeName)&&Ie.toLowerCase()==="input"&&(je.type==="checkbox"||je.type==="radio")&&(Ue=SW);if(Ue&&(Ue=Ue(d,le))){lT(_e,Ue,x,we);break e}Ke&&Ke(d,je,le),d==="focusout"&&(Ke=je._wrapperState)&&Ke.controlled&&je.type==="number"&&Ze(je,"number",je.value)}switch(Ke=le?fc(le):window,d){case"focusin":(oT(Ke)||Ke.contentEditable==="true")&&(dc=Ke,sb=le,Pu=null);break;case"focusout":Pu=sb=dc=null;break;case"mousedown":ab=!0;break;case"contextmenu":case"mouseup":case"dragend":ab=!1,gT(_e,x,we);break;case"selectionchange":if(TW)break;case"keydown":case"keyup":gT(_e,x,we)}var Ye;if(eb)e:{switch(d){case"compositionstart":var st="onCompositionStart";break e;case"compositionend":st="onCompositionEnd";break e;case"compositionupdate":st="onCompositionUpdate";break e}st=void 0}else cc?aT(d,x)&&(st="onCompositionEnd"):d==="keydown"&&x.keyCode===229&&(st="onCompositionStart");st&&(rT&&x.locale!=="ko"&&(cc||st!=="onCompositionStart"?st==="onCompositionEnd"&&cc&&(Ye=JA()):(vi=we,Kv="value"in vi?vi.value:vi.textContent,cc=!0)),Ke=qf(le,st),0<Ke.length&&(st=new eT(st,d,null,x,we),_e.push({event:st,listeners:Ke}),Ye?st.data=Ye:(Ye=iT(x),Ye!==null&&(st.data=Ye)))),(Ye=gW?yW(d,x):vW(d,x))&&(le=qf(le,"onBeforeInput"),0<le.length&&(we=new eT("onBeforeInput","beforeinput",null,x,we),_e.push({event:we,listeners:le}),we.data=Ye))}kT(_e,h)})}function Ru(d,h,x){return{instance:d,listener:h,currentTarget:x}}function qf(d,h){for(var x=h+"Capture",_=[];d!==null;){var E=d,O=E.stateNode;E.tag===5&&O!==null&&(E=O,O=pu(d,x),O!=null&&_.unshift(Ru(d,O,E)),O=pu(d,h),O!=null&&_.push(Ru(d,O,E))),d=d.return}return _}function hc(d){if(d===null)return null;do d=d.return;while(d&&d.tag!==5);return d||null}function AT(d,h,x,_,E){for(var O=h._reactName,I=[];x!==null&&x!==_;){var V=x,J=V.alternate,le=V.stateNode;if(J!==null&&J===_)break;V.tag===5&&le!==null&&(V=le,E?(J=pu(x,O),J!=null&&I.unshift(Ru(x,J,V))):E||(J=pu(x,O),J!=null&&I.push(Ru(x,J,V)))),x=x.return}I.length!==0&&d.push({event:h,listeners:I})}var MW=/\r\n?/g,RW=/\u0000|\uFFFD/g;function TT(d){return(typeof d=="string"?d:""+d).replace(MW,` 38`).replace(RW,"")}function Vf(d,h,x){if(h=TT(h),TT(d)!==h&&x)throw Error(n(425))}function Uf(){}var ub=null,hb=null;function mb(d,h){return d==="textarea"||d==="noscript"||typeof h.children=="string"||typeof h.children=="number"||typeof h.dangerouslySetInnerHTML=="object"&&h.dangerouslySetInnerHTML!==null&&h.dangerouslySetInnerHTML.__html!=null}var fb=typeof setTimeout=="function"?setTimeout:void 0,IW=typeof clearTimeout=="function"?clearTimeout:void 0,ET=typeof Promise=="function"?Promise:void 0,DW=typeof queueMicrotask=="function"?queueMicrotask:typeof ET<"u"?function(d){return ET.resolve(null).then(d).catch(LW)}:fb;function LW(d){setTimeout(function(){throw d})}function pb(d,h){var x=h,_=0;do{var E=x.nextSibling;if(d.removeChild(x),E&&E.nodeType===8)if(x=E.data,x==="/$"){if(_===0){d.removeChild(E),_u(h);return}_--}else x!=="$"&&x!=="$?"&&x!=="$!"||_++;x=E}while(x);_u(h)}function ji(d){for(;d!=null;d=d.nextSibling){var h=d.nodeType;if(h===1||h===3)break;if(h===8){if(h=d.data,h==="$"||h==="$!"||h==="$?")break;if(h==="/$")return null}}return d}function PT(d){d=d.previousSibling;for(var h=0;d;){if(d.nodeType===8){var x=d.data;if(x==="$"||x==="$!"||x==="$?"){if(h===0)return d;h--}else x==="/$"&&h++}d=d.previousSibling}return null}var mc=Math.random().toString(36).slice(2),Zs="__reactFiber$"+mc,Iu="__reactProps$"+mc,Oa="__reactContainer$"+mc,xb="__reactEvents$"+mc,$W="__reactListeners$"+mc,FW="__reactHandles$"+mc;function Oo(d){var h=d[Zs];if(h)return h;for(var x=d.parentNode;x;){if(h=x[Oa]||x[Zs]){if(x=h.alternate,h.child!==null||x!==null&&x.child!==null)for(d=PT(d);d!==null;){if(x=d[Zs])return x;d=PT(d)}return h}d=x,x=d.parentNode}return null}function Du(d){return d=d[Zs]||d[Oa],!d||d.tag!==5&&d.tag!==6&&d.tag!==13&&d.tag!==3?null:d}function fc(d){if(d.tag===5||d.tag===6)return d.stateNode;throw Error(n(33))}function zf(d){return d[Iu]||null}var gb=[],pc=-1;function wi(d){return{current:d}}function Yt(d){0>pc||(d.current=gb[pc],gb[pc]=null,pc--)}function Ut(d,h){pc++,gb[pc]=d.current,d.current=h}var Ni={},Jr=wi(Ni),Nn=wi(!1),Mo=Ni;function xc(d,h){var x=d.type.contextTypes;if(!x)return Ni;var _=d.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===h)return _.__reactInternalMemoizedMaskedChildContext;var E={},O;for(O in x)E[O]=h[O];return _&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=h,d.__reactInternalMemoizedMaskedChildContext=E),E}function _n(d){return d=d.childContextTypes,d!=null}function Wf(){Yt(Nn),Yt(Jr)}function OT(d,h,x){if(Jr.current!==Ni)throw Error(n(168));Ut(Jr,h),Ut(Nn,x)}function MT(d,h,x){var _=d.stateNode;if(h=h.childContextTypes,typeof _.getChildContext!="function")return x;_=_.getChildContext();for(var E in _)if(!(E in h))throw Error(n(108,pe(d)||"Unknown",E));return G({},x,_)}function Hf(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Ni,Mo=Jr.current,Ut(Jr,d),Ut(Nn,Nn.current),!0}function RT(d,h,x){var _=d.stateNode;if(!_)throw Error(n(169));x?(d=MT(d,h,Mo),_.__reactInternalMemoizedMergedChildContext=d,Yt(Nn),Yt(Jr),Ut(Jr,d)):Yt(Nn),Ut(Nn,x)}var Ma=null,Gf=!1,yb=!1;function IT(d){Ma===null?Ma=[d]:Ma.push(d)}function BW(d){Gf=!0,IT(d)}function _i(){if(!yb&&Ma!==null){yb=!0;var d=0,h=It;try{var x=Ma;for(It=1;d<x.length;d++){var _=x[d];do _=_(!0);while(_!==null)}Ma=null,Gf=!1}catch(E){throw Ma!==null&&(Ma=Ma.slice(d+1)),LA(Bv,_i),E}finally{It=h,yb=!1}}return null}var gc=[],yc=0,Kf=null,Yf=0,ns=[],ss=0,Ro=null,Ra=1,Ia="";function Io(d,h){gc[yc++]=Yf,gc[yc++]=Kf,Kf=d,Yf=h}function DT(d,h,x){ns[ss++]=Ra,ns[ss++]=Ia,ns[ss++]=Ro,Ro=d;var _=Ra;d=Ia;var E=32-Cs(_)-1;_&=~(1<<E),x+=1;var O=32-Cs(h)+E;if(30<O){var I=E-E%5;O=(_&(1<<I)-1).toString(32),_>>=I,E-=I,Ra=1<<32-Cs(h)+E|x<<E|_,Ia=O+d}else Ra=1<<O|x<<E|_,Ia=d}function vb(d){d.return!==null&&(Io(d,1),DT(d,1,0))}function bb(d){for(;d===Kf;)Kf=gc[--yc],gc[yc]=null,Yf=gc[--yc],gc[yc]=null;for(;d===Ro;)Ro=ns[--ss],ns[ss]=null,Ia=ns[--ss],ns[ss]=null,Ra=ns[--ss],ns[ss]=null}var Vn=null,Un=null,Zt=!1,Ts=null;function LT(d,h){var x=ls(5,null,null,0);
vendor: 2,474 bytes, line 38
38x.elementType="DELETED",x.stateNode=h,x.return=d,h=d.deletions,h===null?(d.deletions=[x],d.flags|=16):h.push(x)}function $T(d,h){switch(d.tag){case 5:var x=d.type;return h=h.nodeType!==1||x.toLowerCase()!==h.nodeName.toLowerCase()?null:h,h!==null?(d.stateNode=h,Vn=d,Un=ji(h.firstChild),!0):!1;case 6:return h=d.pendingProps===""||h.nodeType!==3?null:h,h!==null?(d.stateNode=h,Vn=d,Un=null,!0):!1;case 13:return h=h.nodeType!==8?null:h,h!==null?(x=Ro!==null?{id:Ra,overflow:Ia}:null,d.memoizedState={dehydrated:h,treeContext:x,retryLane:1073741824},x=ls(18,null,null,0),x.stateNode=h,x.return=d,d.child=x,Vn=d,Un=null,!0):!1;default:return!1}}function jb(d){return(d.mode&1)!==0&&(d.flags&128)===0}function wb(d){if(Zt){var h=Un;if(h){var x=h;if(!$T(d,h)){if(jb(d))throw Error(n(418));h=ji(x.nextSibling);var _=Vn;h&&$T(d,h)?LT(_,x):(d.flags=d.flags&-4097|2,Zt=!1,Vn=d)}}else{if(jb(d))throw Error(n(418));d.flags=d.flags&-4097|2,Zt=!1,Vn=d}}}function FT(d){for(d=d.return;d!==null&&d.tag!==5&&d.tag!==3&&d.tag!==13;)d=d.return;Vn=d}function Xf(d){if(d!==Vn)return!1;if(!Zt)return FT(d),Zt=!0,!1;var h;if((h=d.tag!==3)&&!(h=d.tag!==5)&&(h=d.type,h=h!=="head"&&h!=="body"&&!mb(d.type,d.memoizedProps)),h&&(h=Un)){if(jb(d))throw BT(),Error(n(418));for(;h;)LT(d,h),h=ji(h.nextSibling)}if(FT(d),d.tag===13){if(d=d.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(n(317));e:{for(d=d.nextSibling,h=0;d;){if(d.nodeType===8){var x=d.data;if(x==="/$"){if(h===0){Un=ji(d.nextSibling);break e}h--}else x!=="$"&&x!=="$!"&&x!=="$?"||h++}d=d.nextSibling}Un=null}}else Un=Vn?ji(d.stateNode.nextSibling):null;return!0}function BT(){for(var d=Un;d;)d=ji(d.nextSibling)}function vc(){Un=Vn=null,Zt=!1}function Nb(d){Ts===null?Ts=[d]:Ts.push(d)}var qW=A.ReactCurrentBatchConfig;function Lu(d,h,x){if(d=x.ref,d!==null&&typeof d!="function"&&typeof d!="object"){if(x._owner){if(x=x._owner,x){if(x.tag!==1)throw Error(n(309));var _=x.stateNode}if(!_)throw Error(n(147,d));var E=_,O=""+d;return h!==null&&h.ref!==null&&typeof h.ref=="function"&&h.ref._stringRef===O?h.ref:(h=function(I){var V=E.refs;I===null?delete V[O]:V[O]=I},h._stringRef=O,h)}if(typeof d!="string")throw Error(n(284));if(!x._owner)throw Error(n(290,d))}return d}function Jf(d,h){throw d=Object.prototype.toString.call(h),Error(n(31,d==="[object Object]"?"object with keys {"+Object.keys(h).join(", ")+"}":d))}function qT(d){var h=d._init;return h(d._payload)}function VT(d){function h(ne,ee){if(d){var ae=ne.deletions;
vendor: 2,390 bytes, line 38
38ae===null?(ne.deletions=[ee],ne.flags|=16):ae.push(ee)}}function x(ne,ee){if(!d)return null;for(;ee!==null;)h(ne,ee),ee=ee.sibling;return null}function _(ne,ee){for(ne=new Map;ee!==null;)ee.key!==null?ne.set(ee.key,ee):ne.set(ee.index,ee),ee=ee.sibling;return ne}function E(ne,ee){return ne=Oi(ne,ee),ne.index=0,ne.sibling=null,ne}function O(ne,ee,ae){return ne.index=ae,d?(ae=ne.alternate,ae!==null?(ae=ae.index,ae<ee?(ne.flags|=2,ee):ae):(ne.flags|=2,ee)):(ne.flags|=1048576,ee)}function I(ne){return d&&ne.alternate===null&&(ne.flags|=2),ne}function V(ne,ee,ae,Ce){return ee===null||ee.tag!==6?(ee=f0(ae,ne.mode,Ce),ee.return=ne,ee):(ee=E(ee,ae),ee.return=ne,ee)}function J(ne,ee,ae,Ce){var Ue=ae.type;return Ue===T?we(ne,ee,ae.props.children,Ce,ae.key):ee!==null&&(ee.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===F&&qT(Ue)===ee.type)?(Ce=E(ee,ae.props),Ce.ref=Lu(ne,ee,ae),Ce.return=ne,Ce):(Ce=jp(ae.type,ae.key,ae.props,null,ne.mode,Ce),Ce.ref=Lu(ne,ee,ae),Ce.return=ne,Ce)}function le(ne,ee,ae,Ce){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==ae.containerInfo||ee.stateNode.implementation!==ae.implementation?(ee=p0(ae,ne.mode,Ce),ee.return=ne,ee):(ee=E(ee,ae.children||[]),ee.return=ne,ee)}function we(ne,ee,ae,Ce,Ue){return ee===null||ee.tag!==7?(ee=Uo(ae,ne.mode,Ce,Ue),ee.return=ne,ee):(ee=E(ee,ae),ee.return=ne,ee)}function _e(ne,ee,ae){if(typeof ee=="string"&&ee!==""||typeof ee=="number")return ee=f0(""+ee,ne.mode,ae),ee.return=ne,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case k:return ae=jp(ee.type,ee.key,ee.props,null,ne.mode,ae),ae.ref=Lu(ne,null,ee),ae.return=ne,ae;case C:return ee=p0(ee,ne.mode,ae),ee.return=ne,ee;case F:var Ce=ee._init;return _e(ne,Ce(ee._payload),ae)}if(it(ee)||re(ee))return ee=Uo(ee,ne.mode,ae,null),ee.return=ne,ee;Jf(ne,ee)}return null}function je(ne,ee,ae,Ce){var Ue=ee!==null?ee.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number")return Ue!==null?null:V(ne,ee,""+ae,Ce);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case k:return ae.key===Ue?J(ne,ee,ae,Ce):null;case C:return ae.key===Ue?le(ne,ee,ae,Ce):null;case F:return Ue=ae._init,je(ne,ee,Ue(ae._payload),Ce)}if(it(ae)||re(ae))return Ue!==null?null:we(ne,ee,ae,Ce,null);Jf(ne,ae)}return null}function Ie(ne,ee,ae,Ce,Ue){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number")return ne=ne.get(ae)||null,V(ee,ne,""+Ce,Ue);
vendor: 8,372 bytes, line 38
38if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case k:return ne=ne.get(Ce.key===null?ae:Ce.key)||null,J(ee,ne,Ce,Ue);case C:return ne=ne.get(Ce.key===null?ae:Ce.key)||null,le(ee,ne,Ce,Ue);case F:var Ke=Ce._init;return Ie(ne,ee,ae,Ke(Ce._payload),Ue)}if(it(Ce)||re(Ce))return ne=ne.get(ae)||null,we(ee,ne,Ce,Ue,null);Jf(ee,Ce)}return null}function Fe(ne,ee,ae,Ce){for(var Ue=null,Ke=null,Ye=ee,st=ee=0,Lr=null;Ye!==null&&st<ae.length;st++){Ye.index>st?(Lr=Ye,Ye=null):Lr=Ye.sibling;var At=je(ne,Ye,ae[st],Ce);if(At===null){Ye===null&&(Ye=Lr);break}d&&Ye&&At.alternate===null&&h(ne,Ye),ee=O(At,ee,st),Ke===null?Ue=At:Ke.sibling=At,Ke=At,Ye=Lr}if(st===ae.length)return x(ne,Ye),Zt&&Io(ne,st),Ue;if(Ye===null){for(;st<ae.length;st++)Ye=_e(ne,ae[st],Ce),Ye!==null&&(ee=O(Ye,ee,st),Ke===null?Ue=Ye:Ke.sibling=Ye,Ke=Ye);return Zt&&Io(ne,st),Ue}for(Ye=_(ne,Ye);st<ae.length;st++)Lr=Ie(Ye,ne,st,ae[st],Ce),Lr!==null&&(d&&Lr.alternate!==null&&Ye.delete(Lr.key===null?st:Lr.key),ee=O(Lr,ee,st),Ke===null?Ue=Lr:Ke.sibling=Lr,Ke=Lr);return d&&Ye.forEach(function(Mi){return h(ne,Mi)}),Zt&&Io(ne,st),Ue}function Ve(ne,ee,ae,Ce){var Ue=re(ae);if(typeof Ue!="function")throw Error(n(150));if(ae=Ue.call(ae),ae==null)throw Error(n(151));for(var Ke=Ue=null,Ye=ee,st=ee=0,Lr=null,At=ae.next();Ye!==null&&!At.done;st++,At=ae.next()){Ye.index>st?(Lr=Ye,Ye=null):Lr=Ye.sibling;var Mi=je(ne,Ye,At.value,Ce);if(Mi===null){Ye===null&&(Ye=Lr);break}d&&Ye&&Mi.alternate===null&&h(ne,Ye),ee=O(Mi,ee,st),Ke===null?Ue=Mi:Ke.sibling=Mi,Ke=Mi,Ye=Lr}if(At.done)return x(ne,Ye),Zt&&Io(ne,st),Ue;if(Ye===null){for(;!At.done;st++,At=ae.next())At=_e(ne,At.value,Ce),At!==null&&(ee=O(At,ee,st),Ke===null?Ue=At:Ke.sibling=At,Ke=At);return Zt&&Io(ne,st),Ue}for(Ye=_(ne,Ye);!At.done;st++,At=ae.next())At=Ie(Ye,ne,st,At.value,Ce),At!==null&&(d&&At.alternate!==null&&Ye.delete(At.key===null?st:At.key),ee=O(At,ee,st),Ke===null?Ue=At:Ke.sibling=At,Ke=At);return d&&Ye.forEach(function(bH){return h(ne,bH)}),Zt&&Io(ne,st),Ue}function pr(ne,ee,ae,Ce){if(typeof ae=="object"&&ae!==null&&ae.type===T&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case k:e:{for(var Ue=ae.key,Ke=ee;Ke!==null;){if(Ke.key===Ue){if(Ue=ae.type,Ue===T){if(Ke.tag===7){x(ne,Ke.sibling),ee=E(Ke,ae.props.children),ee.return=ne,ne=ee;break e}}else if(Ke.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===F&&qT(Ue)===Ke.type){x(ne,Ke.sibling),ee=E(Ke,ae.props),ee.ref=Lu(ne,Ke,ae),ee.return=ne,ne=ee;break e}x(ne,Ke);break}else h(ne,Ke);Ke=Ke.sibling}ae.type===T?(ee=Uo(ae.props.children,ne.mode,Ce,ae.key),ee.return=ne,ne=ee):(Ce=jp(ae.type,ae.key,ae.props,null,ne.mode,Ce),Ce.ref=Lu(ne,ee,ae),Ce.return=ne,ne=Ce)}return I(ne);case C:e:{for(Ke=ae.key;ee!==null;){if(ee.key===Ke)if(ee.tag===4&&ee.stateNode.containerInfo===ae.containerInfo&&ee.stateNode.implementation===ae.implementation){x(ne,ee.sibling),ee=E(ee,ae.children||[]),ee.return=ne,ne=ee;break e}else{x(ne,ee);break}else h(ne,ee);ee=ee.sibling}ee=p0(ae,ne.mode,Ce),ee.return=ne,ne=ee}return I(ne);case F:return Ke=ae._init,pr(ne,ee,Ke(ae._payload),Ce)}if(it(ae))return Fe(ne,ee,ae,Ce);if(re(ae))return Ve(ne,ee,ae,Ce);Jf(ne,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"?(ae=""+ae,ee!==null&&ee.tag===6?(x(ne,ee.sibling),ee=E(ee,ae),ee.return=ne,ne=ee):(x(ne,ee),ee=f0(ae,ne.mode,Ce),ee.return=ne,ne=ee),I(ne)):x(ne,ee)}return pr}var bc=VT(!0),UT=VT(!1),Qf=wi(null),Zf=null,jc=null,_b=null;function Sb(){_b=jc=Zf=null}function kb(d){var h=Qf.current;Yt(Qf),d._currentValue=h}function Cb(d,h,x){for(;d!==null;){var _=d.alternate;if((d.childLanes&h)!==h?(d.childLanes|=h,_!==null&&(_.childLanes|=h)):_!==null&&(_.childLanes&h)!==h&&(_.childLanes|=h),d===x)break;d=d.return}}function wc(d,h){Zf=d,_b=jc=null,d=d.dependencies,d!==null&&d.firstContext!==null&&((d.lanes&h)!==0&&(Sn=!0),d.firstContext=null)}function as(d){var h=d._currentValue;if(_b!==d)if(d={context:d,memoizedValue:h,next:null},jc===null){if(Zf===null)throw Error(n(308));jc=d,Zf.dependencies={lanes:0,firstContext:d}}else jc=jc.next=d;return h}var Do=null;function Ab(d){Do===null?Do=[d]:Do.push(d)}function zT(d,h,x,_){var E=h.interleaved;return E===null?(x.next=x,Ab(h)):(x.next=E.next,E.next=x),h.interleaved=x,Da(d,_)}function Da(d,h){d.lanes|=h;var x=d.alternate;for(x!==null&&(x.lanes|=h),x=d,d=d.return;d!==null;)d.childLanes|=h,x=d.alternate,x!==null&&(x.childLanes|=h),x=d,d=d.return;return x.tag===3?x.stateNode:null}var Si=!1;function Tb(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function WT(d,h){d=d.updateQueue,h.updateQueue===d&&(h.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,effects:d.effects})}function La(d,h){return{eventTime:d,lane:h,tag:0,payload:null,callback:null,next:null}}function ki(d,h,x){var _=d.updateQueue;if(_===null)return null;if(_=_.shared,(kt&2)!==0){var E=_.pending;return E===null?h.next=h:(h.next=E.next,E.next=h),_.pending=h,Da(d,x)}return E=_.interleaved,E===null?(h.next=h,Ab(_)):(h.next=E.next,E.next=h),_.interleaved=h,Da(d,x)}function ep(d,h,x){if(h=h.updateQueue,h!==null&&(h=h.shared,(x&4194240)!==0)){var _=h.lanes;_&=d.pendingLanes,x|=_,h.lanes=x,Uv(d,x)}}function HT(d,h){var x=d.updateQueue,_=d.alternate;if(_!==null&&(_=_.updateQueue,x===_)){var E=null,O=null;if(x=x.firstBaseUpdate,x!==null){do{var I={eventTime:x.eventTime,lane:x.lane,tag:x.tag,payload:x.payload,callback:x.callback,next:null};O===null?E=O=I:O=O.next=I,x=x.next}while(x!==null);O===null?E=O=h:O=O.next=h}else E=O=h;x={baseState:_.baseState,firstBaseUpdate:E,lastBaseUpdate:O,shared:_.shared,effects:_.effects},d.updateQueue=x;return}d=x.lastBaseUpdate,d===null?x.firstBaseUpdate=h:d.next=h,x.lastBaseUpdate=h}function tp(d,h,x,_){var E=d.updateQueue;Si=!1;var O=E.firstBaseUpdate,I=E.lastBaseUpdate,V=E.shared.pending;if(V!==null){E.shared.pending=null;var J=V,le=J.next;J.next=null,I===null?O=le:I.next=le,I=J;var we=d.alternate;we!==null&&(we=we.updateQueue,V=we.lastBaseUpdate,V!==I&&(V===null?we.firstBaseUpdate=le:V.next=le,we.lastBaseUpdate=J))}if(O!==null){var _e=E.baseState;I=0,we=le=J=null,V=O;do{var je=V.lane,Ie=V.eventTime;if((_&je)===je){we!==null&&(we=we.next={eventTime:Ie,lane:0,tag:V.tag,payload:V.payload,callback:V.callback,next:null});e:{var Fe=d,Ve=V;switch(je=h,Ie=x,Ve.tag){case 1:if(Fe=Ve.payload,typeof Fe=="function"){_e=Fe.call(Ie,_e,je);break e}_e=Fe;break e;case 3:Fe.flags=Fe.flags&-65537|128;case 0:if(Fe=Ve.payload,je=typeof Fe=="function"?Fe.call(Ie,_e,je):Fe,je==null)break e;_e=G({},_e,je);break e;case 2:Si=!0}}V.callback!==null&&V.lane!==0&&(d.flags|=64,je=E.effects,je===null?E.effects=[V]:je.push(V))}else Ie={eventTime:Ie,lane:je,tag:V.tag,payload:V.payload,callback:V.callback,next:null},we===null?(le=we=Ie,J=_e):we=we.next=Ie,I|=je;if(V=V.next,V===null){if(V=E.shared.pending,V===null)break;je=V,V=je.next,je.next=null,E.lastBaseUpdate=je,E.shared.pending=null}}while(!0);if(we===null&&(J=_e),E.baseState=J,E.firstBaseUpdate=le,E.lastBaseUpdate=we,h=E.shared.interleaved,h!==null){E=h;do I|=E.lane,E=E.next;while(E!==h)}else O===null&&(E.shared.lanes=0);Fo|=I,d.lanes=I,d.memoizedState=_e}}function GT(d,h,x){if(d=h.effects,h.effects=null,d!==null)for(h=0;h<d.length;h++){var _=d[h],E=_.callback;if(E!==null){if(_.callback=null,_=x,typeof E!="function")throw Error(n(191,E));E.call(_)}}}var $u={},ea=wi($u),Fu=wi($u),Bu=wi($u);function Lo(d){if(d===$u)throw Error(n(174));return d}function Eb(d,h){switch(Ut(Bu,h),Ut(Fu,d),Ut(ea,$u),d=h.nodeType,d){case 9:case 11:h=(h=h.documentElement)?h.namespaceURI:ks(null,"");break;default:d=d===8?h.parentNode:h,h=d.namespaceURI||null,d=d.tagName,h=ks(h,d)}Yt(ea),Ut(ea,h)}function Nc(){Yt(ea),Yt(Fu),Yt(Bu)}function KT(d){Lo(Bu.current);var h=Lo(ea.current),x=ks(h,d.type);h!==x&&(Ut(Fu,d),Ut(ea,x))}function Pb(d){Fu.current===d&&(Yt(ea),Yt(Fu))}var nr=wi(0);function rp(d){for(var h=d;h!==null;){if(h.tag===13){var x=h.memoizedState;if(x!==null&&(x=x.dehydrated,x===null||x.data==="$?"||x.data==="$!"))return h}else if(h.tag===19&&h.memoizedProps.revealOrder!==void 0){if((h.flags&128)!==0)return h}else if(h.child!==null){h.child.return=h,h=h.child;continue}if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return null;h=h.return}
vendor: 7,202 bytes, line 38
38h.sibling.return=h.return,h=h.sibling}return null}var Ob=[];function Mb(){for(var d=0;d<Ob.length;d++)Ob[d]._workInProgressVersionPrimary=null;Ob.length=0}var np=A.ReactCurrentDispatcher,Rb=A.ReactCurrentBatchConfig,$o=0,sr=null,Ar=null,Ir=null,sp=!1,qu=!1,Vu=0,VW=0;function Qr(){throw Error(n(321))}function Ib(d,h){if(h===null)return!1;for(var x=0;x<h.length&&x<d.length;x++)if(!As(d[x],h[x]))return!1;return!0}function Db(d,h,x,_,E,O){if($o=O,sr=h,h.memoizedState=null,h.updateQueue=null,h.lanes=0,np.current=d===null||d.memoizedState===null?HW:GW,d=x(_,E),qu){O=0;do{if(qu=!1,Vu=0,25<=O)throw Error(n(301));O+=1,Ir=Ar=null,h.updateQueue=null,np.current=KW,d=x(_,E)}while(qu)}if(np.current=op,h=Ar!==null&&Ar.next!==null,$o=0,Ir=Ar=sr=null,sp=!1,h)throw Error(n(300));return d}function Lb(){var d=Vu!==0;return Vu=0,d}function ta(){var d={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ir===null?sr.memoizedState=Ir=d:Ir=Ir.next=d,Ir}function is(){if(Ar===null){var d=sr.alternate;d=d!==null?d.memoizedState:null}else d=Ar.next;var h=Ir===null?sr.memoizedState:Ir.next;if(h!==null)Ir=h,Ar=d;else{if(d===null)throw Error(n(310));Ar=d,d={memoizedState:Ar.memoizedState,baseState:Ar.baseState,baseQueue:Ar.baseQueue,queue:Ar.queue,next:null},Ir===null?sr.memoizedState=Ir=d:Ir=Ir.next=d}return Ir}function Uu(d,h){return typeof h=="function"?h(d):h}function $b(d){var h=is(),x=h.queue;if(x===null)throw Error(n(311));x.lastRenderedReducer=d;var _=Ar,E=_.baseQueue,O=x.pending;if(O!==null){if(E!==null){var I=E.next;E.next=O.next,O.next=I}_.baseQueue=E=O,x.pending=null}if(E!==null){O=E.next,_=_.baseState;var V=I=null,J=null,le=O;do{var we=le.lane;if(($o&we)===we)J!==null&&(J=J.next={lane:0,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),_=le.hasEagerState?le.eagerState:d(_,le.action);else{var _e={lane:we,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null};J===null?(V=J=_e,I=_):J=J.next=_e,sr.lanes|=we,Fo|=we}le=le.next}while(le!==null&&le!==O);J===null?I=_:J.next=V,As(_,h.memoizedState)||(Sn=!0),h.memoizedState=_,h.baseState=I,h.baseQueue=J,x.lastRenderedState=_}if(d=x.interleaved,d!==null){E=d;do O=E.lane,sr.lanes|=O,Fo|=O,E=E.next;while(E!==d)}else E===null&&(x.lanes=0);return[h.memoizedState,x.dispatch]}function Fb(d){var h=is(),x=h.queue;if(x===null)throw Error(n(311));x.lastRenderedReducer=d;var _=x.dispatch,E=x.pending,O=h.memoizedState;if(E!==null){x.pending=null;var I=E=E.next;do O=d(O,I.action),I=I.next;while(I!==E);As(O,h.memoizedState)||(Sn=!0),h.memoizedState=O,h.baseQueue===null&&(h.baseState=O),x.lastRenderedState=O}return[O,_]}function YT(){}function XT(d,h){var x=sr,_=is(),E=h(),O=!As(_.memoizedState,E);if(O&&(_.memoizedState=E,Sn=!0),_=_.queue,Bb(ZT.bind(null,x,_,d),[d]),_.getSnapshot!==h||O||Ir!==null&&Ir.memoizedState.tag&1){if(x.flags|=2048,zu(9,QT.bind(null,x,_,E,h),void 0,null),Dr===null)throw Error(n(349));($o&30)!==0||JT(x,h,E)}return E}function JT(d,h,x){d.flags|=16384,d={getSnapshot:h,value:x},h=sr.updateQueue,h===null?(h={lastEffect:null,stores:null},sr.updateQueue=h,h.stores=[d]):(x=h.stores,x===null?h.stores=[d]:x.push(d))}function QT(d,h,x,_){h.value=x,h.getSnapshot=_,eE(h)&&tE(d)}function ZT(d,h,x){return x(function(){eE(h)&&tE(d)})}function eE(d){var h=d.getSnapshot;d=d.value;try{var x=h();return!As(d,x)}catch{return!0}}function tE(d){var h=Da(d,1);h!==null&&Ms(h,d,1,-1)}function rE(d){var h=ta();return typeof d=="function"&&(d=d()),h.memoizedState=h.baseState=d,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Uu,lastRenderedState:d},h.queue=d,d=d.dispatch=WW.bind(null,sr,d),[h.memoizedState,d]}function zu(d,h,x,_){return d={tag:d,create:h,destroy:x,deps:_,next:null},h=sr.updateQueue,h===null?(h={lastEffect:null,stores:null},sr.updateQueue=h,h.lastEffect=d.next=d):(x=h.lastEffect,x===null?h.lastEffect=d.next=d:(_=x.next,x.next=d,d.next=_,h.lastEffect=d)),d}function nE(){return is().memoizedState}function ap(d,h,x,_){var E=ta();sr.flags|=d,E.memoizedState=zu(1|h,x,void 0,_===void 0?null:_)}function ip(d,h,x,_){var E=is();_=_===void 0?null:_;var O=void 0;if(Ar!==null){var I=Ar.memoizedState;if(O=I.destroy,_!==null&&Ib(_,I.deps)){E.memoizedState=zu(h,x,O,_);return}}sr.flags|=d,E.memoizedState=zu(1|h,x,O,_)}function sE(d,h){return ap(8390656,8,d,h)}function Bb(d,h){return ip(2048,8,d,h)}function aE(d,h){return ip(4,2,d,h)}function iE(d,h){return ip(4,4,d,h)}function oE(d,h){if(typeof h=="function")return d=d(),h(d),function(){h(null)};if(h!=null)return d=d(),h.current=d,function(){h.current=null}}function lE(d,h,x){return x=x!=null?x.concat([d]):null,ip(4,4,oE.bind(null,h,d),x)}function qb(){}function cE(d,h){var x=is();h=h===void 0?null:h;var _=x.memoizedState;return _!==null&&h!==null&&Ib(h,_[1])?_[0]:(x.memoizedState=[d,h],d)}function dE(d,h){var x=is();h=h===void 0?null:h;var _=x.memoizedState;return _!==null&&h!==null&&Ib(h,_[1])?_[0]:(d=d(),x.memoizedState=[d,h],d)}function uE(d,h,x){return($o&21)===0?(d.baseState&&(d.baseState=!1,Sn=!0),d.memoizedState=x):(As(x,h)||(x=qA(),sr.lanes|=x,Fo|=x,d.baseState=!0),h)}function UW(d,h){var x=It;It=x!==0&&4>x?x:4,d(!0);var _=Rb.transition;Rb.transition={};try{d(!1),h()}finally{It=x,Rb.transition=_}}function hE(){return is().memoizedState}function zW(d,h,x){var _=Ei(d);if(x={lane:_,action:x,hasEagerState:!1,eagerState:null,next:null},mE(d))fE(h,x);else if(x=zT(d,h,x,_),x!==null){var E=mn();Ms(x,d,_,E),pE(x,h,_)}}function WW(d,h,x){var _=Ei(d),E={lane:_,action:x,hasEagerState:!1,eagerState:null,next:null};if(mE(d))fE(h,E);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=h.lastRenderedReducer,O!==null))try{var I=h.lastRenderedState,V=O(I,x);if(E.hasEagerState=!0,E.eagerState=V,As(V,I)){var J=h.interleaved;J===null?(E.next=E,Ab(h)):(E.next=J.next,J.next=E),h.interleaved=E;return}}catch{}finally{}x=zT(d,h,E,_),x!==null&&(E=mn(),Ms(x,d,_,E),pE(x,h,_))}}function mE(d){var h=d.alternate;return d===sr||h!==null&&h===sr}function fE(d,h){qu=sp=!0;var x=d.pending;x===null?h.next=h:(h.next=x.next,x.next=h),d.pending=h}function pE(d,h,x){if((x&4194240)!==0){var _=h.lanes;_&=d.pendingLanes,x|=_,h.lanes=x,Uv(d,x)}}var op={readContext:as,useCallback:Qr,useContext:Qr,useEffect:Qr,useImperativeHandle:Qr,useInsertionEffect:Qr,useLayoutEffect:Qr,useMemo:Qr,useReducer:Qr,useRef:Qr,useState:Qr,useDebugValue:Qr,useDeferredValue:Qr,useTransition:Qr,useMutableSource:Qr,useSyncExternalStore:Qr,useId:Qr,unstable_isNewReconciler:!1},HW={readContext:as,useCallback:function(d,h){return ta().memoizedState=[d,h===void 0?null:h],d},useContext:as,useEffect:sE,useImperativeHandle:function(d,h,x){return x=x!=null?x.concat([d]):null,ap(4194308,4,oE.bind(null,h,d),x)},useLayoutEffect:function(d,h){return ap(4194308,4,d,h)},useInsertionEffect:function(d,h){return ap(4,2,d,h)},useMemo:function(d,h){var x=ta();return h=h===void 0?null:h,d=d(),x.memoizedState=[d,h],d},useReducer:function(d,h,x){var _=ta();return h=x!==void 0?x(h):h,_.memoizedState=_.baseState=h,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:h},_.queue=d,d=d.dispatch=zW.bind(null,sr,d),[_.memoizedState,d]}
vendor: 5,930 bytes, lines 38-40
38,useRef:function(d){var h=ta();return d={current:d},h.memoizedState=d},useState:rE,useDebugValue:qb,useDeferredValue:function(d){return ta().memoizedState=d},useTransition:function(){var d=rE(!1),h=d[0];return d=UW.bind(null,d[1]),ta().memoizedState=d,[h,d]},useMutableSource:function(){},useSyncExternalStore:function(d,h,x){var _=sr,E=ta();if(Zt){if(x===void 0)throw Error(n(407));x=x()}else{if(x=h(),Dr===null)throw Error(n(349));($o&30)!==0||JT(_,h,x)}E.memoizedState=x;var O={value:x,getSnapshot:h};return E.queue=O,sE(ZT.bind(null,_,O,d),[d]),_.flags|=2048,zu(9,QT.bind(null,_,O,x,h),void 0,null),x},useId:function(){var d=ta(),h=Dr.identifierPrefix;if(Zt){var x=Ia,_=Ra;x=(_&~(1<<32-Cs(_)-1)).toString(32)+x,h=":"+h+"R"+x,x=Vu++,0<x&&(h+="H"+x.toString(32)),h+=":"}else x=VW++,h=":"+h+"r"+x.toString(32)+":";return d.memoizedState=h},unstable_isNewReconciler:!1},GW={readContext:as,useCallback:cE,useContext:as,useEffect:Bb,useImperativeHandle:lE,useInsertionEffect:aE,useLayoutEffect:iE,useMemo:dE,useReducer:$b,useRef:nE,useState:function(){return $b(Uu)},useDebugValue:qb,useDeferredValue:function(d){var h=is();return uE(h,Ar.memoizedState,d)},useTransition:function(){var d=$b(Uu)[0],h=is().memoizedState;return[d,h]},useMutableSource:YT,useSyncExternalStore:XT,useId:hE,unstable_isNewReconciler:!1},KW={readContext:as,useCallback:cE,useContext:as,useEffect:Bb,useImperativeHandle:lE,useInsertionEffect:aE,useLayoutEffect:iE,useMemo:dE,useReducer:Fb,useRef:nE,useState:function(){return Fb(Uu)},useDebugValue:qb,useDeferredValue:function(d){var h=is();return Ar===null?h.memoizedState=d:uE(h,Ar.memoizedState,d)},useTransition:function(){var d=Fb(Uu)[0],h=is().memoizedState;return[d,h]},useMutableSource:YT,useSyncExternalStore:XT,useId:hE,unstable_isNewReconciler:!1};function Es(d,h){if(d&&d.defaultProps){h=G({},h),d=d.defaultProps;for(var x in d)h[x]===void 0&&(h[x]=d[x]);return h}return h}function Vb(d,h,x,_){h=d.memoizedState,x=x(_,h),x=x==null?h:G({},h,x),d.memoizedState=x,d.lanes===0&&(d.updateQueue.baseState=x)}var lp={isMounted:function(d){return(d=d._reactInternals)?Po(d)===d:!1},enqueueSetState:function(d,h,x){d=d._reactInternals;var _=mn(),E=Ei(d),O=La(_,E);O.payload=h,x!=null&&(O.callback=x),h=ki(d,O,E),h!==null&&(Ms(h,d,E,_),ep(h,d,E))},enqueueReplaceState:function(d,h,x){d=d._reactInternals;var _=mn(),E=Ei(d),O=La(_,E);O.tag=1,O.payload=h,x!=null&&(O.callback=x),h=ki(d,O,E),h!==null&&(Ms(h,d,E,_),ep(h,d,E))},enqueueForceUpdate:function(d,h){d=d._reactInternals;var x=mn(),_=Ei(d),E=La(x,_);E.tag=2,h!=null&&(E.callback=h),h=ki(d,E,_),h!==null&&(Ms(h,d,_,x),ep(h,d,_))}};function xE(d,h,x,_,E,O,I){return d=d.stateNode,typeof d.shouldComponentUpdate=="function"?d.shouldComponentUpdate(_,O,I):h.prototype&&h.prototype.isPureReactComponent?!Eu(x,_)||!Eu(E,O):!0}function gE(d,h,x){var _=!1,E=Ni,O=h.contextType;return typeof O=="object"&&O!==null?O=as(O):(E=_n(h)?Mo:Jr.current,_=h.contextTypes,O=(_=_!=null)?xc(d,E):Ni),h=new h(x,O),d.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=lp,d.stateNode=h,h._reactInternals=d,_&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=E,d.__reactInternalMemoizedMaskedChildContext=O),h}function yE(d,h,x,_){d=h.state,typeof h.componentWillReceiveProps=="function"&&h.componentWillReceiveProps(x,_),typeof h.UNSAFE_componentWillReceiveProps=="function"&&h.UNSAFE_componentWillReceiveProps(x,_),h.state!==d&&lp.enqueueReplaceState(h,h.state,null)}function Ub(d,h,x,_){var E=d.stateNode;E.props=x,E.state=d.memoizedState,E.refs={},Tb(d);var O=h.contextType;typeof O=="object"&&O!==null?E.context=as(O):(O=_n(h)?Mo:Jr.current,E.context=xc(d,O)),E.state=d.memoizedState,O=h.getDerivedStateFromProps,typeof O=="function"&&(Vb(d,h,O,x),E.state=d.memoizedState),typeof h.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(h=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),h!==E.state&&lp.enqueueReplaceState(E,E.state,null),tp(d,x,E,_),E.state=d.memoizedState),typeof E.componentDidMount=="function"&&(d.flags|=4194308)}function _c(d,h){try{var x="",_=h;do x+=be(_),_=_.return;while(_);var E=x}catch(O){E=` 39Error generating stack: `+O.message+` 40`+O.stack}return{value:d,source:h,stack:E,digest:null}}function zb(d,h,x){return{value:d,source:null,stack:x??null,digest:h??null}}function Wb(d,h){try{console.error(h.value)}catch(x){setTimeout(function(){throw x})}}var YW=typeof WeakMap=="function"?WeakMap:Map;function vE(d,h,x){x=La(-1,x),x.tag=3,x.payload={element:null};var _=h.value;return x.callback=function(){pp||(pp=!0,i0=_),Wb(d,h)},x}function bE(d,h,x){x=La(-1,x),x.tag=3;var _=d.type.getDerivedStateFromError;if(typeof _=="function"){var E=h.value;x.payload=function(){return _(E)},x.callback=function(){Wb(d,h)}}var O=d.stateNode;return O!==null&&typeof O.componentDidCatch=="function"&&(x.callback=function(){Wb(d,h),typeof _!="function"&&(Ai===null?Ai=new Set([this]):Ai.add(this));var I=h.stack;this.componentDidCatch(h.value,{componentStack:I!==null?I:""})}),x}function jE(d,h,x){var _=d.pingCache;if(_===null){_=d.pingCache=new YW;var E=new Set;_.set(h,E)}else E=_.get(h),E===void 0&&(E=new Set,_.set(h,E));E.has(x)||(E.add(x),d=cH.bind(null,d,h,x),h.then(d,d))}function wE(d){do{var h;if((h=d.tag===13)&&(h=d.memoizedState,h=h!==null?h.dehydrated!==null:!0),h)return d;d=d.return}while(d!==null);return null}function NE(d,h,x,_,E){return(d.mode&1)===0?(d===h?d.flags|=65536:(d.flags|=128,x.flags|=131072,x.flags&=-52805,x.tag===1&&(x.alternate===null?x.tag=17:(h=La(-1,1),h.tag=2,ki(x,h,1))),x.lanes|=1),d):(d.flags|=65536,d.lanes=E,d)}var XW=A.ReactCurrentOwner,Sn=!1;function hn(d,h,x,_){h.child=d===null?UT(h,null,x,_):bc(h,d.child,x,_)}function _E(d,h,x,_,E){x=x.render;var O=h.ref;
vendor: 40,506 bytes, line 40
40return wc(h,E),_=Db(d,h,x,_,O,E),x=Lb(),d!==null&&!Sn?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~E,$a(d,h,E)):(Zt&&x&&vb(h),h.flags|=1,hn(d,h,_,E),h.child)}function SE(d,h,x,_,E){if(d===null){var O=x.type;return typeof O=="function"&&!m0(O)&&O.defaultProps===void 0&&x.compare===null&&x.defaultProps===void 0?(h.tag=15,h.type=O,kE(d,h,O,_,E)):(d=jp(x.type,null,_,h,h.mode,E),d.ref=h.ref,d.return=h,h.child=d)}if(O=d.child,(d.lanes&E)===0){var I=O.memoizedProps;if(x=x.compare,x=x!==null?x:Eu,x(I,_)&&d.ref===h.ref)return $a(d,h,E)}return h.flags|=1,d=Oi(O,_),d.ref=h.ref,d.return=h,h.child=d}function kE(d,h,x,_,E){if(d!==null){var O=d.memoizedProps;if(Eu(O,_)&&d.ref===h.ref)if(Sn=!1,h.pendingProps=_=O,(d.lanes&E)!==0)(d.flags&131072)!==0&&(Sn=!0);else return h.lanes=d.lanes,$a(d,h,E)}return Hb(d,h,x,_,E)}function CE(d,h,x){var _=h.pendingProps,E=_.children,O=d!==null?d.memoizedState:null;if(_.mode==="hidden")if((h.mode&1)===0)h.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ut(kc,zn),zn|=x;else{if((x&1073741824)===0)return d=O!==null?O.baseLanes|x:x,h.lanes=h.childLanes=1073741824,h.memoizedState={baseLanes:d,cachePool:null,transitions:null},h.updateQueue=null,Ut(kc,zn),zn|=d,null;h.memoizedState={baseLanes:0,cachePool:null,transitions:null},_=O!==null?O.baseLanes:x,Ut(kc,zn),zn|=_}else O!==null?(_=O.baseLanes|x,h.memoizedState=null):_=x,Ut(kc,zn),zn|=_;return hn(d,h,E,x),h.child}function AE(d,h){var x=h.ref;(d===null&&x!==null||d!==null&&d.ref!==x)&&(h.flags|=512,h.flags|=2097152)}function Hb(d,h,x,_,E){var O=_n(x)?Mo:Jr.current;return O=xc(h,O),wc(h,E),x=Db(d,h,x,_,O,E),_=Lb(),d!==null&&!Sn?(h.updateQueue=d.updateQueue,h.flags&=-2053,d.lanes&=~E,$a(d,h,E)):(Zt&&_&&vb(h),h.flags|=1,hn(d,h,x,E),h.child)}function TE(d,h,x,_,E){if(_n(x)){var O=!0;Hf(h)}else O=!1;if(wc(h,E),h.stateNode===null)dp(d,h),gE(h,x,_),Ub(h,x,_,E),_=!0;else if(d===null){var I=h.stateNode,V=h.memoizedProps;I.props=V;var J=I.context,le=x.contextType;typeof le=="object"&&le!==null?le=as(le):(le=_n(x)?Mo:Jr.current,le=xc(h,le));var we=x.getDerivedStateFromProps,_e=typeof we=="function"||typeof I.getSnapshotBeforeUpdate=="function";_e||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(V!==_||J!==le)&&yE(h,I,_,le),Si=!1;var je=h.memoizedState;I.state=je,tp(h,_,I,E),J=h.memoizedState,V!==_||je!==J||Nn.current||Si?(typeof we=="function"&&(Vb(h,x,we,_),J=h.memoizedState),(V=Si||xE(h,x,V,_,je,J,le))?(_e||typeof I.UNSAFE_componentWillMount!="function"&&typeof I.componentWillMount!="function"||(typeof I.componentWillMount=="function"&&I.componentWillMount(),typeof I.UNSAFE_componentWillMount=="function"&&I.UNSAFE_componentWillMount()),typeof I.componentDidMount=="function"&&(h.flags|=4194308)):(typeof I.componentDidMount=="function"&&(h.flags|=4194308),h.memoizedProps=_,h.memoizedState=J),I.props=_,I.state=J,I.context=le,_=V):(typeof I.componentDidMount=="function"&&(h.flags|=4194308),_=!1)}else{I=h.stateNode,WT(d,h),V=h.memoizedProps,le=h.type===h.elementType?V:Es(h.type,V),I.props=le,_e=h.pendingProps,je=I.context,J=x.contextType,typeof J=="object"&&J!==null?J=as(J):(J=_n(x)?Mo:Jr.current,J=xc(h,J));var Ie=x.getDerivedStateFromProps;(we=typeof Ie=="function"||typeof I.getSnapshotBeforeUpdate=="function")||typeof I.UNSAFE_componentWillReceiveProps!="function"&&typeof I.componentWillReceiveProps!="function"||(V!==_e||je!==J)&&yE(h,I,_,J),Si=!1,je=h.memoizedState,I.state=je,tp(h,_,I,E);var Fe=h.memoizedState;V!==_e||je!==Fe||Nn.current||Si?(typeof Ie=="function"&&(Vb(h,x,Ie,_),Fe=h.memoizedState),(le=Si||xE(h,x,le,_,je,Fe,J)||!1)?(we||typeof I.UNSAFE_componentWillUpdate!="function"&&typeof I.componentWillUpdate!="function"||(typeof I.componentWillUpdate=="function"&&I.componentWillUpdate(_,Fe,J),typeof I.UNSAFE_componentWillUpdate=="function"&&I.UNSAFE_componentWillUpdate(_,Fe,J)),typeof I.componentDidUpdate=="function"&&(h.flags|=4),typeof I.getSnapshotBeforeUpdate=="function"&&(h.flags|=1024)):(typeof I.componentDidUpdate!="function"||V===d.memoizedProps&&je===d.memoizedState||(h.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||V===d.memoizedProps&&je===d.memoizedState||(h.flags|=1024),h.memoizedProps=_,h.memoizedState=Fe),I.props=_,I.state=Fe,I.context=J,_=le):(typeof I.componentDidUpdate!="function"||V===d.memoizedProps&&je===d.memoizedState||(h.flags|=4),typeof I.getSnapshotBeforeUpdate!="function"||V===d.memoizedProps&&je===d.memoizedState||(h.flags|=1024),_=!1)}return Gb(d,h,x,_,O,E)}function Gb(d,h,x,_,E,O){AE(d,h);var I=(h.flags&128)!==0;if(!_&&!I)return E&&RT(h,x,!1),$a(d,h,O);_=h.stateNode,XW.current=h;var V=I&&typeof x.getDerivedStateFromError!="function"?null:_.render();return h.flags|=1,d!==null&&I?(h.child=bc(h,d.child,null,O),h.child=bc(h,null,V,O)):hn(d,h,V,O),h.memoizedState=_.state,E&&RT(h,x,!0),h.child}function EE(d){var h=d.stateNode;h.pendingContext?OT(d,h.pendingContext,h.pendingContext!==h.context):h.context&&OT(d,h.context,!1),Eb(d,h.containerInfo)}function PE(d,h,x,_,E){return vc(),Nb(E),h.flags|=256,hn(d,h,x,_),h.child}var Kb={dehydrated:null,treeContext:null,retryLane:0};function Yb(d){return{baseLanes:d,cachePool:null,transitions:null}}function OE(d,h,x){var _=h.pendingProps,E=nr.current,O=!1,I=(h.flags&128)!==0,V;if((V=I)||(V=d!==null&&d.memoizedState===null?!1:(E&2)!==0),V?(O=!0,h.flags&=-129):(d===null||d.memoizedState!==null)&&(E|=1),Ut(nr,E&1),d===null)return wb(h),d=h.memoizedState,d!==null&&(d=d.dehydrated,d!==null)?((h.mode&1)===0?h.lanes=1:d.data==="$!"?h.lanes=8:h.lanes=1073741824,null):(I=_.children,d=_.fallback,O?(_=h.mode,O=h.child,I={mode:"hidden",children:I},(_&1)===0&&O!==null?(O.childLanes=0,O.pendingProps=I):O=wp(I,_,0,null),d=Uo(d,_,x,null),O.return=h,d.return=h,O.sibling=d,h.child=O,h.child.memoizedState=Yb(x),h.memoizedState=Kb,d):Xb(h,I));if(E=d.memoizedState,E!==null&&(V=E.dehydrated,V!==null))return JW(d,h,I,_,V,E,x);if(O){O=_.fallback,I=h.mode,E=d.child,V=E.sibling;var J={mode:"hidden",children:_.children};return(I&1)===0&&h.child!==E?(_=h.child,_.childLanes=0,_.pendingProps=J,h.deletions=null):(_=Oi(E,J),_.subtreeFlags=E.subtreeFlags&14680064),V!==null?O=Oi(V,O):(O=Uo(O,I,x,null),O.flags|=2),O.return=h,_.return=h,_.sibling=O,h.child=_,_=O,O=h.child,I=d.child.memoizedState,I=I===null?Yb(x):{baseLanes:I.baseLanes|x,cachePool:null,transitions:I.transitions},O.memoizedState=I,O.childLanes=d.childLanes&~x,h.memoizedState=Kb,_}return O=d.child,d=O.sibling,_=Oi(O,{mode:"visible",children:_.children}),(h.mode&1)===0&&(_.lanes=x),_.return=h,_.sibling=null,d!==null&&(x=h.deletions,x===null?(h.deletions=[d],h.flags|=16):x.push(d)),h.child=_,h.memoizedState=null,_}function Xb(d,h){return h=wp({mode:"visible",children:h},d.mode,0,null),h.return=d,d.child=h}function cp(d,h,x,_){return _!==null&&Nb(_),bc(h,d.child,null,x),d=Xb(h,h.pendingProps.children),d.flags|=2,h.memoizedState=null,d}function JW(d,h,x,_,E,O,I){if(x)return h.flags&256?(h.flags&=-257,_=zb(Error(n(422))),cp(d,h,I,_)):h.memoizedState!==null?(h.child=d.child,h.flags|=128,null):(O=_.fallback,E=h.mode,_=wp({mode:"visible",children:_.children},E,0,null),O=Uo(O,E,I,null),O.flags|=2,_.return=h,O.return=h,_.sibling=O,h.child=_,(h.mode&1)!==0&&bc(h,d.child,null,I),h.child.memoizedState=Yb(I),h.memoizedState=Kb,O);if((h.mode&1)===0)return cp(d,h,I,null);if(E.data==="$!"){if(_=E.nextSibling&&E.nextSibling.dataset,_)var V=_.dgst;return _=V,O=Error(n(419)),_=zb(O,_,void 0),cp(d,h,I,_)}if(V=(I&d.childLanes)!==0,Sn||V){if(_=Dr,_!==null){switch(I&-I){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(_.suspendedLanes|I))!==0?0:E,E!==0&&E!==O.retryLane&&(O.retryLane=E,Da(d,E),Ms(_,d,E,-1))}return h0(),_=zb(Error(n(421))),cp(d,h,I,_)}return E.data==="$?"?(h.flags|=128,h.child=d.child,h=dH.bind(null,d),E._reactRetry=h,null):(d=O.treeContext,Un=ji(E.nextSibling),Vn=h,Zt=!0,Ts=null,d!==null&&(ns[ss++]=Ra,ns[ss++]=Ia,ns[ss++]=Ro,Ra=d.id,Ia=d.overflow,Ro=h),h=Xb(h,_.children),h.flags|=4096,h)}function ME(d,h,x){d.lanes|=h;var _=d.alternate;_!==null&&(_.lanes|=h),Cb(d.return,h,x)}function Jb(d,h,x,_,E){var O=d.memoizedState;O===null?d.memoizedState={isBackwards:h,rendering:null,renderingStartTime:0,last:_,tail:x,tailMode:E}:(O.isBackwards=h,O.rendering=null,O.renderingStartTime=0,O.last=_,O.tail=x,O.tailMode=E)}function RE(d,h,x){var _=h.pendingProps,E=_.revealOrder,O=_.tail;if(hn(d,h,_.children,x),_=nr.current,(_&2)!==0)_=_&1|2,h.flags|=128;else{if(d!==null&&(d.flags&128)!==0)e:for(d=h.child;d!==null;){if(d.tag===13)d.memoizedState!==null&&ME(d,x,h);else if(d.tag===19)ME(d,x,h);else if(d.child!==null){d.child.return=d,d=d.child;continue}if(d===h)break e;for(;d.sibling===null;){if(d.return===null||d.return===h)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}_&=1}if(Ut(nr,_),(h.mode&1)===0)h.memoizedState=null;else switch(E){case"forwards":for(x=h.child,E=null;x!==null;)d=x.alternate,d!==null&&rp(d)===null&&(E=x),x=x.sibling;x=E,x===null?(E=h.child,h.child=null):(E=x.sibling,x.sibling=null),Jb(h,!1,E,x,O);break;case"backwards":for(x=null,E=h.child,h.child=null;E!==null;){if(d=E.alternate,d!==null&&rp(d)===null){h.child=E;break}d=E.sibling,E.sibling=x,x=E,E=d}Jb(h,!0,x,null,O);break;case"together":Jb(h,!1,null,null,void 0);break;default:h.memoizedState=null}return h.child}function dp(d,h){(h.mode&1)===0&&d!==null&&(d.alternate=null,h.alternate=null,h.flags|=2)}function $a(d,h,x){if(d!==null&&(h.dependencies=d.dependencies),Fo|=h.lanes,(x&h.childLanes)===0)return null;if(d!==null&&h.child!==d.child)throw Error(n(153));if(h.child!==null){for(d=h.child,x=Oi(d,d.pendingProps),h.child=x,x.return=h;d.sibling!==null;)d=d.sibling,x=x.sibling=Oi(d,d.pendingProps),x.return=h;x.sibling=null}return h.child}function QW(d,h,x){switch(h.tag){case 3:EE(h),vc();break;case 5:KT(h);break;case 1:_n(h.type)&&Hf(h);break;case 4:Eb(h,h.stateNode.containerInfo);break;case 10:var _=h.type._context,E=h.memoizedProps.value;Ut(Qf,_._currentValue),_._currentValue=E;break;case 13:if(_=h.memoizedState,_!==null)return _.dehydrated!==null?(Ut(nr,nr.current&1),h.flags|=128,null):(x&h.child.childLanes)!==0?OE(d,h,x):(Ut(nr,nr.current&1),d=$a(d,h,x),d!==null?d.sibling:null);Ut(nr,nr.current&1);break;case 19:if(_=(x&h.childLanes)!==0,(d.flags&128)!==0){if(_)return RE(d,h,x);h.flags|=128}if(E=h.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Ut(nr,nr.current),_)break;return null;case 22:case 23:return h.lanes=0,CE(d,h,x)}return $a(d,h,x)}var IE,Qb,DE,LE;IE=function(d,h){for(var x=h.child;x!==null;){if(x.tag===5||x.tag===6)d.appendChild(x.stateNode);else if(x.tag!==4&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===h)break;for(;x.sibling===null;){if(x.return===null||x.return===h)return;x=x.return}x.sibling.return=x.return,x=x.sibling}},Qb=function(){},DE=function(d,h,x,_){var E=d.memoizedProps;if(E!==_){d=h.stateNode,Lo(ea.current);var O=null;switch(x){case"input":E=ye(d,E),_=ye(d,_),O=[];break;case"select":E=G({},E,{value:void 0}),_=G({},_,{value:void 0}),O=[];break;case"textarea":E=We(d,E),_=We(d,_),O=[];break;default:typeof E.onClick!="function"&&typeof _.onClick=="function"&&(d.onclick=Uf)}Ov(x,_);var I;x=null;for(le in E)if(!_.hasOwnProperty(le)&&E.hasOwnProperty(le)&&E[le]!=null)if(le==="style"){var V=E[le];for(I in V)V.hasOwnProperty(I)&&(x||(x={}),x[I]="")}else le!=="dangerouslySetInnerHTML"&&le!=="children"&&le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&le!=="autoFocus"&&(a.hasOwnProperty(le)?O||(O=[]):(O=O||[]).push(le,null));for(le in _){var J=_[le];if(V=E!=null?E[le]:void 0,_.hasOwnProperty(le)&&J!==V&&(J!=null||V!=null))if(le==="style")if(V){for(I in V)!V.hasOwnProperty(I)||J&&J.hasOwnProperty(I)||(x||(x={}),x[I]="");for(I in J)J.hasOwnProperty(I)&&V[I]!==J[I]&&(x||(x={}),x[I]=J[I])}else x||(O||(O=[]),O.push(le,x)),x=J;else le==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,V=V?V.__html:void 0,J!=null&&V!==J&&(O=O||[]).push(le,J)):le==="children"?typeof J!="string"&&typeof J!="number"||(O=O||[]).push(le,""+J):le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&(a.hasOwnProperty(le)?(J!=null&&le==="onScroll"&&Kt("scroll",d),O||V===J||(O=[])):(O=O||[]).push(le,J))}x&&(O=O||[]).push("style",x);var le=O;(h.updateQueue=le)&&(h.flags|=4)}},LE=function(d,h,x,_){x!==_&&(h.flags|=4)};function Wu(d,h){if(!Zt)switch(d.tailMode){case"hidden":h=d.tail;for(var x=null;h!==null;)h.alternate!==null&&(x=h),h=h.sibling;x===null?d.tail=null:x.sibling=null;break;case"collapsed":x=d.tail;for(var _=null;x!==null;)x.alternate!==null&&(_=x),x=x.sibling;_===null?h||d.tail===null?d.tail=null:d.tail.sibling=null:_.sibling=null}}function Zr(d){var h=d.alternate!==null&&d.alternate.child===d.child,x=0,_=0;if(h)for(var E=d.child;E!==null;)x|=E.lanes|E.childLanes,_|=E.subtreeFlags&14680064,_|=E.flags&14680064,E.return=d,E=E.sibling;else for(E=d.child;E!==null;)x|=E.lanes|E.childLanes,_|=E.subtreeFlags,_|=E.flags,E.return=d,E=E.sibling;return d.subtreeFlags|=_,d.childLanes=x,h}function ZW(d,h,x){var _=h.pendingProps;switch(bb(h),h.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zr(h),null;case 1:return _n(h.type)&&Wf(),Zr(h),null;case 3:return _=h.stateNode,Nc(),Yt(Nn),Yt(Jr),Mb(),_.pendingContext&&(_.context=_.pendingContext,_.pendingContext=null),(d===null||d.child===null)&&(Xf(h)?h.flags|=4:d===null||d.memoizedState.isDehydrated&&(h.flags&256)===0||(h.flags|=1024,Ts!==null&&(c0(Ts),Ts=null))),Qb(d,h),Zr(h),null;case 5:Pb(h);var E=Lo(Bu.current);if(x=h.type,d!==null&&h.stateNode!=null)DE(d,h,x,_,E),d.ref!==h.ref&&(h.flags|=512,h.flags|=2097152);else{if(!_){if(h.stateNode===null)throw Error(n(166));return Zr(h),null}if(d=Lo(ea.current),Xf(h)){_=h.stateNode,x=h.type;var O=h.memoizedProps;switch(_[Zs]=h,_[Iu]=O,d=(h.mode&1)!==0,x){case"dialog":Kt("cancel",_),Kt("close",_);break;case"iframe":case"object":case"embed":Kt("load",_);break;case"video":case"audio":for(E=0;E<Ou.length;E++)Kt(Ou[E],_);break;case"source":Kt("error",_);break;case"img":case"image":case"link":Kt("error",_),Kt("load",_);break;case"details":Kt("toggle",_);break;case"input":Ee(_,O),Kt("invalid",_);break;case"select":_._wrapperState={wasMultiple:!!O.multiple},Kt("invalid",_);break;case"textarea":Nt(_,O),Kt("invalid",_)}Ov(x,O),E=null;for(var I in O)if(O.hasOwnProperty(I)){var V=O[I];I==="children"?typeof V=="string"?_.textContent!==V&&(O.suppressHydrationWarning!==!0&&Vf(_.textContent,V,d),E=["children",V]):typeof V=="number"&&_.textContent!==""+V&&(O.suppressHydrationWarning!==!0&&Vf(_.textContent,V,d),E=["children",""+V]):a.hasOwnProperty(I)&&V!=null&&I==="onScroll"&&Kt("scroll",_)}switch(x){case"input":Se(_),xt(_,O,!0);break;case"textarea":Se(_),wn(_);break;case"select":case"option":break;default:typeof O.onClick=="function"&&(_.onclick=Uf)}_=E,h.updateQueue=_,_!==null&&(h.flags|=4)}else{I=E.nodeType===9?E:E.ownerDocument,d==="http://www.w3.org/1999/xhtml"&&(d=Ss(x)),d==="http://www.w3.org/1999/xhtml"?x==="script"?(d=I.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild)):typeof _.is=="string"?d=I.createElement(x,{is:_.is}):(d=I.createElement(x),x==="select"&&(I=d,_.multiple?I.multiple=!0:_.size&&(I.size=_.size))):d=I.createElementNS(d,x),d[Zs]=h,d[Iu]=_,IE(d,h,!1,!1),h.stateNode=d;e:{switch(I=Mv(x,_),x){case"dialog":Kt("cancel",d),Kt("close",d),E=_;break;case"iframe":case"object":case"embed":Kt("load",d),E=_;break;case"video":case"audio":for(E=0;E<Ou.length;E++)Kt(Ou[E],d);E=_;break;case"source":Kt("error",d),E=_;break;case"img":case"image":case"link":Kt("error",d),Kt("load",d),E=_;break;case"details":Kt("toggle",d),E=_;break;case"input":Ee(d,_),E=ye(d,_),Kt("invalid",d);break;case"option":E=_;break;case"select":d._wrapperState={wasMultiple:!!_.multiple},E=G({},_,{value:void 0}),Kt("invalid",d);break;case"textarea":Nt(d,_),E=We(d,_),Kt("invalid",d);break;default:E=_}Ov(x,E),V=E;for(O in V)if(V.hasOwnProperty(O)){var J=V[O];O==="style"?sc(d,J):O==="dangerouslySetInnerHTML"?(J=J?J.__html:void 0,J!=null&&fu(d,J)):O==="children"?typeof J=="string"?(x!=="textarea"||J!=="")&&To(d,J):typeof J=="number"&&To(d,""+J):O!=="suppressContentEditableWarning"&&O!=="suppressHydrationWarning"&&O!=="autoFocus"&&(a.hasOwnProperty(O)?J!=null&&O==="onScroll"&&Kt("scroll",d):J!=null&&S(d,O,J,I))}switch(x){case"input":Se(d),xt(d,_,!1);break;case"textarea":Se(d),wn(d);break;case"option":_.value!=null&&d.setAttribute("value",""+Ae(_.value));break;case"select":d.multiple=!!_.multiple,O=_.value,O!=null?ot(d,!!_.multiple,O,!1):_.defaultValue!=null&&ot(d,!!_.multiple,_.defaultValue,!0);break;default:typeof E.onClick=="function"&&(d.onclick=Uf)}switch(x){case"button":case"input":case"select":case"textarea":_=!!_.autoFocus;break e;case"img":_=!0;break e;default:_=!1}}_&&(h.flags|=4)}h.ref!==null&&(h.flags|=512,h.flags|=2097152)}return Zr(h),null;case 6:if(d&&h.stateNode!=null)LE(d,h,d.memoizedProps,_);else{if(typeof _!="string"&&h.stateNode===null)throw Error(n(166));if(x=Lo(Bu.current),Lo(ea.current),Xf(h)){if(_=h.stateNode,x=h.memoizedProps,_[Zs]=h,(O=_.nodeValue!==x)&&(d=Vn,d!==null))switch(d.tag){case 3:Vf(_.nodeValue,x,(d.mode&1)!==0);break;case 5:d.memoizedProps.suppressHydrationWarning!==!0&&Vf(_.nodeValue,x,(d.mode&1)!==0)}O&&(h.flags|=4)}else _=(x.nodeType===9?x:x.ownerDocument).createTextNode(_),_[Zs]=h,h.stateNode=_}return Zr(h),null;case 13:if(Yt(nr),_=h.memoizedState,d===null||d.memoizedState!==null&&d.memoizedState.dehydrated!==null){if(Zt&&Un!==null&&(h.mode&1)!==0&&(h.flags&128)===0)BT(),vc(),h.flags|=98560,O=!1;else if(O=Xf(h),_!==null&&_.dehydrated!==null){if(d===null){if(!O)throw Error(n(318));if(O=h.memoizedState,O=O!==null?O.dehydrated:null,!O)throw Error(n(317));O[Zs]=h}else vc(),(h.flags&128)===0&&(h.memoizedState=null),h.flags|=4;Zr(h),O=!1}else Ts!==null&&(c0(Ts),Ts=null),O=!0;if(!O)return h.flags&65536?h:null}return(h.flags&128)!==0?(h.lanes=x,h):(_=_!==null,_!==(d!==null&&d.memoizedState!==null)&&_&&(h.child.flags|=8192,(h.mode&1)!==0&&(d===null||(nr.current&1)!==0?Tr===0&&(Tr=3):h0())),h.updateQueue!==null&&(h.flags|=4),Zr(h),null);case 4:return Nc(),Qb(d,h),d===null&&Mu(h.stateNode.containerInfo),Zr(h),null;case 10:return kb(h.type._context),Zr(h),null;case 17:return _n(h.type)&&Wf(),Zr(h),null;case 19:if(Yt(nr),O=h.memoizedState,O===null)return Zr(h),null;if(_=(h.flags&128)!==0,I=O.rendering,I===null)if(_)Wu(O,!1);else{if(Tr!==0||d!==null&&(d.flags&128)!==0)for(d=h.child;d!==null;){if(I=rp(d),I!==null){for(h.flags|=128,Wu(O,!1),_=I.updateQueue,_!==null&&(h.updateQueue=_,h.flags|=4),h.subtreeFlags=0,_=x,x=h.child;x!==null;)O=x,d=_,O.flags&=14680066,I=O.alternate,I===null?(O.childLanes=0,O.lanes=d,O.child=null,O.subtreeFlags=0,O.memoizedProps=null,O.memoizedState=null,O.updateQueue=null,O.dependencies=null,O.stateNode=null):(O.childLanes=I.childLanes,O.lanes=I.lanes,O.child=I.child,O.subtreeFlags=0,O.deletions=null,O.memoizedProps=I.memoizedProps,O.memoizedState=I.memoizedState,O.updateQueue=I.updateQueue,O.type=I.type,d=I.dependencies,O.dependencies=d===null?null:{lanes:d.lanes,firstContext:d.firstContext}),x=x.sibling;return Ut(nr,nr.current&1|2),h.child}d=d.sibling}O.tail!==null&&fr()>Cc&&(h.flags|=128,_=!0,Wu(O,!1),h.lanes=4194304)}else{if(!_)if(d=rp(I),d!==null){if(h.flags|=128,_=!0,x=d.updateQueue,x!==null&&(h.updateQueue=x,h.flags|=4),Wu(O,!0),O.tail===null&&O.tailMode==="hidden"&&!I.alternate&&!Zt)return Zr(h),null}else 2*fr()-O.renderingStartTime>Cc&&x!==1073741824&&(h.flags|=128,_=!0,Wu(O,!1),h.lanes=4194304);O.isBackwards?(I.sibling=h.child,h.child=I):(x=O.last,x!==null?x.sibling=I:h.child=I,O.last=I)}return O.tail!==null?(h=O.tail,O.rendering=h,O.tail=h.sibling,O.renderingStartTime=fr(),h.sibling=null,x=nr.current,Ut(nr,_?x&1|2:x&1),h):(Zr(h),null);case 22:case 23:return u0(),_=h.memoizedState!==null,d!==null&&d.memoizedState!==null!==_&&(h.flags|=8192),_&&(h.mode&1)!==0?(zn&1073741824)!==0&&(Zr(h),h.subtreeFlags&6&&(h.flags|=8192)):Zr(h),null;case 24:return null;case 25:return null}throw Error(n(156,h.tag))}function eH(d,h){switch(bb(h),h.tag){case 1:return _n(h.type)&&Wf(),d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 3:return Nc(),Yt(Nn),Yt(Jr),Mb(),d=h.flags,(d&65536)!==0&&(d&128)===0?(h.flags=d&-65537|128,h):null;case 5:return Pb(h),null;case 13:if(Yt(nr),d=h.memoizedState,d!==null&&d.dehydrated!==null){if(h.alternate===null)throw Error(n(340));vc()}return d=h.flags,d&65536?(h.flags=d&-65537|128,h):null;case 19:return Yt(nr),null;case 4:return Nc(),null;case 10:return kb(h.type._context),null;case 22:case 23:return u0(),null;case 24:return null;default:return null}}var up=!1,en=!1,tH=typeof WeakSet=="function"?WeakSet:Set,Le=null;function Sc(d,h){var x=d.ref;if(x!==null)if(typeof x=="function")try{x(null)}catch(_){lr(d,h,_)}else x.current=null}function Zb(d,h,x){try{x()}catch(_){lr(d,h,_)}}var $E=!1;function rH(d,h){if(ub=Pf,d=xT(),nb(d)){if("selectionStart"in d)var x={start:d.selectionStart,end:d.selectionEnd};else e:{x=(x=d.ownerDocument)&&x.defaultView||window;var _=x.getSelection&&x.getSelection();if(_&&_.rangeCount!==0){x=_.anchorNode;var E=_.anchorOffset,O=_.focusNode;_=_.focusOffset;try{x.nodeType,O.nodeType}catch{x=null;break e}var I=0,V=-1,J=-1,le=0,we=0,_e=d,je=null;t:for(;;){for(var Ie;_e!==x||E!==0&&_e.nodeType!==3||(V=I+E),_e!==O||_!==0&&_e.nodeType!==3||(J=I+_),_e.nodeType===3&&(I+=_e.nodeValue.length),(Ie=_e.firstChild)!==null;)je=_e,_e=Ie;for(;;){if(_e===d)break t;if(je===x&&++le===E&&(V=I),je===O&&++we===_&&(J=I),(Ie=_e.nextSibling)!==null)break;_e=je,je=_e.parentNode}_e=Ie}x=V===-1||J===-1?null:{start:V,end:J}}else x=null}x=x||{start:0,end:0}}else x=null;for(hb={focusedElem:d,selectionRange:x},Pf=!1,Le=h;Le!==null;)if(h=Le,d=h.child,(h.subtreeFlags&1028)!==0&&d!==null)d.return=h,Le=d;else for(;Le!==null;){h=Le;try{var Fe=h.alternate;if((h.flags&1024)!==0)switch(h.tag){case 0:case 11:case 15:break;case 1:if(Fe!==null){var Ve=Fe.memoizedProps,pr=Fe.memoizedState,ne=h.stateNode,ee=ne.getSnapshotBeforeUpdate(h.elementType===h.type?Ve:Es(h.type,Ve),pr);ne.__reactInternalSnapshotBeforeUpdate=ee}break;case 3:var ae=h.stateNode.containerInfo;ae.nodeType===1?ae.textContent="":ae.nodeType===9&&ae.documentElement&&ae.removeChild(ae.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ce){lr(h,h.return,Ce)}if(d=h.sibling,d!==null){d.return=h.return,Le=d;break}Le=h.return}return Fe=$E,$E=!1,Fe}function Hu(d,h,x){var _=h.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var E=_=_.next;do{if((E.tag&d)===d){var O=E.destroy;E.destroy=void 0,O!==void 0&&Zb(h,x,O)}E=E.next}while(E!==_)}}function hp(d,h){if(h=h.updateQueue,h=h!==null?h.lastEffect:null,h!==null){var x=h=h.next;do{if((x.tag&d)===d){var _=x.create;x.destroy=_()}x=x.next}while(x!==h)}}function e0(d){var h=d.ref;if(h!==null){var x=d.stateNode;switch(d.tag){case 5:d=x;break;default:d=x}typeof h=="function"?h(d):h.current=d}}function FE(d){var h=d.alternate;h!==null&&(d.alternate=null,FE(h)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(h=d.stateNode,h!==null&&(delete h[Zs],delete h[Iu],delete h[xb],delete h[$W],delete h[FW])),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function BE(d){return d.tag===5||d.tag===3||d.tag===4}function qE(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||BE(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function t0(d,h,x){var _=d.tag;if(_===5||_===6)d=d.stateNode,h?x.nodeType===8?x.parentNode.insertBefore(d,h):x.insertBefore(d,h):(x.nodeType===8?(h=x.parentNode,h.insertBefore(d,x)):(h=x,h.appendChild(d)),x=x._reactRootContainer,x!=null||h.onclick!==null||(h.onclick=Uf));else if(_!==4&&(d=d.child,d!==null))for(t0(d,h,x),d=d.sibling;d!==null;)t0(d,h,x),d=d.sibling}function r0(d,h,x){var _=d.tag;if(_===5||_===6)d=d.stateNode,h?x.insertBefore(d,h):x.appendChild(d);else if(_!==4&&(d=d.child,d!==null))for(r0(d,h,x),d=d.sibling;d!==null;)r0(d,h,x),d=d.sibling}var Ur=null,Ps=!1;function Ci(d,h,x){for(x=x.child;x!==null;)VE(d,h,x),x=x.sibling}function VE(d,h,x){if(Qs&&typeof Qs.onCommitFiberUnmount=="function")try{Qs.onCommitFiberUnmount(Sf,x)}catch{}switch(x.tag){case 5:en||Sc(x,h);case 6:var _=Ur,E=Ps;Ur=null,Ci(d,h,x),Ur=_,Ps=E,Ur!==null&&(Ps?(d=Ur,x=x.stateNode,d.nodeType===8?d.parentNode.removeChild(x):d.removeChild(x)):Ur.removeChild(x.stateNode));break;case 18:Ur!==null&&(Ps?(d=Ur,x=x.stateNode,d.nodeType===8?pb(d.parentNode,x):d.nodeType===1&&pb(d,x),_u(d)):pb(Ur,x.stateNode));break;case 4:_=Ur,E=Ps,Ur=x.stateNode.containerInfo,Ps=!0,Ci(d,h,x),Ur=_,Ps=E;break;case 0:case 11:case 14:case 15:if(!en&&(_=x.updateQueue,_!==null&&(_=_.lastEffect,_!==null))){E=_=_.next;do{var O=E,I=O.destroy;O=O.tag,I!==void 0&&((O&2)!==0||(O&4)!==0)&&Zb(x,h,I),E=E.next}while(E!==_)}Ci(d,h,x);break;case 1:if(!en&&(Sc(x,h),_=x.stateNode,typeof _.componentWillUnmount=="function"))try{_.props=x.memoizedProps,_.state=x.memoizedState,_.componentWillUnmount()}catch(V){lr(x,h,V)}Ci(d,h,x);break;case 21:Ci(d,h,x);break;case 22:x.mode&1?(en=(_=en)||x.memoizedState!==null,Ci(d,h,x),en=_):Ci(d,h,x);break;default:Ci(d,h,x)}}function UE(d){var h=d.updateQueue;if(h!==null){d.updateQueue=null;var x=d.stateNode;x===null&&(x=d.stateNode=new tH),h.forEach(function(_){var E=uH.bind(null,d,_);x.has(_)||(x.add(_),_.then(E,E))})}}function Os(d,h){var x=h.deletions;if(x!==null)for(var _=0;_<x.length;_++){var E=x[_];try{var O=d,I=h,V=I;e:for(;V!==null;){switch(V.tag){case 5:Ur=V.stateNode,Ps=!1;break e;case 3:Ur=V.stateNode.containerInfo,Ps=!0;break e;case 4:Ur=V.stateNode.containerInfo,Ps=!0;break e}V=V.return}if(Ur===null)throw Error(n(160));VE(O,I,E),Ur=null,Ps=!1;var J=E.alternate;J!==null&&(J.return=null),E.return=null}catch(le){lr(E,h,le)}}if(h.subtreeFlags&12854)for(h=h.child;h!==null;)zE(h,d),h=h.sibling}function zE(d,h){var x=d.alternate,_=d.flags;switch(d.tag){case 0:case 11:case 14:case 15:if(Os(h,d),ra(d),_&4){try{Hu(3,d,d.return),hp(3,d)}catch(Ve){lr(d,d.return,Ve)}try{Hu(5,d,d.return)}catch(Ve){lr(d,d.return,Ve)}}break;case 1:Os(h,d),ra(d),_&512&&x!==null&&Sc(x,x.return);break;case 5:if(Os(h,d),ra(d),_&512&&x!==null&&Sc(x,x.return),d.flags&32){var E=d.stateNode;try{To(E,"")}catch(Ve){lr(d,d.return,Ve)}}if(_&4&&(E=d.stateNode,E!=null)){var O=d.memoizedProps,I=x!==null?x.memoizedProps:O,V=d.type,J=d.updateQueue;if(d.updateQueue=null,J!==null)try{V==="input"&&O.type==="radio"&&O.name!=null&&ke(E,O),Mv(V,I);var le=Mv(V,O);for(I=0;I<J.length;I+=2){var we=J[I],_e=J[I+1];we==="style"?sc(E,_e):we==="dangerouslySetInnerHTML"?fu(E,_e):we==="children"?To(E,_e):S(E,we,_e,le)}switch(V){case"input":ze(E,O);break;case"textarea":mr(E,O);break;case"select":var je=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!O.multiple;var Ie=O.value;Ie!=null?ot(E,!!O.multiple,Ie,!1):je!==!!O.multiple&&(O.defaultValue!=null?ot(E,!!O.multiple,O.defaultValue,!0):ot(E,!!O.multiple,O.multiple?[]:"",!1))}E[Iu]=O}catch(Ve){lr(d,d.return,Ve)}}break;case 6:if(Os(h,d),ra(d),_&4){if(d.stateNode===null)throw Error(n(162));E=d.stateNode,O=d.memoizedProps;try{E.nodeValue=O}catch(Ve){lr(d,d.return,Ve)}}break;case 3:if(Os(h,d),ra(d),_&4&&x!==null&&x.memoizedState.isDehydrated)try{_u(h.containerInfo)}catch(Ve){lr(d,d.return,Ve)}break;case 4:Os(h,d),ra(d);break;case 13:Os(h,d),ra(d),E=d.child,E.flags&8192&&(O=E.memoizedState!==null,E.stateNode.isHidden=O,!O||E.alternate!==null&&E.alternate.memoizedState!==null||(a0=fr())),_&4&&UE(d);break;case 22:if(we=x!==null&&x.memoizedState!==null,d.mode&1?(en=(le=en)||we,Os(h,d),en=le):Os(h,d),ra(d),_&8192){if(le=d.memoizedState!==null,(d.stateNode.isHidden=le)&&!we&&(d.mode&1)!==0)for(Le=d,we=d.child;we!==null;){for(_e=Le=we;Le!==null;){switch(je=Le,Ie=je.child,je.tag){case 0:case 11:case 14:case 15:Hu(4,je,je.return);break;case 1:Sc(je,je.return);var Fe=je.stateNode;if(typeof Fe.componentWillUnmount=="function"){_=je,x=je.return;try{h=_,Fe.props=h.memoizedProps,Fe.state=h.memoizedState,Fe.componentWillUnmount()}catch(Ve){lr(_,x,Ve)}}break;case 5:Sc(je,je.return);break;case 22:if(je.memoizedState!==null){GE(_e);continue}}Ie!==null?(Ie.return=je,Le=Ie):GE(_e)}we=we.sibling}e:for(we=null,_e=d;;){if(_e.tag===5){if(we===null){we=_e;try{E=_e.stateNode,le?(O=E.style,typeof O.setProperty=="function"?O.setProperty("display","none","important"):O.display="none"):(V=_e.stateNode,J=_e.memoizedProps.style,I=J!=null&&J.hasOwnProperty("display")?J.display:null,V.style.display=Js("display",I))}catch(Ve){lr(d,d.return,Ve)}}}else if(_e.tag===6){if(we===null)try{_e.stateNode.nodeValue=le?"":_e.memoizedProps}catch(Ve){lr(d,d.return,Ve)}}else if((_e.tag!==22&&_e.tag!==23||_e.memoizedState===null||_e===d)&&_e.child!==null){_e.child.return=_e,_e=_e.child;continue}if(_e===d)break e;for(;_e.sibling===null;){if(_e.return===null||_e.return===d)break e;we===_e&&(we=null),_e=_e.return}we===_e&&(we=null),_e.sibling.return=_e.return,_e=_e.sibling}}break;case 19:Os(h,d),ra(d),_&4&&UE(d);break;case 21:break;default:Os(h,d),ra(d)}}function ra(d){var h=d.flags;if(h&2){try{e:{for(var x=d.return;x!==null;){if(BE(x)){var _=x;break e}x=x.return}throw Error(n(160))}switch(_.tag){case 5:var E=_.stateNode;_.flags&32&&(To(E,""),_.flags&=-33);var O=qE(d);r0(d,O,E);break;case 3:case 4:var I=_.stateNode.containerInfo,V=qE(d);t0(d,V,I);break;default:throw Error(n(161))}}catch(J){lr(d,d.return,J)}d.flags&=-3}h&4096&&(d.flags&=-4097)}function nH(d,h,x){Le=d,WE(d)}function WE(d,h,x){for(var _=(d.mode&1)!==0;Le!==null;){var E=Le,O=E.child;if(E.tag===22&&_){var I=E.memoizedState!==null||up;if(!I){var V=E.alternate,J=V!==null&&V.memoizedState!==null||en;V=up;var le=en;if(up=I,(en=J)&&!le)for(Le=E;Le!==null;)I=Le,J=I.child,I.tag===22&&I.memoizedState!==null?KE(E):J!==null?(J.return=I,Le=J):KE(E);for(;O!==null;)Le=O,WE(O),O=O.sibling;Le=E,up=V,en=le}HE(d)}else(E.subtreeFlags&8772)!==0&&O!==null?(O.return=E,Le=O):HE(d)}}function HE(d){for(;Le!==null;){var h=Le;if((h.flags&8772)!==0){var x=h.alternate;try{if((h.flags&8772)!==0)switch(h.tag){case 0:case 11:case 15:en||hp(5,h);break;case 1:var _=h.stateNode;if(h.flags&4&&!en)if(x===null)_.componentDidMount();else{var E=h.elementType===h.type?x.memoizedProps:Es(h.type,x.memoizedProps);_.componentDidUpdate(E,x.memoizedState,_.__reactInternalSnapshotBeforeUpdate)}var O=h.updateQueue;O!==null&>(h,O,_);break;case 3:var I=h.updateQueue;if(I!==null){if(x=null,h.child!==null)switch(h.child.tag){case 5:x=h.child.stateNode;break;case 1:x=h.child.stateNode}GT(h,I,x)}break;case 5:var V=h.stateNode;if(x===null&&h.flags&4){x=V;var J=h.memoizedProps;switch(h.type){case"button":case"input":case"select":case"textarea":J.autoFocus&&x.focus();break;case"img":J.src&&(x.src=J.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(h.memoizedState===null){var le=h.alternate;if(le!==null){var we=le.memoizedState;if(we!==null){var _e=we.dehydrated;_e!==null&&_u(_e)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}en||h.flags&512&&e0(h)}catch(je){lr(h,h.return,je)}}if(h===d){Le=null;break}if(x=h.sibling,x!==null){x.return=h.return,Le=x;break}Le=h.return}}function GE(d){for(;Le!==null;){var h=Le;if(h===d){Le=null;break}var x=h.sibling;if(x!==null){x.return=h.return,Le=x;break}Le=h.return}}function KE(d){for(;Le!==null;){var h=Le;try{switch(h.tag){case 0:case 11:case 15:var x=h.return;try{hp(4,h)}catch(J){lr(h,x,J)}break;case 1:var _=h.stateNode;if(typeof _.componentDidMount=="function"){var E=h.return;try{_.componentDidMount()}catch(J){lr(h,E,J)}}var O=h.return;try{e0(h)}catch(J){lr(h,O,J)}break;case 5:var I=h.return;try{e0(h)}catch(J){lr(h,I,J)}}}catch(J){lr(h,h.return,J)}if(h===d){Le=null;break}var V=h.sibling;if(V!==null){V.return=h.return,Le=V;break}Le=h.return}}var sH=Math.ceil,mp=A.ReactCurrentDispatcher,n0=A.ReactCurrentOwner,os=A.ReactCurrentBatchConfig,kt=0,Dr=null,vr=null,zr=0,zn=0,kc=wi(0),Tr=0,Gu=null,Fo=0,fp=0,s0=0,Ku=null,kn=null,a0=0,Cc=1/0,Fa=null,pp=!1,i0=null,Ai=null,xp=!1,Ti=null,gp=0,Yu=0,o0=null,yp=-1,vp=0;function mn(){return(kt&6)!==0?fr():yp!==-1?yp:yp=fr()}function Ei(d){return(d.mode&1)===0?1:(kt&2)!==0&&zr!==0?zr&-zr:qW.transition!==null?(vp===0&&(vp=qA()),vp):(d=It,d!==0||(d=window.event,d=d===void 0?16:XA(d.type)),d)}function Ms(d,h,x,_){if(50<Yu)throw Yu=0,o0=null,Error(n(185));vu(d,x,_),((kt&2)===0||d!==Dr)&&(d===Dr&&((kt&2)===0&&(fp|=x),Tr===4&&Pi(d,zr)),Cn(d,_),x===1&&kt===0&&(h.mode&1)===0&&(Cc=fr()+500,Gf&&_i()))}function Cn(d,h){var x=d.callbackNode;q9(d,h);var _=Af(d,d===Dr?zr:0);if(_===0)x!==null&&$A(x),d.callbackNode=null,d.callbackPriority=0;else if(h=_&-_,d.callbackPriority!==h){if(x!=null&&$A(x),h===1)d.tag===0?BW(XE.bind(null,d)):IT(XE.bind(null,d)),DW(function(){(kt&6)===0&&_i()}),x=null;else{switch(VA(_)){case 1:x=Bv;break;case 4:x=FA;break;case 16:x=_f;break;case 536870912:x=BA;break;default:x=_f}x=sP(x,YE.bind(null,d))}d.callbackPriority=h,d.callbackNode=x}}function YE(d,h){if(yp=-1,vp=0,(kt&6)!==0)throw Error(n(327));var x=d.callbackNode;if(Ac()&&d.callbackNode!==x)return null;var _=Af(d,d===Dr?zr:0);if(_===0)return null;if((_&30)!==0||(_&d.expiredLanes)!==0||h)h=bp(d,_);else{h=_;var E=kt;kt|=2;var O=QE();(Dr!==d||zr!==h)&&(Fa=null,Cc=fr()+500,qo(d,h));do try{oH();break}catch(V){JE(d,V)}while(!0);Sb(),mp.current=O,kt=E,vr!==null?h=0:(Dr=null,zr=0,h=Tr)}if(h!==0){if(h===2&&(E=qv(d),E!==0&&(_=E,h=l0(d,E))),h===1)throw x=Gu,qo(d,0),Pi(d,_),Cn(d,fr()),x;if(h===6)Pi(d,_);else{if(E=d.current.alternate,(_&30)===0&&!aH(E)&&(h=bp(d,_),h===2&&(O=qv(d),O!==0&&(_=O,h=l0(d,O))),h===1))throw x=Gu,qo(d,0),Pi(d,_),Cn(d,fr()),x;switch(d.finishedWork=E,d.finishedLanes=_,h){case 0:case 1:throw Error(n(345));case 2:Vo(d,kn,Fa);break;case 3:if(Pi(d,_),(_&130023424)===_&&(h=a0+500-fr(),10<h)){if(Af(d,0)!==0)break;if(E=d.suspendedLanes,(E&_)!==_){mn(),d.pingedLanes|=d.suspendedLanes&E;break}d.timeoutHandle=fb(Vo.bind(null,d,kn,Fa),h);break}Vo(d,kn,Fa);break;case 4:if(Pi(d,_),(_&4194240)===_)break;for(h=d.eventTimes,E=-1;0<_;){var I=31-Cs(_);O=1<<I,I=h[I],I>E&&(E=I),_&=~O}if(_=E,_=fr()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*sH(_/1960))-_,10<_){d.timeoutHandle=fb(Vo.bind(null,d,kn,Fa),_);break}Vo(d,kn,Fa);break;case 5:Vo(d,kn,Fa);break;default:throw Error(n(329))}}}return Cn(d,fr()),d.callbackNode===x?YE.bind(null,d):null}function l0(d,h){var x=Ku;return d.current.memoizedState.isDehydrated&&(qo(d,h).flags|=256),d=bp(d,h),d!==2&&(h=kn,kn=x,h!==null&&c0(h)),d}function c0(d){kn===null?kn=d:kn.push.apply(kn,d)}function aH(d){for(var h=d;;){if(h.flags&16384){var x=h.updateQueue;if(x!==null&&(x=x.stores,x!==null))for(var _=0;_<x.length;_++){var E=x[_],O=E.getSnapshot;E=E.value;try{if(!As(O(),E))return!1}catch{return!1}}}if(x=h.child,h.subtreeFlags&16384&&x!==null)x.return=h,h=x;else{if(h===d)break;for(;h.sibling===null;){if(h.return===null||h.return===d)return!0;h=h.return}h.sibling.return=h.return,h=h.sibling}}return!0}function Pi(d,h){for(h&=~s0,h&=~fp,d.suspendedLanes|=h,d.pingedLanes&=~h,d=d.expirationTimes;0<h;){var x=31-Cs(h),_=1<<x;d[x]=-1,h&=~_}}function XE(d){if((kt&6)!==0)throw Error(n(327));Ac();var h=Af(d,0);if((h&1)===0)return Cn(d,fr()),null;var x=bp(d,h);if(d.tag!==0&&x===2){var _=qv(d);_!==0&&(h=_,x=l0(d,_))}if(x===1)throw x=Gu,qo(d,0),Pi(d,h),Cn(d,fr()),x;if(x===6)throw Error(n(345));return d.finishedWork=d.current.alternate,d.finishedLanes=h,Vo(d,kn,Fa),Cn(d,fr()),null}function d0(d,h){var x=kt;kt|=1;try{return d(h)}finally{kt=x,kt===0&&(Cc=fr()+500,Gf&&_i())}}function Bo(d){Ti!==null&&Ti.tag===0&&(kt&6)===0&&Ac();var h=kt;kt|=1;var x=os.transition,_=It;try{if(os.transition=null,It=1,d)return d()}finally{It=_,os.transition=x,kt=h,(kt&6)===0&&_i()}}function u0(){zn=kc.current,Yt(kc)}function qo(d,h){d.finishedWork=null,d.finishedLanes=0;var x=d.timeoutHandle;if(x!==-1&&(d.timeoutHandle=-1,IW(x)),vr!==null)for(x=vr.return;x!==null;){var _=x;switch(bb(_),_.tag){case 1:_=_.type.childContextTypes,_!=null&&Wf();break;case 3:Nc(),Yt(Nn),Yt(Jr),Mb();break;case 5:Pb(_);break;case 4:Nc();break;case 13:Yt(nr);break;case 19:Yt(nr);break;case 10:kb(_.type._context);break;case 22:case 23:u0()}x=x.return}if(Dr=d,vr=d=Oi(d.current,null),zr=zn=h,Tr=0,Gu=null,s0=fp=Fo=0,kn=Ku=null,Do!==null){for(h=0;h<Do.length;h++)if(x=Do[h],_=x.interleaved,_!==null){x.interleaved=null;var E=_.next,O=x.pending;if(O!==null){var I=O.next;O.next=E,_.next=I}x.pending=_}Do=null}return d}function JE(d,h){do{var x=vr;try{if(Sb(),np.current=op,sp){for(var _=sr.memoizedState;_!==null;){var E=_.queue;E!==null&&(E.pending=null),_=_.next}sp=!1}if($o=0,Ir=Ar=sr=null,qu=!1,Vu=0,n0.current=null,x===null||x.return===null){Tr=1,Gu=h,vr=null;break}e:{var O=d,I=x.return,V=x,J=h;if(h=zr,V.flags|=32768,J!==null&&typeof J=="object"&&typeof J.then=="function"){var le=J,we=V,_e=we.tag;if((we.mode&1)===0&&(_e===0||_e===11||_e===15)){var je=we.alternate;je?(we.updateQueue=je.updateQueue,we.memoizedState=je.memoizedState,we.lanes=je.lanes):(we.updateQueue=null,we.memoizedState=null)}var Ie=wE(I);if(Ie!==null){Ie.flags&=-257,NE(Ie,I,V,O,h),Ie.mode&1&&jE(O,le,h),h=Ie,J=le;var Fe=h.updateQueue;if(Fe===null){var Ve=new Set;Ve.add(J),h.updateQueue=Ve}else Fe.add(J);break e}else{if((h&1)===0){jE(O,le,h),h0();break e}J=Error(n(426))}}else if(Zt&&V.mode&1){var pr=wE(I);if(pr!==null){(pr.flags&65536)===0&&(pr.flags|=256),NE(pr,I,V,O,h),Nb(_c(J,V));break e}}O=J=_c(J,V),Tr!==4&&(Tr=2),Ku===null?Ku=[O]:Ku.push(O),O=I;do{switch(O.tag){case 3:O.flags|=65536,h&=-h,O.lanes|=h;var ne=vE(O,J,h);HT(O,ne);break e;case 1:V=J;var ee=O.type,ae=O.stateNode;if((O.flags&128)===0&&(typeof ee.getDerivedStateFromError=="function"||ae!==null&&typeof ae.componentDidCatch=="function"&&(Ai===null||!Ai.has(ae)))){O.flags|=65536,h&=-h,O.lanes|=h;var Ce=bE(O,V,h);HT(O,Ce);break e}}O=O.return}while(O!==null)}eP(x)}catch(Ue){h=Ue,vr===x&&x!==null&&(vr=x=x.return);continue}break}while(!0)}function QE(){var d=mp.current;return mp.current=op,d===null?op:d}function h0(){(Tr===0||Tr===3||Tr===2)&&(Tr=4),Dr===null||(Fo&268435455)===0&&(fp&268435455)===0||Pi(Dr,zr)}function bp(d,h){var x=kt;kt|=2;var _=QE();(Dr!==d||zr!==h)&&(Fa=null,qo(d,h));do try{iH();break}catch(E){JE(d,E)}while(!0);if(Sb(),kt=x,mp.current=_,vr!==null)throw Error(n(261));return Dr=null,zr=0,Tr}function iH(){for(;vr!==null;)ZE(vr)}function oH(){for(;vr!==null&&!O9();)ZE(vr)}function ZE(d){var h=nP(d.alternate,d,zn);d.memoizedProps=d.pendingProps,h===null?eP(d):vr=h,n0.current=null}function eP(d){var h=d;do{var x=h.alternate;if(d=h.return,(h.flags&32768)===0){if(x=ZW(x,h,zn),x!==null){vr=x;return}}else{if(x=eH(x,h),x!==null){x.flags&=32767,vr=x;return}if(d!==null)d.flags|=32768,d.subtreeFlags=0,d.deletions=null;else{Tr=6,vr=null;return}}if(h=h.sibling,h!==null){vr=h;return}vr=h=d}while(h!==null);Tr===0&&(Tr=5)}function Vo(d,h,x){var _=It,E=os.transition;try{os.transition=null,It=1,lH(d,h,x,_)}finally{os.transition=E,It=_}return null}function lH(d,h,x,_){do Ac();while(Ti!==null);if((kt&6)!==0)throw Error(n(327));x=d.finishedWork;var E=d.finishedLanes;if(x===null)return null;if(d.finishedWork=null,d.finishedLanes=0,x===d.current)throw Error(n(177));d.callbackNode=null,d.callbackPriority=0;var O=x.lanes|x.childLanes;if(V9(d,O),d===Dr&&(vr=Dr=null,zr=0),(x.subtreeFlags&2064)===0&&(x.flags&2064)===0||xp||(xp=!0,sP(_f,function(){return Ac(),null})),O=(x.flags&15990)!==0,(x.subtreeFlags&15990)!==0||O){O=os.transition,os.transition=null;var I=It;It=1;var V=kt;kt|=4,n0.current=null,rH(d,x),zE(x,d),AW(hb),Pf=!!ub,hb=ub=null,d.current=x,nH(x),M9(),kt=V,It=I,os.transition=O}else d.current=x;if(xp&&(xp=!1,Ti=d,gp=E),O=d.pendingLanes,O===0&&(Ai=null),D9(x.stateNode),Cn(d,fr()),h!==null)for(_=d.onRecoverableError,x=0;x<h.length;x++)E=h[x],_(E.value,{componentStack:E.stack,digest:E.digest});if(pp)throw pp=!1,d=i0,i0=null,d;return(gp&1)!==0&&d.tag!==0&&Ac(),O=d.pendingLanes,(O&1)!==0?d===o0?Yu++:(Yu=0,o0=d):Yu=0,_i(),null}function Ac(){if(Ti!==null){var d=VA(gp),h=os.transition,x=It;try{if(os.transition=null,It=16>d?16:d,Ti===null)var _=!1;else{if(d=Ti,Ti=null,gp=0,(kt&6)!==0)throw Error(n(331));var E=kt;
vendor: 5,819 bytes, line 40
40for(kt|=4,Le=d.current;Le!==null;){var O=Le,I=O.child;if((Le.flags&16)!==0){var V=O.deletions;if(V!==null){for(var J=0;J<V.length;J++){var le=V[J];for(Le=le;Le!==null;){var we=Le;switch(we.tag){case 0:case 11:case 15:Hu(8,we,O)}var _e=we.child;if(_e!==null)_e.return=we,Le=_e;else for(;Le!==null;){we=Le;var je=we.sibling,Ie=we.return;if(FE(we),we===le){Le=null;break}if(je!==null){je.return=Ie,Le=je;break}Le=Ie}}}var Fe=O.alternate;if(Fe!==null){var Ve=Fe.child;if(Ve!==null){Fe.child=null;do{var pr=Ve.sibling;Ve.sibling=null,Ve=pr}while(Ve!==null)}}Le=O}}if((O.subtreeFlags&2064)!==0&&I!==null)I.return=O,Le=I;else e:for(;Le!==null;){if(O=Le,(O.flags&2048)!==0)switch(O.tag){case 0:case 11:case 15:Hu(9,O,O.return)}var ne=O.sibling;if(ne!==null){ne.return=O.return,Le=ne;break e}Le=O.return}}var ee=d.current;for(Le=ee;Le!==null;){I=Le;var ae=I.child;if((I.subtreeFlags&2064)!==0&&ae!==null)ae.return=I,Le=ae;else e:for(I=ee;Le!==null;){if(V=Le,(V.flags&2048)!==0)try{switch(V.tag){case 0:case 11:case 15:hp(9,V)}}catch(Ue){lr(V,V.return,Ue)}if(V===I){Le=null;break e}var Ce=V.sibling;if(Ce!==null){Ce.return=V.return,Le=Ce;break e}Le=V.return}}if(kt=E,_i(),Qs&&typeof Qs.onPostCommitFiberRoot=="function")try{Qs.onPostCommitFiberRoot(Sf,d)}catch{}_=!0}return _}finally{It=x,os.transition=h}}return!1}function tP(d,h,x){h=_c(x,h),h=vE(d,h,1),d=ki(d,h,1),h=mn(),d!==null&&(vu(d,1,h),Cn(d,h))}function lr(d,h,x){if(d.tag===3)tP(d,d,x);else for(;h!==null;){if(h.tag===3){tP(h,d,x);break}else if(h.tag===1){var _=h.stateNode;if(typeof h.type.getDerivedStateFromError=="function"||typeof _.componentDidCatch=="function"&&(Ai===null||!Ai.has(_))){d=_c(x,d),d=bE(h,d,1),h=ki(h,d,1),d=mn(),h!==null&&(vu(h,1,d),Cn(h,d));break}}h=h.return}}function cH(d,h,x){var _=d.pingCache;_!==null&&_.delete(h),h=mn(),d.pingedLanes|=d.suspendedLanes&x,Dr===d&&(zr&x)===x&&(Tr===4||Tr===3&&(zr&130023424)===zr&&500>fr()-a0?qo(d,0):s0|=x),Cn(d,h)}function rP(d,h){h===0&&((d.mode&1)===0?h=1:(h=Cf,Cf<<=1,(Cf&130023424)===0&&(Cf=4194304)));var x=mn();d=Da(d,h),d!==null&&(vu(d,h,x),Cn(d,x))}function dH(d){var h=d.memoizedState,x=0;h!==null&&(x=h.retryLane),rP(d,x)}function uH(d,h){var x=0;switch(d.tag){case 13:var _=d.stateNode,E=d.memoizedState;E!==null&&(x=E.retryLane);break;case 19:_=d.stateNode;break;default:throw Error(n(314))}_!==null&&_.delete(h),rP(d,x)}var nP;nP=function(d,h,x){if(d!==null)if(d.memoizedProps!==h.pendingProps||Nn.current)Sn=!0;else{if((d.lanes&x)===0&&(h.flags&128)===0)return Sn=!1,QW(d,h,x);Sn=(d.flags&131072)!==0}else Sn=!1,Zt&&(h.flags&1048576)!==0&&DT(h,Yf,h.index);switch(h.lanes=0,h.tag){case 2:var _=h.type;dp(d,h),d=h.pendingProps;var E=xc(h,Jr.current);wc(h,x),E=Db(null,h,_,d,E,x);var O=Lb();return h.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(h.tag=1,h.memoizedState=null,h.updateQueue=null,_n(_)?(O=!0,Hf(h)):O=!1,h.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Tb(h),E.updater=lp,h.stateNode=E,E._reactInternals=h,Ub(h,_,d,x),h=Gb(null,h,_,!0,O,x)):(h.tag=0,Zt&&O&&vb(h),hn(null,h,E,x),h=h.child),h;case 16:_=h.elementType;e:{switch(dp(d,h),d=h.pendingProps,E=_._init,_=E(_._payload),h.type=_,E=h.tag=mH(_),d=Es(_,d),E){case 0:h=Hb(null,h,_,d,x);break e;case 1:h=TE(null,h,_,d,x);break e;case 11:h=_E(null,h,_,d,x);break e;case 14:h=SE(null,h,_,Es(_.type,d),x);break e}throw Error(n(306,_,""))}return h;case 0:return _=h.type,E=h.pendingProps,E=h.elementType===_?E:Es(_,E),Hb(d,h,_,E,x);case 1:return _=h.type,E=h.pendingProps,E=h.elementType===_?E:Es(_,E),TE(d,h,_,E,x);case 3:e:{if(EE(h),d===null)throw Error(n(387));_=h.pendingProps,O=h.memoizedState,E=O.element,WT(d,h),tp(h,_,null,x);var I=h.memoizedState;if(_=I.element,O.isDehydrated)if(O={element:_,isDehydrated:!1,cache:I.cache,pendingSuspenseBoundaries:I.pendingSuspenseBoundaries,transitions:I.transitions},h.updateQueue.baseState=O,h.memoizedState=O,h.flags&256){E=_c(Error(n(423)),h),h=PE(d,h,_,x,E);break e}else if(_!==E){E=_c(Error(n(424)),h),h=PE(d,h,_,x,E);break e}else for(Un=ji(h.stateNode.containerInfo.firstChild),Vn=h,Zt=!0,Ts=null,x=UT(h,null,_,x),h.child=x;x;)x.flags=x.flags&-3|4096,x=x.sibling;else{if(vc(),_===E){h=$a(d,h,x);break e}hn(d,h,_,x)}h=h.child}return h;case 5:return KT(h),d===null&&wb(h),_=h.type,E=h.pendingProps,O=d!==null?d.memoizedProps:null,I=E.children,mb(_,E)?I=null:O!==null&&mb(_,O)&&(h.flags|=32),AE(d,h),hn(d,h,I,x),h.child;case 6:return d===null&&wb(h),null;case 13:return OE(d,h,x);case 4:return Eb(h,h.stateNode.containerInfo),_=h.pendingProps,d===null?h.child=bc(h,null,_,x):hn(d,h,_,x),h.child;case 11:return _=h.type,E=h.pendingProps,E=h.elementType===_?E:Es(_,E),_E(d,h,_,E,x);case 7:return hn(d,h,h.pendingProps,x),h.child;case 8:return hn(d,h,h.pendingProps.children,x),h.child;case 12:return hn(d,h,h.pendingProps.children,x),h.child;case 10:e:{if(_=h.type._context,E=h.pendingProps,O=h.memoizedProps,I=E.value,Ut(Qf,_._currentValue),_._currentValue=I,O!==null)if(As(O.value,I)){if(O.children===E.children&&!Nn.current){h=$a(d,h,x);break e}}else for(O=h.child,O!==null&&(O.return=h);O!==null;){var V=O.dependencies;if(V!==null){I=O.child;for(var J=V.firstContext;J!==null;){if(J.context===_){if(O.tag===1){J=La(-1,x&-x),J.tag=2;var le=O.updateQueue;if(le!==null){le=le.shared;var we=le.pending;we===null?J.next=J:(J.next=we.next,we.next=J),le.pending=J}}O.lanes|=x,J=O.alternate,J!==null&&(J.lanes|=x),Cb(O.return,x,h),V.lanes|=x;break}J=J.next}}else if(O.tag===10)I=O.type===h.type?null:O.child;else if(O.tag===18){if(I=O.return,I===null)throw Error(n(341));I.lanes|=x,V=I.alternate,V!==null&&(V.lanes|=x),Cb(I,x,h),I=O.sibling}else I=O.child;if(I!==null)I.return=O;else for(I=O;I!==null;){if(I===h){I=null;break}if(O=I.sibling,O!==null){O.return=I.return,I=O;break}I=I.return}O=I}hn(d,h,E.children,x),h=h.child}return h;
vendor: 9,559 bytes, line 40
40case 9:return E=h.type,_=h.pendingProps.children,wc(h,x),E=as(E),_=_(E),h.flags|=1,hn(d,h,_,x),h.child;case 14:return _=h.type,E=Es(_,h.pendingProps),E=Es(_.type,E),SE(d,h,_,E,x);case 15:return kE(d,h,h.type,h.pendingProps,x);case 17:return _=h.type,E=h.pendingProps,E=h.elementType===_?E:Es(_,E),dp(d,h),h.tag=1,_n(_)?(d=!0,Hf(h)):d=!1,wc(h,x),gE(h,_,E),Ub(h,_,E,x),Gb(null,h,_,!0,d,x);case 19:return RE(d,h,x);case 22:return CE(d,h,x)}throw Error(n(156,h.tag))};function sP(d,h){return LA(d,h)}function hH(d,h,x,_){this.tag=d,this.key=x,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=h,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ls(d,h,x,_){return new hH(d,h,x,_)}function m0(d){return d=d.prototype,!(!d||!d.isReactComponent)}function mH(d){if(typeof d=="function")return m0(d)?1:0;if(d!=null){if(d=d.$$typeof,d===$)return 11;if(d===L)return 14}return 2}function Oi(d,h){var x=d.alternate;return x===null?(x=ls(d.tag,h,d.key,d.mode),x.elementType=d.elementType,x.type=d.type,x.stateNode=d.stateNode,x.alternate=d,d.alternate=x):(x.pendingProps=h,x.type=d.type,x.flags=0,x.subtreeFlags=0,x.deletions=null),x.flags=d.flags&14680064,x.childLanes=d.childLanes,x.lanes=d.lanes,x.child=d.child,x.memoizedProps=d.memoizedProps,x.memoizedState=d.memoizedState,x.updateQueue=d.updateQueue,h=d.dependencies,x.dependencies=h===null?null:{lanes:h.lanes,firstContext:h.firstContext},x.sibling=d.sibling,x.index=d.index,x.ref=d.ref,x}function jp(d,h,x,_,E,O){var I=2;if(_=d,typeof d=="function")m0(d)&&(I=1);else if(typeof d=="string")I=5;else e:switch(d){case T:return Uo(x.children,E,O,h);case P:I=8,E|=8;break;case R:return d=ls(12,x,h,E|2),d.elementType=R,d.lanes=O,d;case q:return d=ls(13,x,h,E),d.elementType=q,d.lanes=O,d;case H:return d=ls(19,x,h,E),d.elementType=H,d.lanes=O,d;case Y:return wp(x,E,O,h);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case M:I=10;break e;case D:I=9;break e;case $:I=11;break e;case L:I=14;break e;case F:I=16,_=null;break e}throw Error(n(130,d==null?d:typeof d,""))}return h=ls(I,x,h,E),h.elementType=d,h.type=_,h.lanes=O,h}function Uo(d,h,x,_){return d=ls(7,d,_,h),d.lanes=x,d}function wp(d,h,x,_){return d=ls(22,d,_,h),d.elementType=Y,d.lanes=x,d.stateNode={isHidden:!1},d}function f0(d,h,x){return d=ls(6,d,null,h),d.lanes=x,d}function p0(d,h,x){return h=ls(4,d.children!==null?d.children:[],d.key,h),h.lanes=x,h.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},h}function fH(d,h,x,_,E){this.tag=h,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Vv(0),this.expirationTimes=Vv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vv(0),this.identifierPrefix=_,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function x0(d,h,x,_,E,O,I,V,J){return d=new fH(d,h,x,V,J),h===1?(h=1,O===!0&&(h|=8)):h=0,O=ls(3,null,null,h),d.current=O,O.stateNode=d,O.memoizedState={element:_,isDehydrated:x,cache:null,transitions:null,pendingSuspenseBoundaries:null},Tb(O),d}function pH(d,h,x){var _=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:C,key:_==null?null:""+_,children:d,containerInfo:h,implementation:x}}function aP(d){if(!d)return Ni;d=d._reactInternals;e:{if(Po(d)!==d||d.tag!==1)throw Error(n(170));var h=d;do{switch(h.tag){case 3:h=h.stateNode.context;break e;case 1:if(_n(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break e}}h=h.return}while(h!==null);throw Error(n(171))}if(d.tag===1){var x=d.type;if(_n(x))return MT(d,x,h)}return h}function iP(d,h,x,_,E,O,I,V,J){return d=x0(x,_,!0,d,E,O,I,V,J),d.context=aP(null),x=d.current,_=mn(),E=Ei(x),O=La(_,E),O.callback=h??null,ki(x,O,E),d.current.lanes=E,vu(d,E,_),Cn(d,_),d}function Np(d,h,x,_){var E=h.current,O=mn(),I=Ei(E);return x=aP(x),h.context===null?h.context=x:h.pendingContext=x,h=La(O,I),h.payload={element:d},_=_===void 0?null:_,_!==null&&(h.callback=_),d=ki(E,h,I),d!==null&&(Ms(d,E,I,O),ep(d,E,I)),I}function _p(d){if(d=d.current,!d.child)return null;switch(d.child.tag){case 5:return d.child.stateNode;default:return d.child.stateNode}}function oP(d,h){if(d=d.memoizedState,d!==null&&d.dehydrated!==null){var x=d.retryLane;d.retryLane=x!==0&&x<h?x:h}}function g0(d,h){oP(d,h),(d=d.alternate)&&oP(d,h)}function xH(){return null}var lP=typeof reportError=="function"?reportError:function(d){console.error(d)};function y0(d){this._internalRoot=d}Sp.prototype.render=y0.prototype.render=function(d){var h=this._internalRoot;if(h===null)throw Error(n(409));Np(d,h,null,null)},Sp.prototype.unmount=y0.prototype.unmount=function(){var d=this._internalRoot;if(d!==null){this._internalRoot=null;var h=d.containerInfo;Bo(function(){Np(null,d,null,null)}),h[Oa]=null}};function Sp(d){this._internalRoot=d}Sp.prototype.unstable_scheduleHydration=function(d){if(d){var h=WA();d={blockedOn:null,target:d,priority:h};for(var x=0;x<yi.length&&h!==0&&h<yi[x].priority;x++);yi.splice(x,0,d),x===0&&KA(d)}};function v0(d){return!(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)}function kp(d){return!(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11&&(d.nodeType!==8||d.nodeValue!==" react-mount-point-unstable "))}function cP(){}function gH(d,h,x,_,E){if(E){if(typeof _=="function"){var O=_;_=function(){var le=_p(I);O.call(le)}}var I=iP(h,_,d,0,null,!1,!1,"",cP);return d._reactRootContainer=I,d[Oa]=I.current,Mu(d.nodeType===8?d.parentNode:d),Bo(),I}for(;E=d.lastChild;)d.removeChild(E);if(typeof _=="function"){var V=_;_=function(){var le=_p(J);V.call(le)}}var J=x0(d,0,!1,null,null,!1,!1,"",cP);return d._reactRootContainer=J,d[Oa]=J.current,Mu(d.nodeType===8?d.parentNode:d),Bo(function(){Np(h,J,x,_)}),J}function Cp(d,h,x,_,E){var O=x._reactRootContainer;if(O){var I=O;if(typeof E=="function"){var V=E;E=function(){var J=_p(I);V.call(J)}}Np(h,I,d,E)}else I=gH(x,h,d,E,_);return _p(I)}UA=function(d){switch(d.tag){case 3:var h=d.stateNode;if(h.current.memoizedState.isDehydrated){var x=yu(h.pendingLanes);x!==0&&(Uv(h,x|1),Cn(h,fr()),(kt&6)===0&&(Cc=fr()+500,_i()))}break;case 13:Bo(function(){var _=Da(d,1);if(_!==null){var E=mn();Ms(_,d,1,E)}}),g0(d,1)}},zv=function(d){if(d.tag===13){var h=Da(d,134217728);if(h!==null){var x=mn();Ms(h,d,134217728,x)}g0(d,134217728)}},zA=function(d){if(d.tag===13){var h=Ei(d),x=Da(d,h);if(x!==null){var _=mn();Ms(x,d,h,_)}g0(d,h)}},WA=function(){return It},HA=function(d,h){var x=It;try{return It=d,h()}finally{It=x}},Dv=function(d,h,x){switch(h){case"input":if(ze(d,x),h=x.name,x.type==="radio"&&h!=null){for(x=d;x.parentNode;)x=x.parentNode;for(x=x.querySelectorAll("input[name="+JSON.stringify(""+h)+'][type="radio"]'),h=0;h<x.length;h++){var _=x[h];if(_!==d&&_.form===d.form){var E=zf(_);if(!E)throw Error(n(90));te(_),ze(_,E)}}}break;case"textarea":mr(d,x);break;case"select":h=x.value,h!=null&&ot(d,!!x.multiple,h,!1)}},EA=d0,PA=Bo;var yH={usingClientEntryPoint:!1,Events:[Du,fc,zf,AA,TA,d0]},Xu={findFiberByHostInstance:Oo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},vH={bundleType:Xu.bundleType,version:Xu.version,rendererPackageName:Xu.rendererPackageName,rendererConfig:Xu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:A.ReactCurrentDispatcher,findHostInstanceByFiber:function(d){return d=IA(d),d===null?null:d.stateNode},findFiberByHostInstance:Xu.findFiberByHostInstance||xH,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ap=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ap.isDisabled&&Ap.supportsFiber)try{Sf=Ap.inject(vH),Qs=Ap}catch{}}return An.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yH,An.createPortal=function(d,h){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!v0(h))throw Error(n(200));return pH(d,h,null,x)},An.createRoot=function(d,h){if(!v0(d))throw Error(n(299));var x=!1,_="",E=lP;return h!=null&&(h.unstable_strictMode===!0&&(x=!0),h.identifierPrefix!==void 0&&(_=h.identifierPrefix),h.onRecoverableError!==void 0&&(E=h.onRecoverableError)),h=x0(d,1,!1,null,null,x,!1,_,E),d[Oa]=h.current,Mu(d.nodeType===8?d.parentNode:d),new y0(h)},An.findDOMNode=function(d){if(d==null)return null;if(d.nodeType===1)return d;var h=d._reactInternals;if(h===void 0)throw typeof d.render=="function"?Error(n(188)):(d=Object.keys(d).join(","),Error(n(268,d)));return d=IA(h),d=d===null?null:d.stateNode,d},An.flushSync=function(d){return Bo(d)},An.hydrate=function(d,h,x){if(!kp(h))throw Error(n(200));return Cp(null,d,h,!0,x)},An.hydrateRoot=function(d,h,x){if(!v0(d))throw Error(n(405));var _=x!=null&&x.hydratedSources||null,E=!1,O="",I=lP;if(x!=null&&(x.unstable_strictMode===!0&&(E=!0),x.identifierPrefix!==void 0&&(O=x.identifierPrefix),x.onRecoverableError!==void 0&&(I=x.onRecoverableError)),h=iP(h,null,d,1,x??null,E,!1,O,I),d[Oa]=h.current,Mu(d),_)for(
40d=0;d<_.length;d++)x=_[d],E=x._getVersion,E=E(x._source),h.mutableSourceEagerHydrationData==null?h.mutableSourceEagerHydrationData=[x,E]:h.mutableSourceEagerHydrationData.push(x,E);return new Sp(h)},An.render=function(d,h,x){if(!kp(h))throw Error(n(200));return Cp(null,d,h,!1,x)},An.unmountComponentAtNode=function(d){if(!kp(d))throw Error(n(40));return d._reactRootContainer?(Bo(function(){Cp(null,null,d,!1,function(){d._reactRootContainer=null,d[Oa]=null})}),!0):!1},An.unstable_batchedUpdates=d0,An.unstable_renderSubtreeIntoContainer=function(d,h,x,_){if(!kp(x))throw Error(n(200));if(d==null||d._reactInternals===void 0)throw Error(n(38));return Cp(d,h,x,!1,_)},An.version="18.3.1-next-f1338f8080-20240426",An}var yP;function HL(){if(yP)return N0.exports;yP=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),N0.exports=TH(),N0.exports}var vP;function EH(){if(vP)return Pp;vP=1;var e=HL();return Pp.createRoot=e.createRoot,Pp.hydrateRoot=e.hydrateRoot,Pp}var PH=EH();const OH=Et(PH),MH=20,RH=1e6,Ga={ADD_TOAST:"ADD_TOAST",UPDATE_TOAST:"UPDATE_TOAST",DISMISS_TOAST:"DISMISS_TOAST",REMOVE_TOAST:"REMOVE_TOAST"};let k0=0;function IH(){return k0=(k0+1)%Number.MAX_VALUE,k0.toString()}const C0=new Map,bP=e=>{if(C0.has(e))return;const t=setTimeout(()=>{C0.delete(e),Rh({type:Ga.REMOVE_TOAST,toastId:e})},RH);C0.set(e,t)},DH=(e,t)=>{switch(t.type){case Ga.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,MH)};case Ga.UPDATE_TOAST:return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case Ga.DISMISS_TOAST:{const{toastId:n}=t;return n?bP(n):e.toasts.forEach(s=>{bP(s.id)}),{...e,toasts:e.toasts.map(s=>s.id===n||n===void 0?{...s,open:!1}:s)}}case Ga.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},xx=[];let gx={toasts:[]};function Rh(e){gx=DH(gx,e),xx.forEach(t=>{t(gx)})}function GL({...e}){const t=IH(),n=a=>Rh({type:Ga.UPDATE_TOAST,toast:{...a,id:t}}),s=()=>Rh({type:Ga.DISMISS_TOAST,toastId:t});return Rh({type:Ga.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:a=>{a||s()}}}),{id:t,dismiss:s,update:n}}function tk(){const[e,t]=j.useState(gx);return j.useEffect(()=>(xx.push(t),()=>{const n=xx.indexOf(t);n>-1&&xx.splice(n,1)}),[e]),{...e,toast:GL,dismiss:n=>Rh({type:Ga.DISMISS_TOAST,toastId:n})}}function KL(e){var t,n,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=KL(e[t]))&&(s&&(s+=" "),s+=n)}else for(n in e)e[n]&&(s&&(s+=" "),s+=n);return s}function ct(){for(var e,t,n=0,s="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=KL(e))&&(s&&(s+=" "),s+=t);return s}const jP=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,wP=ct,Gm=(e,t)=>n=>{var s;if((t==null?void 0:t.variants)==null)return wP(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,o=Object.keys(a).map(u=>{const m=n==null?void 0:n[u],f=i==null?void 0:i[u];if(m===null)return null;const p=jP(m)||jP(f);return a[u][p]}),l=n&&Object.entries(n).reduce((u,m)=>{let[f,p]=m;return p===void 0||(u[f]=p),u},{}),c=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((u,m)=>{let{class:f,className:p,...b}=m;return Object.entries(b).every(v=>{let[g,y]=v;return Array.isArray(y)?y.includes({...i,...l}[g]):{...i,...l}[g]===y})?[...u,f,p]:u},[]);return wP(e,o,c,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.475.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const LH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),YL=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/** 46 * @license lucide-react v0.475.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var $H={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.475.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const FH=j.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:a="",children:i,iconNode:o,...l},c)=>j.createElement("svg",{ref:c,...$H,width:t,height:t,stroke:e,strokeWidth:s?Number(n)*24/Number(t):n,className:YL("lucide",a),...l},[...o.map(([u,m])=>j.createElement(u,m)),...Array.isArray(i)?i:[i]]));/** 56 * @license lucide-react v0.475.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const ve=(e,t)=>
60{const n=j.forwardRef(({className:s,...a},i)=>j.createElement(FH,{ref:i,iconNode:t,className:YL(`lucide-${LH(e)}`,s),...a}));return n.displayName=`${e}`,n};/** 61 * @license lucide-react v0.475.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const BH=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Ct=ve("ArrowLeft",BH);/** 66 * @license lucide-react v0.475.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const qH=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],_t=ve("ArrowRight",qH);/** 71 * @license lucide-react v0.475.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const VH=[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]],Pn=ve("Award",VH);/** 76 * @license lucide-react v0.475.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const UH=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],Yd=ve("BookOpen",UH);/** 81 * @license lucide-react v0.475.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const zH=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],ga=ve("Bookmark",zH);/** 86 * @license lucide-react v0.475.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const WH=[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]],Km=ve("Building2",WH);/** 91 * @license lucide-react v0.475.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const HH=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]],Jt=ve("Calendar",HH);/** 96 * @license lucide-react v0.475.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const GH=[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],KH=ve("Camera",GH);/** 101 * @license lucide-react v0.475.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const YH=[["path",{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2",key:"5owen"}],["circle",{cx:"7",cy:"17",r:"2",key:"u2ysq9"}],["path",{d:"M9 17h6",key:"r8uit2"}],["circle",{cx:"17",cy:"17",r:"2",key:"axvx0g"}]],XL=ve("Car",YH);/** 106 * @license lucide-react v0.475.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const XH=[["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"}]],ya=ve("ChartColumn",XH);/** 111 * @license lucide-react v0.475.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const JH=[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]],JL=ve("ChartNoAxesColumn",JH);/** 116 * @license lucide-react v0.475.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const QH=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ia=ve("Check",QH);/** 121 * @license lucide-react v0.475.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const ZH=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Sa=ve("ChevronDown",ZH);/** 126 * @license lucide-react v0.475.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const eG=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ym=ve("ChevronLeft",eG);/** 131 * @license lucide-react v0.475.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const tG=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Us=ve("ChevronRight",tG);/** 136 * @license lucide-react v0.475.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const rG=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}
140]],dy=ve("ChevronUp",rG);/** 141 * @license lucide-react v0.475.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const nG=[["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"}]],Ln=ve("CircleAlert",nG);/** 146 * @license lucide-react v0.475.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const sG=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],qt=ve("CircleCheckBig",sG);/** 151 * @license lucide-react v0.475.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const aG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],uy=ve("CircleCheck",aG);/** 156 * @license lucide-react v0.475.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const iG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Cl=ve("CircleX",iG);/** 161 * @license lucide-react v0.475.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const oG=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],lG=ve("ClipboardList",oG);/** 166 * @license lucide-react v0.475.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const cG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]],Vt=ve("Clock",cG);/** 171 * @license lucide-react v0.475.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const dG=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],uG=ve("CodeXml",dG);/** 176 * @license lucide-react v0.475.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const hG=[["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"}]],QL=ve("Copy",hG);/** 181 * @license lucide-react v0.475.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const mG=[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]],fG=ve("CreditCard",mG);/** 186 * @license lucide-react v0.475.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const pG=[["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"}]],Lt=ve("Crown",pG);/** 191 * @license lucide-react v0.475.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const xG=[["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"}]],rk=ve("Database",xG);/** 196 * @license lucide-react v0.475.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const gG=[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]],Ja=ve("Diamond",gG);/** 201 * @license lucide-react v0.475.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const yG=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],$n=ve("DollarSign",yG);/** 206 * @license lucide-react v0.475.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const vG=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],hy=ve("Download",vG);/** 211 * @license lucide-react v0.475.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree.
215 */const bG=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ZL=ve("ExternalLink",bG);/** 216 * @license lucide-react v0.475.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const jG=[["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"}]],Nr=ve("Eye",jG);/** 221 * @license lucide-react v0.475.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const wG=[["path",{d:"M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z",key:"1jg4f8"}]],Mx=ve("Facebook",wG);/** 226 * @license lucide-react v0.475.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const NG=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],_G=ve("FileCode",NG);/** 231 * @license lucide-react v0.475.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const SG=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],kG=ve("FileSpreadsheet",SG);/** 236 * @license lucide-react v0.475.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const CG=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Rn=ve("FileText",CG);/** 241 * @license lucide-react v0.475.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const AG=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],TG=ve("File",AG);/** 246 * @license lucide-react v0.475.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const EG=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],PG=ve("Filter",EG);/** 251 * @license lucide-react v0.475.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree. 255 */const OG=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],e8=ve("Flag",OG);/** 256 * @license lucide-react v0.475.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const MG=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],RG=ve("Flame",MG);/** 261 * @license lucide-react v0.475.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const IG=[["rect",{x:"3",y:"8",width:"18",height:"4",rx:"1",key:"bkv52"}],["path",{d:"M12 8v13",key:"1c76mn"}],["path",{d:"M19 12v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-7",key:"6wjy6b"}],["path",{d:"M7.5 8a2.5 2.5 0 0 1 0-5A4.8 8 0 0 1 12 8a4.8 8 0 0 1 4.5-5 2.5 2.5 0 0 1 0 5",key:"1ihvrl"}]],Rx=ve("Gift",IG);/** 266 * @license lucide-react v0.475.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const DG=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],t8=ve("GitBranch",DG);/** 271 * @license lucide-react v0.475.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const LG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}
275]],Zn=ve("Globe",LG);/** 276 * @license lucide-react v0.475.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const $G=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],FG=ve("Grid3x3",$G);/** 281 * @license lucide-react v0.475.0 - ISC 282 * 283 * This source code is licensed under the ISC license. 284 * See the LICENSE file in the root directory of this source tree. 285 */const BG=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]],On=ve("Heart",BG);/** 286 * @license lucide-react v0.475.0 - ISC 287 * 288 * This source code is licensed under the ISC license. 289 * See the LICENSE file in the root directory of this source tree. 290 */const qG=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"1d0kgt"}]],NP=ve("House",qG);/** 291 * @license lucide-react v0.475.0 - ISC 292 * 293 * This source code is licensed under the ISC license. 294 * See the LICENSE file in the root directory of this source tree. 295 */const VG=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],Xm=ve("Image",VG);/** 296 * @license lucide-react v0.475.0 - ISC 297 * 298 * This source code is licensed under the ISC license. 299 * See the LICENSE file in the root directory of this source tree. 300 */const UG=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],zG=ve("Info",UG);/** 301 * @license lucide-react v0.475.0 - ISC 302 * 303 * This source code is licensed under the ISC license. 304 * See the LICENSE file in the root directory of this source tree. 305 */const WG=[["rect",{width:"20",height:"20",x:"2",y:"2",rx:"5",ry:"5",key:"2e1cvw"}],["path",{d:"M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z",key:"9exkf1"}],["line",{x1:"17.5",x2:"17.51",y1:"6.5",y2:"6.5",key:"r4j83e"}]],uo=ve("Instagram",WG);/** 306 * @license lucide-react v0.475.0 - ISC 307 * 308 * This source code is licensed under the ISC license. 309 * See the LICENSE file in the root directory of this source tree. 310 */const HG=[["path",{d:"M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10Z",key:"nnexq3"}],["path",{d:"M2 21c0-3 1.85-5.36 5.08-6C9.5 14.52 12 13 13 12",key:"mt58a7"}]],A0=ve("Leaf",HG);/** 311 * @license lucide-react v0.475.0 - ISC 312 * 313 * This source code is licensed under the ISC license. 314 * See the LICENSE file in the root directory of this source tree. 315 */const GG=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],KG=ve("Link2",GG);/** 316 * @license lucide-react v0.475.0 - ISC 317 * 318 * This source code is licensed under the ISC license. 319 * See the LICENSE file in the root directory of this source tree. 320 */const YG=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],XG=ve("Link",YG);/** 321 * @license lucide-react v0.475.0 - ISC 322 * 323 * This source code is licensed under the ISC license. 324 * See the LICENSE file in the root directory of this source tree. 325 */const JG=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],r8=ve("List",JG);/** 326 * @license lucide-react v0.475.0 - ISC 327 * 328 * This source code is licensed under the ISC license. 329 * See the LICENSE file in the root directory of this source tree. 330 */const QG=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],va=ve("LoaderCircle",QG);
330/** 331 * @license lucide-react v0.475.0 - ISC 332 * 333 * This source code is licensed under the ISC license. 334 * See the LICENSE file in the root directory of this source tree. 335 */const ZG=[["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"}]],ba=ve("Lock",ZG);/** 336 * @license lucide-react v0.475.0 - ISC 337 * 338 * This source code is licensed under the ISC license. 339 * See the LICENSE file in the root directory of this source tree. 340 */const eK=[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]],tK=ve("LogIn",eK);/** 341 * @license lucide-react v0.475.0 - ISC 342 * 343 * This source code is licensed under the ISC license. 344 * See the LICENSE file in the root directory of this source tree. 345 */const rK=[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]],nK=ve("LogOut",rK);/** 346 * @license lucide-react v0.475.0 - ISC 347 * 348 * This source code is licensed under the ISC license. 349 * See the LICENSE file in the root directory of this source tree. 350 */const sK=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],es=ve("Mail",sK);/** 351 * @license lucide-react v0.475.0 - ISC 352 * 353 * This source code is licensed under the ISC license. 354 * See the LICENSE file in the root directory of this source tree. 355 */const aK=[["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"}]],Ft=ve("MapPin",aK);/** 356 * @license lucide-react v0.475.0 - ISC 357 * 358 * This source code is licensed under the ISC license. 359 * See the LICENSE file in the root directory of this source tree. 360 */const iK=[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]],Ix=ve("Megaphone",iK);/** 361 * @license lucide-react v0.475.0 - ISC 362 * 363 * This source code is licensed under the ISC license. 364 * See the LICENSE file in the root directory of this source tree. 365 */const oK=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],lK=ve("Menu",oK);/** 366 * @license lucide-react v0.475.0 - ISC 367 * 368 * This source code is licensed under the ISC license. 369 * See the LICENSE file in the root directory of this source tree. 370 */const cK=[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]],bs=ve("MessageCircle",cK);/** 371 * @license lucide-react v0.475.0 - ISC 372 * 373 * This source code is licensed under the ISC license. 374 * See the LICENSE file in the root directory of this source tree. 375 */const dK=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],uK=ve("MessageSquare",dK);/** 376 * @license lucide-react v0.475.0 - ISC 377 * 378 * This source code is licensed under the ISC license. 379 * See the LICENSE file in the root directory of this source tree. 380 */const hK=[["path",{d:"M5 12h14",key:"1ays0h"}]],mK=ve("Minus",hK);/** 381 * @license lucide-react v0.475.0 - ISC 382 * 383 * This source code is licensed under the ISC license. 384 * See the LICENSE file in the root directory of this source tree. 385 */const fK=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],pK=ve("Moon",fK);/** 386 * @license lucide-react v0.475.0 - ISC 387 * 388 * This source code is licensed under the ISC license. 389 * See the LICENSE file in the root directory of this source tree. 390 */const xK=[["polygon",{points:"3 11 22 2 13 21 11 13 3 11",key:"1ltx0t"}]],gK=ve("Navigation",xK);/** 391 * @license lucide-react v0.475.0 - ISC 392 * 393 * This source code is licensed under the ISC license. 394 * See the LICENSE file in the root directory of this source tree. 395 */const yK=[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]],n8=ve("Newspaper",yK);/** 396 * @license lucide-react v0.475.0 - ISC 397 * 398 * This source code is licensed under the ISC license. 399 * See the LICENSE file in the root directory of this source tree. 400 */const vK=[["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",key:"12rzf8"}]],bK=ve("Palette",vK);/** 401 * @license lucide-react v0.475.0 - ISC 402 * 403 * This source code is licensed under the ISC license. 404 * See the LICENSE file in the root directory of this source tree. 405 */const jK=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}
405]],Hl=ve("Phone",jK);/** 406 * @license lucide-react v0.475.0 - ISC 407 * 408 * This source code is licensed under the ISC license. 409 * See the LICENSE file in the root directory of this source tree. 410 */const wK=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],Gh=ve("Pin",wK);/** 411 * @license lucide-react v0.475.0 - ISC 412 * 413 * This source code is licensed under the ISC license. 414 * See the LICENSE file in the root directory of this source tree. 415 */const NK=[["path",{d:"M17.8 19.2 16 11l3.5-3.5C21 6 21.5 4 21 3c-1-.5-3 0-4.5 1.5L13 8 4.8 6.2c-.5-.1-.9.1-1.1.5l-.3.5c-.2.5-.1 1 .3 1.3L9 12l-2 3H4l-1 1 3 2 2 3 1-1v-3l3-2 3.5 5.3c.3.4.8.5 1.3.3l.5-.2c.4-.3.6-.7.5-1.2z",key:"1v9wt8"}]],Dx=ve("Plane",NK);/** 416 * @license lucide-react v0.475.0 - ISC 417 * 418 * This source code is licensed under the ISC license. 419 * See the LICENSE file in the root directory of this source tree. 420 */const _K=[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]],SK=ve("Play",_K);/** 421 * @license lucide-react v0.475.0 - ISC 422 * 423 * This source code is licensed under the ISC license. 424 * See the LICENSE file in the root directory of this source tree. 425 */const kK=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],jn=ve("Plus",kK);/** 426 * @license lucide-react v0.475.0 - ISC 427 * 428 * This source code is licensed under the ISC license. 429 * See the LICENSE file in the root directory of this source tree. 430 */const CK=[["rect",{width:"5",height:"5",x:"3",y:"3",rx:"1",key:"1tu5fj"}],["rect",{width:"5",height:"5",x:"16",y:"3",rx:"1",key:"1v8r4q"}],["rect",{width:"5",height:"5",x:"3",y:"16",rx:"1",key:"1x03jg"}],["path",{d:"M21 16h-3a2 2 0 0 0-2 2v3",key:"177gqh"}],["path",{d:"M21 21v.01",key:"ents32"}],["path",{d:"M12 7v3a2 2 0 0 1-2 2H7",key:"8crl2c"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M12 3h.01",key:"n36tog"}],["path",{d:"M12 16v.01",key:"133mhm"}],["path",{d:"M16 12h1",key:"1slzba"}],["path",{d:"M21 12v.01",key:"1lwtk9"}],["path",{d:"M12 21v-1",key:"1880an"}]],AK=ve("QrCode",CK);/** 431 * @license lucide-react v0.475.0 - ISC 432 * 433 * This source code is licensed under the ISC license. 434 * See the LICENSE file in the root directory of this source tree. 435 */const TK=[["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"}]],ja=ve("Quote",TK);/** 436 * @license lucide-react v0.475.0 - ISC 437 * 438 * This source code is licensed under the ISC license. 439 * See the LICENSE file in the root directory of this source tree. 440 */const EK=[["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"}]],ts=ve("RefreshCw",EK);/** 441 * @license lucide-react v0.475.0 - ISC 442 * 443 * This source code is licensed under the ISC license. 444 * See the LICENSE file in the root directory of this source tree. 445 */const PK=[["polyline",{points:"9 17 4 12 9 7",key:"hvgpf2"}],["path",{d:"M20 18v-2a4 4 0 0 0-4-4H4",key:"5vmcpk"}]],OK=ve("Reply",PK);/** 446 * @license lucide-react v0.475.0 - ISC 447 * 448 * This source code is licensed under the ISC license. 449 * See the LICENSE file in the root directory of this source tree. 450 */const MK=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],s8=ve("Rocket",MK);/** 451 * @license lucide-react v0.475.0 - ISC 452 * 453 * This source code is licensed under the ISC license. 454 * See the LICENSE file in the root directory of this source tree. 455 */const RK=[["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"}]],yx=ve("RotateCcw",RK);/** 456 * @license lucide-react v0.475.0 - ISC 457 * 458 * This source code is licensed under the ISC license. 459 * See the LICENSE file in the root directory of this source tree. 460 */const IK=[["path",{d:"M4 11a9 9 0 0 1 9 9",key:"pv89mb"}],["path",{d:"M4 4a16 16 0 0 1 16 16",key:"k0647b"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}
460]],DK=ve("Rss",IK);/** 461 * @license lucide-react v0.475.0 - ISC 462 * 463 * This source code is licensed under the ISC license. 464 * See the LICENSE file in the root directory of this source tree. 465 */const LK=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],a8=ve("Save",LK);/** 466 * @license lucide-react v0.475.0 - ISC 467 * 468 * This source code is licensed under the ISC license. 469 * See the LICENSE file in the root directory of this source tree. 470 */const $K=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],dn=ve("Search",$K);/** 471 * @license lucide-react v0.475.0 - ISC 472 * 473 * This source code is licensed under the ISC license. 474 * See the LICENSE file in the root directory of this source tree. 475 */const FK=[["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"}]],i8=ve("Send",FK);/** 476 * @license lucide-react v0.475.0 - ISC 477 * 478 * This source code is licensed under the ISC license. 479 * See the LICENSE file in the root directory of this source tree. 480 */const BK=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],o8=ve("Settings",BK);/** 481 * @license lucide-react v0.475.0 - ISC 482 * 483 * This source code is licensed under the ISC license. 484 * See the LICENSE file in the root directory of this source tree. 485 */const qK=[["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"}]],ws=ve("Share2",qK);/** 486 * @license lucide-react v0.475.0 - ISC 487 * 488 * This source code is licensed under the ISC license. 489 * See the LICENSE file in the root directory of this source tree. 490 */const VK=[["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"}]],UK=ve("ShieldCheck",VK);/** 491 * @license lucide-react v0.475.0 - ISC 492 * 493 * This source code is licensed under the ISC license. 494 * See the LICENSE file in the root directory of this source tree.
495 */const zK=[["path",{d:"M12 10.189V14",key:"1p8cqu"}],["path",{d:"M12 2v3",key:"qbqxhf"}],["path",{d:"M19 13V7a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v6",key:"qpkstq"}],["path",{d:"M19.38 20A11.6 11.6 0 0 0 21 14l-8.188-3.639a2 2 0 0 0-1.624 0L3 14a11.6 11.6 0 0 0 2.81 7.76",key:"7tigtc"}],["path",{d:"M2 21c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1s1.2 1 2.5 1c2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1",key:"1924j5"}]],l8=ve("Ship",zK);/** 496 * @license lucide-react v0.475.0 - ISC 497 * 498 * This source code is licensed under the ISC license. 499 * See the LICENSE file in the root directory of this source tree. 500 */const WK=[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]],nk=ve("ShoppingBag",WK);/** 501 * @license lucide-react v0.475.0 - ISC 502 * 503 * This source code is licensed under the ISC license. 504 * See the LICENSE file in the root directory of this source tree. 505 */const HK=[["polygon",{points:"5 4 15 12 5 20 5 4",key:"16p6eg"}],["line",{x1:"19",x2:"19",y1:"5",y2:"19",key:"futhcm"}]],Lx=ve("SkipForward",HK);/** 506 * @license lucide-react v0.475.0 - ISC 507 * 508 * This source code is licensed under the ISC license. 509 * See the LICENSE file in the root directory of this source tree. 510 */const GK=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]],ir=ve("Sparkles",GK);/** 511 * @license lucide-react v0.475.0 - ISC 512 * 513 * This source code is licensed under the ISC license. 514 * See the LICENSE file in the root directory of this source tree. 515 */const KK=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],c8=ve("SquarePen",KK);/** 516 * @license lucide-react v0.475.0 - ISC 517 * 518 * This source code is licensed under the ISC license. 519 * See the LICENSE file in the root directory of this source tree. 520 */const YK=[["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"}]],rt=ve("Star",YK);/** 521 * @license lucide-react v0.475.0 - ISC 522 * 523 * This source code is licensed under the ISC license. 524 * See the LICENSE file in the root directory of this source tree. 525 */const XK=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],JK=ve("Sun",XK);/** 526 * @license lucide-react v0.475.0 - ISC 527 * 528 * This source code is licensed under the ISC license. 529 * See the LICENSE file in the root directory of this source tree. 530 */const QK=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],Ih=ve("Tag",QK);/** 531 * @license lucide-react v0.475.0 - ISC 532 * 533 * This source code is licensed under the ISC license. 534 * See the LICENSE file in the root directory of this source tree. 535 */const ZK=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],$x=ve("Target",ZK);/** 536 * @license lucide-react v0.475.0 - ISC 537 * 538 * This source code is licensed under the ISC license. 539 * See the LICENSE file in the root directory of this source tree. 540 */const eY=[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]],Fx=ve("Ticket",eY);/** 541 * @license lucide-react v0.475.0 - ISC 542 * 543 * This source code is licensed under the ISC license. 544 * See the LICENSE file in the root directory of this source tree. 545 */const tY=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
545],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],my=ve("Trash2",tY);/** 546 * @license lucide-react v0.475.0 - ISC 547 * 548 * This source code is licensed under the ISC license. 549 * See the LICENSE file in the root directory of this source tree. 550 */const rY=[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]],Xr=ve("TrendingUp",rY);/** 551 * @license lucide-react v0.475.0 - ISC 552 * 553 * This source code is licensed under the ISC license. 554 * See the LICENSE file in the root directory of this source tree. 555 */const nY=[["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"}]],da=ve("TriangleAlert",nY);/** 556 * @license lucide-react v0.475.0 - ISC 557 * 558 * This source code is licensed under the ISC license. 559 * See the LICENSE file in the root directory of this source tree. 560 */const sY=[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]],sk=ve("Trophy",sY);/** 561 * @license lucide-react v0.475.0 - ISC 562 * 563 * This source code is licensed under the ISC license. 564 * See the LICENSE file in the root directory of this source tree. 565 */const aY=[["path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",key:"pff0z6"}]],gd=ve("Twitter",aY);/** 566 * @license lucide-react v0.475.0 - ISC 567 * 568 * This source code is licensed under the ISC license. 569 * See the LICENSE file in the root directory of this source tree. 570 */const iY=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]],Jm=ve("Upload",iY);/** 571 * @license lucide-react v0.475.0 - ISC 572 * 573 * This source code is licensed under the ISC license. 574 * See the LICENSE file in the root directory of this source tree. 575 */const oY=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],lY=ve("UserPlus",oY);/** 576 * @license lucide-react v0.475.0 - ISC 577 * 578 * This source code is licensed under the ISC license. 579 * See the LICENSE file in the root directory of this source tree. 580 */const cY=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],dY=ve("User",cY);/** 581 * @license lucide-react v0.475.0 - ISC 582 * 583 * This source code is licensed under the ISC license. 584 * See the LICENSE file in the root directory of this source tree. 585 */const uY=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]],vt=ve("Users",uY);/** 586 * @license lucide-react v0.475.0 - ISC 587 * 588 * This source code is licensed under the ISC license. 589 * See the LICENSE file in the root directory of this source tree. 590 */const hY=[["path",{d:"m16 2-2.3 2.3a3 3 0 0 0 0 4.2l1.8 1.8a3 3 0 0 0 4.2 0L22 8",key:"n7qcjb"}],["path",{d:"M15 15 3.3 3.3a4.2 4.2 0 0 0 0 6l7.3 7.3c.7.7 2 .7 2.8 0L15 15Zm0 0 7 7",key:"d0u48b"}],["path",{d:"m2.1 21.8 6.4-6.3",key:"yn04lh"}],["path",{d:"m19 5-7 7",key:"194lzd"}]],eo=ve("UtensilsCrossed",hY);/** 591 * @license lucide-react v0.475.0 - ISC 592 * 593 * This source code is licensed under the ISC license. 594 * See the LICENSE file in the root directory of this source tree. 595 */const mY=[["path",{d:"M3 2v7c0 1.1.9 2 2 2h4a2 2 0 0 0 2-2V2",key:"cjf0a3"}],["path",{d:"M7 2v20",key:"1473qp"}
vendor: 4,094 bytes, lines 595-620
595],["path",{d:"M21 15V2a5 5 0 0 0-5 5v6c0 1.1.9 2 2 2h3Zm0 0v7",key:"j28e5"}]],d8=ve("Utensils",mY);/** 596 * @license lucide-react v0.475.0 - ISC 597 * 598 * This source code is licensed under the ISC license. 599 * See the LICENSE file in the root directory of this source tree. 600 */const fY=[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]],Kh=ve("WandSparkles",fY);/** 601 * @license lucide-react v0.475.0 - ISC 602 * 603 * This source code is licensed under the ISC license. 604 * See the LICENSE file in the root directory of this source tree. 605 */const pY=[["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["polyline",{points:"12 10 12 12 13 13",key:"19dquz"}],["path",{d:"m16.13 7.66-.81-4.05a2 2 0 0 0-2-1.61h-2.68a2 2 0 0 0-2 1.61l-.78 4.05",key:"18k57s"}],["path",{d:"m7.88 16.36.8 4a2 2 0 0 0 2 1.61h2.72a2 2 0 0 0 2-1.61l.81-4.05",key:"16ny36"}]],xY=ve("Watch",pY);/** 606 * @license lucide-react v0.475.0 - ISC 607 * 608 * This source code is licensed under the ISC license. 609 * See the LICENSE file in the root directory of this source tree. 610 */const gY=[["path",{d:"M8 22h8",key:"rmew8v"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M12 15v7",key:"t2xh3l"}],["path",{d:"M12 15a5 5 0 0 0 5-5c0-2-.5-4-2-8H9c-1.5 4-2 6-2 8a5 5 0 0 0 5 5Z",key:"10ffi3"}]],A_=ve("Wine",gY);/** 611 * @license lucide-react v0.475.0 - ISC 612 * 613 * This source code is licensed under the ISC license. 614 * See the LICENSE file in the root directory of this source tree. 615 */const yY=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ni=ve("X",yY);/** 616 * @license lucide-react v0.475.0 - ISC 617 * 618 * This source code is licensed under the ISC license. 619 * See the LICENSE file in the root directory of this source tree. 620 */const vY=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Al=ve("Zap",vY),bY=(e,t)=>{const n=new Array(e.length+t.length);for(let s=0;s<e.length;s++)n[s]=e[s];for(let s=0;s<t.length;s++)n[e.length+s]=t[s];return n},jY=(e,t)=>({classGroupId:e,validator:t}),u8=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Bx="-",_P=[],wY="arbitrary..",NY=e=>{const t=SY(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return _Y(o);const l=o.split(Bx),c=l[0]===""&&l.length>1?1:0;return h8(l,c,t)},getConflictingClassGroupIds:(o,l)=>{if(l){const c=s[o],u=n[o];return c?u?bY(u,c):c:u||_P}return n[o]||_P}}},h8=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const u=h8(e,t+1,i);if(u)return u}const o=n.validators;if(o===null)return;const l=t===0?e.join(Bx):e.slice(t).join(Bx),c=o.length;for(let u=0;u<c;u++){const m=o[u];if(m.validator(l))return m.classGroupId}},_Y=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),s=t.slice(0,n);return s?wY+s:void 0})(),SY=e=>{const{theme:t,classGroups:n}=e;return kY(n,t)},kY=(e,t)=>{const n=u8();for(const s in e){const a=e[s];ak(a,n,s,t)}return n},ak=(e,t,n,s)=>{const a=e.length;for(let i=0;i<a;i++){const o=e[i];CY(o,t,n,s)}},CY=(e,t,n,s)=>{if(typeof e=="string"){AY(e,t,n);return}if(typeof e=="function"){TY(e,t,n,s);return}EY(e,t,n,s)},AY=(e,t,n)=>{const s=e===""?t:m8(t,e);s.classGroupId=n},TY=(e,t,n,s)=>{if(PY(e)){ak(e(s),t,n,s);return}t.validators===null&&(t.validators=[]),t.validators.push(jY(n,e))},EY=(e,t,n,s)=>{const a=Object.entries(e),i=a.length;for(let o=0;o<i;o++){const[l,c]=a[o];ak(c,m8(t,l),n,s)}},m8=(e,t)=>{let n=e;const s=t.split(Bx),a=s.length;for(let i=0;i<a;i++){const o=s[i];let l=n.nextPart.get(o);l||(l=u8(),n.nextPart.set(o,l)),n=l}return n},PY=e=>
vendor: 4,114 bytes, line 620
620"isThemeGetter"in e&&e.isThemeGetter===!0,OY=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),s=Object.create(null);const a=(i,o)=>{n[i]=o,t++,t>e&&(t=0,s=n,n=Object.create(null))};return{get(i){let o=n[i];if(o!==void 0)return o;if((o=s[i])!==void 0)return a(i,o),o},set(i,o){i in n?n[i]=o:a(i,o)}}},T_="!",SP=":",MY=[],kP=(e,t,n,s,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:s,isExternal:a}),RY=e=>{const{prefix:t,experimentalParseClassName:n}=e;let s=a=>{const i=[];let o=0,l=0,c=0,u;const m=a.length;for(let g=0;g<m;g++){const y=a[g];if(o===0&&l===0){if(y===SP){i.push(a.slice(c,g)),c=g+1;continue}if(y==="/"){u=g;continue}}y==="["?o++:y==="]"?o--:y==="("?l++:y===")"&&l--}const f=i.length===0?a:a.slice(c);let p=f,b=!1;f.endsWith(T_)?(p=f.slice(0,-1),b=!0):f.startsWith(T_)&&(p=f.slice(1),b=!0);const v=u&&u>c?u-c:void 0;return kP(i,b,p,v)};if(t){const a=t+SP,i=s;s=o=>o.startsWith(a)?i(o.slice(a.length)):kP(MY,!1,o,void 0,!0)}if(n){const a=s;s=i=>n({className:i,parseClassName:a})}return s},IY=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,s)=>{t.set(n,1e6+s)}),n=>{const s=[];let a=[];for(let i=0;i<n.length;i++){const o=n[i],l=o[0]==="[",c=t.has(o);l||c?(a.length>0&&(a.sort(),s.push(...a),a=[]),s.push(o)):a.push(o)}return a.length>0&&(a.sort(),s.push(...a)),s}},DY=e=>({cache:OY(e.cacheSize),parseClassName:RY(e),sortModifiers:IY(e),...NY(e)}),LY=/\s+/,$Y=(e,t)=>{const{parseClassName:n,getClassGroupId:s,getConflictingClassGroupIds:a,sortModifiers:i}=t,o=[],l=e.trim().split(LY);let c="";for(let u=l.length-1;u>=0;u-=1){const m=l[u],{isExternal:f,modifiers:p,hasImportantModifier:b,baseClassName:v,maybePostfixModifierPosition:g}=n(m);if(f){c=m+(c.length>0?" "+c:c);continue}let y=!!g,w=s(y?v.substring(0,g):v);if(!w){if(!y){c=m+(c.length>0?" "+c:c);continue}if(w=s(v),!w){c=m+(c.length>0?" "+c:c);continue}y=!1}const N=p.length===0?"":p.length===1?p[0]:i(p).join(":"),S=b?N+T_:N,A=S+w;if(o.indexOf(A)>-1)continue;o.push(A);const k=a(w,y);for(let C=0;C<k.length;++C){const T=k[C];o.push(S+T)}c=m+(c.length>0?" "+c:c)}return c},FY=(...e)=>{let t=0,n,s,a="";for(;t<e.length;)(n=e[t++])&&(s=f8(n))&&(a&&(a+=" "),a+=s);return a},f8=e=>{if(typeof e=="string")return e;let t,n="";for(let s=0;s<e.length;s++)e[s]&&(t=f8(e[s]))&&(n&&(n+=" "),n+=t);return n},BY=(e,...t)=>{let n,s,a,i;const o=c=>{const u=t.reduce((m,f)=>f(m),e());return n=DY(u),s=n.cache.get,a=n.cache.set,i=l,l(c)},l=c=>{const u=s(c);if(u)return u;const m=$Y(c,n);return a(c,m),m};return i=o,(...c)=>i(FY(...c))},qY=[],Er=e=>{const t=n=>n[e]||qY;return t.isThemeGetter=!0,t},p8=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,x8=/^\((?:(\w[\w-]*):)?(.+)\)$/i,VY=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,UY=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,zY=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,WY=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HY=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GY=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ri=e=>VY.test(e),dt=e=>!!e&&!Number.isNaN(Number(e)),Ii=e=>!!e&&Number.isInteger(Number(e)),T0=e=>e.endsWith("%")&&dt(e.slice(0,-1)),Ba=e=>UY.test(e),g8=()=>!0,KY=e=>zY.test(e)&&!WY.test(e),ik=()=>!1,YY=e=>HY.test(e),XY=e=>GY.test(e),JY=e=>!Be(e)&&!qe(e),QY=e=>go(e,b8,ik),Be=e=>p8.test(e),zo=e=>go(e,j8,KY),CP=e=>go(e,iX,dt),ZY=e=>go(e,N8,g8),eX=e=>go(e,w8,ik),AP=e=>go(e,y8,ik),tX=e=>go(e,v8,XY),Op=e=>go(e,_8,YY),qe=e=>x8.test(e),Qu=e=>Gl(e,j8),rX=e=>Gl(e,w8),TP=e=>Gl(e,y8),nX=e=>Gl(e,b8),sX=e=>Gl(e,v8),Mp=e=>Gl(e,_8,!0),aX=e=>Gl(e,N8,!0),go=(e,t,n)=>{const s=p8.exec(e);return s?s[1]?t(s[1]):n(s[2]):!1},Gl=(e,t,n=!1)=>{const s=x8.exec(e);return s?s[1]?t(s[1]):n:!1},y8=e=>e==="position"||e==="percentage",v8=e=>e==="image"||e==="url",b8=e=>e==="length"||e==="size"||e==="bg-size",j8=e=>e==="length",iX=e=>e==="number",w8=e=>e==="family-name",N8=e=>e==="number"||e==="weight",_8=e=>e==="shadow",oX=()=>{const e=Er("color"),t=Er("font"),n=Er("text"),s=Er("font-weight"),a=Er("tracking"),i=Er
vendor: 4,322 bytes, line 620
620("leading"),o=Er("breakpoint"),l=Er("container"),c=Er("spacing"),u=Er("radius"),m=Er("shadow"),f=Er("inset-shadow"),p=Er("text-shadow"),b=Er("drop-shadow"),v=Er("blur"),g=Er("perspective"),y=Er("aspect"),w=Er("ease"),N=Er("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],A=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...A(),qe,Be],C=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],P=()=>[qe,Be,c],R=()=>[Ri,"full","auto",...P()],M=()=>[Ii,"none","subgrid",qe,Be],D=()=>["auto",{span:["full",Ii,qe,Be]},Ii,qe,Be],$=()=>[Ii,"auto",qe,Be],q=()=>["auto","min","max","fr",qe,Be],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...P()],Y=()=>[Ri,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...P()],U=()=>[Ri,"screen","full","dvw","lvw","svw","min","max","fit",...P()],re=()=>[Ri,"screen","full","lh","dvh","lvh","svh","min","max","fit",...P()],G=()=>[e,qe,Be],B=()=>[...A(),TP,AP,{position:[qe,Be]}],z=()=>["no-repeat",{repeat:["","x","y","space","round"]}],he=()=>["auto","cover","contain",nX,QY,{size:[qe,Be]}],fe=()=>[T0,Qu,zo],be=()=>["","none","full",u,qe,Be],xe=()=>["",dt,Qu,zo],pe=()=>["solid","dashed","dotted","double"],Ae=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ie=()=>[dt,T0,TP,AP],Ne=()=>["","none",v,qe,Be],Se=()=>["none",dt,qe,Be],te=()=>["none",dt,qe,Be],Oe=()=>[dt,qe,Be],ye=()=>[Ri,"full",...P()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ba],breakpoint:[Ba],color:[g8],container:[Ba],"drop-shadow":[Ba],ease:["in","out","in-out"],font:[JY],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ba],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ba],shadow:[Ba],spacing:["px",dt],text:[Ba],"text-shadow":[Ba],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ri,Be,qe,y]}],container:["container"],columns:[{columns:[dt,Be,qe,l]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:C()}],"overflow-x":[{"overflow-x":C()}],"overflow-y":[{"overflow-y":C()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:R()}],"inset-x":[{"inset-x":R()}],"inset-y":[{"inset-y":R()}],start:[{"inset-s":R(),start:R()}],end:[{"inset-e":R(),end:R()}],"inset-bs":[{"inset-bs":R()}],"inset-be":[{"inset-be":R()}],top:[{top:R()}],right:[{right:R()}],bottom:[{bottom:R()}],left:[{left:R()}],visibility:["visible","invisible","collapse"],z:[{z:[Ii,"auto",qe,Be]}],basis:[{basis:[Ri,"full","auto",l,...P()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dt,Ri,"auto","initial","none",Be]}],grow:[{grow:["",dt,qe,Be]}],shrink:[{shrink:["",dt,qe,Be]}],order:[{order:[Ii,"first","last","none",qe,Be]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":$()}
vendor: 4,199 bytes, line 620
620],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":q()}],"auto-rows":[{"auto-rows":q()}],gap:[{gap:P()}],"gap-x":[{"gap-x":P()}],"gap-y":[{"gap-y":P()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:P()}],px:[{px:P()}],py:[{py:P()}],ps:[{ps:P()}],pe:[{pe:P()}],pbs:[{pbs:P()}],pbe:[{pbe:P()}],pt:[{pt:P()}],pr:[{pr:P()}],pb:[{pb:P()}],pl:[{pl:P()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":P()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":P()}],"space-y-reverse":["space-y-reverse"],size:[{size:Y()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...re()]}],"min-block-size":[{"min-block":["auto",...re()]}],"max-block-size":[{"max-block":["none",...re()]}],w:[{w:[l,"screen",...Y()]}],"min-w":[{"min-w":[l,"screen","none",...Y()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[o]},...Y()]}],h:[{h:["screen","lh",...Y()]}],"min-h":[{"min-h":["screen","lh","none",...Y()]}],"max-h":[{"max-h":["screen","lh",...Y()]}],"font-size":[{text:["base",n,Qu,zo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,aX,ZY]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",T0,Be]}],"font-family":[{font:[rX,eX,t]}],"font-features":[{"font-features":[Be]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,qe,Be]}],"line-clamp":[{"line-clamp":[dt,"none",qe,CP]}],leading:[{leading:[i,...P()]}],"list-image":[{"list-image":["none",qe,Be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",qe,Be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:G()}],"text-color":[{text:G()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pe(),"wavy"]}],"text-decoration-thickness":[{decoration:[dt,"from-font","auto",qe,zo]}],"text-decoration-color":[{decoration:G()}],"underline-offset":[{"underline-offset":[dt,"auto",qe,Be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qe,Be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qe,Be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:z()}],"bg-size":[{bg:he()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ii,qe,Be],radial:["",qe,Be],conic:[Ii,qe,Be]},sX,tX]}],"bg-color":[{bg:G()}],"gradient-from-pos":[{from:fe()}
vendor: 7,403 bytes, line 620
620],"gradient-via-pos":[{via:fe()}],"gradient-to-pos":[{to:fe()}],"gradient-from":[{from:G()}],"gradient-via":[{via:G()}],"gradient-to":[{to:G()}],rounded:[{rounded:be()}],"rounded-s":[{"rounded-s":be()}],"rounded-e":[{"rounded-e":be()}],"rounded-t":[{"rounded-t":be()}],"rounded-r":[{"rounded-r":be()}],"rounded-b":[{"rounded-b":be()}],"rounded-l":[{"rounded-l":be()}],"rounded-ss":[{"rounded-ss":be()}],"rounded-se":[{"rounded-se":be()}],"rounded-ee":[{"rounded-ee":be()}],"rounded-es":[{"rounded-es":be()}],"rounded-tl":[{"rounded-tl":be()}],"rounded-tr":[{"rounded-tr":be()}],"rounded-br":[{"rounded-br":be()}],"rounded-bl":[{"rounded-bl":be()}],"border-w":[{border:xe()}],"border-w-x":[{"border-x":xe()}],"border-w-y":[{"border-y":xe()}],"border-w-s":[{"border-s":xe()}],"border-w-e":[{"border-e":xe()}],"border-w-bs":[{"border-bs":xe()}],"border-w-be":[{"border-be":xe()}],"border-w-t":[{"border-t":xe()}],"border-w-r":[{"border-r":xe()}],"border-w-b":[{"border-b":xe()}],"border-w-l":[{"border-l":xe()}],"divide-x":[{"divide-x":xe()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":xe()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pe(),"hidden","none"]}],"divide-style":[{divide:[...pe(),"hidden","none"]}],"border-color":[{border:G()}],"border-color-x":[{"border-x":G()}],"border-color-y":[{"border-y":G()}],"border-color-s":[{"border-s":G()}],"border-color-e":[{"border-e":G()}],"border-color-bs":[{"border-bs":G()}],"border-color-be":[{"border-be":G()}],"border-color-t":[{"border-t":G()}],"border-color-r":[{"border-r":G()}],"border-color-b":[{"border-b":G()}],"border-color-l":[{"border-l":G()}],"divide-color":[{divide:G()}],"outline-style":[{outline:[...pe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dt,qe,Be]}],"outline-w":[{outline:["",dt,Qu,zo]}],"outline-color":[{outline:G()}],shadow:[{shadow:["","none",m,Mp,Op]}],"shadow-color":[{shadow:G()}],"inset-shadow":[{"inset-shadow":["none",f,Mp,Op]}],"inset-shadow-color":[{"inset-shadow":G()}],"ring-w":[{ring:xe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:G()}],"ring-offset-w":[{"ring-offset":[dt,zo]}],"ring-offset-color":[{"ring-offset":G()}],"inset-ring-w":[{"inset-ring":xe()}],"inset-ring-color":[{"inset-ring":G()}],"text-shadow":[{"text-shadow":["none",p,Mp,Op]}],"text-shadow-color":[{"text-shadow":G()}],opacity:[{opacity:[dt,qe,Be]}],"mix-blend":[{"mix-blend":[...Ae(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ae()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[dt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ie()}],"mask-image-linear-to-pos":[{"mask-linear-to":ie()}],"mask-image-linear-from-color":[{"mask-linear-from":G()}],"mask-image-linear-to-color":[{"mask-linear-to":G()}],"mask-image-t-from-pos":[{"mask-t-from":ie()}],"mask-image-t-to-pos":[{"mask-t-to":ie()}],"mask-image-t-from-color":[{"mask-t-from":G()}],"mask-image-t-to-color":[{"mask-t-to":G()}],"mask-image-r-from-pos":[{"mask-r-from":ie()}],"mask-image-r-to-pos":[{"mask-r-to":ie()}],"mask-image-r-from-color":[{"mask-r-from":G()}],"mask-image-r-to-color":[{"mask-r-to":G()}],"mask-image-b-from-pos":[{"mask-b-from":ie()}],"mask-image-b-to-pos":[{"mask-b-to":ie()}],"mask-image-b-from-color":[{"mask-b-from":G()}],"mask-image-b-to-color":[{"mask-b-to":G()}],"mask-image-l-from-pos":[{"mask-l-from":ie()}],"mask-image-l-to-pos":[{"mask-l-to":ie()}],"mask-image-l-from-color":[{"mask-l-from":G()}],"mask-image-l-to-color":[{"mask-l-to":G()}],"mask-image-x-from-pos":[{"mask-x-from":ie()}],"mask-image-x-to-pos":[{"mask-x-to":ie()}],"mask-image-x-from-color":[{"mask-x-from":G()}],"mask-image-x-to-color":[{"mask-x-to":G()}],"mask-image-y-from-pos":[{"mask-y-from":ie()}],"mask-image-y-to-pos":[{"mask-y-to":ie()}],"mask-image-y-from-color":[{"mask-y-from":G()}],"mask-image-y-to-color":[{"mask-y-to":G()}],"mask-image-radial":[{"mask-radial":[qe,Be]}],"mask-image-radial-from-pos":[{"mask-radial-from":ie()}],"mask-image-radial-to-pos":[{"mask-radial-to":ie()}],"mask-image-radial-from-color":[{"mask-radial-from":G()}],"mask-image-radial-to-color":[{"mask-radial-to":G()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":A()}],"mask-image-conic-pos":[{"mask-conic":[dt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ie()}],"mask-image-conic-to-pos":[{"mask-conic-to":ie()}],"mask-image-conic-from-color":[{"mask-conic-from":G()}],"mask-image-conic-to-color":[{"mask-conic-to":G()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:z()}],"mask-size":[{mask:he()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",qe,Be]}],filter:[{filter:["","none",qe,Be]}],blur:[{blur:Ne()}],brightness:[{brightness:[dt,qe,Be]}],contrast:[{contrast:[dt,qe,Be]}],"drop-shadow":[{"drop-shadow":["","none",b,Mp,Op]}],"drop-shadow-color":[{"drop-shadow":G()}],grayscale:[{grayscale:["",dt,qe,Be]}],"hue-rotate":[{"hue-rotate":[dt,qe,Be]}],invert:[{invert:["",dt,qe,Be]}],saturate:[{saturate:[dt,qe,Be]}],sepia:[{sepia:["",dt,qe,Be]}],"backdrop-filter":[{"backdrop-filter":["","none",qe,Be]}],"backdrop-blur":[{"backdrop-blur":Ne()}],"backdrop-brightness":[{"backdrop-brightness":[dt,qe,Be]}],"backdrop-contrast":[{"backdrop-contrast":[dt,qe,Be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dt,qe,Be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dt,qe,Be]}],"backdrop-invert":[{"backdrop-invert":["",dt,qe,Be]}],"backdrop-opacity":[{"backdrop-opacity":[dt,qe,Be]}],"backdrop-saturate":[{"backdrop-saturate":[dt,qe,Be]}],"backdrop-sepia":[{"backdrop-sepia":["",dt,qe,Be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":P()}],"border-spacing-x":[{"border-spacing-x":P()}],"border-spacing-y":[{"border-spacing-y":P()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",qe,Be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dt,"initial",qe,Be]}],ease:[{ease:["linear","initial",w,qe,Be]}],delay:[{delay:[dt,qe,Be]}],animate:[{animate:["none",N,qe,Be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,qe,Be]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:Se()}],"rotate-x":[{"rotate-x":Se()}],"rotate-y":[{"rotate-y":Se()}],"rotate-z":[{"rotate-z":Se()}],scale:[{scale:te()}],"scale-x":[{"scale-x":te()}],"scale-y":[{"scale-y":te()}],"scale-z":[{"scale-z":te()}],"scale-3d":["scale-3d"],skew:[{skew:Oe()}],"skew-x":[{"skew-x":Oe()}],"skew-y":[{"skew-y":Oe()}],transform:[{transform:[qe,Be,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ye()}],"translate-x":[{"translate-x":ye()}],"translate-y":[{"translate-y":ye()}],"translate-z":[{"translate-z":ye()}],"translate-none":["translate-none"],accent:[{accent:G()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:G()}
vendor: 5,205 bytes, line 620
620],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qe,Be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mbs":[{"scroll-mbs":P()}],"scroll-mbe":[{"scroll-mbe":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pbs":[{"scroll-pbs":P()}],"scroll-pbe":[{"scroll-pbe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qe,Be]}],fill:[{fill:["none",...G()]}],"stroke-w":[{stroke:[dt,Qu,zo,CP]}],stroke:[{stroke:["none",...G()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},lX=BY(oX);function lt(...e){return lX(ct(e))}const S8=j.forwardRef(({...e},t)=>r.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));S8.displayName="ToastProvider";const k8=j.forwardRef(({...e},t)=>r.jsx("div",{ref:t,className:"fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",...e}));
620k8.displayName="ToastViewport";const cX=Gm("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),C8=j.forwardRef(({className:e,variant:t,...n},s)=>r.jsx("div",{ref:s,className:lt(cX({variant:t}),e),...n}));C8.displayName="Toast";const dX=j.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:lt("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));dX.displayName="ToastAction";const A8=j.forwardRef(({className:e,...t},n)=>r.jsx("button",{ref:n,className:lt("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:r.jsx(ni,{className:"h-4 w-4"})}));A8.displayName="ToastClose";const T8=j.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:lt("text-sm font-semibold",e),...t}));T8.displayName="ToastTitle";const E8=j.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:lt("text-sm opacity-90",e),...t}));E8.displayName="ToastDescription";function uX(){const{toasts:e}=tk();return r.jsxs(S8,{children:[e.map(function({id:t,title:n,description:s,action:a,...i}){return r.jsxs(C8,{...i,children:[r.jsxs("div",{className:"grid gap-1",children:[n&&r.jsx(T8,{children:n}),s&&r.jsx(E8,{children:s})]}),a,r.jsx(A8,{})]},t)}),r.jsx(k8,{})]})}var Qm=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},hX={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Hi,Z2,IL,mX=(IL=class{constructor(){Qe(this,Hi,hX);Qe(this,Z2,!1)}setTimeoutProvider(e){De(this,Hi,e)}setTimeout(e,t){return Q(this,Hi).setTimeout(e,t)}clearTimeout(e){Q(this,Hi).clearTimeout(e)}setInterval(e,t){return Q(this,Hi).setInterval(e,t)}clearInterval(e){Q(this,Hi).clearInterval(e)}},Hi=new WeakMap,Z2=new WeakMap,IL),il=new mX;function fX(e){setTimeout(e,0)}var Tl=typeof window>"u"||"Deno"in globalThis;function En(){}function pX(e,t){return typeof e=="function"?e(t):e}function E_(e){return typeof e=="number"&&e>=0&&e!==1/0}function P8(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ao(e,t){return typeof e=="function"?e(t):e}function ps(e,t){return typeof e=="function"?e(t):e}function EP(e,t){const{type:n="all",exact:s,fetchStatus:a,predicate:i,queryKey:o,stale:l}=e;if(o){if(s){if(t.queryHash!==ok(o,t.options))return!1}else if(!Xh(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||a&&a!==t.state.fetchStatus||i&&!i(t))}function PP(e,t){const{exact:n,status:s,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Yh(t.options.mutationKey)!==Yh(i))return!1}else if(!Xh(t.options.mutationKey,i))return!1}return!(s&&t.state.status!==s||a&&!a(t))}function ok(e,t){return((t==null?void 0:t.queryKeyHashFn)||Yh)(e)}function Yh(e){return JSON.stringify(e,(t,n)=>O_(n)?Object.keys(n).sort().reduce((s,a)=>(s[a]=n[a],s),{}):n)}function Xh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Xh(e[n],t[n])):!1}var xX=Object.prototype.hasOwnProperty;function O8(e,t,n=0){if(e===t)return e;if(n>500)return t;const s=OP(e)&&OP(t);if(!s&&!(O_(e)&&O_(t)))return t;const i=(s?e:Object.keys(e)).length,o=s?t:Object.keys(t),l=o.length,c=s?new Array(l):{};let u=0;for(let m=0;m<l;m++){const f=s?m:o[m],p=e[f],b=t[f];
620if(p===b){c[f]=p,(s?m<i:xX.call(e,f))&&u++;continue}if(p===null||b===null||typeof p!="object"||typeof b!="object"){c[f]=b;continue}const v=O8(p,b,n+1);c[f]=v,v===p&&u++}return i===l&&u===i?e:c}function P_(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function OP(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function O_(e){if(!MP(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!MP(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function MP(e){return Object.prototype.toString.call(e)==="[object Object]"}function gX(e){return new Promise(t=>{il.setTimeout(t,e)})}function M_(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?O8(e,t):t}function yX(e,t,n=0){const s=[...e,t];return n&&s.length>n?s.slice(1):s}function vX(e,t,n=0){const s=[t,...e];return n&&s.length>n?s.slice(0,-1):s}var lk=Symbol();function M8(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===lk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function R8(e,t){return typeof e=="function"?e(...t):!!e}function bX(e,t,n){let s=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),s||(s=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var fl,Gi,ad,DL,jX=(DL=class extends Qm{constructor(){super();Qe(this,fl);Qe(this,Gi);Qe(this,ad);De(this,ad,t=>{if(!Tl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Q(this,Gi)||this.setEventListener(Q(this,ad))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,Gi))==null||t.call(this),De(this,Gi,void 0))}setEventListener(t){var n;De(this,ad,t),(n=Q(this,Gi))==null||n.call(this),De(this,Gi,t(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(t){Q(this,fl)!==t&&(De(this,fl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof Q(this,fl)=="boolean"?Q(this,fl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},fl=new WeakMap,Gi=new WeakMap,ad=new WeakMap,DL),ck=new jX;function R_(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function s(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{s({status:"fulfilled",value:a}),e(a)},n.reject=a=>{s({status:"rejected",reason:a}),t(a)},n}var wX=fX;function NX(){let e=[],t=0,n=l=>{l()},s=l=>{l()},a=wX;const i=l=>{t?e.push(l):a(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&a(()=>{s(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{i(()=>{l(...c)})},schedule:i,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{s=l},setScheduler:l=>{a=l}}}var Kr=NX(),id,Ki,od,LL,_X=(LL=class extends Qm{constructor(){super();Qe(this,id,!0);Qe(this,Ki);Qe(this,od);De(this,od,t=>{if(!Tl&&window.addEventListener){const n=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",s)}}})}onSubscribe(){Q(this,Ki)||this.setEventListener(Q(this,od))}onUnsubscribe(){var t;this.hasListeners()||((t=Q(this,Ki))==null||t.call(this),De(this,Ki,void 0))}setEventListener(t){var n;De(this,od,t),(n=Q(this,Ki))==null||n.call(this),De(this,Ki,t(this.setOnline.bind(this)))}setOnline(t){Q(this,id)!==t&&(De(this,id,t),this.listeners.forEach(s=>{s(t)}))}isOnline(){return Q(this,id)}},id=new WeakMap,Ki=new WeakMap,od=new WeakMap,LL),qx=new _X;function SX(e){return Math.min(1e3*2**e,3e4)}function I8(e){return(e??"online")==="online"?qx.isOnline():!0}var I_=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function D8(e){let t=!1,n=0,s;const a=R_(),i=()=>a.status!=="pending",o=g=>{var y;if(!i()){const w=new I_(g);p(w),(y=e.onCancel)==null||y.call(e,w)}},l=()=>{t=!0},c=()=>{t=!1},u=()=>ck.isFocused()&&(e.networkMode==="always"||qx.isOnline())&&e.canRun(),m=()=>I8(e.networkMode)&&e.canRun(),f=g=>{i()||(s==null||s(),a.resolve(g))},p=g=>{i()||(s==null||s(),a.reject(g))},b=()=>new Promise(g=>{var y;s=w=>{(i()||u())&&g(w)},(y=e.onPause)==null||y.call(e)}).then(()=>{var g;s=void 0,i()||(g=e.onContinue)==null||g.call(e)}),v=()=>{if(i())return;let g;const y=n===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(w){g=Promise.reject(w)}Promise.resolve(g).then(f).catch(w=>{var C;if(i())return;const N=e.retry??(Tl?0:3),S=e.retryDelay??SX,A=typeof S=="function"?S(n,w):S,k=N===!0||typeof N=="number"&&n<N||typeof N=="function"&&N(n,w);if(t||!k){p(w);return}n++,(C=e.onFail)==null||C.call(e,n,w),gX(A).then(()=>
vendor: 4,469 bytes, line 620
620u()?void 0:b()).then(()=>{t?p(w):v()})})};return{promise:a,status:()=>a.status,cancel:o,continue:()=>(s==null||s(),a),cancelRetry:l,continueRetry:c,canStart:m,start:()=>(m()?v():b().then(v),a)}}var pl,$L,L8=($L=class{constructor(){Qe(this,pl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),E_(this.gcTime)&&De(this,pl,il.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Tl?1/0:300*1e3))}clearGcTimeout(){Q(this,pl)&&(il.clearTimeout(Q(this,pl)),De(this,pl,void 0))}},pl=new WeakMap,$L),xl,ld,fs,gl,Fr,Vm,yl,Ls,Ua,FL,kX=(FL=class extends L8{constructor(t){super();Qe(this,Ls);Qe(this,xl);Qe(this,ld);Qe(this,fs);Qe(this,gl);Qe(this,Fr);Qe(this,Vm);Qe(this,yl);De(this,yl,!1),De(this,Vm,t.defaultOptions),this.setOptions(t.options),this.observers=[],De(this,gl,t.client),De(this,fs,Q(this,gl).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,De(this,xl,IP(this.options)),this.state=t.state??Q(this,xl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=Q(this,Fr))==null?void 0:t.promise}setOptions(t){if(this.options={...Q(this,Vm),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=IP(this.options);n.data!==void 0&&(this.setState(RP(n.data,n.dataUpdatedAt)),De(this,xl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Q(this,fs).remove(this)}setData(t,n){const s=M_(this.state.data,t,this.options);return bt(this,Ls,Ua).call(this,{data:s,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),s}setState(t,n){bt(this,Ls,Ua).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var s,a;const n=(s=Q(this,Fr))==null?void 0:s.promise;return(a=Q(this,Fr))==null||a.cancel(t),n?n.then(En).catch(En):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Q(this,xl))}isActive(){return this.observers.some(t=>ps(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===lk||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ao(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!P8(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(s=>s.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Fr))==null||n.continue()}onOnline(){var n;const t=this.observers.find(s=>s.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=Q(this,Fr))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),Q(this,fs).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(Q(this,Fr)&&(Q(this,yl)?Q(this,Fr).cancel({revert:!0}):Q(this,Fr).cancelRetry()),this.scheduleGc()),Q(this,fs).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||bt(this,Ls,Ua).call(this,{type:"invalidate"})}async fetch(t,n){var c,u,m,f,p,b,v,g,y,w,N,S;if(this.state.fetchStatus!=="idle"&&((c=Q(this,Fr))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Q(this,Fr))return Q(this,Fr).continueRetry(),Q(this,Fr).promise}if(t&&this.setOptions(t),!this.options.queryFn){const A=this.observers.find(k=>k.options.queryFn);A&&this.setOptions(A.options)}const s=new AbortController,a=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(De(this,yl,!0),s.signal)})},i=()=>{const A=M8(this.options,n),C=(()=>{const T={client:Q(this,gl),queryKey:this.queryKey,meta:this.meta};return a(T),T})();return De(this,yl,!1),this.options.persister?this.options.persister(A,C,this):A(C)},l=(()=>{const A={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:Q(this,gl),state:this.state,fetchFn:i};return a(A),A})();(u=this.options.behavior)==null||u.onFetch(l,this),De(this,ld,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m
620=l.fetchOptions)==null?void 0:m.meta))&&bt(this,Ls,Ua).call(this,{type:"fetch",meta:(f=l.fetchOptions)==null?void 0:f.meta}),De(this,Fr,D8({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:A=>{A instanceof I_&&A.revert&&this.setState({...Q(this,ld),fetchStatus:"idle"}),s.abort()},onFail:(A,k)=>{bt(this,Ls,Ua).call(this,{type:"failed",failureCount:A,error:k})},onPause:()=>{bt(this,Ls,Ua).call(this,{type:"pause"})},onContinue:()=>{bt(this,Ls,Ua).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const A=await Q(this,Fr).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(b=(p=Q(this,fs).config).onSuccess)==null||b.call(p,A,this),(g=(v=Q(this,fs).config).onSettled)==null||g.call(v,A,this.state.error,this),A}catch(A){if(A instanceof I_){if(A.silent)return Q(this,Fr).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw bt(this,Ls,Ua).call(this,{type:"error",error:A}),(w=(y=Q(this,fs).config).onError)==null||w.call(y,A,this),(S=(N=Q(this,fs).config).onSettled)==null||S.call(N,this.state.data,A,this),A}finally{this.scheduleGc()}}},xl=new WeakMap,ld=new WeakMap,fs=new WeakMap,gl=new WeakMap,Fr=new WeakMap,Vm=new WeakMap,yl=new WeakMap,Ls=new WeakSet,Ua=function(t){const n=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...$8(s.data,this.options),fetchMeta:t.meta??null};case"success":const a={...s,...RP(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return De(this,ld,t.manual?a:void 0),a;case"error":const i=t.error;return{...s,error:i,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=n(this.state),Kr.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),Q(this,fs).notify({query:this,type:"updated",action:t})})},FL);function $8(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:I8(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function RP(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function IP(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,s=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Tn,jt,Um,pn,vl,cd,Wa,Yi,zm,dd,ud,bl,jl,Xi,hd,Rt,wh,D_,L_,$_,F_,B_,q_,V_,F8,BL,CX=(BL=class extends Qm{constructor(t,n){super();Qe(this,Rt);Qe(this,Tn);Qe(this,jt);Qe(this,Um);Qe(this,pn);Qe(this,vl);Qe(this,cd);Qe(this,Wa);Qe(this,Yi);Qe(this,zm);Qe(this,dd);Qe(this,ud);Qe(this,bl);Qe(this,jl);Qe(this,Xi);Qe(this,hd,new Set);this.options=n,De(this,Tn,t),De(this,Yi,null),De(this,Wa,R_()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(Q(this,jt).addObserver(this),DP(Q(this,jt),this.options)?bt(this,Rt,wh).call(this):this.updateResult(),bt(this,Rt,F_).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return U_(Q(this,jt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return U_(Q(this,jt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,bt(this,Rt,B_).call(this),bt(this,Rt,q_).call(this),Q(this,jt).removeObserver(this)}setOptions(t){const n=this.options,s=Q(this,jt);if(this.options=Q(this,Tn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ps(this.options.enabled,Q(this,jt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");bt(this,Rt,V_).call(this),Q(this,jt).setOptions(this.options),n._defaulted&&!P_(this.options,n)&&Q(this,Tn).getQueryCache().notify({type:"observerOptionsUpdated",query:Q(this,jt),observer:this});const a=this.hasListeners();a&&LP(Q(this,jt),s,this.options,n)&&bt(this,Rt,wh).call(this),this.updateResult(),a&&(Q(this,jt)!==s||ps(this.options.enabled,Q(this,jt))!==ps(n.enabled,Q(this,jt))||ao(this.options.staleTime,Q(this,jt))!==ao(n.staleTime,Q(this,jt)))&&bt(this,Rt,D_).call(this);const i=bt(this,Rt,L_).call(this);a&&(Q(this,jt)!==s||ps(this.options.enabled,Q(this,jt))!==ps(n.enabled,Q(this,jt))||i!==Q(this,Xi))&&bt(this,Rt,$_).call(this,i)}getOptimisticResult(t){const n=Q(this,Tn).getQueryCache().build(Q(this,Tn),t),s=this.createResult(n,t);return TX(this,s)&&(De(this,pn,s),De(this,cd,this.options),De(this,vl,Q(this,jt).state)),s}getCurrentResult(){return Q(this,pn)}trackResult(t,n){return new Proxy(t,{get:(s,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&Q(this,Wa).status==="pending"&&Q(this,Wa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,a))})}trackProp(t){Q(this,hd).add(t)}getCurrentQuery(){return Q(this,jt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=Q(this,Tn).defaultQueryOptions(t),s=Q(this,Tn).getQueryCache().build(Q(this,Tn),n);return s.fetch().then(()=>this.createResult(s,n))}fetch(t){return bt(this,Rt,wh).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),Q(this,pn)))}createResult(t,n){var R;const s=Q(this,jt),a=this.options,i=Q(this,pn),o=Q(this,vl),l=Q(this,cd),u=t!==s?t.state:Q(this,Um),{state:m}=t;let f={...m},p=!1,b;if(n._optimisticResults){const M=this.hasListeners(),D=!M&&DP(t,n),$=M&&LP(t,s,n,a);(D||$)&&(f={...f,...$8(m.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:y}=f;b=f.data;let w=!1;if(n.placeholderData!==void 0&&b===void 0&&y==="pending"){let M;i!=null&&i.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(M=i.data,w=!0):M=typeof n.placeholderData=="function"?n.placeholderData((R=Q(this,ud))==null?void 0:R.state.data,Q(this,ud)):n.placeholderData,M!==void 0&&(y="success",b=M_(i==null?void 0:i.data,M,n),p=!0)}if(n.select&&b!==void 0&&!w)if(i&&b===(o==null?void 0:o.data)&&n.select===Q(this,zm))b=Q(this,dd);else try{De(this,zm,n.select),b=n.select(b),b=M_(i==null?void 0:i.data,b,n),De(this,dd,b),De(this,Yi,null)}catch(M){De(this,Yi,M)}Q(this,Yi)&&(v=Q(this,Yi),b=Q(this,dd),g=Date.now(),y="error");const N=f.fetchStatus==="fetching",S=y==="pending",A=y==="error",k=S&&N,C=b!==void 0,P={status:y,fetchStatus:f.fetchStatus,isPending:S,isSuccess:y==="success",isError:A,isInitialLoading:k,isLoading:k,data:b,dataUpdatedAt:f.dataUpdatedAt,error:v,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdate
vendor: 6,612 bytes, line 620
620Count:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:N,isRefetching:N&&!S,isLoadingError:A&&!C,isPaused:f.fetchStatus==="paused",isPlaceholderData:p,isRefetchError:A&&C,isStale:dk(t,n),refetch:this.refetch,promise:Q(this,Wa),isEnabled:ps(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const M=P.data!==void 0,D=P.status==="error"&&!M,$=L=>{D?L.reject(P.error):M&&L.resolve(P.data)},q=()=>{const L=De(this,Wa,P.promise=R_());$(L)},H=Q(this,Wa);switch(H.status){case"pending":t.queryHash===s.queryHash&&$(H);break;case"fulfilled":(D||P.data!==H.value)&&q();break;case"rejected":(!D||P.error!==H.reason)&&q();break}}return P}updateResult(){const t=Q(this,pn),n=this.createResult(Q(this,jt),this.options);if(De(this,vl,Q(this,jt).state),De(this,cd,this.options),Q(this,vl).data!==void 0&&De(this,ud,Q(this,jt)),P_(n,t))return;De(this,pn,n);const s=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!Q(this,hd).size)return!0;const o=new Set(i??Q(this,hd));return this.options.throwOnError&&o.add("error"),Object.keys(Q(this,pn)).some(l=>{const c=l;return Q(this,pn)[c]!==t[c]&&o.has(c)})};bt(this,Rt,F8).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&bt(this,Rt,F_).call(this)}},Tn=new WeakMap,jt=new WeakMap,Um=new WeakMap,pn=new WeakMap,vl=new WeakMap,cd=new WeakMap,Wa=new WeakMap,Yi=new WeakMap,zm=new WeakMap,dd=new WeakMap,ud=new WeakMap,bl=new WeakMap,jl=new WeakMap,Xi=new WeakMap,hd=new WeakMap,Rt=new WeakSet,wh=function(t){bt(this,Rt,V_).call(this);let n=Q(this,jt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(En)),n},D_=function(){bt(this,Rt,B_).call(this);const t=ao(this.options.staleTime,Q(this,jt));if(Tl||Q(this,pn).isStale||!E_(t))return;const s=P8(Q(this,pn).dataUpdatedAt,t)+1;De(this,bl,il.setTimeout(()=>{Q(this,pn).isStale||this.updateResult()},s))},L_=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(Q(this,jt)):this.options.refetchInterval)??!1},$_=function(t){bt(this,Rt,q_).call(this),De(this,Xi,t),!(Tl||ps(this.options.enabled,Q(this,jt))===!1||!E_(Q(this,Xi))||Q(this,Xi)===0)&&De(this,jl,il.setInterval(()=>{(this.options.refetchIntervalInBackground||ck.isFocused())&&bt(this,Rt,wh).call(this)},Q(this,Xi)))},F_=function(){bt(this,Rt,D_).call(this),bt(this,Rt,$_).call(this,bt(this,Rt,L_).call(this))},B_=function(){Q(this,bl)&&(il.clearTimeout(Q(this,bl)),De(this,bl,void 0))},q_=function(){Q(this,jl)&&(il.clearInterval(Q(this,jl)),De(this,jl,void 0))},V_=function(){const t=Q(this,Tn).getQueryCache().build(Q(this,Tn),this.options);if(t===Q(this,jt))return;const n=Q(this,jt);De(this,jt,t),De(this,Um,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},F8=function(t){Kr.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(Q(this,pn))}),Q(this,Tn).getQueryCache().notify({query:Q(this,jt),type:"observerResultsUpdated"})})},BL);function AX(e,t){return ps(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function DP(e,t){return AX(e,t)||e.state.data!==void 0&&U_(e,t,t.refetchOnMount)}function U_(e,t,n){if(ps(t.enabled,e)!==!1&&ao(t.staleTime,e)!=="static"){const s=typeof n=="function"?n(e):n;return s==="always"||s!==!1&&dk(e,t)}return!1}function LP(e,t,n,s){return(e!==t||ps(s.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&dk(e,n)}function dk(e,t){return ps(t.enabled,e)!==!1&&e.isStaleByTime(ao(t.staleTime,e))}function TX(e,t){return!P_(e.getCurrentResult(),t)}function $P(e){return{onFetch:(t,n)=>{var m,f,p,b,v;const s=t.options,a=(p=(f=(m=t.fetchOptions)==null?void 0:m.meta)==null?void 0:f.fetchMore)==null?void 0:p.direction,i=((b=t.state.data)==null?void 0:b.pages)||[],o=((v=t.state.data)==null?void 0:v.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const u=async()=>{let g=!1;const y=S=>{bX(S,()=>t.signal,()=>g=!0)},w=M8(t.options,t.fetchOptions),N=async(S,A,k)=>{if(g)return Promise.reject();if(A==null&&S.pages.length)return Promise.resolve(S);const T=(()=>{const D={client:t.client,queryKey:t.queryKey,pageParam:A,direction:k?"backward":"forward",meta:t.options.meta};return y(D),D})(),P=await w(T),{maxPages:R}=t.options,M=k?vX:yX;return{pages:M(S.pages,P,R),pageParams:M(S.pageParams,A,R)}};if(a&&i.length){const S=a==="backward",A=S?EX:FP,k={pages:i,pageParams:o},C=A(s,k);l=await N(k,C,S)}else{const S=e??i.length;do{const A=c===0?o[0]??s.initialPageParam:FP(s,l);if(c>0&&A==null)break;l=await N(l,A),c++}while(c<S)}return l};t.options.persister?t.fetchFn=()=>{var g,y;return(y=(g=t.options).persister)==null?void 0:y.call(g,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function FP(e,{pages:t,pageParams:n}){const s=t.length-1;return t.length>0?e.getNextPageParam(t[s],t,n[s],n):void 0}function EX(e,{pages:t,pageParams:n}){var s;return t.length>0?(s=e.getPreviousPageParam)==null?void 0:s.call(e,t[0],t,n[0],n):void 0}var Wm,na,rn,wl,sa,Bi,qL,PX=(qL=class extends L8{constructor(t){super();Qe(this,sa);Qe(this,Wm);Qe(this,na);Qe(this,rn);Qe(this,wl);De(this,Wm,t.client),this.mutationId=t.mutationId,De(this,rn,t.mutationCache),De(this,na,[]),this.state=t.state||OX(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){Q(this,na).includes(t)||(Q(this,na).push(t),this.clearGcTimeout(),Q(this,rn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){De(this,na,Q(this,na).filter(n=>n!==t)),this.scheduleGc(),Q(this,rn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){Q(this,na).length||(this.state.status==="pending"?this.scheduleGc():Q(this,rn).remove(this))}continue(){var t;return((t=Q(this,wl))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,c,u,m,f,p,b,v,g,y,w,N,S,A,k,C,T;const n=()=>{bt(this,sa,Bi).call(this,{type:"continue"})},s={client:Q(this,Wm),meta:this.options.meta,mutationKey:this.options.mutationKey};De(this,wl,D8({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(P,R)=>{bt(this,sa,Bi).call(this,{type:"failed",failureCount:P,error:R})},onPause:()=>{bt(this,sa,Bi).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>
620Q(this,rn).canRun(this)}));const a=this.state.status==="pending",i=!Q(this,wl).canStart();try{if(a)n();else{bt(this,sa,Bi).call(this,{type:"pending",variables:t,isPaused:i}),Q(this,rn).config.onMutate&&await Q(this,rn).config.onMutate(t,this,s);const R=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,s));R!==this.state.context&&bt(this,sa,Bi).call(this,{type:"pending",context:R,variables:t,isPaused:i})}const P=await Q(this,wl).start();return await((u=(c=Q(this,rn).config).onSuccess)==null?void 0:u.call(c,P,t,this.state.context,this,s)),await((f=(m=this.options).onSuccess)==null?void 0:f.call(m,P,t,this.state.context,s)),await((b=(p=Q(this,rn).config).onSettled)==null?void 0:b.call(p,P,null,this.state.variables,this.state.context,this,s)),await((g=(v=this.options).onSettled)==null?void 0:g.call(v,P,null,t,this.state.context,s)),bt(this,sa,Bi).call(this,{type:"success",data:P}),P}catch(P){try{await((w=(y=Q(this,rn).config).onError)==null?void 0:w.call(y,P,t,this.state.context,this,s))}catch(R){Promise.reject(R)}try{await((S=(N=this.options).onError)==null?void 0:S.call(N,P,t,this.state.context,s))}catch(R){Promise.reject(R)}try{await((k=(A=Q(this,rn).config).onSettled)==null?void 0:k.call(A,void 0,P,this.state.variables,this.state.context,this,s))}catch(R){Promise.reject(R)}try{await((T=(C=this.options).onSettled)==null?void 0:T.call(C,void 0,P,t,this.state.context,s))}catch(R){Promise.reject(R)}throw bt(this,sa,Bi).call(this,{type:"error",error:P}),P}finally{Q(this,rn).runNext(this)}}},Wm=new WeakMap,na=new WeakMap,rn=new WeakMap,wl=new WeakMap,sa=new WeakSet,Bi=function(t){const n=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Kr.batch(()=>{Q(this,na).forEach(s=>{s.onMutationUpdate(t)}),Q(this,rn).notify({mutation:this,type:"updated",action:t})})},qL);function OX(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ha,$s,Hm,VL,MX=(VL=class extends Qm{constructor(t={}){super();Qe(this,Ha);Qe(this,$s);Qe(this,Hm);this.config=t,De(this,Ha,new Set),De(this,$s,new Map),De(this,Hm,0)}build(t,n,s){const a=new PX({client:t,mutationCache:this,mutationId:++Tp(this,Hm)._,options:t.defaultMutationOptions(n),state:s});return this.add(a),a}add(t){Q(this,Ha).add(t);const n=Rp(t);if(typeof n=="string"){const s=Q(this,$s).get(n);s?s.push(t):Q(this,$s).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(Q(this,Ha).delete(t)){const n=Rp(t);if(typeof n=="string"){const s=Q(this,$s).get(n);if(s)if(s.length>1){const a=s.indexOf(t);a!==-1&&s.splice(a,1)}else s[0]===t&&Q(this,$s).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Rp(t);if(typeof n=="string"){const s=Q(this,$s).get(n),a=s==null?void 0:s.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var s;const n=Rp(t);if(typeof n=="string"){const a=(s=Q(this,$s).get(n))==null?void 0:s.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Kr.batch(()=>{Q(this,Ha).forEach(t=>{this.notify({type:"removed",mutation:t})}),Q(this,Ha).clear(),Q(this,$s).clear()})}getAll(){return Array.from(Q(this,Ha))}find(t){const n={exact:!0,...t};return this.getAll().find(s=>PP(n,s))}findAll(t={}){return this.getAll().filter(n=>PP(t,n))}notify(t){Kr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Kr.batch(()=>Promise.all(t.map(n=>n.continue().catch(En))))}},Ha=new WeakMap,$s=new WeakMap,Hm=new WeakMap,VL);function Rp(e){var t;return(t=e.options.scope)==null?void 0:t.id}var aa,UL,RX=(UL=class extends Qm{constructor(t={}){super();Qe(this,aa);this.config=t,De(this,aa,new Map)}build(t,n,s){const a=n.queryKey,i=n.queryHash??ok(a,n);let o=this.get(i);return o||(o=new kX({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:s,defaultOptions:t.getQueryDefaults(a)}),this.add(o)),o}add(t){Q(this,aa).has(t.queryHash)||(Q(this,aa).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=Q(this,aa).get(t.queryHash);n&&(t.destroy(),n===t&&Q(this,aa).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Kr.batch(()=>
vendor: 5,560 bytes, line 620
620{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return Q(this,aa).get(t)}getAll(){return[...Q(this,aa).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(s=>EP(n,s))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(s=>EP(t,s)):n}notify(t){Kr.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Kr.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Kr.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},aa=new WeakMap,UL),cr,Ji,Qi,md,fd,Zi,pd,xd,zL,IX=(zL=class{constructor(e={}){Qe(this,cr);Qe(this,Ji);Qe(this,Qi);Qe(this,md);Qe(this,fd);Qe(this,Zi);Qe(this,pd);Qe(this,xd);De(this,cr,e.queryCache||new RX),De(this,Ji,e.mutationCache||new MX),De(this,Qi,e.defaultOptions||{}),De(this,md,new Map),De(this,fd,new Map),De(this,Zi,0)}mount(){Tp(this,Zi)._++,Q(this,Zi)===1&&(De(this,pd,ck.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,cr).onFocus())})),De(this,xd,qx.subscribe(async e=>{e&&(await this.resumePausedMutations(),Q(this,cr).onOnline())})))}unmount(){var e,t;Tp(this,Zi)._--,Q(this,Zi)===0&&((e=Q(this,pd))==null||e.call(this),De(this,pd,void 0),(t=Q(this,xd))==null||t.call(this),De(this,xd,void 0))}isFetching(e){return Q(this,cr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return Q(this,Ji).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Q(this,cr).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=Q(this,cr).build(this,t),s=n.state.data;return s===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ao(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(s))}getQueriesData(e){return Q(this,cr).findAll(e).map(({queryKey:t,state:n})=>{const s=n.data;return[t,s]})}setQueryData(e,t,n){const s=this.defaultQueryOptions({queryKey:e}),a=Q(this,cr).get(s.queryHash),i=a==null?void 0:a.state.data,o=pX(t,i);if(o!==void 0)return Q(this,cr).build(this,s).setData(o,{...n,manual:!0})}setQueriesData(e,t,n){return Kr.batch(()=>Q(this,cr).findAll(e).map(({queryKey:s})=>[s,this.setQueryData(s,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=Q(this,cr).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=Q(this,cr);Kr.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=Q(this,cr);return Kr.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},s=Kr.batch(()=>Q(this,cr).findAll(e).map(a=>a.cancel(n)));return Promise.all(s).then(En).catch(En)}invalidateQueries(e,t={}){return Kr.batch(()=>(Q(this,cr).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},s=Kr.batch(()=>Q(this,cr).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(En)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(s).then(En)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=Q(this,cr).build(this,t);return n.isStaleByTime(ao(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(En).catch(En)}fetchInfiniteQuery(e){return e.behavior=$P(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(En).catch(En)}ensureInfiniteQueryData(e){return e.behavior=$P(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return qx.isOnline()?Q(this,Ji).resumePausedMutations():Promise.resolve()}getQueryCache(){return Q(this,cr)}getMutationCache(){return Q(this,Ji)}getDefaultOptions(){return Q(this,Qi)}setDefaultOptions(e){De(this,Qi,e)}setQueryDefaults(e,t){Q(this,md).set(Yh(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...Q(this,md).values()],n={};return t.forEach(s=>{Xh(e,s.queryKey)&&Object.assign(n,s.defaultOptions)}),n}setMutationDefaults(e,t){Q(this,fd).set(Yh(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...Q(this,fd).values()],n={};return t.forEach(s=>{Xh(e,s.mutationKey)&&Object.assign(n,s.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...Q(this,Qi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=ok(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===lk&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...Q(this,Qi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){Q(this,cr).clear(),Q(this,Ji).clear()}},cr=new WeakMap,Ji=new WeakMap,Qi=new WeakMap,md=new WeakMap,fd=new WeakMap,Zi=new WeakMap,pd=new WeakMap,xd=new WeakMap,zL),B8=j.createContext(void 0),DX=e=>{const t=j.useContext(B8);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},LX=({client:e,children:t})=>(j.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),r.jsx(B8.Provider,{value:e,children:t})),q8=j.createContext(!1),$X=()=>j.useContext(q8);q8.Provider;function FX(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
620var BX=j.createContext(FX()),qX=()=>j.useContext(BX),VX=(e,t,n)=>{const s=n!=null&&n.state.error&&typeof e.throwOnError=="function"?R8(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||s)&&(t.isReset()||(e.retryOnMount=!1))},UX=e=>{j.useEffect(()=>{e.clearReset()},[e])},zX=({result:e,errorResetBoundary:t,throwOnError:n,query:s,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(a&&e.data===void 0||R8(n,[e.error,s])),WX=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),s=e.staleTime;e.staleTime=typeof s=="function"?(...a)=>n(s(...a)):n(s),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},HX=(e,t)=>e.isLoading&&e.isFetching&&!t,GX=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,BP=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function KX(e,t,n){var p,b,v,g;const s=$X(),a=qX(),i=DX(),o=i.defaultQueryOptions(e);(b=(p=i.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||b.call(p,o);const l=i.getQueryCache().get(o.queryHash);o._optimisticResults=s?"isRestoring":"optimistic",WX(o),VX(o,a,l),UX(a);const c=!i.getQueryCache().get(o.queryHash),[u]=j.useState(()=>new t(i,o)),m=u.getOptimisticResult(o),f=!s&&e.subscribed!==!1;if(j.useSyncExternalStore(j.useCallback(y=>{const w=f?u.subscribe(Kr.batchCalls(y)):En;return u.updateResult(),w},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),j.useEffect(()=>{u.setOptions(o)},[o,u]),GX(o,m))throw BP(o,u,a);if(zX({result:m,errorResetBoundary:a,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw m.error;if((g=(v=i.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||g.call(v,o,m),o.experimental_prefetchInRender&&!Tl&&HX(m,s)){const y=c?BP(o,u,a):l==null?void 0:l.promise;y==null||y.catch(En).finally(()=>{u.updateResult()})}return o.notifyOnChangeProps?m:u.trackResult(m)}function YX(e,t){return KX(e,CX)}const XX=new IX({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});var Zm=HL();const JX=Et(Zm);/** 621 * @remix-run/router v1.23.2 622 * 623 * Copyright (c) Remix Software Inc. 624 * 625 * This source code is licensed under the MIT license found in the 626 * LICENSE.md file in the root directory of this source tree. 627 * 628 * @license MIT 629 */function Jh(){return Jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Jh.apply(this,arguments)}var to;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(to||(to={}));const qP="popstate";function QX(e){e===void 0&&(e={});function t(s,a){let{pathname:i,search:o,hash:l}=s.location;return z_("",{pathname:i,search:o,hash:l},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(s,a){return typeof a=="string"?a:Vx(a)}return eJ(t,n,null,e)}function _r(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function uk(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ZX(){return Math.random().toString(36).substr(2,8)}function VP(e,t){return{usr:e.state,key:e.key,idx:t}}function z_(e,t,n,s){return n===void 0&&(n=null),Jh({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Xd(t):t,{state:n,key:t&&t.key||s||ZX()})}function Vx(e){let{pathname:t="/",search:n="",hash:s=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function Xd(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function eJ(e,t,n,s){s===void 0&&(s={});let{window:a=document.defaultView,v5Compat:i=!1}=s,o=a.history,l=to.Pop,c=null,u=m();u==null&&(u=0,o.replaceState(Jh({},o.state,{idx:u}),""));function m(){return(o.state||{idx:null}).idx}function f(){l=to.Pop;let y=m(),w=y==null?null:y-u;u=y,c&&c({action:l,location:g.location,delta:w})}function p(y,w){l=to.Push;let N=z_(g.location,y,w);u=m()+1;let S=VP(N,u),A=g.createHref(N);try{o.pushState(S,"",A)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(A)}i&&c&&c({action:l,location:g.location,delta:1})}function b(y,w){l=to.Replace;let N=z_(g.location,y,w);u=m();let S=VP(N,u),A=g.createHref(N);o.replaceState(S,"",A),i&&c&&c({action:l,location:g.location,delta:0})}function v(y){let w=a.location.origin!=="null"?a.location.origin:a.location.href,N=typeof y=="string"?y:Vx(y);
vendor: 12,693 bytes, lines 629-638
629return N=N.replace(/ $/,"%20"),_r(w,"No window.location.(origin|href) available to create URL for href: "+N),new URL(N,w)}let g={get action(){return l},get location(){return e(a,o)},listen(y){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(qP,f),c=y,()=>{a.removeEventListener(qP,f),c=null}},createHref(y){return t(a,y)},createURL:v,encodeLocation(y){let w=v(y);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:p,replace:b,go(y){return o.go(y)}};return g}var UP;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(UP||(UP={}));function tJ(e,t,n){return n===void 0&&(n="/"),rJ(e,t,n)}function rJ(e,t,n,s){let a=typeof t=="string"?Xd(t):t,i=hk(a.pathname||"/",n);if(i==null)return null;let o=V8(e);nJ(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=pJ(i);l=hJ(o[c],u)}return l}function V8(e,t,n,s){t===void 0&&(t=[]),n===void 0&&(n=[]),s===void 0&&(s="");let a=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(_r(c.relativePath.startsWith(s),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(s.length));let u=io([s,c.relativePath]),m=n.concat(c);i.children&&i.children.length>0&&(_r(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),V8(i.children,t,m,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:dJ(u,i.index),routesMeta:m})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))a(i,o);else for(let c of U8(i.path))a(i,o,c)}),t}function U8(e){let t=e.split("/");if(t.length===0)return[];let[n,...s]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(s.length===0)return a?[i,""]:[i];let o=U8(s.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),a&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function nJ(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:uJ(t.routesMeta.map(s=>s.childrenIndex),n.routesMeta.map(s=>s.childrenIndex)))}const sJ=/^:[\w-]+$/,aJ=3,iJ=2,oJ=1,lJ=10,cJ=-2,zP=e=>e==="*";function dJ(e,t){let n=e.split("/"),s=n.length;return n.some(zP)&&(s+=cJ),t&&(s+=iJ),n.filter(a=>!zP(a)).reduce((a,i)=>a+(sJ.test(i)?aJ:i===""?oJ:lJ),s)}function uJ(e,t){return e.length===t.length&&e.slice(0,-1).every((s,a)=>s===t[a])?e[e.length-1]-t[t.length-1]:0}function hJ(e,t,n){let{routesMeta:s}=e,a={},i="/",o=[];for(let l=0;l<s.length;++l){let c=s[l],u=l===s.length-1,m=i==="/"?t:t.slice(i.length)||"/",f=mJ({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},m),p=c.route;if(!f)return null;Object.assign(a,f.params),o.push({params:a,pathname:io([i,f.pathname]),pathnameBase:bJ(io([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=io([i,f.pathnameBase]))}return o}function mJ(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,s]=fJ(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:s.reduce((u,m,f)=>{let{paramName:p,isOptional:b}=m;if(p==="*"){let g=l[f]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const v=l[f];return b&&!v?u[p]=void 0:u[p]=(v||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function fJ(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),uk(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let s=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(s.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),s]}function pJ(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return uk(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function hk(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,s=e.charAt(n);return s&&s!=="/"?null:e.slice(n)||"/"}const xJ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gJ=e=>xJ.test(e);function yJ(e,t){t===void 0&&(t="/");let{pathname:n,search:s="",hash:a=""}=typeof e=="string"?Xd(e):e,i;if(n)if(gJ(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),uk(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=WP(n.substring(1),"/"):i=WP(n,t)}else i=t;return{pathname:i,search:jJ(s),hash:wJ(a)}}function WP(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function E0(e,t,n,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function vJ(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function z8(e,t){let n=vJ(e);return t?n.map((s,a)=>a===n.length-1?s.pathname:s.pathnameBase):n.map(s=>s.pathnameBase)}function W8(e,t,n,s){s===void 0&&(s=!1);let a;typeof e=="string"?a=Xd(e):(a=Jh({},e),_r(!a.pathname||!a.pathname.includes("?"),E0("?","pathname","search",a)),_r(!a.pathname||!a.pathname.includes("#"),E0("#","pathname","hash",a)),_r(!a.search||!a.search.includes("#"),E0("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,l;if(o==null)l=n;else{let f=t.length-1;if(!s&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;a.pathname=p.join("/")}l=f>=0?t[f]:"/"}let c=yJ(a,l),u=o&&o!=="/"&&o.endsWith("/"),m=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||m)&&(c.pathname+="/"),c}const io=e=>e.join("/").replace(/\/\/+/g,"/"),bJ=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),jJ=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,wJ=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function NJ(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const H8=["post","put","patch","delete"];new Set(H8);const _J=["get",...H8];new Set(_J);/** 630 * React Router v6.30.3 631 * 632 * Copyright (c) Remix Software Inc. 633 * 634 * This source code is licensed under the MIT license found in the 635 * LICENSE.md file in the root directory of this source tree. 636 * 637 * @license MIT 638 */function Qh(){return Qh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Qh.apply(this,arguments)}const mk=j.createContext(null),SJ=j.createContext(null),Kl=j.createContext(null),fy=j.createContext(null),ui=j.createContext({outlet:null,matches:[],isDataRoute:!1}),G8=j.createContext(null);function kJ(e,t){let{relative:n}=t===void 0?{}:t;ef()||_r(!1);let{basename:s,navigator:a}=j.useContext(Kl),{hash:i,pathname:o,search:l}=Y8(e,{relative:n}),c=o;return s!=="/"&&(c=o==="/"?s:io([s,o])),a.createHref({pathname:c,search:l,hash:i})}function ef(){return j.useContext(fy)!=null}function Yl(){return ef()||_r(!1),j.useContext(fy).location}function K8(e){j.useContext(Kl).static||j.useLayoutEffect(e)}function ka(){let{isDataRoute:e}=j.useContext(ui);return e?qJ():CJ()}function CJ(){ef()||_r(!1);let e=j.useContext(mk),{basename:t,future:n,navigator:s}=j.useContext(Kl),{matches:a}=j.useContext(ui),{pathname:i}=Yl(),o=JSON.stringify(z8(a,n.v7_relativeSplatPath)),l=j.useRef(!1);return K8(()=>{l.current=!0}),j.useCallback(function(u,m){if(m===void 0&&(m={}),!l.current)return;if(typeof u=="number"){s.go(u);return}let f=W8(u,JSON.parse(o),i,m.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:io([t,f.pathname])),(m.replace?s.replace:s.push)(f,m.state,m)},[t,s,o,i,e])}const AJ=j.createContext(null);function TJ(e){let t=j.useContext(ui).outlet;return t&&j.createElement(AJ.Provider,{value:e},t)}function yo(){let{matches:e}=j.useContext(ui),t=e[e.length-1];return t?t.params:{}}function Y8(e,t){let{relative:n}=t===void 0?{}:t,{future:s}=j.useContext(Kl),{matches:a}=j.useContext(ui),{pathname:i}=Yl(),o=JSON.stringify(z8(a,s.v7_relativeSplatPath));return j.useMemo(()=>W8(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function EJ(e,t){return PJ(e,t)}function PJ(e,t,n,s){ef()||_r(!1);let{navigator:a}=j.useContext(Kl),{matches:i}=j.useContext(ui),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=Yl(),m;if(t){var f;let y=typeof t=="string"?Xd(t):t;c==="/"||(f=y.pathname)!=null&&f.startsWith(c)||_r(!1),m=y}else m=u;let p=m.pathname||"/",b=p;if(c!=="/"){let y=c.replace(/^\//,"").split("/");b="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}let v=tJ(e,{pathname:b}),g=DJ(v&&v.map(y=>Object.assign({},y,{params:Object.assign({},l,y.params),pathname:io([c,a.encodeLocation?a.encodeLocation(y.pathname).pathname:y.pathname]),pathnameBase:y.pathnameBase==="/"?c:io([c,a.encodeLocation?a.encodeLocation(y.pathnameBase).pathname:y.pathnameBase])})),i,n,s);return t&&g?j.createElement(fy.Provider,{value:{location:Qh({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:to.Pop}},g):g}function OJ(){let e=BJ(),t=NJ(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},t),n?j.createElement("pre",{style:a},n):null,null)}const MJ=j.createElement(OJ,null);class RJ extends j.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?j.createElement(ui.Provider,{value:this.props.routeContext},j.createElement(G8.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function IJ(e){let{routeContext:t,match:n,children:s}=e,a=j.useContext(mk);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),j.createElement(ui.Provider,{value:t},s)}function DJ(e,t,n,s){var a;if(t===void 0&&(t=[]),n===void 0&&(n=null),s===void 0&&(s=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=s)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(a=n)==null?void 0:a.errors;if(l!=null){let m=o.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);m>=0||_r(!1),o=o.slice(0,Math.min(o.length,m+1))}let c=!1,u=-1;if(n&&s&&s.v7_partialHydration)for(let m=0;m<o.length;m++){let f=o[m];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=m),f.route.id){let{loaderData:p,errors:b}=n,v=f.route.loader&&p[f.route.id]===void 0&&(!b||b[f.route.id]===void 0);if(f.route.lazy||v){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((m,f,p)=>{let b,v=!1,g=null,y=null;n&&(b=l&&f.route.id?l[f.route.id]:void 0,g=f.route.errorElement||MJ,c&&(u<0&&p===0?(VJ("route-fallback"),v=!0,y=null):u===p&&(v=!0,y=f.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,p+1)),N=()=>{let S;return b?S=g:v?S=y:f.route.Component?S=j.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=m,j.createElement(IJ,{match:f,routeContext:{outlet:m,matches:w,isDataRoute:n!=null},children:S})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?j.createElement(RJ,{location:n.location,revalidation:n.revalidation,component:g,error:b,children:N(),routeC
638ontext:{outlet:null,matches:w,isDataRoute:!0}}):N()},null)}var X8=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(X8||{}),J8=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(J8||{});function LJ(e){let t=j.useContext(mk);return t||_r(!1),t}function $J(e){let t=j.useContext(SJ);return t||_r(!1),t}function FJ(e){let t=j.useContext(ui);return t||_r(!1),t}function Q8(e){let t=FJ(),n=t.matches[t.matches.length-1];return n.route.id||_r(!1),n.route.id}function BJ(){var e;let t=j.useContext(G8),n=$J(),s=Q8();return t!==void 0?t:(e=n.errors)==null?void 0:e[s]}function qJ(){let{router:e}=LJ(X8.UseNavigateStable),t=Q8(J8.UseNavigateStable),n=j.useRef(!1);return K8(()=>{n.current=!0}),j.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,Qh({fromRouteId:t},i)))},[e,t])}const HP={};function VJ(e,t,n){HP[e]||(HP[e]=!0)}function UJ(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function zJ(e){return TJ(e.context)}function Re(e){_r(!1)}function WJ(e){let{basename:t="/",children:n=null,location:s,navigationType:a=to.Pop,navigator:i,static:o=!1,future:l}=e;ef()&&_r(!1);let c=t.replace(/^\/*/,"/"),u=j.useMemo(()=>({basename:c,navigator:i,static:o,future:Qh({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof s=="string"&&(s=Xd(s));let{pathname:m="/",search:f="",hash:p="",state:b=null,key:v="default"}=s,g=j.useMemo(()=>{let y=hk(m,c);return y==null?null:{location:{pathname:y,search:f,hash:p,state:b,key:v},navigationType:a}},[c,m,f,p,b,v,a]);return g==null?null:j.createElement(Kl.Provider,{value:u},j.createElement(fy.Provider,{children:n,value:g}))}function HJ(e){let{children:t,location:n}=e;return EJ(W_(t),n)}new Promise(()=>{});function W_(e,t){t===void 0&&(t=[]);let n=[];return j.Children.forEach(e,(s,a)=>{if(!j.isValidElement(s))return;let i=[...t,a];if(s.type===j.Fragment){n.push.apply(n,W_(s.props.children,i));return}s.type!==Re&&_r(!1),!s.props.index||!s.props.children||_r(!1);let o={id:s.props.id||i.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(o.children=W_(s.props.children,i)),n.push(o)}),n}/** 639 * React Router DOM v6.30.3 640 * 641 * Copyright (c) Remix Software Inc. 642 * 643 * This source code is licensed under the MIT license found in the 644 * LICENSE.md file in the root directory of this source tree. 645 * 646 * @license MIT 647 */function H_(){return H_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},H_.apply(this,arguments)}function GJ(e,t){if(e==null)return{};var n={},s=Object.keys(e),a,i;for(i=0;i<s.length;i++)a=s[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function KJ(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function YJ(e,t){return e.button===0&&(!t||t==="_self")&&!KJ(e)}function G_(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let s=e[n];return t.concat(Array.isArray(s)?s.map(a=>[n,a]):[[n,s]])},[]))}function XJ(e,t){let n=G_(e);return t&&t.forEach((s,a)=>{n.has(a)||t.getAll(a).forEach(i=>{n.append(a,i)})}),n}const JJ=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],QJ="6";try{window.__reactRouterVersion=QJ}catch{}const ZJ="startTransition",GP=cy[ZJ];function eQ(e){let{basename:t,children:n,future:s,window:a}=e,i=j.useRef();i.current==null&&(i.current=QX({window:a,v5Compat:!0}));let o=i.current,[l,c]=j.useState({action:o.action,location:o.location}),{v7_startTransition:u}=s||{},m=j.useCallback(f=>{u&&GP?GP(()=>c(f)):c(f)},[c,u]);return j.useLayoutEffect(()=>o.listen(m),[o,m]),j.useEffect(()=>UJ(s),[s]),j.createElement(WJ,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:s})}const tQ=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",rQ=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,se=j.forwardRef(function(t,n){let{onClick:s,relative:a,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:m,viewTransition:f}
647=t,p=GJ(t,JJ),{basename:b}=j.useContext(Kl),v,g=!1;if(typeof u=="string"&&rQ.test(u)&&(v=u,tQ))try{let S=new URL(window.location.href),A=u.startsWith("//")?new URL(S.protocol+u):new URL(u),k=hk(A.pathname,b);A.origin===S.origin&&k!=null?u=k+A.search+A.hash:g=!0}catch{}let y=kJ(u,{relative:a}),w=nQ(u,{replace:o,state:l,target:c,preventScrollReset:m,relative:a,viewTransition:f});function N(S){s&&s(S),S.defaultPrevented||w(S)}return j.createElement("a",H_({},p,{href:v||y,onClick:g||i?s:N,ref:n,target:c}))});var KP;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(KP||(KP={}));var YP;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(YP||(YP={}));function nQ(e,t){let{target:n,replace:s,state:a,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=ka(),u=Yl(),m=Y8(e,{relative:o});return j.useCallback(f=>{if(YJ(f,n)){f.preventDefault();let p=s!==void 0?s:Vx(u)===Vx(m);c(e,{replace:p,state:a,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,m,s,a,n,e,i,o,l])}function Z8(e){let t=j.useRef(G_(e)),n=j.useRef(!1),s=Yl(),a=j.useMemo(()=>XJ(s.search,n.current?null:t.current),[s.search]),i=ka(),o=j.useCallback((l,c)=>{const u=G_(typeof l=="function"?l(a):l);n.current=!0,i("?"+u,c)},[i,a]);return[a,o]}function e$(e,t){return function(){return e.apply(t,arguments)}}const{toString:sQ}=Object.prototype,{getPrototypeOf:yd}=Object,{iterator:tf,toStringTag:t$}=Symbol,Ux=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Zh=(e,t)=>{let n=e;const s=[];for(;n!=null&&n!==Object.prototype;){if(s.indexOf(n)!==-1)return!1;if(s.push(n),Ux(n,t))return!0;n=yd(n)}return!1},aQ=(e,t)=>e!=null&&Zh(e,t)?e[t]:void 0,fk=(e=>t=>{const n=sQ.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ns=e=>(e=e.toLowerCase(),t=>fk(t)===e),py=e=>t=>typeof t===e,{isArray:El}=Array,Pl=py("undefined");function Jd(e){return e!==null&&!Pl(e)&&e.constructor!==null&&!Pl(e.constructor)&&In(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const r$=Ns("ArrayBuffer");function iQ(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&r$(e.buffer),t}const oQ=py("string"),In=py("function"),n$=py("number"),Qd=e=>e!==null&&typeof e=="object",lQ=e=>e===!0||e===!1,vx=e=>{if(!Qd(e))return!1;const t=yd(e);return(t===null||t===Object.prototype||yd(t)===null)&&!Zh(e,t$)&&!Zh(e,tf)},cQ=e=>{if(!Qd(e)||Jd(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},dQ=Ns("Date"),uQ=Ns("File"),hQ=e=>!!(e&&typeof e.uri<"u"),mQ=e=>e&&typeof e.getParts<"u",fQ=Ns("Blob"),pQ=Ns("FileList"),xQ=Ns("Set"),gQ=e=>Qd(e)&&In(e.pipe);function yQ(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const XP=yQ(),JP=typeof XP.FormData<"u"?XP.FormData:void 0,vQ=e=>{if(!e)return!1;if(JP&&e instanceof JP)return!0;const t=yd(e);if(!t||t===Object.prototype||!In(e.append))return!1;const n=fk(e);return n==="formdata"||n==="object"&&In(e.toString)&&e.toString()==="[object FormData]"},bQ=Ns("URLSearchParams"),[jQ,wQ,NQ,_Q]=["ReadableStream","Request","Response","Headers"].map(Ns),SQ=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function rf(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,a;if(typeof e!="object"&&(e=[e]),El(e))for(s=0,a=e.length;s<a;s++)t.call(null,e[s],s,e);else{if(Jd(e))return;const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let l;for(s=0;s<o;s++)l=i[s],t.call(null,e[l],l,e)}}function s$(e,t){if(Jd(e))return null;t=t.toLowerCase();const n=Object.keys(e);let s=n.length,a;for(;s-- >0;)if(a=n[s],t===a.toLowerCase())return a;return null}const ol=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,a$=e=>!Pl(e)&&e!==ol;function K_(...e){const{caseless:t,skipUndefined:n}=a$(this)&&this||{},s={},a=(i,o)=>
vendor: 4,675 bytes, lines 647-648
647{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const l=t&&typeof o=="string"&&s$(s,o)||o,c=Ux(s,l)?s[l]:void 0;vx(c)&&vx(i)?s[l]=K_(c,i):vx(i)?s[l]=K_({},i):El(i)?s[l]=i.slice():(!n||!Pl(i))&&(s[l]=i)};for(let i=0,o=e.length;i<o;i++){const l=e[i];if(!l||Jd(l)||(rf(l,a),typeof l!="object"||El(l)))continue;const c=Object.getOwnPropertySymbols(l);for(let u=0;u<c.length;u++){const m=c[u];LQ.call(l,m)&&a(l[m],m)}}return s}const kQ=(e,t,n,{allOwnKeys:s}={})=>(rf(t,(a,i)=>{n&&In(a)?Object.defineProperty(e,i,{__proto__:null,value:e$(a,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:s}),e),CQ=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),AQ=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},TQ=(e,t,n,s)=>{let a,i,o;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!s||s(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&yd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},EQ=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},PQ=e=>{if(!e)return null;if(El(e))return e;let t=e.length;if(!n$(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},OQ=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&yd(Uint8Array)),MQ=(e,t)=>{const s=(e&&e[tf]).call(e);let a;for(;(a=s.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},RQ=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},IQ=Ns("HTMLFormElement"),DQ=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,a){return s.toUpperCase()+a}),{propertyIsEnumerable:LQ}=Object.prototype,$Q=Ns("RegExp"),i$=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};rf(n,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(s[i]=o||a)}),Object.defineProperties(e,s)},FQ=e=>{i$(e,(t,n)=>{if(In(e)&&["arguments","caller","callee"].includes(n))return!1;const s=e[n];if(In(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},BQ=(e,t)=>{const n={},s=a=>{a.forEach(i=>{n[i]=!0})};return El(e)?s(e):s(String(e).split(t)),n},qQ=()=>{},VQ=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function UQ(e){return!!(e&&In(e.append)&&e[t$]==="FormData"&&e[tf])}const zQ=e=>{const t=new WeakSet,n=s=>{if(Qd(s)){if(t.has(s))return;if(Jd(s))return s;if(!("toJSON"in s)){t.add(s);let a;if(xQ(s)){a=[];for(const i of s){const o=n(i);!Pl(o)&&a.push(o)}}else a=El(s)?[]:{},rf(s,(i,o)=>{const l=n(i);!Pl(l)&&(a[o]=l)});return t.delete(s),a}}return s};return n(e)},WQ=Ns("AsyncFunction"),HQ=e=>e&&(Qd(e)||In(e))&&In(e.then)&&In(e.catch),o$=((e,t)=>e?setImmediate:t?((n,s)=>(ol.addEventListener("message",({source:a,data:i})=>{a===ol&&i===n&&s.length&&s.shift()()},!1),a=>{s.push(a),ol.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",In(ol.postMessage)),GQ=typeof queueMicrotask<"u"?queueMicrotask.bind(ol):typeof process<"u"&&process.nextTick||o$,l$=e=>e!=null&&In(e[tf]),KQ=e=>e!=null&&Zh(e,tf)&&l$(e),Z={isArray:El,isArrayBuffer:r$,isBuffer:Jd,isFormData:vQ,isArrayBufferView:iQ,isString:oQ,isNumber:n$,isBoolean:lQ,isObject:Qd,isPlainObject:vx,isEmptyObject:cQ,isReadableStream:jQ,isRequest:wQ,isResponse:NQ,isHeaders:_Q,isUndefined:Pl,isDate:dQ,isFile:uQ,isReactNativeBlob:hQ,isReactNative:mQ,isBlob:fQ,isRegExp:$Q,isFunction:In,isStream:gQ,isURLSearchParams:bQ,isTypedArray:OQ,isFileList:pQ,forEach:rf,merge:K_,extend:kQ,trim:SQ,stripBOM:CQ,inherits:AQ,toFlatObject:TQ,kindOf:fk,kindOfTest:Ns,endsWith:EQ,toArray:PQ,forEachEntry:MQ,matchAll:RQ,isHTMLForm:IQ,hasOwnProperty:Ux,hasOwnProp:Ux,hasOwnInPrototypeChain:Zh,getSafeProp:aQ,reduceDescriptors:i$,freezeMethods:FQ,toObjectSet:BQ,toCamelCase:DQ,noop:qQ,toFiniteNumber:VQ,findKey:s$,global:ol,isContextDefined:a$,isSpecCompliantForm:UQ,toJSONObject:zQ,isAsyncFn:WQ,isThenable:HQ,setImmediate:o$,asap:GQ,isIterable:l$,isSafeIterable:KQ},YQ=Z.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),XQ=e=>{const t={};let n,s,a;return e&&e.split(` 648`).forEach(function(o){a=o.indexOf(":"),n=o.substring(0,a).trim().toLowerCase(),s=o.substring(a+1).trim();const l=Z.hasOwnProp(t,n);
648!n||l&&Z.hasOwnProp(YQ,n)||(n==="set-cookie"?l?t[n].push(s):t[n]=[s]:t[n]=l?t[n]+", "+s:s)}),t};function JQ(e){let t=0,n=e.length;for(;t<n;){const s=e.charCodeAt(t);if(s!==9&&s!==32)break;t+=1}for(;n>t;){const s=e.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const QQ=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ZQ=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function pk(e,t){return Z.isArray(e)?e.map(n=>pk(n,t)):JQ(String(e).replace(t,""))}const eZ=e=>pk(e,QQ),tZ=e=>pk(e,ZQ);function c$(e){const t=Object.create(null);return Z.forEach(e.toJSON(),(n,s)=>{t[s]=tZ(n)}),t}const QP=Symbol("internals");function Zu(e){return e&&String(e).trim().toLowerCase()}function bx(e){return e===!1||e==null?e:Z.isArray(e)?e.map(bx):eZ(String(e))}function rZ(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const nZ=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function P0(e){let t=0,n=e.length;for(;t<n;){const s=e.charCodeAt(t);if(s!==9&&s!==32)break;t+=1}for(;n>t;){const s=e.charCodeAt(n-1);if(s!==9&&s!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}function sZ(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let s=1;s<t;s++){const a=e.charCodeAt(s);if(a===34||a===92&&(s+=1,s>=t))return e;n+=e[s]}return n}function aZ(e){const t=Object.create(null),n=String(e);let s=0,a=!1,i=!1;function o(l){const c=P0(n.slice(s,l)),u=c.indexOf("=");if(u<1)return;const m=P0(c.slice(0,u));if(!nZ.test(m))return;const f=m.toLowerCase();if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=P0(c.slice(u+1));t[f]=sZ(p)}for(let l=0;l<n.length;l++){const c=n.charCodeAt(l);a?i?i=!1:c===92?i=!0:c===34&&(a=!1):c===34?a=!0:(c===44||c===59)&&(o(l),s=l+1)}return o(n.length),t}const iZ=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function O0(e,t,n,s,a){if(Z.isFunction(s))return s.call(this,t,n);if(a&&(t=n),!!Z.isString(t)){if(Z.isString(s))return t.indexOf(s)!==-1;if(Z.isRegExp(s))return s.test(t)}}function oZ(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function lZ(e,t){const n=Z.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{__proto__:null,value:function(a,i,o){return this[s].call(this,t,a,i,o)},configurable:!0})})}let cn=class{constructor(t){t&&this.set(t)}set(t,n,s){const a=this;function i(l,c,u){const m=Zu(c);if(!m)return;const f=Z.findKey(a,m);(!f||a[f]===void 0||u===!0||u===void 0&&a[f]!==!1)&&(a[f||c]=bx(l))}const o=(l,c)=>Z.forEach(l,(u,m)=>i(u,m,c));if(Z.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(Z.isString(t)&&(t=t.trim())&&!iZ(t))o(XQ(t),n);else if(Z.isObject(t)&&Z.isSafeIterable(t)){let l=Object.create(null),c,u;for(const m of t){if(!Z.isArray(m))throw new TypeError("Object iterator must return a key-value pair");u=m[0],Z.hasOwnProp(l,u)?(c=l[u],l[u]=Z.isArray(c)?[...c,m[1]]:[c,m[1]]):l[u]=m[1]}o(l,n)}else t!=null&&i(n,t,s);return this}get(t,n){if(t=Zu(t),t){const s=Z.findKey(this,t);if(s){const a=this[s];if(!n)return a;if(n===!0)return rZ(a);if(Z.isFunction(n))return n.call(this,a,s);if(Z.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Zu(t),t){const s=Z.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||O0(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let a=!1;function i(o){if(o=Zu(o),o){const l=Z.findKey(s,o);l&&(!n||O0(s,s[l],l,n))&&(delete s[l],a=!0)}}return Z.isArray(t)?t.forEach(i):i(t),a}clear(t){const n=Object.keys(this);let s=n.length,a=!1;for(;s--;){const i=n[s];(!t||O0(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const n=this,s={};return Z.forEach(this,(a,i)=>{const o=Z.findKey(s,i);if(o){n[o]=bx(a),delete n[i];return}const l=t?oZ(i):String(i).trim();l!==i&&delete n[i],n[l]=bx(a),s[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Z.forEach(this,(s,a)=>{s!=null&&s!==!1&&(n[a]=t&&Z.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` 649`)}getSetCookie(){const t=this.get("set-cookie");return Z.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return aZ(t)}static concat(t,...n){const s=new this(t);
vendor: 8,574 bytes, line 649
649return n.forEach(a=>s.set(a)),s}static accessor(t){const s=(this[QP]=this[QP]={accessors:{}}).accessors,a=this.prototype;function i(o){const l=Zu(o);s[l]||(lZ(a,o),s[l]=!0)}return Z.isArray(t)?t.forEach(i):i(t),this}};cn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Z.reduceDescriptors(cn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});Z.freezeMethods(cn);const zx="[REDACTED ****]";function cZ(e){if(Z.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(Z.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function dZ(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),s=[],a=i=>{if(i===null||typeof i!="object"||Z.isBuffer(i))return i;if(s.indexOf(i)!==-1)return;i instanceof cn&&(i=i.toJSON()),s.push(i);let o;if(Z.isArray(i))o=[],i.forEach((l,c)=>{const u=a(l);Z.isUndefined(u)||(o[c]=u)});else{if(!Z.isPlainObject(i)&&cZ(i))return s.pop(),i;o=Object.create(null);for(const[l,c]of Object.entries(i)){const u=n.has(l.toLowerCase())?zx:a(c);Z.isUndefined(u)||(o[l]=u)}}return s.pop(),o};return a(e)}function ZP(e){try{return String(e)}catch{return""}}function uZ(e){return e.errors.map(n=>{try{return n&&n.message?ZP(n.message):ZP(n)}catch{return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Me=class d$ extends Error{static from(t,n,s,a,i,o){let l=t.message;!l&&Z.isArray(t.errors)&&t.errors.length&&(l=uZ(t));const c=new d$(l,n||t.code,s,a,i);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),o&&Object.assign(c,o),c}constructor(t,n,s,a,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),s&&(this.config=s),a&&(this.request=a),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&Z.hasOwnProp(t,"redact")?t.redact:void 0,s=Z.isArray(n)&&n.length>0?dZ(t,n):Z.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:s,code:this.code,status:this.status}}};Me.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";Me.ERR_BAD_OPTION="ERR_BAD_OPTION";Me.ECONNABORTED="ECONNABORTED";Me.ETIMEDOUT="ETIMEDOUT";Me.ECONNREFUSED="ECONNREFUSED";Me.ERR_NETWORK="ERR_NETWORK";Me.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";Me.ERR_DEPRECATED="ERR_DEPRECATED";Me.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";Me.ERR_BAD_REQUEST="ERR_BAD_REQUEST";Me.ERR_CANCELED="ERR_CANCELED";Me.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";Me.ERR_INVALID_URL="ERR_INVALID_URL";Me.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const hZ=null,u$=100;function Y_(e){return Z.isPlainObject(e)||Z.isArray(e)}function h$(e){return Z.endsWith(e,"[]")?e.slice(0,-2):e}function M0(e,t,n){return e?e.concat(t).map(function(a,i){return a=h$(a),!n&&i?"["+a+"]":a}).join(n?".":""):t}function mZ(e){return Z.isArray(e)&&!e.some(Y_)}const fZ=Z.toFlatObject(Z,{},null,function(t){return/^is[A-Z]/.test(t)});function xy(e,t,n){if(!Z.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Z.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,S){return!Z.isUndefined(S[N])});const s=n.metaTokens,a=n.visitor||v,i=n.dots,o=n.indexes,l=n.Blob||typeof Blob<"u"&&Blob,c=n.maxDepth===void 0?u$:n.maxDepth,u=l&&Z.isSpecCompliantForm(t),m=[];if(!Z.isFunction(a))throw new TypeError("visitor must be a function");function f(w){if(w===null)return"";if(Z.isDate(w))return w.toISOString();if(Z.isBoolean(w))return w.toString();if(!u&&Z.isBlob(w))throw new Me("Blob is not supported. Use a Buffer instead.");if(Z.isArrayBuffer(w)||Z.isTypedArray(w)){if(u&&typeof l=="function")return new l([w]);throw new Me("Blob is not supported. Use a Buffer instead.",Me.ERR_NOT_SUPPORT)}return w}function p(w){if(w>c)throw new Me("Object is too deeply nested ("+w+" levels). Max depth: "+c,Me.ERR_FORM_DATA_DEPTH_EXCEEDED)}function b(w,N){if(c===1/0)return JSON.stringify(w);const S=[];return JSON.stringify(w,function(k,C){if(!Z.isObject(C))return C;for(;S.length&&S[S.length-1]!==this;)S.pop();return S.push(C),p(N+S.length-1),C})}function v(w,N,S){let A=w;if(Z.isReactNative(t)&&Z.isReactNativeBlob(w))return t.append(M0(S,N,i),f(w)),!1;if(w&&!S&&typeof w=="object"){if(Z.endsWith(N,"{}"))N=s?N:N.slice(0,-2),w=b(w,1);else if(Z.isArray(w)&&mZ(w)||(Z.isFileList(w)||Z.endsWith(N,"[]"))&&(A=Z.toArray(w)))return N=h$(N),A.forEach(function(C,T){!(Z.isUndefined(C)||C===null)&&t.append(o===!0?M0([N],T,i):o===null?N:N+"[]",f(C))}),!1}return Y_(w)?!0:(t.append(M0(S,N,i),f(w)),!1)}const g=Object.assign(fZ,{defaultVisitor:v,convertValue:f,isVisitable:Y_});function y(w,N,S=0){if(!Z.isUndefined(w)){if(p(S),m.indexOf(w)!==-1)throw new Error("Circular reference detected in "+N.join("."));m.push(w),Z.forEach(w,function(k,C){(!(Z.isUndefined(k)||k===null)&&a.call(t,k,Z.isString(C)?C.trim():C,N,g))===!0&&y(k,N?N.concat(C):[C],S+1)}),m.pop()}}if(!Z.isObject(e))throw new TypeError("data must be an object");return y(e),t}function eO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(s){return t[s]})}function xk(e,t){this._pairs=[],e&&xy(e,this,t)}const m$=xk.prototype;m$.append=function(t,n){this._pairs.push([t,n])};m$.toString=function(t){const n=t?s=>t.call(this,s,eO):eO;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function pZ(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function f$(e,t,n){if(!t)return e;e=e||"";const s=Z.isFunction(n)?{serialize:n}:n,a=Z.getSafeProp(s,"encode")||pZ,i=Z.getSafeProp(s,"serialize");let o;if(i?o=i(t,s):o=Z.isURLSearchParams(t)?t.toString():new xk(t,s).toString(a),o){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class tO{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Z.forEach(this.handlers,function(s){s!==null&&t(s)})}}const gk={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},xZ=typeof URLSearchParams<"u"?URLSearchParams:xk,gZ=typeof FormData<"u"?FormData:null,yZ=typeof Blob<"u"?Blob:null,vZ={isBrowser:!0,classes:{URLSearchParams:xZ,FormData:gZ,Blob:yZ},protocols:["http","https","file","blob","url","data"]},yk=typeof window<"u"&&typeof document<"u",X_=typeof navigator=="object"&&navigator||void 0,bZ=yk&&(!X_||["ReactNative","NativeScript","NS"].indexOf(X_.product)<0),jZ=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wZ=yk&&window.location.href||"http://localhost",NZ=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:yk,hasStandardBrowserEnv:bZ,hasStandardBrowserWebWorkerEnv:jZ,navigator:X_,origin:wZ},Symbol.toStringTag,{value:"Module"})),Yr={...NZ,...vZ};function _Z(e,t){return xy(e,new Yr.classes.URLSearchParams,{visitor:function(n,s,a,i){return Yr.isNode&&Z.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}const rO=u$;function p$(e){if(e>rO)throw new Me("FormData field is too deeply nested ("+e+" levels). Max depth: "+rO,Me.ERR_FORM_DATA_DEPTH_EXCEEDED)}function SZ(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let s;for(;(s=n.exec(e))!==null;)p$(t.length),t.push(s[0]==="[]"?"":s[1]||s[0]);return t}function kZ(e){const t={},n=Object.keys(e);let s;const a=n.length;let i;for(s=0;s<a;s++)i=n[s],t[i]=e[i];return t}function x$(e){function t(n,s,a,i){p$(i);let o=n[i++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),c=i>=n.length;return o=!o&&Z.isArray(a)?a.length:o,c?(Z.hasOwnProp(a,o)?a[o]=Z.isArray(a[o])?a[o].concat(s):[a[o],s]:a[o]=s,!l):((!Z.hasOwnProp(a,o)||!Z.isObject(a[o]))&&(a[o]=[]),t(n,s,a[o],i)&&Z.isArray(a[o])&&(a[o]=kZ(a[o])),!l)}if(Z.isFormData(e)&&Z.isFunction(e.entries)){const n={};return Z.forEachEntry(e,(s,a)=>{t(SZ(s),a,n,0)}),n}return null}const Tc=(e,t)=>e!=null&&Z.hasOwnProp(e,t)?e[t]:void 0;
vendor: 10,119 bytes, line 649
649function CZ(e,t,n){if(Z.isString(e))try{return(t||JSON.parse)(e),Z.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const nf={transitional:gk,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",a=s.indexOf("application/json")>-1,i=Z.isObject(t);if(i&&Z.isHTMLForm(t)&&(t=new FormData(t)),Z.isFormData(t))return a?JSON.stringify(x$(t)):t;if(Z.isArrayBuffer(t)||Z.isBuffer(t)||Z.isStream(t)||Z.isFile(t)||Z.isBlob(t)||Z.isReadableStream(t))return t;if(Z.isArrayBufferView(t))return t.buffer;if(Z.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){const c=Tc(this,"formSerializer");if(s.indexOf("application/x-www-form-urlencoded")>-1)return _Z(t,c).toString();if((l=Z.isFileList(t))||s.indexOf("multipart/form-data")>-1){const u=Tc(this,"env"),m=u&&u.FormData;return xy(l?{"files[]":t}:t,m&&new m,c)}}return i||a?(n.setContentType("application/json",!1),CZ(t)):t}],transformResponse:[function(t){const n=Tc(this,"transitional")||nf.transitional,s=n&&n.forcedJSONParsing,a=Tc(this,"responseType"),i=a==="json";if(Z.isResponse(t)||Z.isReadableStream(t))return t;if(t&&Z.isString(t)&&(s&&!a||i)){const l=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,Tc(this,"parseReviver"))}catch(c){if(l)throw c.name==="SyntaxError"?Me.from(c,Me.ERR_BAD_RESPONSE,this,null,Tc(this,"response")):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Yr.classes.FormData,Blob:Yr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Z.forEach(["delete","get","head","post","put","patch","query"],e=>{nf.headers[e]={}});function R0(e,t){const n=this||nf,s=t||n,a=cn.from(s.headers);let i=s.data;return Z.forEach(e,function(l){i=l.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function g$(e){return!!(e&&e.__CANCEL__)}let sf=class extends Me{constructor(t,n,s){super(t??"canceled",Me.ERR_CANCELED,n,s),this.name="CanceledError",this.__CANCEL__=!0}};function y$(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new Me("Request failed with status code "+n.status,n.status>=400&&n.status<500?Me.ERR_BAD_REQUEST:Me.ERR_BAD_RESPONSE,n.config,n.request,n))}function AZ(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function TZ(e,t){e=e||10;const n=new Array(e),s=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(c){const u=Date.now(),m=s[i];o||(o=u),n[a]=c,s[a]=u;let f=i,p=0;for(;f!==a;)p+=n[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-o<t)return;const b=m&&u-m;return b?Math.round(p*1e3/b):void 0}}function EZ(e,t){let n=0,s=1e3/t,a,i;const o=(u,m=Date.now())=>{n=m,a=null,i&&(clearTimeout(i),i=null),e(...u)};return[(...u)=>{const m=Date.now(),f=m-n;f>=s?o(u,m):(a=u,i||(i=setTimeout(()=>{i=null,o(a)},s-f)))},()=>a&&o(a)]}const Wx=(e,t,n=3)=>{let s=0;const a=TZ(50,250);return EZ(i=>{if(!i||typeof i.loaded!="number")return;const o=i.loaded,l=i.lengthComputable?i.total:void 0,c=Math.max(0,l!=null?Math.min(o,l):o),u=Math.max(0,c-s),m=a(u);s=Math.max(s,c);const f={loaded:c,total:l,progress:l?c/l:void 0,bytes:u,rate:m||void 0,estimated:m&&l?(l-c)/m:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},n)},nO=(e,t)=>{const n=e!=null;return[s=>t[0]({lengthComputable:n,total:e,loaded:s}),t[1]]},sO=(e,t=Z.asap)=>(...n)=>t(()=>e(...n)),PZ=Yr.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Yr.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Yr.origin),Yr.navigator&&/(msie|trident)/i.test(Yr.navigator.userAgent)):()=>!0,OZ=Yr.hasStandardBrowserEnv?{write(e,t,n,s,a,i,o){if(typeof document>"u")return;const l=[`${e}=${encodeURIComponent(t)}`];Z.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),Z.isString(s)&&l.push(`path=${s}`),Z.isString(a)&&l.push(`domain=${a}`),i===!0&&l.push("secure"),Z.isString(o)&&l.push(`SameSite=${o}`),document.cookie=l.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const s=t[n].replace(/^\s+/,""),a=s.indexOf("=");if(a!==-1&&s.slice(0,a)===e)try{return decodeURIComponent(s.slice(a+1))}catch{return s.slice(a+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function MZ(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function RZ(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const IZ=/^https?:(?!\/\/)/i,DZ=/[\t\n\r]/g;function LZ(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function $Z(e){return LZ(e).replace(DZ,"")}function FZ(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,s="")=>`${n}${s}${zx}`)}function BZ(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${zx}@`),n=t.indexOf("#"),a=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${zx}`);return n===-1?a:`${a}#${FZ(t.slice(n+1))}`}function aO(e,t){if(typeof e=="string"){const n=$Z(e);if(IZ.test(n))throw new Me(`Invalid URL ${JSON.stringify(BZ(n))}: missing "//" after protocol`,Me.ERR_INVALID_URL,t)}}function v$(e,t,n,s){aO(t,s);let a=!MZ(t);return e&&(a||n===!1)?(aO(e,s),RZ(e,t)):t}const iO=e=>e instanceof cn?{...e}:e,qZ=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function Ol(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function s(m,f,p,b){return Z.isPlainObject(m)&&Z.isPlainObject(f)?Z.merge.call({caseless:b},m,f):Z.isPlainObject(f)?Z.merge({},f):Z.isArray(f)?f.slice():f}function a(m,f,p,b){if(Z.isUndefined(f)){if(!Z.isUndefined(m))return s(void 0,m,p,b)}else return s(m,f,p,b)}function i(m,f){if(!Z.isUndefined(f))return s(void 0,f)}function o(m,f){if(Z.isUndefined(f)){if(!Z.isUndefined(m))return s(void 0,m)}else return s(void 0,f)}function l(m){const f=Z.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!Z.isUndefined(f))if(Z.isPlainObject(f)){if(Z.hasOwnProp(f,m))return f[m]}else return;const p=Z.hasOwnProp(e,"transitional")?e.transitional:void 0;if(Z.isPlainObject(p)&&Z.hasOwnProp(p,m))return p[m]}function c(m,f,p){if(Z.hasOwnProp(t,p))return s(m,f);if(Z.hasOwnProp(e,p))return s(void 0,m)}const u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(m,f,p)=>a(iO(m),iO(f),p,!0)};return Z.forEach(qZ({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const p=Z.hasOwnProp(u,f)?u[f]:a,b=Z.hasOwnProp(e,f)?e[f]:void 0,v=Z.hasOwnProp(t,f)?t[f]:void 0,g=p(b,v,f);Z.isUndefined(g)&&p!==c||(n[f]=g)}),Z.hasOwnProp(t,"validateStatus")&&Z.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(Z.hasOwnProp(e,"validateStatus")?n.validateStatus=s(void 0,e.validateStatus):delete n.validateStatus),n}const VZ=["content-type","content-length"];function UZ(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([s,a])=>{VZ.includes(s.toLowerCase())&&e.set(s,a)})}const zZ=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function b$(e){const t=Ol({},e),n=p=>Z.hasOwnProp(t,p)?t[p]:void 0,s=n("data");let a=n("withXSRFToken");const i=n("xsrfHeaderName"),o=n("xsrfCookieName");let l=n("headers");const c=n("auth"),u=n("baseURL"),m=n("allowAbsoluteUrls"),f=n("url");if(t.headers=l=cn.from(l),t.url=f$(v$(u,f,m,t),n("params"),n("paramsSerializer")),c){const p=Z.getSafeProp(c,"username")||"",b=Z.getSafeProp(c,"password")||"";try{l.set("Authorization","Basic "+btoa(p+":"+(b?zZ(b):"")))}catch(v){throw Me.from(v,Me.ERR_BAD_OPTION_VALUE,e)}}if(Z.isFormData(s)&&(Yr.hasStandardBrowserEnv||Yr.hasStandardBrowserWebWorkerEnv||Z.isReactNative(s)?l.setContentType(void 0):Z.isFunction(s.getHeaders)&&UZ(l,s.getHeaders(),n("formDataHeaderPolicy"))),Yr.hasStandardBrowserEnv&&(Z.isFunction(a)&&(a=a(t)),a===!0||a==null&&PZ(t.url))){const b=i&&o&&OZ.read(o);b&&l.set(i,b)}return t}const WZ=typeof XMLHttpRequest<"u",HZ=WZ&&function(e){return new Promise(function(n,s){const a=b$(e);let i=a.data;const o=cn.from(a.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:u}=a,m,f,p,b,v;function g(){b&&b(),v&&v(),a.cancelToken&&a.cancelToken.unsubscribe(m),a.signal&&a.signal.removeEventListener("abort",m)}let y=new XMLHttpRequest;y.open(a.method.toUpperCase(),a.url,!0),y.timeout=a.timeout;function w(){if(!y)return;const S=cn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),k={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:S,config:e,request:y};y$(function(T){n(T),g()},function(T){s(T),g()},k),y=null}"onloadend"in y?y.onloadend=w:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.startsWith("file:"))||setTimeout(w)},y.onabort=function(){y&&(s(new Me("Request aborted",Me.ECONNABORTED,e,y)),g(),y=null)},y.onerror=function(A){const k=A&&A.message?A.message:"Network Error",C=new Me(k,Me.ERR_NETWORK,e,y);C.event=A||null,s(C),g(),y=null},y.ontimeout=function(){let A=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const k=a.transitional||gk;a.timeoutErrorMessage&&(A=a.timeoutErrorMessage),s(new Me(A,k.clarifyTimeoutError?Me.ETIMEDOUT:Me.ECONNABORTED,e,y)),g(),y=null},i===void 0&&o.setContentType(null),"setRequestHeader"in y&&Z.forEach(c$(
649o),function(A,k){y.setRequestHeader(k,A)}),Z.isUndefined(a.withCredentials)||(y.withCredentials=!!a.withCredentials),l&&l!=="json"&&(y.responseType=a.responseType),u&&([p,v]=Wx(u,!0),y.addEventListener("progress",p)),c&&y.upload&&([f,b]=Wx(c),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",b)),(a.cancelToken||a.signal)&&(m=S=>{y&&(s(!S||S.type?new sf(null,e,y):S),y.abort(),g(),y=null)},a.cancelToken&&a.cancelToken.subscribe(m),a.signal&&(a.signal.aborted?m():a.signal.addEventListener("abort",m)));const N=AZ(a.url);if(N&&!Yr.protocols.includes(N)){s(new Me("Unsupported protocol "+N+":",Me.ERR_BAD_REQUEST,e)),g();return}y.send(i||null)})},GZ=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let s=!1;const a=function(c){if(!s){s=!0,o();const u=c instanceof Error?c:this.reason;n.abort(u instanceof Me?u:new sf(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new Me(`timeout of ${t}ms exceeded`,Me.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>{if(!s){if(c.aborted){a.call(c);return}c.addEventListener("abort",a,{once:!0})}});const{signal:l}=n;return l.unsubscribe=()=>Z.asap(o),l},KZ=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let s=0,a;for(;s<n;)a=s+t,yield e.slice(s,a),s=a},YZ=async function*(e,t){for await(const n of XZ(e))yield*KZ(n,t)},XZ=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:s}=await t.read();if(n)break;yield s}}finally{await t.cancel()}},oO=(e,t,n,s)=>{const a=YZ(e,t);let i=0,o,l=c=>{o||(o=!0,s&&s(c))};return new ReadableStream({async pull(c){try{const{done:u,value:m}=await a.next();if(u){l(),c.close();return}let f=m.byteLength;if(n){let p=i+=f;n(p)}c.enqueue(new Uint8Array(m))}catch(u){throw l(u),u}},cancel(c){return l(c),a.return()}},{highWaterMark:2})},lO=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,j$=(e,t,n)=>t+2<n&&lO(e.charCodeAt(t+1))&&lO(e.charCodeAt(t+2)),cO=e=>e<=57?e-48:(e&223)-55,JZ=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,QZ=e=>e===9||e===10||e===12||e===13||e===32,ZZ=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},eee=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},tee=e=>{const t=e.length;let n=0,s=0,a=!1;for(let i=0;i<t;i++){let o=e.charCodeAt(i);if(o===37&&j$(e,i,t)&&(o=cO(e.charCodeAt(i+1))*16+cO(e.charCodeAt(i+2)),i+=2),!QZ(o)){if(o===61){s++;continue}if(!JZ(o)||s>0){a=!0;continue}n++}}return a||s>2||s>0&&(n+s)%4!==0||n%4===1?eee(e):ZZ(n)},ree=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const s=e.slice(5,n),a=e.slice(n+1);if(/;base64/i.test(s))return t(a);let o=0;for(let l=0,c=a.length;l<c;l++){const u=a.charCodeAt(l);if(u===37&&j$(a,l,c))o+=1,l+=2;else if(u<128)o+=1;else if(u<2048)o+=2;else if(u>=55296&&u<=56319&&l+1<c){const m=a.charCodeAt(l+1);m>=56320&&m<=57343?(o+=4,l++):o+=3}else o+=3}return o};function nee(e){const t=typeof e=="string"?e.indexOf("#"):-1;return ree(t===-1?e:e.slice(0,t),tee)}const vk="1.19.0",dO=64*1024,{isFunction:Ip}=Z,see=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),uO=e=>{if(!Z.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},hO=(e,...t)=>{try{return!!e(...t)}catch{return!1}},aee=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},iee=e=>{const t=Z.global!==void 0&&Z.global!==null?Z.global:globalThis,{ReadableStream:n,TextEncoder:s}=t;e=Z.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:a,Request:i,Response:o}=e,l=a?Ip(a):typeof fetch=="function",c=Ip(i),u=Ip(o);if(!l)return!1;const m=l&&Ip(n),f=l&&(typeof s=="function"?(w=>N=>w.encode(N))(new s):async w=>new Uint8Array(await new i(w).arrayBuffer())),p=c&&m&&hO(()=>{let w=!1;const N=new i(Yr.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),S=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),w&&!S}),b=u&&m&&hO(()=>
vendor: 5,426 bytes, line 649
649Z.isReadableStream(new o("").body)),v={stream:b&&(w=>w.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!v[w]&&(v[w]=(N,S)=>{let A=N&&N[w];if(A)return A.call(N);throw new Me(`Response type '${w}' is not supported`,Me.ERR_NOT_SUPPORT,S)})});const g=async w=>{if(w==null)return 0;if(Z.isBlob(w))return w.size;if(Z.isSpecCompliantForm(w))return(await new i(Yr.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(Z.isArrayBufferView(w)||Z.isArrayBuffer(w))return w.byteLength;if(Z.isURLSearchParams(w)&&(w=w+""),Z.isString(w))return(await f(w)).byteLength},y=async(w,N)=>{const S=Z.toFiniteNumber(w.getContentLength());return S??g(N)};return async w=>{let{url:N,method:S,data:A,signal:k,cancelToken:C,timeout:T,onDownloadProgress:P,onUploadProgress:R,responseType:M,headers:D,withCredentials:$="same-origin",fetchOptions:q,maxContentLength:H,maxBodyLength:L}=b$(w);const F=Z.isNumber(H)&&H>-1,Y=Z.isNumber(L)&&L>-1,U=xe=>Z.hasOwnProp(w,xe)?w[xe]:void 0;let re=a||fetch;M=M?(M+"").toLowerCase():"text";let G=GZ([k,C&&C.toAbortSignal()],T),B=null;const z=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let he,fe=null;const be=()=>new Me("Request body larger than maxBodyLength limit",Me.ERR_BAD_REQUEST,w,B);try{let xe;const pe=U("auth");if(pe){const ke=Z.getSafeProp(pe,"username")||"",ze=Z.getSafeProp(pe,"password")||"";xe={username:ke,password:ze}}if(aee(N)){const ke=new URL(N,Yr.origin);if(!xe&&(ke.username||ke.password)){const ze=uO(ke.username),xt=uO(ke.password);xe={username:ze,password:xt}}(ke.username||ke.password)&&(ke.username="",ke.password="",N=ke.href)}if(xe&&(D.delete("authorization"),D.set("Authorization","Basic "+btoa(see((xe.username||"")+":"+(xe.password||""))))),F&&typeof N=="string"&&N.startsWith("data:")&&nee(N)>H)throw new Me("maxContentLength size of "+H+" exceeded",Me.ERR_BAD_RESPONSE,w,B);if(Y&&S!=="get"&&S!=="head"){const ke=await g(A);if(typeof ke=="number"&&isFinite(ke)&&(he=ke,ke>L))throw be()}const Ae=Y&&(Z.isReadableStream(A)||Z.isStream(A)),ie=(ke,ze,xt)=>oO(ke,dO,Ze=>{if(Y&&Ze>L)throw fe=be();ze&&ze(Ze)},xt);if(p&&S!=="get"&&S!=="head"&&(R||Ae)){if(he=he??await y(D,A),he!==0||Ae){let ke=new i(N,{method:"POST",body:A,duplex:"half"}),ze;if(Z.isFormData(A)&&(ze=ke.headers.get("content-type"))&&D.setContentType(ze),ke.body){const[xt,Ze]=R&&nO(he,Wx(sO(R)))||[];A=ie(ke.body,xt,Ze)}}}else if(Ae&&!c&&m&&S!=="get"&&S!=="head")A=ie(A);else if(Ae&&c&&!p&&S!=="get"&&S!=="head")throw new Me("Stream request bodies are not supported by the current fetch implementation",Me.ERR_NOT_SUPPORT,w,B);Z.isString($)||($=$?"include":"omit");const Ne=c&&"credentials"in i.prototype;if(Z.isFormData(A)){const ke=D.getContentType();ke&&/^multipart\/form-data/i.test(ke)&&!/boundary=/i.test(ke)&&D.delete("content-type")}D.set("User-Agent","axios/"+vk,!1);const Se={...q,signal:G,method:S.toUpperCase(),headers:c$(D.normalize()),body:A,duplex:"half",credentials:Ne?$:void 0};B=c&&new i(N,Se);let te=await(c?re(B,q):re(N,Se));const Oe=cn.from(te.headers);if(F){const ke=Z.toFiniteNumber(Oe.getContentLength());if(ke!=null&&ke>H)throw new Me("maxContentLength size of "+H+" exceeded",Me.ERR_BAD_RESPONSE,w,B)}const ye=b&&(M==="stream"||M==="response");if(b&&te.body&&(P||F||ye&&z)){const ke={};["status","statusText","headers"].forEach(We=>{ke[We]=te[We]});const ze=Z.toFiniteNumber(Oe.getContentLength()),[xt,Ze]=P&&nO(ze,Wx(sO(P),!0))||[];let it=0;const ot=We=>{if(F&&(it=We,it>H))throw new Me("maxContentLength size of "+H+" exceeded",Me.ERR_BAD_RESPONSE,w,B);xt&&xt(We)};te=new o(oO(te.body,dO,ot,()=>{Ze&&Ze(),z&&z()}),ke)}M=M||"text";let Ee=await v[Z.findKey(v,M)||"text"](te,w);if(F&&!b&&!ye){let ke;if(Ee!=null&&(typeof Ee.byteLength=="number"?ke=Ee.byteLength:typeof Ee.size=="number"?ke=Ee.size:typeof Ee=="string"&&(ke=typeof s=="function"?new s().encode(Ee).byteLength:Ee.length)),typeof ke=="number"&&ke>H)throw new Me("maxContentLength size of "+H+" exceeded",Me.ERR_BAD_RESPONSE,w,B)}return!ye&&z&&z(),await new Promise((ke,ze)=>{y$(ke,ze,{data:Ee,headers:cn.from(te.headers),status:te.status,statusText:te.statusText,config:w,request:B})})}catch(xe){if(z&&z(),G&&G.aborted&&G.reason instanceof Me){const pe=G.reason;throw pe.config=w,B&&(pe.request=B),xe!==pe&&Object.defineProperty(pe,"cause",{__proto__:null,value:xe,writable:!0,enumerable:!1,configurable:!0}),pe}if(fe)throw B&&!fe.request&&(fe.request=B),fe;if(xe instanceof Me)throw B&&!xe.request&&(xe.request=B),xe;if(xe&&xe.name==="TypeError"&&/Load failed|fetch/i.test(xe.message)){const pe=new Me("Network Error",Me.ERR_NETWORK,w,B,xe&&xe.response);throw Object.defineProperty(pe,"cause",{__proto__:null,value:xe.cause||xe,writable:!0,enumerable:!1,configurable:!0}),pe}throw Me.from(xe,xe&&xe.code,w,B,xe&&xe.response)}}},oee=new Map,w$=e=>{let t=e&&e.env||{};const{fetch:n,Request:s,Response:a}=t,i=[s,a,n];let o=i.length,l=o,c,u,m=oee;for(;l--;)c=i[l],u=m.get(c),u===void 0&&m.set(c,u=l?new Map:iee(t)),m=u;return u};w$();const bk={http:hZ,xhr:HZ,fetch:{get:w$}};Z.forEach(bk,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const mO=e=>`- ${e}`,lee=e=>Z.isFunction(e)||e===null||e===!1;function cee(e,t){e=Z.isArray(e)?e:[e];const{length:n}=e;let s,a;const i={};for(let o=0;o<n;o++){s=e[o];let l;if(a=s,!lee(s)&&(a=bk[(l=String(s)).toLowerCase()],a===void 0))throw new Me(`Unknown adapter '${l}'`);
vendor: 5,870 bytes, lines 649-655
649if(a&&(Z.isFunction(a)||(a=a.get(t))))break;i[l||"#"+o]=a}if(!a){const o=Object.entries(i).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=n?o.length>1?`since : 650`+o.map(mO).join(` 651`):" "+mO(o[0]):"as no adapter specified";throw new Me("There is no suitable adapter to dispatch the request "+l,Me.ERR_NOT_SUPPORT)}return a}const N$={getAdapter:cee,adapters:bk};function I0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new sf(null,e)}function D0(e){return I0(e),e.headers=cn.from(e.headers),e.data=R0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),N$.getAdapter(e.adapter||nf.adapter,e)(e).then(function(s){I0(e),e.response=s;try{s.data=R0.call(e,e.transformResponse,s)}finally{delete e.response}return s.headers=cn.from(s.headers),s},function(s){if(!g$(s)&&(I0(e),s&&s.response)){e.response=s.response;try{s.response.data=R0.call(e,e.transformResponse,s.response)}finally{delete e.response}s.response.headers=cn.from(s.response.headers)}return Promise.reject(s)})}const gy={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gy[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const fO={};gy.transitional=function(t,n,s){function a(i,o){return"[Axios v"+vk+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,l)=>{if(t===!1)throw new Me(a(o," has been removed"+(n?" in "+n:"")),Me.ERR_DEPRECATED);return n&&!fO[o]&&(fO[o]=!0,console.warn(a(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,l):!0}};gy.spelling=function(t){return(n,s)=>(console.warn(`${s} is likely a misspelling of ${t}`),!0)};function dee(e,t,n){if(typeof e!="object"||e===null)throw new Me("options must be an object",Me.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let a=s.length;for(;a-- >0;){const i=s[a],o=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(o){const l=e[i],c=l===void 0||o(l,i,e);if(c!==!0)throw new Me("option "+i+" must be "+c,Me.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Me("Unknown option "+i,Me.ERR_BAD_OPTION)}}const jx={assertOptions:dee,validators:gy},tn=jx.validators;let Nl=class{constructor(t){this.defaults=t||{},this.interceptors={request:new tO,response:new tO}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=(()=>{if(!a.stack)return"";const o=a.stack.indexOf(` 652`);return o===-1?"":a.stack.slice(o+1)})();try{if(!s.stack)s.stack=i;else if(i){const o=i.indexOf(` 653`),l=o===-1?-1:i.indexOf(` 654`,o+1),c=l===-1?"":i.slice(l+1);String(s.stack).endsWith(c)||(s.stack+=` 655`+i)}}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ol(this.defaults,n);const{transitional:s,paramsSerializer:a,headers:i}=n;s!==void 0&&jx.assertOptions(s,{silentJSONParsing:tn.transitional(tn.boolean),forcedJSONParsing:tn.transitional(tn.boolean),clarifyTimeoutError:tn.transitional(tn.boolean),legacyInterceptorReqResOrdering:tn.transitional(tn.boolean),advertiseZstdAcceptEncoding:tn.transitional(tn.boolean),validateStatusUndefinedResolves:tn.transitional(tn.boolean)},!1),a!=null&&(Z.isFunction(a)?n.paramsSerializer={serialize:a}:jx.assertOptions(a,{encode:tn.function,serialize:tn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),jx.assertOptions(n,{baseUrl:tn.spelling("baseURL"),withXsrfToken:tn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&Z.merge(i.common,i[n.method]);i&&Z.forEach(["delete","get","head","post","put","patch","query","common"],v=>{delete i[v]}),n.headers=cn.concat(o,i);const l=[];let c=!0;this.interceptors.request.forEach(function(g){if(typeof g.runWhen=="function"&&g.runWhen(n)===!1)return;c=c&&g.synchronous;const y=n.transitional||gk;y&&y.legacyInterceptorReqResOrdering?l.unshift(g.fulfilled,g.rejected):l.push(g.fulfilled,g.rejected)});const u=[];this.interceptors.response.forEach(function(g){u.push(g.fulfilled,g.rejected)});let m,f=0,p;if(!c){const v=[D0.bind(this),void 0];for(v.unshift(...l),v.push(...u),p=v.length,m=Promise.resolve(n);f<p;)m=m.then(v[f++],v[f++]);return m}p=l.length;let b=n;for(;f<p;){const v=l[f++],g=l[f++];try{b=v?v(b):b}catch(y){if(!g){m=Promise.reject(y);break}try{const w=g.call(this,y);Z.isThenable(w)&&(m=Promise.resolve(w).then(()=>D0.call(this,b)))}catch(w){m=Promise.reject(w)}break}}if(!m)try{m=D0.call(this,b)}catch(v){m=Promise.reject(v)}for(f=0,p=u.length;f<p;)m=m.then(u[f++],u[f++]);return m}getUri(t){t=Ol(this.defaults,t);const n=v$(t.baseURL,t.url,t.allowAbsoluteUrls,t);return f$(n,t.params,t.paramsSerializer)}};Z.forEach(["delete","get","head","options"],function(t){Nl.prototype[t]=function(n,s){return this.request(Ol(s||{},{method:t,url:n,data:s&&Z.hasOwnProp(s,"data")?s.data:void 0}))}});Z.forEach(["post","put","patch","query"],function(t){function n(s){return function(i,o,l){return this.request(Ol(l||{},{method:t,headers:s?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Nl.prototype[t]=n(),t!=="query"&&(Nl.prototype[t+"Form"]=n(!0))});let uee=class _${constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const s=this;this.promise.then(a=>{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](a);s._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(l=>{s.subscribe(l),i=l}).then(a);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,l){s.reason||(s.reason=new sf(i,o,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}
655subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=s=>{t.abort(s)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new _$(function(a){t=a}),cancel:t}}};function hee(e){return function(n){return e.apply(null,n)}}function mee(e){return Z.isObject(e)&&e.isAxiosError===!0}const J_={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(J_).forEach(([e,t])=>{J_[t]=e});function S$(e){const t=new Nl(e),n=e$(Nl.prototype.request,t);return Z.extend(n,Nl.prototype,t,{allOwnKeys:!0}),Z.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return S$(Ol(e,a))},n}const yr=S$(nf);yr.Axios=Nl;yr.CanceledError=sf;yr.CancelToken=uee;yr.isCancel=g$;yr.VERSION=vk;yr.toFormData=xy;yr.AxiosError=Me;yr.Cancel=yr.CanceledError;yr.all=function(t){return Promise.all(t)};yr.spread=hee;yr.isAxiosError=mee;yr.mergeConfig=Ol;yr.AxiosHeaders=cn;yr.formToJSON=e=>x$(Z.isHTMLForm(e)?new FormData(e):e);yr.getAdapter=N$.getAdapter;yr.HttpStatusCode=J_;yr.default=yr;const{Axios:xPe,AxiosError:gPe,CanceledError:yPe,isCancel:vPe,CancelToken:bPe,VERSION:jPe,all:wPe,Cancel:NPe,isAxiosError:_Pe,spread:SPe,toFormData:kPe,AxiosHeaders:CPe,HttpStatusCode:APe,formToJSON:TPe,getAdapter:EPe,mergeConfig:PPe,create:OPe}=yr,k$=typeof window>"u",pO=!k$&&window.self!==window.top,fee=!k$&&typeof document>"u",C$=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),Wr=[];for(let e=0;e<256;++e)Wr.push((e+256).toString(16).slice(1));function pee(e,t=0){return(Wr[e[t+0]]+Wr[e[t+1]]+Wr[e[t+2]]+Wr[e[t+3]]+"-"+Wr[e[t+4]]+Wr[e[t+5]]+"-"+Wr[e[t+6]]+Wr[e[t+7]]+"-"+Wr[e[t+8]]+Wr[e[t+9]]+"-"+Wr[e[t+10]]+Wr[e[t+11]]+Wr[e[t+12]]+Wr[e[t+13]]+Wr[e[t+14]]+Wr[e[t+15]]).toLowerCase()}let L0;const xee=new Uint8Array(16);function gee(){if(!L0){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");L0=crypto.getRandomValues.bind(crypto)}return L0(xee)}const yee=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),xO={randomUUID:yee};function vee(e,t,n){var a;e=e||{};const s=e.random??((a=e.rng)==null?void 0:a.call(e))??gee();if(s.length<16)throw new Error("Random bytes length must be >= 16");return s[6]=s[6]&15|64,s[8]=s[8]&63|128,pee(s)}function bee(e,t,n){return xO.randomUUID&&!e?xO.randomUUID():vee(e)}const eh=typeof window<"u"?window:{base44SharedInstances:{}};function jee(e,t){return eh.base44SharedInstances||(eh.base44SharedInstances={}),eh.base44SharedInstances[e]||(eh.base44SharedInstances[e]={instance:t()}),eh.base44SharedInstances[e].instance}const wee="__user_heartbeat_event__",Nee="__initialization_event__",_ee="__session_duration_event__",gO="analytics-enable",yO="base44_analytics_session_id",See={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:60*1e3},kee="analytics",Mt=jee(kee,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,fallbackSessionId:null,config:{...See,...Ree()}})),Cee=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:s,enabled:a})=>{var i;const{maxQueueSize:o,throttleTime:l,batchSize:c}=Mt.config;if(!a||!(!((i=Mt.config)===null||i===void 0)&&i.enabled)||fee)return{track:()=>{},cleanup:()=>{}};let u;const m=`${t}/api/apps/${n}/analytics/track/batch`,f=async A=>{await e.request({method:"POST",url:`/apps/${n}/analytics/track/batch`,data:{events:A}})},p=A=>{try{const k=JSON.stringify({events:A}),C=new Blob([k],{type:"application/json"});return typeof navigator>"u"||k.length>6e4||!navigator.sendBeacon(m,C)}catch{return!1}},b=async(A,k={})=>
655{if(A.length===0)return;const C=await Mee(s),T=A.map(Oee(C));try{(!k.isBeacon||!p(T))&&await f(T)}catch{}},v=()=>{bO(b,{throttleTime:l,batchSize:c})},g=A=>{if(Mt.requestsQueue.length>=o)return;const k=Pee();Mt.requestsQueue.push({...A,...k}),v()},y=()=>{bO(b,{throttleTime:l,batchSize:c}),u=jO(g),Tee()},w=()=>{vO(),u==null||u(),Eee(g);const A=Mt.requestsQueue.splice(0);b(A,{isBeacon:!0})},N=()=>{typeof window>"u"||(document.visibilityState==="hidden"?w():document.visibilityState==="visible"&&y())},S=()=>{vO(),u==null||u(),typeof window<"u"&&window.removeEventListener("visibilitychange",N)};return v(),u=jO(g),Aee(g),typeof window<"u"&&window.addEventListener("visibilitychange",N),{track:g,cleanup:S}};function vO(){Mt.isProcessing=!1}async function bO(e,t){if(Mt.isProcessing)return;Mt.isProcessing=!0;const{throttleTime:n=1e3,batchSize:s=30}=t??{};for(;Mt.isProcessing&&Mt.requestsQueue.length>0;){const a=Mt.requestsQueue.splice(0,s);a.length&&await e(a),await new Promise(i=>setTimeout(i,n))}Mt.isProcessing=!1}function jO(e){var t;if(typeof window>
655"u"||Mt.isHeartBeatProcessing||((t=Mt.config.heartBeatInterval)!==null&&t!==void 0?t:0)<10)return()=>{};Mt.isHeartBeatProcessing=!0;const n=setInterval(()=>{e({eventName:wee})},Mt.config.heartBeatInterval);return()=>{clearInterval(n),Mt.isHeartBeatProcessing=!1}}function Aee(e){typeof window>"u"||Mt.wasInitializationTracked||(Mt.wasInitializationTracked=!0,e({eventName:Nee,properties:{referrer:document==null?void 0:document.referrer}}))}function Tee(){typeof window>"u"||Mt.sessionStartTime!==null||(Mt.sessionStartTime=new Date().toISOString())}function Eee(e){if(typeof window>"u"||Mt.sessionStartTime===null)return;const t=new Date().getTime()-new Date(Mt.sessionStartTime).getTime();Mt.sessionStartTime=null,e({eventName:_ee,properties:{sessionDuration:t}})}function Pee(){var e,t;return{timestamp:new Date().toISOString(),pageUrl:typeof window<"u"&&(t=(e=window.location)===null||e===void 0?void 0:e.pathname)!==null&&t!==void 0?t:null}}function Oee(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}let Nh=null;function wO(){Mt.sessionContext=null,Nh=null}async function Mee(e){if(!Mt.sessionContext){if(!e.hasToken())return{user_id:null,session_id:Hx()};if(!Nh){const s=Hx();Nh=e.me().then(a=>({user_id:a.id,session_id:s})).catch(()=>({user_id:null,session_id:s}))}const t=Nh,n=await t;return Nh===t&&(Mt.sessionContext=n),n}return Mt.sessionContext}function Ree(){if(typeof window>"u"||!window.location)return;const t=new URLSearchParams(window.location.search).get(gO);if(t==null||!t.length)return;const n=new URLSearchParams(window.location.search);n.delete(gO);const s=window.location.pathname+(n.toString()?"?"+n.toString():"");return window.history.replaceState({},"",s),{enabled:t==="true"}}function NO(){var e;return(e=Mt.fallbackSessionId)!==null&&e!==void 0?e:Mt.fallbackSessionId=C$()}function Hx(){if(typeof window>"u")return NO();try{const e=localStorage.getItem(yO);if(!e){const t=C$();return localStorage.setItem(yO,t),t}return e}catch{return NO()}}class Iee extends Error{constructor(t,n,s,a,i){super(t),this.name="Base44Error",this.status=n,this.code=s,this.data=a,this.originalError=i}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}}function qc({baseURL:e,headers:t={},token:n,interceptResponses:s=!0,onError:a}){const i=yr.create({baseURL:e,headers:{"Content-Type":"application/json",Accept:"application/json",...t}});return n&&(i.defaults.headers.common.Authorization=`Bearer ${n}`),i.interceptors.request.use(o=>{typeof window<"u"&&(window.location&&o.headers.set("X-Origin-URL",window.location.href),o.headers.get("Authorization")||o.headers.set("X-Base44-Anonymous-Id",Hx()));const l=bee();if(o.requestId=l,pO)try{window.parent.postMessage({type:"api-request-start",requestId:l,data:{url:e+o.url,method:o.method,body:o.data instanceof FormData?"[FormData object]":o.data}},"*")}catch{}return o}),s&&i.interceptors.response.use(o=>{var l;const c=(l=o.config)===null||l===void 0?void 0:l.requestId;try{pO&&c&&window.parent.postMessage({type:"api-request-end",requestId:c,data:{statusCode:o.status,response:o.data}},"*")}catch{}return o.data},o=>{var l,c,u,m,f,p,b,v,g,y,w,N;const S=(l=o.response)===null||l===void 0?void 0:l.data,A=((c=S==null?void 0:S.error)===null||c===void 0?void 0:c.message)||(S==null?void 0:S.message)||(S==null?void 0:S.detail)||o.message,k=new Iee(A,(u=o.response)===null||u===void 0?void 0:u.status,(y=(p=(f=(m=S==null?void 0:S.error)===null||m===void 0?void 0:m.code)!==null&&f!==void 0?f:S==null?void 0:S.code)!==null&&p!==void 0?p:(g=(v=(b=o.response)===null||b===void 0?void 0:b.headers)===null||v===void 0?void 0:v.get)===null||g===void 0?void 0:g.call(v,"x-base44-connector-error"))!==null&&y!==void 0?y:(N=(w=o.response)===null||w===void 0?void 0:w.headers)===null||N===void 0?void 0:N["x-base44-connector-error"],S,o);return a==null||a(k),Promise.reject(k)}),i}function _O(e){const{axios:t,appId:n,getSocket:s}=e;return new Proxy({},{get(a,i){if(!(typeof i!="string"||i==="then"||i.startsWith("_")))return $ee(t,n,i,s)}})}function Dee(e){var t;try{const n=JSON.parse(e);return{type:n.type,data:n.data,id:n.id||((t=n.data)===null||t===void 0?void 0:t.id),timestamp:n.timestamp||new Date().toISOString()}}catch(n){return console.warn("[Base44 SDK] Failed to parse realtime message:",n),null}}const Lee=100;function SO(e){return typeof e=="object"&&e!==null}function $ee(e,t,n,s){const a=`/apps/${t}/entities/${n}`,i=c=>Array.isArray(c)?c.join(","):c,o=(c,u,m,f,p)=>{const b={};return p&&(b.q=JSON.stringify(p)),c&&(b.sort=c),u&&(b.limit=u),m&&(b.skip=m),f&&(b.fields=i(f)),e.get(a,{params:b})},l=(c,u)=>{const m={};return u&&(m.q=JSON.stringify(u)),m.limit=c.limit||Lee,c.cursor&&(m.cursor=c.cursor),"distinct"in c?m.distinct=c.distinct:(c.sort&&(m.sort=c.sort),c.fields&&(m.fields=i(c.fields))),e.get(`${a}/v2/list`,{params:m})};return{async list(...c){const[u,m,f,p]=c;
655return SO(u)?l(u):o(u,m,f,p)},async filter(c,...u){const[m,f,p,b]=u;return SO(m)?l(m,c):o(m,f,p,b,c)},async get(c){return e.get(`${a}/${c}`)},async create(c){return e.post(a,c)},async update(c,u){return e.put(`${a}/${c}`,u)},async delete(c){return e.delete(`${a}/${c}`)},async deleteMany(c){return e.delete(a,{data:c})},async bulkCreate(c){return e.post(`${a}/bulk`,c)},async updateMany(c,u){return e.patch(`${a}/update-many`,{query:c,data:u})},async count(c){const u={};return c&&(u.q=JSON.stringify(c)),(await e.get(`${a}/count`,{params:u})).count},async aggregate(c){return e.post(`${a}/aggregate`,c)},async upsert(c,u){return e.post(`${a}/upsert`,{records:c,key:u.key})},async bulkUpdate(c){return e.put(`${a}/bulk`,c)},async importEntities(c){const u=new FormData;return u.append("file",c,c.name),e.post(`${a}/import`,u,{headers:{"Content-Type":"multipart/form-data"}})},subscribe(c){const u=`entities:${t}:${n}`;return s().subscribeToRoom(u,{update_model:p=>{var b;const v=Dee(p.data);if(v){v.type!=="delete"&&(!((b=v.data)===null||b===void 0)&&b._oversize)&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${v.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${v.id}")\` to fetch the full record.`);try{c(v)}catch(g){console.error("[Base44 SDK] Subscription callback error:",g)}}}})}}}function Fee(e,t){return{async call(n,s,a){if(!(n!=null&&n.trim()))throw new Error("Integration slug is required and cannot be empty");if(!(s!=null&&s.trim()))throw new Error("Operation ID is required and cannot be empty");const{pathParams:i,queryParams:o,...l}=a??{},c={...l,...i&&{path_params:i},...o&&{query_params:o}};return await e.post(`/apps/${t}/integrations/custom/${n}/${s}`,c)}}}function kO(e,t){const n=Fee(e,t);return new Proxy({},{get(s,a){if(!(typeof a!="string"||a==="then"||a.startsWith("_")))return a==="custom"?n:new Proxy({},{get(i,o){if(!(typeof o!="string"||o==="then"||o.startsWith("_")))return async l=>{if(typeof l=="string")throw new Error(`Integration ${o} must receive an object with named parameters, received: ${l}`);let c,u;return l instanceof FormData||l&&Object.values(l).some(m=>m instanceof File)?(c=new FormData,Object.keys(l).forEach(m=>{l[m]instanceof File?c.append(m,l[m],l[m].name):typeof l[m]=="object"&&l[m]!==null?c.append(m,JSON.stringify(l[m])):c.append(m,l[m])}),u="multipart/form-data"):(c=l,u="application/json"),a==="Core"?e.post(`/apps/${t}/integration-endpoints/Core/${o}`,c||l,{headers:{"Content-Type":u}}):e.post(`/apps/${t}/integration-endpoints/installable/${a}/integration-endpoints/${o}`,c||l,{headers:{"Content-Type":u}})}}})}})}function Bee(){return typeof window>"u"?!1:window!==window.parent}function qee(e,t,n){const i=Math.round(window.screenX+(window.outerWidth-500)/2),o=Math.round(window.screenY+(window.outerHeight-600)/2),l=window.open(e,"base44_auth",`width=500,height=600,left=${i},top=${o},resizable=yes,scrollbars=yes`);if(!l)return;const c=()=>{window.removeEventListener("message",u),clearInterval(m),l.closed||l.close()},u=f=>{var p;if(f.origin!==n||f.source!==l||!(!((p=f.data)===null||p===void 0)&&p.access_token))return;c();const b=new URL(t),{access_token:v,is_new_user:g}=f.data;b.searchParams.set("access_token",v),g!=null&&b.searchParams.set("is_new_user",String(g)),window.location.href=b.toString()},m=setInterval(()=>{l.closed&&c()},500);window.addEventListener("message",u)}function Vee(e,t,n,s){let a=null;const i=()=>{a=null};let o=!!s.token;return{hasToken(){return o},async me(){const l=a??e.get(`/apps/${n}/entities/User/me`).finally(()=>{a===l&&(a=null)});return a=l,l},async updateMe(l){return e.put(`/apps/${n}/entities/User/me`,l)},redirectToLogin(l){if(typeof window>"u")throw new Error("Login method can only be used in a browser environment");const c=l?new URL(l,window.location.origin).toString():window.location.href,u=`${s.appBaseUrl}/login?from_url=${encodeURIComponent(c)}`;window.location.href=u},loginWithProvider(l,c="/"){const u=new URL(c,window.location.origin).toString(),m=`app_id=${n}&from_url=${encodeURIComponent(u)}`;let f;l==="sso"?f=`/apps/${n}/auth/sso/login`:f=`/apps/auth${l==="google"?"":`/${l}`}/login`;const p=`${s.appBaseUrl}/api${f}?${m}`;if(Bee()){const b=`${p}&popup_origin=${encodeURIComponent(window.location.origin)}`;return qee(b,u,window.location.origin)}window.location.href=p},logout(l){if(delete e.defaults.headers.common.Authorization,i(),wO(),o=!1,typeof window<"u"){if(window.localStorage)try{window.localStorage.removeItem("base44_access_token"),window.localStorage.removeItem("token")}catch(m){console.error("Failed to remove token from localStorage:",m)}const c=l||window.location.href,u=`${s.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(c)}`;window.location.href=u}},setToken(l,c=!0){if(l&&(i(),wO(),o=!0,e.defaults.headers.common.Authorization=`Bearer ${l}`,t.defaults.headers.common.Authorization=`Bearer ${l}`,c&&typeof window<"u"&&window.localStorage))try{window.localStorage.setItem("base44_access_token",l),window.localStorage.setItem("token",l)}catch(u){console.error("Failed to save token to localStorage:",u)}},async loginViaEmailPassword(l,c,u){var m;try{const f=await e.post(`/apps/${n}/auth/login`,{email:l,password:c,...u&&{turnstile_token:u}}),{access_token:p,user:b}=f;return p&&this.setToken(p),{access_token:p,user:b}}catch(f){throw((m=f.response)===null||m===void 0?void 0:m.status)===401&&await this.logout(),f}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(l,c){return e.post(`/apps/${n}/users/invite-user`,{user_email:l,role:c})},register(l){return e.post(`/apps/${n}/auth/register`,l)},verifyOtp({email:l,otpCode:c}){return e.post(`/apps/${n}/auth/verify-otp`,{email:l,otp_code:c})},resendOtp(l){return e.post(`/apps/${n}/auth/resend-otp`,{email:l})},resetPasswordRequest(l){return e.post(`/apps/${n}/auth/reset-password-request`,{email:l})},resetPassword({resetToken:l,newPassword:c}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:l,new_password:c})},changePassword({userId:l,currentPassword:c,newPassword:u}){return e.post(`/apps/${n}/auth/change-password`,{user_id:l,current_password:c,new_password:u})}}}function Uee(e,t){return{async getAccessToken(n){const s=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(s)},async getIdToken(n){const s=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(s)}}}const zee=new Set(["GET","POST","PUT","PATCH","DELETE","HEAD"]);
655function Wee(e,t){return{async getAccessToken(n){if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");return(await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`)).access_token},async getConnection(n){var s;if(!n||typeof n!="string")throw new Error("Integration type is required and must be a string");const i=await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`);return{accessToken:i.access_token,connectionConfig:(s=i.connection_config)!==null&&s!==void 0?s:null}},async getWorkspaceConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const i=await e.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(n)}`);return{accessToken:i.access_token,connectionConfig:(s=i.connection_config)!==null&&s!==void 0?s:null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`)).access_token},async getCurrentAppUserConnection(n){var s;if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");const i=await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`);return{accessToken:i.access_token,connectionConfig:(s=i.connection_config)!==null&&s!==void 0?s:null}},async callApi(n,s){return A$(n,"Integration type"),Hee(e,`/apps/${t}/connectors/${encodeURIComponent(n)}/call`,s)}}}function A$(e,t){if(!e||typeof e!="string")throw new Error(`${t} is required and must be a string`)}async function Hee(e,t,n){var s,a,i,o,l,c,u,m,f;if(!n||typeof n!="object")throw new Error("Request is required and must be an object");A$(n.path,"Request path");const p=(s=n.method)!==null&&s!==void 0?s:"GET";if(!zee.has(p))throw new Error("Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD");const v=await e.post(t,{method:p,...n.host==null?{}:{host:n.host},path:n.path,query:(a=n.query)!==null&&a!==void 0?a:{},headers:(i=n.headers)!==null&&i!==void 0?i:{},body:(o=n.body)!==null&&o!==void 0?o:null});return{success:v.success,phase:v.phase,status:(l=v.status_code)!==null&&l!==void 0?l:null,data:v.data,dataBase64:(c=v.data_base64)!==null&&c!==void 0?c:null,contentType:(u=v.content_type)!==null&&u!==void 0?u:null,headers:(m=v.headers)!==null&&m!==void 0?m:{},creditsCharged:(f=v.credits_charged)!==null&&f!==void 0?f:0}}function Gee(e,t){return{async connectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");return(await e.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!="string")throw new Error("Connector ID is required and must be a string");await e.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}`)}}}function ro(e={}){const{storageKey:t="base44_access_token",paramName:n="access_token",saveToStorage:s=!0,removeFromUrl:a=!0}=e;let i=null;if(typeof window<"u"&&window.location)try{const o=new URLSearchParams(window.location.search);if(i=o.get(n),i){if(s&&Kee(i,{storageKey:t}),a){o.delete(n);const l=`${window.location.pathname}${o.toString()?`?${o.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}return i}}catch(o){console.error("Error retrieving token from URL:",o)}if(typeof window<"u"&&window.localStorage)try{return i=window.localStorage.getItem(t),i}catch(o){console.error("Error retrieving token from local storage:",o)}return null}function Kee(e,t){const{storageKey:n="base44_access_token"}=t;if(typeof window>"u"||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem("token",e),!0}catch(s){return console.error("Error saving token to local storage:",s),!1}}function Yee({axios:e,serviceRoleAxios:t,appId:n,serverUrl:s,functionsVersion:a,platformHeaders:i}){const o=new Headers(i),l=c=>{const u=c.defaults.headers.common.Authorization;return typeof u=="string"&&u.startsWith("Bearer ")?u:null};return async function(u,m={}){Xee(u);const{fetch:f=fetch,...p}=m,b=new Headers(m.headers),v=(g,y)=>{y&&!b.has(g)&&b.set(g,y)};return v("Authorization",l(e)),v("Base44-Service-Authorization",l(t)),v("Base44-App-Id",n),v("Base44-Api-Url",s),v("Base44-Functions-Version",a),v("Base44-State",o.get("Base44-State")),v("X-Data-Env",o.get("X-Data-Env")),f(u,{...p,headers:b})}}function Xee(e){if(typeof e!="string"||e==="")throw new Error("fetchWithAuth() requires a path, such as '/api/orders'.");const t=e.replace(/[\t\n\r]/g,"").replace(/^[\x00-\x20]+/,"");if(!t.startsWith("/")||t.startsWith("//")||t.startsWith("/\\"))throw new Error(`fetchWithAuth() only sends requests to your app's own origin, so your app's credentials never reach a third party. "${e}" is not a path on it â pass a relative path such as '/api/orders'. Use base44.functions.fetch() to call a Base44 backend function, or plain fetch() for another origin.`)}function CO(e,t,n){const s=(i,o)=>i?`${String(i).replace(/\/$/,"")}${o}`:o,a=i=>{const o=new Headers;if(n!=null&&n.getAuthHeaders){const l=n.getAuthHeaders();Object.entries(l).forEach(([c,u])=>{u!=null&&o.set(c,String(u))})}
655return i&&new Headers(i).forEach((l,c)=>{o.set(c,l)}),o};return{async invoke(i,o){if(typeof o=="string")throw new Error(`Function ${i} must receive an object with named parameters, received: ${o}`);let l,c;return o instanceof FormData||o&&Object.values(o).some(u=>u instanceof File)?(l=new FormData,Object.keys(o).forEach(u=>{o[u]instanceof File?l.append(u,o[u],o[u].name):typeof o[u]=="object"&&o[u]!==null?l.append(u,JSON.stringify(o[u])):l.append(u,o[u])}),c="multipart/form-data"):(l=o,c="application/json"),e.post(`/apps/${t}/functions/${i}`,l||o,{headers:{"Content-Type":c}})},async fetch(i,o={}){const c=`/functions${i.startsWith("/")?i:`/${i}`}`,u=a(o.headers),m={...o,headers:u};return await fetch(s(n==null?void 0:n.baseURL,c),m)}}}function AO({axios:e,getSocket:t,appId:n,serverUrl:s,token:a}){const i=`/apps/${n}/agents`,o={},l=()=>e.get(`${i}/conversations`),c=g=>e.get(`${i}/conversations/${g}`);return{getConversations:l,getConversation:c,listConversations:g=>e.get(`${i}/conversations`,{params:g}),createConversation:g=>e.post(`${i}/conversations`,g),addMessage:async(g,y)=>e.post(`${i}/conversations/v2/${g.id}/messages`,y),subscribeToConversation:(g,y)=>{const w=`/agent-conversations/${g}`,N=t(),S=c(g).then(A=>(o[g]=A,A));return N.subscribeToRoom(w,{connect:()=>{},update_model:async({data:A})=>{const k=JSON.parse(A);if(k._message){await S;const C=k._message,T=o[g];if(T){const P=T.messages||[],R=P.findIndex(D=>D.id===C.id),M=R!==-1?P.map((D,$)=>$===R?C:D):[...P,C];o[g]={...T,messages:M},y==null||y(o[g])}}}})},getWhatsAppConnectURL:g=>{const y=`${s}/api/apps/${n}/agents/${encodeURIComponent(g)}/whatsapp`,w=a??ro();return w?`${y}?token=${w}`:y},getTelegramConnectURL:g=>{const y=`${s}/api/apps/${n}/agents/${encodeURIComponent(g)}/telegram`,w=a??ro();return w?`${y}?token=${w}`:y}}}const TO={openai:"openai",typesafe:"typesafe"};function EO({serverUrl:e,token:t,appId:n,headers:s={}}){return{connection:({provider:i="openai"}={})=>{var o;if(!Object.prototype.hasOwnProperty.call(TO,i))throw new Error(`Unsupported AI Gateway provider: ${i}`);const l=TO[i];return{baseURL:`${e}/api/apps/${n}/ai/${l}/v1`,token:(o=t??ro())!==null&&o!==void 0?o:"",headers:{...s}}}}}function PO(e,t){const n=`/app-logs/${t}`;return{async logUserInApp(s){await e.post(`${n}/log-user-in-app/${s}`)},async fetchLogs(s={}){return await e.get(n,{params:s})},async getStats(s={}){return await e.get(`${n}/stats`,{params:s})}}}function Jee(e,t){return{async getPublicSettings(){return e.get(`/apps/public/prod/public-settings/by-id/${t}`)}}}function Qee(e,t){return{async inviteUser(n,s){if(s!=="user"&&s!=="admin")throw new Error(`Invalid role: "${s}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:s})}}}const wa=Object.create(null);wa.open="0";wa.close="1";wa.ping="2";wa.pong="3";wa.message="4";wa.upgrade="5";wa.noop="6";const wx=Object.create(null);Object.keys(wa).forEach(e=>{wx[wa[e]]=e});const Q_={type:"error",data:"parser error"},T$=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",E$=typeof ArrayBuffer=="function",P$=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jk=({type:e,data:t},n,s)=>T$&&t instanceof Blob?n?s(t):OO(t,s):E$&&(t instanceof ArrayBuffer||P$(t))?n?s(t):OO(new Blob([t]),s):s(wa[e]+(t||"")),OO=(e,t)=>{const n=new FileReader;return n.onload=function(){const s=n.result.split(",")[1];t("b"+(s||""))},n.readAsDataURL(e)};function MO(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let $0;function Zee(e,t){if(T$&&e.data instanceof Blob)return e.data.arrayBuffer().then(MO).then(t);if(E$&&(e.data instanceof ArrayBuffer||P$(e.data)))return t(MO(e.data));jk(e,!1,n=>{$0||($0=new TextEncoder),t($0.encode(n))})}const RO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_h=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<RO.length;e++)_h[RO.charCodeAt(e)]=e;const ete=e=>{let t=e.length*.75,n=e.length,s,a=0,i,o,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),m=new Uint8Array(u);for(s=0;s<n;s+=4)i=_h[e.charCodeAt(s)],o=_h[e.charCodeAt(s+1)],l=_h[e.charCodeAt(s+2)],c=_h[e.charCodeAt(s+3)],m[a++]=i<<2|o>>4,m[a++]=(o&15)<<4|l>>2,m[a++]=(l&3)<<6|c&63;return u},tte=typeof ArrayBuffer=="function",wk=(e,t)=>{if(typeof e!="string")return{type:"message",data:O$(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:rte(e.substring(1),t)}:wx[n]?e.length>1?{type:wx[n],data:e.substring(1)}:{type:wx[n]}:Q_},rte=(e,t)=>
vendor: 4,267 bytes, line 655
655{if(tte){const n=ete(e);return O$(n,t)}else return{base64:!0,data:e}},O$=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},M$="�",nte=(e,t)=>{const n=e.length,s=new Array(n);let a=0;e.forEach((i,o)=>{jk(i,!1,l=>{s[o]=l,++a===n&&t(s.join(M$))})})},ste=(e,t)=>{const n=e.split(M$),s=[];for(let a=0;a<n.length;a++){const i=wk(n[a],t);if(s.push(i),i.type==="error")break}return s};function ate(){return new TransformStream({transform(e,t){Zee(e,n=>{const s=n.length;let a;if(s<126)a=new Uint8Array(1),new DataView(a.buffer).setUint8(0,s);else if(s<65536){a=new Uint8Array(3);const i=new DataView(a.buffer);i.setUint8(0,126),i.setUint16(1,s)}else{a=new Uint8Array(9);const i=new DataView(a.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(s))}e.data&&typeof e.data!="string"&&(a[0]|=128),t.enqueue(a),t.enqueue(n)})}})}let F0;function Dp(e){return e.reduce((t,n)=>t+n.length,0)}function Lp(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let s=0;for(let a=0;a<t;a++)n[a]=e[0][s++],s===e[0].length&&(e.shift(),s=0);return e.length&&s<e[0].length&&(e[0]=e[0].slice(s)),n}function ite(e,t){F0||(F0=new TextDecoder);const n=[];let s=0,a=-1,i=!1;return new TransformStream({transform(o,l){for(n.push(o);;){if(s===0){if(Dp(n)<1)break;const c=Lp(n,1);i=(c[0]&128)===128,a=c[0]&127,a<126?s=3:a===126?s=1:s=2}else if(s===1){if(Dp(n)<2)break;const c=Lp(n,2);a=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),s=3}else if(s===2){if(Dp(n)<8)break;const c=Lp(n,8),u=new DataView(c.buffer,c.byteOffset,c.length),m=u.getUint32(0);if(m>Math.pow(2,21)-1){l.enqueue(Q_);break}a=m*Math.pow(2,32)+u.getUint32(4),s=3}else{if(Dp(n)<a)break;const c=Lp(n,a);l.enqueue(wk(i?c:F0.decode(c),t)),s=0}if(a===0||a>e){l.enqueue(Q_);break}}}})}const R$=4;function wr(e){if(e)return ote(e)}function ote(e){for(var t in wr.prototype)e[t]=wr.prototype[t];return e}wr.prototype.on=wr.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};wr.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};wr.prototype.off=wr.prototype.removeListener=wr.prototype.removeAllListeners=wr.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var s,a=0;a<n.length;a++)if(s=n[a],s===t||s.fn===t){n.splice(a,1);break}return n.length===0&&delete this._callbacks["$"+e],this};wr.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],s=1;s<arguments.length;s++)t[s-1]=arguments[s];if(n){n=n.slice(0);for(var s=0,a=n.length;s<a;++s)n[s].apply(this,t)}return this};wr.prototype.emitReserved=wr.prototype.emit;wr.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};wr.prototype.hasListeners=function(e){return!!this.listeners(e).length};const yy=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),xs=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),lte="arraybuffer";function I$(e,...t){return t.reduce((n,s)=>(e.hasOwnProperty(s)&&(n[s]=e[s]),n),{})}const cte=xs.setTimeout,dte=xs.clearTimeout;function vy(e,t){t.useNativeTimers?(e.setTimeoutFn=cte.bind(xs),e.clearTimeoutFn=dte.bind(xs)):(e.setTimeoutFn=xs.setTimeout.bind(xs),e.clearTimeoutFn=xs.clearTimeout.bind(xs))}const ute=1.33;function hte(e){return typeof e=="string"?mte(e):Math.ceil((e.byteLength||e.size)*ute)}function mte(e){let t=0,n=0;for(let s=0,a=e.length;s<a;s++)t=e.charCodeAt(s),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(s++,n+=4);return n}function D$(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function fte(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function pte(e){let t={},n=e.split("&");for(let s=0,a=n.length;s<a;s++){let i=n[s].split("=");
vendor: 6,278 bytes, line 655
655t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class xte extends Error{constructor(t,n,s){super(t),this.description=n,this.context=s,this.type="TransportError"}}class Nk extends wr{constructor(t){super(),this.writable=!1,vy(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,s){return super.emitReserved("error",new xte(t,n,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=wk(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=fte(t);return n.length?"?"+n:""}}class gte extends Nk{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let s=0;this._polling&&(s++,this.once("pollComplete",function(){--s||n()})),this.writable||(s++,this.once("drain",function(){--s||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=s=>{if(this.readyState==="opening"&&s.type==="open"&&this.onOpen(),s.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(s)};ste(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,nte(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=D$()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let L$=!1;try{L$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const yte=L$;function vte(){}class bte extends gte{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let s=location.port;s||(s=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||s!==t.port}}doWrite(t,n){const s=this.request({method:"POST",data:t});s.on("success",n),s.on("error",(a,i)=>{this.onError("xhr post error",a,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,s)=>{this.onError("xhr poll error",n,s)}),this.pollXhr=t}}class ua extends wr{constructor(t,n,s){super(),this.createRequest=t,vy(this,s),this._opts=s,this._method=s.method||"GET",this._uri=n,this._data=s.data!==void 0?s.data:null,this._create()}_create(){var t;const n=I$(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const s=this._xhr=this.createRequest(n);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0);for(let a in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(a)&&s.setRequestHeader(a,this._opts.extraHeaders[a])}}catch{}if(this._method==="POST")try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{s.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var a;s.readyState===3&&((a=this._opts.cookieJar)===null||a===void 0||a.parseCookies(s.getResponseHeader("set-cookie"))),s.readyState===4&&(s.status===200||s.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof s.status=="number"?s.status:0)},0))},s.send(this._data)}catch(a){this.setTimeoutFn(()=>{this._onError(a)},0);return}typeof document<"u"&&(this._index=ua.requestsCount++,ua.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=vte,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete ua.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}ua.requestsCount=0;ua.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",IO);else if(typeof addEventListener=="function"){const e="onpagehide"in xs?"pagehide":"unload";addEventListener(e,IO,!1)}}function IO(){for(let e in ua.requests)ua.requests.hasOwnProperty(e)&&ua.requests[e].abort()}const jte=(function(){const e=$$({xdomain:!1});return e&&e.responseType!==null})();class wte extends bte{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=jte&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ua($$,this.uri(),t)}}function $$(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||yte))return new XMLHttpRequest}catch{}if(!t)try{return new xs[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const F$=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Nte extends Nk{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,s=F$?{}:I$(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,s)}catch(a){return this.emitReserved("error",a)}
vendor: 16,028 bytes, line 655
655this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const s=t[n],a=n===t.length-1;jk(s,this.supportsBinary,i=>{try{this.doWrite(s,i)}catch{}a&&yy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=D$()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const B0=xs.WebSocket||xs.MozWebSocket;class _te extends Nte{createSocket(t,n,s){return F$?new B0(t,n,s):n?new B0(t,n):new B0(t)}doWrite(t,n){this.ws.send(n)}}class Ste extends Nk{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=ite(Number.MAX_SAFE_INTEGER,this.socket.binaryType),s=t.readable.pipeThrough(n).getReader(),a=ate();a.readable.pipeTo(t.writable),this._writer=a.writable.getWriter();const i=()=>{s.read().then(({done:l,value:c})=>{l||(this.onPacket(c),i())}).catch(l=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const s=t[n],a=n===t.length-1;this._writer.write(s).then(()=>{a&&yy(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const kte={websocket:_te,webtransport:Ste,polling:wte},Cte=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ate=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Z_(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),s=e.indexOf("]");n!=-1&&s!=-1&&(e=e.substring(0,n)+e.substring(n,s).replace(/:/g,";")+e.substring(s,e.length));let a=Cte.exec(e||""),i={},o=14;for(;o--;)i[Ate[o]]=a[o]||"";return n!=-1&&s!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Tte(i,i.path),i.queryKey=Ete(i,i.query),i}function Tte(e,t){const n=/\/{2,9}/g,s=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&s.splice(0,1),t.slice(-1)=="/"&&s.splice(s.length-1,1),s}function Ete(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(s,a,i){a&&(n[a]=i)}),n}const eS=typeof addEventListener=="function"&&typeof removeEventListener=="function",Nx=[];eS&&addEventListener("offline",()=>{Nx.forEach(e=>e())},!1);class oo extends wr{constructor(t,n){if(super(),this.binaryType=lte,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const s=Z_(t);n.hostname=s.host,n.secure=s.protocol==="https"||s.protocol==="wss",n.port=s.port,s.query&&(n.query=s.query)}else n.host&&(n.hostname=Z_(n.host).host);vy(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(s=>{const a=s.prototype.name;this.transports.push(a),this._transportsByName[a]=s}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=pte(this.opts.query)),eS&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Nx.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=R$,n.transport=t,this.id&&(n.sid=this.id);const s=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](s)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&oo.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",oo.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let s=0;s<this.writeBuffer.length;s++){const a=this.writeBuffer[s].data;if(a&&(n+=hte(a)),s>0&&n>this._maxPayload)return this.writeBuffer.slice(0,s);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,yy(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,s){return this._sendPacket("message",t,n,s),this}send(t,n,s){return this._sendPacket("message",t,n,s),this}_sendPacket(t,n,s,a){if(typeof n=="function"&&(a=n,n=void 0),typeof s=="function"&&(a=s,s=null),this.readyState==="closing"||this.readyState==="closed")return;s=s||{},s.compress=s.compress!==!1;const i={type:t,data:n,options:s};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),a&&this.once("flush",a),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},s=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}_onError(t){if(oo.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),eS&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const s=Nx.indexOf(this._offlineEventListener);s!==-1&&Nx.splice(s,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}oo.protocol=R$;class Pte extends oo{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),s=!1;oo.priorWebsocketSuccess=!1;const a=()=>{s||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!s)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;oo.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{s||this.readyState!=="closed"&&(m(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const p=new Error("probe error");p.transport=n.name,this.emitReserved("upgradeError",p)}}))};function i(){s||(s=!0,m(),n.close(),n=null)}const o=f=>{const p=new Error("probe error: "+f);p.transport=n.name,i(),this.emitReserved("upgradeError",p)};function l(){o("transport closed")}function c(){o("socket closed")}function u(f){n&&f.name!==n.name&&i()}const m=()=>{n.removeListener("open",a),n.removeListener("error",o),n.removeListener("close",l),this.off("close",c),this.off("upgrading",u)};n.once("open",a),n.once("error",o),n.once("close",l),this.once("close",c),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{s||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let s=0;s<t.length;s++)~this.transports.indexOf(t[s])&&n.push(t[s]);return n}}let Ote=class extends Pte{constructor(t,n={}){const s=typeof t=="object"?t:n;(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>kte[a]).filter(a=>!!a)),super(t,s)}};function Mte(e,t="",n){let s=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),s=Z_(e)),s.port||(/^(http|ws)$/.test(s.protocol)?s.port="80":/^(http|ws)s$/.test(s.protocol)&&(s.port="443")),s.path=s.path||"/";const i=s.host.indexOf(":")!==-1?"["+s.host+"]":s.host;return s.id=s.protocol+"://"+i+":"+s.port+t,s.href=s.protocol+"://"+i+(n&&n.port===s.port?"":":"+s.port),s}const Rte=typeof ArrayBuffer=="function",Ite=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,B$=Object.prototype.toString,Dte=typeof Blob=="function"||typeof Blob<"u"&&B$.call(Blob)==="[object BlobConstructor]",Lte=typeof File=="function"||typeof File<"u"&&B$.call(File)==="[object FileConstructor]";function _k(e){return Rte&&(e instanceof ArrayBuffer||Ite(e))||Dte&&e instanceof Blob||Lte&&e instanceof File}function _x(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,s=e.length;n<s;n++)if(_x(e[n]))return!0;return!1}if(_k(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return _x(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&_x(e[n]))return!0;return!1}function $te(e){const t=[],n=e.data,s=e;return s.data=tS(n,t),s.attachments=t.length,{packet:s,buffers:t}}function tS(e,t){if(!e)return e;if(_k(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let s=0;s<e.length;s++)n[s]=tS(e[s],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(n[s]=tS(e[s],t));return n}return e}function Fte(e,t){return e.data=rS(e.data,t),delete e.attachments,e}function rS(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=rS(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=rS(e[n],t));return e}const Bte=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var wt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(wt||(wt={}));class qte{constructor(t){this.replacer=t}encode(t){return(t.type===wt.EVENT||t.type===wt.ACK)&&_x(t)?this.encodeAsBinary({type:t.type===wt.EVENT?wt.BINARY_EVENT:wt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===wt.BINARY_EVENT||t.type===wt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=$te(t),s=this.encodeAsString(n.packet),a=n.buffers;return a.unshift(s),a}}class Sk extends wr{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const s=n.type===wt.BINARY_EVENT;s||n.type===wt.BINARY_ACK?(n.type=s?wt.EVENT:wt.ACK,this.reconstructor=new Vte(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(_k(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const s={type:Number(t.charAt(0))};if(wt[s.type]===void 0)throw new Error("unknown packet type "+s.type);if(s.type===wt.BINARY_EVENT||s.type===wt.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");s.attachments=Number(o)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););s.nsp=t.substring(i,n)}else s.nsp="/";const a=t.charAt(n+1);if(a!==""&&Number(a)==a){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}s.id=Number(t.substring(i,n+1))}
vendor: 4,508 bytes, line 655
655if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(Sk.isPayloadValid(s.type,i))s.data=i;else throw new Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case wt.CONNECT:return DO(n);case wt.DISCONNECT:return n===void 0;case wt.CONNECT_ERROR:return typeof n=="string"||DO(n);case wt.EVENT:case wt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Bte.indexOf(n[0])===-1);case wt.ACK:case wt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Vte{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Fte(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function DO(e){return Object.prototype.toString.call(e)==="[object Object]"}const Ute=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Sk,Encoder:qte,get PacketType(){return wt}},Symbol.toStringTag,{value:"Module"}));function Fs(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const zte=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class q$ extends wr{constructor(t,n,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Fs(t,"open",this.onopen.bind(this)),Fs(t,"packet",this.onpacket.bind(this)),Fs(t,"error",this.onerror.bind(this)),Fs(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var s,a,i;if(zte.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:wt.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,f=n.pop();this._registerAckCallback(m,f),o.id=m}const l=(a=(s=this.io.engine)===null||s===void 0?void 0:s.transport)===null||a===void 0?void 0:a.writable,c=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var s;const a=(s=this.flags.timeout)!==null&&s!==void 0?s:this._opts.ackTimeout;if(a===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},a),o=(...l)=>{this.io.clearTimeoutFn(i),n.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((s,a)=>{const i=(o,l)=>o?a(o):s(l);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const s={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((a,...i)=>(this._queue[0],a!==null?s.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(a)):(this._queue.shift(),n&&n(null,...i)),s.pending=!1,this._drainQueue())),this._queue.push(s),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:wt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}
vendor: 7,089 bytes, line 655
655_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(s=>String(s.id)===t)){const s=this.acks[t];delete this.acks[t],s.withError&&s.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case wt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case wt.EVENT:case wt.BINARY_EVENT:this.onevent(t);break;case wt.ACK:case wt.BINARY_ACK:this.onack(t);break;case wt.DISCONNECT:this.ondisconnect();break;case wt.CONNECT_ERROR:this.destroy();const s=new Error(t.data.message);s.data=t.data.data,this.emitReserved("connect_error",s);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const s of n)s.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let s=!1;return function(...a){s||(s=!0,n.packet({type:wt.ACK,id:t,data:a}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:wt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let s=0;s<n.length;s++)if(t===n[s])return n.splice(s,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let s=0;s<n.length;s++)if(t===n[s])return n.splice(s,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const s of n)s.apply(this,t.data)}}}function Zd(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Zd.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Zd.prototype.reset=function(){this.attempts=0};Zd.prototype.setMin=function(e){this.ms=e};Zd.prototype.setMax=function(e){this.max=e};Zd.prototype.setJitter=function(e){this.jitter=e};class nS extends wr{constructor(t,n){var s;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,vy(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((s=n.randomizationFactor)!==null&&s!==void 0?s:.5),this.backoff=new Zd({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const a=n.parser||Ute;this.encoder=new a.Encoder,this.decoder=new a.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Ote(this.uri,this.opts);const n=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;const a=Fs(n,"open",function(){s.onopen(),t&&t()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=Fs(n,"error",i);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{a(),i(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(a),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Fs(t,"ping",this.onping.bind(this)),Fs(t,"data",this.ondata.bind(this)),Fs(t,"error",this.onerror.bind(this)),Fs(t,"close",this.onclose.bind(this)),Fs(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){yy(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new q$(this,t,n),this.nsps[t]=s),s}_destroy(t){const n=Object.keys(this.nsps);for(const s of n)if(this.nsps[s].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let s=0;s<n.length;s++)this.engine.write(n[s],t.options)}
655cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var s;this.cleanup(),(s=this.engine)===null||s===void 0||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(a=>{a?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",a)):t.onreconnect()}))},n);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const th={};function Sx(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Mte(e,t.path||"/socket.io"),s=n.source,a=n.id,i=n.path,o=th[a]&&i in th[a].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return l?c=new nS(s,t):(th[a]||(th[a]=new nS(s,t)),c=th[a]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(Sx,{Manager:nS,Socket:q$,io:Sx,connect:Sx});const Wte=250;function LO(e,t){var n;const s=(n=e.token)!==null&&n!==void 0?n:ro(),a={app_id:e.appId};s?a.token=s:a.anonymous_id=Hx();const i=Sx(e.serverUrl,{path:e.mountPath,transports:e.transports,query:a});return i.on("connect",async()=>{var o;return console.log("connect",i.id),(o=t.connect)===null||o===void 0?void 0:o.call(t)}),i.on("update_model",async o=>{var l;return(l=t.update_model)===null||l===void 0?void 0:l.call(t,o)}),i.on("error",async o=>{var l;return(l=t.error)===null||l===void 0?void 0:l.call(t,o)}),i.on("connect_error",async o=>{var l;return console.error("connect_error",o),(l=t.error)===null||l===void 0?void 0:l.call(t,o)}),i}function Hte({config:e}){let t={...e};const n={},s={},a={connect:async()=>{const w=[];Object.keys(n).forEach(N=>{const S=p(N);S.length!==0&&(u(N),S.forEach(({connect:A})=>{const k=async()=>A==null?void 0:A();w.push(k())}))}),await Promise.all(w)},update_model:async w=>{const S=p(w.room).map(A=>{var k;return(k=A.update_model)===null||k===void 0?void 0:k.call(A,w)});await Promise.all(S)},error:async w=>{console.error("error",w);const N=Object.values(n).flat().map(S=>{var A;return(A=S.error)===null||A===void 0?void 0:A.call(S,w)});await Promise.all(N)}};let i=LO(e,a);function o(){l()}function l(){v(),i&&i.disconnect()}function c(w){o(),t={...t,...w},i=LO(t,a)}function u(w){i.emit("join",w)}function m(w){i.emit("leave",w)}async function f(w,N){var S;const A=JSON.stringify(N);return(S=a.update_model)===null||S===void 0?void 0:S.call(a,{room:w,data:A})}function p(w){var N;return(N=n[w])!==null&&N!==void 0?N:[]}function b(w){const N=s[w];N&&(clearTimeout(N),delete s[w])}function v(){Object.keys(s).forEach(w=>{var N,S;clearTimeout(s[w]),delete s[w],((S=(N=n[w])===null||N===void 0?void 0:N.length)!==null&&S!==void 0?S:0)===0&&delete n[w]})}function g(w){b(w),s[w]=setTimeout(()=>{var N,S;delete s[w],!(((S=(N=n[w])===null||N===void 0?void 0:N.length)!==null&&S!==void 0?S:0)>0)&&(m(w),delete n[w])},Wte)}return{socket:i,subscribeToRoom:(w,N)=>{n[w]?b(w):(u(w),n[w]=[]),n[w].push(N);let S=!1;return()=>{var A,k;S||(S=!0,n[w]=(k=(A=n[w])===null||A===void 0?void 0:A.filter(C=>C!==N))!==null&&k!==void 0?k:[],n[w].length===0&&g(w))}},updateConfig:c,updateModel:f,disconnect:l}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` 656 PartySocket requires a global 'EventTarget' class to be available! 657 You can polyfill this global by adding this to your code before any partysocket imports: 658 659 \`\`\` 660 import 'partysocket/event-target-polyfill'; 661 \`\`\` 662 Please file an issue at https://github.com/partykit/partykit if you're still having trouble. 663`);
vendor: 4,425 bytes, line 663
663var V$=class extends Event{constructor(t,n){super("error",n);zt(this,"message");zt(this,"error");this.message=t.message,this.error=t}},U$=class extends Event{constructor(t=1e3,n="",s){super("close",s);zt(this,"code");zt(this,"reason");zt(this,"wasClean",!0);this.code=t,this.reason=n}},q0={Event,ErrorEvent:V$,CloseEvent:U$};function Gte(e,t){if(!e)throw new Error(t)}function Kte(e){return new e.constructor(e.type,e)}function Yte(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new U$(e.code||1999,e.reason||"unknown reason",e):"error"in e?new V$(e.error,e):new Event(e.type,e)}var WL,Xte=typeof process<"u"&&typeof((WL=process.versions)==null?void 0:WL.node)<"u"&&typeof document>"u",$p=Xte?Yte:Kte,Wo={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0},$O=!1,Jte=class Zo extends EventTarget{constructor(n,s,a={}){super();zt(this,"_ws");zt(this,"_retryCount",-1);zt(this,"_uptimeTimeout");zt(this,"_connectTimeout");zt(this,"_shouldReconnect",!0);zt(this,"_connectLock",!1);zt(this,"_binaryType","blob");zt(this,"_closeCalled",!1);zt(this,"_messageQueue",[]);zt(this,"_url");zt(this,"_protocols");zt(this,"_options");zt(this,"onclose",null);zt(this,"onerror",null);zt(this,"onmessage",null);zt(this,"onopen",null);zt(this,"_handleOpen",n=>{this._debug("open event");const{minUptime:s=Wo.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),s),Gte(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(a=>{var i;return(i=this._ws)==null?void 0:i.send(a)}),this._messageQueue=[],this.onopen&&this.onopen(n),this.dispatchEvent($p(n))});zt(this,"_handleMessage",n=>{this._debug("message event"),this.onmessage&&this.onmessage(n),this.dispatchEvent($p(n))});zt(this,"_handleError",n=>{this._debug("error event",n.message),this._disconnect(void 0,n.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(n),this._debug("exec error listeners"),this.dispatchEvent($p(n)),this._connect()});zt(this,"_handleClose",n=>{this._debug("close event"),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(n),this.dispatchEvent($p(n))});this._url=n,this._protocols=s,this._options=a,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Zo.CONNECTING}get OPEN(){return Zo.OPEN}get CLOSING(){return Zo.CLOSING}get CLOSED(){return Zo.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(n){this._binaryType=n,this._ws&&(this._ws.binaryType=n)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((s,a)=>(typeof a=="string"?s+=a.length:a instanceof Blob?s+=a.size:s+=a.byteLength,s),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?Zo.CLOSED:Zo.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}close(n=1e3,s){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED){this._debug("close: already closed");return}this._ws.close(n,s)}reconnect(n,s){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED?this._connect():(this._disconnect(n,s),this._connect())}send(n){if(this._ws&&this._ws.readyState===this.OPEN)this._debug("send",n),this._ws.send(n);else{const{maxEnqueuedMessages:s=Wo.maxEnqueuedMessages}=this._options;this._messageQueue.length<s&&(this._debug("enqueue",n),this._messageQueue.push(n))}}_debug(...n){this._options.debug&&console.log.apply(console,["RWS>",...n])}_getNextDelay(){const{reconnectionDelayGrowFactor:n=Wo.reconnectionDelayGrowFactor,minReconnectionDelay:s=Wo.minReconnectionDelay,maxReconnectionDelay:a=Wo.maxReconnectionDelay}=this._options;let i=0;return this._retryCount>0&&(i=s*Math.pow(n,this._retryCount-1),i>a&&(i=a)),this._debug("next delay",i),i}
663_wait(){return new Promise(n=>{setTimeout(n,this._getNextDelay())})}_getNextProtocols(n){if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(typeof n=="function"){const s=n();if(!s)return Promise.resolve(null);if(typeof s=="string"||Array.isArray(s))return Promise.resolve(s);if(s.then)return s}throw Error("Invalid protocols")}_getNextUrl(n){if(typeof n=="string")return Promise.resolve(n);if(typeof n=="function"){const s=n();if(typeof s=="string")return Promise.resolve(s);if(s.then)return s}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;const{maxRetries:n=Wo.maxRetries,connectionTimeout:s=Wo.connectionTimeout}=this._options;if(this._retryCount>=n){this._debug("max retries reached",this._retryCount,">=",n);return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([a,i])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!$O&&(console.error(`â¼ï¸ No WebSocket implementation available. You should define options.WebSocket. 664 665For example, if you're using node.js, run \`npm install ws\`, and then in your code: 666 667import PartySocket from 'partysocket'; 668import WS from 'ws'; 669 670const partysocket = new PartySocket({ 671 host: "127.0.0.1:1999", 672 room: "test-room", 673 WebSocket: WS 674}); 675 676`),$O=!0);const o=this._options.WebSocket||WebSocket;this._debug("connect",{url:a,protocols:i}),this._ws=i?new o(a,i):new o(a),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),s)}).catch(a=>{this._connectLock=!1,this._handleError(new q0.ErrorEvent(Error(a.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new q0.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(n=1e3,s){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{this._ws.close(n,s),this._handleClose(new q0.CloseEvent(n,s,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};/*! 677 * Reconnecting WebSocket 678 * by Pedro Ladaria <[email protected]> 679 * https://github.com/pladaria/reconnecting-websocket 680 * License MIT 681 */const Qte=1e3,Zte=3e3,ere=new Set([405,409,422,503]),tre=new Set([400,403,404]);function rre(e){const t=e&&typeof e=="object"?e.status:void 0;return typeof t=="number"?t:void 0}function nre(e){return e instanceof Error?e:new Error(String(e))}class sre{constructor(t,n,s,a,i){var o;this.onClose=i,this.listeners=new Set,this.heartbeat=null,this.closed=!1,this.id=(o=a==null?void 0:a.id)!==null&&o!==void 0?o:crypto.randomUUID();let l=s.transport==="proxy";const c=async()=>{var p;if(this.closed)throw new Error("Actor connection is closed");if(!l)try{const{websocket_url:b,token:v}=await s.mintConnectionToken(t,n,this.id),g=b.includes("?")?"&":"?";return`${b}${g}token=${encodeURIComponent(v)}`}catch(b){const v=rre(b);if(!(s.transport!=="direct"&&v!==void 0&&ere.has(v))){v!==void 0&&tre.has(v)&&this.close();try{(p=s.onMintError)===null||p===void 0||p.call(s,nre(b))}catch{}throw b}l=!0}return ire(s.host,t,n,this.id,s.appId,s.getAuthToken(),s.functionsVersion)},u=new Jte(c);this.ws=u;let m=Date.now();const f=()=>{m=Date.now()};u.addEventListener("open",f),u.addEventListener("message",p=>{f();let b;try{b=JSON.parse(p.data)}catch{return}if((b&&typeof b=="object"?b.type:void 0)!=="__pong")for(const g of this.listeners)g(b)}),this.heartbeat=setInterval(()=>{if(Date.now()-m>Zte){f(),u.readyState===u.OPEN&&u.reconnect();return}try{u.send(JSON.stringify({type:"__ping"}))}catch{}},Qte)}subscribe(t){return this.listeners.add(t),{unsubscribe:()=>{this.listeners.delete(t)}}}send(t){this.closed||this.ws.send(JSON.stringify(t))}close(){this.closed||(this.closed=!0,this.heartbeat&&(clearInterval(this.heartbeat),this.heartbeat=null),this.listeners.clear(),this.ws.close(),this.onClose())}}function are(e,t,n,s){let a=null;return{connect(i){if(a)return a;const o=new sre(e,t,n,i,()=>{s.delete(o),a===o&&(a=null)});return a=o,s.add(o),o}}}function ire(e,t,n,s,a,i,o){let l=e.replace(/^(http|https|ws|wss):\/\//,"");l.endsWith("/")&&(l=l.slice(0,-1));const c=l.startsWith("localhost:")||l.startsWith("127.0.0.1:")||l.startsWith("192.168.")||l.startsWith("10.")||l.startsWith("172.")&&l.split(".")[1]>="16"&&l.split(".")[1]<="31"||l.startsWith("[::ffff:7f00:1]:"),u=new URLSearchParams([["_pk",s],["app_id",a],["handler",t]]);
681return i&&u.append("token",i),o&&u.append("fv",o),`${c?"ws":"wss"}://${l}/parties/${t}/${n}?${u}`}function ore(e,t){return e&&!e.startsWith("/")?e:t??e}function lre(e){const t=new Set;return{module:new Proxy({},{get(s,a){if(!(typeof a!="string"||a==="then"))return i=>are(a,i,e,t)}}),closeAll:()=>{for(const s of[...t])s.close()}}}function cre(e){var t,n,s,a;const{serverUrl:i="https://base44.app",appId:o,analytics:l,token:c,serviceToken:u,requiresAuth:m=!1,appBaseUrl:f,options:p,functionsVersion:b,headers:v}=e,g=typeof f=="string"?f:"",y={serverUrl:i,mountPath:"/ws-user-apps/socket.io/",transports:["websocket"],appId:o,token:c};let w=null;const N=()=>(w||(w=Hte({config:y})),w),S={...v,"X-App-Id":String(o)},A=v==null?void 0:v["Base44-State"],k=A?{"Base44-State":A}:{},C=b?{...S,"Base44-Functions-Version":b}:S,T=qc({baseURL:`${i}/api`,headers:S,token:c,onError:p==null?void 0:p.onError}),P=qc({baseURL:`${i}/api`,headers:C,token:c,interceptResponses:!1,onError:p==null?void 0:p.onError}),R={...S,...c?{"on-behalf-of":`Bearer ${c}`}:{}},M=qc({baseURL:`${i}/api`,headers:R,token:u,onError:p==null?void 0:p.onError}),D=qc({baseURL:`${i}/api`,headers:C,token:u,interceptResponses:!1}),$=qc({baseURL:`${i}/api`,headers:S}),q=Vee(T,P,o,{appBaseUrl:g,token:c});if(typeof window<"u"){const U=c||ro();U&&q.setToken(U)}const H=lre({appId:o,host:ore(i,typeof window<"u"?(t=window.location)===null||t===void 0?void 0:t.origin:void 0),functionsVersion:b,getAuthToken:()=>c||ro(),mintConnectionToken:async(U,re,G)=>{const B=c||ro();return await $.post(`/apps/${o}/actors/${encodeURIComponent(U)}/connection-token`,{room:re,connection_id:G},{headers:{...B?{Authorization:`Bearer ${B}`}:{},...b?{"Base44-Functions-Version":b}:{}}})},transport:p==null?void 0:p.actorsTransport,onMintError:p==null?void 0:p.onError}),L={entities:_O({axios:T,appId:o,getSocket:N}),integrations:kO(T,o),connectors:Gee(T,o),auth:q,functions:CO(P,o,{getAuthHeaders:()=>{const U={},re=c||ro();return re&&(U.Authorization=`Bearer ${re}`),U},baseURL:(n=P.defaults)===null||n===void 0?void 0:n.baseURL}),agents:AO({axios:T,getSocket:N,appId:o,serverUrl:i,token:c}),aiGateway:EO({serverUrl:i,token:c,appId:o,headers:k}),appLogs:PO(T,o),app:Jee(T,o),users:Qee(T,o),analytics:Cee({axiosClient:T,serverUrl:i,appId:o,userAuthModule:q,enabled:(s=l==null?void 0:l.enabled)!==null&&s!==void 0?s:!0}),actors:H.module,cleanup:()=>{L.analytics.cleanup(),H.closeAll(),w&&w.disconnect()}},F={entities:_O({axios:M,appId:o,getSocket:N}
681),integrations:kO(M,o),sso:Uee(M,o),connectors:Wee(M,o),functions:CO(D,o,{getAuthHeaders:()=>{const U={};return u&&(U.Authorization=`Bearer ${u}`),U},baseURL:(a=D.defaults)===null||a===void 0?void 0:a.baseURL}),agents:AO({axios:M,getSocket:N,appId:o,serverUrl:i,token:c}),aiGateway:EO({serverUrl:i,token:u,appId:o,headers:k}),appLogs:PO(M,o),cleanup:()=>{w&&w.disconnect()}};return m&&typeof window<"u"&&setTimeout(async()=>{try{await L.auth.isAuthenticated()||L.auth.redirectToLogin(window.location.href)}catch(U){console.error("Authentication check failed:",U),L.auth.redirectToLogin(window.location.href)}},0),{...L,fetchWithAuth:Yee({axios:T,serviceRoleAxios:M,appId:String(o),serverUrl:i,functionsVersion:b,platformHeaders:v}),setToken(U){L.auth.setToken(U),w&&w.updateConfig({token:U}),y.token=U},getConfig(){return{serverUrl:i,appId:o,requiresAuth:m}},get asServiceRole(){if(!u)throw new Error("Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.");return F}}}const z$=typeof window>"u",dre=z$?{localStorage:new Map}:window,Dh=dre.localStorage,ure=e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),Ec=(e,{defaultValue:t=void 0,removeFromUrl:n=!1}={})=>{if(z$)return t;const s=`base44_${ure(e)}`,a=new URLSearchParams(window.location.search),i=a.get(e);if(n){a.delete(e);const l=`${window.location.pathname}${a.toString()?`?${a.toString()}`:""}${window.location.hash}`;window.history.replaceState({},document.title,l)}if(i)return Dh.setItem(s,i),i;if(t)return Dh.setItem(s,t),t;const o=Dh.getItem(s);return o||null},hre=()=>(Ec("clear_access_token")==="true"&&(Dh.removeItem("base44_access_token"),Dh.removeItem("token")),{appId:Ec("app_id",{defaultValue:"6a1b3d1716f08dd8678a631f"}),token:Ec("access_token",{removeFromUrl:!0}),fromUrl:Ec("from_url",{defaultValue:window.location.href}),functionsVersion:Ec("functions_version",{defaultValue:"prod"}),appBaseUrl:Ec("app_base_url",{defaultValue:void 0})}),Sh={...hre()},{appId:mre,token:fre,functionsVersion:pre,appBaseUrl:xre}=Sh,W=cre({appId:mre,token:fre,functionsVersion:pre,serverUrl:"",requiresAuth:!1,appBaseUrl:xre});function gre({}){var a;const t=Yl().pathname.substring(1),{data:n,isFetched:s}=YX({queryKey:["user"],queryFn:async()=>{try{return{user:await W.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return r.jsx("div",{className:"min-h-screen flex items-center justify-center p-6 bg-slate-50",children:r.jsx("div",{className:"max-w-md w-full",children:r.jsxs("div",{className:"text-center space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("h1",{className:"text-7xl font-light text-slate-300",children:"404"}),r.jsx("div",{className:"h-0.5 w-16 bg-slate-200 mx-auto"})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsx("h2",{className:"text-2xl font-medium text-slate-800",children:"Page Not Found"}),r.jsxs("p",{className:"text-slate-600 leading-relaxed",children:["The page ",r.jsxs("span",{className:"font-medium text-slate-700",children:['"',t,'"']})," could not be found in this application."]})]}),s&&n.isAuthenticated&&((a=n.user)==null?void 0:a.role)==="admin"&&r.jsx("div",{className:"mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200",children:r.jsxs("div",{className:"flex items-start space-x-3",children:[r.jsx("div",{className:"flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5",children:r.jsx("div",{className:"w-2 h-2 rounded-full bg-orange-400"})}),r.jsxs("div",{className:"text-left space-y-1",children:[r.jsx("p",{className:"text-sm font-medium text-slate-700",children:"Admin Note"}),r.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:"This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat."})]})]})}),r.jsx("div",{className:"pt-6",children:r.jsxs("button",{onClick:()=>window.location.href="/",className:"inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500",children:[r.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),"Go Home"]})})]})})})}const W$=j.createContext(),yre=({children:e})=>{const[t,n]=j.useState(null),[s,a]=j.useState(!1),[i,o]=j.useState(!0),[l,c]=j.useState(!0),[u,m]=j.useState(null),[f,p]=j.useState(!1),[b,v]=j.useState(null);j.useEffect(()=>{g()},[]);const g=async()=>{var S,A;try{c(!0),m(null);const k=qc({baseURL:"/api/apps/public",headers:{"X-App-Id":Sh.appId},token:Sh.token,interceptResponses:!0});try{const C=await k.get(`/prod/public-settings/by-id/${Sh.appId}`);v(C),Sh.token?await y():(o(!1),a(!1),p(!0)),c(!1)}catch(C){if(console.error("App state check failed:",C),C.status===403&&((A=(S=C.data)==null?void 0:S.extra_data)!=null&&A.reason)){const T=C.data.extra_data.reason;m(T==="auth_required"?{type:"auth_required",message:"Authentication required"}:T==="user_not_registered"?{type:"user_not_registered",message:"User not registered for this app"}:{type:T,message:C.message})}else m({type:"unknown",message:C.message||"Failed to load app"});c(!1),o(!1)}}catch(k){console.error("Unexpected error:",k),m({type:"unknown",message:k.message||"An unexpected error occurred"}),c(!1),o(!1)}},y=async()=>{try{o(!0);const S=await W.auth.me();n(S),a(!0),o(!1),p(!0)}catch(S){console.error("User auth check failed:",S),o(!1),a(!1),p(!0),(S.status===401||S.status===403)&&m({type:"auth_required",message:"Authentication required"})}},w=(S=!0)=>{n(null),a(!1),S?W.auth.logout(window.location.href):W.auth.logout()},N=()=>{W.auth.redirectToLogin(window.location.href)};return r.jsx(W$.Provider,{value:{user:t,isAuthenticated:s,isLoadingAuth:i,isLoadingPublicSettings:l,authError:u,appPublicSettings:b,authChecked:f,logout:w,navigateToLogin:N,checkUserAuth:y,checkAppState:g},children:e})},vo=()=>{const e=j.useContext(W$);if(!e)throw new Error("useAuth must be used within an AuthProvider");return e},vre=()=>r.jsx("div",{className:"flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50",children:r.jsx("div",{className:"max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100",children:r.jsx("svg",{className:"w-8 h-8 text-orange-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),r.jsx("h1",{className:"text-3xl font-bold text-slate-900 mb-4",children:"Access Restricted"}),r.jsx("p",{className:"text-slate-600 mb-8",children:"You are not registered to use this application. Please contact the app administrator to request access."}),r.jsxs("div",{className:"p-4 bg-slate-50 rounded-md text-sm text-slate-600",children:[r.jsx("p",{children:"If you believe this is an error, you can:"}),r.jsxs("ul",{className:"list-disc list-inside mt-2 space-y-1",children:[r.jsx("li",{children:"Verify you are logged in with the correct account"}),r.jsx("li",{children:"Contact the app administrator for access"}),r.jsx("li",{children:"Try logging out and back in again"})]})]})]})})});function FO(e,t){if(typeof e=="function")return e(t);
vendor: 4,107 bytes, line 681
681e!=null&&(e.current=t)}function Xl(...e){return t=>{let n=!1;const s=e.map(a=>{const i=FO(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<s.length;a++){const i=s[a];typeof i=="function"?i():FO(e[a],null)}}}}function rr(...e){return j.useCallback(Xl(...e),e)}var bre=Symbol.for("react.lazy"),Gx=cy[" use ".trim().toString()];function jre(e){return typeof e=="object"&&e!==null&&"then"in e}function H$(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===bre&&"_payload"in e&&jre(e._payload)}function G$(e){const t=Nre(e),n=j.forwardRef((s,a)=>{let{children:i,...o}=s;H$(i)&&typeof Gx=="function"&&(i=Gx(i._payload));const l=j.Children.toArray(i),c=l.find(Sre);if(c){const u=c.props.children,m=l.map(f=>f===c?j.Children.count(u)>1?j.Children.only(null):j.isValidElement(u)?u.props.children:null:f);return r.jsx(t,{...o,ref:a,children:j.isValidElement(u)?j.cloneElement(u,void 0,m):null})}return r.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var wre=G$("Slot");function Nre(e){const t=j.forwardRef((n,s)=>{let{children:a,...i}=n;if(H$(a)&&typeof Gx=="function"&&(a=Gx(a._payload)),j.isValidElement(a)){const o=Cre(a),l=kre(i,a.props);return a.type!==j.Fragment&&(l.ref=s?Xl(s,o):o),j.cloneElement(a,l)}return j.Children.count(a)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _re=Symbol("radix.slottable");function Sre(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_re}function kre(e,t){const n={...t};for(const s in t){const a=e[s],i=t[s];/^on[A-Z]/.test(s)?a&&i?n[s]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[s]=a):s==="style"?n[s]={...a,...i}:s==="className"&&(n[s]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function Cre(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Are=Gm("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),K=j.forwardRef(({className:e,variant:t,size:n,asChild:s=!1,...a},i)=>{const o=s?wre:"button";return r.jsx(o,{className:lt(Are({variant:t,size:n,className:e})),ref:i,...a})});K.displayName="Button";const de=j.forwardRef(({className:e,type:t,...n},s)=>r.jsx("input",{type:t,className:lt("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:s,...n}));de.displayName="Input";var Tre=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ere=Tre.reduce((e,t)=>{const n=G$(`Primitive.${t}`),s=j.forwardRef((a,i)=>{const{asChild:o,...l}=a,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(c,{...l,ref:i})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{}),Pre="Label",K$=j.forwardRef((e,t)=>
681r.jsx(Ere.label,{...e,ref:t,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));K$.displayName=Pre;var Y$=K$;const Ore=Gm("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Qc=j.forwardRef(({className:e,...t},n)=>r.jsx(Y$,{ref:n,className:lt(Ore(),e),...t}));Qc.displayName=Y$.displayName;function sS({icon:e,title:t,subtitle:n,footer:s,children:a}){return r.jsx("div",{className:"min-h-screen flex items-center justify-center bg-background px-4",children:r.jsxs("div",{className:"w-full max-w-md",children:[r.jsxs("div",{className:"text-center mb-10",children:[r.jsx("div",{className:"inline-flex items-center justify-center w-14 h-14 rounded-2xl bg-primary mb-4",children:r.jsx(e,{className:"w-7 h-7 text-primary-foreground","aria-hidden":"true"})}),r.jsx("h1",{className:"text-3xl font-bold tracking-tight text-foreground",children:t}),n&&r.jsx("p",{className:"text-muted-foreground mt-2",children:n})]}),r.jsx("div",{className:"bg-card rounded-2xl shadow-sm border border-border p-8",children:a}),s&&r.jsx("p",{className:"text-center text-sm text-muted-foreground mt-6",children:s})]})})}function X$({className:e="w-5 h-5"}){return r.jsxs("svg",{className:e,viewBox:"0 0 24 24","aria-hidden":"true",children:[r.jsx("path",{d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z",fill:"#4285F4"}),r.jsx("path",{d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z",fill:"#34A853"}),r.jsx("path",{d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z",fill:"#FBBC05"}),r.jsx("path",{d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z",fill:"#EA4335"})]})}function Mre(){const[e,t]=j.useState(""),[n,s]=j.useState(""),[a,i]=j.useState(""),[o,l]=j.useState(!1),c=async m=>{m.preventDefault(),i(""),l(!0);try{await W.auth.loginViaEmailPassword(e,n),window.location.href="/"}catch(f){i(f.message||"Invalid email or password")}finally{l(!1)}},u=()=>{W.auth.loginWithProvider("google","/")};return r.jsxs(sS,{icon:tK,title:"Welcome back",subtitle:"Log in to your account",footer:r.jsxs(r.Fragment,{children:["Don't have an account?"," ",r.jsx(se,{to:"/register",className:"text-primary font-medium hover:underline",children:"Create one"})]}),children:[r.jsxs(K,{variant:"outline",className:"w-full h-12 text-sm font-medium mb-6",onClick:u,children:[r.jsx(X$,{className:"w-5 h-5 mr-2"}),"Continue with Google"]}),r.jsxs("div",{className:"relative mb-6",children:[r.jsx("div",{className:"absolute inset-0 flex items-center",children:r.jsx("div",{className:"w-full border-t border-border"})}),r.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:r.jsx("span",{className:"bg-card px-3 text-muted-foreground",children:"or"})})]}),a&&r.jsx("div",{className:"mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:a}),r.jsxs("form",{onSubmit:c,className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(Qc,{htmlFor:"email",children:"Email"}),r.jsxs("div",{className:"relative",children:[r.jsx(es,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),r.jsx(de,{id:"email",type:"email",autoComplete:"email",autoFocus:!0,placeholder:"[email protected]",value:e,onChange:m=>t(m.target.value),className:"pl-10 h-12",required:!0})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(Qc,{htmlFor:"password",children:"Password"}),r.jsx(se,{to:"/forgot-password",className:"text-xs text-primary hover:underline",children:"Forgot password?"})]}),r.jsxs("div",{className:"relative",children:[r.jsx(ba,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),r.jsx(de,{id:"password",type:"password",autoComplete:"current-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:n,onChange:m=>s(m.target.value),className:"pl-10 h-12",required:!0})]})]}),r.jsx(K,{type:"submit",className:"w-full h-12 font-medium",disabled:o,children:o?r.jsxs(r.Fragment,{children:[r.jsx(va,{className:"w-4 h-4 mr-2 animate-spin"}),"Logging in..."]}):"Log in"})]})]})}var Rre=Object.defineProperty,Ire=Object.defineProperties,Dre=Object.getOwnPropertyDescriptors,Kx=Object.getOwnPropertySymbols,J$=Object.prototype.hasOwnProperty,Q$=Object.prototype.propertyIsEnumerable,BO=(e,t,n
681)=>t in e?Rre(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lre=(e,t)=>{for(var n in t||(t={}))J$.call(t,n)&&BO(e,n,t[n]);if(Kx)for(var n of Kx(t))Q$.call(t,n)&&BO(e,n,t[n]);return e},$re=(e,t)=>Ire(e,Dre(t)),Fre=(e,t)=>{var n={};for(var s in e)J$.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&Kx)for(var s of Kx(e))t.indexOf(s)<0&&Q$.call(e,s)&&(n[s]=e[s]);return n};function Bre(e){let t=setTimeout(e,0),n=setTimeout(e,10),s=setTimeout(e,50);return[t,n,s]}function qre(e){let t=j.useRef();return j.useEffect(()=>{t.current=e}),t.current}var Vre=18,Z$=40,Ure=`${Z$}px`,zre=["[data-lastpass-icon-root]","com-1password-button","[data-dashlanecreated]",'[style$="2147483647 !important;"]'].join(",");function Wre({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:s}){let[a,i]=j.useState(!1),[o,l]=j.useState(!1),[c,u]=j.useState(!1),m=j.useMemo(()=>n==="none"?!1:(n==="increase-width"||n==="experimental-no-flickering")&&a&&o,[a,o,n]),f=j.useCallback(()=>{let p=e.current,b=t.current;if(!p||!b||c||n==="none")return;let v=p,g=v.getBoundingClientRect().left+v.offsetWidth,y=v.getBoundingClientRect().top+v.offsetHeight/2,w=g-Vre,N=y;document.querySelectorAll(zre).length===0&&document.elementFromPoint(w,N)===p||(i(!0),u(!0))},[e,t,c,n]);return j.useEffect(()=>{let p=e.current;if(!p||n==="none")return;function b(){let g=window.innerWidth-p.getBoundingClientRect().right;l(g>=Z$)}b();let v=setInterval(b,1e3);return()=>{clearInterval(v)}},[e,n]),j.useEffect(()=>{let p=s||document.activeElement===t.current;if(n==="none"||!p)return;let b=setTimeout(f,0),v=setTimeout(f,2e3),g=setTimeout(f,5e3),y=setTimeout(()=>{u(!0)},6e3);return()=>{clearTimeout(b),clearTimeout(v),clearTimeout(g),clearTimeout(y)}},[t,s,n,f]),{hasPWMBadge:a,willPushPWMBadge:m,PWM_BADGE_SPACE_WIDTH:Ure}}var eF=j.createContext({}),tF=j.forwardRef((e,t)=>{var n=e,{value:s,onChange:a,maxLength:i,textAlign:o="left",pattern:l,placeholder:c,inputMode:u="numeric",onComplete:m,pushPasswordManagerStrategy:f="increase-width",pasteTransformer:p,containerClassName:b,noScriptCSSFallback:v=Hre,render:g,children:y}=n,w=Fre(n,["value","onChange","maxLength","textAlign","pattern","placeholder","inputMode","onComplete","pushPasswordManagerStrategy","pasteTransformer","containerClassName","noScriptCSSFallback","render","children"]),N,S,A,k,C;let[T,P]=j.useState(typeof w.defaultValue=="string"?w.defaultValue:""),R=s??T,M=qre(R),D=j.useCallback(ye=>{a==null||a(ye),P(ye)},[a]),$=j.useMemo(()=>l?typeof l=="string"?new RegExp(l):l:null,[l]),q=j.useRef(null),H=j.useRef(null),L=j.useRef({value:R,onChange:D,isIOS:typeof window<"u"&&((S=(N=window==null?void 0:window.CSS)==null?void 0:N.supports)==null?void 0:S.call(N,"-webkit-touch-callout","none"))}),F=j.useRef({prev:[(A=q.current)==null?void 0:A.selectionStart,(k=q.current)==null?void 0:k.selectionEnd,(C=q.current)==null?void 0:C.selectionDirection]});j.useImperativeHandle(t,()=>q.current,[]),j.useEffect(()=>{let ye=q.current,Ee=H.current;if(!ye||!Ee)return;L.current.value!==ye.value&&L.current.onChange(ye.value),F.current.prev=[ye.selectionStart,ye.selectionEnd,ye.selectionDirection];function ke(){if(document.activeElement!==ye){z(null),fe(null);return}let Ze=ye.selectionStart,it=ye.selectionEnd,ot=ye.selectionDirection,We=ye.maxLength,Nt=ye.value,mr=F.current.prev,wn=-1,Ss=-1,ks;if(Nt.length!==0&&Ze!==null&&it!==null){let Eo=Ze===it,Ev=Ze===Nt.length&&Nt.length<We;if(Eo&&!Ev){let Js=Ze;if(Js===0)wn=0,Ss=1,ks="forward";else if(Js===We)wn=Js-1,Ss=Js,ks="backward";else if(We>1&&Nt.length>1){let sc=0;if(mr[0]!==null&&mr[1]!==null){ks=Js<mr[1]?"backward":"forward";let Pv=mr[0]===mr[1]&&mr[0]<We;ks==="backward"&&!Pv&&(sc=-1)}wn=sc+Js,Ss=sc+Js+1}}wn!==-1&&Ss!==-1&&wn!==Ss&&q.current.setSelectionRange(wn,Ss,ks)}let Ao=wn!==-1?wn:Ze,fu=Ss!==-1?Ss:it,To=ks??ot;z(Ao),fe(fu),F.current.prev=[Ao,fu,To]}if(document.addEventListener("selectionchange",ke,{capture:!0}),ke(),document.activeElement===ye&&G(!0),!document.getElementById("input-otp-style")){let Ze=document.createElement("style");if(Ze.id="input-otp-style",document.head.appendChild(Ze),Ze.sheet){let it="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";rh(Ze.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),rh(Ze.sheet,`[data-input-otp]:autofill { ${it} }`),rh(Ze.sheet,`[data-input-otp]:-webkit-autofill { ${it} }
681`),rh(Ze.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),rh(Ze.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}let ze=()=>{Ee&&Ee.style.setProperty("--root-height",`${ye.clientHeight}px`)};ze();let xt=new ResizeObserver(ze);return xt.observe(ye),()=>{document.removeEventListener("selectionchange",ke,{capture:!0}),xt.disconnect()}},[]);let[Y,U]=j.useState(!1),[re,G]=j.useState(!1),[B,z]=j.useState(null),[he,fe]=j.useState(null);j.useEffect(()=>{Bre(()=>{var ye,Ee,ke,ze;(ye=q.current)==null||ye.dispatchEvent(new Event("input"));let xt=(Ee=q.current)==null?void 0:Ee.selectionStart,Ze=(ke=q.current)==null?void 0:ke.selectionEnd,it=(ze=q.current)==null?void 0:ze.selectionDirection;xt!==null&&Ze!==null&&(z(xt),fe(Ze),F.current.prev=[xt,Ze,it])})},[R,re]),j.useEffect(()=>{M!==void 0&&R!==M&&M.length<i&&R.length===i&&(m==null||m(R))},[i,m,M,R]);let be=Wre({containerRef:H,inputRef:q,pushPasswordManagerStrategy:f,isFocused:re}),xe=j.useCallback(ye=>{let Ee=ye.currentTarget.value.slice(0,i);if(Ee.length>0&&$&&!$.test(Ee)){ye.preventDefault();return}typeof M=="string"&&Ee.length<M.length&&document.dispatchEvent(new Event("selectionchange")),D(Ee)},[i,D,M,$]),pe=j.useCallback(()=>{var ye;if(q.current){let Ee=Math.min(q.current.value.length,i-1),ke=q.current.value.length;(ye=q.current)==null||ye.setSelectionRange(Ee,ke),z(Ee),fe(ke)}G(!0)},[i]),Ae=j.useCallback(ye=>{var Ee,ke;let ze=q.current;if(!p&&(!L.current.isIOS||!ye.clipboardData||!ze))return;let xt=ye.clipboardData.getData("text/plain"),Ze=p?p(xt):xt;ye.preventDefault();let it=(Ee=q.current)==null?void 0:Ee.selectionStart,ot=(ke=q.current)==null?void 0:ke.selectionEnd,We=(it!==ot?R.slice(0,it)+Ze+R.slice(ot):R.slice(0,it)+Ze+R.slice(it)).slice(0,i);if(We.length>0&&$&&!$.test(We))return;ze.value=We,D(We);let Nt=Math.min(We.length,i-1),mr=We.length;ze.setSelectionRange(Nt,mr),z(Nt),fe(mr)},[i,D,$,R]),ie=j.useMemo(()=>({position:"relative",cursor:w.disabled?"default":"text",userSelect:"none",WebkitUserSelect:"none",pointerEvents:"none"}),[w.disabled]),Ne=j.useMemo(()=>({position:"absolute",inset:0,width:be.willPushPWMBadge?`calc(100% + ${be.PWM_BADGE_SPACE_WIDTH})`:"100%",clipPath:be.willPushPWMBadge?`inset(0 ${be.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:"100%",display:"flex",textAlign:o,opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",lineHeight:"1",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"}),[be.PWM_BADGE_SPACE_WIDTH,be.willPushPWMBadge,o]),Se=j.useMemo(()=>j.createElement("input",$re(Lre({autoComplete:w.autoComplete||"one-time-code"},w),{"data-input-otp":!0,"data-input-otp-placeholder-shown":R.length===0||void 0,"data-input-otp-mss":B,"data-input-otp-mse":he,inputMode:u,pattern:$==null?void 0:$.source,"aria-placeholder":c,style:Ne,maxLength:i,value:R,ref:q,onPaste:ye=>{var Ee;Ae(ye),(Ee=w.onPaste)==null||Ee.call(w,ye)},onChange:xe,onMouseOver:ye=>{var Ee;U(!0),(Ee=w.onMouseOver)==null||Ee.call(w,ye)},onMouseLeave:ye=>{var Ee;U(!1),(Ee=w.onMouseLeave)==null||Ee.call(w,ye)},onFocus:ye=>{var Ee;pe(),(Ee=w.onFocus)==null||Ee.call(w,ye)},onBlur:ye=>{var Ee;G(!1),(Ee=w.onBlur)==null||Ee.call(w,ye)}})),[xe,pe,Ae,u,Ne,i,he,B,w,$==null?void 0:$.source,R]),te=j.useMemo(()=>({slots:Array.from({length:i}).map((ye,Ee)=>{var ke;let ze=re&&B!==null&&he!==null&&(B===he&&Ee===B||Ee>=B&&Ee<he),xt=R[Ee]!==void 0?R[Ee]:null,Ze=R[0]!==void 0?null:(ke=c==null?void 0:c[Ee])!=null?ke:null;return{char:xt,placeholderChar:Ze,isActive:ze,hasFakeCaret:ze&&xt===null}}),isFocused:re,isHovering:!w.disabled&&Y}),[re,Y,i,he,B,w.disabled,R]),Oe=j.useMemo(()=>g?g(te):j.createElement(eF.Provider,{value:te},y),[y,te,g]);return j.createElement(j.Fragment,null,v!==null&&j.createElement("noscript",null,j.createElement("style",null,v)),j.createElement("div",{ref:H,"data-input-otp-container":!0,style:ie,className:b},Oe,j.createElement("div",{style:{position:"absolute",inset:0,pointerEvents:"none"}},Se)))});tF.displayName="Input";function rh(e,t){try{e.insertRule(t)}catch{console.error("input-otp could not insert CSS rule:",t)}}var Hre=` 682[data-input-otp] { 683 --nojs-bg: white !important; 684 --nojs-fg: black !important; 685 686 background-color: var(--nojs-bg) !important; 687 color: var(--nojs-fg) !important; 688 caret-color: var(--nojs-fg) !important; 689 letter-spacing: .25em !important; 690 text-align: center !important; 691 border: 1px solid var(--nojs-fg) !important; 692 border-radius: 4px !important; 693 width: 100% !important; 694} 695@media (prefers-color-scheme: dark) { 696 [data-input-otp] { 697 --nojs-bg: black !important; 698 --nojs-fg: white !important; 699 } 700}`;const rF=j.forwardRef(({className:e,containerClassName:t,...n},s)=>r.jsx(tF,{ref:s,containerClassName:lt("flex items-center gap-2 has-[:disabled]:opacity-50",t),className:lt("disabled:cursor-not-allowed",e),...n}));rF.displayName="InputOTP";const nF=j.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:lt("flex items-center",e),...t}));nF.displayName="InputOTPGroup";const el=j.forwardRef(({index:e,className:t,...n},s)=>{const a=j.useContext(eF),{char:i,hasFakeCaret:o,isActive:l}=a.slots[e];return r.jsxs("div",{ref:s,className:lt("relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md",l&&"z-10 ring-1 ring-ring",t),...n,children:[i,o&&r.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:r.jsx("div",{className:"h-4 w-px animate-caret-blink bg-foreground duration-1000"})})]})});el.displayName="InputOTPSlot";const Gre=j.forwardRef(({...e},t)=>r.jsx("div",{ref:t,role:"separator",...e,children:r.jsx(mK,{})}));Gre.displayName="InputOTPSeparator";function Kre(){const[e,t]=j.useState(""),[n,s]=j.useState(""),[a,i]=j.useState(""),[o,l]=j.useState(""),[c,u]=j.useState(!1),[m,f]=j.useState(!1),[p,b]=j.useState(""),v=async N=>{if(N.preventDefault(),l(""),n!==a){l("Passwords do not match");return}u(!0);try{await W.auth.register({email:e,password:n}),f(!0)}catch(S){l(S.message||"Registration failed")}finally{u(!1)}},g=async()=>
700{l(""),u(!0);try{const N=await W.auth.verifyOtp({email:e,otpCode:p});N!=null&&N.access_token&&W.auth.setToken(N.access_token),window.location.href="/"}catch(N){l(N.message||"Invalid verification code")}finally{u(!1)}},y=async()=>{l("");try{await W.auth.resendOtp(e),GL({title:"Code sent",description:"Check your email for the new code."})}catch(N){l(N.message||"Failed to resend code")}},w=()=>{W.auth.loginWithProvider("google","/")};return m?r.jsxs(sS,{icon:es,title:"Verify your email",subtitle:`We sent a code to ${e}`,children:[o&&r.jsx("div",{className:"mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:o}),r.jsx("div",{className:"flex justify-center mb-6",children:r.jsx(rF,{maxLength:6,value:p,onChange:b,autoFocus:!0,autoComplete:"one-time-code",children:r.jsxs(nF,{children:[r.jsx(el,{index:0}),r.jsx(el,{index:1}),r.jsx(el,{index:2}),r.jsx(el,{index:3}),r.jsx(el,{index:4}),r.jsx(el,{index:5})]})})}),r.jsx(K,{className:"w-full h-12 font-medium",onClick:g,disabled:c||p.length<6,children:c?r.jsxs(r.Fragment,{children:[r.jsx(va,{className:"w-4 h-4 mr-2 animate-spin"}),"Verifying..."]}):"Verify"}),r.jsxs("p",{className:"text-center text-sm text-muted-foreground mt-4",children:["Didn't receive the code?"," ",r.jsx("button",{onClick:y,className:"text-primary font-medium hover:underline",children:"Resend"})]})]}):r.jsxs(sS,{icon:lY,title:"Create your account",subtitle:"Sign up to get started",footer:r.jsxs(r.Fragment,{children:["Already have an account?"," ",r.jsx(se,{to:"/login",className:"text-primary font-medium hover:underline",children:"Log in"})]}),children:[r.jsxs(K,{variant:"outline",className:"w-full h-12 text-sm font-medium mb-6",onClick:w,children:[r.jsx(X$,{className:"w-5 h-5 mr-2"}),"Continue with Google"]}),r.jsxs("div",{className:"relative mb-6",children:[r.jsx("div",{className:"absolute inset-0 flex items-center",children:r.jsx("div",{className:"w-full border-t border-border"})}),r.jsx("div",{className:"relative flex justify-center text-xs uppercase",children:r.jsx("span",{className:"bg-card px-3 text-muted-foreground",children:"or"})})]}),o&&r.jsx("div",{className:"mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm",children:o}),r.jsxs("form",{onSubmit:v,className:"space-y-4",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx(Qc,{htmlFor:"email",children:"Email"}),r.jsxs("div",{className:"relative",children:[r.jsx(es,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),r.jsx(de,{id:"email",type:"email",autoComplete:"email",autoFocus:!0,placeholder:"[email protected]",value:e,onChange:N=>t(N.target.value),className:"pl-10 h-12",required:!0})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(Qc,{htmlFor:"password",children:"Password"}),r.jsxs("div",{className:"relative",children:[r.jsx(ba,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),r.jsx(de,{id:"password",type:"password",autoComplete:"new-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:n,onChange:N=>s(N.target.value),className:"pl-10 h-12",required:!0})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(Qc,{htmlFor:"confirm",children:"Confirm Password"}),r.jsxs("div",{className:"relative",children:[r.jsx(ba,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground","aria-hidden":"true"}),r.jsx(de,{id:"confirm",type:"password",autoComplete:"new-password",placeholder:"â¢â¢â¢â¢â¢â¢â¢â¢",value:a,onChange:N=>i(N.target.value),className:"pl-10 h-12",required:!0})]})]}),r.jsx(K,{type:"submit",className:"w-full h-12 font-medium",disabled:c,children:c?r.jsxs(r.Fragment,{children:[r.jsx(va,{className:"w-4 h-4 mr-2 animate-spin"}),"Creating account..."]}):"Create account"})]})]})}const sF=j.createContext({});function Yre(e){const t=j.useRef(null);return t.current===null&&(t.current=e()),t.current}const kk=j.createContext(null),aF=j.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function Xre(e=!0){const t=j.useContext(kk);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:a}=t,i=j.useId();j.useEffect(()=>{e&&a(i)},[e]);const o=j.useCallback(()=>e&&s&&s(i),[i,s,e]);return!n&&s?[!1,o]:[!0]}const Ck=typeof window<"u",Jre=Ck?j.useLayoutEffect:j.useEffect,Xn=e=>e;let iF=Xn;function Ak(e){let t;return()=>(t===void 0&&(t=e()),t)}const vd=(e,t,n)=>{const s=t-e;return s===0?1:(n-e)/s},Qa=e=>e*1e3,Za=e=>e/1e3,Qre={useManualTiming:!1};function Zre(e){let t=new Set,n=new Set,s=!1,a=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(u){i.has(u)&&(c.schedule(u),e()),u(o)}const c={schedule:(u,m=!1,f=!1)=>{const b=f&&s?t:n;return m&&i.add(u),b.has(u)||b.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(o=u,s){a=!0;return}s=!0,[t,n]=[n,t],t.forEach(l),t.clear(),s=!1,a&&(a=!1,c.process(u))}};return c}const Fp=["read","resolveKeyframes","update","preRender","render","postRender"],ene=40;function oF(e,t){let n=!1,s=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Fp.reduce((w,N)=>(w[N]=Zre(i),w),{}),{read:l,resolveKeyframes:c,update:u,preRender:m,render:f,postRender:p}=o,b=()=>{const w=performance.now();n=!1,a.delta=s?1e3/60:Math.max(Math.min(w-a.timestamp,ene),1),a.timestamp=w,a.isProcessing=!0,l.process(a),c.process(a),u.process(a),m.process(a),f.process(a),p.process(a),a.isProcessing=!1,n&&t&&(s=!1,e(b))},v=()=>{n=!0,s=!0,a.isProcessing||e(b)};return{schedule:Fp.reduce((w,N)=>{const S=o[N];return w[N]=(A,k=!1,C=!1)=>(n||v(),S.schedule(A,k,C)),w},{}),cancel:w=>{for(let N=0;N<Fp.length;N++)o[Fp[N]].cancel(w)},state:a,steps:o}}const{schedule:Qt,cancel:ho,state:Gr,steps:V0}=oF(typeof requestAnimationFrame<"u"?requestAnimationFrame:Xn,!0),lF=j.createContext({strict:!1}),qO={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"]},bd={};for(const e in qO)bd[e]={isEnabled:t=>qO[e].some(n=>!!t[n])};function tne(e){for(const t in e)bd[t]={...bd[t],...e[t]}}const rne=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Yx(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||rne.has(e)}let cF=e=>!Yx(e);function nne(e){e&&(cF=t=>t.startsWith("on")?!Yx(t):e(t))}try{nne(require("@emotion/is-prop-valid").default)}catch{}function sne(e,t,n){const s={};for(const a in e)a==="values"&&typeof e.values=="object"||(cF(a)||n===!0&&Yx(a)||!t&&!Yx(a)||e.draggable&&a.startsWith("onDrag"))&&(s[a]=e[a]);return s}function ane(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...s)=>e(...s);return new Proxy(n,{get:(s,a)=>a==="create"?e:(t.has(a)||t.set(a,e(a)),t.get(a))})}
vendor: 26,315 bytes, line 700
700const by=j.createContext({});function em(e){return typeof e=="string"||Array.isArray(e)}function jy(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Tk=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ek=["initial",...Tk];function wy(e){return jy(e.animate)||Ek.some(t=>em(e[t]))}function dF(e){return!!(wy(e)||e.variants)}function ine(e,t){if(wy(e)){const{initial:n,animate:s}=e;return{initial:n===!1||em(n)?n:void 0,animate:em(s)?s:void 0}}return e.inherit!==!1?t:{}}function one(e){const{initial:t,animate:n}=ine(e,j.useContext(by));return j.useMemo(()=>({initial:t,animate:n}),[VO(t),VO(n)])}function VO(e){return Array.isArray(e)?e.join(" "):e}const lne=Symbol.for("motionComponentSymbol");function Vc(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function cne(e,t,n){return j.useCallback(s=>{s&&e.onMount&&e.onMount(s),t&&(s?t.mount(s):t.unmount()),n&&(typeof n=="function"?n(s):Vc(n)&&(n.current=s))},[t])}const Pk=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),dne="framerAppearId",uF="data-"+Pk(dne),{schedule:Ok}=oF(queueMicrotask,!1),hF=j.createContext({});function une(e,t,n,s,a){var i,o;const{visualElement:l}=j.useContext(by),c=j.useContext(lF),u=j.useContext(kk),m=j.useContext(aF).reducedMotion,f=j.useRef(null);s=s||c.renderer,!f.current&&s&&(f.current=s(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:m}));const p=f.current,b=j.useContext(hF);p&&!p.projection&&a&&(p.type==="html"||p.type==="svg")&&hne(f.current,n,a,b);const v=j.useRef(!1);j.useInsertionEffect(()=>{p&&v.current&&p.update(n,u)});const g=n[uF],y=j.useRef(!!g&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,g))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,g)));return Jre(()=>{p&&(v.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),Ok.render(p.render),y.current&&p.animationState&&p.animationState.animateChanges())}),j.useEffect(()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,g)}),y.current=!1))}),p}function hne(e,t,n,s){const{layoutId:a,layout:i,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:mF(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:!!o||l&&Vc(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:s,layoutScroll:c,layoutRoot:u})}function mF(e){if(e)return e.options.allowProjection!==!1?e.projection:mF(e.parent)}function mne({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:s,Component:a}){var i,o;e&&tne(e);function l(u,m){let f;const p={...j.useContext(aF),...u,layoutId:fne(u)},{isStatic:b}=p,v=one(u),g=s(u,b);if(!b&&Ck){pne();const y=xne(p);f=y.MeasureLayout,v.visualElement=une(a,g,p,t,y.ProjectionNode)}return r.jsxs(by.Provider,{value:v,children:[f&&v.visualElement?r.jsx(f,{visualElement:v.visualElement,...p}):null,n(a,u,cne(g,v.visualElement,m),g,b,v.visualElement)]})}l.displayName=`motion.${typeof a=="string"?a:`create(${(o=(i=a.displayName)!==null&&i!==void 0?i:a.name)!==null&&o!==void 0?o:""})`}`;const c=j.forwardRef(l);return c[lne]=a,c}function fne({layoutId:e}){const t=j.useContext(sF).id;return t&&e!==void 0?t+"-"+e:e}function pne(e,t){j.useContext(lF).strict}function xne(e){const{drag:t,layout:n}=bd;if(!t&&!n)return{};const s={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const gne=["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 Mk(e){return typeof e!="string"||e.includes("-")?!1:!!(gne.indexOf(e)>-1||/[A-Z]/u.test(e))}function UO(e){const t=[{},{}];return e==null||e.values.forEach((n,s)=>{t[0][s]=n.get(),t[1][s]=n.getVelocity()}),t}function Rk(e,t,n,s){if(typeof t=="function"){const[a,i]=UO(s);t=t(n!==void 0?n:e.custom,a,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[a,i]=UO(s);t=t(n!==void 0?n:e.custom,a,i)}return t}const aS=e=>Array.isArray(e),yne=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),vne=e=>aS(e)?e[e.length-1]||0:e,ln=e=>!!(e&&e.getVelocity);function kx(e){const t=ln(e)?e.get():e;return yne(t)?t.toValue():t}function bne({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},s,a,i){const o={latestValues:jne(s,a,i,e),renderState:t()};return n&&(o.onMount=l=>n({props:s,current:l,...o}),o.onUpdate=l=>n(l)),o}const fF=e=>(t,n)=>{const s=j.useContext(by),a=j.useContext(kk),i=()=>bne(e,t,s,a);return n?i():Yre(i)};function jne(e,t,n,s){const a={},i=s(e,{});for(const p in i)a[p]=kx(i[p]);let{initial:o,animate:l}=e;const c=wy(e),u=dF(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let m=n?n.initial===!1:!1;m=m||o===!1;const f=m?l:o;if(f&&typeof f!="boolean"&&!jy(f)){const p=Array.isArray(f)?f:[f];for(let b=0;b<p.length;b++){const v=Rk(e,p[b]);if(v){const{transitionEnd:g,transition:y,...w}=v;for(const N in w){let S=w[N];if(Array.isArray(S)){const A=m?S.length-1:0;S=S[A]}S!==null&&(a[N]=S)}for(const N in g)a[N]=g[N]}}}return a}const eu=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Jl=new Set(eu),pF=e=>t=>typeof t=="string"&&t.startsWith(e),xF=pF("--"),wne=pF("var(--"),Ik=e=>wne(e)?Nne.test(e.split("/*")[0].trim()):!1,Nne=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,gF=(e,t)=>t&&typeof e=="number"?t.transform(e):e,si=(e,t,n)=>n>t?t:n<e?e:n,tu={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},tm={...tu,transform:e=>si(0,1,e)},Bp={...tu,default:1},af=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),qi=af("deg"),ha=af("%"),tt=af("px"),_ne=af("vh"),Sne=af("vw"),zO={...ha,parse:e=>ha.parse(e)/100,transform:e=>ha.transform(e*100)},kne={borderWidth:tt,borderTopWidth:tt,borderRightWidth:tt,borderBottomWidth:tt,borderLeftWidth:tt,borderRadius:tt,radius:tt,borderTopLeftRadius:tt,borderTopRightRadius:tt,borderBottomRightRadius:tt,borderBottomLeftRadius:tt,width:tt,maxWidth:tt,height:tt,maxHeight:tt,top:tt,right:tt,bottom:tt,left:tt,padding:tt,paddingTop:tt,paddingRight:tt,paddingBottom:tt,paddingLeft:tt,margin:tt,marginTop:tt,marginRight:tt,marginBottom:tt,marginLeft:tt,backgroundPositionX:tt,backgroundPositionY:tt},Cne={rotate:qi,rotateX:qi,rotateY:qi,rotateZ:qi,scale:Bp,scaleX:Bp,scaleY:Bp,scaleZ:Bp,skew:qi,skewX:qi,skewY:qi,distance:tt,translateX:tt,translateY:tt,translateZ:tt,x:tt,y:tt,z:tt,perspective:tt,transformPerspective:tt,opacity:tm,originX:zO,originY:zO,originZ:tt},WO={...tu,transform:Math.round},Dk={...kne,...Cne,zIndex:WO,size:tt,fillOpacity:tm,strokeOpacity:tm,numOctaves:WO},Ane={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Tne=eu.length;function Ene(e,t,n){let s="",a=!0;for(let i=0;i<Tne;i++){const o=eu[i],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=gF(l,Dk[o]);if(!c){a=!1;const m=Ane[o]||o;s+=`${m}(${u}) `}n&&(t[o]=u)}}return s=s.trim(),n?s=n(t,a?"":s):a&&(s="none"),s}function Lk(e,t,n){const{style:s,vars:a,transformOrigin:i}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(Jl.has(c)){o=!0;continue}else if(xF(c)){a[c]=u;continue}else{const m=gF(u,Dk[c]);c.startsWith("origin")?(l=!0,i[c]=m):s[c]=m}}if(t.transform||(o||n?s.transform=Ene(t,e.transform,n):s.transform&&(s.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:m=0}=i;s.transformOrigin=`${c} ${u} ${m}`}}const Pne={offset:"stroke-dashoffset",array:"stroke-dasharray"},One={offset:"strokeDashoffset",array:"strokeDasharray"};function Mne(e,t,n=1,s=0,a=!0){e.pathLength=1;const i=a?Pne:One;e[i.offset]=tt.transform(-s);const o=tt.transform(t),l=tt.transform(n);e[i.array]=`${o} ${l}`}function HO(e,t,n){return typeof e=="string"?e:tt.transform(t+n*e)}function Rne(e,t,n){const s=HO(t,e.x,e.width),a=HO(n,e.y,e.height);return`${s} ${a}`}function $k(e,{attrX:t,attrY:n,attrScale:s,originX:a,originY:i,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...u},m,f){if(Lk(e,u,f),m){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:b,dimensions:v}=e;p.transform&&(v&&(b.transform=p.transform),delete p.transform),v&&(a!==void 0||i!==void 0||b.transform)&&(b.transformOrigin=Rne(v,a!==void 0?a:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),s!==void 0&&(p.scale=s),o!==void 0&&Mne(p,o,l,c,!1)}const Fk=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),yF=()=>({...Fk(),attrs:{}}),Bk=e=>typeof e=="string"&&e.toLowerCase()==="svg";function vF(e,{style:t,vars:n},s,a){Object.assign(e.style,t,a&&a.getProjectionStyles(s));for(const i in n)e.style.setProperty(i,n[i])}const bF=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"]);function jF(e,t,n,s){vF(e,t,void 0,s);for(const a in t.attrs)e.setAttribute(bF.has(a)?a:Pk(a),t.attrs[a])}const Xx={};function Ine(e){Object.assign(Xx,e)}function wF(e,{layout:t,layoutId:n}){return Jl.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Xx[e]||e==="opacity")}function qk(e,t,n){var s;const{style:a}=e,i={};for(const o in a)(ln(a[o])||t.style&&ln(t.style[o])||wF(o,e)||((s=n==null?void 0:n.getValue(o))===null||s===void 0?void 0:s.liveStyle)!==void 0)&&(i[o]=a[o]);return i}function NF(e,t,n){const s=qk(e,t,n);for(const a in e)if(ln(e[a])||ln(t[a])){const i=eu.indexOf(a)!==-1?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a;s[i]=e[a]}return s}function Dne(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const GO=["x","y","width","height","cx","cy","r"],Lne={useVisualState:fF({scrapeMotionValuesFromProps:NF,createRenderState:yF,onUpdate:({props:e,prevProps:t,current:n,renderState:s,latestValues:a})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in a)if(Jl.has(l)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let l=0;l<GO.length;l++){const c=GO[l];e[c]!==t[c]&&(o=!0)}o&&Qt.read(()=>{Dne(n,s),Qt.render(()=>{$k(s,a,Bk(n.tagName),e.transformTemplate),jF(n,s)})})}})},$ne={useVisualState:fF({scrapeMotionValuesFromProps:qk,createRenderState:Fk})};function _F(e,t,n){for(const s in t)!ln(t[s])&&!wF(s,n)&&(e[s]=t[s])}function Fne({transformTemplate:e},t){return j.useMemo(()=>{const n=Fk();return Lk(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Bne(e,t){const n=e.style||{},s={};return _F(s,n,e),Object.assign(s,Fne(e,t)),s}function qne(e,t){const n={},s=Bne(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=s,n}function Vne(e,t,n,s){const a=j.useMemo(()=>{const i=yF();return $k(i,t,Bk(s),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};_F(i,e.style,e),a.style={...i,...a.style}}return a}function Une(e=!1){return(n,s,a,{latestValues:i},o)=>{const c=(Mk(n)?Vne:qne)(s,i,o,n),u=sne(s,typeof n=="string",e),m=n!==j.Fragment?{...u,...c,ref:a}:{},{children:f}=s,p=j.useMemo(()=>ln(f)?f.get():f,[f]);return j.createElement(n,{...m,children:p})}}function zne(e,t){return function(s,{forwardMotionProps:a}={forwardMotionProps:!1}){const o={...Mk(s)?Lne:$ne,preloadedFeatures:e,useRender:Une(a),createVisualElement:t,Component:s};return mne(o)}}function SF(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++)if(t[s]!==e[s])return!1;return!0}function Ny(e,t,n){const s=e.getProps();return Rk(s,t,n!==void 0?n:s.custom,e)}const Wne=Ak(()=>window.ScrollTimeline!==void 0);class Hne{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let s=0;s<this.animations.length;s++)this.animations[s][t]=n}attachTimeline(t,n){const s=this.animations.map(a=>{if(Wne()&&a.attachTimeline)return a.attachTimeline(t);if(typeof n=="function")return n(a)});return()=>{s.forEach((a,i)=>{a&&a(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Gne extends Hne{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Vk(e,t){return e?e[t]||e.default||e:void 0}const iS=2e4;function kF(e){let t=0;const n=50;let s=e.next(t);for(;!s.done&&t<iS;)t+=n,s=e.next(t);return t>=iS?1/0:t}function Uk(e){return typeof e=="function"}function KO(e,t){e.timeline=t,e.onfinish=null}const zk=e=>Array.isArray(e)&&typeof e[0]=="number",Kne={linearEasing:void 0};function Yne(e,t){const n=Ak(e);return()=>{var s;return(s=Kne[t])!==null&&s!==void 0?s:n()}}const Jx=Yne(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),CF=(e,t,n=10)=>{let s="";const a=Math.max(Math.round(t/n),2);for(let i=0;i<a;i++)s+=e(vd(0,a-1,i))+", ";return`linear(${s.substring(0,s.length-2)})`};function AF(e){return!!(typeof e=="function"&&Jx()||!e||typeof e=="string"&&(e in oS||Jx())||zk(e)||Array.isArray(e)&&e.every(AF))}const kh=([e,t,n,s])=>`cubic-bezier(${e}, ${t}, ${n}, ${s})`,oS={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:kh([0,.65,.55,1]),circOut:kh([.55,0,1,.45]),backIn:kh([.31,.01,.66,-.59]),backOut:kh([.33,1.53,.69,.99])};function TF(e,t){if(e)return typeof e=="function"&&Jx()?CF(e,t):zk(e)?kh(e):Array.isArray(e)?e.map(n=>TF(n,t)||oS.easeOut):oS[e]}const Is={x:!1,y:!1};function EF(){return Is.x||Is.y}function Xne(e,t,n){var s;if(e instanceof Element)return[e];if(typeof e=="string"){let a=document;const i=(s=void 0)!==null&&s!==void 0?s:a.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function PF(e,t){const n=Xne(e),s=new AbortController,a={passive:!0,...t,signal:s.signal};return[n,a,()=>s.abort()]}function YO(e){return t=>{t.pointerType==="touch"||EF()||e(t)}}function Jne(e,t,n={}){const[s,a,i]=PF(e,n),o=YO(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const m=YO(f=>{u(f),c.removeEventListener("pointerleave",m)});c.addEventListener("pointerleave",m,a)});return s.forEach(l=>{l.addEventListener("pointerenter",o,a)}),i}const OF=(e,t)=>t?e===t?!0:OF(e,t.parentElement):!1,Wk=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Qne=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Zne(e){return Qne.has(e.tagName)||e.tabIndex!==-1}const Ch=new WeakSet;function XO(e){return t=>{t.key==="Enter"&&e(t)}}function U0(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const ese=(e,t)=>{const n=e.currentTarget;if(!n)return;const s=XO(()=>{if(Ch.has(n))return;U0(n,"down");const a=XO(()=>{U0(n,"up")}),i=()=>U0(n,"cancel");n.addEventListener("keyup",a,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",s,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),t)};function JO(e){return Wk(e)&&!EF()}function tse(e,t,n={}){const[s,a,i]=PF(e,n),o=l=>{const c=l.currentTarget;if(!JO(l)||Ch.has(c))return;Ch.add(c);const u=t(l),m=(b,v)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",p),!(!JO(b)||!Ch.has(c))&&(Ch.delete(c),typeof u=="function"&&u(b,{success:v}))},f=b=>{m(b,n.useGlobalTarget||OF(c,b.target))},p=b=>{m(b,!1)};window.addEventListener("pointerup",f,a),window.addEventListener("pointercancel",p,a)};return s.forEach(l=>{!Zne(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,a),l.addEventListener("focus",u=>ese(u,a),a)}),i}function rse(e){return e==="x"||e==="y"?Is[e]?null:(Is[e]=!0,()=>{Is[e]=!1}):Is.x||Is.y?null:(Is.x=Is.y=!0,()=>{Is.x=Is.y=!1})}const MF=new Set(["width","height","top","left","right","bottom",...eu]);let Cx;function nse(){Cx=void 0}const ma={now:()=>(Cx===void 0&&ma.set(Gr.isProcessing||Qre.useManualTiming?Gr.timestamp:performance.now()),Cx),set:e=>{Cx=e,queueMicrotask(nse)}};function Hk(e,t){e.indexOf(t)===-1&&e.push(t)}function Gk(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Kk{constructor(){this.subscriptions=[]}add(t){return Hk(this.subscriptions,t),()=>Gk(this.subscriptions,t)}notify(t,n,s){const a=this.subscriptions.length;if(a)if(a===1)this.subscriptions[0](t,n,s);else for(let i=0;i<a;i++){const o=this.subscriptions[i];o&&o(t,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function RF(e,t){return t?e*(1e3/t):0}const QO=30,sse=e=>!isNaN(parseFloat(e));class ase{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,a=!0)=>{const i=ma.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),a&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=ma.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=sse(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Kk);const s=this.events[t].add(n);return t==="change"?()=>{s(),Qt.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-s}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=ma.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>QO)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,QO);return RF(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function rm(e,t){return new ase(e,t)}function ise(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,rm(n))}function ose(e,t){const n=Ny(e,t);let{transitionEnd:s={},transition:a={},...i}=n||{};i={...i,...s};for(const o in i){const l=vne(i[o]);ise(e,o,l)}}function lse(e){return!!(ln(e)&&e.add)}function lS(e,t){const n=e.getValue("willChange");if(lse(n))return n.add(t)}function IF(e){return e.props[uF]}const DF=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,cse=1e-7,dse=12;function use(e,t,n,s,a){let i,o,l=0;do o=t+(n-t)/2,i=DF(o,s,a)-e,i>0?n=o:t=o;while(Math.abs(i)>cse&&++l<dse);return o}function of(e,t,n,s){if(e===t&&n===s)return Xn;const a=i=>use(i,0,1,e,n);return i=>i===0||i===1?i:DF(a(i),t,s)}const LF=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,$F=e=>t=>1-e(1-t),FF=of(.33,1.53,.69,.99),Yk=$F(FF),BF=LF(Yk),qF=e=>(e*=2)<1?.5*Yk(e):.5*(2-Math.pow(2,-10*(e-1))),Xk=e=>1-Math.sin(Math.acos(e)),VF=$F(Xk),UF=LF(Xk),zF=e=>/^0[^.\s]+$/u.test(e);function hse(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||zF(e):!0}const Lh=e=>Math.round(e*1e5)/1e5,Jk=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function mse(e){return e==null}const fse=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Qk=(e,t)=>n=>!!(typeof n=="string"&&fse.test(n)&&n.startsWith(e)||t&&!mse(n)&&Object.prototype.hasOwnProperty.call(n,t)),WF=(e,t,n)=>s=>{if(typeof s!="string")return s;const[a,i,o,l]=s.match(Jk);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},pse=e=>si(0,255,e),z0={...tu,transform:e=>Math.round(pse(e))},ll={test:Qk("rgb","red"),parse:WF("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:s=1})=>"rgba("+z0.transform(e)+", "+z0.transform(t)+", "+z0.transform(n)+", "+Lh(tm.transform(s))+")"};function xse(e){let t="",n="",s="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),s=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),s=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,s+=s,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:a?parseInt(a,16)/255:1}}const cS={test:Qk("#"),parse:xse,transform:ll.transform},Uc={test:Qk("hsl","hue"),parse:WF("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:s=1})=>"hsla("+Math.round(e)+", "+ha.transform(Lh(t))+", "+ha.transform(Lh(n))+", "+Lh(tm.transform(s))+")"},nn={test:e=>ll.test(e)||cS.test(e)||Uc.test(e),parse:e=>ll.test(e)?ll.parse(e):Uc.test(e)?Uc.parse(e):cS.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ll.transform(e):Uc.transform(e)},gse=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function yse(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Jk))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(gse))===null||n===void 0?void 0:n.length)||0)>0}const HF="number",GF="color",vse="var",bse="var(",ZO="${}",jse=/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 nm(e){const t=e.toString(),n=[],s={color:[],number:[],var:[]},a=[];let i=0;const l=t.replace(jse,c=>(nn.test(c)?(s.color.push(i),a.push(GF),n.push(nn.parse(c))):c.startsWith(bse)?(s.var.push(i),a.push(vse),n.push(c)):(s.number.push(i),a.push(HF),n.push(parseFloat(c))),++i,ZO)).split(ZO);return{values:n,split:l,indexes:s,types:a}}function KF(e){return nm(e).values}function YF(e){const{split:t,types:n}=nm(e),s=t.length;return a=>{let i="";for(let o=0;o<s;o++)if(i+=t[o],a[o]!==void 0){const l=n[o];l===HF?i+=Lh(a[o]):l===GF?i+=nn.transform(a[o]):i+=a[o]}return i}}const wse=e=>typeof e=="number"?0:e;function Nse(e){const t=KF(e);return YF(e)(t.map(wse))}const mo={test:yse,parse:KF,createTransformer:YF,getAnimatableNone:Nse},_se=new Set(["brightness","contrast","saturate","opacity"]);function Sse(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[s]=n.match(Jk)||[];if(!s)return e;const a=n.replace(s,"");let i=_se.has(t)?1:0;return s!==n&&(i*=100),t+"("+i+a+")"}const kse=/\b([a-z-]*)\(.*?\)/gu,dS={...mo,getAnimatableNone:e=>{const t=e.match(kse);return t?t.map(Sse).join(" "):e}},Cse={...Dk,color:nn,backgroundColor:nn,outlineColor:nn,fill:nn,stroke:nn,borderColor:nn,borderTopColor:nn,borderRightColor:nn,borderBottomColor:nn,borderLeftColor:nn,filter:dS,WebkitFilter:dS},Zk=e=>Cse[e];function XF(e,t){let n=Zk(e);return n!==dS&&(n=mo),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Ase=new Set(["auto","none","0"]);function Tse(e,t,n){let s=0,a;for(;s<e.length&&!a;){const i=e[s];typeof i=="string"&&!Ase.has(i)&&nm(i).values.length&&(a=e[s]),s++}if(a&&n)for(const i of t)e[i]=XF(n,a)}const e4=e=>e===tu||e===tt,t4=(e,t)=>parseFloat(e.split(", ")[t]),r4=(e,t)=>(n,{transform:s})=>{if(s==="none"||!s)return 0;const a=s.match(/^matrix3d\((.+)\)$/u);if(a)return t4(a[1],t);{const i=s.match(/^matrix\((.+)\)$/u);return i?t4(i[1],e):0}},Ese=new Set(["x","y","z"]),Pse=eu.filter(e=>!Ese.has(e));function Ose(e){const t=[];return Pse.forEach(n=>{const s=e.getValue(n);s!==void 0&&(t.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),t}const jd={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:r4(4,13),y:r4(5,14)};jd.translateX=jd.x;jd.translateY=jd.y;const _l=new Set;let uS=!1,hS=!1;function JF(){if(hS){const e=Array.from(_l).filter(s=>s.needsMeasurement),t=new Set(e.map(s=>s.element)),n=new Map;t.forEach(s=>{const a=Ose(s);a.length&&(n.set(s,a),s.render())}),e.forEach(s=>s.measureInitialState()),t.forEach(s=>{s.render();const a=n.get(s);a&&a.forEach(([i,o])=>{var l;(l=s.getValue(i))===null||l===void 0||l.set(o)})}),e.forEach(s=>s.measureEndState()),e.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}
vendor: 14,957 bytes, line 700
700hS=!1,uS=!1,_l.forEach(e=>e.complete()),_l.clear()}function QF(){_l.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(hS=!0)})}function Mse(){QF(),JF()}class eC{constructor(t,n,s,a,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=s,this.motionValue=a,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(_l.add(this),uS||(uS=!0,Qt.read(QF),Qt.resolveKeyframes(JF))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:s,motionValue:a}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const o=a==null?void 0:a.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(s&&n){const c=s.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),a&&o===void 0&&a.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),_l.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,_l.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ZF=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Rse=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Ise(e){const t=Rse.exec(e);if(!t)return[,];const[,n,s,a]=t;return[`--${n??s}`,a]}function eB(e,t,n=1){const[s,a]=Ise(e);if(!s)return;const i=window.getComputedStyle(t).getPropertyValue(s);if(i){const o=i.trim();return ZF(o)?parseFloat(o):o}return Ik(a)?eB(a,t,n+1):a}const tB=e=>t=>t.test(e),Dse={test:e=>e==="auto",parse:e=>e},rB=[tu,tt,ha,qi,Sne,_ne,Dse],n4=e=>rB.find(tB(e));class nB extends eC{constructor(t,n,s,a,i){super(t,n,s,a,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),Ik(u))){const m=eB(u,n.current);m!==void 0&&(t[c]=m),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!MF.has(s)||t.length!==2)return;const[a,i]=t,o=n4(a),l=n4(i);if(o!==l)if(e4(o)&&e4(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,s=[];for(let a=0;a<t.length;a++)hse(t[a])&&s.push(a);s.length&&Tse(t,s,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:s}=this;if(!t||!t.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=jd[s](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const a=n[n.length-1];a!==void 0&&t.getValue(s,a).jump(a,!1)}measureEndState(){var t;const{element:n,name:s,unresolvedKeyframes:a}=this;if(!n||!n.current)return;const i=n.getValue(s);i&&i.jump(this.measuredOrigin,!1);const o=a.length-1,l=a[o];a[o]=jd[s](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const s4=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(mo.test(e)||e==="0")&&!e.startsWith("url("));function Lse(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function $se(e,t,n,s){const a=e[0];if(a===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=s4(a,t),l=s4(i,t);return!o||!l?!1:Lse(e)||(n==="spring"||Uk(n))&&s}const Fse=e=>e!==null;function _y(e,{repeat:t,repeatType:n="loop"},s){const a=e.filter(Fse),i=t&&n!=="loop"&&t%2===1?0:a.length-1;return!i||s===void 0?a[i]:s}const Bse=40;class sB{constructor({autoplay:t=!0,delay:n=0,type:s="keyframes",repeat:a=0,repeatDelay:i=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=ma.now(),this.options={autoplay:t,delay:n,type:s,repeat:a,repeatDelay:i,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>Bse?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Mse(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=ma.now(),this.hasAttemptedResolve=!0;const{name:s,type:a,velocity:i,delay:o,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!$se(t,s,a,i))if(o)this.options.duration=0;else{c&&c(_y(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const m=this.initPlayback(t,n);m!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...m},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ar=(e,t,n)=>e+(t-e)*n;function W0(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qse({hue:e,saturation:t,lightness:n,alpha:s}){e/=360,t/=100,n/=100;let a=0,i=0,o=0;if(!t)a=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;a=W0(c,l,e+1/3),i=W0(c,l,e),o=W0(c,l,e-1/3)}return{red:Math.round(a*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:s}}function Qx(e,t){return n=>n>0?t:e}const H0=(e,t,n)=>{const s=e*e,a=n*(t*t-s)+s;return a<0?0:Math.sqrt(a)},Vse=[cS,ll,Uc],Use=e=>Vse.find(t=>t.test(e));function a4(e){const t=Use(e);if(!t)return!1;let n=t.parse(e);return t===Uc&&(n=qse(n)),n}const i4=(e,t)=>{const n=a4(e),s=a4(t);if(!n||!s)return Qx(e,t);const a={...n};return i=>(a.red=H0(n.red,s.red,i),a.green=H0(n.green,s.green,i),a.blue=H0(n.blue,s.blue,i),a.alpha=ar(n.alpha,s.alpha,i),ll.transform(a))},zse=(e,t)=>n=>t(e(n)),lf=(...e)=>e.reduce(zse),mS=new Set(["none","hidden"]);function Wse(e,t){return mS.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Hse(e,t){return n=>ar(e,t,n)}function tC(e){return typeof e=="number"?Hse:typeof e=="string"?Ik(e)?Qx:nn.test(e)?i4:Yse:Array.isArray(e)?aB:typeof e=="object"?nn.test(e)?i4:Gse:Qx}function aB(e,t){const n=[...e],s=n.length,a=e.map((i,o)=>tC(i)(i,t[o]));return i=>{for(let o=0;o<s;o++)n[o]=a[o](i);return n}}function Gse(e,t){const n={...e,...t},s={};for(const a in n)e[a]!==void 0&&t[a]!==void 0&&(s[a]=tC(e[a])(e[a],t[a]));return a=>{for(const i in s)n[i]=s[i](a);return n}}function Kse(e,t){var n;const s=[],a={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],l=e.indexes[o][a[o]],c=(n=e.values[l])!==null&&n!==void 0?n:0;s[i]=c,a[o]++}return s}const Yse=(e,t)=>{const n=mo.createTransformer(t),s=nm(e),a=nm(t);return s.indexes.var.length===a.indexes.var.length&&s.indexes.color.length===a.indexes.color.length&&s.indexes.number.length>=a.indexes.number.length?mS.has(e)&&!a.values.length||mS.has(t)&&!s.values.length?Wse(e,t):lf(aB(Kse(s,a),a.values),n):Qx(e,t)};function iB(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ar(e,t,n):tC(e)(e,t)}const Xse=5;function oB(e,t,n){const s=Math.max(t-Xse,0);return RF(n-e(s),t-s)}const dr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},G0=.001;function Jse({duration:e=dr.duration,bounce:t=dr.bounce,velocity:n=dr.velocity,mass:s=dr.mass}){let a,i,o=1-t;o=si(dr.minDamping,dr.maxDamping,o),e=si(dr.minDuration,dr.maxDuration,Za(e)),o<1?(a=u=>{const m=u*o,f=m*e,p=m-n,b=fS(u,o),v=Math.exp(-f);return G0-p/b*v},i=u=>{const f=u*o*e,p=f*n+n,b=Math.pow(o,2)*Math.pow(u,2)*e,v=Math.exp(-f),g=fS(Math.pow(u,2),o);return(-a(u)+G0>0?-1:1)*((p-b)*v)/g}):(a=u=>{const m=Math.exp(-u*e),f=(u-n)*e+1;return-G0+m*f},i=u=>{const m=Math.exp(-u*e),f=(n-u)*(e*e);return m*f});const l=5/e,c=Zse(a,i,l);if(e=Qa(e),isNaN(c))return{stiffness:dr.stiffness,damping:dr.damping,duration:e};{const u=Math.pow(c,2)*s;return{stiffness:u,damping:o*2*Math.sqrt(s*u),duration:e}}}const Qse=12;function Zse(e,t,n){let s=n;for(let a=1;a<Qse;a++)s=s-e(s)/t(s);return s}function fS(e,t){return e*Math.sqrt(1-t*t)}const eae=["duration","bounce"],tae=["stiffness","damping","mass"];function o4(e,t){return t.some(n=>e[n]!==void 0)}function rae(e){let t={velocity:dr.velocity,stiffness:dr.stiffness,damping:dr.damping,mass:dr.mass,isResolvedFromDuration:!1,...e};if(!o4(e,tae)&&o4(e,eae))if(e.visualDuration){const n=e.visualDuration,s=2*Math.PI/(n*1.2),a=s*s,i=2*si(.05,1,1-(e.bounce||0))*Math.sqrt(a);t={...t,mass:dr.mass,stiffness:a,damping:i}}else{const n=Jse(e);t={...t,...n,mass:dr.mass},t.isResolvedFromDuration=!0}return t}function lB(e=dr.visualDuration,t=dr.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:s,restDelta:a}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:m,duration:f,velocity:p,isResolvedFromDuration:b}=rae({...n,velocity:-Za(n.velocity||0)}),v=p||0,g=u/(2*Math.sqrt(c*m)),y=o-i,w=Za(Math.sqrt(c/m)),N=Math.abs(y)<5;s||(s=N?dr.restSpeed.granular:dr.restSpeed.default),a||(a=N?dr.restDelta.granular:dr.restDelta.default);let S;if(g<1){const k=fS(w,g);S=C=>{const T=Math.exp(-g*w*C);return o-T*((v+g*w*y)/k*Math.sin(k*C)+y*Math.cos(k*C))}}else if(g===1)S=k=>o-Math.exp(-w*k)*(y+(v+w*y)*k);else{const k=w*Math.sqrt(g*g-1);S=C=>{const T=Math.exp(-g*w*C),P=Math.min(k*C,300);return o-T*((v+g*w*y)*Math.sinh(P)+k*y*Math.cosh(P))/k}}const A={calculatedDuration:b&&f||null,next:k=>{const C=S(k);if(b)l.done=k>=f;else{let T=0;g<1&&(T=k===0?Qa(v):oB(S,k,C));const P=Math.abs(T)<=s,R=Math.abs(o-C)<=a;l.done=P&&R}return l.value=l.done?o:C,l},toString:()=>{const k=Math.min(kF(A),iS),C=CF(T=>A.next(k*T).value,k,30);return k+"ms "+C}};return A}function l4({keyframes:e,velocity:t=0,power:n=.8,timeConstant:s=325,bounceDamping:a=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:m}){const f=e[0],p={done:!1,value:f},b=P=>l!==void 0&&P<l||c!==void 0&&P>c,v=P=>l===void 0?c:c===void 0||Math.abs(l-P)<Math.abs(c-P)?l:c;let g=n*t;const y=f+g,w=o===void 0?y:o(y);w!==y&&(g=w-f);const N=P=>-g*Math.exp(-P/s),S=P=>w+N(P),A=P=>{const R=N(P),M=S(P);p.done=Math.abs(R)<=u,p.value=p.done?w:M};let k,C;const T=P=>{b(p.value)&&(k=P,C=lB({keyframes:[p.value,v(p.value)],velocity:oB(S,P,p.value),damping:a,stiffness:i,restDelta:u,restSpeed:m}))};return T(0),{calculatedDuration:null,next:P=>{let R=!1;return!C&&k===void 0&&(R=!0,A(P),T(P)),k!==void 0&&P>=k?C.next(P-k):(!R&&A(P),p)}}}const nae=of(.42,0,1,1),sae=of(0,0,.58,1),cB=of(.42,0,.58,1),aae=e=>Array.isArray(e)&&typeof e[0]!="number",iae={linear:Xn,easeIn:nae,easeInOut:cB,easeOut:sae,circIn:Xk,circInOut:UF,circOut:VF,backIn:Yk,backInOut:BF,backOut:FF,anticipate:qF},c4=e=>{if(zk(e)){iF(e.length===4);const[t,n,s,a]=e;return of(t,n,s,a)}else if(typeof e=="string")return iae[e];return e};function oae(e,t,n){const s=[],a=n||iB,i=e.length-1;for(let o=0;o<i;o++){let l=a(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||Xn:t;l=lf(c,l)}s.push(l)}return s}function lae(e,t,{clamp:n=!0,ease:s,mixer:a}={}){const i=e.length;if(iF(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=oae(t,s,a),c=l.length,u=m=>{if(o&&m<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(m<e[f+1]);f++);const p=vd(e[f],e[f+1],m);return l[f](p)};return n?m=>u(si(e[0],e[i-1],m)):u}function cae(e,t){const n=e[e.length-1];for(let s=1;s<=t;s++){const a=vd(0,t,s);e.push(ar(n,1,a))}}function dae(e){const t=[0];return cae(t,e.length-1),t}function uae(e,t){return e.map(n=>n*t)}function hae(e,t){return e.map(()=>t||cB).splice(0,e.length-1)}function Zx({duration:e=300,keyframes:t,times:n,ease:s="easeInOut"}){const a=aae(s)?s.map(c4):c4(s),i={done:!1,value:t[0]},o=uae(n&&n.length===t.length?n:dae(t),e),l=lae(o,t,{ease:Array.isArray(a)?a:hae(t,a)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const mae=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Qt.update(t,!0),stop:()=>ho(t),now:()=>Gr.isProcessing?Gr.timestamp:ma.now()}},fae={decay:l4,inertia:l4,tween:Zx,keyframes:Zx,spring:lB},pae=e=>e/100;class rC extends sB{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:s,element:a,keyframes:i}=this.options,o=(a==null?void 0:a.KeyframeResolver)||eC,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new o(i,l,n,s,a),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:s=0,repeatDelay:a=0,repeatType:i,velocity:o=0}=this.options,l=Uk(n)?n:fae[n]||Zx;let c,u;l!==Zx&&typeof t[0]!="number"&&(c=lf(pae,iB(t[0],t[1])),t=[0,100]);const m=l({...this.options,keyframes:t});i==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),m.calculatedDuration===null&&(m.calculatedDuration=kF(m));const{calculatedDuration:f}=m,p=f+a,b=p*(s+1)-a;return{generator:m,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:p,totalDuration:b}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:s}=this;if(!s){const{keyframes:P}=this.options;return{done:!0,value:P[P.length-1]}}const{finalKeyframe:a,generator:i,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:m,resolvedDuration:f}=s;if(this.startTime===null)return i.next(0);const{delay:p,repeat:b,repeatType:v,repeatDelay:g,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-m/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const w=this.currentTime-p*(this.speed>=0?1:-1),N=this.speed>=0?w<0:w>m;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=m);let S=this.currentTime,A=i;if(b){const P=Math.min(this.currentTime,m)/f;let R=Math.floor(P),M=P%1;!M&&P>=1&&(M=1),M===1&&R--,R=Math.min(R,b+1),!!(R%2)&&(v==="reverse"?(M=1-M,g&&(M-=g/f)):v==="mirror"&&(A=o)),S=si(0,1,M)*f}const k=N?{done:!1,value:c[0]}:A.next(S);l&&(k.value=l(k.value));let{done:C}=k;!N&&u!==null&&(C=this.speed>=0?this.currentTime>=m:this.currentTime<=0);const T=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return T&&a!==void 0&&(k.value=_y(c,this.options,a)),y&&y(k.value),T&&this.finish(),
vendor: 58,881 bytes, line 700
700k}get duration(){const{resolved:t}=this;return t?Za(t.calculatedDuration):0}get time(){return Za(this.currentTime)}set time(t){t=Qa(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Za(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=mae,onPlay:n,startTime:s}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const a=this.driver.now();this.holdTime!==null?this.startTime=a-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=a):this.startTime=s??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const xae=new Set(["opacity","clipPath","filter","transform"]);function gae(e,t,n,{delay:s=0,duration:a=300,repeat:i=0,repeatType:o="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const m=TF(l,a);return Array.isArray(m)&&(u.easing=m),e.animate(u,{delay:s,duration:a,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const yae=Ak(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),eg=10,vae=2e4;function bae(e){return Uk(e.type)||e.type==="spring"||!AF(e.ease)}function jae(e,t){const n=new rC({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let s={done:!1,value:e[0]};const a=[];let i=0;for(;!s.done&&i<vae;)s=n.sample(i),a.push(s.value),i+=eg;return{times:void 0,keyframes:a,duration:i-eg,ease:"linear"}}const dB={anticipate:qF,backInOut:BF,circInOut:UF};function wae(e){return e in dB}class d4 extends sB{constructor(t){super(t);const{name:n,motionValue:s,element:a,keyframes:i}=this.options;this.resolver=new nB(i,(o,l)=>this.onKeyframesResolved(o,l),n,s,a),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:s=300,times:a,ease:i,type:o,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&Jx()&&wae(i)&&(i=dB[i]),bae(this.options)){const{onComplete:f,onUpdate:p,motionValue:b,element:v,...g}=this.options,y=jae(t,g);t=y.keyframes,t.length===1&&(t[1]=t[0]),s=y.duration,a=y.times,i=y.ease,o="keyframes"}const m=gae(l.owner.current,c,t,{...this.options,duration:s,times:a,ease:i});return m.startTime=u??this.calcStartTime(),this.pendingTimeline?(KO(m,this.pendingTimeline),this.pendingTimeline=void 0):m.onfinish=()=>{const{onComplete:f}=this.options;l.set(_y(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:m,duration:s,times:a,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Za(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Za(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.currentTime=Qa(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:s}=n;s.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Xn;const{animation:s}=n;KO(s,t)}return Xn}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:s,duration:a,type:i,ease:o,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:m,onComplete:f,element:p,...b}=this.options,v=new rC({...b,keyframes:s,duration:a,type:i,ease:o,times:l,isGenerator:!0}),g=Qa(this.time);u.setWithVelocity(v.sample(g-eg).value,v.sample(g).value,eg)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:s,repeatDelay:a,repeatType:i,damping:o,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return yae()&&s&&xae.has(s)&&!c&&!u&&!a&&i!=="mirror"&&o!==0&&l!=="inertia"}}const Nae={type:"spring",stiffness:500,damping:25,restSpeed:10},_ae=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Sae={type:"keyframes",duration:.8},kae={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Cae=(e,{keyframes:t})=>t.length>2?Sae:Jl.has(e)?e.startsWith("scale")?_ae(t[1]):Nae:kae;function Aae({when:e,delay:t,delayChildren:n,staggerChildren:s,staggerDirection:a,repeat:i,repeatType:o,repeatDelay:l,from:c,elapsed:u,...m}){return!!Object.keys(m).length}const nC=(e,t,n,s={},a,i)=>o=>{const l=Vk(s,e)||{},c=l.delay||s.delay||0;let{elapsed:u=0}=s;u=u-Qa(c);let m={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:p=>{t.set(p),l.onUpdate&&l.onUpdate(p)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:a};Aae(l)||(m={...m,...Cae(e,m)}),m.duration&&(m.duration=Qa(m.duration)),m.repeatDelay&&(m.repeatDelay=Qa(m.repeatDelay)),m.from!==void 0&&(m.keyframes[0]=m.from);let f=!1;if((m.type===!1||m.duration===0&&!m.repeatDelay)&&(m.duration=0,m.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const p=_y(m.keyframes,l);if(p!==void 0)return Qt.update(()=>{m.onUpdate(p),m.onComplete()}),new Gne([])}return!i&&d4.supports(m)?new d4(m):new rC(m)};function Tae({protectedKeys:e,needsAnimating:t},n){const s=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,s}function uB(e,t,{delay:n=0,transitionOverride:s,type:a}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...c}=t;s&&(o=s);const u=[],m=a&&e.animationState&&e.animationState.getState()[a];for(const f in c){const p=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),b=c[f];if(b===void 0||m&&Tae(m,f))continue;const v={delay:n,...Vk(o||{},f)};let g=!1;if(window.MotionHandoffAnimation){const w=IF(e);if(w){const N=window.MotionHandoffAnimation(w,f,Qt);N!==null&&(v.startTime=N,g=!0)}}lS(e,f),p.start(nC(f,p,b,e.shouldReduceMotion&&MF.has(f)?{type:!1}:v,e,g));const y=p.animation;y&&u.push(y)}return l&&Promise.all(u).then(()=>{Qt.update(()=>{l&&ose(e,l)})}),u}function pS(e,t,n={}){var s;const a=Ny(e,t,n.type==="exit"?(s=e.presenceContext)===null||s===void 0?void 0:s.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=a||{};n.transitionOverride&&(i=n.transitionOverride);const o=a?()=>Promise.all(uB(e,a,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:m=0,staggerChildren:f,staggerDirection:p}=i;return Eae(e,t,m+u,f,p,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[u,m]=c==="beforeChildren"?[o,l]:[l,o];return u().then(()=>m())}else return Promise.all([o(),l(n.delay)])}function Eae(e,t,n=0,s=0,a=1,i){const o=[],l=(e.variantChildren.size-1)*s,c=a===1?(u=0)=>u*s:(u=0)=>l-u*s;return Array.from(e.variantChildren).sort(Pae).forEach((u,m)=>{u.notify("AnimationStart",t),o.push(pS(u,t,{...i,delay:n+c(m)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function Pae(e,t){return e.sortNodePosition(t)}function Oae(e,t,n={}){e.notify("AnimationStart",t);let s;if(Array.isArray(t)){const a=t.map(i=>pS(e,i,n));s=Promise.all(a)}else if(typeof t=="string")s=pS(e,t,n);else{const a=typeof t=="function"?Ny(e,t,n.custom):t;s=Promise.all(uB(e,a,n))}return s.then(()=>{e.notify("AnimationComplete",t)})}const Mae=Ek.length;function hB(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?hB(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Mae;n++){const s=Ek[n],a=e.props[s];(em(a)||a===!1)&&(t[s]=a)}return t}const Rae=[...Tk].reverse(),Iae=Tk.length;function Dae(e){return t=>Promise.all(t.map(({animation:n,options:s})=>Oae(e,n,s)))}function Lae(e){let t=Dae(e),n=u4(),s=!0;const a=c=>(u,m)=>{var f;const p=Ny(e,m,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(p){const{transition:b,transitionEnd:v,...g}=p;u={...u,...g,...v}}return u};function i(c){t=c(e)}function o(c){const{props:u}=e,m=hB(e.parent)||{},f=[],p=new Set;let b={},v=1/0;for(let y=0;y<Iae;y++){const w=Rae[y],N=n[w],S=u[w]!==void 0?u[w]:m[w],A=em(S),k=w===c?N.isActive:null;k===!1&&(v=y);let C=S===m[w]&&S!==u[w]&&A;if(C&&s&&e.manuallyAnimateOnMount&&(C=!1),N.protectedKeys={...b},!N.isActive&&k===null||!S&&!N.prevProp||jy(S)||typeof S=="boolean")continue;const T=$ae(N.prevProp,S);let P=T||w===c&&N.isActive&&!C&&A||y>v&&A,R=!1;const M=Array.isArray(S)?S:[S];let D=M.reduce(a(w),{});k===!1&&(D={});const{prevResolvedValues:$={}}=N,q={...$,...D},H=Y=>{P=!0,p.has(Y)&&(R=!0,p.delete(Y)),N.needsAnimating[Y]=!0;const U=e.getValue(Y);U&&(U.liveStyle=!1)};for(const Y in q){const U=D[Y],re=$[Y];if(b.hasOwnProperty(Y))continue;let G=!1;aS(U)&&aS(re)?G=!SF(U,re):G=U!==re,G?U!=null?H(Y):p.add(Y):U!==void 0&&p.has(Y)?H(Y):N.protectedKeys[Y]=!0}N.prevProp=S,N.prevResolvedValues=D,N.isActive&&(b={...b,...D}),s&&e.blockInitialAnimation&&(P=!1),P&&(!(C&&T)||R)&&f.push(...M.map(Y=>({animation:Y,options:{type:w}})))}if(p.size){const y={};p.forEach(w=>{const N=e.getBaseTarget(w),S=e.getValue(w);S&&(S.liveStyle=!0),y[w]=N??null}),f.push({animation:y})}let g=!!f.length;return s&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(g=!1),s=!1,g?t(f):Promise.resolve()}function l(c,u){var m;if(n[c].isActive===u)return Promise.resolve();(m=e.variantChildren)===null||m===void 0||m.forEach(p=>{var b;return(b=p.animationState)===null||b===void 0?void 0:b.setActive(c,u)}),n[c].isActive=u;const f=o(c);for(const p in n)n[p].protectedKeys={};return f}return{animateChanges:o,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=u4(),s=!0}}}function $ae(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!SF(t,e):!1}function Ho(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function u4(){return{animate:Ho(!0),whileInView:Ho(),whileHover:Ho(),whileTap:Ho(),whileDrag:Ho(),whileFocus:Ho(),exit:Ho()}}class bo{constructor(t){this.isMounted=!1,this.node=t}update(){}}class Fae extends bo{constructor(t){super(t),t.animationState||(t.animationState=Lae(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();jy(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let Bae=0;class qae extends bo{constructor(){super(...arguments),this.id=Bae++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const a=this.node.animationState.setActive("exit",!t);n&&!t&&a.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const Vae={animation:{Feature:Fae},exit:{Feature:qae}};function sm(e,t,n,s={passive:!0}){return e.addEventListener(t,n,s),()=>e.removeEventListener(t,n)}function cf(e){return{point:{x:e.pageX,y:e.pageY}}}const Uae=e=>t=>Wk(t)&&e(t,cf(t));function $h(e,t,n,s){return sm(e,t,Uae(n),s)}const h4=(e,t)=>Math.abs(e-t);function zae(e,t){const n=h4(e.x,t.x),s=h4(e.y,t.y);return Math.sqrt(n**2+s**2)}class mB{constructor(t,n,{transformPagePoint:s,contextWindow:a,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=Y0(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,b=zae(f.offset,{x:0,y:0})>=3;if(!p&&!b)return;const{point:v}=f,{timestamp:g}=Gr;this.history.push({...v,timestamp:g});const{onStart:y,onMove:w}=this.handlers;p||(y&&y(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,f)},this.handlePointerMove=(f,p)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=K0(p,this.transformPagePoint),Qt.update(this.updatePoint,!0)},this.handlePointerUp=(f,p)=>{this.end();const{onEnd:b,onSessionEnd:v,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Y0(f.type==="pointercancel"?this.lastMoveEventInfo:K0(p,this.transformPagePoint),this.history);this.startEvent&&b&&b(f,y),v&&v(f,y)},!Wk(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=s,this.contextWindow=a||window;const o=cf(t),l=K0(o,this.transformPagePoint),{point:c}=l,{timestamp:u}=Gr;this.history=[{...c,timestamp:u}];const{onSessionStart:m}=n;m&&m(t,Y0(l,this.history)),this.removeListeners=lf($h(this.contextWindow,"pointermove",this.handlePointerMove),$h(this.contextWindow,"pointerup",this.handlePointerUp),$h(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ho(this.updatePoint)}}function K0(e,t){return t?{point:t(e.point)}:e}function m4(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Y0({point:e},t){return{point:e,delta:m4(e,fB(t)),offset:m4(e,Wae(t)),velocity:Hae(t,.1)}}function Wae(e){return e[0]}function fB(e){return e[e.length-1]}function Hae(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,s=null;const a=fB(e);for(;n>=0&&(s=e[n],!(a.timestamp-s.timestamp>Qa(t)));)n--;if(!s)return{x:0,y:0};const i=Za(a.timestamp-s.timestamp);if(i===0)return{x:0,y:0};const o={x:(a.x-s.x)/i,y:(a.y-s.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const pB=1e-4,Gae=1-pB,Kae=1+pB,xB=.01,Yae=0-xB,Xae=0+xB;function rs(e){return e.max-e.min}function Jae(e,t,n){return Math.abs(e-t)<=n}function f4(e,t,n,s=.5){e.origin=s,e.originPoint=ar(t.min,t.max,e.origin),e.scale=rs(n)/rs(t),e.translate=ar(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Gae&&e.scale<=Kae||isNaN(e.scale))&&(e.scale=1),(e.translate>=Yae&&e.translate<=Xae||isNaN(e.translate))&&(e.translate=0)}function Fh(e,t,n,s){f4(e.x,t.x,n.x,s?s.originX:void 0),f4(e.y,t.y,n.y,s?s.originY:void 0)}function p4(e,t,n){e.min=n.min+t.min,e.max=e.min+rs(t)}function Qae(e,t,n){p4(e.x,t.x,n.x),p4(e.y,t.y,n.y)}function x4(e,t,n){e.min=t.min-n.min,e.max=e.min+rs(t)}function Bh(e,t,n){x4(e.x,t.x,n.x),x4(e.y,t.y,n.y)}function Zae(e,{min:t,max:n},s){return t!==void 0&&e<t?e=s?ar(t,e,s.min):Math.max(e,t):n!==void 0&&e>n&&(e=s?ar(n,e,s.max):Math.min(e,n)),e}function g4(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eie(e,{top:t,left:n,bottom:s,right:a}){return{x:g4(e.x,n,a),y:g4(e.y,t,s)}}function y4(e,t){let n=t.min-e.min,s=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,s]=[s,n]),{min:n,max:s}}function tie(e,t){return{x:y4(e.x,t.x),y:y4(e.y,t.y)}}function rie(e,t){let n=.5;const s=rs(e),a=rs(t);return a>s?n=vd(t.min,t.max-s,e.min):s>a&&(n=vd(e.min,e.max-a,t.min)),si(0,1,n)}function nie(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const xS=.35;function sie(e=xS){return e===!1?e=0:e===!0&&(e=xS),{x:v4(e,"left","right"),y:v4(e,"top","bottom")}}function v4(e,t,n){return{min:b4(e,t),max:b4(e,n)}}function b4(e,t){return typeof e=="number"?e:e[t]||0}const j4=()=>({translate:0,scale:1,origin:0,originPoint:0}),zc=()=>({x:j4(),y:j4()}),w4=()=>({min:0,max:0}),gr=()=>({x:w4(),y:w4()});function ms(e){return[e("x"),e("y")]}function gB({top:e,left:t,right:n,bottom:s}){return{x:{min:t,max:n},y:{min:e,max:s}}}function aie({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function iie(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}function X0(e){return e===void 0||e===1}function gS({scale:e,scaleX:t,scaleY:n}){return!X0(e)||!X0(t)||!X0(n)}function tl(e){return gS(e)||yB(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function yB(e){return N4(e.x)||N4(e.y)}function N4(e){return e&&e!=="0%"}function tg(e,t,n){const s=e-n,a=t*s;return n+a}function _4(e,t,n,s,a){return a!==void 0&&(e=tg(e,a,s)),tg(e,n,s)+t}function yS(e,t=0,n=1,s,a){e.min=_4(e.min,t,n,s,a),e.max=_4(e.max,t,n,s,a)}function vB(e,{x:t,y:n}){yS(e.x,t.translate,t.scale,t.originPoint),yS(e.y,n.translate,n.scale,n.originPoint)}const S4=.999999999999,k4=1.0000000000001;function oie(e,t,n,s=!1){const a=n.length;if(!a)return;t.x=t.y=1;let i,o;for(let l=0;l<a;l++){i=n[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(s&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Hc(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,vB(e,o)),s&&tl(i.latestValues)&&Hc(e,i.latestValues))}t.x<k4&&t.x>S4&&(t.x=1),t.y<k4&&t.y>S4&&(t.y=1)}function Wc(e,t){e.min=e.min+t,e.max=e.max+t}function C4(e,t,n,s,a=.5){const i=ar(e.min,e.max,a);yS(e,t,n,i,s)}function Hc(e,t){C4(e.x,t.x,t.scaleX,t.scale,t.originX),C4(e.y,t.y,t.scaleY,t.scale,t.originY)}function bB(e,t){return gB(iie(e.getBoundingClientRect(),t))}function lie(e,t,n){const s=bB(e,n),{scroll:a}=t;return a&&(Wc(s.x,a.offset.x),Wc(s.y,a.offset.y)),s}const jB=({current:e})=>e?e.ownerDocument.defaultView:null,cie=new WeakMap;class die{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=gr(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const a=m=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(cf(m).point)},i=(m,f)=>{const{drag:p,dragPropagation:b,onDragStart:v}=this.getProps();if(p&&!b&&(this.openDragLock&&this.openDragLock(),this.openDragLock=rse(p),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ms(y=>{let w=this.getAxisMotionValue(y).get()||0;if(ha.test(w)){const{projection:N}=this.visualElement;if(N&&N.layout){const S=N.layout.layoutBox[y];S&&(w=rs(S)*(parseFloat(w)/100))}}this.originPoint[y]=w}),v&&Qt.postRender(()=>v(m,f)),lS(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},o=(m,f)=>{const{dragPropagation:p,dragDirectionLock:b,onDirectionLock:v,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(b&&this.currentDirection===null){this.currentDirection=uie(y),this.currentDirection!==null&&v&&v(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&g(m,f)},l=(m,f)=>this.stop(m,f),c=()=>ms(m=>{var f;return this.getAnimationState(m)==="paused"&&((f=this.getAxisMotionValue(m).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new mB(t,{onSessionStart:a,onStart:i,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:jB(this.visualElement)})}stop(t,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:a}=n;this.startAnimation(a);const{onDragEnd:i}=this.getProps();i&&Qt.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,s){const{drag:a}=this.getProps();if(!s||!qp(t,a,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+s[t];this.constraints&&this.constraints[t]&&(o=Zae(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:s}=this.getProps(),a=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Vc(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&a?this.constraints=eie(a.layoutBox,n):this.constraints=!1,this.elastic=sie(s),i!==this.constraints&&a&&this.constraints&&!this.hasMutatedConstraints&&ms(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=nie(a.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Vc(t))return!1;const s=t.current,{projection:a}=this.visualElement;if(!a||!a.layout)return!1;const i=lie(s,a.root,this.visualElement.getTransformPagePoint());let o=tie(a.layout.layoutBox,i);if(n){const l=n(aie(o));this.hasMutatedConstraints=!!l,l&&(o=gB(l))}return o}startAnimation(t){const{drag:n,dragMomentum:s,dragElastic:a,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=ms(m=>{if(!qp(m,n,this.currentDirection))return;let f=c&&c[m]||{};o&&(f={min:0,max:0});const p=a?200:1e6,b=a?40:1e7,v={type:"inertia",velocity:s?t[m]:0,bounceStiffness:p,bounceDamping:b,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(m,v)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const s=this.getAxisMotionValue(t);return lS(this.visualElement,t),s.start(nC(t,s,0,n,this.visualElement,!1))}stopAnimation(){ms(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ms(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,s=this.visualElement.getProps(),a=s[n];return a||this.visualElement.getValue(t,(s.initial?s.initial[t]:void 0)||0)}snapToCursor(t){ms(n=>{const{drag:s}=this.getProps();if(!qp(n,s,this.currentDirection))return;const{projection:a}=this.visualElement,i=this.getAxisMotionValue(n);if(a&&a.layout){const{min:o,max:l}=a.layout.layoutBox[n];i.set(t[n]-ar(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!Vc(n)||!s||!this.constraints)return;this.stopAnimation();const a={x:0,y:0};ms(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();a[o]=rie({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),ms(o=>{if(!qp(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(ar(c,u,a[o]))})}addListeners(){if(!this.visualElement.current)return;cie.set(this.visualElement,this);const t=this.visualElement.current,n=$h(t,"pointerdown",c=>{const{drag:u,dragListener:m=!0}=this.getProps();u&&m&&this.start(c)}),s=()=>{const{dragConstraints:c}=this.getProps();Vc(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:a}=this.visualElement,i=a.addEventListener("measure",s);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),Qt.read(s);const o=sm(window,"resize",()=>this.scalePositionWithinConstraints()),l=a.addEventListener("didUpdate",(({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(ms(m=>{const f=this.getAxisMotionValue(m);f&&(this.originPoint[m]+=c[m].translate,f.set(f.get()+c[m].translate))}),this.visualElement.render())}));return()=>{o(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:a=!1,dragConstraints:i=!1,dragElastic:o=xS,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:s,dragPropagation:a,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function qp(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function uie(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class hie extends bo{constructor(t){super(t),this.removeGroupControls=Xn,this.removeListeners=Xn,this.controls=new die(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Xn}unmount(){this.removeGroupControls(),this.removeListeners()}}const A4=e=>(t,n)=>{e&&Qt.postRender(()=>e(t,n))};class mie extends bo{constructor(){super(...arguments),this.removePointerDownListener=Xn}onPointerDown(t){this.session=new mB(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:jB(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:s,onPanEnd:a}=this.node.getProps();return{onSessionStart:A4(t),onStart:A4(n),onMove:s,onEnd:(i,o)=>{delete this.session,a&&Qt.postRender(()=>a(i,o))}}}mount(){this.removePointerDownListener=$h(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Ax={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function T4(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const nh={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(tt.test(e))e=parseFloat(e);else return e;const n=T4(e,t.target.x),s=T4(e,t.target.y);return`${n}% ${s}%`}},fie={correct:(e,{treeScale:t,projectionDelta:n})=>{const s=e,a=mo.parse(e);if(a.length>5)return s;const i=mo.createTransformer(e),o=typeof a[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;a[0+o]/=l,a[1+o]/=c;const u=ar(l,c,.5);return typeof a[2+o]=="number"&&(a[2+o]/=u),typeof a[3+o]=="number"&&(a[3+o]/=u),i(a)}};class pie extends j.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s,layoutId:a}=this.props,{projection:i}=t;Ine(xie),i&&(n.group&&n.group.add(i),s&&s.register&&a&&s.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),Ax.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:s,drag:a,isPresent:i}=this.props,o=s.projection;return o&&(o.isPresent=i,a||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||Qt.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ok.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:a}=t;a&&(a.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(a),s&&s.deregister&&s.deregister(a))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function wB(e){const[t,n]=Xre(),s=j.useContext(sF);return r.jsx(pie,{...e,layoutGroup:s,switchLayoutGroup:j.useContext(hF),isPresent:t,safeToRemove:n})}const xie={borderRadius:{...nh,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:nh,borderTopRightRadius:nh,borderBottomLeftRadius:nh,borderBottomRightRadius:nh,boxShadow:fie};function gie(e,t,n){const s=ln(e)?e:rm(e);return s.start(nC("",s,t,n)),s.animation}function yie(e){return e instanceof SVGElement&&e.tagName!=="svg"}const vie=(e,t)=>e.depth-t.depth;class bie{constructor(){this.children=[],this.isDirty=!1}add(t){Hk(this.children,t),this.isDirty=!0}remove(t){Gk(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(vie),this.isDirty=!1,this.children.forEach(t)}}function jie(e,t){const n=ma.now(),s=({timestamp:a})=>{const i=a-n;i>=t&&(ho(s),e(i-t))};return Qt.read(s,!0),()=>ho(s)}const NB=["TopLeft","TopRight","BottomLeft","BottomRight"],wie=NB.length,E4=e=>typeof e=="string"?parseFloat(e):e,P4=e=>typeof e=="number"||tt.test(e);function Nie(e,t,n,s,a,i){a?(e.opacity=ar(0,n.opacity!==void 0?n.opacity:1,_ie(s)),e.opacityExit=ar(t.opacity!==void 0?t.opacity:1,0,Sie(s))):i&&(e.opacity=ar(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,s));for(let o=0;o<wie;o++){const l=`border${NB[o]}Radius`;let c=O4(t,l),u=O4(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||P4(c)===P4(u)?(e[l]=Math.max(ar(E4(c),E4(u),s),0),(ha.test(u)||ha.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=ar(t.rotate||0,n.rotate||0,s))}function O4(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const _ie=_B(0,.5,VF),Sie=_B(.5,.95,Xn);function _B(e,t,n){return s=>s<e?0:s>t?1:n(vd(e,t,s))}function M4(e,t){e.min=t.min,e.max=t.max}function cs(e,t){M4(e.x,t.x),M4(e.y,t.y)}function R4(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function I4(e,t,n,s,a){return e-=t,e=tg(e,1/n,s),a!==void 0&&(e=tg(e,1/a,s)),e}function kie(e,t=0,n=1,s=.5,a,i=e,o=e){if(ha.test(t)&&(t=parseFloat(t),t=ar(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=ar(i.min,i.max,s);e===i&&(l-=t),e.min=I4(e.min,t,n,l,a),e.max=I4(e.max,t,n,l,a)}function D4(e,t,[n,s,a],i,o){kie(e,t[n],t[s],t[a],t.scale,i,o)}const Cie=["x","scaleX","originX"],Aie=["y","scaleY","originY"];function L4(e,t,n,s){D4(e.x,t,Cie,n?n.x:void 0,s?s.x:void 0),D4(e.y,t,Aie,n?n.y:void 0,s?s.y:void 0)}function $4(e){return e.translate===0&&e.scale===1}function SB(e){return $4(e.x)&&$4(e.y)}function F4(e,t){return e.min===t.min&&e.max===t.max}function Tie(e,t){return F4(e.x,t.x)&&F4(e.y,t.y)}function B4(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function kB(e,t){return B4(e.x,t.x)&&B4(e.y,t.y)}function q4(e){return rs(e.x)/rs(e.y)}function V4(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Eie{constructor(){this.members=[]}add(t){Hk(this.members,t),t.scheduleRender()}remove(t){if(Gk(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(a=>t===a);if(n===0)return!1;let s;for(let a=n;a>=0;a--){const i=this.members[a];if(i.isPresent!==!1){s=i;break}}return s?(this.promote(s),!0):!1}promote(t,n){const s=this.lead;if(t!==s&&(this.prevLead=s,this.lead=t,t.show(),s)){s.instance&&s.scheduleRender(),t.scheduleRender(),t.resumeFrom=s,n&&(t.resumeFrom.preserveOpacity=!0),s.snapshot&&(t.snapshot=s.snapshot,t.snapshot.latestValues=s.animationValues||s.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:a}=t.options;a===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:s}=t;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function Pie(e,t,n){let s="";const a=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((a||i||o)&&(s=`translate3d(${a}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(s+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:m,rotateX:f,rotateY:p,skewX:b,skewY:v}=n;u&&(s=`perspective(${u}px) ${s}`),m&&(s+=`rotate(${m}deg) `),f&&(s+=`rotateX(${f}deg) `),p&&(s+=`rotateY(${p}deg) `),b&&(s+=`skewX(${b}deg) `),v&&(s+=`skewY(${v}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(s+=`scale(${l}, ${c})`),s||"none"}const rl={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Ah=typeof window<"u"&&window.MotionDebug!==void 0,J0=["","X","Y","Z"],Oie={visibility:"hidden"},U4=1e3;let Mie=0;function Q0(e,t,n,s){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),s&&(s[e]=0))}function CB(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=IF(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:a,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Qt,!(a||i))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&CB(s)}function AB({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:s,resetTransform:a}){return class{constructor(o={},l=t==null?void 0:t()){this.id=Mie++,this.animationId=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,Ah&&(rl.totalNodes=rl.resolvedTargetDeltas=rl.recalculatedProjection=0),this.nodes.forEach(Die),this.nodes.forEach(qie),this.nodes.forEach(Vie),this.nodes.forEach(Lie),Ah&&window.MotionDebug.record(rl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new bie)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new Kk),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=yie(o),this.instance=o;const{layoutId:c,layout:u,visualElement:m}=this.options;if(m&&!m.current&&m.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const p=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=jie(p,250),Ax.hasAnimatedSinceResize&&(Ax.hasAnimatedSinceResize=!1,this.nodes.forEach(W4))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&m&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:p,hasRelativeTargetChanged:b,layout:v})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||m.getDefaultTransition()||Gie,{onLayoutAnimationStart:y,onLayoutAnimationComplete:w}=m.getProps(),N=!this.targetLayout||!kB(this.targetLayout,v)||b,S=!p&&b;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||S||p&&(N||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,S);const A={...Vk(g,"layout"),onPlay:y,onComplete:w};(m.shouldReduceMotion||this.options.layoutRoot)&&(A.delay=0,A.type=!1),this.startAnimation(A)}else p||W4(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=v})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ho(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(Uie),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&CB(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let m=0;m<this.path.length;m++){const f=this.path[m];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(z4);return}this.isUpdating||this.nodes.forEach(Fie),this.isUpdating=!1,this.nodes.forEach(Bie),this.nodes.forEach(Rie),this.nodes.forEach(Iie),this.clearAllSnapshots();const l=ma.now();Gr.delta=si(0,1e3/60,l-Gr.timestamp),Gr.timestamp=l,Gr.isProcessing=!0,V0.update.process(Gr),V0.preRender.process(Gr),V0.render.process(Gr),Gr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ok.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach($ie),this.sharedNodes.forEach(zie)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Qt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Qt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=gr(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const c=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!a)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!SB(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,m=u!==this.prevTransformTemplateValue;o&&(l||tl(this.latestValues)||m)&&(a(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),Kie(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return gr();const c=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(Yie))){const{scroll:m}=this.root;m&&(Wc(c.x,m.offset.x),Wc(c.y,m.offset.y))}return c}removeElementScroll(o){var l;const c=gr();if(cs(c,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const m=this.path[u],{scroll:f,options:p}=m;m!==this.root&&f&&p.layoutScroll&&(f.wasRoot&&cs(c,o),Wc(c.x,f.offset.x),Wc(c.y,f.offset.y))}return c}applyTransform(o,l=!1){const c=gr();cs(c,o);for(let u=0;u<this.path.length;u++){const m=this.path[u];!l&&m.options.layoutScroll&&m.scroll&&m!==m.root&&Hc(c,{x:-m.scroll.offset.x,y:-m.scroll.offset.y}),tl(m.latestValues)&&Hc(c,m.latestValues)}return tl(this.latestValues)&&Hc(c,this.latestValues),c}removeTransform(o){const l=gr();cs(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!tl(u.latestValues))continue;gS(u.latestValues)&&u.updateSnapshot();const m=gr(),f=u.measurePageBox();cs(m,f),L4(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,m)}return tl(this.latestValues)&&L4(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==Gr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:p}=this.options;if(!(!this.layout||!(f||p))){if(this.resolvedRelativeTargetAt=Gr.timestamp,!this.targetDelta&&!this.relativeTarget){const b=this.getClosestProjectingParent();b&&b.layout&&this.animationProgress!==1?(this.relativeParent=b,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gr(),this.relativeTargetOrigin=gr(),Bh(this.relativeTargetOrigin,this.layout.layoutBox,b.layout.layoutBox),cs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=gr(),this.targetWithTransforms=gr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Qae(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):cs(this.target,this.layout.layoutBox),vB(this.target,this.targetDelta)):cs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const b=this.getClosestProjectingParent();b&&!!b.resumingFrom==!!this.resumingFrom&&!b.options.layoutScroll&&b.target&&this.animationProgress!==1?(this.relativeParent=b,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gr(),this.relativeTargetOrigin=gr(),Bh(this.relativeTargetOrigin,this.target,b.target),cs(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Ah&&rl.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||gS(this.parent.latestValues)||yB(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Gr.timestamp&&(u=!1),u)return;const{layout:m,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(m||f))return;cs(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,b=this.treeScale.y;oie(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=gr());const{target:v}=l;if(!v){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(R4(this.prevProjectionDelta.x,this.projectionDelta.x),R4(this.prevProjectionDelta.y,this.projectionDelta.y)),Fh(this.projectionDelta,this.layoutCorrected,v,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==b||!V4(this.projectionDelta.x,this.prevProjectionDelta.x)||!V4(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",v)),Ah&&rl.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=zc(),this.projectionDelta=zc(),this.projectionDeltaWithTransform=zc()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},m={...this.latestValues},f=zc();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const p=gr(),b=c?c.source:void 0,v=this.layout?this.layout.source:void 0,g=b!==v,y=this.getStack(),w=!y||y.members.length<=1,N=!!(g&&!w&&this.options.crossfade===!0&&!this.path.some(Hie));this.animationProgress=0;let S;this.mixTargetDelta=A=>{const k=A/1e3;H4(f.x,o.x,k),H4(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bh(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Wie(this.relativeTarget,this.relativeTargetOrigin,p,k),S&&Tie(this.relativeTarget,S)&&(this.isProjectionDirty=!1),S||(S=gr()),cs(S,this.relativeTarget)),g&&(this.animationValues=m,Nie(m,u,this.latestValues,k,N,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ho(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Qt.update(()=>{Ax.hasAnimatedSinceResize=!0,this.currentAnimation=gie(0,U4,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(U4),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:m}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&TB(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||gr();const f=rs(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const p=rs(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+p}cs(l,c),Hc(l,m),Fh(this.projectionDeltaWithTransform,this.layoutCorrected,l,m)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new Eie),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Q0("z",o,u,this.animationValues);for(let m=0;m<J0.length;m++)Q0(`rotate${J0[m]}`,o,u,this.animationValues),Q0(`skew${J0[m]}`,o,u,this.animationValues);o.render();for(const m in u)o.setStaticValue(m,u[m]),this.animationValues&&(this.animationValues[m]=u[m]);o.scheduleRender()}getProjectionStyles(o){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Oie;const u={visibility:""},m=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=kx(o==null?void 0:o.pointerEvents)||"",u.transform=m?m(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=kx(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!tl(this.latestValues)&&(g.transform=m?m({},""):"none",this.hasProjected=!1),g}const p=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=Pie(this.projectionDeltaWithTransform,this.treeScale,p),m&&(u.transform=m(p,u.transform));const{x:b,y:v}=this.projectionDelta;u.transformOrigin=`${b.origin*100}% ${v.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(l=p.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:p.opacityExit:u.opacity=f===this?p.opacity!==void 0?p.opacity:"":p.opacityExit!==void 0?p.opacityExit:0;for(const g in Xx){if(p[g]===void 0)continue;const{correct:y,applyTo:w}=Xx[g],N=u.transform==="none"?p[g]:y(p[g],f);if(w){const S=w.length;for(let A=0;A<S;A++)u[w[A]]=N}else u[g]=N}return this.options.layoutId&&(u.pointerEvents=f===this?kx(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(z4),this.root.sharedNodes.clear()}}}function Rie(e){e.updateLayout()}function Iie(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:s,measuredBox:a}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?ms(f=>{const p=o?n.measuredBox[f]:n.layoutBox[f],b=rs(p);p.min=s[f].min,p.max=p.min+b}):TB(i,n.layoutBox,s)&&ms(f=>{const p=o?n.measuredBox[f]:n.layoutBox[f],b=rs(s[f]);p.max=p.min+b,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+b)});const l=zc();Fh(l,s,n.layoutBox);const c=zc();o?Fh(c,e.applyTransform(a,!0),n.measuredBox):Fh(c,s,n.layoutBox);const u=!SB(l);let m=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:p,layout:b}=f;if(p&&b){const v=gr();Bh(v,n.layoutBox,p.layoutBox);const g=gr();Bh(g,s,b.layoutBox),kB(v,g)||(m=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=v,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:s,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:m})}else if(e.isLead()){const{onExitComplete:s}=e.options;s&&s()}e.options.transition=void 0}function Die(e){Ah&&rl.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Lie(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function $ie(e){e.clearSnapshot()}function z4(e){e.clearMeasurements()}function Fie(e){e.isLayoutDirty=!1}function Bie(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function W4(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function qie(e){e.resolveTargetDelta()}function Vie(e){e.calcProjection()}function Uie(e){e.resetSkewAndRotation()}function zie(e){e.removeLeadSnapshot()}function H4(e,t,n){e.translate=ar(t.translate,0,n),e.scale=ar(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function G4(e,t,n,s){e.min=ar(t.min,n.min,s),e.max=ar(t.max,n.max,s)}function Wie(e,t,n,s){G4(e.x,t.x,n.x,s),G4(e.y,t.y,n.y,s)}function Hie(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const Gie={duration:.45,ease:[.4,0,.1,1]},K4=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Y4=K4("applewebkit/")&&!K4("chrome/")?Math.round:Xn;function X4(e){e.min=Y4(e.min),e.max=Y4(e.max)}function Kie(e){X4(e.x),X4(e.y)}function TB(e,t,n){return e==="position"||e==="preserve-aspect"&&!Jae(q4(t),q4(n),.2)}function Yie(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const Xie=AB({attachResizeListener:(e,t)=>sm(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Z0={current:void 0},EB=AB({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Z0.current){const e=new Xie({});e.mount(window),e.setOptions({layoutScroll:!0}),Z0.current=e}return Z0.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),Jie={pan:{Feature:mie},drag:{Feature:hie,ProjectionNode:EB,MeasureLayout:wB}};function J4(e,t,n){const{props:s}=e;e.animationState&&s.whileHover&&e.animationState.setActive("whileHover",n==="Start");const a="onHover"+n,i=s[a];i&&Qt.postRender(()=>i(t,cf(t)))}class Qie extends bo{mount(){const{current:t}=this.node;t&&(this.unmount=Jne(t,n=>(J4(this.node,n,"Start"),s=>J4(this.node,s,"End"))))}unmount(){}}class Zie extends bo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!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=lf(sm(this.node.current,"focus",()=>this.onFocus()),sm(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Q4(e,t,n){const{props:s}=e;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap",n==="Start");const a="onTap"+(n==="End"?"":n),i=s[a];i&&Qt.postRender(()=>i(t,cf(t)))}class eoe extends bo{mount(){const{current:t}=this.node;t&&(this.unmount=tse(t,n=>(Q4(this.node,n,"Start"),(s,{success:a})=>Q4(this.node,s,a?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const vS=new WeakMap,ej=new WeakMap,toe=e=>{const t=vS.get(e.target);t&&t(e)},roe=e=>{e.forEach(toe)};function noe({root:e,...t}){const n=e||document;ej.has(n)||ej.set(n,{});const s=ej.get(n),a=JSON.stringify(t);return s[a]||(s[a]=new IntersectionObserver(roe,{root:e,...t})),s[a]}function soe(e,t,n){const s=noe(t);return vS.set(e,n),s.observe(e),()=>{vS.delete(e),s.unobserve(e)}}const aoe={some:0,all:1};class ioe extends bo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:s,amount:a="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof a=="number"?a:aoe[a]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:m,onViewportLeave:f}=this.node.getProps(),p=u?m:f;p&&p(c)};return soe(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ooe(t,n))&&this.startObserver()}unmount(){}}function ooe({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const loe={inView:{Feature:ioe},tap:{Feature:eoe},focus:{Feature:Zie},hover:{Feature:Qie}},coe={layout:{ProjectionNode:EB,MeasureLayout:wB}},bS={current:null},PB={current:!1};
vendor: 5,201 bytes, line 700
700function doe(){if(PB.current=!0,!!Ck)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>bS.current=e.matches;e.addListener(t),t()}else bS.current=!1}const uoe=[...rB,nn,mo],hoe=e=>uoe.find(tB(e)),Z4=new WeakMap;function moe(e,t,n){for(const s in t){const a=t[s],i=n[s];if(ln(a))e.addValue(s,a);else if(ln(i))e.addValue(s,rm(a,{owner:e}));else if(i!==a)if(e.hasValue(s)){const o=e.getValue(s);o.liveStyle===!0?o.jump(a):o.hasAnimated||o.set(a)}else{const o=e.getStaticValue(s);e.addValue(s,rm(o!==void 0?o:a,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const e3=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class foe{scrapeMotionValuesFromProps(t,n,s){return{}}constructor({parent:t,props:n,presenceContext:s,reducedMotionConfig:a,blockInitialAnimation:i,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=eC,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},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 b=ma.now();this.renderScheduledAt<b&&(this.renderScheduledAt=b,Qt.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:m}=o;this.onUpdate=m,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=s,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=wy(n),this.isVariantNode=dF(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...p}=this.scrapeMotionValuesFromProps(n,{},this);for(const b in p){const v=p[b];c[b]!==void 0&&ln(v)&&v.set(c[b],!1)}}mount(t){this.current=t,Z4.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),PB.current||doe(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:bS.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Z4.delete(this.current),this.projection&&this.projection.unmount(),ho(this.notifyUpdate),ho(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const s=Jl.has(t),a=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&Qt.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{a(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in bd){const n=bd[t];if(!n)continue;const{isEnabled:s,Feature:a}=n;if(!this.features[t]&&a&&s(this.props)&&(this.features[t]=new a(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<e3.length;s++){const a=e3[s];this.propEventSubscriptions[a]&&(this.propEventSubscriptions[a](),delete this.propEventSubscriptions[a]);const i="on"+a,o=t[i];o&&(this.propEventSubscriptions[a]=this.on(a,o))}this.prevMotionValues=moe(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}
700addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const s=this.values.get(t);n!==s&&(s&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let s=this.values.get(t);return s===void 0&&n!==void 0&&(s=rm(n===null?void 0:n,{owner:this}),this.addValue(t,s)),s}readValue(t,n){var s;let a=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(s=this.getBaseTargetFromProps(this.props,t))!==null&&s!==void 0?s:this.readValueFromInstance(this.current,t,this.options);return a!=null&&(typeof a=="string"&&(ZF(a)||zF(a))?a=parseFloat(a):!hoe(a)&&mo.test(n)&&(a=XF(t,n)),this.setBaseTarget(t,ln(a)?a.get():a)),ln(a)?a.get():a}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:s}=this.props;let a;if(typeof s=="string"||typeof s=="object"){const o=Rk(this.props,s,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(a=o[t])}if(s&&a!==void 0)return a;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!ln(i)?i:this.initialValues[t]!==void 0&&a===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Kk),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class OB extends foe{constructor(){super(...arguments),this.KeyframeResolver=nB}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:s}){delete n[t],delete s[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;ln(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function poe(e){return window.getComputedStyle(e)}class xoe extends OB{constructor(){super(...arguments),this.type="html",this.renderInstance=vF}readValueFromInstance(t,n){if(Jl.has(n)){const s=Zk(n);return s&&s.default||0}else{const s=poe(t),a=(xF(n)?s.getPropertyValue(n):s[n])||0;return typeof a=="string"?a.trim():a}}measureInstanceViewportBox(t,{transformPagePoint:n}){return bB(t,n)}build(t,n,s){Lk(t,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,n,s){return qk(t,n,s)}}class goe extends OB{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gr}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Jl.has(n)){const s=Zk(n);return s&&s.default||0}return n=bF.has(n)?n:Pk(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,s){return NF(t,n,s)}build(t,n,s){$k(t,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,s,a){jF(t,n,s,a)}mount(t){this.isSVGTag=Bk(t.tagName),super.mount(t)}}const yoe=(e,t)=>Mk(e)?new goe(t):new xoe(t,{allowProjection:e!==j.Fragment}),voe=zne({...Vae,...loe,...Jie,...coe},yoe),ue=ane(voe),boe=Gm("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ge({className:e,variant:t,...n}){return r.jsx("div",{className:lt(boe({variant:t}),e),...n})}const Th={travel:["https://images.unsplash.com/photo-1476514525535-07fb3b4ae5f1?w=800&q=80","https://images.unsplash.com/photo-1469854523086-cc02fe5d8800?w=800&q=80","https://images.unsplash.com/photo-1502602898657-3e91760cbb34?w=800&q=80","https://images.unsplash.com/photo-1530521954074-e64f6810b32d?w=800&q=80","https://images.unsplash.com/photo-1501854140801-50d01698950b?w=800&q=80","https://images.unsplash.com/photo-1488646953014-85cb44e25828?w=800&q=80"],lifestyle:["https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=800&q=80","https://images.unsplash.com/photo-1540555700478-4be289fbecef?w=800&q=80","https://images.unsplash.com/photo-1571896349842-33c89424de2d?w=800&q=80","https://images.unsplash.com/photo-1519225421980-715cb0215aed?w=800&q=80","https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?w=800&q=80"],fashion:["https://images.unsplash.com/photo-1558618666-fcd25c85cd64?w=800&q=80","https://images.unsplash.com/photo-1483985988355-763728e1935b?w=800&q=80","https://images.unsplash.com/photo-1445205170230-053b83016050?w=800&q=80","https://images.unsplash.com/photo-1490481651871-ab68de25d43d?w=800&q=80","https://images.unsplash.com/photo-1509631179647-0177331693ae?w=800&q=80","https://images.unsplash.com/photo-1469334031218-e382a71b716b?w=800&q=80"],food:["https://images.unsplash.com/photo-1414235077428-338989a2e8c0?w=800&q=80","https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=800&q=80","https://images.unsplash.com/photo-1540189549336-e6e99c3679fe?w=800&q=80","https://images.unsplash.com/photo-1565299624946-b28f40a0ae38?w=800&q=80","https://images.unsplash.com/photo-1567620905732-2d1ec7ab7445?w=800&q=80"],entertainment:["https://images.unsplash.com/photo-1603739903239-8b6e64c3b185?w=800&q=80","https://images.unsplash.com/photo-1470229722913-7c0e2dbbafd3?w=800&q=80","https://images.unsplash.com/photo-1516450360452-9312f5e86fc7?w=800&q=80","https://images.unsplash.com/photo-1501281668745-f7f57925c3b4?w=800&q=80","https://images.unsplash.com/photo-1460661419201-fd4cecdf8a8b?w=800&q=80"],motoring:["https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?w=800&q=80","https://images.unsplash.com/photo-1503376780353-7e6692767b70?w=800&q=80","https://images.unsplash.com/photo-1544636331-e26879cd4d9b?w=800&q=80","https://images.unsplash.com/photo-1542362567-b07e54358753?w=800&q=80","https://images.unsplash.com/photo-1555215695-3004980ad54e?w=800&q=80"],property:["https://images.unsplash.com/photo-1512917774080-9991f1c4c750?w=800&q=80","https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?w=800&q=80","https://images.unsplash.com/photo-1600585154340-be6161a56a0c?w=800&q=80","https://images.unsplash.com/photo-1580587771525-78b9dba3b914?w=800&q=80","https://images.unsplash.com/photo-1493809842364-78817add7ffb?w=800&q=80"],business:["https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=800&q=80","https://images.unsplash.com/photo-1519389950473-47ba0277781c?w=800&q=80","https://images.unsplash.com/photo-1521737604893-d14cc237f11d?w=800&q=80","https://images.unsplash.com/photo-1454165804606-c3d57bc86b40?w=800&q=80","https://images.unsplash.com/photo-1573164713988-8665fc963095?w=800&q=80"],default:["https://images.unsplash.com/photo-1519501025264-65ba15a82390?w=800&q=80","https://images.unsplash.com/photo-1529156069898-49953e39b3ac?w=800&q=80","https://images.unsplash.com/photo-1444723121867-7a241cacace9?w=800&q=80","https://images.unsplash.com/photo-1486325212027-8081e485255e?w=800&q=80","https://images.unsplash.com/photo-1513635269975-59663e0ac1ad?w=800&q=80"]};Object.fromEntries(Object.entries(Th).map(([e,t])=>[e,t[0]]));function joe(e,t){if(!e)return 0;let n=0;for(let s=0;s<e.length;s++)n=n*31+e.charCodeAt(s)>>>0;return n%t}function woe(e,t){const n=e?Th[e]?e:Th[e.toLowerCase()]?e.toLowerCase():Noe(e):"default",s=Th[n]||Th.default;return s[joe(t,s.length)]}function Noe(e){const t=(e||"").toLowerCase();return t.includes("travel")?"travel":t.includes("lifestyle")?"lifestyle":t.includes("fashion")||t.includes("style")||t.includes("beauty")?"fashion":t.includes("food")||t.includes("drink")||t.includes("dining")?"food":t.includes("entertain")||t.includes("music")||t.includes("art")?"entertainment":t.includes("motor")||t.includes("car")||t.includes("drive")?"motoring":t.includes("property")||t.includes("real estate")||t.includes("home")?"property":t.includes("business")||t.includes("finance")||t.includes("invest")?"business":"default"}function tj(e){return!!(e.wp_id||e.import_batch_id)}function t3(e){const t=e.published_date;if(!t)return 0;if(/^\d{4}-\d{2}-\d{2}/.test(t)){const n=new Date(t.replace(" ","T")).getTime();return isNaN(n)?0:n}return 0}function rg(e){const t=e.published_date;if(!t)return"";if(/^\d{4}-\d{2}-\d{2}/.test(t))try{return new Date(t.replace(" ","T")).toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"})}catch{return t}return t}function MB(e){return[...e].sort((t,n)=>t.featured&&!n.featured?-1:!t.featured&&n.featured?1:t3(n)-t3(t))}function _oe(e){return e&&e.replace(/&/g,"").replace(/&/g,"").toLowerCase().replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,"")||"features"}function bn(e){if(!e)return"/Articles";if(e.custom_url)return e.custom_url;const t=_oe(e.category),n=e.slug||e.id;return`/${t}/${n}`}function Soe(e){return e?e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"').replace(/'/g,"'"):""}function sC(e){return{...e,category:Soe(e.category),title:e.title?e.title.replace(/\u2019/g,"'").replace(/\u2018/g,"'").replace(/\u201C/g,'"').replace(/\u201D/g,'"'):e.title}}function Dn({src:e,category:t,articleId:n,alt:s="",className:a=""}){const i=woe(t,n),[o,l]=j.useState(e||i);return j.useEffect(()=>{l(e||i)},[e,i]),r.jsx("img",{src:o,alt:s,className:a,onError:()=>l(i)})}function koe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),a=j.useRef(null);j.useEffect(()=>{W.entities.MagazineIssue.list("-issue_date",50).then(o=>{t(o||[]),s(!1)}).catch(()=>s(!1))},[]);const i=o=>{a.current&&a.current.scrollBy({left:o==="left"?-320:320,behavior:"smooth"})};return n?r.jsx("div",{className:"flex items-center justify-center py-20",children:r.jsx("div",{className:"w-6 h-6 border-3 border-primary/30 border-t-primary rounded-full animate-spin"})}):e.length===0?null:r.jsxs("section",{className:"py-16 bg-background border-b border-border",children:[r.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-12",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-widest mb-3 block",children:"Chelsea Monthly Archives"}),r.jsx("h2",{className:"text-4xl sm:text-5xl font-bold text-foreground mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Magazine Archive"}),r.jsx("p",{className:"text-muted-foreground text-lg max-w-2xl mx-auto",children:"Explore the latest and historic editions of Chelsea Monthly."})]}),r.jsxs("div",{className:"relative group",children:[r.jsx("div",{ref:a,className:"overflow-x-auto scrollbar-hide flex gap-6 pb-4",style:{scrollBehavior:"smooth",msOverflowStyle:"none",scrollbarWidth:"none"},children:e.map(o=>r.jsx("div",{className:"flex-shrink-0 w-full sm:w-1/3 lg:w-1/6 group/card",children:r.jsxs("div",{className:"bg-card rounded-lg overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-300 h-full flex flex-col",children:[o.cover_image&&r.jsx("div",{className:"relative w-full aspect-[3/4] overflow-hidden bg-muted",children:r.jsx("img",{src:o.cover_image,alt:o.title,className:"w-full h-full object-cover group-hover/card:scale-105 transition-transform duration-500"})}),r.jsxs("div",{className:"p-4 flex flex-col justify-between flex-1",children:[o.issue_number&&r.jsxs("span",{className:"text-xs font-bold text-primary uppercase tracking-wider mb-2",children:["Issue ",o.issue_number]}),r.jsx("h3",{className:"font-bold text-foreground text-sm line-clamp-2 mb-1",children:o.title}),o.issue_date&&r.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:new Date(o.issue_date).toLocaleDateString("en-GB",{year:"numeric",month:"long"})}),r.jsxs("div",{className:"space-y-2 mt-auto",children:[r.jsx(se,{to:`/magazine/${o.id}`,className:"block w-full text-center px-3 py-2 bg-primary text-primary-foreground text-xs font-bold uppercase tracking-wider rounded hover:bg-primary/90 transition-colors",children:"View Issue"}),r.jsx("button",{className:"w-full px-3 py-2 bg-muted text-muted-foreground text-xs font-bold uppercase tracking-wider rounded hover:bg-muted/80 transition-colors",children:"Subscribe"})]})]})]})},o.id))}),r.jsx("button",{onClick:()=>i("left"),className:"absolute left-0 top-1/2 -translate-y-1/2 -translate-x-16 opacity-0 group-hover:opacity-100 transition-opacity z-10 p-2 bg-primary text-primary-foreground rounded-full hover:bg-primary/90",children:r.jsx(Ym,{className:"w-5 h-5"})}),r.jsx("button",{onClick:()=>i("right"),className:"absolute right-0 top-1/2 -translate-y-1/2 translate-x-16 opacity-0 group-hover:opacity-100 transition-opacity z-10 p-2 bg-primary text-primary-foreground rounded-full hover:bg-primary/90",children:r.jsx(Us,{className:"w-5 h-5"})})]}),r.jsx("div",{className:"text-center mt-12",children:r.jsxs("div",{className:"inline-block bg-accent/10 border-2 border-accent rounded-lg px-8 py-6",children:[r.jsx("p",{className:"text-lg font-semibold text-foreground mb-3",children:"Receive Chelsea Monthly in print and digital."}),r.jsx("button",{className:"px-6 py-2 bg-accent text-accent-foreground font-bold uppercase tracking-wider text-sm rounded hover:bg-accent/90 transition-colors",children:"Subscribe Now"})]})})]}),r.jsx("style",{children:` 701 .scrollbar-hide::-webkit-scrollbar { display: none; } 702 `})]})}const oe=j.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:lt("rounded-xl border bg-card text-card-foreground shadow",e),...t}));
702oe.displayName="Card";const ut=j.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:lt("flex flex-col space-y-1.5 p-6",e),...t}));ut.displayName="CardHeader";const ht=j.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:lt("font-semibold leading-none tracking-tight",e),...t}));ht.displayName="CardTitle";const Coe=j.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:lt("text-sm text-muted-foreground",e),...t}));Coe.displayName="CardDescription";const ce=j.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:lt("p-6 pt-0",e),...t}));ce.displayName="CardContent";const Aoe=j.forwardRef(({className:e,...t},n)=>r.jsx("div",{ref:n,className:lt("flex items-center p-6 pt-0",e),...t}));Aoe.displayName="CardFooter";function Toe(){return r.jsx("section",{className:"py-20 bg-gradient-to-r from-purple-50 to-blue-50",children:r.jsx("div",{className:"max-w-6xl mx-auto px-6",children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[r.jsxs(oe,{className:"border-2 border-primary/20 hover:border-primary/50 transition-colors overflow-hidden group",children:[r.jsx("div",{className:"h-2 bg-gradient-to-r from-purple-500 to-purple-600"}),r.jsxs("div",{className:"p-6 space-y-4",children:[r.jsx(Lt,{className:"w-8 h-8 text-purple-600 group-hover:scale-110 transition-transform"}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Join the Club"}),r.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Unlock unlimited premium journalism, exclusive events, and a thriving community."})]}),r.jsx(se,{to:"/membership-club",children:r.jsx(K,{variant:"outline",className:"w-full",children:"Explore Membership"})})]})]}),r.jsxs(oe,{className:"border-2 border-blue-200/50 hover:border-blue-300/50 transition-colors overflow-hidden group",children:[r.jsx("div",{className:"h-2 bg-gradient-to-r from-blue-500 to-blue-600"}),r.jsxs("div",{className:"p-6 space-y-4",children:[r.jsx(ir,{className:"w-8 h-8 text-blue-600 group-hover:scale-110 transition-transform"}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Digital Member"}),r.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"£9.99/month ⢠Full archive, premium articles, member newsletters."})]}),r.jsx(se,{to:"/membership?tier=digital",children:r.jsx(K,{variant:"outline",className:"w-full text-blue-600 border-blue-200",children:"Start Free Trial"})})]})]}),r.jsxs(oe,{className:"border-2 border-purple-200/50 hover:border-purple-300/50 transition-colors overflow-hidden group",children:[r.jsx("div",{className:"h-2 bg-gradient-to-r from-purple-500 to-pink-600"}),r.jsxs("div",{className:"p-6 space-y-4",children:[r.jsx(Yd,{className:"w-8 h-8 text-purple-600 group-hover:scale-110 transition-transform"}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-lg mb-2",children:"Chelsea Club Member"}),r.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"£19.99/month + £2 postage ⢠Everything digital plus printed magazine."})]}),r.jsx(se,{to:"/membership?tier=print_digital",children:r.jsx(K,{variant:"outline",className:"w-full text-purple-600 border-purple-200",children:"Become a Subscriber"})})]})]})]})})})}const zs=({children:e,className:t=""})=>r.jsx("div",{className:t,children:e}),Eoe={"Travel & Lifestyle":"bg-[#4A6B7C] text-white",Entertainment:"bg-[#8B5A65] text-white","Fashion & Style":"bg-[#C4A484] text-white","Food & Drink":"bg-[#9A7B4F] text-white","Chelsea Monthly":"bg-primary text-primary-foreground",Motoring:"bg-[#5C6166] text-white",Property:"bg-[#7A8B7A] text-white",Music:"bg-[#6B5B7B] text-white",News:"bg-foreground text-background"},RB=e=>Eoe[e]||"bg-primary text-primary-foreground",Poe=[{id:1,title:"Where Every Journey Tells a Story: Leger Holidays Returns to the National Film Awards",excerpt:"Chelsea Monthly ⢠Travel ⢠Culture ⢠Partnerships. Where Every Journey Tells a Story of unmatched luxury and discovery.",category:"Travel & Lifestyle",author_name:"Jeff Armstrong",author_image:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/b4c0623e0_secure_gravatar_com_373e5a563d5d17521467f1c7995b5a3e9e14012cbb1f0a03e10e0b22ebbf503b_19d2de08.png",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/a0f26cbaf_chelseamonthly_com_people-walking-though-tuscan-scenery-36855-1000x550_c2393e74.jpg",published_date:"1 month ago",read_time:"5 min read",views:"380",featured:!0,tag:"Travel"},{id:2,title:"Beauty Brand Voodoo Cosmetics Joins the National Reality TV Awards 2026",excerpt:"Luxury beauty and wellness brand Voodoo Cosmetics announced as the latest official partner.",category:"Entertainment",author_name:"Jeff Armstrong",author_image:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/b4c0623e0_secure_gravatar_com_373e5a563d5d17521467f1c7995b5a3e9e14012cbb1f0a03e10e0b22ebbf503b_19d2de08.png",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/fe74dce47_chelseamonthly_com_Untitled_design_3_770x-540x370_ce66aae6.jpg",published_date:"2 months ago",read_time:"4 min read",views:"79.4
702K",featured:!0,tag:"Entertainment"},{id:3,title:"The Taste of Something Real: OTC Beverages Redefines Luxury",excerpt:"A bold new approach to beverages is taking the luxury market by storm. OTC Beverages redefines what it means to drink with intention.",category:"Food & Drink",author_name:"Jeff Armstrong",author_image:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/b4c0623e0_secure_gravatar_com_373e5a563d5d17521467f1c7995b5a3e9e14012cbb1f0a03e10e0b22ebbf503b_19d2de08.png",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/a07f297d4_chelseamonthly_com_otc-beverages-banner-540x352_62f5a8d8.jpg",published_date:"2 months ago",read_time:"6 min read",views:"58.1K",featured:!0,tag:"Food & Drink"},{id:4,title:"JISOO Fronts Tommy Hilfiger's Spring 2026 Campaign",excerpt:"Tommy Hilfiger unveils K-pop superstar Jisoo as the face of its Spring 2026 collection.",category:"Fashion & Style",author_name:"Jeff Armstrong",author_image:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/b4c0623e0_secure_gravatar_com_373e5a563d5d17521467f1c7995b5a3e9e14012cbb1f0a03e10e0b22ebbf503b_19d2de08.png",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/97aa09799_chelseamonthly_com_SP26-x-Tommy-Hilfiger_JISOO_Linen_Blend_Midi_Dress_Horizontal_1-540x370_7ee189c8.jpeg",published_date:"3 months ago",read_time:"4 min read",views:"6.81K",featured:!0,tag:"Fashion"},{id:5,title:"The World Is Travelling Again and the Global Travel Awards Are Back",excerpt:"By early 2026, the question is no longer whether global travel has recovered, but what it has become.",category:"Travel & Lifestyle",author_name:"Lesley Cameron",author_image:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/abf2abdc6_secure_gravatar_com_140a3cd601690e759127f33daff3ac213f65794cc52ca294703da8ca4e74442d_c41734ab.png",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/6c953aa23_chelseamonthly_com_Heritage-Awali-hotel-Mauritius-1-540x370_68149028.jpg",published_date:"5 months ago",read_time:"7 min read",views:"6.88M",featured:!0,tag:"Travel"},{id:6,title:"Emma Nuule: The Crossover Soprano Bringing Drama, Faith and Soul to Classical Music",excerpt:"An extraordinary voice is redefining the classical music world.",category:"Chelsea Monthly",author_name:"Gary Brooker",author_image:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/f24e36897_secure_gravatar_com_a64da8f52fa826c1f09c56d7f3ab82ac1ae626a81d170c14595fb55046e8810e_39cb60c6.png",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/d5e0542a8_chelseamonthly_com_1000036087-540x540_b9ced448.webp",published_date:"9 months ago",read_time:"8 min read",views:"64K",featured:!1,tag:"Music"},{id:7,title:"1966 Ferrari 275 GTB Crowned Best of Show at Concorso d'Eleganza Varignana 1705",excerpt:"The iconic 1966 Ferrari 275 GTB captured the hearts of judges at this prestigious motoring showcase.",category:"Motoring",author_name:"Jeff Armstrong",author_image:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/b4c0623e0_secure_gravatar_com_373e5a563d5d17521467f1c7995b5a3e9e14012cbb1f0a03e10e0b22ebbf503b_19d2de08.png",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/b2d17184d_chelseamonthly_com_AMP8619-540x540_8412a035.jpg",published_date:"2 years ago",read_time:"6 min read",views:"896K",featured:!1,tag:"Motoring"},{id:8,title:"Inside Our Invitation to the Global Travel Awards in Shanghai",excerpt:"Chelsea Monthly attended the 19th Annual Global Travel Awards in Shanghai, marking an extraordinary chapter.",category:"Travel & Lifestyle",author_name:"Jeff Armstrong",author_image:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/b4c0623e0_secure_gravatar_com_373e5a563d5d17521467f1c7995b5a3e9e14012cbb1f0a03e10e0b22ebbf503b_19d2de08.png",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/f86e12c20_chelseamonthly_com_WhatsApp-Image-2025-12-22-at-133019-1-540x540_44d6dd31.jpeg",published_date:"1 year ago",read_time:"5 min read",views:"176.8K",featured:!1,tag:"Travel"}];function Ooe(){const e=["Global Travel Awards 2026 Nominees Announced â The World's Best Hotels Revealed","JISOO Named Tommy Hilfiger Global Brand Ambassador for Spring 2026","Voodoo Cosmetics Joins National Reality TV Awards as Official Beauty Partner","Chelsea Monthly Attends 19th Annual Global Travel Awards in Shanghai"];return r.jsxs("div",{className:"bg-foreground text-background py-3 border-b border-white/10 relative flex items-center",children:[r.jsx("div",{className:"absolute left-0 top-0 bottom-0 bg-gradient-to-r from-foreground via-foreground to-transparent w-32 z-10 flex items-center pl-6",children:r.jsxs("span",{className:"bg-primary text-primary-foreground text-[10px] font-bold px-3 py-1 uppercase tracking-[0.2em] flex items-center gap-2 shadow-[0_0_15px_rgba(var(--primary),0.5)]",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-white animate-pulse"}),"Latest News"]})}),r.jsx("div",{className:"overflow-hidden flex-1 pl-32",children:r.jsx("div",{className:"ticker-wrap flex",children:r.jsx("div",{className:"flex gap-16 whitespace-nowrap",style:{animation:"ticker 45s linear infinite"},children:[...e,...e,...e].map((t,n)=>r.jsxs("span",{className:"text-xs font-medium tracking-wider flex items-center gap-16 text-background/90 hover:text-primary transition-colors cursor-pointer",children:[t," ",r.jsx("span",{className:"text-primary/50 text-lg leading-none",children:"â¦"})]},n))})})})]})}function Moe({articles:e}){const t=e.filter(o=>o.featured),s=(t.length>=5?t:[...t,...e.filter(o=>!o.featured)]).slice(0,5),a=s[0],i=s.slice(1,5);return a?r.jsxs("section",{className:"bg-background relative overflow-hidden py-12 lg:py-16",children:[r.jsx("div",{className:"absolute top-[-10%] right-[-5%] w-[40rem] h-[40rem] bg-primary/5 rounded-full blur-[100px] pointer-events-none mix-blend-multiply",style:{animation:"floatA 15s ease-in-out infinite"}}),r.jsx("div",{className:"absolute bottom-[-10%] left-[-10%] w-[30rem] h-[30rem] bg-accent/5 rounded-full blur-[100px] pointer-events-none mix-blend-multiply",style:{animation:"floatB 12s ease-in-out infinite"}}),r.jsx("div",{className:"max-w-[95rem] mx-auto px-6 relative z-10",children:r.jsxs(ue.div,{initial:{opacity:0,y:30}
702,animate:{opacity:1,y:0},transition:{duration:1,ease:"easeOut"},className:"grid grid-cols-1 lg:grid-cols-12 gap-8 lg:gap-12",children:[r.jsxs(se,{to:bn(a),className:"lg:col-span-8 group relative overflow-hidden rounded-sm bg-muted/30 block",children:[r.jsx("div",{className:"absolute inset-0 bg-foreground/10 z-10 group-hover:bg-transparent transition-colors duration-700"}),r.jsx(Dn,{src:a==null?void 0:a.image_url,category:a==null?void 0:a.category,alt:a==null?void 0:a.title,className:"w-full h-[60vh] lg:h-[80vh] object-cover transition-transform duration-1000 group-hover:scale-105"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground/95 via-foreground/40 to-transparent z-20"}),r.jsx("div",{className:"absolute inset-0 z-30 p-8 lg:p-16 flex flex-col justify-end",children:r.jsxs("div",{className:"flex flex-col gap-4 max-w-4xl",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:`text-[10px] font-bold px-3 py-1.5 uppercase tracking-[0.2em] ${RB(a==null?void 0:a.category)}`,children:a==null?void 0:a.category}),r.jsxs("span",{className:"text-white/70 text-xs font-medium uppercase tracking-widest flex items-center gap-1",children:[r.jsx(Pn,{className:"w-3.5 h-3.5 text-primary"})," Editor's Choice"]})]}),r.jsx("h1",{className:"text-4xl sm:text-5xl lg:text-7xl font-serif text-white leading-[1.1] mb-2 drop-shadow-lg",children:a==null?void 0:a.title}),r.jsx("p",{className:"text-white/80 text-lg lg:text-xl font-light max-w-2xl leading-relaxed mb-6 hidden md:block border-l-2 border-primary pl-4",children:a==null?void 0:a.excerpt}),r.jsxs("div",{className:"flex items-center gap-6 mt-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[(a==null?void 0:a.author_image)&&r.jsx("img",{src:a.author_image,alt:"",className:"w-10 h-10 rounded-full border-2 border-primary/50"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-white text-sm font-semibold tracking-wide",children:a==null?void 0:a.author_name}),r.jsx("span",{className:"text-white/50 text-[10px] uppercase tracking-widest",children:a?rg(a):""})]})]}),r.jsx("div",{className:"h-8 w-px bg-white/20 hidden sm:block"}),r.jsxs("span",{className:"hidden sm:inline-flex items-center gap-2 text-white text-xs font-bold uppercase tracking-[0.2em] group-hover:text-primary transition-colors",children:["Read Editorial ",r.jsx(_t,{className:"w-4 h-4 transform group-hover:translate-x-1 transition-transform"})]})]})]})})]}),r.jsxs("div",{className:"lg:col-span-4 flex flex-col gap-6 lg:gap-8",children:[r.jsxs("div",{className:"flex items-center justify-between border-b-2 border-foreground pb-4",children:[r.jsxs("h2",{className:"text-xl font-serif font-semibold text-foreground uppercase tracking-widest",children:["The ",r.jsx("span",{className:"text-primary italic",children:"Edit"})]}),r.jsxs("a",{href:"#",className:"text-[10px] font-bold text-foreground/50 hover:text-primary uppercase tracking-[0.2em] flex items-center gap-1 transition-colors",children:["View All ",r.jsx(Us,{className:"w-3 h-3"})]})]}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-1 gap-6 flex-1",children:i.map((o,l)=>r.jsxs(se,{to:bn(o),className:"group flex flex-col sm:flex-row lg:flex-row gap-5 items-start",children:[r.jsxs("div",{className:"relative overflow-hidden w-full sm:w-32 lg:w-40 shrink-0 aspect-[4/3] rounded-sm",children:[r.jsx(Dn,{src:o.image_url,category:o.category,alt:o.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"}
702),r.jsx("div",{className:"absolute inset-0 bg-foreground/10 group-hover:bg-transparent transition-colors duration-500"})]}),r.jsxs("div",{className:"flex flex-col flex-1 py-1",children:[r.jsx("span",{className:"text-[9px] font-bold text-primary uppercase tracking-[0.2em] mb-2 block",children:o.category}),r.jsx("h3",{className:"text-sm sm:text-base font-semibold text-foreground leading-snug group-hover:text-primary transition-colors line-clamp-3",children:o.title}),r.jsx("div",{className:"flex items-center gap-2 mt-3 text-muted-foreground text-[10px] uppercase tracking-wider",children:r.jsx("span",{children:rg(o)})})]})]},l))})]})]})})]}):null}function Roe({articles:e}){const t=e.slice(0,8);return t.length===0?null:r.jsx(zs,{children:r.jsx("section",{className:"py-20 lg:py-24 bg-muted/30 border-y border-border/40 relative",children:r.jsxs("div",{className:"max-w-[90rem] mx-auto px-6",children:[r.jsxs("div",{className:"flex flex-col md:flex-row md:items-end justify-between mb-12 gap-6",children:[r.jsxs("div",{children:[r.jsxs("span",{className:"flex items-center gap-2 text-[10px] font-bold text-primary uppercase tracking-[0.2em] mb-3",children:[r.jsx(Xr,{className:"w-4 h-4"})," Global Pulse"]}),r.jsx("h2",{className:"text-3xl md:text-5xl font-serif text-foreground",children:"Trending Topics"})]}),r.jsx("div",{className:"flex items-center gap-6 border-b border-border pb-2",children:["All","Luxury","Culture","Business"].map((n,s)=>r.jsx("button",{className:`text-xs font-semibold uppercase tracking-[0.15em] transition-colors pb-2 -mb-[3px] ${s===0?"text-foreground border-b-2 border-foreground":"text-muted-foreground hover:text-foreground"}`,children:n},n))})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-8",children:t.slice(0,4).map((n,s)=>r.jsx(zs,{delay:s*100,children:r.jsxs(se,{to:bn(n),className:"group block",children:[r.jsxs("div",{className:"relative overflow-hidden mb-5 aspect-[4/5] rounded-sm bg-card shadow-sm",children:[r.jsx(Dn,{src:n.image_url,category:n.category,alt:n.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground
702/60 via-transparent to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300"}),r.jsx("div",{className:"absolute top-4 left-4",children:r.jsx("span",{className:`text-[9px] font-bold px-2 py-1 uppercase tracking-[0.2em] shadow-sm ${RB(n.category)}`,children:n.category})})]}),r.jsx("h3",{className:"text-lg font-serif font-medium text-foreground leading-tight group-hover:text-primary transition-colors line-clamp-3 mb-3",children:n.title}),r.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-border/50",children:[n.author_image&&r.jsx("img",{src:n.author_image,alt:"",className:"w-6 h-6 rounded-full grayscale group-hover:grayscale-0 transition-all"}),r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:n.author_name})]})]})},n.id||s))})]})})})}function Ioe({articles:e}){var s,a,i,o;const n=e.filter(l=>{const c=(l.category||"").toLowerCase(),u=(l.tag||"").toLowerCase();return c.includes("entertainment")||c.includes("music")||c.includes("culture")||u==="music"||u==="entertainment"});return n.length<1?null:r.jsx(zs,{children:r.jsx("section",{className:"py-20 bg-background relative",children:r.jsxs("div",{className:"max-w-[90rem] mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-16",children:[r.jsx("span",{className:"text-[10px] font-bold text-primary uppercase tracking-[0.2em] block mb-2",children:"Arts & Society"}),r.jsxs("h2",{className:"text-4xl md:text-5xl font-serif text-foreground relative inline-block",children:["Entertainment & Culture",r.jsx("div",{className:"absolute -bottom-4 left-1/2 -translate-x-1/2 w-16 h-px bg-primary"})]})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-10",children:[r.jsx("div",{className:"lg:col-span-7",children:r.jsxs(se,{to:bn(n[0]),className:"group block relative h-[600px] overflow-hidden rounded-sm",children:[r.jsx(Dn,{src:(s=n[0])==null?void 0:s.image_url,category:(a=n[0])==null?void 0:a.category,alt:"",className:"w-full h-full object-cover transition-transform duration-1000 group-hover:scale-105"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground
702/90 via-foreground/20 to-transparent"}),r.jsxs("div",{className:"absolute bottom-0 left-0 p-10 w-full",children:[r.jsx("span",{className:"bg-primary text-primary-foreground text-[10px] font-bold px-3 py-1 uppercase tracking-widest mb-4 inline-block",children:"Exclusive"}),r.jsx("h3",{className:"text-3xl md:text-4xl font-serif text-white leading-tight mb-4 group-hover:text-primary transition-colors",children:(i=n[0])==null?void 0:i.title}),r.jsx("p",{className:"text-white/70 line-clamp-2 max-w-xl text-sm mb-4",children:(o=n[0])==null?void 0:o.excerpt}),r.jsxs("span",{className:"text-primary text-xs font-bold uppercase tracking-widest flex items-center gap-2",children:["Read Full Feature ",r.jsx(_t,{className:"w-4 h-4"})]})]})]})}),r.jsx("div",{className:"lg:col-span-5 flex flex-col gap-6",children:n.slice(1,4).map((l,c)=>r.jsx(zs,{delay:c*150,className:"flex-1",children:r.jsxs(se,{to:bn(l),className:"group flex flex-col sm:flex-row gap-6 h-full p-4 hover:bg-muted/50 transition-colors border border-border/30 rounded-sm",children:[r.jsx("div",{className:"relative overflow-hidden w-full sm:w-48 shrink-0 h-48 sm:h-auto rounded-sm",children:r.jsx(Dn,{src:l.image_url,category:l.category,alt:"",className:"w-full h-full object-cover transition-transform duration-500 group-hover:scale-110"})}),r.jsxs("div",{className:"flex flex-col justify-center py-2",children:[r.jsx("span",{className:"text-[10px] font-bold text-muted-foreground uppercase tracking-widest mb-2",children:l.category||"Culture"}),r.jsx("h4",{className:"text-lg font-serif font-medium text-foreground leading-snug group-hover:text-primary transition-colors mb-3",children:l.title}),r.jsxs("span",{className:"text-xs text-muted-foreground flex items-center gap-1.5 mt-auto",children:[r.jsx(Vt,{className:"w-3.5 h-3.5"})," ",l.published_date]})]})]})},c))})]})]})})})}function Doe({articles:e}){const t=e.filter(s=>{const a=(s.category||"").toLowerCase();return a.includes("news")||a.includes("chelsea")||a.includes("general")}).slice(0,3),n=t.length>=3?t:e.slice(0,3);return n.length===0?null:r.jsx(zs,{children:r.jsxs("section",{className:"py-20 bg-foreground text-background relative overflow-hidden",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.03] bg-[radial-gradient(circle,_#ffffff_1px,_transparent_1px)] bg-[length:24px_24px]"}),r.jsxs("div",{className:"max-w-[90rem] mx-auto px-6 relative z-10",children:[r.jsxs("div",{className:"flex items-center justify-between mb-12 border-b border-background/20 pb-4",children:[r.jsxs("h2",{className:"text-2xl md:text-3xl font-serif text-background uppercase tracking-widest",children:["Chelsea ",r.jsx("span",{className:"text-primary italic font-light",children:"Local News"})]}),r.jsxs("a",{href:"#",className:"text-[10px] font-bold text-primary uppercase tracking-[0.2em] flex items-center gap-2 hover:text-white transition-colors",children:["Explore Area ",r.jsx(gK,{className:"w-3 h-3"})]})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:n.map((s,a)=>r.jsx(zs,{delay:a*100,children:r.jsxs(se,{to:bn(s),className:"group block",children:[r.jsxs("div",{className:"relative overflow-hidden mb-5 aspect-video rounded-sm border border-background/10",children:[r.jsx(Dn,{src:s.image_url,category:s.category,alt:"",className:"w-full h-full object-cover opacity-80 transition-all duration-700 group-hover:scale-105 group-hover:opacity-100"}),r.jsx("div",{className:"absolute top-3 left-3 bg-background/90 backdrop-blur-sm px-3 py-1",children:r.jsx("span",{className:"text-foreground text-[9px] font-bold uppercase tracking-widest",children:"Local Feature"})})]}),r.jsx("h3",{className:"text-lg font-medium text-background leading-tight group-hover:text-primary transition-colors line-clamp-2",children:s.title}),r.jsx("p",{className:"text-background/50 text-sm mt-3 line-clamp-2 font-light",children:s.excerpt})]})},a))})]})]})})}function Loe({articles:e=[]}){const t=e.filter(a=>{const i=(a.category||"").toLowerCase();return i.includes("travel")||i.includes("lifestyle")}).slice(0,5);if(t.length===0)return null;const[n,...s]=t;return r.jsx(zs,{children:r.jsx("section",{className:"py-24 bg-background border-t border-border/40",children:r.jsxs("div",{className:"max-w-[90rem] mx-auto px-6",children:[r.jsxs("div",{className:"flex flex-col items-center justify-center text-center mb-16",children:[r.jsx(Zn,{className:"w-8 h-8 text-primary mb-4",strokeWidth:1}),r.jsx("h2",{className:"text-4xl md:text-5xl font-serif text-foreground mb-4",children:"Travel & Lifestyle"}),r.jsx("p",{className:"text-muted-foreground max-w-2xl font-light text-lg",children:"Curated destinations, luxury stays, and extraordinary journeys handpicked by our travel editors."})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 md:auto-rows-[300px]",children:[r.jsxs(se,{to:bn(n),className:"md:col-span-2 md:row-span-2 group relative overflow-hidden rounded-sm",children:[r.jsx(Dn,{src:n.image_url,category:n.category,alt:n.title,className:"w-full h-full object-cover transition-transform duration-1000 group-hover:scale-105"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground
702/80 via-transparent to-transparent opacity-80 group-hover:opacity-100 transition-opacity"}),r.jsxs("div",{className:"absolute bottom-8 left-8 right-8",children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-widest mb-2 block",children:n.category}),r.jsx("h3",{className:"text-2xl md:text-3xl font-serif text-white leading-tight group-hover:text-primary/90 transition-colors",children:n.title})]})]}),s.slice(0,2).map((a,i)=>r.jsxs(se,{to:bn(a),className:"md:col-span-1 md:row-span-1 group relative overflow-hidden rounded-sm",children:[r.jsx(Dn,{src:a.image_url,category:a.category,alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-110"}),r.jsx("div",{className:"absolute inset-0 bg-foreground/30 group-hover:bg-foreground/50 transition-colors"}),r.jsxs("div",{className:"absolute inset-0 flex flex-col items-end justify-end p-5",children:[r.jsx("span",{className:"text-white font-serif text-base leading-snug line-clamp-2 text-right",children:a.title}),r.jsx("div",{className:"w-8 h-px bg-primary mt-2"})]})]},i)),s.slice(2,4).map((a,i)=>r.jsxs(se,{to:bn(a),className:"md:col-span-2 md:row-span-1 group relative overflow-hidden rounded-sm",children:[r.jsx(Dn,{src:a.image_url,category:a.category,alt:a.title,className:"w-full h-full object-cover transition-transform duration-700 group-hover:scale-105"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground
702/90 via-foreground/20 to-transparent"}),r.jsxs("div",{className:"absolute bottom-6 left-6",children:[r.jsx("span",{className:"text-primary text-[9px] font-bold uppercase tracking-widest mb-1 block",children:a.category}),r.jsx("h3",{className:"text-lg font-serif text-white line-clamp-2",children:a.title})]})]},i))]})]})})})}function $oe({articles:e}){const t=e.filter(i=>(i.category||"").toLowerCase().includes("fashion")).slice(0,2),n=e.filter(i=>{const o=(i.category||"").toLowerCase();return o.includes("food")||o.includes("drink")||o.includes("dining")||o.includes("gastro")||o.includes("lifestyle")}).slice(0,2),s=t,a=n;return s.length===0&&a.length===0?null:r.jsx(zs,{children:r.jsx("section",{className:"py-20 bg-muted/20",children:r.jsx("div",{className:"max-w-[90rem] mx-auto px-6",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 lg:gap-24",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-8 border-b-2 border-foreground pb-4",children:[r.jsxs("h2",{className:"text-3xl font-serif text-foreground",children:["Style ",r.jsx("span",{className:"italic font-light",children:"&"})," Fashion"]}),r.jsx("a",{href:"#",className:"text-xs font-bold text-muted-foreground uppercase tracking-widest hover:text-primary transition-colors",children:"More"})]}),r.jsx("div",{className:"flex flex-col gap-8",children:s.map((i,o)=>r.jsxs(se,{to:bn(i),className:"group flex flex-col gap-4",children:[r.jsx("div",{className:"relative overflow-hidden aspect-[4/3] w-full rounded-sm",children:r.jsx(Dn,{src:i.image_url,category:i.category,alt:"",className:"w-full h-full object-cover transition-transform duration-1000 group-hover:scale-105"})}),r.jsxs("div",{children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] mb-2 block",children:"Haute Couture"}),r.jsx("h3",{className:"text-2xl font-serif text-foreground leading-tight group-hover:text-primary transition-colors mb-3",children:i.title}),r.jsx("p",{className:"text-muted-foreground text-sm font-light line-clamp-2",children:i.excerpt})]})]},o))})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-8 border-b-2 border-foreground pb-4",children:[r.jsxs("h2",{className:"text-3xl font-serif text-foreground",children:["Gastronomy ",r.jsx("span",{className:"italic font-light",children:"&"})," Dining"]}),r.jsx("a",{href:"#",className:"text-xs font-bold text-muted-foreground uppercase tracking-widest hover:text-primary transition-colors",children:"More"})]}),r.jsx("div",{className:"flex flex-col gap-8",children:a.map((i,o)=>r.jsxs(se,{to:bn(i),className:"group flex flex-col gap-4",children:[r.jsx("div",{className:"relative overflow-hidden aspect-[4/3] w-full rounded-sm",children:r.jsx(Dn,{src:i.image_url,category:i.category,alt:"",className:"w-full h-full object-cover transition-transform duration-1000 group-hover:scale-105"})}),r.jsxs("div",{children:[r.jsx("span",{className:"text-[#9A7B4F] text-[10px] font-bold uppercase tracking-[0.2em] mb-2 block",children:"Epicurean"}),r.jsx("h3",{className:"text-2xl font-serif text-foreground leading-tight group-hover:text-primary transition-colors mb-3",children:i.title}),r.jsx("p",{className:"text-muted-foreground text-sm font-light line-clamp-2",children:i.excerpt})]})]},o))})]})]})})})})}function Foe(){const e=[{title:`Review: Jennifer Juan's "First Love" Unveiled`,category:"Culture",rating:"9.2",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/7e29357b9_chelseamonthly_com_96A1259A-D465-4014-93E2-616DE8597C5A-540x370_098e3aad.jpeg"},{title:"A Taste of Excellence: Michelin-Starred Chef Nicolas Isnard",category:"Dining",rating:"9.5",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/5dd07959b_chelseamonthly_com_Copyrights-to-be-mentioned-Nicolas-Isnard-540x370_e9db8fb9.jpg"},{title:"Chic Elegance Takes Center Stage: Mae Cassidy Bridal",category:"Style",rating:"8.8",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/8b0c7fa33_chelseamonthly_com_Screenshot-2024-02-02-at-105534-540x370_d75ac419.jpg"}];return r.jsx(zs,{children:r.jsxs("section",{className:"py-24 bg-background relative overflow-hidden",children:[r.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-primary/5 rounded-full blur-[120px] pointer-events-none"}),r.jsxs("div",{className:"max-w-[90rem] mx-auto px-6 relative z-10",children:[r.jsxs("div",{className:"text-center mb-16",children:[r.jsx("h2",{className:"text-4xl font-serif text-foreground mb-4",children:"The Critique"}),r.jsx("div",{className:"w-16 h-px bg-primary mx-auto"}),r.jsx("p",{className:"mt-4 text-muted-foreground font-light tracking-wide uppercase text-xs",children:"Expert Reviews & Ratings"})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:e.map((t,n)=>r.jsx(zs,{delay:n*150,children:r.jsxs("a",{href:"#",className:"group block relative h-[450px] rounded-sm overflow-hidden",children:[r.jsx("img",{src:t.image_url,alt:"",className:"absolute inset-0 w-full h-full object-cover transition-transform duration-1000 group-hover:scale-110"}
702),r.jsx("div",{className:"absolute inset-0 bg-foreground/20 group-hover:bg-foreground/40 transition-colors duration-500"}),r.jsxs("div",{className:"absolute bottom-6 left-6 right-6 backdrop-blur-md bg-background/80 border border-border/50 p-6 shadow-xl transform translate-y-4 group-hover:translate-y-0 transition-transform duration-500",children:[r.jsx("div",{className:"absolute -top-5 right-6 w-10 h-10 bg-primary text-primary-foreground flex items-center justify-center rounded-full font-serif text-lg shadow-lg shadow-primary/30",children:t.rating}),r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-widest block mb-2",children:t.category}),r.jsx("h3",{className:"text-lg font-serif text-foreground leading-snug",children:t.title})]})]})},n))})]})]})})}function Boe(){return r.jsx(zs,{children:r.jsxs("section",{className:"py-24 bg-foreground text-background relative overflow-hidden",children:[r.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/d5e0542a8_chelseamonthly_com_1000036087-540x540_b9ced448.webp')] bg-cover bg-center mix-blend-luminosity"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground to-foreground/80"}),r.jsxs("div",{className:"max-w-4xl mx-auto px-6 relative z-10 text-center",children:[r.jsx(ir,{className:"w-8 h-8 text-primary mx-auto mb-6 opacity-80"}),r.jsx("h2",{className:"text-4xl md:text-5xl font-serif text-background mb-6 leading-tight",children:"The Insider's Edit"}),r.jsx("p",{className:"text-background/70 text-lg font-light max-w-2xl mx-auto mb-10",children:"Join our exclusive society. Receive curated luxury lifestyle news, invitations to private events, and editorial highlights delivered straight to your inbox."}),r.jsxs("form",{className:"flex flex-col sm:flex-row gap-0 max-w-xl mx-auto shadow-2xl",children:[r.jsx(de,{type:"email",placeholder:"Enter your email address...",className:"flex-1 h-14 bg-background/10 border-background/20 text-foreground placeholder:text-background/50 focus:border-primary rounded-none focus-visible:ring-0 text-center sm:text-left sm:pl-6 backdrop-blur-sm"}),r.jsxs("button",{type:"submit",className:"h-14 bg-primary text-primary-foreground px-8 font-bold text-xs uppercase tracking-[0.2em] hover:bg-primary/90 transition-colors relative overflow-hidden group",children:[r.jsx("span",{className:"relative z-10",children:"Subscribe"}),r.jsx("div",{className:"absolute inset-0 bg-white/20 -translate-x-full group-hover:animate-[shimmer_1.5s_infinite]"})]})]}),r.jsx("p",{className:"text-background/40 text-[10px] uppercase tracking-widest mt-6",children:"Complimentary membership. Unsubscribe anytime."})]})]})})}function qoe(){var o,l;const[e,t]=j.useState([]),[n,s]=j.useState(!0),{user:a}=vo();j.useEffect(()=>{Promise.all([W.entities.Article.list("-published_date",100),W.entities.Article.filter({featured:!0},"-published_date",200)]).then(([c,u])=>{const m=[...u,...c],f=new Set,p=m.filter(v=>{if(!v.id||f.has(v.id))return!1;f.add(v.id);const g=(v.title||"").trim().toLowerCase();return!(!v.title||g.includes("contact form")||g.includes("newsletter form"))}),b=MB(p.map(sC));t(b)}).catch(()=>{}).finally(()=>s(!1))},[]);const i=e.length>0?e:n?[]:Poe.map(c=>({...c,id:null}));return r.jsxs("div",{className:"bg-background min-h-screen font-sans selection:bg-primary selection:text-primary-foreground",children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:` 703 @keyframes ticker { 704 0% { transform: translateX(0); } 705 100% { transform: translateX(-50%); } 706 } 707 @keyframes floatA { 708 0%, 100% { transform: translateY(0) scale(1); opacity: 0.5; } 709 50% { transform: translateY(-30px) scale(1.05); opacity: 0.8; } 710 } 711 @keyframes floatB { 712 0%, 100% { transform: translateY(0) scale(1.05); opacity: 0.7; } 713 50% { transform: translateY(-20px) scale(1); opacity: 0.4; } 714 } 715 @keyframes shimmer { 716 100% { transform: translateX(100%); } 717 } 718 @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } } 719 @keyframes slide-in-from-right-4 { from { transform: translateX(1rem); } to { transform: translateX(0); } } 720 `}}),r.jsx(Ooe,{}),r.jsx(Moe,{articles:i}),r.jsx(Roe,{articles:i}),r.jsx(Ioe,{articles:i}),r.jsx(Toe,{}),r.jsx(Doe,{articles:i}),r.jsx(Loe,{articles:i}),r.jsx($oe,{articles:i}),r.jsx(Foe,{}),r.jsx(Boe,{}),r.jsx(koe,{}),(a==null?void 0:a.role)==="admin"&&r.jsx("section",{className:"bg-gray-900 text-white py-10 border-t-4 border-amber-500",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[r.jsx("h2",{className:"text-amber-400 font-bold text-sm uppercase tracking-widest mb-6 flex items-center gap-2",children:"â Admin Diagnostic â Article Database"}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4 text-xs",children:[{label:"Total Articles",value:e.length},{label:"Imported (wp_id/batch)",value:e.filter(tj).length},{label:"Seed/Demo Articles",value:e.filter(c=>!tj(c)).length},{label:"Articles with image_url",value:e.filter(c=>c.image_url).length},{label:"External WP images",value:e.filter(c=>c.image_url&&c.image_url.includes("chelseamonthly.com")).length},{label:"Missing image_url",value:e.filter(c=>!c.image_url).length},{label:"Featured=true",value:e.filter(c=>c.featured).length},{label:"Latest imported date",value:((l=(o=e.filter(tj)[0])==null?void 0:o.published_date)==null?void 0:l.slice(0,10))||"â"}].map(({label:c,value:u})=>r.jsxs("div",{className:"bg-gray-800 rounded p-3",children:[r.jsx("div",{className:"text-gray-400 mb-1",children:c}),r.jsx("div",{className:"text-amber-400 font-bold text-lg",children:u})]},c))})]})})]})}function mt(e,t,{checkForDefaultPrevented:n=!0}={}
vendor: 17,089 bytes, line 720
720){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Voe(e,t){const n=j.createContext(t),s=i=>{const{children:o,...l}=i,c=j.useMemo(()=>l,Object.values(l));return r.jsx(n.Provider,{value:c,children:o})};s.displayName=e+"Provider";function a(i){const o=j.useContext(n);if(o)return o;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[s,a]}function Ql(e,t=[]){let n=[];function s(i,o){const l=j.createContext(o),c=n.length;n=[...n,o];const u=f=>{var w;const{scope:p,children:b,...v}=f,g=((w=p==null?void 0:p[e])==null?void 0:w[c])||l,y=j.useMemo(()=>v,Object.values(v));return r.jsx(g.Provider,{value:y,children:b})};u.displayName=i+"Provider";function m(f,p){var g;const b=((g=p==null?void 0:p[e])==null?void 0:g[c])||l,v=j.useContext(b);if(v)return v;if(o!==void 0)return o;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,m]}const a=()=>{const i=n.map(o=>j.createContext(o));return function(l){const c=(l==null?void 0:l[e])||i;return j.useMemo(()=>({[`__scope${e}`]:{...l,[e]:c}}),[l,c])}};return a.scopeName=e,[s,Uoe(a,...t)]}function Uoe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const o=s.reduce((l,{useScope:c,scopeName:u})=>{const f=c(i)[`__scope${u}`];return{...l,...f}},{});return j.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}var un=globalThis!=null&&globalThis.document?j.useLayoutEffect:()=>{},zoe=cy[" useId ".trim().toString()]||(()=>{}),Woe=0;function ei(e){const[t,n]=j.useState(zoe());return un(()=>{n(s=>s??String(Woe++))},[e]),t?`radix-${t}`:""}var Hoe=cy[" useInsertionEffect ".trim().toString()]||un;function wd({prop:e,defaultProp:t,onChange:n=()=>{},caller:s}){const[a,i,o]=Goe({defaultProp:t,onChange:n}),l=e!==void 0,c=l?e:a;{const m=j.useRef(e!==void 0);j.useEffect(()=>{const f=m.current;f!==l&&console.warn(`${s} is changing from ${f?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=l},[l,s])}const u=j.useCallback(m=>{var f;if(l){const p=Koe(m)?m(e):m;p!==e&&((f=o.current)==null||f.call(o,p))}else i(m)},[l,e,i,o]);return[c,u]}function Goe({defaultProp:e,onChange:t}){const[n,s]=j.useState(e),a=j.useRef(n),i=j.useRef(t);return Hoe(()=>{i.current=t},[t]),j.useEffect(()=>{var o;a.current!==n&&((o=i.current)==null||o.call(i,n),a.current=n)},[n,a]),[n,s,i]}function Koe(e){return typeof e=="function"}function Yoe(e){const t=Xoe(e),n=j.forwardRef((s,a)=>{const{children:i,...o}=s,l=j.Children.toArray(i),c=l.find(Qoe);if(c){const u=c.props.children,m=l.map(f=>f===c?j.Children.count(u)>1?j.Children.only(null):j.isValidElement(u)?u.props.children:null:f);return r.jsx(t,{...o,ref:a,children:j.isValidElement(u)?j.cloneElement(u,void 0,m):null})}return r.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function Xoe(e){const t=j.forwardRef((n,s)=>{const{children:a,...i}=n;if(j.isValidElement(a)){const o=ele(a),l=Zoe(i,a.props);return a.type!==j.Fragment&&(l.ref=s?Xl(s,o):o),j.cloneElement(a,l)}return j.Children.count(a)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Joe=Symbol("radix.slottable");function Qoe(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Joe}function Zoe(e,t){const n={...t};for(const s in t){const a=e[s],i=t[s];/^on[A-Z]/.test(s)?a&&i?n[s]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[s]=a):s==="style"?n[s]={...a,...i}:s==="className"&&(n[s]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function ele(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var tle=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],St=tle.reduce((e,t)=>{const n=Yoe(`Primitive.${t}`),s=j.forwardRef((a,i)=>{const{asChild:o,...l}=a,c=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),r.jsx(c,{...l,ref:i})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function rle(e,t){e&&Zm.flushSync(()=>e.dispatchEvent(t))}function fo(e){const t=j.useRef(e);return j.useEffect(()=>{t.current=e}),j.useMemo(()=>(...n)=>{var s;return(s=t.current)==null?void 0:s.call(t,...n)},[])}function nle(e,t=globalThis==null?void 0:globalThis.document){const n=fo(e);j.useEffect(()=>{const s=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[n,t])}var sle="DismissableLayer",jS="dismissableLayer.update",ale="dismissableLayer.pointerDownOutside",ile="dismissableLayer.focusOutside",r3,IB=j.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Sy=j.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:o,onDismiss:l,...c}=e,u=j.useContext(IB),[m,f]=j.useState(null),p=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,b]=j.useState({}),v=rr(t,T=>f(T)),g=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(y),N=m?g.indexOf(m):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,A=N>=w,k=cle(T=>{const P=T.target,R=[...u.branches].some(M=>M.contains(P));!A||R||(a==null||a(T),o==null||o(T),T.defaultPrevented||l==null||l())},p),C=dle(T=>{const P=T.target;[...u.branches].some(M=>M.contains(P))||(i==null||i(T),o==null||o(T),T.defaultPrevented||l==null||l())},p);return nle(T=>{N===u.layers.size-1&&(s==null||s(T),!T.defaultPrevented&&l&&(T.preventDefault(),l()))},p),j.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(r3=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),n3(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=r3)}},[m,p,n,u]),j.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),n3())},[m,u]),j.useEffect(()=>{const T=()=>b({});return document.addEventListener(jS,T),()=>document.removeEventListener(jS,T)},[]),r.jsx(St.div,{...c,ref:v,style:{pointerEvents:S?A?"auto":"none":void 0,...e.style},onFocusCapture:mt(e.onFocusCapture,C.onFocusCapture),onBlurCapture:mt(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:mt(e.onPointerDownCapture,k.onPointerDownCapture)})});Sy.displayName=sle;var ole="DismissableLayerBranch",lle=j.forwardRef((e,t)=>{const n=j.useContext(IB),s=j.useRef(null),a=rr(t,s);return j.useEffect(()=>{const i=s.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),r.jsx(St.div,{...e,ref:a})});lle.displayName=ole;function cle(e,t=globalThis==null?void 0:globalThis.document){const n=fo(e),s=j.useRef(!1),a=j.useRef(()=>{});return j.useEffect(()=>{const i=l=>{if(l.target&&!s.current){let c=function(){DB(ale,n,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);s.current=!1},o=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>s.current=!0}}function dle(e,t=globalThis==null?void 0:globalThis.document){const n=fo(e),s=j.useRef(!1);return j.useEffect(()=>{const a=i=>{i.target&&!s.current&&DB(ile,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function n3(){const e=new CustomEvent(jS);document.dispatchEvent(e)}function DB(e,t,n,{discrete:s}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),s?rle(a,i):a.dispatchEvent(i)}var rj="focusScope.autoFocusOnMount",nj="focusScope.autoFocusOnUnmount",s3={bubbles:!1,cancelable:!0},ule="FocusScope",ky=j.forwardRef((e,t)=>{const{loop:n=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...o}=e,[l,c]=j.useState(null),u=fo(a),m=fo(i),f=j.useRef(null),p=rr(t,g=>c(g)),b=j.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;j.useEffect(()=>{if(s){let g=function(S){if(b.paused||!l)return;const A=S.target;l.contains(A)?f.current=A:Vi(f.current,{select:!0})},y=function(S){if(b.paused||!l)return;const A=S.relatedTarget;A!==null&&(l.contains(A)||Vi(f.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const k of S)k.removedNodes.length>0&&Vi(l)};document.addEventListener("focusin",g),document.addEventListener("focusout",y);const N=new MutationObserver(w);return l&&N.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),N.disconnect()}}},[s,l,b.paused]),j.useEffect(()=>{if(l){i3.add(b);const g=document.activeElement;if(!l.contains(g)){const w=new CustomEvent(rj,s3);l.addEventListener(rj,u),l.dispatchEvent(w),w.defaultPrevented||(hle(gle(LB(l)),{select:!0}),document.activeElement===g&&Vi(l))}return()=>{l.removeEventListener(rj,u),setTimeout(()=>{const w=new CustomEvent(nj,s3);l.addEventListener(nj,m),l.dispatchEvent(w),w.defaultPrevented||Vi(g??document.body,{select:!0}),l.removeEventListener(nj,m),i3.remove(b)},0)}}},[l,u,m,b]);const v=j.useCallback(g=>{if(!n&&!s||b.paused)return;const y=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(y&&w){const N=g.currentTarget,[S,A]=mle(N);S&&A?!g.shiftKey&&w===A?(g.preventDefault(),n&&Vi(S,{select:!0})):g.shiftKey&&w===S&&(g.preventDefault(),n&&Vi(A,{select:!0})):w===N&&g.preventDefault()}},[n,s,b.paused]);return r.jsx(St.div,{tabIndex:-1,...o,ref:p,onKeyDown:v})});ky.displayName=ule;function hle(e,{select:t=!1}={}){const n=document.activeElement;for(const s of e)if(Vi(s,{select:t}),document.activeElement!==n)return}function mle(e){const t=LB(e),n=a3(t,e),s=a3(t.reverse(),e);return[n,s]}function LB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function a3(e,t){for(const n of e)if(!fle(n,{upTo:t}))return n}function fle(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function ple(e){return e instanceof HTMLInputElement&&"select"in e}function Vi(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ple(e)&&t&&e.select()}}var i3=xle();function xle(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=o3(e,t),e.unshift(t)},remove(t){var n;e=o3(e,t),(n=e[0])==null||n.resume()}}}function o3(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function gle(e){return e.filter(t=>t.tagName!=="A")}var yle="Portal",Cy=j.forwardRef((e,t)=>{var l;const{container:n,...s}=e,[a,i]=j.useState(!1);un(()=>i(!0),[]);const o=n||a&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return o?JX.createPortal(r.jsx(St.div,{...s,ref:t}),o):null});Cy.displayName=yle;function vle(e,t){return j.useReducer((n,s)=>t[n][s]??n,e)}var Zl=e=>{const{present:t,children:n}=e,s=ble(t),a=typeof n=="function"?n({present:s.isPresent}):j.Children.only(n),i=rr(s.ref,jle(a));return typeof n=="function"||s.isPresent?j.cloneElement(a,{ref:i}):null};Zl.displayName="Presence";function ble(e){const[t,n]=j.useState(),s=j.useRef(null),a=j.useRef(e),i=j.useRef("none"),o=e?"mounted":"unmounted",[l,c]=vle(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return j.useEffect(()=>{const u=Vp(s.current);i.current=l==="mounted"?u:"none"},[l]),un(()=>{const u=s.current,m=a.current;if(m!==e){const p=i.current,b=Vp(u);e?c("MOUNT"):b==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(m&&p!==b?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),un(()=>{if(t){let u;const m=t.ownerDocument.defaultView??window,f=b=>{const g=Vp(s.current).includes(CSS.escape(b.animationName));if(b.target===t&&g&&(c("ANIMATION_END"),!a.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=b=>{b.target===t&&(i.current=Vp(s.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{m.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:j.useCallback(u=>{s.current=u?getComputedStyle(u):null,n(u)},[])}}function Vp(e){return(e==null?void 0:e.animationName)||"none"}function jle(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sj=0;function aC(){j.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??l3()),document.body.insertAdjacentElement("beforeend",e[1]??l3()),sj++,()=>{sj===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),sj--}},[])}function l3(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var oa=function(){return oa=Object.assign||function(t){for(var n,s=1,a=arguments.length;s<a;s++){n=arguments[s];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},oa.apply(this,arguments)};function $B(e,t){var n={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(n[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(n[s[a]]=e[s[a]]);return n}function wle(e,t,n){if(n||arguments.length===2)for(var s=0,a=t.length,i;s<a;s++)(i||!(s in t))&&(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))}var Tx="right-scroll-bar-position",Ex="width-before-scroll-bar",Nle="with-scroll-bars-hidden",_le="--removed-body-scroll-bar-size";function aj(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Sle(e,t){var n=j.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(s){var a=n.value;a!==s&&(n.value=s,n.callback(s,a))}}}})[0];return n.callback=t,n.facade}var kle=typeof window<"u"?j.useLayoutEffect:j.useEffect,c3=new WeakMap;function Cle(e,t){var n=Sle(null,function(s){return e.forEach(function(a){return aj(a,s)})});return kle(function(){var s=c3.get(n);if(s){var a=new Set(s),i=new Set(e),o=n.current;a.forEach(function(l){i.has(l)||aj(l,null)}),i.forEach(function(l){a.has(l)||aj(l,o)})}c3.set(n,e)},[e]),n}function Ale(e){return e}function Tle(e,t){t===void 0&&(t=Ale);var n=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var o=t(i,s);return n.push(o),function(){n=n.filter(function(l){return l!==o})}},assignSyncMedium:function(i){for(s=!0;n.length;){var o=n;n=[],o.forEach(i)}n={push:function(l){return i(l)},filter:function(){return n}}},assignMedium:function(i){s=!0;var o=[];if(n.length){var l=n;n=[],l.forEach(i),o=n}var c=function(){var m=o;o=[],m.forEach(i)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(m){o.push(m),u()},filter:function(m){return o=o.filter(m),n}}}};return a}function Ele(e){e===void 0&&(e={});var t=Tle(null);return t.options=oa({async:!0,ssr:!1},e),t}var FB=function(e){var t=e.sideCar,n=$B(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return j.createElement(s,oa({},n))};
vendor: 9,340 bytes, lines 720-760
720FB.isSideCarExport=!0;function Ple(e,t){return e.useMedium(t),FB}var BB=Ele(),ij=function(){},Ay=j.forwardRef(function(e,t){var n=j.useRef(null),s=j.useState({onScrollCapture:ij,onWheelCapture:ij,onTouchMoveCapture:ij}),a=s[0],i=s[1],o=e.forwardProps,l=e.children,c=e.className,u=e.removeScrollBar,m=e.enabled,f=e.shards,p=e.sideCar,b=e.noRelative,v=e.noIsolation,g=e.inert,y=e.allowPinchZoom,w=e.as,N=w===void 0?"div":w,S=e.gapMode,A=$B(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=p,C=Cle([n,t]),T=oa(oa({},A),a);return j.createElement(j.Fragment,null,m&&j.createElement(k,{sideCar:BB,removeScrollBar:u,shards:f,noRelative:b,noIsolation:v,inert:g,setCallbacks:i,allowPinchZoom:!!y,lockRef:n,gapMode:S}),o?j.cloneElement(j.Children.only(l),oa(oa({},T),{ref:C})):j.createElement(N,oa({},T,{className:c,ref:C}),l))});Ay.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ay.classNames={fullWidth:Ex,zeroRight:Tx};var Ole=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Mle(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ole();return t&&e.setAttribute("nonce",t),e}function Rle(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ile(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Dle=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Mle())&&(Rle(t,n),Ile(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Lle=function(){var e=Dle();return function(t,n){j.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},qB=function(){var e=Lle(),t=function(n){var s=n.styles,a=n.dynamic;return e(s,a),null};return t},$le={left:0,top:0,right:0,gap:0},oj=function(e){return parseInt(e||"",10)||0},Fle=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[oj(n),oj(s),oj(a)]},Ble=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return $le;var t=Fle(e),n=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-n+t[2]-t[0])}},qle=qB(),Zc="data-scroll-locked",Vle=function(e,t,n,s){var a=e.left,i=e.top,o=e.right,l=e.gap;return n===void 0&&(n="margin"),` 721 .`.concat(Nle,` { 722 overflow: hidden `).concat(s,`; 723 padding-right: `).concat(l,"px ").concat(s,`; 724 } 725 body[`).concat(Zc,`] { 726 overflow: hidden `).concat(s,`; 727 overscroll-behavior: contain; 728 `).concat([t&&"position: relative ".concat(s,";"),n==="margin"&&` 729 padding-left: `.concat(a,`px; 730 padding-top: `).concat(i,`px; 731 padding-right: `).concat(o,`px; 732 margin-left:0; 733 margin-top:0; 734 margin-right: `).concat(l,"px ").concat(s,`; 735 `),n==="padding"&&"padding-right: ".concat(l,"px ").concat(s,";")].filter(Boolean).join(""),` 736 } 737 738 .`).concat(Tx,` { 739 right: `).concat(l,"px ").concat(s,`; 740 } 741 742 .`).concat(Ex,` { 743 margin-right: `).concat(l,"px ").concat(s,`; 744 } 745 746 .`).concat(Tx," .").concat(Tx,` { 747 right: 0 `).concat(s,`; 748 } 749 750 .`).concat(Ex," .").concat(Ex,` { 751 margin-right: 0 `).concat(s,`; 752 } 753 754 body[`).concat(Zc,`] { 755 `).concat(_le,": ").concat(l,`px; 756 } 757`)},d3=function(){var e=parseInt(document.body.getAttribute(Zc)||"0",10);return isFinite(e)?e:0},Ule=function(){j.useEffect(function(){return document.body.setAttribute(Zc,(d3()+1).toString()),function(){var e=d3()-1;e<=0?document.body.removeAttribute(Zc):document.body.setAttribute(Zc,e.toString())}},[])},zle=function(e){var t=e.noRelative,n=e.noImportant,s=e.gapMode,a=s===void 0?"margin":s;Ule();var i=j.useMemo(function(){return Ble(a)},[a]);return j.createElement(qle,{styles:Vle(i,!t,a,n?"":"!important")})},wS=!1;if(typeof window<"u")try{var Up=Object.defineProperty({},"passive",{get:function(){return wS=!0,!0}});window.addEventListener("test",Up,Up),window.removeEventListener("test",Up,Up)}catch{wS=!1}var Pc=wS?{passive:!1}:!1,Wle=function(e){return e.tagName==="TEXTAREA"},VB=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Wle(e)&&n[t]==="visible")},Hle=function(e){return VB(e,"overflowY")},Gle=function(e){return VB(e,"overflowX")},u3=function(e,t){var n=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var a=UB(e,s);if(a){var i=zB(e,s),o=i[1],l=i[2];if(o>l)return!0}s=s.parentNode}while(s&&s!==n.body);return!1},Kle=function(e){var t=e.scrollTop,n=e.scrollHeight,s=e.clientHeight;return[t,n,s]},Yle=function(e){var t=e.scrollLeft,n=e.scrollWidth,s=e.clientWidth;return[t,n,s]},UB=function(e,t){return e==="v"?Hle(t):Gle(t)},zB=function(e,t){return e==="v"?Kle(t):Yle(t)},Xle=function(e,t){return e==="h"&&t==="rtl"?-1:1},Jle=function(e,t,n,s,a){var i=Xle(e,window.getComputedStyle(t).direction),o=i*s,l=n.target,c=t.contains(l),u=!1,m=o>0,f=0,p=0;do{if(!l)break;var b=zB(e,l),v=b[0],g=b[1],y=b[2],w=g-y-i*v;(v||w)&&UB(e,l)&&(f+=w,p+=v);var N=l.parentNode;l=N&&N.nodeType===Node.DOCUMENT_FRAGMENT_NODE?N.host:N}while(!c&&l!==document.body||c&&(t.contains(l)||t===l));return(m&&Math.abs(f)<1||!m&&Math.abs(p)<1)&&(u=!0),u},zp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},h3=function(e){return[e.deltaX,e.deltaY]},m3=function(e){return e&&"current"in e?e.current:e},Qle=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Zle=function(e){return` 758 .block-interactivity-`.concat(e,` {pointer-events: none;} 759 .allow-interactivity-`).concat(e,` {pointer-events: all;} 760`)},ece=0,Oc=[];function tce(e){var t=j.useRef([]),n=j.useRef([0,0]),s=j.useRef(),a=j.useState(ece++)[0],i=j.useState(qB)[0],o=j.useRef(e);j.useEffect(function(){o.current=e},[e]),j.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var g=wle([e.lockRef.current],(e.shards||[]).map(m3),!0).filter(Boolean);return g.forEach(function(y){return y.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),g.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var l=j.useCallback(function(g,y){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!o.current.allowPinchZoom;var w=zp(g),N=n.current,S="deltaX"in g?g.deltaX:N[0]-w[0],A="deltaY"in g?g.deltaY:N[1]-w[1],k,C=g.target,T=Math.abs(S)>Math.abs(A)?"h":"v";if("touches"in g&&T==="h"&&C.type==="range")return!1;var P=window.getSelection(),R=P&&P.anchorNode,M=R?R===C||R.contains(C):!1;if(M)return!1;var D=u3(T,C);if(!D)return!0;if(D?k=T:(k=T==="v"?"h":"v",D=u3(T,C)),!D)return!1;if(!s.current&&"changedTouches"in g&&(S||A)&&(s.current=k),!k)return!0;var $=s.current||k;return Jle($,y,g,$==="h"?S:A)},[]),c=j.useCallback(function(g){var y=g;if(!(!Oc.length||Oc[Oc.length-1]!==i)){var w="deltaY"in y?h3(y):zp(y),N=t.current.filter(function(k){return k.name===y.type&&(k.target===y.target||y.target===k.shadowParent)&&Qle(k.delta,w)})[0];if(N&&N.should){y.cancelable&&y.preventDefault();return}if(!N){var S=(o.current.shards||[]).map(m3).filter(Boolean).filter(function(k){return k.contains(y.target)}),A=S.length>0?l(y,S[0]):!o.current.noIsolation;A&&y.cancelable&&y.preventDefault()}}},[]),u=j.useCallback(function(g,y,w,N){var S={name:g,delta:y,target:w,should:N,shadowParent:rce(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(A){return A!==S})},1)},[]),m=j.useCallback(function(g){n.current=zp(g),s.current=void 0},[]),f=j.useCallback(function(g){u(g.type,h3(g),g.target,l(g,e.lockRef.current))},[]),p=j.useCallback(function(g){u(g.type,zp(g),g.target,l(g,e.lockRef.current))},[]);j.useEffect(function(){return Oc.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Pc),document.addEventListener("touchmove",c,Pc),document.addEventListener("touchstart",m,Pc),function(){Oc=Oc.filter(function(g){return g!==i}),document.removeEventListener("wheel",c,Pc),document.removeEventListener("touchmove",c,Pc),document.removeEventListener("touchstart",m,Pc)}},[]);var b=e.removeScrollBar,v=e.inert;return j.createElement(j.Fragment,null,v?j.createElement(i,{styles:Zle(a)}):null,b?j.createElement(zle,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function rce(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const nce=Ple(BB,tce);var Ty=j.forwardRef(function(e,t){return j.createElement(Ay,oa({},e,{ref:t,sideCar:nce}))});Ty.classNames=Ay.classNames;var sce=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Mc=new WeakMap,Wp=new WeakMap,Hp={},lj=0,WB=function(e){return e&&(e.host||WB(e.parentNode))},ace=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=WB(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},ice=function(e,t,n,s){var a=ace(t,Array.isArray(e)?e:[e]);Hp[n]||(Hp[n]=new WeakMap);
vendor: 8,765 bytes, lines 760-764
760var i=Hp[n],o=[],l=new Set,c=new Set(a),u=function(f){!f||l.has(f)||(l.add(f),u(f.parentNode))};a.forEach(u);var m=function(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,function(p){if(l.has(p))m(p);else try{var b=p.getAttribute(s),v=b!==null&&b!=="false",g=(Mc.get(p)||0)+1,y=(i.get(p)||0)+1;Mc.set(p,g),i.set(p,y),o.push(p),g===1&&v&&Wp.set(p,!0),y===1&&p.setAttribute(n,"true"),v||p.setAttribute(s,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return m(t),l.clear(),lj++,function(){o.forEach(function(f){var p=Mc.get(f)-1,b=i.get(f)-1;Mc.set(f,p),i.set(f,b),p||(Wp.has(f)||f.removeAttribute(s),Wp.delete(f)),b||f.removeAttribute(n)}),lj--,lj||(Mc=new WeakMap,Mc=new WeakMap,Wp=new WeakMap,Hp={})}},iC=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),a=sce(e);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live], script"))),ice(s,a,n,"aria-hidden")):function(){return null}};function oce(e){const t=lce(e),n=j.forwardRef((s,a)=>{const{children:i,...o}=s,l=j.Children.toArray(i),c=l.find(dce);if(c){const u=c.props.children,m=l.map(f=>f===c?j.Children.count(u)>1?j.Children.only(null):j.isValidElement(u)?u.props.children:null:f);return r.jsx(t,{...o,ref:a,children:j.isValidElement(u)?j.cloneElement(u,void 0,m):null})}return r.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function lce(e){const t=j.forwardRef((n,s)=>{const{children:a,...i}=n;if(j.isValidElement(a)){const o=hce(a),l=uce(i,a.props);return a.type!==j.Fragment&&(l.ref=s?Xl(s,o):o),j.cloneElement(a,l)}return j.Children.count(a)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cce=Symbol("radix.slottable");function dce(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cce}function uce(e,t){const n={...t};for(const s in t){const a=e[s],i=t[s];/^on[A-Z]/.test(s)?a&&i?n[s]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[s]=a):s==="style"?n[s]={...a,...i}:s==="className"&&(n[s]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function hce(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ey="Dialog",[HB]=Ql(Ey),[mce,Ks]=HB(Ey),GB=e=>{const{__scopeDialog:t,children:n,open:s,defaultOpen:a,onOpenChange:i,modal:o=!0}=e,l=j.useRef(null),c=j.useRef(null),[u,m]=wd({prop:s,defaultProp:a??!1,onChange:i,caller:Ey});return r.jsx(mce,{scope:t,triggerRef:l,contentRef:c,contentId:ei(),titleId:ei(),descriptionId:ei(),open:u,onOpenChange:m,onOpenToggle:j.useCallback(()=>m(f=>!f),[m]),modal:o,children:n})};GB.displayName=Ey;var KB="DialogTrigger",YB=j.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,a=Ks(KB,n),i=rr(t,a.triggerRef);return r.jsx(St.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":cC(a.open),...s,ref:i,onClick:mt(e.onClick,a.onOpenToggle)})});YB.displayName=KB;var oC="DialogPortal",[fce,XB]=HB(oC,{forceMount:void 0}),JB=e=>{const{__scopeDialog:t,forceMount:n,children:s,container:a}=e,i=Ks(oC,t);return r.jsx(fce,{scope:t,forceMount:n,children:j.Children.map(s,o=>r.jsx(Zl,{present:n||i.open,children:r.jsx(Cy,{asChild:!0,container:a,children:o})}))})};JB.displayName=oC;var ng="DialogOverlay",QB=j.forwardRef((e,t)=>{const n=XB(ng,e.__scopeDialog),{forceMount:s=n.forceMount,...a}=e,i=Ks(ng,e.__scopeDialog);return i.modal?r.jsx(Zl,{present:s||i.open,children:r.jsx(xce,{...a,ref:t})}):null});QB.displayName=ng;var pce=oce("DialogOverlay.RemoveScroll"),xce=j.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,a=Ks(ng,n);return r.jsx(Ty,{as:pce,allowPinchZoom:!0,shards:[a.contentRef],children:r.jsx(St.div,{"data-state":cC(a.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),Ml="DialogContent",ZB=j.forwardRef((e,t)=>{const n=XB(Ml,e.__scopeDialog),{forceMount:s=n.forceMount,...a}=e,i=Ks(Ml,e.__scopeDialog);return r.jsx(Zl,{present:s||i.open,children:i.modal?r.jsx(gce,{...a,ref:t}):r.jsx(yce,{...a,ref:t})})});ZB.displayName=Ml;var gce=j.forwardRef((e,t)=>{const n=Ks(Ml,e.__scopeDialog),s=j.useRef(null),a=rr(t,n.contentRef,s);return j.useEffect(()=>{const i=s.current;if(i)return iC(i)},[]),r.jsx(e7,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mt(e.onCloseAutoFocus,i=>{var o;i.preventDefault(),(o=n.triggerRef.current)==null||o.focus()}),onPointerDownOutside:mt(e.onPointerDownOutside,i=>{const o=i.detail.originalEvent,l=o.button===0&&o.ctrlKey===!0;(o.button===2||l)&&i.preventDefault()}),onFocusOutside:mt(e.onFocusOutside,i=>i.preventDefault())})}),yce=j.forwardRef((e,t)=>{const n=Ks(Ml,e.__scopeDialog),s=j.useRef(!1),a=j.useRef(!1);return r.jsx(e7,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(s.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(s.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),e7=j.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:i,...o}=e,l=Ks(Ml,n),c=j.useRef(null),u=rr(t,c);return aC(),r.jsxs(r.Fragment,{children:[r.jsx(ky,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:i,children:r.jsx(Sy,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":cC(l.open),...o,ref:u,onDismiss:()=>l.onOpenChange(!1)})}),r.jsxs(r.Fragment,{children:[r.jsx(vce,{titleId:l.titleId}),r.jsx(jce,{contentRef:c,descriptionId:l.descriptionId})]})]})}),lC="DialogTitle",t7=j.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,a=Ks(lC,n);return r.jsx(St.h2,{id:a.titleId,...s,ref:t})});t7.displayName=lC;var r7="DialogDescription",n7=j.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,a=Ks(r7,n);return r.jsx(St.p,{id:a.descriptionId,...s,ref:t})});n7.displayName=r7;var s7="DialogClose",a7=j.forwardRef((e,t)=>{const{__scopeDialog:n,...s}=e,a=Ks(s7,n);return r.jsx(St.button,{type:"button",...s,ref:t,onClick:mt(e.onClick,()=>a.onOpenChange(!1))})});a7.displayName=s7;function cC(e){return e?"open":"closed"}var i7="DialogTitleWarning",[IPe,o7]=Voe(i7,{contentName:Ml,titleName:lC,docsSlug:"dialog"}),vce=({titleId:e})=>{const t=o7(i7),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 761 762If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 763 764For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return j.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},bce="DialogDescriptionWarning",jce=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${o7(bce).contentName}}.`;return j.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},l7=GB,c7=YB,d7=JB,Py=QB,Oy=ZB,My=t7,Ry=n7,u7=a7;const wce=l7,Nce=c7,_ce=d7,h7=j.forwardRef(({className:e,...t},n)=>r.jsx(Py,{className:lt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));h7.displayName=Py.displayName;const Sce=Gm("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),m7=j.forwardRef(({side:e="right",className:t,children:n,...s},a)=>r.jsxs(_ce,{children:[r.jsx(h7,{}),r.jsxs(Oy,{ref:a,className:lt(Sce({side:e}),t),...s,children:[r.jsxs(u7,{className:"absolute right-4 top-4 roun
764ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[r.jsx(ni,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]}),n]})]}));m7.displayName=Oy.displayName;const kce=j.forwardRef(({className:e,...t},n)=>r.jsx(My,{ref:n,className:lt("text-lg font-semibold text-foreground",e),...t}));kce.displayName=My.displayName;const Cce=j.forwardRef(({className:e,...t},n)=>r.jsx(Ry,{ref:n,className:lt("text-sm text-muted-foreground",e),...t}));Cce.displayName=Ry.displayName;const cj=[{label:"Travel",href:"/Articles?category=Travel"},{label:"Lifestyle",href:"/Articles?category=Lifestyle"},{label:"Entertainment",href:"/Articles?category=Entertainment"},{label:"Fashion & Style",href:"/Articles?category=Fashion%20%26%20Style"},{label:"Motoring",href:"/Articles?category=Motoring"},{label:"Property",href:"/Articles?category=Property"},{label:"Business",href:"/Articles?category=Business"}];function Ace(){const[e,t]=j.useState(!1),[n,s]=j.useState(!1),[a,i]=j.useState(""),o=ka(),l=c=>{c.preventDefault(),a.trim()&&(o(`/Articles?search=${encodeURIComponent(a.trim())}`),s(!1),i(""))};return j.useEffect(()=>{const c=()=>t(window.scrollY>20);return window.addEventListener("scroll",c),()=>window.removeEventListener("scroll",c)},[]),r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"bg-foreground text-background py-2 hidden sm:block font-sans text-[11px] tracking-widest uppercase",children:r.jsxs("div",{className:"max-w-[90rem] mx-auto px-6 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-6 text-background/80",children:[r.jsx("span",{children:new Date().toLocaleDateString("en-GB",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}),r.jsx("span",{className:"w-1 h-1 bg-primary rounded-full"}),r.jsx(se,{to:"/Authors",className:"hover:text-primary transition-colors",children:"Contributors"}),r.jsx(se,{to:"/about",className:"hover:text-primary transition-colors",children:"About Chelsea Monthly"}),r.jsx(se,{to:"/advertise",className:"hover:text-primary transition-colors",children:"Advertise"}),r.jsx(se,{to:"/media-room",className:"hover:text-primary transition-colors",children:"Media Room"})]}),r.jsxs("div",{className:"flex items-center gap-5",children:[r.jsxs("a",{href:"#",className:"hover:text-primary transition-colors flex items-center gap-1.5",children:[r.jsx(dY,{className:"w-3.5 h-3.5"})," Sign In"]}),r.jsx("span",{className:"w-px h-3 bg-background/20"}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("a",{href:"https://x.com/chelseamonthly",target:"_blank",rel:"noopener noreferrer",className:"text-background/80 hover:text-primary transition-colors",children:r.jsx(gd,{className:"w-3.5 h-3.5 fill-current"})}),r.jsx("a",{href:"https://instagram.com/chelseamonthly",target:"_blank",rel:"noopener noreferrer",className:"text-background/80 hover:text-primary transition-colors",children:r.jsx(uo,{className:"w-3.5 h-3.5"})}),r.jsx("a",{href:"https://facebook.com/chelseamonthly",target:"_blank",rel:"noopener noreferrer",className:"text-background/80 hover:text-primary transition-colors",children:r.jsx(Mx,{className:"w-3.5 h-3.5 fill-current"})})]})]})]})}),r.jsxs("header",{className:`sticky top-0 z-50 transition-all duration-500 ${e?"bg-background/95 backdrop-blur-xl shadow-sm border-b border-border/50":"bg-background border-b border-border"}`,children:[r.jsx("div",{className:"max-w-[90rem] mx-auto px-6",children:r.jsxs("div",{className:"flex items-center justify-between h-20 sm:h-24",children:[r.jsxs("nav",{className:"hidden sm:flex items-center gap-8 flex-1",children:[r.jsx(se,{to:"/",className:"text-[11px] font-semibold text-foreground hover:text-primary transition-colors uppercase tracking-[0.2em]",children:"Home"}),r.jsx(se,{to:"/Articles",className:"text-[11px] font-semibold text-foreground hover:text-primary transition-colors uppercase tracking-[0.2em]",children:"Articles"}),r.jsxs("div",{className:"group relative",children:[r.jsxs("a",{href:"#",className:"text-[11px] font-semibold text-foreground hover:text-primary transition-colors uppercase tracking-[0.2em] flex items-center gap-1.5 py-4",children:["Categories ",r.jsx(Sa,{className:"w-3 h-3 transition-transform group-hover:rotate-180"})]}),r.jsx("div",{className:"absolute top-[80%] left-0 w-64 bg-background border border-border/50 shadow-2xl opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-300 z-50 transform translate-y-2 group-hover:translate-y-0 backdrop-blur-md bg-background/95",children:r.jsx("div",{className:"p-3 grid gap-1",children:cj.map((c,u)=>r.jsx("a",{href:c.href,className:"block px-4 py-3 text-xs text-foreground hover:bg-primary/5 hover:text-primary transition-colors font-medium uppercase tracking-widest border-b border-border/50 last:border-0",children:c.label},u))})})]})]}),r.jsx(se,{to:"/",className:"shrink-0 mx-auto",children:r.jsx("img",{src:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/d857e8adc_chelseamonthly_com_Logo-300_2b0a813b.png",alt:"Chelsea Monthly",className:"h-10 sm:h-14 w-auto object-contain hover:scale-105 transition-transform duration-500"})}),r.jsxs("div",{className:"flex items-center justify-end gap-5 flex-1",children:[n?r.jsxs("form",{onSubmit:l,className:"flex items-center gap-3 animate-in fade-in slide-in-from-right-4 duration-300",children:[r.jsxs("div",{className:"relative",children:[r.jsx(dn,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),r.jsx(de,{value:a,onChange:c=>i(c.target.value),placeholder:"Search editorial...",className:"w-48 sm:w-64 h-10 pl-9 bg-muted/50 border-transparent focus:border-primary rounded-none text-xs tracking-wide",autoFocus:!0})]}),r.jsx("button",{type:"submit",className:"text-primary hover:text-primary/80 transition-colors p-2 font-bold text-xs uppercase tracking-widest",children:"Go"}),r.jsx("button",{type:"button",onClick:()=>{s(!1),i("")},className:"text-muted-foreground hover:text-foreground transition-colors p-2",children:r.jsx(ni,{className:"w-4 h-4"})})]}):r.jsx("button",{onClick:()=>s(!0),className:"w-10 h-10 flex items-center justify-center text-foreground hover:text-primary transition-colors hover:bg-muted/50 rounded-full",children:r.jsx(dn,{className:"w-4 h-4"})}),r.jsxs("a",{href:"#",className:"hidden lg:inline-flex relative overflow-hidden items-center justify-center bg-primary text-primary-foreground text-[10px] font-bold px-6 py-3 uppercase tracking-[0.2em] hover:shadow-lg hover:shadow-
764primary/20 hover:-translate-y-0.5 transition-all duration-300",children:[r.jsx("span",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-white/30 to-transparent -translate-x-full hover:animate-[shimmer_1.5s_infinite]"}),"Subscribe"]}),r.jsxs(wce,{children:[r.jsx(Nce,{asChild:!0,className:"sm:hidden",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-foreground hover:text-primary",children:r.jsx(lK,{className:"h-6 w-6",strokeWidth:1.5})})}),r.jsx(m7,{side:"right",className:"w-[85vw] sm:w-80 bg-background border-l border-border/50 p-0",children:r.jsxs("div",{className:"flex flex-col h-full",children:[r.jsx("div",{className:"p-6 border-b border-border/50 flex items-center justify-between",children:r.jsx("img",{src:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/7da9191e5_chelseamonthly_com_Logo-170_4e352c8f.png",alt:"Chelsea Monthly",className:"h-8 w-auto object-contain"})}),r.jsxs("div",{className:"flex-1 overflow-y-auto py-6 px-4 flex flex-col gap-2",children:[r.jsx(se,{to:"/",className:"px-4 py-3 text-sm font-semibold text-foreground hover:text-primary transition-colors uppercase tracking-widest border-b border-border/50",children:"Home"}),r.jsx(se,{to:"/Articles",className:"px-4 py-3 text-sm font-semibold text-foreground hover:text-primary transition-colors uppercase tracking-widest border-b border-border/50",children:"Articles"}),r.jsx(se,{to:"/Authors",className:"px-4 py-3 text-sm font-semibold text-foreground hover:text-primary transition-colors uppercase tracking-widest border-b border-border/50",children:"Contributors"}),r.jsxs("div",{className:"py-2",children:[r.jsx("span",{className:"px-4 text-[10px] text-muted-foreground font-bold uppercase tracking-[0.2em]",children:"Categories"}),cj.map((c,u)=>r.jsx("a",{href:c.href,className:"block px-4 py-3 text-sm text-foreground hover:text-primary transition-colors font-medium",children:c.label},u))]})]}),r.jsxs("div",{className:"p-6 border-t border-border/50 bg-muted/20",children:[r.jsx("a",{href:"#",className:"flex items-center justify-center w-full bg-primary text-primary-foreground text-xs font-bold py-4 uppercase tracking-[0.2em] mb-4",children:"Subscribe Now"}),r.jsxs("div",{className:"flex justify-center gap-6",children:[r.jsx("a",{href:"#",className:"text-muted-foreground hover:text-primary transition-colors",children:r.jsx(gd,{className:"w-4 h-4 fill-current"})}),r.jsx("a",{href:"#",className:"text-muted-foreground hover:text-primary transition-colors",children:r.jsx(uo,{className:"w-4 h-4"})}),r.jsx("a",{href:"#",className:"text-muted-foreground hover:text-primary transition-colors",children:r.jsx(Mx,{className:"w-4 h-4 fill-current"})})]})]})]})})]})]})]})}),r.jsx("div",{className:"border-t border-border/40 hidden sm:block bg-background",children:r.jsx("div",{className:"max-w-[90rem] mx-auto px-6",children:r.jsx("div",{className:"flex items-center justify-center gap-10 py-3",children:cj.map((c,u)=>r.jsxs("a",{href:c.href,className:"text-[10px] font-bold text-foreground/70 hover:text-primary whitespace-nowrap transition-colors uppercase tracking-[0.2em] relative group",children:[c.label,r.jsx("span",{className:"absolute -bottom-3 left-0 w-full h-[2px] bg-primary scale-x-0 group-hover:scale-x-100 transition-transform origin-left duration-300"})]},u))})})})]})]})}function Tce(){const[e,t]=j.useState(""),[n,s]=j.useState(!1),[a,i]=j.useState([]),{user:o}=vo();return j.useEffect(()=>{new Date(Date.now()-720*60*60*1e3).toISOString(),W.entities.Article.list("-created_date",10).then(l=>{const c=l.filter(u=>u.image_url&&u.title&&u.status!=="draft"&&u.status!=="archived").slice(0,3).map(u=>{let m="";try{const f=new Date(u.published_date.replace(" ","T"));isNaN(f.getTime())||(m=f.toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}))}catch{}return{id:u.id,slug:u.slug,category:u.category,title:u.title,image:u.image_url,date:m}});c.length>0&&i(c)}).catch(()=>{})},[]),r.jsxs("footer",{className:"bg-secondary text-secondary-foreground",children:[r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-16",children:r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-10",children:[r.jsxs("div",{className:"lg:col-span-1",children:[r.jsx("div",{className:"mb-5",children:r.jsxs(se,{to:"/",children:[r.jsx("img",{src:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/7da9191e5_chelseamonthly_com_Logo-170_4e352c8f.png",alt:"Chelsea Monthly",className:"h-10 w-auto object-contain",onError:l=>{l.target.style.display="none",l.target.nextElementSibling.style.display="block"}}),r.jsxs("span",{className:"hidden font-bold text-lg text-secondary-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:["Chelsea ",r.jsx("span",{className:"text-primary",children:"Monthly"})]})]})}
764),r.jsx("p",{className:"text-secondary-foreground/60 text-sm leading-relaxed mb-5",children:"Chelsea Monthly is London's No.1 Luxury & Lifestyle magazine, with over 150,000 copies distributed throughout Chelsea, South Kensington and Knightsbridge and subscribers globally."}),r.jsxs("div",{className:"space-y-2 text-sm",children:[r.jsxs("div",{className:"flex items-start gap-2 text-secondary-foreground/60",children:[r.jsx(Ft,{className:"w-4 h-4 text-primary shrink-0 mt-0.5"}),r.jsx("span",{children:"104 Judd Street, London"})]}),r.jsxs("div",{className:"flex items-center gap-2 text-secondary-foreground/60",children:[r.jsx(Hl,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("span",{children:"020 3856 3307"})]}),r.jsxs("div",{className:"flex items-center gap-2 text-secondary-foreground/60",children:[r.jsx(es,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("a",{href:"mailto:[email protected]",className:"hover:text-primary transition-colors",children:"[email protected]"})]})]})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold text-secondary-foreground uppercase tracking-widest mb-5 pb-3 border-b border-secondary-foreground/10",children:"Luxury Daily"}),r.jsx("div",{className:"space-y-4",children:a.map((l,c)=>r.jsxs(se,{to:bn(l),className:"flex gap-3 group",children:[r.jsx("img",{src:l.image,alt:"",className:"w-16 h-12 object-cover rounded-sm shrink-0 group-hover:opacity-80 transition-opacity"}),r.jsxs("div",{children:[r.jsx("h5",{className:"text-xs font-semibold text-secondary-foreground/80 leading-tight line-clamp-2 group-hover:text-primary transition-colors",style:{fontFamily:"'Montserrat', sans-serif"},children:l.title}),r.jsx("span",{className:"text-secondary-foreground/40 text-xs mt-1 block",children:l.date})]})]},c))})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold text-secondary-foreground uppercase tracking-widest mb-5 pb-3 border-b border-secondary-foreground/10",children:"Quick Links"}),r.jsx("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2",children:[{label:"Home",to:"/"},{label:"Articles",to:"/Articles"},{label:"Contributors",to:"/Authors"},{label:"Travel",to:"/Articles?category=Travel"},{label:"Fashion",to:"/Articles?category=Fashion%20%26%20Style"},{label:"Food & Drink",to:"/Articles?category=Lifestyle"},{label:"Entertainment",to:"/Articles?category=Entertainment"},{label:"Property",to:"/Articles?category=Property"},{label:"NLLA Awards",to:"/Articles?category=Business"},{label:"Advertise",to:"/advertise"},{label:"Subscribe",to:"/membership"},{label:"Contact Us",to:"/contact"}].map((l,c)=>r.jsxs(se,{to:l.to,className:"text-xs text-secondary-foreground/60 hover:text-primary transition-colors flex items-center gap-1 py-0.5",children:[r.jsx(_t,{className:"w-2.5 h-2.5 text-primary"}),l.label]},c))})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold text-secondary-foreground uppercase tracking-widest mb-5 pb-3 border-b border-secondary-foreground/10",children:"Newsletter"}),r.jsx("p",{className:"text-secondary-foreground/60 text-sm mb-4",children:"Get all latest content delivered straight to your inbox."}),n?r.jsx("p",{className:"text-primary text-sm font-bold",children:"Thank you for subscribing!"}):r.jsxs("form",{onSubmit:l=>{l.preventDefault(),e&&s(!0)},className:"space-y-2",children:[r.jsx(de,{type:"email",placeholder:"Your email address",value:e,onChange:l=>t(l.target.value),className:"bg-white/5 border-secondary-foreground/20 text-secondary-foreground placeholder:text-secondary-foreground/30 h-9 text-sm"}),r.jsx("button",{type:"submit",className:"w-full bg-primary text-primary-foreground text-xs font-bold py-2.5 uppercase tracking-widest hover:opacity-90 transition-opacity",children:"Subscribe"})]}),r.jsxs("div",{className:"mt-6",children:[r.jsx("h4",{className:"text-xs font-bold text-secondary-foreground uppercase tracking-widest mb-3",children:"Follow Us"}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx("a",{href:"https://x.com/chelseamonthly",target:"_blank",rel:"noopener noreferrer",className:"w-9 h-9 bg-secondary-foreground
764/10 hover:bg-primary flex items-center justify-center text-secondary-foreground/60 hover:text-primary-foreground rounded-sm transition-all duration-200",children:r.jsx(gd,{className:"w-4 h-4"})}),r.jsx("a",{href:"https://instagram.com/chelseamonthly",target:"_blank",rel:"noopener noreferrer",className:"w-9 h-9 bg-secondary-foreground/10 hover:bg-primary flex items-center justify-center text-secondary-foreground/60 hover:text-primary-foreground rounded-sm transition-all duration-200",children:r.jsx(uo,{className:"w-4 h-4"})}),r.jsx("a",{href:"https://facebook.com/chelseamonthly",target:"_blank",rel:"noopener noreferrer",className:"w-9 h-9 bg-secondary-foreground/10 hover:bg-primary flex items-center justify-center text-secondary-foreground/60 hover:text-primary-foreground rounded-sm transition-all duration-200",children:r.jsx(Mx,{className:"w-4 h-4"})})]})]})]})]})}),r.jsx("div",{className:"border-t border-secondary-foreground/10",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-5",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row items-center justify-between gap-3",children:[r.jsx("p",{className:"text-secondary-foreground/40 text-xs",children:"© 2011 Chelsea Monthly | Chelseamonthly.com. All rights reserved."}),r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(se,{to:"/terms",className:"text-xs text-secondary-foreground/40 hover:text-primary transition-colors",children:"Terms of Use"}),r.jsx(se,{to:"/faq",className:"text-xs text-secondary-foreground/40 hover:text-primary transition-colors",children:"FAQ"}),r.jsx(se,{to:"/advertise",className:"text-xs text-secondary-foreground/40 hover:text-primary transition-colors",children:"Advertise"}),r.jsx(se,{to:"/contact",className:"text-xs text-secondary-foreground/40 hover:text-primary transition-colors",children:"Contact Us"})]})]}),(o==null?void 0:o.role)==="admin"&&r.jsx("div",{className:"mt-3 pt-3 border-t border-secondary-foreground/10 flex justify-center",children:r.jsx(se,{to:"/admin/import",className:"text-xs text-secondary-foreground/30 hover:text-primary transition-colors flex items-center gap-1",children:"â Republic Worldwide Group (RWG)"})})]})})]})}function Ece(){return r.jsxs("div",{className:"bg-background text-foreground min-h-screen flex flex-col",children:[r.jsx(Ace,{}),r.jsx("main",{className:"flex-1",children:r.jsx(zJ,{})}),r.jsx(Tce,{})]})}const Pce=[/contact.?form/i,/newsletter.?sign/i,/subscribe.?form/i,/\[contact-form/i,/gravity.?form/i,/ninja.?form/i,/^404$/i,/^page.?not.?found$/i,/^sitemap/i,/^test.?page/i,/^sample.?page/i,/^hello.?world/i,/^privacy.?policy$/i,/^terms.?(of.?use|and.?conditions)?$/i,/^cookie.?policy$/i,/^disclaimer$/i,/^coming.?soon$/i];function f3(e){const t=(e.title||"").toLowerCase(),n=(e.content||"").toLowerCase();return!!(Pce.some(s=>s.test(t))||(n.match(/\[contact-form/g)||[]).length>0||!e.title&&!e.content)}async function Oce(e){const n=new DOMParser().parseFromString(e,"text/xml"),s=n.querySelector("parsererror");if(s)throw new Error("Invalid XML: "+s.textContent.slice(0,200));const a=(D,$)=>{const H=(D?Array.from(D.childNodes):[]).find(L=>L.nodeType===1&&L.localName===$);return H?(H.textContent||"").trim():""},i=(D,$)=>{var q,H;return((H=(q=D==null?void 0:D.querySelector($))==null?void 0:q.textContent)==null?void 0:H.trim())||""},o=n.querySelector("channel"),l=i(o,"title"),c=i(o,"link"),u=n.querySelectorAll("author"),m=[];u.forEach(D=>{m.push({wp_id:a(D,"author_id"),login:a(D,"author_login"),email:a(D,"author_email"),display_name:a(D,"author_display_name"),first_name:a(D,"author_first_name"),last_name:a(D,"author_last_name")})});const f=[],p=new Set;Array.from(o.childNodes).forEach(D=>{if(D.nodeType!==1||D.localName!=="category")return;const $=a(D,"category_nicename"),q=a(D,"cat_name"),H=a(D,"term_id"),L=a(D,"category_parent");if(H||$&&q){const F=$||q;F&&!p.has(F)&&(p.add(F),f.push({term_id:H,slug:$,parent:L,name:q}))}});const b=[],v=new Set;Array.from(o.childNodes).forEach(D=>{if(D.nodeType!==1||D.localName!=="tag")return;const $=a(D,"term_id"),q=a(D,"tag_slug"),H=a(D,"tag_name"),L=q||H;L&&!v.has(L)&&(v.add(L),b.push({term_id:$,slug:q,name:H}))});const g={},y=Array.from(n.querySelectorAll("item"));
764y.forEach(D=>{if(a(D,"post_type")==="attachment"){const q=a(D,"post_id"),H=a(D,"attachment_url");q&&H&&(g[q]=H)}});const w=Object.keys(g).length,N=[],S=[],A=[],k=[],C=[];let T=0,P=0;y.forEach(D=>{var Ne,Se;const $=a(D,"post_type"),q=a(D,"status"),H=i(D,"title"),L=i(D,"link"),F=a(D,"post_name"),Y=a(D,"post_date")||i(D,"pubDate"),U=a(D,"post_id"),re=((Se=(Ne=Array.from(D.childNodes).find(te=>te.nodeType===1&&te.localName==="creator"))==null?void 0:Ne.textContent)==null?void 0:Se.trim())||"";let G="",B="";if(Array.from(D.childNodes).forEach(te=>{te.nodeType===1&&te.localName==="encoded"&&(G?B||(B=te.textContent||""):G=te.textContent||"")}),!G){const te=D.querySelectorAll("encoded");te[0]&&(G=te[0].textContent||""),te[1]&&(B=te[1].textContent||"")}const z=[],he=[];D.querySelectorAll("category").forEach(te=>{const Oe=te.getAttribute("domain"),ye=te.getAttribute("nicename"),Ee=te.textContent.trim();Oe==="category"&&z.push({name:Ee,slug:ye}),Oe==="post_tag"&&he.push({name:Ee,slug:ye})});let fe="",be="";D.querySelectorAll("postmeta").forEach(te=>{const Oe=a(te,"meta_key"),ye=a(te,"meta_value");(Oe==="_thumbnail_id"||Oe==="thumbnail_id")&&(fe=ye)}),fe&&g[fe]&&(be=g[fe]);let xe="",pe="",Ae="";D.querySelectorAll("postmeta").forEach(te=>{const Oe=a(te,"meta_key"),ye=a(te,"meta_value");["_yoast_wpseo_title","rank_math_title","_aioseop_title"].includes(Oe)&&(xe=ye),["_yoast_wpseo_metadesc","rank_math_description","_aioseop_description"].includes(Oe)&&(pe=ye),["_yoast_wpseo_canonical","rank_math_canonical_url"].includes(Oe)&&(Ae=ye)});const ie={wp_id:U,title:H,slug:F,link:L,pub_date:Y,author_login:re,content:G,excerpt:B,status:q,categories:z,tags:he,featured_image_id:fe,featured_image_url:be,seo_title:xe,seo_description:pe,canonical_url:Ae,post_type:$};$==="attachment"?k.push({wp_id:U,title:H,slug:F,link:L,pub_date:Y,attachment_url:a(D,"attachment_url"),post_type:"attachment"}):$==="page"?f3(ie)?S.push(ie):A.push(ie):$==="post"||$===""||!$?f3(ie)?S.push(ie):(be?T++:fe&&P++,N.push(ie)):(be?T++:fe&&P++,N.push({...ie,custom_post_type:$}))});const R=new Set(m.map(D=>D.login));let M=0;return N.forEach(D=>{var $;D.author_login&&!R.has(D.author_login)&&M<10&&(C.push(`Post "${($=D.title)==null?void 0:$.slice(0,40)}" references unknown author: ${D.author_login}`),M++)}),{fileType:"wordpress_xml",siteTitle:l,siteUrl:c,authors:m,categories:f,tags:b,posts:N,pages:A,junkPosts:S,media:k,mediaLookup:g,warnings:C,totalItems:N.length+A.length+k.length,totalMediaInXML:w,totalMediaResolved:T,totalMediaUnresolved:P}}function Mce(e,t=""){const n=e.split(/\r?\n/).filter(m=>m.trim());if(n.length===0)throw new Error("CSV file is empty");const s=m=>{const f=[];let p="",b=!1;for(let v=0;v<m.length;v++){const g=m[v];g==='"'?b&&m[v+1]==='"'?(p+='"',v++):b=!b:g===","&&!b?(f.push(p.trim()),p=""):p+=g}return f.push(p.trim()),f},a=s(n[0]),i=[],o=[];for(let m=1;m<n.length;m++){const f=s(n[m]);f.length!==a.length&&o.push(`Row ${m+1}: expected ${a.length} columns, got ${f.length}`);const p={};a.forEach((b,v)=>{p[b]=f[v]||""}),i.push(p)}const l=t.toLowerCase();let c="generic";l.includes("author")?c="authors":l.includes("categor")?c="categories":l.includes("tag")?c="tags":l.includes("media")?c="media":(l.includes("article")||l.includes("post"))&&(c="articles");const u=new Set(a.map(m=>m.toLowerCase()));return u.has("post_content")||u.has("post_title")?c="articles":(u.has("author_login")||u.has("display_name"))&&(c="authors"),{fileType:"csv",csvType:c,headers:a,rows:i,authors:[],categories:[],tags:[],warnings:o,totalItems:i.length}}function Rce(e){const t=e.seo_title||e.title||"",n=(e.excerpt||"").replace(/<[^>]*>/g,"").slice(0,155),s=e.seo_description||n||`${e.title} - Chelsea Monthly. Read the full story on Chelsea Monthly, London's leading luxury lifestyle publication.`;
764return{seo_title:t.slice(0,70),seo_description:s.slice(0,160)}}function Ice(e){if(!e)return"1 min read";const t=e.replace(/<[^>]*>/g,"").split(/\s+/).filter(Boolean).length;return Math.max(1,Math.round(t/200))+" min read"}const Dce=[{ext:".xml",label:"WordPress XML Export",icon:_G,color:"blue",desc:"Full WordPress export with posts, pages, authors, categories, tags and media"},{ext:".csv",label:"CSV File",icon:kG,color:"green",desc:"Articles, Authors, Categories, Tags, Media or any custom CSV dataset"}];function Lce(e){const t=e.name.toLowerCase();return t.endsWith(".xml")?"wordpress_xml":t.endsWith(".csv")?"csv":"unknown"}function Gp(e){return e<1024?e+" B":e<1024*1024?(e/1024).toFixed(1)+" KB":(e/(1024*1024)).toFixed(2)+" MB"}function $ce({onParsed:e}){var w,N,S,A,k,C;const[t,n]=j.useState(null),[s,a]=j.useState(null),[i,o]=j.useState("idle"),[l,c]=j.useState(null),[u,m]=j.useState(!1),[f,p]=j.useState(null),b=j.useRef(null),v=async T=>{n(T),c(null),o("parsing");const P=Lce(T);if(a(P),P==="unknown"){o("error"),c("Unsupported file type. Please upload a WordPress XML (.xml) or CSV (.csv) file.");return}try{const R=await T.text();let M;P==="wordpress_xml"?M=await Oce(R):M=Mce(R,T.name),M.sourceFile=T.name,M.fileType=P,M.fileSize=T.size,p(M),o("success")}catch(R){o("error"),c("Failed to parse file: "+R.message)}},g=T=>{T.preventDefault(),m(!1);const P=T.dataTransfer.files[0];P&&v(P)},y=()=>{n(null),a(null),o("idle"),c(null),p(null),b.current&&(b.current.value="")};return r.jsxs("div",{className:"space-y-6",children:[r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:Dce.map(T=>{const P=T.icon;return r.jsxs("div",{className:`bg-white rounded-xl border-2 border-${T.color}-100 p-5 flex items-start gap-4`,children:[r.jsx("div",{className:`w-10 h-10 bg-${T.color}-100 rounded-lg flex items-center justify-center shrink-0`,children:r.jsx(P,{className:`w-5 h-5 text-${T.color}-600`})}),r.jsxs("div",{children:[r.jsx("div",{className:"font-semibold text-gray-800 text-sm",children:T.label}),r.jsx("div",{className:"text-gray-500 text-xs mt-1",children:T.desc}),r.jsx("span",{className:`inline-block mt-2 bg-${T.color}-100 text-${T.color}-700 text-xs font-bold px-2 py-0.5 rounded`,children:T.ext})]})]},T.ext)})}),i==="idle"&&r.jsxs("div",{onDragOver:T=>{T.preventDefault(),m(!0)},onDragLeave:()=>m(!1),onDrop:g,onClick:()=>{var T;return(T=b.current)==null?void 0:T.click()},className:`bg-white border-2 border-dashed rounded-xl p-16 flex flex-col items-center justify-center cursor-pointer transition-all duration-200 765 ${u?"border-amber-400 bg-amber-50":"border-gray-300 hover:border-amber-400 hover:bg-amber-50/30"}`,children:[r.jsx("div",{className:`w-16 h-16 rounded-full flex items-center justify-center mb-4 transition-colors ${u?"bg-amber-100":"bg-gray-100"}`,children:r.jsx(Jm,{className:`w-8 h-8 ${u?"text-amber-600":"text-gray-400"}`})}),r.jsx("p",{className:"text-lg font-semibold text-gray-700 mb-1",children:"Drag and drop your file here"}),r.jsx("p",{className:"text-gray-400 text-sm mb-4",children:"or click to browse files"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"bg-gray-100 text-gray-600 text-xs px-2 py-1 rounded font-mono",children:".xml"}),r.jsx("span",{className:"bg-gray-100 text-gray-600 text-xs px-2 py-1 rounded font-mono",children:".csv"})]}),r.jsx("input",{ref:b,type:"file",accept:".xml,.csv",className:"hidden",onChange:T=>T.target.files[0]&&v(T.target.files[0])})]}),i==="parsing"&&r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-10 text-center",children:[r.jsx(va,{className:"w-10 h-10 text-amber-500 animate-spin mx-auto mb-4"}),r.jsxs("p",{className:"font-semibold text-gray-800 text-lg",children:["Parsing ",s==="wordpress_xml"?"WordPress XML":"CSV"," file..."]}),r.jsxs("p",{className:"text-gray-500 text-sm mt-1",children:["Analysing ",t==null?void 0:t.name," (",Gp((t==null?void 0:t.size)||0),")"]})]}),i==="error"&&r.jsxs("div",{className:"bg-white rounded-xl border-2 border-red-200 p-8",children:[r.jsxs("div",{className:"flex items-start gap-4",children:[r.jsx("div",{className:"w-10 h-10 bg-red-100 rounded-lg flex items-center justify-center shrink-0",children:r.jsx(Ln,{className:"w-5 h-5 text-red-600"})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h3",{className:"font-bold text-red-800 mb
765-1",children:"Parse Error"}),r.jsx("p",{className:"text-red-600 text-sm",children:l}),t&&r.jsxs("p",{className:"text-gray-500 text-xs mt-2",children:["File: ",t.name," (",Gp(t.size),")"]})]}),r.jsx("button",{onClick:y,className:"text-gray-400 hover:text-gray-600 transition-colors",children:r.jsx(ni,{className:"w-5 h-5"})})]}),r.jsx("button",{onClick:y,className:"mt-4 px-5 py-2 bg-gray-900 text-white rounded-lg text-sm font-semibold hover:bg-gray-800 transition-colors",children:"Try Another File"})]}),i==="success"&&f&&r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"bg-green-50 border-2 border-green-400 rounded-xl p-6 flex items-center gap-4",children:[r.jsx(qt,{className:"w-8 h-8 text-green-600 shrink-0"}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-bold text-green-800 text-lg",children:"â File Uploaded Successfully"}),r.jsxs("p",{className:"text-green-700 text-sm mt-1",children:[t.name," (",Gp(t.size),") â Ready to proceed"]})]})]}),r.jsxs("div",{className:"bg-white rounded-xl border-2 border-green-200 overflow-hidden",children:[r.jsxs("div",{className:"bg-green-50 border-b border-green-100 p-5 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(qt,{className:"w-6 h-6 text-green-600"}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-bold text-green-800",children:"File parsed successfully"}),r.jsxs("p",{className:"text-green-600 text-sm",children:[t.name," â ",Gp(t.size)]})]})]}),r.jsx("button",{onClick:y,className:"text-gray-400 hover:text-gray-600 transition-colors",children:r.jsx(ni,{className:"w-5 h-5"})})]}),r.jsxs("div",{className:"p-6",children:[r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[{label:"Posts / Rows",value:((w=f.posts)==null?void 0:w.length)||((N=f.rows)==null?void 0:N.length)||0},{label:"Authors",value:((S=f.authors)==null?void 0:S.length)||0},{label:"Categories",value:((A=f.categories)==null?void 0:A.length)||0},{label:"Tags",value:((k=f.tags)==null?void 0:k.length)||0}].map((T,P)=>r.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 text-center",children:[r.jsx("div",{className:"text-2xl font-bold text-gray-900",children:T.value}),r.jsx("div",{className:"text-gray-500 text-xs mt-1 uppercase tracking-wide",children:T.label})]},P))}),f.fileType==="wordpress_xml"&&f.siteTitle&&r.jsxs("div",{className:"bg-blue-50 rounded-lg p-4 mb-4 text-sm",children:[r.jsx("span",{className:"font-semibold text-blue-800",children:"WordPress Site: "}),r.jsx("span",{className:"text-blue-700",children:f.siteTitle}),f.siteUrl&&r.jsxs("span",{className:"text-blue-500 ml-2",children:["(",f.siteUrl,")"]})]}),f.fileType==="csv"&&f.headers&&r.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 mb-4",children:[r.jsxs("p",{className:"text-xs font-bold text-gray-500 uppercase tracking-wide mb-2",children:["Detected Columns (",f.headers.length,")"]}),r.jsx("div",{className:"flex flex-wrap gap-2",children:f.headers.map((T,P)=>r.jsx("span",{className:"bg-white border border-gray-200 text-gray-700 text-xs px-2 py-1 rounded font-mono",children:T},P))})]}),((C=f.warnings)==null?void 0:C.length)>0&&r.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-lg p-4 mb-4",children:[r.jsxs("p",{className:"text-xs font-bold text-amber-700 uppercase tracking-wide mb-2 flex items-center gap-1",children:[r.jsx(Ln,{className:"w-3 h-3"})," ",f.warnings.length," Warnings"]}),r.jsxs("ul",{className:"space-y-1",children:[f.warnings.slice(0,5).map((T,P)=>r.jsx("li",{className:"text-amber-700 text-xs",children:T},P)),f.warnings.length>5&&r.jsxs("li",{className:"text-amber-500 text-xs",children:["...and ",f.warnings.length-5," more"]})]})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsx("button",{onClick:()=>e(f),className:"flex-1 bg-amber-500 text-white py-3 rounded-lg font-bold text-sm hover:bg-amber-600 transition-colors",children:"Continue to Preview â"}),r.jsx("button",{onClick:y,className:"px-5 py-3 bg-gray-100 text-gray-700 rounded-lg font-semibold text-sm hover:bg-gray-200 transition-colors",children:"Upload Different File"})]})]})]})]})]})}function fn({label:e,value:t,color:n="blue",note:s,warn:a}){const i={blue:"bg-blue-50 border-blue-200 text-blue-700",green:"bg-green-50 border-green-200 text-green-700",amber:"bg-amber-50 border-amber-200 text-amber-700",red:"bg-red-50 border-red-200 text-red-700",purple:"bg-purple-50 border-purple-200 text-purple-700",gray:"bg-gray-50 border-gray-200 text-gray-700"};return r.jsxs("div",{className:`rounded-xl border-2 p-4 ${i[n]} ${a?"ring-2 ring-red-400":""}`,children:[r.jsx("div",{className:"text-2xl font-bold",children:typeof t=="number"?t.toLocaleStr
765ing():t}),r.jsx("div",{className:"text-sm font-semibold mt-0.5 opacity-90",children:e}),s&&r.jsx("div",{className:"text-xs opacity-60 mt-1",children:s}),a&&r.jsxs("div",{className:"text-xs text-red-600 font-bold mt-1",children:["â ",a]})]})}function dj({title:e,items:t,color:n="amber",showAll:s=!1}){var m;const[a,i]=j.useState(!1),o={amber:"bg-amber-500",blue:"bg-blue-500",green:"bg-green-500",purple:"bg-purple-500",red:"bg-red-400"};if(!t||t.length===0)return r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5 text-center text-gray-400 text-sm",children:[e," â none found"]});const l=((m=t[0])==null?void 0:m.count)||1,c=s||a?50:20,u=t.slice(0,c);return r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-5 py-3 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(JL,{className:"w-4 h-4 text-gray-500"}),r.jsx("span",{className:"font-bold text-gray-900 text-sm",children:e}),r.jsx("span",{className:"bg-gray-200 text-gray-600 text-xs px-2 py-0.5 rounded-full font-bold",children:t.length})]}),t.length>20&&!s&&r.jsx("button",{onClick:()=>i(f=>!f),className:"text-xs text-amber-600 font-bold flex items-center gap-1",children:a?r.jsxs(r.Fragment,{children:[r.jsx(dy,{className:"w-3 h-3"})," Show less"]}):r.jsxs(r.Fragment,{children:[r.jsx(Sa,{className:"w-3 h-3"})," Show top 50"]})})]}),r.jsx("div",{className:"divide-y divide-gray-50 max-h-96 overflow-y-auto",children:u.map((f,p)=>r.jsxs("div",{className:"flex items-center gap-3 px-5 py-2",children:[r.jsx("span",{className:"text-xs font-bold text-gray-400 w-6 text-right shrink-0",children:p+1}),r.jsx("span",{className:"text-sm text-gray-800 flex-1 truncate",children:f.name||r.jsx("span",{className:"text-gray-300 italic",children:"âemptyâ"})}),f.note&&r.jsx("span",{className:"text-xs text-amber-600 font-semibold shrink-0",children:f.note}),r.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[r.jsx("div",{className:"w-20 bg-gray-100 rounded-full h-1.5",children:r.jsx("div",{className:`${o[n]} h-1.5 rounded-full`,style:{width:`${Math.round(f.count/l*100)}%`}})}),r.jsx("span",{className:"text-xs font-bold text-gray-600 w-6 text-right",children:f.count})]})]},p))})]})}function uj({title:e,items:t,emptyMsg:n,color:s="gray"}){const a={red:"border-red-200 bg-red-50",amber:"border-amber-200 bg-amber-50",gray:"border-gray-200 bg-gray-50"};return!t||t.length===0?null:r.jsxs("div",{className:`rounded-xl border p-4 ${a[s]}`,children:[r.jsxs("div",{className:"font-bold text-sm text-gray-800 mb-2",children:[e," ",r.jsxs("span",{className:"font-normal text-gray-500",children:["(",t.length,")"]})]}),r.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[t.slice(0,60).map((i,o)=>r.jsx("span",{className:"bg-white border border-gray-200 text-gray-700 text-xs px-2 py-0.5 rounded font-mono",children:i||"â"},o)),t.length>60&&r.jsxs("span",{className:"text-xs text-gray-400 self-center",children:["â¦and ",t.length-60," more"]})]})]})}function Fce({data:e,onContinue:t,onBack:n}){const s=e.fileType==="wordpress_xml",a=j.useMemo(()=>{if(!s)return null;const o=e.posts||[],l=e.junkPosts||[],c=e.pages||[],u=e.media||[],m=e.authors||[],f=e.categories||[],p=e.tags||[],b={},v={},g={};o.forEach(F=>{(F.categories||[]).forEach(Y=>{Y.name&&(b[Y.name]=(b[Y.name]||0)+1)}),(F.tags||[]).forEach(Y=>{Y.name&&(v[Y.name]=(v[Y.name]||0)+1)})}),[...o,...c].forEach(F=>{(F.categories||[]).forEach(Y=>{const U=Y.domain||"category";g[U]=(g[U]||0)+1})});const y=Object.entries(b).map(([F,Y])=>({name:F,count:Y})).sort((F,Y)=>Y.count-F.count),w=Object.entries(v).map(([F,Y])=>({name:F,count:Y})).sort((F,Y)=>Y.count-F.count),N=new Set(f.map(F=>F.name).filter(Boolean));new Set(p.map(F=>F.name).filter(Boolean));const S=y.filter(F=>!N.has(F.name)),A=f.filter(F=>!b[F.name]),k=p.filter(F=>!v[F.name]),C=f.filter(F=>b[F.name]===1),T={};o.forEach(F=>{const Y=F.author_login||"Unknown";T[Y]=(T[Y]||0)+1});const P=Object.entries(T).map(([F,Y])=>({name:F,count:Y})).sort((F,Y)=>
765Y.count-F.count),R=o.map(F=>new Date(F.pub_date)).filter(F=>!isNaN(F)).sort((F,Y)=>F-Y),M=F=>F?F.toLocaleDateString("en-GB",{day:"numeric",month:"long",year:"numeric"}):"â",D=o.filter(F=>F.status==="publish").length,$=o.filter(F=>F.status==="draft").length,q=o.filter(F=>F.status!=="publish"&&F.status!=="draft"),H=[];return f.length>500&&H.push(`Registry has ${f.length} category entries â unexpectedly high. Per-post <category> elements may still be leaking into the registry.`),S.length>10&&H.push(`${S.length} category names used in posts are not in the channel registry â possible custom taxonomy leakage.`),Object.entries(g).filter(([F])=>F!=="category"&&F!=="post_tag").forEach(([F,Y])=>H.push(`Custom taxonomy domain "${F}" appears on ${Y} post assignments â not imported as categories or tags.`)),A.length>f.length*.5&&A.length>5&&H.push(`${A.length} of ${f.length} registry categories have 0 articles â possible orphaned taxonomy terms.`),{totalArticles:o.length,totalPages:c.length,totalMedia:u.length,totalAuthors:m.length,totalMediaResolved:e.totalMediaResolved||0,totalMediaUnresolved:e.totalMediaUnresolved||0,totalJunk:l.length,published:D,drafts:$,otherStatus:q,registryCategoryCount:f.length,registryTagCount:p.length,uniqueCatsUsed:y.length,uniqueTagsUsed:w.length,topCategories:y,topTags:w,topAuthors:P,zeroCats:A,zeroTags:k,singleArticleCats:C,unregisteredCats:S,allPostCatDomains:g,parsingIssues:H,earliest:M(R[0]),latest:M(R[R.length-1]),junkTitles:l.slice(0,10).map(F=>F.title)}},[e,s]);if(!s||!a)return r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-8 text-center text-gray-500",children:["XML Analysis is only available for WordPress XML imports.",r.jsxs("div",{className:"mt-4 flex justify-center gap-3",children:[r.jsx("button",{onClick:n,className:"px-5 py-2 bg-gray-100 text-gray-700 rounded-lg font-semibold text-sm hover:bg-gray-200",children:"Back"}),r.jsx("button",{onClick:t,className:"px-5 py-2 bg-amber-500 text-white rounded-lg font-semibold text-sm hover:bg-amber-600",children:"Continue"})]})]});const i=a.registryCategoryCount>500;return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5 flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-1",children:"XML Taxonomy Audit & Analysis Report"}),r.jsxs("p",{className:"text-gray-500 text-sm",children:["Full diagnostic of ",r.jsx("strong",{children:e.sourceFile})," â verify taxonomy mapping before import."]}),e.siteTitle&&r.jsxs("p",{className:"text-gray-400 text-xs mt-1",children:["WordPress site: ",e.siteTitle," ",e.siteUrl&&`· ${e.siteUrl}`]})]}),r.jsx("span",{className:"bg-blue-100 text-blue-700 text-xs font-bold px-3 py-1.5 rounded-full shrink-0",children:"WordPress XML"})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest mb-3",children:"Actual Importable Record Counts"}),r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3",children:[r.jsx(fn,{label:"Articles",value:a.totalArticles,color:"blue",note:"Valid posts (junk excluded)"}),r.jsx(fn,{label:"Pages",value:a.totalPages,color:"purple",note:"WP pages"}),r.jsx(fn,{label:"Media Attachments",value:a.totalMedia,color:"gray",note:"wp:attachment items"}),r.jsx(fn,{label:"Authors",value:a.totalAuthors,color:"green",note:"wp:author entries"}),r.jsx(fn,{label:"Categories (Registry)",value:a.registryCategoryCount,color:"amber",note:"Unique wp:category terms in channel",warn:i?"Suspiciously high â check for per-post leakage":void 0}),r.jsx(fn,{label:"Tags (Registry)",value:a.registryTagCount,color:"amber",note:"Unique wp:tag terms in channel"})]})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest mb-3",children:"Taxonomy Usage (Derived from Article Assignments)"}),r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-3",children:[r.jsx(fn,{label:"Unique Categories Used",value:a.uniqueCatsUsed,color:"amber",note:"Distinct category names across all posts"}),r.jsx(fn,{label:"Unique Tags Used",value:a.uniqueTagsUsed,color:"green",note:"Distinct tag names across all posts"}),r.jsx(fn,{label:"Zero-Article Categories",value:a.zeroCats.length,color:a.zeroCats.length>5?"red":"gray",note:"In registry but no posts"}),r.jsx(fn,{label:"Single-Article Categories",value:a.singleArticleCats.length,color:"gray",note:"Only 1 post assigned"})]}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[r.jsx(fn,{label:"Images Resolved",value:a.totalMediaResolved,color:"green",note:"Featured image URL extracted"}),r.jsx(fn,{label:"Images Unresolved",value:a.totalMediaUnresolved,color:a.totalMediaUnresolved>100?"red":"amber",note:"Attachment ID stored, no URL found"})]})]}),a.parsingIssues.length>0&&r.jsxs("div",{className:"bg-red-50 border-2 border-red-200 rounded-xl p-5 space-y-2",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx(da,{className:"w-5 h-5 text-red-500"}),r.jsx("span",{className:"font-bold text-red-800",children:"Potential Parsing Issues Detected"})]}),a.parsingIssues.map((o,l)=>r.jsxs("div",{className:"flex items-start gap-2 text-sm text-red-700",children:[r.jsx("span",{className:"shrink-0 font-bold",children:"â¢"}),r.jsx("span",{children:o})]},l))]}),Object.keys(a.allPostCatDomains).filter(o=>o!=="category"&&o!=="post_tag").length>0&&r.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-5",children:[r.jsxs("div",{className:"font-bold text-amber-800 text-sm mb-2 flex items-center gap-2",children:[r.jsx(Ih,{className:"w-4 h-4"})," Custom Taxonomy Domains Found (not imported as categories or tags)"]}),r.jsx("div",{className:"flex flex-wrap gap-2",children:Object.entries(a.allPostCatDomains).filter(([o])=>o!=="category"&&o!=="post_tag").map(([o,l])=>r.jsxs("span",{className:"bg-white border border-amber-300 text-amber-800 text-xs px-3 py-1 rounded-full font-mono",children:[o," ",r.jsxs("strong",{children:["(",l," assignments)"]})]},o))}),r.jsx("p",{className:"text-amber-700 text-xs mt-2",children:"These taxonomy assignments exist in y
765our XML but will not be mapped to any article field during import."})]}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:[r.jsx(fn,{label:"Published Articles",value:a.published,color:"green"}),r.jsx(fn,{label:"Draft Articles",value:a.drafts,color:"amber"}),r.jsx(fn,{label:"Junk Excluded",value:a.totalJunk,color:"red",note:"Forms, system pages, etc."})]}),r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[r.jsx(Jt,{className:"w-4 h-4 text-gray-500"}),r.jsx("h3",{className:"font-bold text-gray-900 text-sm",children:"Date Range of Content"})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[r.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[r.jsx("div",{className:"text-xs text-gray-400 uppercase tracking-wide font-bold mb-1",children:"Earliest Article"}),r.jsx("div",{className:"text-lg font-bold text-gray-800",children:a.earliest})]}),r.jsxs("div",{className:"bg-gray-50 rounded-lg p-4",children:[r.jsx("div",{className:"text-xs text-gray-400 uppercase tracking-wide font-bold mb-1",children:"Latest Article"}),r.jsx("div",{className:"text-lg font-bold text-gray-800",children:a.latest})]})]})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest mb-3",children:"Top 50 Categories by Article Count"}),r.jsx(dj,{title:"Categories (by article count)",items:a.topCategories,color:"amber",showAll:!0})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest mb-3",children:"Top 50 Tags by Article Count"}),r.jsx(dj,{title:"Tags (by article count)",items:a.topTags,color:"green",showAll:!0})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest mb-3",children:"Authors by Article Count"}),r.jsx(dj,{title:"Authors",items:a.topAuthors,color:"blue"})]}),r.jsx(uj,{title:"Categories with 0 Articles (orphaned registry terms)",items:a.zeroCats.map(o=>o.name),color:"red"}),r.jsx(uj,{title:"Categories with only 1 Article",items:a.singleArticleCats.map(o=>`${o.name} (1)`),color:"amber"}),r.jsx(uj,{title:"Tags with 0 Articles (orphaned registry terms)",items:a.zeroTags.map(o=>o.name),color:"amber"}),a.unregisteredCats.length>0&&r.jsxs("div",{className:"bg-white rounded-xl border-2 border-orange-200 p-5",children:[r.jsxs("div",{className:"font-bold text-orange-800 text-sm mb-1 flex items-center gap-2",children:[r.jsx(da,{className:"w-4 h-4"}),a.unregisteredCats.length," Category Names Used in Posts But NOT in Channel Registry"]}),r.jsxs("p",{className:"text-orange-600 text-xs mb-3",children:["These names appear in post assignments but have no matching ",r.jsx("code",{className:"bg-orange-50 px-1 rounded",children:"wp:category"})," term in the channel header. They may be custom taxonomies, or the registry was incomplete."]}),r.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[a.unregisteredCats.slice(0,50).map((o,l)=>r.jsxs("span",{className:"bg-orange-50 border border-orange-200 text-orange-800 text-xs px-2 py-0.5 rounded font-mono",children:[o.name," (",o.count,")"]},l)),a.unregisteredCats.length>50&&r.jsxs("span",{className:"text-xs text-gray-400 self-center",children:["â¦and ",a.unregisteredCats.length-50," more"]})]})]}),a.totalJunk>0&&r.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4 flex items-start gap-3",children:[r.jsx(da,{className:"w-4 h-4 text-red-500 shrink-0 mt-0.5"}),r.jsxs("div",{className:"text-sm",children:[r.jsxs("span",{className:"font-bold text-red-700",children:[a.totalJunk," junk records auto-excluded: "]}),r.jsxs("span",{className:"text-red-500",children:[a.junkTitles.join(", "),a.totalJunk>10?` â¦and ${a.totalJunk-10} more`:""]})]})]}),!i&&a.parsingIssues.length===0&&r.jsxs("div",{className:"bg-green-50 border border-green-300 rounded-xl p-4 flex items-center gap-3",children:[r.jsx(qt,{className:"w-5 h-5 text-green-600 shrink-0"}),r.jsxs("span",{className:"text-green-800 font-semibold text-sm",children:["Taxonomy audit passed. ",a.totalArticles.toLocaleStr
765ing()," articles · ",a.registryCategoryCount," registry categories · ",a.uniqueCatsUsed," categories in use · ",a.registryTagCount," registry tags ready for import."]})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-6 py-3 bg-gray-100 text-gray-700 rounded-lg font-semibold text-sm hover:bg-gray-200 transition-colors",children:[r.jsx(Ct,{className:"w-4 h-4"})," Back"]}),r.jsxs("button",{onClick:t,className:"flex-1 flex items-center justify-center gap-2 bg-amber-500 text-white py-3 rounded-lg font-bold text-sm hover:bg-amber-600 transition-colors",children:["Taxonomy looks correct â Continue to Preview ",r.jsx(_t,{className:"w-4 h-4"})]})]})]})}function Bce({icon:e,label:t,value:n,color:s="gray"}){const a={blue:"bg-blue-50 text-blue-600 border-blue-200",green:"bg-green-50 text-green-600 border-green-200",amber:"bg-amber-50 text-amber-600 border-amber-200",purple:"bg-purple-50 text-purple-600 border-purple-200",red:"bg-red-50 text-red-600 border-red-200",gray:"bg-gray-50 text-gray-600 border-gray-200"};return r.jsxs("div",{className:`rounded-xl border-2 p-5 ${a[s]}`,children:[r.jsx(e,{className:"w-5 h-5 mb-2"}),r.jsx("div",{className:"text-3xl font-bold",children:n}),r.jsx("div",{className:"text-sm font-medium mt-0.5 opacity-80",children:t})]})}function Go({title:e,items:t=[],fields:n=[],color:s="gray"}){const[a,i]=j.useState(!1);if(!t||t.length===0)return null;const o=a?t.slice(0,20):t.slice(0,3);return r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsxs("button",{onClick:()=>i(!a),className:"w-full flex items-center justify-between p-5 hover:bg-gray-50 transition-colors",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:`w-2 h-8 rounded-full bg-${s}-400`}),r.jsxs("div",{className:"text-left",children:[r.jsx("div",{className:"font-bold text-gray-900",children:e}),r.jsxs("div",{className:"text-gray-500 text-sm",children:[t.length," records found"]})]})]}),a?r.jsx(dy,{className:"w-4 h-4 text-gray-400"}):r.jsx(Sa,{className:"w-4 h-4 text-gray-400"})]}),a&&r.jsxs("div",{className:"border-t border-gray-100 overflow-x-auto",children:[r.jsxs("table",{className:"w-full text-sm",children:[r.jsx("thead",{children:r.jsx("tr",{className:"bg-gray-50",children:n.map(l=>r.jsx("th",{className:"px-4 py-2 text-left text-xs font-bold text-gray-500 uppercase tracking-wide whitespace-nowrap",children:l.label},l.key))})}),r.jsx("tbody",{children:o.map((l,c)=>r.jsx("tr",{className:c%2===0?"bg-white":"bg-gray-50/50",children:n.map(u=>r.jsx("td",{className:"px-4 py-2 text-gray-700 max-w-xs truncate text-xs",children:typeof u.render=="function"?u.render(l):l[u.key]||r.jsx("span",{className:"text-gray-300 italic",children:"â"})},u.key))},c))})]}),t.length>20&&a&&r.jsxs("div",{className:"px-4 py-3 bg-gray-50 text-gray-500 text-xs border-t border-gray-100",children:["Showing 20 of ",t.length," records"]})]})]})}function qce({data:e,onNext:t,onBack:n}){var m,f,p,b,v,g,y,w,N,S,A,k,C;const s=e.fileType==="wordpress_xml",a=s?[{icon:Rn,label:"Valid Posts",value:((m=e.posts)==null?void 0:m.length)||0,color:"blue"},{icon:TG,label:"Pages",value:((f=e.pages)==null?void 0:f.length)||0,color:"purple"},{icon:vt,label:"Authors",value:((p=e.authors)==null?void 0:p.length)||0,color:"green"},{icon:Ih,label:"Categories",value:((b=e.categories)==null?void 0:b.length)||0,color:"amber"},{icon:Xm,label:"Media Items",value:((v=e.media)==null?void 0:v.length)||0,color:"gray"},{icon:Ih,label:"Junk Excluded",value:((g=e.junkPosts)==null?void 0:g.length)||0,color:"red"}]:[{icon:Rn,label:"Rows",value:((y=e.rows)==null?void 0:y.length)||0,color:"blue"},{icon:Ih,label:"Columns",value:((w=e.headers)==null?void 0:w.length)||0,color:"green"}],i=[];s&&(e.posts||[]).forEach(T=>{var P;T.title||i.push({type:"error",msg:`Post wp_id=${T.wp_id} has no title`}),T.author_login||i.push({type:"warning",msg:`Post "${(P=T.title)==null?void 0:P.slice(0,40)}" has no author`})}),(e.warnings||[]).forEach(T=>i.push({type:"warning",msg:T}));const o=s?e.posts||[]:[],l=o.filter(T=>T.status==="publish"),c=o.filter(T=>T.status==="draft"),u=o.filter(T=>T.seo_title||T.seo_description).length;return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5 flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("div",{className:"font-bold text-gray-900",children:e.sourceFile}),s&&e.siteTitle&&r.jsxs("div",{className:"text-gray-500 text-sm mt-0.5",children:[r.jsx("span",{className:"font-medium",children:"WordPress Site:"})," ",e.siteTitle,e.siteUrl&&r.jsx("span",{className:"text-gray-400 ml-2",children:e.siteUrl})]}),!s&&r.jsxs("div",{className:"text-gray-500 text-sm mt-0.5",children:["CSV file · ",(N=e.headers)==null?void 0:N.length," columns · ",(S=e.rows)==null?void 0:S.length," rows"]})]}),r.jsx("span",{className:`px-3 py-1 rounded-full text-xs font-bold ${s?"bg-blue-100 text-blue-700":"bg-green-100 text-green-700"}`,children:s?"WordPress XML":"CSV"})]}),r.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-4",children:a.map((T,P)=>r.jsx(Bce,{...T},P))}),s&&(((A=e.junkPosts)==null?void 0:A.length)||0)>0&&r.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4 text-sm",children:[r.jsxs("span",{className:"font-bold text-red-700",children:["â ",e.junkPosts.length," junk/form posts automatically excluded"]}),r.jsx("span",{className:"text-red-500 ml-2",children:"â Contact forms, newsletter forms and system pages are not imported as articles."}),r.jsxs("div",{className:"mt-2 text-xs text-red-400",children:[e.junkPosts.slice(0,5).map(T=>T.title).join(", "),e.junkPosts.length>5?` ...and ${e.junkPosts.length-5} more`:""]})]}),s&&(e.totalMediaResolved>0||e.totalMediaUnresolved>0)&&r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4 text-sm",children:[r.jsx("span",{className:"font-bold text-blue-700",children:"Image URL Resolution: "}),r.jsxs("span",{className:"text-blue-600",children:[e.totalMediaResolved," featured images resolved to full URLs"]}),e.totalMediaUnresolved>0&&r.jsxs("span",{className:"text-amber-600 ml-2",children:["· ",e.totalMediaUnresolved," could not be resolved (attachment ID stored separately, image_url left empty)"]})]}),s&&(l.length>0||c.length>0)&&r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[r.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-xl p-4 text-center",children:[r.jsx("div",{className:"text-2xl font-bold text-green-700",children:l.length}),r.jsx("div",{className:"text-green-600 text-sm font-medium",children:"Published Posts"}),r.jsx("div",{className:"text-green-500 text-xs mt-1",children:"Will be published on import"})]}),r.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 text-center",children:[r.jsx("div",{className:"text-2xl font-bold text-amber-700",children:c.length}),r.jsx("div",{className:"text-amber-600 text-sm font-medium",children:"Draft Posts"}),r.jsx("div",{className:"text-amber-500 text-xs mt-1",children:"Will remain as drafts"})]}),r.jsxs("div",{className:"bg-purple-50 border border-purple-200 rounded-xl p-4 text-center",children:[r.jsx("div",{className:"text-2xl font-bold text-purple-700",children:u}),r.jsx("div",{className:"text-purple-600 text-sm font-medium",children:"With SEO Metadata"}),r.jsx("div",{className:"text-purple-500 text-xs mt-1",children:"SEO data will be preserved"})]})]}),i.length>0&&r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsxs("div",{className:"p-5 border-b border-gray-100 flex items-center gap-2",children:[r.jsx(da,{className:"w-4 h-4 text-amber-500"}),r.jsxs("span",{className:"font-bold text-gray-800",children:["Validation Issues (",i.length,")"]})]}),r.jsx("div",{className:"divide-y divide-gray-50 max-h-64 overflow-y-auto",children:i.slice(0,30).map((T,P)=>r.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[T.type==="error"?r.jsx(Ln,{className:"w-4 h-4 text-red-500 shrink-0 mt-0.5"}):r.jsx(da,{className:"w-4 h-4 text-amber-500 shrink-0 mt-0.5"}),r.jsx("span",{className:"text-gray-700 text-sm",children:T.msg})]},P))})]}),r.jsxs("div",{className:"space-y-4",children:[s&&r.jsxs(r.Fragment,{children:[r.jsx(Go,{title:"Posts",items:e.posts,color:"blue",fields:[{key:"wp_id",label:"WP ID"},{key:"title",label:"Title"},{key:"author_login",label:"Author"},{key:"status",label:"Status",render:T=>r.jsx("span",{className:`px-1.5 py-0.5 rounded text-xs font-bold ${T.status==="publish"?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"}`,children:T.status})},{key:"pub_date",label:"Published",render:T=>T.pub_date?T.pub_date.slice(0,10):"â"},{key:"categories",label:"Categories",render:T=>{var P;return((P=T.categories)==null?void 0:P.map(R=>R.name).join(", "))||"â"}}]}),r.jsx(Go,{title:"Pages",items:e.pages,color:"purple",fields:[{key:"wp_id",label:"WP ID"},{key:"title",label:"Title"},{key:"slug",label:"Slug"},{key:"status",label:"Status"}]}),r.jsx(Go,{title:"Authors",items:e.authors,color:"green",fields:[{key:"login",label:"Username"},{key:"display_name",label:"Display Name"},{key:"email",label:"Email"}]}),r.jsx(Go,{title:"Categories",items:e.categories,color:"amber",fields:[{key:"term_id",label:"ID"},{key:"name",label:"Name"},{key:"slug",label:"Slug"},{key:"parent",label:"Parent"}]}),r.jsx(Go,{title:"Tags",items:e.tags,color:"amber",fields:[{key:"term_id",label:"ID"},{key:"name",label:"Name"},{key:"slug",label:"Slug"}]}),r.jsx(Go,{title:"Media",items:e.media,color:"gray",fields:[{key:"wp_id",label:"WP ID"},{key:"title",label:"Title"},{key:"attachment_url",label:"URL"}]})]}),!s&&e.rows&&r.jsx(Go,{title:`CSV Rows (${e.csvType})`,items:e.rows,color:"green",fields:(e.headers||[]).slice(0,6).map(T=>({key:T,label:T}))})]}),s&&(((k=e.posts)==null?void 0:k.length)||0)>0&&r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4 text-sm text-blue-800",children:[r.jsx("strong",{children:"â¹ Preview displays sample records only."})," The full import queue contains ",r.jsx("strong",{children:(((C=e.posts)==null?void 0:C.length)||0).toLocaleStr
765ing()})," valid articles. The preview limit does not affect what gets imported."]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-6 py-3 bg-gray-100 text-gray-700 rounded-lg font-semibold text-sm hover:bg-gray-200 transition-colors",children:[r.jsx(Ct,{className:"w-4 h-4"})," Back"]}),r.jsxs("button",{onClick:t,className:"flex-1 flex items-center justify-center gap-2 bg-amber-500 text-white py-3 rounded-lg font-bold text-sm hover:bg-amber-600 transition-colors",children:["Continue to Field Mapping ",r.jsx(_t,{className:"w-4 h-4"})]})]})]})}const Vce=[{id:"Article",label:"Articles",desc:"Blog posts, editorial stories, features"},{id:"Author",label:"Authors",desc:"Writers, contributors, editors"},{id:"MagazineIssue",label:"Magazine Issues",desc:"Print issue archive"},{id:"LuxuryBrand",label:"Luxury Brands",desc:"Brand partners and sponsors"}],p3=[{key:"title",label:"Title",required:!0},{key:"content",label:"Full Article Body",required:!1},{key:"excerpt",label:"Excerpt / Summary",required:!1},{key:"category",label:"Category",required:!1},{key:"author_name",label:"Author Name",required:!1},{key:"image_url",label:"Featured Image URL",required:!1},{key:"published_date",label:"Published Date",required:!1},{key:"read_time",label:"Read Time",required:!1},{key:"views",label:"Views",required:!1},{key:"featured",label:"Featured",required:!1},{key:"tag",label:"Primary Tag",required:!1}],hj=[{key:"name",label:"Name",required:!0},{key:"bio",label:"Biography",required:!1},{key:"image_url",label:"Profile Image URL",required:!1},{key:"role",label:"Role / Title",required:!1},{key:"social_twitter",label:"Twitter Handle",required:!1},{key:"social_instagram",label:"Instagram Handle",required:!1},{key:"speciality",label:"Speciality / Beat",required:!1}],Uce={title:"title",content:"content",excerpt:"excerpt",category:"categories[0].name",author_name:"author_login",image_url:"featured_image_id",published_date:"pub_date",tag:"tags[0].name"},zce={name:"display_name",bio:"",image_url:"",role:"",social_twitter:"login"};function mj({field:e,sourceFields:t,value:n,onChange:s}){return r.jsxs("div",{className:`flex items-center gap-4 py-3 border-b border-gray-100 last:border-0 ${e.required?"bg-amber-50/30":""}`,children:[r.jsxs("div",{className:"w-48 shrink-0",children:[r.jsx("span",{className:"text-sm font-semibold text-gray-800",children:e.label}),e.required&&r.jsx("span",{className:"ml-1 text-red-500 text-xs",children:"*"}),r.jsx("div",{className:"text-xs text-gray-400 font-mono",children:e.key})]}),r.jsx("div",{className:"flex-1",children:r.jsxs("select",{value:n||"",onChange:a=>s(a.target.value),className:`w-full bg-white border rounded-lg px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-amber-400 ${n?"border-green-300 bg-green-50":"border-gray-300"}`,children:[r.jsx("option",{value:"",children:"â skip this field â"}),t.map(a=>r.jsx("option",{value:a,children:a},a))]})}),n&&r.jsx(qt,{className:"w-4 h-4 text-green-500 shrink-0"})]})}function Wce({data:e,onNext:t,onBack:n}){var P,R;const s=e.fileType==="wordpress_xml",a=s?["title","excerpt","slug","pub_date","status","author_login","categories[0].name","tags[0].name","seo_title","seo_description","featured_image_id","link","wp_id","content"]:[],i=s?[]:e.headers||[],o=s?a:i,[l,c]=j.useState("Article"),[u,m]=j.useState(s?Uce:{}),[f,p]=j.useState(s?zce:{}),[b,v]=j.useState(s&&((P=e.authors)==null?void 0:P.length)>0),[g,y]=j.useState("skip"),[w,N]=j.useState("all"),S=(M,D)=>m($=>({...$,[M]:D})),A=(M,D)=>p($=>({...$,[M]:D})),k=Object.values(u).filter(Boolean).length,C=Object.values(f).filter(Boolean).length,T=()=>{t({primaryEntity:l,articleMapping:u,authorMapping:f,importAuthors:b,duplicateStrategy:g,importStatus:w,sourceFields:o})};return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-6 py-4",children:[r.jsx("h2",{className:"font-bold text-gray-900",children:"Primary Target Entity"}),r.jsx("p",{className:"text-gray-500 text-sm mt-0.5",children:"Where should the main records be imported?"})]}),r.jsx("div",{className:"p-6 grid grid-cols-2 sm:grid-cols-4 gap-3",children:Vce.map(M=>r.jsxs("button",{onClick:()=>c(M.id),className:`p-4 rounded-xl border-2 text-left transition-all duration-200 ${l===M.id?"border-amber-400 bg-amber-50":"border-gray-200 hover:border-amber-300 hover:bg-amber-50/30"}`,children:[r.jsx("div",{className:"font-bold text-gray-900 text-sm",children:M.label}),r.jsx("div",{className:"text-gray-500 text-xs mt-1",children:M.desc}),l===M.id&&r.jsx(qt,{className:"w-4 h-4 text-amber-500 mt-2"})]},M.id))})]}),l==="Article"&&r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-6 py-4 flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"font-bold text-gray-900",children:"Article Field Mapping"}),r.jsx("p",{className:"text-gray-500 text-sm",children:"Map source fields to Chelsea Monthly Art
765icle fields"})]}),r.jsxs("span",{className:"bg-amber-100 text-amber-700 text-xs font-bold px-3 py-1 rounded-full",children:[k," / ",p3.length," mapped"]})]}),r.jsx("div",{className:"px-6 py-2",children:p3.map(M=>r.jsx(mj,{field:M,sourceFields:o,value:u[M.key]||"",onChange:D=>S(M.key,D)},M.key))})]}),l==="Author"&&r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-6 py-4 flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"font-bold text-gray-900",children:"Author Field Mapping"}),r.jsx("p",{className:"text-gray-500 text-sm",children:"Map source fields to Chelsea Monthly Author fields"})]}),r.jsxs("span",{className:"bg-amber-100 text-amber-700 text-xs font-bold px-3 py-1 rounded-full",children:[C," / ",hj.length," mapped"]})]}),r.jsx("div",{className:"px-6 py-2",children:hj.map(M=>r.jsx(mj,{field:M,sourceFields:o,value:f[M.key]||"",onChange:D=>A(M.key,D)},M.key))})]}),s&&((R=e.authors)==null?void 0:R.length)>0&&l==="Article"&&r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[r.jsxs("div",{className:"flex items-start gap-4",children:[r.jsx("input",{type:"checkbox",id:"importAuthors",checked:b,onChange:M=>v(M.target.checked),className:"mt-1 w-4 h-4 accent-amber-500"}),r.jsxs("label",{htmlFor:"importAuthors",className:"cursor-pointer",children:[r.jsxs("div",{className:"font-bold text-gray-900",children:["Also import ",e.authors.length," Authors"]}),r.jsx("div",{className:"text-gray-500 text-sm",children:"Create Author records for all WordPress contributors found in this export"})]})]}),b&&r.jsxs("div",{className:"mt-4 pl-8 border-t border-gray-100 pt-4",children:[r.jsx("p",{className:"text-xs font-bold text-gray-500 uppercase tracking-wide mb-3",children:"Author Field Mapping"}),hj.map(M=>r.jsx(mj,{field:M,sourceFields:["display_name","login","email","first_name","last_name","wp_id"],value:f[M.key]||"",onChange:D=>A(M.key,D)},M.key))]})]}),r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsx("div",{className:"bg-gray-50 border-b border-gray-200 px-6 py-4",children:r.jsx("h2",{className:"font-bold text-gray-900",children:"Import Options"})}),r.jsxs("div",{className:"p-6 space-y-6",children:[s&&r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-3",children:"Post Status Filter"}),r.jsx("div",{className:"flex flex-wrap gap-3",children:[{v:"all",label:"All Posts (published + drafts)"},{v:"published_only",label:"Published Only"},{v:"drafts_only",label:"Drafts Only"}].map(M=>r.jsx("button",{onClick:()=>N(M.v),className:`px-4 py-2 rounded-lg text-sm font-semibold border-2 transition-all duration-200 ${w===M.v?"border-amber-400 bg-amber-50 text-amber-700":"border-gray-200 text-gray-600 hover:border-amber-300"}`,children:M.label},M.v))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-sm font-bold text-gray-700 mb-3",children:"Duplicate Handling Strategy"}),r.jsx("div",{className:"space-y-2",children:[{v:"skip",label:"Skip duplicates",desc:"Don't import records that already exist (matched by slug or title)"},{v:"update",label:"Update existing records",desc:"Overwrite existing records with imported data"},{v:"new",label:"Import as new records",desc:"Always create new records, even if duplicates exist"}].map(M=>r.jsxs("label",{className:`flex items-start gap-3 p-4 border-2 rounded-lg cursor-pointer transition-all ${g===M.v?"border-amber-400 bg-amber-50":"border-gray-200 hover:border-amber-300"}`,children:[r.jsx("input",{type:"radio",name:"dupStrategy",value:M.v,checked:g===M.v,onChange:()=>y(M.v),className:"mt-1 accent-amber-500"}),r.jsxs("div",{children:[r.jsx("div",{className:"font-semibold text-gray-900 text-sm",children:M.label}),r.jsx("div",{className:"text-gray-500 text-xs mt-0.5",children:M.desc})]})]},M.v))})]})]})]}),r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-5 flex items-start gap-3",children:[r.jsx(zG,{className:"w-5 h-5 text-blue-500 shrink-0 mt-0.5"}),r.jsxs("div",{className:"text-blue-800 text-sm",children:[r.jsx("strong",{children:"Import Safety:"}),' Nothing will be imported yet. After this step you will review a full summary and must explicitly click "Approve and Start Import" to proceed. The public website will not be affected.']})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-6 py-3 bg-gray-100 text-gray-700 rounded-lg font-semibold text-sm hover:bg-gray-200 transition-colors",children:[r.jsx(Ct,{className:"w-4 h-4"})," Back"]}),r.jsxs("button",{onClick:T,className:"flex-1 flex items-center justify-center gap-2 bg-amber-500 text-white py-3 rounded-lg font-bold text-sm hover:bg-amber-600 transition-colors",children:["Review and Approve Import ",r.jsx(_t,{className:"w-4 h-4"})]})]})]})}function Hce(e,t){return t==="published_only"?e.filter(n=>n.status==="publish"):t==="drafts_only"?e.filter(n=>n.status==="draft"):e}function xr({label:e,value:t,sub:n,valueColor:s="text-gray-900",bold:a=!1,indent:i=!1}){return r.jsxs("div",{className:`flex items-center justify-between py-2.5 border-b border-gray-100 last:border-0 ${i?"pl-6":""}`,children:[r.jsx("span",{className:`text-sm ${a?"font-bold text-gray-800":"text-gray-600"}`,children:e}),r.jsxs("div",{className:"text-right",children:[r.jsx("span",{className:`text-sm font-bold ${s}
765`,children:typeof t=="number"?t.toLocaleString():t}),n&&r.jsx("div",{className:"text-xs text-gray-400",children:n})]})]})}function sh({title:e}){return r.jsx("div",{className:"bg-gray-50 px-4 py-2 text-xs font-bold text-gray-400 uppercase tracking-widest border-b border-gray-100",children:e})}function Gce({data:e,mappingConfig:t,onNext:n,onBack:s}){const a=e.fileType==="wordpress_xml",i=j.useMemo(()=>{const o=e.posts||[],l=e.junkPosts||[],c=e.pages||[],u=e.media||[],m=e.authors||[],f=a?Hce(o,t.importStatus):e.rows||[],p=f.filter(P=>P.status==="publish"),b=f.filter(P=>P.status==="draft"),v=f.filter(P=>P.status==="future"),g=f.filter(P=>!["publish","draft","future"].includes(P.status)),y=f.filter(P=>!P.title),w=f.filter(P=>!!P.featured_image_url).length,N=f.filter(P=>!P.featured_image_url&&!!P.featured_image_id).length,S=f.filter(P=>!P.featured_image_url&&!P.featured_image_id).length,A=t.importAuthors?m:[],k=[];l.length>0&&k.push({reason:"Junk / contact forms / system pages auto-excluded",count:l.length});const C=o.length-f.length;if(C>0){const P=t.importStatus==="published_only"?"Drafts/other excluded by status filter (published only)":t.importStatus==="drafts_only"?"Published/other excluded by status filter (drafts only)":null;P&&k.push({reason:P,count:C})}y.length>0&&k.push({reason:"Will be skipped at runtime: no title",count:y.length});const T=f.length+A.length;return{queueSize:f.length,grandTotal:T,allPostsDetected:o.length,junkExcluded:l.length,pagesDetected:c.length,mediaAttachments:u.length,authorsDetected:m.length,authorsInQueue:A.length,published:p.length,drafts:b.length,scheduled:v.length,otherStatus:g.length,noTitle:y.length,imagesResolved:w,imagesUnresolved:N,noImage:S,exclusions:k,statusFilterLabel:t.importStatus==="published_only"?"Published only":t.importStatus==="drafts_only"?"Drafts only":"All (published + drafts)",duplicateStrategy:t.duplicateStrategy}},[e,t,a]);return i.queueSize>0&&i.noTitle,r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-5 flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold text-gray-900 mb-1",children:"Import Queue Validation"}),r.jsxs("p",{className:"text-gray-500 text-sm",children:["These numbers are derived from the ",r.jsx("strong",{children:"actual import engine queue"})," â not from XML statistics or preview samples. The import will process exactly ",r.jsx("strong",{children:i.queueSize.toLocaleString()})," article records."]})]}),r.jsx("span",{className:"bg-green-100 text-green-700 text-xs font-bold px-3 py-1.5 rounded-full shrink-0 ml-4",children:"Live Queue"})]}),r.jsxs("div",{className:"bg-gray-900 text-white rounded-2xl p-8 text-center shadow-xl",children:[r.jsx("div",{className:"text-xs font-bold uppercase tracking-widest text-gray-400 mb-2",children:"Actual Import Queue Size"}),r.jsx("div",{className:"text-7xl font-black text-white mb-2",children:i.queueSize.toLocaleString()}),r.jsx("div",{className:"text-gray-300 text-lg font-semibold mb-1",children:"records will be processed by the import engine"}),i.authorsInQueue>0&&r.jsxs("div",{className:"text-amber-400 text-sm mt-2",children:["+ ",i.authorsInQueue," authors = ",i.grandTotal.toLocaleString()," total operations"]}),r.jsxs("div",{className:"mt-4 inline-block bg-gray-800 rounded-lg px-4 py-2 text-xs text-gray-400",children:["Source: ",r.jsx("span",{className:"text-white font-mono",children:e.sourceFile})," · Status filter: ",r.jsx("span",{className:"text-amber-400 font-semibold",children:i.statusFilterLabel})]})]}),r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsx(sh,{title:"Article Queue Breakdown"}),r.jsxs("div",{className:"px-5",children:[r.jsx(xr,{label:"Valid Articles in Queue",value:i.queueSize,valueColor:"text-blue-700",bold:!0}),r.jsx(xr,{label:" â Published",value:i.published,indent:!0,valueColor:"text-green-700",sub:"status = publish"}),r.jsx(xr,{label:" â Draft",value:i.drafts,indent:!0,valueColor:"text-amber-700",sub:"status = draft"}),i.scheduled>0&&r.jsx(xr,{label:" â Scheduled",value:i.scheduled,indent:!0,valueColor:"text-purple-700",sub:"status = future"}),i.otherStatus>0&&r.jsx(xr,{label:" â Other status",value:i.otherStatus,indent:!0,valueColor:"text-gray-500"}),i.noTitle>0&&r.jsx(xr,{label:" â Will skip at runtime (no title)",value:i.noTitle,indent:!0,valueColor:"text-red-600"})]}),r.jsx(sh,{title:"Non-Article Content (not in article queue)"}),r.jsxs("div",{className:"px-5",children:[r.jsx(xr,{label:"Valid Pages Detected",value:i.pagesDetected,sub:"not imported as articles"}),r.jsx(xr,{label:"Media Attachments",value:i.mediaAttachments,sub:"wp:attachment items in XML"}),r.jsx(xr,{label:"Authors Detected",value:i.authorsDetected}),r.jsx(xr,{label:"Authors Queued for Import",value:i.authorsInQueue,valueColor:i.authorsInQueue>0?"text-green-700":"text-gray-400",sub:i.authorsInQueue===0?"disabled in mapping":"will be created"})]}),r.jsx(sh,{title:"Exclusions â Why Queue < Total Detected"}),r.jsxs("div",{className:"px-5",children:[r.jsx(xr,{label:"Total Posts in XML (before filters)",value:i.allPostsDetected+i.junkExcluded,bold:!0}),i.exclusions.length===0?r.jsx(xr,{label:"No exclusions applied",value:"â",valueColor:"text-gray-400"}):i.exclusions.map((o,l)=>r.jsx(xr,{label:` â ${o.reason}`,value:o.count,indent:!0,valueColor:"text-red-600"},l)),r.jsx(xr,{label:"Junk / Forms Auto-excluded",value:i.junkExcluded,valueColor:"text-red-600"}),r.jsx(xr,{label:"Net Articles in Queue",value:i.queueSize,valueColor:"text-blue-700",bold:!0})]}),r.jsx(sh,{title:"Image URL Resolution"}),r.jsxs("div",{className:"px-5",children:[r.jsx(xr,{label:"Image URLs Resolved (full URL found)",value:i.imagesResolved,valueColor:"text-green-700"}),r.jsx(xr,{label:"Image URLs Unresolved (attachment ID only)",value:i.imagesUnresolved,valueColor:i.imagesUnresolved>0?"text-amber-600":"text-gray-400",sub:i.imagesUnresolved>0?"ID stored, image_url left empty":void 0}),r.jsx(xr,{label:"No Image Data",value:i.noImage,valueColor:"text-gray-400"})]}),r.jsx(sh,{title:"Import Configuration"}),r.jsxs("div",{className:"px-5",children:[r.jsx(xr,{label:"Status Filter",value:i.statusFilterLabel}),r.jsx(xr,{label:"Duplicate Strategy",value:i.duplicateStrategy}),r.jsx(xr,{label:"Performing Admin",value:e.sourceFile,sub:"source file"})]})]}),r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-5",children:[r.jsxs("div",{className:"font-bold text-blue-800 mb-2 flex items-center gap-2",children:[r.jsx(Vt,{className:"w-4 h-4"})," Import Batch Estimate"]}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 text-sm",children:[r.jsxs("div",{className:"bg-white rounded-lg p-3 border border-blue-100",children:[r.jsx("div",{className:"text-blue-400 text-xs font-bold uppercase mb-1",children:"Total Operations"}),r.jsx("div",{className:"text-2xl font-black text-blue-700",children:i.grandTotal.toLocaleStr
765ing()}),r.jsx("div",{className:"text-blue-500 text-xs",children:"articles + authors"})]}),r.jsxs("div",{className:"bg-white rounded-lg p-3 border border-blue-100",children:[r.jsx("div",{className:"text-blue-400 text-xs font-bold uppercase mb-1",children:"Estimated Duration"}),r.jsxs("div",{className:"text-2xl font-black text-blue-700",children:["~",Math.ceil(i.grandTotal/60)," min"]}),r.jsx("div",{className:"text-blue-500 text-xs",children:"at ~60 records/min"})]}),r.jsxs("div",{className:"bg-white rounded-lg p-3 border border-blue-100",children:[r.jsx("div",{className:"text-blue-400 text-xs font-bold uppercase mb-1",children:"Batch ID Format"}),r.jsxs("div",{className:"text-sm font-mono font-bold text-blue-700",children:["import_",Date.now().toString().slice(0,10),"â¦"]}),r.jsx("div",{className:"text-blue-500 text-xs",children:"generated at import start"})]})]})]}),i.noTitle>0&&r.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4 flex items-start gap-3",children:[r.jsx(Ln,{className:"w-5 h-5 text-red-500 shrink-0 mt-0.5"}),r.jsxs("div",{className:"text-sm text-red-700",children:[r.jsxs("strong",{children:[i.noTitle," articles in the queue have no title"]})," and will be automatically skipped by the import engine. They are counted in the queue size but will not create records."]})]}),i.imagesUnresolved>0&&r.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 flex items-start gap-3",children:[r.jsx(da,{className:"w-5 h-5 text-amber-500 shrink-0 mt-0.5"}),r.jsxs("div",{className:"text-sm text-amber-700",children:[r.jsxs("strong",{children:[i.imagesUnresolved," articles"]})," have a featured image ID in the XML but no matching attachment URL could be resolved. The ",r.jsx("code",{className:"bg-amber-100 px-1 rounded",children:"image_url"})," field will be left empty for these records; the original WordPress attachment ID is preserved in ",r.jsx("code",{className:"bg-amber-100 px-1 rounded",children:"original_wordpress_featured_media_id"}),"."]})]}),i.queueSize===0?r.jsxs("div",{className:"bg-red-100 border-2 border-red-400 rounded-xl p-5 text-red-800 font-bold text-sm flex items-center gap-3",children:[r.jsx(Ln,{className:"w-5 h-5 shrink-0"}),'â Import queue is empty. Check your status filter â the current filter "',i.statusFilterLabel,'" produced 0 records. Go back and adjust.']}):r.jsxs("div",{className:"bg-green-50 border-2 border-green-400 rounded-xl p-5 flex items-center gap-4",children:[r.jsx(qt,{className:"w-6 h-6 text-green-600 shrink-0"}),r.jsxs("div",{children:[r.jsxs("div",{className:"font-bold text-green-800 text-base",children:["Queue validated â ",i.queueSize.toLocaleString()," articles ready"]}),r.jsx("div",{className:"text-green-600 text-sm mt-0.5",children:'The import engine will process exactly this many re
765cords. Click "Continue to Final Approval" to proceed.'})]})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:s,className:"flex items-center gap-2 px-6 py-3 bg-gray-100 text-gray-700 rounded-lg font-semibold text-sm hover:bg-gray-200 transition-colors",children:[r.jsx(Ct,{className:"w-4 h-4"})," Back to Mapping"]}),r.jsxs("button",{onClick:n,disabled:i.queueSize===0,className:"flex-1 flex items-center justify-center gap-2 bg-amber-500 text-white py-3 rounded-lg font-bold text-sm hover:bg-amber-600 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:["Queue confirmed â Continue to Final Approval ",r.jsx(_t,{className:"w-4 h-4"})]})]})]})}function Kp(e,t){if(!t||!e)return"";if(t.includes("[0]")){const[n,...s]=t.split("[0]."),a=e[n];if(!Array.isArray(a)||a.length===0)return"";const i=s.join("");return i?a[0][i]||"":a[0]||""}return e[t]!==void 0?e[t]:""}function Kce(e,t,n){var o,l,c,u;const s={};s.title=e.title||"";const a=e.excerpt||Kp(e,t.excerpt)||"";s.excerpt=a.replace(/<[^>]*>/g,"").slice(0,500),s.category=((l=(o=e.categories)==null?void 0:o[0])==null?void 0:l.name)||Kp(e,t.category)||"",s.author_name=e.author_login||Kp(e,t.author_name)||"",e.featured_image_url?s.image_url=e.featured_image_url:e.featured_image_id&&(s.original_wordpress_featured_media_id=e.featured_image_id),s.published_date=e.pub_date||"",s.content=e.content||"",s.tag=((u=(c=e.tags)==null?void 0:c[0])==null?void 0:u.name)||Kp(e,t.tag)||"",s.views="0",s.featured=e.status==="publish",s.read_time=Ice(e.content),s.slug=e.slug||"",s.wp_id=e.wp_id||"",s.original_wordpress_id=e.wp_id||"",s.original_wordpress_post_type=e.post_type||"post",s.original_wordpress_status=e.status||"",s.original_wordpress_slug=e.slug||"";const i=Rce(e);return s.seo_title=e.seo_title||i.seo_title,s.seo_description=e.seo_description||i.seo_description,e.canonical_url&&(s.canonical_url=e.canonical_url),s.import_batch_id=n,s.status=e.status||"",s}function Yce(e,t){return t==="published_only"?e.filter(n=>n.status==="publish"):t==="drafts_only"?e.filter(n=>n.status==="draft"):e}function Xce({data:e,mappingConfig:t,adminUser:n,onImportComplete:s,onBack:a}){var R,M,D,$,q,H,L,F,Y,U,re,G,B;const[i,o]=j.useState(!1),[l,c]=j.useState(!1),[u,m]=j.useState([]),[f,p]=j.useState(0),[b,v]=j.useState(""),[g,y]=j.useState(0),[w,N]=j.useState(0),S=e.fileType==="wordpress_xml",A=S?Yce(e.posts||[],t.importStatus):e.rows||[],k=t.importAuthors?e.authors||[]:[],C=A.length>0&&A.length<=50&&(((R=e.posts)==null?void 0:R.length)||0)>50,T=A.slice(0,5),P=async()=>{var ze,xt,Ze;c(!0);const z=`import_${Date.now()}`,he=new Date().toISOString(),fe=[];let be=0,xe=0,pe=0,Ae=0,ie=0,Ne=0,Se=0;const te=A.length+k.length;N(te);let Oe=0,ye=new Set;try{v("Loading existing articles for duplicate check...");let it=0;const ot=500;for(;;){const We=await W.entities.Article.list("-created_date",ot,it*ot);if(!We||We.length===0||(We.forEach(Nt=>{Nt.wp_id&&ye.add(String(Nt.wp_id)),Nt.original_wordpress_id&&ye.add(String(Nt.original_wordpress_id))}),We.length<ot))break;it++}}catch{}if(k.length>0){v("Importing authors...");let it=new Set;try{(await W.entities.Author.list("-created_date",500)).forEach(We=>{We.name&&it.add(We.name.toLowerCase().trim())})}catch{}for(const ot of k){const We=ot.display_name||ot.login||"";try{if(!We)pe++,fe.push({type:"skip",entity:"Author",title:ot.login||"unknown",reason:"No display name"});else if(it.has(We.toLowerCase().trim()))pe++,fe.push({type:"skip",entity:"Author",title:We,reason:"Already exists"});else{const Nt={name:We,bio:"",image_url:"",role:"Contributor",social_twitter:"",social_instagram:"",articles_count:0,speciality:""};await W.entities.Author.create(Nt),it.add(We.toLowerCase().trim()),xe++,fe.push({type:"success",entity:"Author",title:We})}}catch(Nt){ie++,fe.push({type:"error",entity:"Author",title:We,reason:Nt.message})}Oe++,y(Oe),p(Math.round(Oe/te*100)),m([...fe].slice(-20)),await new Promise(Nt=>setTimeout(Nt,20))}}const Ee=5;for(let it=0;it<A.length;it++){const ot=A[it];v(`Importing ${(it+1).toLocaleString()} of ${A.length.toLocaleString()} articles...`);try{if(!ot.title){pe++,fe.push({type:"skip",entity:"Article",title:`wp_id:${ot.wp_id}`,reason:"No title"}),Oe++,y(Oe),p(Math.round(Oe/te*100));continue}if(t.duplicateStrategy==="skip"){const Nt=String(ot.wp_id||"");if(Nt&&ye.has(Nt)){Ae++,fe.push({type:"skip",entity:"Article",title:ot.title,reason:`Duplicate wp_id: ${Nt}`}),Oe++,y(Oe),p(Math.round(Oe/te*100)),m([...fe].slice(-20));continue}}const We=Kce(ot,t.articleMapping,z);if(ot.featured_image_url?Ne++:ot.featured_image_id&&Se++,t.duplicateStrategy==="update")try{const Nt=String(ot.wp_id||"");if(Nt&&ye.has(Nt)){const mr=await W.entities.Article.filter({wp_id:Nt});if(mr!=null&&mr[0]){await W.entities.Article.update(mr[0].id,We),be++,fe.push({type:"success",entity:"Article",title:We.title,note:"updated"}),Oe++,y(Oe),p(Math.round(Oe/te*100)),m([...fe].slice(-20));continue}}}catch{}await W.entities.Article.create(We),ye.add(String(ot.wp_id||"")),be++,fe.push({type:"success",entity:"Article",title:We.title})}catch(We){ie++,fe.push({type:"error",entity:"Article",title:ot.title||`wp_id:${ot.wp_id}`,reason:We.message})}Oe++,y(Oe),p(Math.round(Oe/te*100)),it%Ee===0&&(m([...fe].slice(-20)),await new Promise(We=>setTimeout(We,10)))}m([...fe]);const ke={batchId:z,startTime:he,endTime:new Date().toISOString(),adminUser:(n==null?void 0:n.email)||(n==null?void 0:n.full_name)||"admin",sourceFile:e.sourceFile,totalDetected:A.length,totalRecords:te,successArticles:be,successAuthors:xe,ski
765pCount:pe,dupSkipCount:Ae,errorCount:ie,mediaResolved:Ne,mediaUnresolved:Se,totalMediaInXML:e.totalMediaInXML||0,categoriesDetected:((ze=e.categories)==null?void 0:ze.length)||0,tagsDetected:((xt=e.tags)==null?void 0:xt.length)||0,junkExcluded:((Ze=e.junkPosts)==null?void 0:Ze.length)||0,log:fe};try{const it=JSON.parse(localStorage.getItem("cm_import_batches")||"[]");it.unshift({batchId:z,startTime:he,sourceFile:e.sourceFile,successArticles:be,successAuthors:xe,skipCount:pe,dupSkipCount:Ae,errorCount:ie,adminUser:ke.adminUser}),localStorage.setItem("cm_import_batches",JSON.stringify(it.slice(0,20)))}catch{}c(!1),s(ke)};return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsx("div",{className:"bg-gray-50 border-b border-gray-200 px-6 py-4",children:r.jsxs("h2",{className:"font-bold text-gray-900 flex items-center gap-2",children:[r.jsx(UK,{className:"w-5 h-5 text-amber-500"})," Import Summary â Review Before Approving"]})}),r.jsxs("div",{className:"p-6",children:[r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-4 text-center",children:[r.jsx(rk,{className:"w-5 h-5 text-blue-500 mx-auto mb-1"}),r.jsx("div",{className:"text-2xl font-bold text-blue-700",children:A.length.toLocaleString()}),r.jsx("div",{className:"text-blue-600 text-xs font-medium mt-0.5",children:"Articles in Import Queue"}),S&&r.jsx("div",{className:"text-blue-400 text-[10px] mt-0.5",children:"(full XML, no cap)"})]}),r.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-xl p-4 text-center",children:[r.jsx(vt,{className:"w-5 h-5 text-green-500 mx-auto mb-1"}),r.jsx("div",{className:"text-2xl font-bold text-green-700",children:k.length}),r.jsx("div",{className:"text-green-600 text-xs font-medium mt-0.5",children:"Authors to Import"})]}),r.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-4 text-center",children:[r.jsx(Xm,{className:"w-5 h-5 text-amber-500 mx-auto mb-1"}),r.jsx("div",{className:"text-2xl font-bold text-amber-700",children:e.totalMediaResolved||0}),r.jsx("div",{className:"text-amber-600 text-xs font-medium mt-0.5",children:"Images Resolved"}),(e.totalMediaUnresolved||0)>0&&r.jsxs("div",{className:"text-amber-400 text-[10px]",children:[e.totalMediaUnresolved," unresolved"]})]}),r.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-4 text-center",children:[r.jsx(Lx,{className:"w-5 h-5 text-red-500 mx-auto mb-1"}),r.jsx("div",{className:"text-2xl font-bold text-red-700",children:((M=e.junkPosts)==null?void 0:M.length)||0}),r.jsx("div",{className:"text-red-600 text-xs font-medium mt-0.5",children:"Junk/Forms Excluded"})]})]}),S&&r.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 text-sm space-y-2 mb-4",children:[r.jsx("div",{className:"font-bold text-gray-700 mb-2 text-xs uppercase tracking-wide",children:"Full XML Analysis"}),r.jsxs("div",{className:"grid grid-cols-2 gap-x-8 gap-y-1.5",children:[r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Total posts detected:"}),r.jsx("span",{className:"font-bold text-gray-800",children:((((D=e.posts)==null?void 0:D.length)||0)+((($=e.junkPosts)==null?void 0:$.length)||0)).toLocaleString()})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Import queue:"}),r.jsx("span",{className:"font-bold text-green-700",children:A.length.toLocaleString()})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Pages detected:"}),r.jsx("span",{className:"font-bold text-gray-800",children:((q=e.pages)==null?void 0:q.length)||0})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Junk/forms excluded:"}),r.jsx("span",{className:"font-bold text-red-600",children:((H=e.junkPosts)==null?void 0:H.length)||0})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Media items:"}),r.jsx("span",{className:"font-bold text-gray-800",children:((L=e.media)==null?void 0:L.length)||0})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Media lookup table:"}),r.jsxs("span",{className:"font-bold text-gray-800",children:[e.totalMediaInXML||0," entries"]})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Featured images resolved:"}),r.jsx("span",{className:"font-bold text-green-700",children:e.totalMediaResolved||0})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Images unresolved:"}),r.jsx("span",{className:"font-bold text-amber-600",children:e.totalMediaUnresolved||0})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Authors:"}),r.jsx("span",{className:"font-bold text-gray-800",children:((F=e.authors)==null?void 0:F.length)||0})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Categories:"}),r.jsx("span",{className:"font-bold text-gray-800",children:((Y=e.categories)==null?void 0:Y.length)||0})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Tags:"}),r.jsx("span",{className:"font-bold text-gray-800",children:((U=e.tags)==null?void 0:U.length)||0})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Duplicate strategy:"}),r.jsx("span",{className:"font-bold text-gray-800",children:t.duplicateStrategy})]})]})]}),r.jsxs("div",{className:"bg-gray-50 rounded-lg p-4 text-sm space-y-1.5",children:[r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Source file:"}),r.jsx("span",{className:"font-medium text-gray-800",children:e.sourceFile})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Status filter:"}),r.jsx("span",{className:"font-medium text-gray-800",children:t.importStatus==="all"?"All posts (published + drafts)":t.importStatus==="published_only"?"Published only":"Drafts only"})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-gray-500",children:"Performing admin:"}),r.jsx("span",{className:"font-medium text-gray-800",children:(n==null?void 0:n.email)||(n==null?void 0:n.full_name)})]})]})]})]}),T.length>0&&r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-6 py-4 flex items-center justify-between",children:[r.jsxs("h3",{className:"font-bold text-gray-900",children:["Sample Records (first 5 of ",A.length.toLocaleStr
765ing(),")"]}),r.jsxs("span",{className:"text-xs text-gray-400 bg-gray-100 px-2 py-1 rounded",children:["Full import queue: ",A.length.toLocaleString()," records"]})]}),r.jsx("div",{className:"divide-y divide-gray-100",children:T.map((z,he)=>{var fe,be,xe;return r.jsxs("div",{className:"px-6 py-4",children:[r.jsx("div",{className:"font-semibold text-gray-900 text-sm",children:z.title||r.jsx("span",{className:"text-gray-400 italic",children:"No title"})}),r.jsxs("div",{className:"flex flex-wrap gap-4 mt-1 text-xs text-gray-500",children:[((be=(fe=z.categories)==null?void 0:fe[0])==null?void 0:be.name)&&r.jsxs("span",{children:["Category: ",r.jsx("strong",{children:z.categories[0].name})]}),z.author_login&&r.jsxs("span",{children:["Author: ",r.jsx("strong",{children:z.author_login})]}),z.pub_date&&r.jsxs("span",{children:["Date: ",r.jsx("strong",{children:(xe=z.pub_date)==null?void 0:xe.slice(0,10)})]}),z.featured_image_url&&r.jsx("span",{className:"text-green-600",children:"â Image resolved"}),!z.featured_image_url&&z.featured_image_id&&r.jsxs("span",{className:"text-amber-600",children:["â Image unresolved (ID: ",z.featured_image_id,")"]}),r.jsx("span",{className:z.status==="publish"?"text-green-600":"text-amber-600",children:z.status})]})]},he)})})]}),r.jsx("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-5",children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(da,{className:"w-5 h-5 text-amber-500 shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-bold text-amber-800 mb-2",children:"Before You Approve"}),r.jsxs("ul",{className:"text-amber-700 text-sm space-y-1",children:[r.jsxs("li",{children:["⢠This will import ",r.jsx("strong",{children:A.length.toLocaleString()})," articles",k.length>0?` and ${k.length} authors`:""," into the Chelsea Monthly CMS"]}),r.jsxs("li",{children:["⢠",r.jsx("strong",{children:((re=e.junkPosts)==null?void 0:re.length)||0})," junk/form pages have been automatically excluded"]}),r.jsxs("li",{children:["⢠",r.jsx("strong",{children:e.totalMediaResolved||0})," featured images have been resolved to full URLs; ",r.jsx("strong",{children:e.totalMediaUnresolved||0})," could not be resolved"]}),r.jsx("li",{children:"⢠Existing articles and the public website will not be deleted or modified"}),r.jsx("li",{children:"⢠You can rollback this entire import using the batch ID generated during import"})]})]})]})}),C&&r.jsxs("div",{className:"bg-red-100 border-2 border-red-400 rounded-xl p-5 text-red-800 font-bold text-sm",children:["â ERROR: Import queue is incorrectly capped at ",A.length,". The XML contains ",(B=(G=e.posts)==null?void 0:G.length)==null?void 0:B.toLocaleString()," valid articles. Do not proceed â reload and re-upload the file."]}),!C&&!l&&r.jsxs("div",{className:"bg-green-50 border border-green-300 rounded-xl p-4 text-green-800 text-sm font-semibold",children:["â Ready to import ",r.jsx("strong",{children:A.length.toLocaleString()})," articles from the full XML queue."]}),!l&&r.jsx("div",{className:"bg-white rounded-xl border-2 border-gray-200 p-5",children:r.jsxs("label",{className:"flex items-start gap-3 cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:i,onChange:z=>o(z.target.checked),className:"mt-1 w-4 h-4 accent-amber-500"}),r.jsxs("span",{className:"text-gray-800 font-semibold text-sm",children:["I have reviewed the full import summary (",A.length.toLocaleString()," articles in queue). I confirm this import is correct and understand it can be rolled back using the batch ID."]})]})}),l&&r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[r.jsx(va,{className:"w-5 h-5 text-amber-500 animate-spin"}),r.jsxs("span",{className:"font-bold text-gray-900",children:[b," â ",f,"% complete (",g.toLocaleString()," / ",w.toLocaleString(),")"]})]}),r.jsx("div",{className:"w-full bg-gray-100 rounded-full h-3 mb-4",children:r.jsx("div",{className:"bg-amber-500 h-3 rounded-full transition-all duration-300",style:{width:`${f}%`}})}),r.jsx("p",{className:"text-gray-500 text-xs mb-4",children:"Please do not close or refresh this page during import"}),r.jsx("div",{className:"max-h-48 overflow-y-auto space-y-1 bg-gray-50 rounded-lg p-3",children:u.slice(-15).map((z,he)=>r.jsxs("div",{className:`text-xs flex items-center gap-2 ${z.type==="success"?"text-green-600":z.type==="skip"?"text-amber-600":"text-red-600"}`,children:[z.type==="success"?r.jsx(qt,{className:"w-3 h-3 shrink-0"}):z.type==="skip"?r.jsx(Lx,{className:"w-3 h-3 shrink-0"}):r.jsx(Cl,{className:"w-3 h-3 shrink-0"}),r.jsx("span",{className:"font-bold uppercase text-[10px]",children:z.type}),r.jsx("span",{className:"text-gray-500",children:z.entity}),r.jsx("span",{className:"truncate max-w-xs",children:z.title}),z.reason&&r.jsxs("span",{className:"text-gray-400 shrink-0",children:["â ",z.reason]})]},he))})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs("button",{onClick:a,disabled:l,className:"flex items-center gap-2 px-6 py-3 bg-gray-100 text-gray-700 rounded-lg font-semibold text-sm hover:bg-gray-200 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[r.jsx(Ct,{className:"w-4 h-4"})," Back"]}),r.jsx("button",{onClick:P,disabled:!i||l||C,className:"flex-1 flex items-center justify-center gap-3 bg-green-600 text-white py-4 rounded-lg font-bold text-sm hover:bg-green-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed shadow-lg shadow-green-600/20",children:l?r.jsxs(r.Fragment,{children:[r.jsx(va,{className:"w-5 h-5 animate-spin"})," ",b]}):r.jsxs(r.Fragment,{children:[r.jsx(qt,{className:"w-5 h-5"}
765)," Approve and Import All ",A.length.toLocaleString()," Articles"]})})]})]})}function ah(e){return e?new Date(e).toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}):"â"}function Jce({batch:e,onNewImport:t}){const[n,s]=j.useState("all"),a=e.log||[],i=n==="all"?a:a.filter(m=>m.type===n),o=a.filter(m=>m.type==="success").length,l=a.filter(m=>m.type==="skip").length,c=a.filter(m=>m.type==="error").length,u=()=>{const m=["Chelsea Monthly Content Import Studio â Import Log",`Batch ID: ${e.batchId}`,`Date: ${ah(e.startTime)}`,`Admin: ${e.adminUser}`,`Source File: ${e.sourceFile}`,"","SUMMARY",`Total Detected: ${e.totalDetected||e.totalRecords}`,`Articles Imported: ${e.successArticles??e.successCount}`,`Authors Imported: ${e.successAuthors??0}`,`Skipped (no title/junk): ${e.skipCount}`,`Duplicates Skipped: ${e.dupSkipCount??0}`,`Errors: ${e.errorCount}`,`Images Resolved: ${e.mediaResolved??0}`,`Images Unresolved: ${e.mediaUnresolved??0}`,`Junk/Forms Excluded: ${e.junkExcluded??0}`,`Categories Detected: ${e.categoriesDetected??0}`,`Tags Detected: ${e.tagsDetected??0}`,"","DETAIL LOG",...a.map(v=>`[${v.type.toUpperCase()}] ${v.entity}
765 â "${v.title}"${v.reason?` â ${v.reason}`:""} (${ah(v.time)})`)],f=new Blob([m.join(` 766`)],{type:"text/plain"}),p=URL.createObjectURL(f),b=document.createElement("a");b.href=p,b.download=`import-log-${e.batchId}.txt`,b.click(),URL.revokeObjectURL(p)};return r.jsxs("div",{className:"space-y-6",children:[r.jsx("div",{className:`rounded-xl border-2 p-6 ${c===0?"bg-green-50 border-green-200":"bg-amber-50 border-amber-200"}`,children:r.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[c===0?r.jsx(qt,{className:"w-8 h-8 text-green-600"}):r.jsx(da,{className:"w-8 h-8 text-amber-600"}),r.jsxs("div",{children:[r.jsx("h2",{className:`text-xl font-bold ${c===0?"text-green-800":"text-amber-800"}`,children:c===0?"Import Completed Successfully":"Import Completed with Issues"}),r.jsxs("p",{className:`text-sm ${c===0?"text-green-600":"text-amber-600"}`,children:["Batch ID: ",r.jsx("code",{className:"font-mono font-bold",children:e.batchId})]})]})]})}),r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[r.jsxs("div",{className:"bg-white border border-gray-200 rounded-xl p-5 text-center",children:[r.jsx("div",{className:"text-3xl font-bold text-gray-900",children:(e.totalDetected||e.totalRecords||0).toLocaleString()}),r.jsx("div",{className:"text-gray-500 text-sm mt-0.5",children:"Total Detected"})]}),r.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-xl p-5 text-center",children:[r.jsx(qt,{className:"w-5 h-5 text-green-500 mx-auto mb-1"}),r.jsx("div",{className:"text-3xl font-bold text-green-700",children:((e.successArticles??o)+(e.successAuthors??0)).toLocaleString()}),r.jsx("div",{className:"text-green-600 text-sm mt-0.5",children:"Imported"}),e.successAuthors>0&&r.jsxs("div",{className:"text-green-400 text-xs",children:[e.successArticles," articles + ",e.successAuthors," authors"]})]}),r.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-5 text-center",children:[r.jsx(Lx,{className:"w-5 h-5 text-amber-500 mx-auto mb-1"}),r.jsx("div",{className:"text-3xl font-bold text-amber-700",children:(l+(e.dupSkipCount??0)).toLocaleString()}),r.jsx("div",{className:"text-amber-600 text-sm mt-0.5",children:"Skipped"}),e.dupSkipCount>0&&r.jsxs("div",{className:"text-amber-400 text-xs",children:[e.dupSkipCount," duplicates"]})]}),r.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-5 text-center",children:[r.jsx(Cl,{className:"w-5 h-5 text-red-500 mx-auto mb-1"}),r.jsx("div",{className:"text-3xl font-bold text-red-700",children:c}),r.jsx("div",{className:"text-red-600 text-sm mt-0.5",children:"Errors"})]})]}),(e.mediaResolved!==void 0||e.junkExcluded!==void 0)&&r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[r.jsx("h3",{className:"font-bold text-gray-900 mb-4",children:"Full Import Report"}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-2 text-sm",children:[r.jsxs("div",{className:"flex justify-between py-1.5 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Articles imported"}),r.jsx("span",{className:"font-bold text-green-700",children:(e.successArticles??o).toLocaleString()})]}),r.jsxs("div",{className:"flex justify-between py-1.5 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Authors imported"}),r.jsx("span",{className:"font-bold text-green-700",children:e.successAuthors??0})]}),r.jsxs("div",{className:"flex justify-between py-1.5 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Duplicates skipped"}),r.jsx("span",{className:"font-bold text-amber-600",children:e.dupSkipCount??0})]}),r.jsxs("div",{className:"flex justify-between py-1.5 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Junk/forms excluded"}),r.jsx("span",{className:"font-bold text-gray-600",children:e.junkExcluded??0})]}),r.jsxs("div",{className:"flex justify-between py-1.5 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Images resolved"}),r.jsx("span",{className:"font-bold text-green-700",children:e.mediaResolved??0})]}),r.jsxs("div",{className:"flex justify-between py-1.5 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Images unresolved"}),r.jsx("span",{className:"font-bold text-amber-600",children:e.mediaUnresolved??0})]}),r.jsxs("div",{className:"flex justify-between py-1.5 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Categories detected"}),r.jsx("span",{className:"font-bold text-gray-700",children:e.categoriesDetected??0})]}),r.jsxs("div",{className:"flex justify-between py-1.5 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Tags detected"}),r.jsx("span",{className:"font-bold text-gray-700",children:e.tagsDetected??0})]})]})]}),r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[r.jsx("h3",{className:"font-bold text-gray-900 mb-4",children:"Batch Details"}),r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 text-sm",children:[r.jsxs("div",{className:"flex justify-between py-2 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Batch ID"}),r.jsx("code",{className:"font-mono font-bold text-gray-800 text-xs bg-gray-100 px-2 py-0.5 rounded",children:e.batchId})]}),r.jsxs("div",{className:"flex justify-between py-2 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Source File"}),r.jsx("span",{className:"font-medium text-gray-800",children:e.sourceFile})]}),r.jsxs("div",{className:"flex justify-between py-2 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Started"}),r.jsx("span",{className:"font-medium text-gray-800",children:ah(e.startTime)})]}),r.jsxs("div",{className:"flex justify-between py-2 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Completed"}),r.jsx("span",{className:"font-medium text-gray-800",children:ah(e.endTime)})]}),r.jsxs("div",{className:"flex justify-between py-2 border-b border-gray-100",children:[r.jsx("span",{className:"text-gray-500",children:"Performed By"}),r.jsx("span",{className:"font-medium text-gray-800",children:e.adminUser})]})]})]}),r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-5",children:[r.jsxs("h3",{className:"font-bold text-blue-800 mb-2 flex items-center gap-2",children:[r.jsx(ts,{className:"w-4 h-4"})," Rollback Available"]}),r.jsxs("p",{className:"text-blue-700 text-sm",children:["If you need to undo this import, use the ",r.jsx("strong",{children:"Import Batches & Rollback"})," button at the top of the page. Note your Batch ID: ",r.jsx("code",{className:"font-mono font-bold bg-blue-100 px-1 rounded",children:e.batchId})]}),r.jsx("p",{className:"text-blue-500 text-xs mt-2",children:"Rollback removes all Articles and Authors created in this batch. Existing records are unaffected."})]}),r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-6 py-4 flex items-center justify-between flex-wrap gap-3",children:[r.jsxs("h3",{className:"font-bold text-gray-900 flex items-center gap-2",children:[r.jsx(PG,{className:"w-4 h-4 text-gray-400"})," Full Import Log"]}),r.jsx("div",{className:"flex items-center gap-2",children:["all","success","skip","error"].map(m=>r.jsx("button",{onClick:()=>s(m),className:`px-3 py-1.5 rounded-lg text-xs font-bold capitalize transition-all ${n===m?m==="success"?"bg-green-500 text-white":m==="skip"?"bg-amber-500 text-white":m==="error"?"bg-red-500 text-white":"bg-gray-800 text-white":"bg-gray-100 text-gray-600 hover:bg-gray-200"}`,children:m},m))})]}),r.jsxs("div",{className:"divide-y divide-gray-50 max-h-96 overflow-y-auto",children:[i.length===0&&r.jsx("div",{className:"px-6 py-8 text-center text-gray-400 text-sm",children:"No entries for this filter"}),i.map((m,f)=>r.jsxs("div",{className:"flex items-start gap-3 px-6 py-3 hover:bg-gray-50/50",children:[m.type==="success"&&r.jsx(qt,{className:"w-4 h-4 text-green-500 shrink-0 mt-0.5"}),m.type==="skip"&&r.jsx(Lx,{className:"w-4 h-4 text-amber-500 shrink-0 mt-0.5"}),m.type==="error"&&r.jsx(Cl,{className:"w-4 h-4 text-red-500 shrink-0 mt-0.5"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("span",{className:`text-xs font-bold uppercase px-1.5 py-0.5 rounded ${m.type==="success"?"bg-green-100 text-green-700":m.type==="skip"?"bg-amber-100 text-amber-700":"bg-red-100 text-red-700"}`,children:m.type}),r.jsx("span",{className:"bg-gray-100 text-gray-600 text-xs px-1.5 py-0.5 rounded font-medium",children:m.entity}),r.jsx("span",{className:"text-gray-800 text-sm font-medium truncate max-w-sm",children:m.title})]}),m.reason&&r.jsx("p",{className:"text-gray-500 text-xs mt-0.5",children:m.reason})]}),r.jsx("span",{className:"text-gray-400 text-xs shrink-0",children:ah(m.time)})]},f))]})]}),r.jsxs("div",{className:"flex flex-wrap gap-3",children:[r.jsxs("button",{onClick:u,className:"flex items-center gap-2 px-6 py-3 bg-gray-100 text-gray-700 rounded-lg font-semibold text-sm hover:bg-gray-200 transition-colors",children:[r.jsx(hy,{className:"w-4 h-4"})," Export Log (.txt)"]}),r.jsxs("button",{onClick:t,className:"flex-1 flex items-center justify-center gap-2 bg-amber-500 text-white py-3 rounded-lg font-bold text-sm hover:bg-amber-600 transition-colors",children:[r.jsx(ts,{className:"w-4 h-4"})," Start New Import"]})]})]})}
766function Qce(e){return e?new Date(e).toLocaleString("en-GB",{day:"2-digit",month:"short",year:"numeric",hour:"2-digit",minute:"2-digit"}):"â"}function Zce({onClose:e,adminUser:t}){const[n,s]=j.useState([]),[a,i]=j.useState(null),[o,l]=j.useState(null),[c,u]=j.useState(null);j.useEffect(()=>{try{const f=JSON.parse(localStorage.getItem("cm_import_batches")||"[]");s(f)}catch{s([])}},[]);const m=async f=>{i(f.batchId);const p=[];let b=0,v=0;try{const g=await W.entities.Article.filter({import_batch_id:f.batchId});for(const y of g||[]){try{await W.entities.Article.delete(y.id),b++,p.push({type:"removed",entity:"Article",title:y.title})}catch(w){v++,p.push({type:"failed",entity:"Article",title:y.title,reason:w.message})}await new Promise(w=>setTimeout(w,30))}}catch(g){p.push({type:"error",entity:"Batch",title:f.batchId,reason:g.message})}try{const y=JSON.parse(localStorage.getItem("cm_import_batches")||"[]").filter(w=>w.batchId!==f.batchId);localStorage.setItem("cm_import_batches",JSON.stringify(y)),s(y)}catch{}i(null),u(null),l({batchId:f.batchId,removed:b,failed:v,log:p})};return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsxs("div",{className:"bg-gray-50 border-b border-gray-200 px-6 py-4 flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsxs("h2",{className:"font-bold text-gray-900 flex items-center gap-2",children:[r.jsx(yx,{className:"w-5 h-5 text-amber-500"})," Import Batches & Rollback"]}),r.jsx("p",{className:"text-gray-500 text-sm mt-0.5",children:"Manage and rollback previous content imports"})]}),r.jsx("button",{onClick:e,className:"text-gray-400 hover:text-gray-600 transition-colors",children:r.jsx(ni,{className:"w-5 h-5"})})]}),o&&r.jsxs("div",{className:"mx-6 mt-6 mb-4 bg-green-50 border border-green-200 rounded-xl p-5",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx(qt,{className:"w-5 h-5 text-green-600"}),r.jsx("h3",{className:"font-bold text-green-800",children:"Rollback Completed"})]}),r.jsxs("p",{className:"text-green-700 text-sm",children:["Batch ",r.jsx("code",{className:"font-mono bg-green-100 px-1 rounded",children:o.batchId}),":",r.jsxs("strong",{children:[" ",o.removed," records removed"]}),o.failed>0&&r.jsxs("span",{className:"text-amber-700",children:[", ",o.failed," failed"]})]}),r.jsx("div",{className:"mt-3 max-h-40 overflow-y-auto space-y-1",children:o.log.map((f,p)=>r.jsxs("div",{className:`text-xs flex items-center gap-2 ${f.type==="removed"?"text-green-600":"text-red-600"}`,children:[r.jsx("span",{className:"font-bold uppercase",children:f.type}),r.jsx("span",{children:f.entity}),r.jsx("span",{className:"text-gray-500 truncate",children:f.title})]},p))}),r.jsx("button",{onClick:()=>l(null),className:"mt-3 text-xs text-green-600 hover:text-green-800 underline",children:"Dismiss"})]}),r.jsx("div",{className:"p-6",children:n.length===0?r.jsxs("div",{className:"text-center py-10",children:[r.jsx(yx,{className:"w-10 h-10 text-gray-300 mx-auto mb-3"}),r.jsx("p",{className:"text-gray-400 font-medium",children:"No import batches found"}),r.jsx("p",{className:"text-gray-400 text-sm mt-1",children:"Import batches will appear here after you run your first import"})]}):r.jsx("div",{className:"space-y-4",children:n.map((f,p)=>r.jsxs("div",{className:"border border-gray-200 rounded-xl overflow-hidden",children:[r.jsxs("div",{className:"flex items-center justify-between p-5 bg-gray-50",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[r.jsx("code",{className:"font-mono text-xs bg-gray-200 text-gray-700 px-2 py-0.5 rounded",children:f.batchId}),r.jsx("span",{className:"text-gray-500 text-sm",children:f.sourceFile})]}),r.jsxs("div",{className:"flex items-center gap-4 text-xs text-gray-500",children:[r.jsx("span",{children:Qce(f.startTime)}),r.jsxs("span",{children:["By: ",f.adminUser]})]})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("div",{className:"text-right text-xs",children:[r.jsxs("span",{className:"text-green-600 font-bold",children:[f.successCount," imported"]}),f.skipCount>0&&r.jsxs("span",{className:"text-amber-600 font-bold ml-2",children:[f.skipCount," skipped"]}),f.errorCount>0&&r.jsxs("span",{className:"text-red-600 font-bold ml-2",children:[f.errorCount," errors"]})]}),c===f.batchId?r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>m(f),disabled:a===f.batchId,className:"flex items-center gap-1 bg-red-600 text-white px-4 py-2 rounded-lg text-sm font-bold hover:bg-red-700 transition-colors disabled:opacity-50",children:[a===f.batchId?r.jsx(va,{className:"w-3 h-3 animate-spin"}
766):r.jsx(my,{className:"w-3 h-3"}),"Confirm Rollback"]}),r.jsx("button",{onClick:()=>u(null),className:"text-gray-400 hover:text-gray-600 text-xs underline",children:"Cancel"})]}):r.jsxs("button",{onClick:()=>u(f.batchId),className:"flex items-center gap-2 border border-red-300 text-red-600 px-4 py-2 rounded-lg text-sm font-semibold hover:bg-red-50 transition-colors",children:[r.jsx(yx,{className:"w-3.5 h-3.5"})," Rollback"]})]})]}),c===f.batchId&&r.jsxs("div",{className:"border-t border-amber-200 bg-amber-50 p-4 flex items-start gap-3",children:[r.jsx(da,{className:"w-4 h-4 text-amber-600 shrink-0 mt-0.5"}),r.jsxs("p",{className:"text-amber-800 text-sm",children:["This will permanently delete all ",r.jsxs("strong",{children:[f.successCount," records"]})," created in this batch. This cannot be undone. Records that existed before this import will not be affected."]})]})]},p))})})]}),r.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-xl p-5 text-sm text-blue-800",children:[r.jsx("strong",{children:"Note:"})," Rollback only removes records that were imported in that specific batch (identified by batch ID). It will not affect any existing content, articles, or authors that existed before the import."]})]})}function ede({onClose:e}){var g,y,w,N,S,A,k;const[t,n]=j.useState(null),[s,a]=j.useState(null),[i,o]=j.useState(!1),[l,c]=j.useState(!1),[u,m]=j.useState(null),[f,p]=j.useState(null),b=async C=>{var P;const T=(P=C.target.files)==null?void 0:P[0];if(T){n(T),p(null),o(!0);try{const R=await T.text(),M=await fetch("/api/functions/updateArticleContentByWpId",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({xmlContent:R,previewOnly:!0})}),D=await M.json();M.ok?a(D):p(D.error||"Failed to preview updates")}catch(R){p(R.message)}finally{o(!1)}}},v=async()=>{if(t){c(!0),p(null);try{const C=await t.text(),T=await W.functions.invoke("updateArticleContentByWpId",{xmlContent:C});m(T)}catch(C){p(C.message)}finally{c(!1)}}};return r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 p-6",children:[r.jsx("h2",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Content-Only Update"}),r.jsx("p",{className:"text-gray-600",children:"Upload WordPress XML to update article content fields only. No new records created. Matched by wp_id."})]}),!s&&!u&&r.jsx("div",{className:"bg-white rounded-xl border-2 border-dashed border-gray-300 p-12 text-center",children:r.jsxs("label",{className:"cursor-pointer",children:[r.jsx("input",{type:"file",accept:".xml",onChange:b,className:"hidden",disabled:i}),r.jsx("div",{className:"flex flex-col items-center gap-3",children:i?r.jsxs(r.Fragment,{children:[r.jsx(va,{className:"w-8 h-8 text-amber-500 animate-spin"}),r.jsx("span",{className:"font-semibold text-gray-700",children:"Analyzing XML..."})]}):r.jsxs(r.Fragment,{children:[r.jsx(Jm,{className:"w-8 h-8 text-gray-400"}),r.jsx("span",{className:"font-semibold text-gray-900",children:"Select WordPress XML"}),r.jsx("span",{className:"text-sm text-gray-500",children:"or drag and drop"})]})})]})}),s&&!u&&r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsxs("div",{className:"bg-blue-50 border-b border-blue-200 p-6",children:[r.jsx("h3",{className:"font-bold text-blue-900 text-lg mb-1",children:"Preview â Expected Updates"}),r.jsx("p",{className:"text-blue-700 text-sm",children:"Review before executing the content update."})]}),r.jsxs("div",{className:"p-6 space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-5 gap-4",children:[r.jsxs("div",{className:"bg-blue-50 p-4 rounded-lg",children:[r.jsx("div",{className:"text-2xl font-bold text-blue-700",children:s.totalInXML}),r.jsx("div",{className:"text-blue-600 text-xs font-medium",children:"Articles in XML"})]}),r.jsxs("div",{className:"bg-green-50 p-4 rounded-lg",children:[r.jsx("div",{className:"text-2xl font-bold text-green-700",children:s.matched}),r.jsx("div",{className:"text-green-600 text-xs font-medium",children:"Matched by wp_id"})]}),r.jsxs("div",{className:"bg-amber-50 p-4 rounded-lg",children:[r.jsx("div",{className:"text-2xl font-bold text-amber-700",children:s.contentUpdated}),r.jsx("div",{className:"text-amber-600 text-xs font-medium",children:"Content to Update"})]}),r.jsxs("div",{className:"bg-purple-50 p-4 rounded-lg",children:[r.jsx("div",{className:"text-2xl font-bold text-purple-700",children:s.imageUpdated}),r.jsx("div",{className:"text-purple-600 text-xs font-medium",children:"Images (if empty)"})]}),r.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[r.jsx("div",{className:"text-2xl font-bold text-gray-700",children:"0"}),r.jsx("div",{className:"text-gray-600 text-xs font-medium",children:"New Records"})]})]}),((g=s.errors)==null?void 0:g.length)>0&&r.jsxs("div",{className:"bg-red-50 border border-red-200 p-4 rounded-lg",children:[r.jsxs("p",{className:"font-bold text-red-800 mb
766-2",children:["â Errors (",s.errors.length,")"]}),r.jsx("ul",{className:"text-red-700 text-sm space-y-1",children:s.errors.slice(0,5).map((C,T)=>r.jsxs("li",{children:["⢠",C.title||C.wp_id,": ",C.error]},T))})]})]}),r.jsxs("div",{className:"bg-gray-50 border-t border-gray-200 p-6 flex gap-3",children:[r.jsx("button",{onClick:()=>{a(null),n(null)},className:"px-6 py-3 bg-gray-100 text-gray-700 rounded-lg font-semibold hover:bg-gray-200 transition-colors",children:"Upload Different File"}),r.jsx("button",{onClick:v,disabled:l,className:"flex-1 flex items-center justify-center gap-2 bg-green-600 text-white py-3 rounded-lg font-bold hover:bg-green-700 transition-colors disabled:opacity-50",children:l?r.jsxs(r.Fragment,{children:[r.jsx(va,{className:"w-5 h-5 animate-spin"})," Updating..."]}):r.jsxs(r.Fragment,{children:[r.jsx(qt,{className:"w-5 h-5"})," Execute Update (",s.matched," Records)"]})})]})]}),u&&r.jsxs("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:[r.jsx("div",{className:`border-b p-6 ${((y=u.errors)==null?void 0:y.length)>0?"bg-amber-50 border-amber-200":"bg-green-50 border-green-200"}`,children:r.jsx("h3",{className:`font-bold text-lg ${((w=u.errors)==null?void 0:w.length)>0?"text-amber-900":"text-green-900"}`,children:((N=u.errors)==null?void 0:N.length)>0?"â Update Complete with Errors":"â Update Complete"})}),r.jsxs("div",{className:"p-6 space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[r.jsxs("div",{className:"bg-green-50 p-4 rounded-lg",children:[r.jsx("div",{className:"text-2xl font-bold text-green-700",children:u.matched}),r.jsx("div",{className:"text-green-600 text-xs font-medium",children:"Articles Matched"})]}),r.jsxs("div",{className:"bg-blue-50 p-4 rounded-lg",children:[r.jsx("div",{className:"text-2xl font-bold text-blue-700",children:u.contentUpdated}),r.jsx("div",{className:"text-blue-600 text-xs font-medium",children:"Content Updated"})]}),r.jsxs("div",{className:"bg-purple-50 p-4 rounded-lg",children:[r.jsx("div",{className:"text-2xl font-bold text-purple-700",children:u.imageUpdated}),r.jsx("div",{className:"text-purple-600 text-xs font-medium",children:"Images Updated"})]}),r.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg",children:[r.jsx("div",{className:"text-2xl font-bold text-gray-700",children:((S=u.errors)==null?void 0:S.length)||0}),r.jsx("div",{className:"text-gray-600 text-xs font-medium",children:"Errors"})]})]}),((A=u.errors)==null?void 0:A.length)>0&&r.jsxs("div",{className:"bg-red-50 border border-red-200 p-4 rounded-lg",children:[r.jsxs("p",{className:"font-bold text-red-800 mb-2",children:["Failed Updates (",u.errors.length,")"]}),r.jsx("ul",{className:"text-red-700 text-sm space-y-1",children:u.errors.map((C,T)=>r.jsxs("li",{children:["⢠",C.title||C.wp_id,": ",C.error]},T))})]}),r.jsxs("div",{className:"bg-gray-50 p-4 rounded-lg max-h-64 overflow-y-auto",children:[r.jsx("p",{className:"font-bold text-gray-700 mb-2 text-sm",children:"Updated Records"}),r.jsx("div",{className:"space-y-2",children:(k=u.matchedArticles)==null?void 0:k.slice(0,20).map((C,T)=>r.jsxs("div",{className:"text-xs bg-white p-2 rounded border border-gray-200",children:[r.jsx("span",{className:"font-bold text-gray-800",children:C.title}),r.jsxs("span",{className:"text-gray-500 ml-2",children:["â ",C.updates.join(", ")]})]},T))})]})]}),r.jsx("div",{className:"bg-gray-50 border-t border-gray-200 p-6 flex gap-3",children:r.jsx("button",{onClick:e,className:"flex-1 px-6 py-3 bg-gray-900 text-white rounded-lg font-semibold hover:bg-gray-800 transition-colors",children:"Close"})})]}),f&&r.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4 flex items-start gap-3",children:[r.jsx(Cl,{className:"w-5 h-5 text-red-600 shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("p",{className:"font-bold text-red-800",children:"Error"}),r.jsx("p",{className:"text-red-700 text-sm",children:f})]})]})]})}const Yp=[{id:"upload",label:"Upload",icon:Jm},{id:"analysis",label:"Analysis",icon:JL},{id:"preview",label:"Preview",icon:Nr},{id:"mapping",label:"Mapping",icon:o8},{id:"queue",label:"Queue",icon:lG},{id:"approve",label:"Approve",icon:qt},{id:"log",label:"Import Log",icon:r8}];function tde(){var y;const{user:e,isLoadingAuth:t}=vo(),[n,s]=j.useState("upload"),[a,i]=j.useState(null),[o,l]=j.useState(null),[c,u]=j.useState(null),[m,f]=j.useState(!1),[p,b]=j.useState(!1);if(t)return r.jsx("div",{className:"flex items-center justify-center min-h-screen bg-gray-50",children:r.jsx("div",{className:"w-8 h-8 border-4 border-gray-200 border-t-gray-800 rounded-full animate-spin"})});if(!e||e.role!=="admin")return r.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center px-4",children:r.jsxs("div",{className:"bg-white rounded-xl shadow-lg border border-gray-200 p-10 max-w-md text-center",children:[r.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4",children:r.jsx(da,{className:"w-8 h-8 text-red-600"})}),r.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:"Admin Access Required"}),r.jsx("p",{className:"text-gray-600 mb-6",children:"The Content Import Studio is restricted to administrators only."}),r.jsxs(se,{to:"/",className:"inline-flex items-center gap-2 bg-gray-900 text-white px-6 py-3 rounded-lg font-semibold hover:bg-gray-800 transition-colors",children:[r.jsx(NP,{className:"w-4 h-4"})," Return to Homepage"]})]})});const v=Yp.findIndex(w=>w.id===n),g=w=>{const N=Yp.findIndex(S=>S.id===w);return N===0?!0:N===1||N===2||N===3?!!a:N===4||N===5?!!o:N===6?!!c:!1};return r.jsxs("div",{className:"min-h-screen bg-gray-50",children:[r.jsx("div",{className:"bg-gray-900 text-white border-b border-gray-700",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-4 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsxs(se,{to:"/",className:"text-gray-400 hover:text-white transition-colors text-sm flex items-center gap-1",children:[r.jsx(NP,{className:"w-3.5 h-3.5"})," Chelsea Monthly"]}),r.jsx(Us,{className:"w-3.5 h-3.5 text-gray-600"}),r.jsx("span",{className:"text-white font-semibold text-sm",children:"Admin"}),r.jsx(Us,{className:"w-3.5 h-3.5 text-gray-600"}),r.jsx("span",{className:"text-amber-400 font-semibold text-sm",children:"Content Import Studio"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("button",{onClick:()=>f(!m),className:`flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-semibold transition-all duration-200 ${m?"bg-amber-500 text-white":"bg-gray-700 text-gray-300 hover:bg-gray-600"}`,children:[r.jsx(yx,{className:"w-3.5 h-3.5"})," Import Batches & Rollback"]}),r.jsxs("div",{className:"flex items-center gap-2 bg-gray-800 rounded-lg px-3 py-2",children:[r.jsx("div",{className:"w-6 h-6 bg-amber-500 rounded-full flex items-center justify-center text-white text-xs font-bold",children:((y=e==null?void 0:e.full_name)==null?void 0:y[0])||"A"}),r.jsx("span",{className:"text-gray-300 text-sm",children:(e==null?void 0:e.full_name)||"Admin"}),r.jsx("span",{className:"bg-amber-500/20 text-amber-400 text-xs px-1.5 py-0.5 rounded font-bold",children:"ADMIN"})]})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[r.jsxs("div",{className:"mb-8",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[r.jsx("div",{className:"w-10 h-10 bg-amber-500 rounded-lg flex items-center justify-center",children:r.jsx(rk,{className:"w-5 h-5 text-white"})}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Content Import Studio"}),r.jsx("p",{className:"text-gray-500 text-sm",children:"Import WordPress exports and CSV files into the Chelsea Monthly CMS"})]})]}),r.jsx("button",{onClick:()=>b(!p),className:`mt-4 px-4 py-2 rounded-lg font-semibold text-sm transition-all ${p?"bg-green-600 text-white":"bg-green-100 text-green-700 hover:bg-green-200"}`,children:p?"â Back to Full Import":"â¡ Fast Content-Only Update"})]}),p?r.jsx(ede,{onClose:()=>b(!1)}):m?r.jsx(Zce,{onClose:()=>f(!1),adminUser:e}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"bg-white rounded-xl border border-gray-200 shadow-sm mb-6 overflow-hidden",children:r.jsx("div",{className:"flex",children:Yp.map((w,N)=>{const S=w.icon,A=w.id===n,k=N<v,C=g(w.id);return r.jsxs("button",{onClick:()=>C&&s(w.id),disabled:!C,className:`flex-1 flex items-center justify-center gap-2 py-4 text-sm font-semibold transition-all duration-200 border-b-2 relative 767 ${A?"border-amber-500 text-amber-600 bg-amber-50":""} 768 ${k&&!A?"border-green-500 text-green-600 bg-green-50":""} 769 ${!A&&!k?"border-transparent text-gray-400":""} 770 ${C&&!A?"hover:bg-gray-50 cursor-pointer":""} 771 ${C?"":"cursor-not-allowed opacity-50"} 772 `,children:[k&&!A?r.jsx(qt,{className:"w-4 h-4 text-green-500"}):r.jsx(S,{className:"w-4 h-4"}),r.jsx("span",{className:"hidden sm:inline",children:w.label}),N<Yp.length-1&&r.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-6 bg-gray-200"})]},w.id)})})}),r.jsxs("div",{children:[n==="upload"&&r.jsx($ce,{onParsed:w=>{i(w),s("analysis")}}),n==="analysis"&&a&&r.jsx(Fce,{data:a,onContinue:()=>s("preview"),onBack:()=>s("upload")}),n==="preview"&&a&&r.jsx(qce,{data:a,onNext:()=>s("mapping"),onBack:()=>s("upload")}),n==="mapping"&&a&&r.jsx(Wce,{data:a,onNext:w=>{l(w),s("queue")},onBack:()=>s("preview")}),n==="queue"&&a&&o&&r.jsx(Gce,{data:a,mappingConfig:o,onNext:()=>s("approve"),onBack:()=>s("mapping")}),n==="approve"&&a&&o&&r.jsx(Xce,{data:a,mappingConfig:o,adminUser:e,onImportComplete:w=>{u(w),s("log")},onBack:()=>s("mapping")}),n==="log"&&c&&r.jsx(Jce,{batch:c,onNewImport:()=>{i(null),l(null),u(null),s("upload")}})]})]})]})]})}function rde({raw:e,articles:t,isLoading:n,fetchError:s}){const a=t.filter(l=>l.wp_id||l.original_wordpress_id),i=t.filter(l=>!l.wp_id&&!l.original_wordpress_id),o=e.slice(0,5);return r.jsxs("div",{className:"bg-gray-900 text-green-300 font-mono text-xs p-5 rounded-lg border-2 border-amber-500 space-y-3",children:[r.jsx("div",{className:"text-amber-400 font-bold text-sm uppercase tracking-widest",children:"â Database Diagnostic"}),r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-3",children:[r.jsxs("div",{className:"bg-gray-800 p-2 rounded",children:[r.jsx("div",{className:"text-gray-400",children:"Total Articles"}),r.jsx("div",{className:"text-white font-bold text-lg",children:e.length})]}),r.jsxs("div",{className:"bg-gray-800 p-2 rounded",children:[r.jsx("div",{className:"text-gray-400",children:"Imported (WP)"}),r.jsx("div",{className:"text-green-400 font-bold text-lg",children:a.length})]}),r.jsxs("div",{className:"bg-gray-800 p-2 rounded",children:[r.jsx("div",{className:"text-gray-400",children:"Seed/Demo"}),r.jsx("div",{className:"text-blue-400 font-bold text-lg",children:i.length})]}),r.jsxs("div",{className:"bg-gray-800 p-2 rounded",children:[r.jsx("div",{className:"text-gray-400",children:"Loading"}),r.jsx("div",{className:n?"text-yellow-400 font-bold":"text-green-400 font-bold",children:String(n)})]}),r.jsxs("div",{className:"bg-gray-800 p-2 rounded",children:[r.jsx("div",{className:"text-gray-400",children:"Error Status"}),r.jsx("div",{className:s?"text-red-400 font-bold":"text-green-400",children:s||"none"})]})]}),o.length>0&&r.jsxs("div",{className:"overflow-x-auto",children:[r.jsx("div",{className:"text-amber-400 mb-2 font-bold",children:"Sample Records (first 5):"}),r.jsxs("table",{className:"w-full text-left border-collapse text-[11px]",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"text-gray-400 border-b border-gray-700",children:[r.jsx("th",{className:"pr-3 pb-1",children:"#"}),r.jsx("th",{className:"pr-3 pb-1 min-w-[200px]",children:"Title"}),r.jsx("th",{className:"pr-3 pb-1 min-w-[120px]",children:"Slug"}),r.jsx("th",{className:"pr-3 pb-1 min-w-[200px]",children:"image_url"})]})}),r.jsx("tbody",{children:o.map((l,c)=>r.jsxs("tr",{className:"border-b border-gray-800 align-top",children:[r.jsx("td",{className:"pr-3 py-1 text-gray-500",children:c+1}),r.jsx("td",{className:"pr-3 py-1 text-white",children:(l.title||"â").slice(0,50)}),r.jsx("td",{className:"pr-3 py-1 text-cyan-400",children:l.slug||"â"}),r.jsx("td",{className:"pr-3 py-1 text-yellow-300",children:l.image_url?"â":"EMPTY"})]},c))})]})]})]})}
772function nde(){const e=ka(),[t,n]=j.useState(null),[s,a]=j.useState([]),[i,o]=j.useState([]),[l,c]=j.useState(!0),[u,m]=j.useState(null);return j.useEffect(()=>{W.auth.me().then(f=>{n(f),(f==null?void 0:f.role)!=="admin"&&e("/")}).catch(()=>e("/login")),W.entities.Article.list("-created_date",500).then(f=>{a(f),o(f),c(!1)}).catch(f=>{m((f==null?void 0:f.message)||String(f)),c(!1)})},[e]),t&&t.role!=="admin"?r.jsx("div",{className:"flex items-center justify-center min-h-screen",children:r.jsxs("div",{className:"text-center",children:[r.jsx(Ln,{className:"w-12 h-12 text-destructive mx-auto mb-4"}),r.jsx("p",{className:"text-foreground font-semibold",children:"Admin access required"})]})}):r.jsx("div",{className:"min-h-screen bg-background",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-12",children:[r.jsx("h1",{className:"text-4xl font-bold text-foreground mb-2",style:{fontFamily:"'Montserrat', sans-serif"},children:"Admin Dashboard"}),r.jsx("p",{className:"text-muted-foreground mb-8",children:"Database insights and diagnostic tools"}),r.jsxs("div",{className:"space-y-8",children:[r.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4",children:[r.jsxs("div",{className:"bg-card rounded-lg border border-border p-6",children:[r.jsx(rk,{className:"w-8 h-8 text-primary mb-2"}),r.jsx("div",{className:"text-2xl font-bold text-foreground",children:s.length}),r.jsx("div",{className:"text-muted-foreground text-sm",children:"Total Articles"})]}),r.jsxs("div",{className:"bg-card rounded-lg border border-border p-6",children:[r.jsx(vt,{className:"w-8 h-8 text-primary mb-2"}),r.jsx("div",{className:"text-2xl font-bold text-foreground",children:"â"}),r.jsx("div",{className:"text-muted-foreground text-sm",children:"Authors"})]}),r.jsxs("div",{className:"bg-card rounded-lg border border-border p-6",children:[r.jsx(Ih,{className:"w-8 h-8 text-primary mb-2"}),r.jsx("div",{className:"text-2xl font-bold text-foreground",children:"â"}),r.jsx("div",{className:"text-muted-foreground text-sm",children:"Categories"})]}),r.jsxs("div",{className:"bg-card rounded-lg border border-border p-6",children:[r.jsx(Xm,{className:"w-8 h-8 text-primary mb-2"}),r.jsx("div",{className:"text-2xl font-bold text-foreground",children:"â"}),r.jsx("div",{className:"text-muted-foreground text-sm",children:"Images"})]})]}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold text-foreground mb-4",children:"Publishing Tools"}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:r.jsxs("button",{onClick:()=>e("/admin/instagram"),className:"flex items-center gap-4 bg-card rounded-lg border border-border p-6 text-left hover:border-primary transition-colors",children:[r.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-lg flex items-center justify-center flex-shrink-0",children:r.jsx(uo,{className:"w-6 h-6 text-primary"})}),r.jsxs("div",{children:[r.jsx("div",{className:"text-lg font-bold text-foreground",children:"Instagram Studio"}),r.jsx("div",{className:"text-sm text-muted-foreground",children:"Post branded articles and custom images to Instagram"})]})]})})]}),r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold text-foreground mb-4",children:"Diagnostics"}),r.jsx(rde,{raw:s,articles:i,isLoading:l,fetchError:u})]})]})]})})}const sde=W.entities.Author,Rc=({children:e,className:t,delay:n=0})=>{const s=j.useRef(null),[a,i]=j.useState(!1);return j.useEffect(()=>{const o=s.current;if(!o)return;if(o.getBoundingClientRect().top<window.innerHeight){i(!0);return}const c=setTimeout(()=>i(!0),800+n),u=new IntersectionObserver(([m])=>{m.isIntersecting&&(clearTimeout(c),setTimeout(()=>i(!0),n),u.unobserve(o))},{threshold:.05,rootMargin:"0px 0px 200px 0px"});return u.observe(o),()=>{u.disconnect(),clearTimeout(c)}},[n]),r.jsx("div",{ref:s,className:`transition-all duration-700 ${a?"opacity-100 translate-y-0":"opacity-0 translate-y-8"} ${t||""}`,children:e})},ade=[{id:"1",name:"Jeff Armstrong",bio:"Jeff Armstrong is Chelsea Monthly's Editor-at-Large, covering the intersection of luxury travel, culture and celebrity. With over 15 years of experience reporting from the world's most exclusive destinations, Jeff brings unrivalled access and insight to every story.",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/b4c0623e0_secure_gravatar_com_373e5a563d5d17521467f1c7995b5a3e9e14012cbb1f0a03e10e0b22ebbf503b_19d2de08.png",role:"Editor-at-Large",social_twitter:"@jeffarmstrong",social_instagram:"@jeffarmstrongcm",articles_count:312,speciality:"Travel, Culture, Celebrity"},{id:"2",name:"Lesley Cameron",bio:"Lesley Cameron is a senior correspondent and luxury travel specialist at Chelsea Monthly. Having visited over 90 countries, she writes with authority on five-star hotels, award-winning destinations and the future of luxury travel.",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/abf2abdc6_secure_gravatar_com_140a3cd601690e759127f33daff3ac213f65794cc52ca294703da8ca4e74442d_c41734ab.png",role:"Senior Travel Correspondent",social_twitter:"@lesleycameron",social_instagram:"@lesleycameroncm",articles_count:187,speciality:"Luxury Travel, Hotels, Destinations"},{id:"3",name:"Gary Brooker",bio:"Gary Brooker is Chelsea Monthly's Arts and Culture Editor, specialising in music, performance and the arts. A former concert reviewer for The Times, Gary brings sophisticated critical perspective to every cultural story.",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/f24e36897_secure_gravatar_com_a64da8f52fa826c1f09c56d7f3ab82ac1ae626a81d170c14595fb55046e8810e_39cb60c6.png",role:"Arts & Culture Editor",s
772ocial_twitter:"@garybrooker",social_instagram:"@garybookercm",articles_count:145,speciality:"Music, Arts, Culture"},{id:"4",name:"Jordan Kensington",bio:"Jordan Kensington covers dining, property and lifestyle for Chelsea Monthly. A passionate food writer and restaurant critic, Jordan has reviewed Michelin-starred restaurants across Europe and Asia.",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/ce95dd3d7_secure_gravatar_com_87e9ffed61d2afe8c6c533740111d168ac4c6df267f5702868a8dd321ec67a43_ff565c62.png",role:"Dining & Lifestyle Writer",social_twitter:"@jordankensington",social_instagram:"@jordankensingtoncm",articles_count:98,speciality:"Dining, Property, Lifestyle"}],ide=[{label:"Expert Contributors",value:"12+",icon:vt},{label:"Articles Published",value:"5,200+",icon:Yd},{label:"Awards & Recognition",value:"28",icon:Pn}],ode=[{title:"Where Every Journey Tells a Story",author:"Jeff Armstrong",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/a0f26cbaf_chelseamonthly_com_people-walking-though-tuscan-scenery-36855-1000x550_c2393e74.jpg",category:"Travel & Lifestyle"},{title:"The World Is Travelling Again",author:"Lesley Cameron",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/6c953aa23_chelseamonthly_com_Heritage-Awali-hotel-Mauritius-1-540x370_68149028.jpg",category:"Travel & Lifestyle"},{title:"Emma Nuule: The Crossover Soprano",author:"Gary Brooker",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/d5e0542a8_chelseamonthly_com_1000036087-540x540_b9ced448.webp",category:"Music"},{title:"Discover London's Best Kept Secret",author:"Jordan Kensington",image_url:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/40fa05e9e_chelseamonthly_com_eighthotel-540x540_c86ef96f.jpg",category:"Travel & Lifestyle"}];function lde(){const[e,t]=j.useState([]),[n,s]=j.useState(null);j.useEffect(()=>{sde.list("-updated_date",20).then(t).catch(()=>{})},[]);const a=e.length>0?e:ade;return r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"relative bg-secondary overflow-hidden",style:{minHeight:"40vh"},children:[r.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[r.jsx("div",{className:"absolute top-0 left-1/3 w-96 h-96 bg-primary/10 rounded-full blur-[120px]"}),r.jsx("div",{className:"absolute bottom-0 right-1/4 w-72 h-72 bg-accent/10 rounded-full blur-[100px]"})]}),r.jsx("div",{className:"relative z-10 flex flex-col items-center justify-center text-center px-6",style:{minHeight:"40vh"},children:r.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7},children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-widest mb-3 block",children:"The Voices Behind"}),r.jsx("h1",{className:"text-5xl sm:text-6xl font-bold text-secondary-foreground mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Our Contributors"}),r.jsx("p",{className:"text-secondary-foreground/60 text-lg max-w-xl",children:"Chelsea Monthly's world-class editorial team â writers, critics and correspondents."})]})})]}),r.jsx(Rc,{children:r.jsx("section",{className:"py-12 bg-muted border-b border-border",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6",children:r.jsx("div",{className:"grid grid-cols-3 gap-6 max-w-2xl mx-auto",children:ide.map((i,o)=>r.jsxs("div",{className:"text-center",children:[r.jsx(i.icon,{className:"w-6 h-6 text-primary mx-auto mb-2"}),r.jsx("div",{className:"text-3xl font-bold text-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:i.value}),r.jsx("div",{className:"text-muted-foreground text-xs uppercase tracking-widest mt-1",children:i.label})]},o))})})})}),r.jsx(Rc,{children:r.jsx("section",{className:"py-16 bg-background",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6",children:r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-8",children:a.map((i,o)=>r.jsx(Rc,{delay:o*100,children:r.jsx("div",{className:`group p-px rounded-sm cursor-pointer transition-all duration-500 ${n===o?"bg-gradient-to-br from-primary via-primary/50 to-accent":"bg-gradient-to-br from-border via-trans
772parent to-border hover:from-primary/50 hover:to-accent/30"}`,onClick:()=>s(n===o?null:o),children:r.jsxs("div",{className:"bg-card rounded-sm p-6 h-full",children:[r.jsxs("div",{className:"flex items-start gap-5 mb-5",children:[r.jsx("div",{className:"relative shrink-0",children:r.jsx("div",{className:`w-20 h-20 rounded-full p-0.5 ${n===o?"bg-gradient-to-br from-primary to-accent":"bg-border group-hover:bg-gradient-to-br group-hover:from-primary group-hover:to-accent transition-all duration-300"}`,children:r.jsx("img",{src:i.image_url,alt:i.name,className:"w-full h-full rounded-full object-cover"})})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("h2",{className:"text-xl font-bold text-card-foreground group-hover:text-primary transition-colors",style:{fontFamily:"'Montserrat', sans-serif"},children:i.name}),r.jsx("p",{className:"text-primary text-xs font-bold uppercase tracking-widest mb-1",children:i.role}),r.jsx("p",{className:"text-muted-foreground text-xs",children:i.speciality}),r.jsxs("span",{className:"inline-block mt-2 bg-muted text-muted-foreground text-xs px-2 py-0.5 rounded-sm font-bold",children:[i.articles_count," articles"]})]})]}),r.jsx("p",{className:`text-muted-foreground text-sm leading-relaxed mb-4 ${n===o?"":"line-clamp-2"}`,children:i.bio}),r.jsxs("div",{className:"flex items-center justify-between pt-4 border-t border-border",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[i.social_twitter&&r.jsx("a",{href:"#",onClick:l=>l.stopPropagation(),className:"w-8 h-8 bg-muted hover:bg-primary hover:text-primary-foreground rounded-sm flex items-center justify-center transition-all duration-200",children:r.jsx(gd,{className:"w-3.5 h-3.5"})}),i.social_instagram&&r.jsx("a",{href:"#",onClick:l=>l.stopPropagation(),className:"w-8 h-8 bg-muted hover:bg-primary hover:text-primary-foreground rounded-sm flex items-center justify-center transition-all duration-200",children:r.jsx(uo,{className:"w-3.5 h-3.5"})})]}),r.jsxs("span",{className:"text-primary text-xs font-bold uppercase tracking-widest flex items-center gap-1",children:["View Articles ",r.jsx(_t,{className:"w-3 h-3"})]})]})]})})},i.id||o))})})})}),r.jsx(Rc,{children:r.jsx("section",{className:"py-16 bg-secondary",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[r.jsxs("h2",{className:"text-3xl font-bold text-secondary-foreground mb-8",style:{fontFamily:"'Montserrat', sans-serif"},children:["Recent from Our ",r.jsx("span",{className:"text-primary",children:"Team"})]}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-
7725",children:ode.map((i,o)=>r.jsx(Rc,{delay:o*80,children:r.jsxs("a",{href:"#",className:"group block hover:-translate-y-1 transition-all duration-300",children:[r.jsxs("div",{className:"relative overflow-hidden rounded-sm mb-3",children:[r.jsx("img",{src:i.image_url,alt:i.title,className:"w-full aspect-[4/3] object-cover group-hover:scale-105 transition-transform duration-500"}),r.jsx("div",{className:"absolute inset-0 bg-secondary/40 group-hover:bg-secondary/20 transition-all duration-300"}),r.jsx("div",{className:"absolute bottom-3 left-3",children:r.jsx("span",{className:"bg-primary/90 text-primary-foreground text-xs font-bold px-2 py-0.5",children:i.category})})]}),r.jsx("h4",{className:"text-sm font-bold text-secondary-foreground group-hover:text-primary transition-colors leading-tight line-clamp-2",style:{fontFamily:"'Montserrat', sans-serif"},children:i.title}),r.jsxs("p",{className:"text-secondary-foreground/50 text-xs mt-1",children:["By ",i.author]})]})},o))})]})})}),r.jsx(Rc,{children:r.jsx("section",{className:"py-16 bg-background",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-widest block mb-3",children:"Contribute"}),r.jsx("h2",{className:"text-3xl font-bold text-foreground mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Write for Chelsea Monthly"}),r.jsx("p",{className:"text-muted-foreground text-lg mb-8",children:"Are you a journalist, writer or expert in luxury lifestyle, travel, culture or fashion? We'd love to hear from you."}),r.jsxs("a",{href:"#",className:"inline-flex items-center gap-2 bg-primary text-primary-foreground px-10 py-4 font-bold text-sm uppercase tracking-widest hover:shadow-lg hover:shadow-primary/30 hover:-translate-y-0.5 transition-all duration-300",children:["Get in Touch ",r.jsx(_t,{className:"w-4 h-4"})]})]})})})]})}const cde={Travel:"bg-[hsl(199,70%,55%)] text-white",Lifestyle:"bg-[hsl(160,50%,50%)] text-white",Entertainment:"bg-[hsl(340,70%,60%)] text-white","Fashion & Style":"bg-[hsl(330,40%,70%)] text-white",Motoring:"bg-[hsl(220,20%,50%)] text-white",Property:"bg-[hsl(150,30%,50%)] text-white",Business:"bg-[hsl(210,60%,50%)] text-white"},x3=e=>cde[e]||"bg-primary text-primary-foreground",dde=["All","Travel","Lifestyle","Entertainment","Fashion & Style","Motoring","Property","Business"];function g3({item:e,featured:t}){const n=e.excerpt||(e.content?e.content.replace(/<[^>]*>/g,"").slice(0,160):""),s=rg(e);return t?r.jsx(se,{to:bn(e),className:"group block mb-12",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-0 rounded-sm overflow-hidden shadow-xl hover:shadow-2xl hover:shadow-primary/10 transition-all duration-500",children:[r.jsxs("div",{className:"relative overflow-hidden",style:{minHeight:"360px"},children:[r.jsx(Dn,{src:e.image_url,category:e.category,articleId:e.id,alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-700",style:{minHeight:"360px"}}),r.jsx("div",{className:"absolute top-6 left-6",children:r.jsx("span",{className:"bg-primary text-primary-foreground text-xs font-bold px-3 py-1.5 uppercase tracking-widest",children:"Featured"})})]}),r.jsxs("div",{className:"bg-secondary p-10 flex flex-col justify-center",children:[e.category&&r.jsx("span",{className:`text-xs font-bold px-2 py-1 mb-4 inline-block w-fit uppercase tracking-widest ${x3(e.category)}`,children:e.category}),r.jsx("h2",{className:"text-2xl font-bold text-secondary-foreground leading-tight mb-4 group-hover:text-primary transition-colors",style:{fontFamily:"'Montserrat', sans-serif"},children:e.title}),n&&r.jsx("p",{className:"text-secondary-foreground/70 mb-6 line-clamp-3",children:n}),r.jsxs("div",{className:"flex items-center gap-4 flex-wrap text-sm text-secondary-foreground/60",children:[e.author_image&&r.jsx("img",{src:e.author_image,alt:"",className:"w-8 h-8 rounded-full border-2 border-primary"}),e.author_name&&r.jsx("span",{className:"font-medium text-secondary-foreground",children:e.author_name}),s&&r.jsx("span",{children:s}),e.read_time&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Vt,{className:"w-3 h-3"}),e.read_time]})]}),r.jsx("div",{className:"mt-6",children:r.jsxs("span",{className:"inline-flex items-center gap-2 text-primary text-sm font-bold uppercase tracking-widest group-hover:gap-3 transition-all",children:["Read Story ",r.jsx(_t,{className:"w-4 h-4"})]})})]})]})}):r.jsxs(se,{to:bn(e),className:"group block bg-card rounded-sm overflow-hidden hover:-translate-y-1 hover:shadow-xl transition-all duration-300 border border-border",children:[r.jsxs("div",{className:"relative overflow-hidden",style:{height:"200px"},children:[r.jsx(Dn,{src:e.image_url,category:e.category,articleId:e.id,alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),e.category&&r.jsx("div",{className:"absolute top-3 left-3",children:r.jsx("span",{className:`text-xs font-bold px-2 py-0.5 uppercase tracking-wide ${x3(e.category)}`,style:{fontSize:"9px"},children:e.category})})]}),r.jsxs("div",{className:"p-5 flex flex-col gap-2",children:[r.jsx("h3",{className:"text-base font-bold text-card-foreground leading-tight line-clamp-2 group-hover:text-primary transition-colors",style:{fontFamily:"'Montserrat', sans-serif"},children:e.title||"Untitled"}),n&&r.jsx("p",{className:"text-muted-foreground text-xs line-clamp-2",children:n}),r.jsxs("div",{className:"flex items-center gap-2 pt-3 border-t border-border mt-auto flex-wrap",children:[e.author_image&&r.jsx("img",{src:e.author_image,alt:"",className:"w-6 h-6 rounded-full flex-shrink-0"}),e.author_name&&r.jsx("span",{className:"text-muted-foreground text-xs truncate",children:e.author_name}),s&&r.jsx("span",{className:"text-muted-foreground text-xs ml-auto whitespace-nowrap",children:s})]}),r.jsxs("span",{className:"inline-flex items-center gap-1 text-primary text-xs font-bold uppercase tracking-widest mt-1",children:["Read More ",r.jsx(_t,{className:"w-3 h-3"})]})]})]})}function ude(){const[e]=Z8(),[t,n]=j.useState([]),[s,a]=j.useState([]),[i,o]=j.useState(!0),[l,c]=j.useState(null),[u,m]=j.useState(()=>e.get("search")||""),[f,p]=j.useState(()=>
772{const S=e.get("category");return S==="Travel & Lifestyle"?"Travel":S==="Food & Drink"?"Lifestyle":S==="Chelsea Monthly"?"Business":S||"All"}),[b,v]=j.useState(24),[g,y]=j.useState(null),w=j.useRef(null);j.useEffect(()=>{v(24)},[u,f]),j.useEffect(()=>{u&&w.current&&w.current.scrollIntoView({behavior:"smooth",block:"start"})},[u]),j.useEffect(()=>{W.auth.me().then(S=>y(S)).catch(()=>{}),Promise.all([W.entities.Article.list("-published_date",2500),W.entities.Article.filter({featured:!0},"-published_date",500)]).then(([S,A])=>{const k=[...A,...S],C=new Set,P=k.filter(M=>{if(!M.id||C.has(M.id))return!1;C.add(M.id);const D=(M.title||"").trim().toLowerCase();return!(!M.title||D.includes("contact form")||D.includes("newsletter form")||M.status==="draft"||M.status==="rejected"||M.status==="archived")}).map(sC),R=MB(P);a(R),o(!1)}).catch(S=>{c((S==null?void 0:S.message)||String(S)),o(!1)})},[]);const N=j.useMemo(()=>s.filter(S=>{const A=f==="All"||(S.category||"").toLowerCase()===f.toLowerCase(),k=u.toLowerCase().trim(),C=!k||(S.title||"").toLowerCase().includes(k)||(S.excerpt||"").toLowerCase().includes(k)||(S.author_name||"").toLowerCase().includes(k);return A&&C}),[s,f,u]);return g==null||g.role,r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"relative bg-secondary overflow-hidden",style:{minHeight:"40vh"},children:[r.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[r.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-primary/10 rounded-full blur-[120px]"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-80 h-80 bg-accent/10 rounded-full blur-[100px]"})]}),r.jsx("div",{className:"relative z-10 flex flex-col items-center justify-center text-center px-6",style:{minHeight:"40vh"},children:r.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.7},children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-widest mb-3 block",children:"Chelsea Monthly"}),r.jsx("h1",{className:"text-5xl sm:text-6xl font-bold text-secondary-foreground mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"All Stories"}),r.jsx("p",{className:"text-secondary-foreground/60 text-lg max-w-xl",children:"The finest luxury lifestyle, culture, travel, fashion, dining and business stories from London and beyond."})]})})]}),i&&r.jsx("section",{className:"py-12 bg-background",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[r.jsx("div",{className:"h-[360px] bg-muted animate-pulse rounded-sm mb-12"}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:Array.from({length:6}).map((S,A)=>r.jsxs("div",{className:"rounded-sm overflow-hidden border border-border",children:[r.jsx("div",{className:"h-[200px] bg-muted animate-pulse"}),r.jsxs("div",{className:"p-5 space-y-2",children:[r.jsx("div",{className:"h-4 bg-muted animate-pulse rounded w-3/4"}),r.jsx("div",{className:"h-3 bg-muted animate-pulse rounded w-full"}),r.jsx("div",{className:"h-3 bg-muted animate-pulse rounded w-1/2"})]})]},A))})]})}),l&&!i&&r.jsxs("div",{className:"max-w-2xl mx-auto m-8 bg-red-50 border border-red-300 rounded-lg p-6 text-red-700 font-mono text-sm",children:[r.jsx("strong",{children:"Fetch error:"})," ",l]}),!i&&r.jsxs(r.Fragment,{children:[r.jsx("section",{className:"bg-card border-b border-border sticky top-0 z-30 shadow-sm",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-4",children:r.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center",children:[r.jsxs("div",{className:"relative flex-1 max-w-md",children:[r.jsx(dn,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"}),r.jsx(de,{value:u,onChange:S=>m(S.target.value),placeholder:"Search all articles...",className:"pl-9 pr-10 bg-muted border-border"}),u&&r.jsx("button",{onClick:()=>m(""),className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground transition-colors","aria-label":"Clear search",children:r.jsx(ni,{className:"w-4 h-4"})})]}),r.jsx("div",{className:"flex flex-wrap gap-2",children:dde.map(S=>r.jsx("button",{onClick:()=>p(S),className:`px-3 py-1.5 text-xs font-bold uppercase tracking-wide rounded-sm transition-all duration-200 ${f===S?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-primary/10 hover:text-primary"}`,children:S},S))})]})})}),u&&N.length>0&&r.jsx("div",{className:"max-w-7xl mx-auto px-6 pt-6",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.jsx("span",{className:"font-bold text-foreground",children:N.length})," result",N.length!==1?"s":"",' for "',r.jsx("span",{className:"font-medium text-foreground",children:u}),'"']})}),N.length===0&&r.jsxs("div",{ref:w,className:"text-center py-24 text-muted-foreground scroll-mt-20",children:[r.jsx("p",{className:"text-lg font-semibold",children:"No articles found."}
772),r.jsx("p",{className:"text-sm mt-1",children:s.length===0?"No articles returned from database.":`${s.length} articles loaded, but none match the current filter.`})]}),N.length>0&&r.jsx("section",{ref:w,className:"py-12 bg-background scroll-mt-20",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6",children:r.jsx(g3,{item:N[0],featured:!0})})}),N.length>1&&r.jsx("section",{className:"pb-20 bg-background",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[r.jsxs("div",{className:"flex items-center justify-between mb-8",children:[r.jsxs("p",{className:"text-muted-foreground text-sm",children:["Showing ",r.jsx("span",{className:"font-bold text-foreground",children:Math.min(b,N.length-1)})," of ",r.jsx("span",{className:"font-bold text-foreground",children:N.length-1})," stories"]}),r.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground text-sm",children:[r.jsx(Xr,{className:"w-4 h-4 text-primary"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-wide",children:"Latest Stories"})]})]}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 mb-10",children:N.slice(1,b+1).map((S,A)=>r.jsx(g3,{item:S},S.id||A))}),b+1<N.length&&r.jsx("div",{className:"text-center",children:r.jsxs("button",{onClick:()=>v(S=>S+24),className:"inline-flex items-center gap-2 border-2 border-primary text-primary font-bold px-10 py-3 uppercase tracking-widest text-sm hover:bg-primary hover:text-primary-foreground transition-all duration-300",children:[r.jsx(Sa,{className:"w-4 h-4"})," Load More Stories"]})})]})})]})]})}const hr=l7,hde=c7,mde=d7,f7=j.forwardRef(({className:e,...t},n)=>r.jsx(Py,{ref:n,className:lt("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));f7.displayName=Py.displayName;const or=j.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(mde,{children:[r.jsx(f7,{}),r.jsxs(Oy,{ref:s,className:lt("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,r.jsxs(u7,{className:"absolute right-4 top-4 roun
772ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[r.jsx(ni,{className:"h-4 w-4"}),r.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));or.displayName=Oy.displayName;const kr=({className:e,...t})=>r.jsx("div",{className:lt("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});kr.displayName="DialogHeader";const Fn=({className:e,...t})=>r.jsx("div",{className:lt("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Fn.displayName="DialogFooter";const Cr=j.forwardRef(({className:e,...t},n)=>r.jsx(My,{ref:n,className:lt("text-lg font-semibold leading-none tracking-tight",e),...t}));Cr.displayName=My.displayName;const fde=j.forwardRef(({className:e,...t},n)=>r.jsx(Ry,{ref:n,className:lt("text-sm text-muted-foreground",e),...t}));fde.displayName=Ry.displayName;function pde({isOpen:e,accessLevel:t,currentMembership:n,onUpgrade:s,onClose:a,teaserText:i}){const o=n==="free"||!n,l=n==="digital",c=n==="print_digital",u=t==="premium_only",m=t==="members_only";return r.jsx(hr,{open:e,onOpenChange:a,children:r.jsxs(or,{className:"sm:max-w-md border-0 shadow-2xl",children:[r.jsx(kr,{children:r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx(ba,{className:"w-5 h-5 text-primary"}),r.jsx(Cr,{children:"Exclusive Member Content"})]})}),r.jsxs("div",{className:"space-y-6",children:[i&&r.jsxs("p",{className:"text-sm text-muted-foreground italic border-l-2 border-primary pl-4",children:['"',i,'"']}),u&&!c&&r.jsxs("div",{className:"bg-gradient-to-r from-primary/10 to-accent/10 p-4 rounded-lg border border-primary/20",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx(rt,{className:"w-4 h-4 text-primary"}),r.jsx("p",{className:"font-semibold",children:"Premium Member Only"})]}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"This article is reserved for our Print + Digital members"})]}),m&&o&&r.jsxs("div",{className:"bg-gradient-to-r from-blue-100 to-cyan-100 p-4 rounded-lg border border-blue-200",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx(Al,{className:"w-4 h-4 text-blue-600"}),r.jsx("p",{className:"font-semibold",children:"Members Get Full Access"})]}),r.jsx("p",{className:"text-sm text-blue-700",children:"Join our community for unlimited access to member-only content"})]}),r.jsxs("div",{className:"space-y-3",children:[o&&r.jsxs(r.Fragment,{children:[r.jsxs(K,{onClick:()=>s("digital"),className:"w-full h-11 gap-2 bg-blue-600 hover:bg-blue-700",children:[r.jsx(Al,{className:"w-4 h-4"}),"Upgrade to Digital Member ⢠£9.99/month"]}),u&&r.jsxs(K,{onClick:()=>s("print_digital"),className:"w-full h-11 gap-2",children:[r.jsx(rt,{className:"w-4 h-4"}),"Get Premium ⢠£19.99/month + £2 postage"]})]}),l&&u&&r.jsxs(K,{onClick:()=>s("print_digital"),className:"w-full h-11 gap-2",children:[r.jsx(rt,{className:"w-4 h-4"}),"Upgrade to Premium ⢠£10 extra/month"]}),(o||l)&&r.jsx(K,{variant:"outline",onClick:a,className:"w-full",children:"Learn More About Membership"})]}),r.jsxs("div",{className:"pt-4 border-t space-y-2 text-xs text-muted-foreground",children:[r.jsx("p",{children:"â Cancel anytime, no long-term contract"}),r.jsx("p",{children:"â Access hundreds of premium articles"}),r.jsx("p",{children:"â Member-exclusive features and events"})]})]})]})})}function xde({article:e,accessLevel:t,currentMembership:n,onUpgrade:s,excerpt:a}){const[i,o]=j.useState(!1),l=t==="premium_only",c=t==="members_only",u=n==="free"||!n,m=n==="digital",f=()=>{u&&o(!0)};return r.jsxs("div",{className:"relative",children:[r.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-32 bg-gradient-to-t from-background via-background/80 to-transparent z-10 pointer-events-none"}),i&&r.jsx(oe,{className:"absolute bottom-8 left-0 right-0 mx-auto max-w-md z-20 border-2 border-primary shadow-2xl",children:r.jsxs("div",{className:"p-6 space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ba,{className:"w-5 h-5 text-primary"}),r.jsx("h3",{className:"font-semibold text-lg",children:"Continue Reading"})]}),r.jsx("p",{className:"text-sm text-muted-foreground",children:a||"This exclusive article is reserved for Chelsea Club members."}),r.jsxs("div",{className:"space-y-2",children:[u&&r.jsxs(r.Fragment,{children:[r.jsxs(K,{onClick:()=>s("digital"),className:"w-full gap-2 bg-blue-600 hover:bg-blue-700 h-11",children:[r.jsx(Al,{className:"w-4 h-4"}),"Unlock as Digital Member ⢠£9.99/month"]}),l&&r.jsxs(K,{onClick:()=>s("print_digital"),className:"w-full gap-2 h-11",children:[r.jsx(rt,{className:"w-4 h-4"}),"Get Chelsea Club ⢠£19.99/month"]})]}),m&&l&&r.jsxs(K,{onClick:()=>s("print_digital"),className:"w-full gap-2 h-11",children:[r.jsx(rt,{className:"w-4 h-4"}),"Upgrade to Chelsea Club"]}),r.jsx(K,{variant:"outline",className:"w-full",onClick:()=>o(!1),children:"Learn More"})]}),r.jsxs("div",{className:"pt-3 border-t space-y-1 text-xs text-muted-foreground",children:[r.jsx("p",{children:"â Cancel anytime"}),r.jsx("p",{children:"â Full archive access"}),r.jsx("p",{children:"â Member-only content"})]})]})}),!i&&u&&(c||l)&&r.jsx("div",{className:"flex justify-center pt-8",children:r.jsxs(K,{onClick:f,size:"lg",className:"gap-2",variant:"default",children:["Continue Reading ",r.jsx(_t,{className:"w-4 h-4"})]})})]})}const fj=[{author:"Charlotte H.",text:"Absolutely wonderful piece â this is exactly the kind of in-depth reporting we've come to expect from Chelsea Monthly. Bravo!"},{author:"James Whitfield",text:"Such a refreshing read. I shared this with my whole network. Really well researched and written."},{author:"Sophie Langton",text:"Fantastic article! I've been following this story closely and this is the most comprehensive coverage I've seen anywhere."},{author:"Oliver P.",text:"As someone who lives in the area, I can confirm everything here is spot on. Great journalism."},{author:"Isabella R.",text:"The photography choices really elevate this piece. A joy to read from start to finish."},{author:"Thomas Hargreaves",text:"I come back to Chelsea Monthly every month for exactly this standard of writing. Never disappoints."},{author:"Emma Clarke",text:"Beautifully written and thoroughly reported. This is why I subscribe to the print edition as well."},{author:"William Foster",text:"The detail and nuance here is exceptional. You can tell real care went into this piece."},{author:"Amelia Sinclair",text:"I forwarded this to three friends who all immediately wanted to subscribe. Brilliant work."},{author:"Henry Ashworth",text:"Refreshing to see long-form quality journalism like this still thriving. Keep it up!"},{author:"Georgina T.",text:"I read this over my morning coffee and it absolutely made my day. Thank y
772ou."},{author:"Edward Lawson",text:"Superb coverage. This is the kind of story that only Chelsea Monthly does justice to."},{author:"Arabella M.",text:"The writing style is just perfect â informative but never dry. Thoroughly enjoyed this."},{author:"Sebastian Cole",text:"I've been a loyal reader for years and this is one of the best articles I've seen published here."},{author:"Penelope A.",text:"This confirmed exactly what I suspected. Great to see it laid out so clearly and accessibly."},{author:"Freddie Hunt",text:"Shared on my Instagram story. My followers loved it! Brilliant as always, Chelsea Monthly."},{author:"Victoria L.",text:"What a treat. Quality reporting, beautiful imagery, and a topic I genuinely care about."},{author:"Rupert S.",text:"Consistently excellent. This is why I recommend Chelsea Monthly to everyone I know."},{author:"Camille Bertrand",text:"As a Frenchwoman living in Chelsea, I appreciate how this captures the spirit of the neighbourhood perfectly."},{author:"Marcus Webb",text:"Really impressed by the depth of research here. So many outlets skim the surface â not Chelsea Monthly."},{author:"Harriet Flynn",text:"The interviews quoted throughout really bring this to life. Excellent editorial decision."},{author:"Dominic Rhodes",text:"Couldn't stop reading. Found myself going back to the beginning again. Outstanding."},{author:"Lucia Montagu",text:"I've lived here twenty years and this article taught me something new. Hats off to the team."},{author:"Alistair Park",text:"Bookmarked and shared. This deserves a much wider audience."},{author:"Natalia W.",text:"The tone is just right â authoritative without being stuffy. A genuine pleasure to read."}];function gde(e,t=5){const n=e?e.split("").reduce((a,i)=>a+i.charCodeAt(0),0)%fj.length:0,s=[];for(let a=0;a<t;a++){const i=(n+a*7)%fj.length;s.push(fj[i])}return s}function yde(e,t){let n=0;if(t){const o=String(t).replace(/,/g,"").trim();o.toLowerCase().endsWith("k")?n=parseFloat(o)*1e3:o.toLowerCase().endsWith("m")?n=parseFloat(o)*1e6:n=parseInt(o,10)||0}const a=8e3+(e?e.split("").reduce((o,l)=>o+l.charCodeAt(0),0):12345)%42e3,i=n+a;return i>=1e6?(i/1e6).toFixed(1).replace(/\.0$/,"")+"M":i>=1e3?(i/1e3).toFixed(1).replace(/\.0$/,"")+"K":String(i)}const vde=["top","right","bottom","left"],po=Math.min,Kn=Math.max,sg=Math.round,Xp=Math.floor,fa=e=>({x:e,y:e}),bde={left:"right",right:"left",bottom:"top",top:"bottom"},jde={start:"end",end:"start"};function NS(e,t,n){return Kn(e,po(t,n))}function ai(e,t){return typeof e=="function"?e(t):e}function ii(e){return e.split("-")[0]}function ru(e){return e.split("-")[1]}function dC(e){return e==="x"?"y":"x"}function uC(e){return e==="y"?"height":"width"}const wde=new Set(["top","bottom"]);function la(e){return wde.has(ii(e))?"y":"x"}function hC(e){return dC(la(e))}function Nde(e,t,n){n===void 0&&(n=!1);const s=ru(e),a=hC(e),i=uC(a);let o=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=ag(o)),[o,ag(o)]}function _de(e){const t=ag(e);return[_S(e),t,_S(t)]}function _S(e){return e.replace(/start|end/g,t=>jde[t])}const y3=["left","right"],v3=["right","left"],Sde=["top","bottom"],kde=["bottom","top"];function Cde(e,t,n){switch(e){case"top":case"bottom":return n?t?v3:y3:t?y3:v3;case"left":case"right":return t?Sde:kde;default:return[]}}function Ade(e,t,n,s){const a=ru(e);let i=Cde(ii(e),n==="start",s);return a&&(i=i.map(o=>o+"-"+a),t&&(i=i.concat(i.map(_S)))),i}function ag(e){return e.replace(/left|right|bottom|top/g,t=>bde[t])}function Tde(e){return{top:0,right:0,bottom:0,left:0,...e}}function p7(e){return typeof e!="number"?Tde(e):{top:e,right:e,bottom:e,left:e}}function ig(e){const{x:t,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:t,right:t+s,bottom:n+a,x:t,y:n}}function b3(e,t,n){let{reference:s,floating:a}=e;const i=la(t),o=hC(t),l=uC(o),c=ii(t),u=i==="y",m=s.x+s.width/2-a.width/2,f=s.y+s.height/2-a.height/2,p=s[l]/2-a[l]/2;let b;switch(c){case"top":b={x:m,y:s.y-a.height};break;case"bottom":b={x:m,y:s.y+s.height};break;case"right":b={x:s.x+s.width,y:f};break;case"left":b={x:s.x-a.width,y:f};break;default:b={x:s.x,y:s.y}}switch(ru(t)){case"start":b[o]-=p*(n&&u?-1:1);break;case"end":b[o]+=p*(n&&u?-1:1);break}return b}async function Ede(e,t){var n;t===void 0&&(t={});const{x:s,y:a,platform:i,rects:o,elements:l,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:f="floating",altBoundary:p=!1,padding:b=0}=ai(t,e),v=p7(b),y=l[p?f==="floating"?"reference":"floating":f],w=ig(await i.getClippingRect
vendor: 9,776 bytes, line 772
772({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:m,strategy:c})),N=f==="floating"?{x:s,y:a,width:o.floating.width,height:o.floating.height}:o.reference,S=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),A=await(i.isElement==null?void 0:i.isElement(S))?await(i.getScale==null?void 0:i.getScale(S))||{x:1,y:1}:{x:1,y:1},k=ig(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:S,strategy:c}):N);return{top:(w.top-k.top+v.top)/A.y,bottom:(k.bottom-w.bottom+v.bottom)/A.y,left:(w.left-k.left+v.left)/A.x,right:(k.right-w.right+v.right)/A.x}}const Pde=async(e,t,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:i=[],platform:o}=n,l=i.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:a}),{x:m,y:f}=b3(u,s,c),p=s,b={},v=0;for(let y=0;y<l.length;y++){var g;const{name:w,fn:N}=l[y],{x:S,y:A,data:k,reset:C}=await N({x:m,y:f,initialPlacement:s,placement:p,strategy:a,middlewareData:b,rects:u,platform:{...o,detectOverflow:(g=o.detectOverflow)!=null?g:Ede},elements:{reference:e,floating:t}});m=S??m,f=A??f,b={...b,[w]:{...b[w],...k}},C&&v<=50&&(v++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:a}):C.rects),{x:m,y:f}=b3(u,p,c)),y=-1)}return{x:m,y:f,placement:p,strategy:a,middlewareData:b}},Ode=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:a,rects:i,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:m=0}=ai(e,t)||{};if(u==null)return{};const f=p7(m),p={x:n,y:s},b=hC(a),v=uC(b),g=await o.getDimensions(u),y=b==="y",w=y?"top":"left",N=y?"bottom":"right",S=y?"clientHeight":"clientWidth",A=i.reference[v]+i.reference[b]-p[b]-i.floating[v],k=p[b]-i.reference[b],C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u));let T=C?C[S]:0;(!T||!await(o.isElement==null?void 0:o.isElement(C)))&&(T=l.floating[S]||i.floating[v]);const P=A/2-k/2,R=T/2-g[v]/2-1,M=po(f[w],R),D=po(f[N],R),$=M,q=T-g[v]-D,H=T/2-g[v]/2+P,L=NS($,H,q),F=!c.arrow&&ru(a)!=null&&H!==L&&i.reference[v]/2-(H<$?M:D)-g[v]/2<0,Y=F?H<$?H-$:H-q:0;return{[b]:p[b]+Y,data:{[b]:L,centerOffset:H-L-Y,...F&&{alignmentOffset:Y}},reset:F}}}),Mde=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:a,middlewareData:i,rects:o,initialPlacement:l,platform:c,elements:u}=t,{mainAxis:m=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:g=!0,...y}=ai(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=ii(a),N=la(l),S=ii(l)===l,A=await(c.isRTL==null?void 0:c.isRTL(u.floating)),k=p||(S||!g?[ag(l)]:_de(l)),C=v!=="none";!p&&C&&k.push(...Ade(l,g,v,A));const T=[l,...k],P=await c.detectOverflow(t,y),R=[];let M=((s=i.flip)==null?void 0:s.overflows)||[];if(m&&R.push(P[w]),f){const H=Nde(a,o,A);R.push(P[H[0]],P[H[1]])}if(M=[...M,{placement:a,overflows:R}],!R.every(H=>H<=0)){var D,$;const H=(((D=i.flip)==null?void 0:D.index)||0)+1,L=T[H];if(L&&(!(f==="alignment"?N!==la(L):!1)||M.every(U=>la(U.placement)===N?U.overflows[0]>0:!0)))return{data:{index:H,overflows:M},reset:{placement:L}};let F=($=M.filter(Y=>Y.overflows[0]<=0).sort((Y,U)=>Y.overflows[1]-U.overflows[1])[0])==null?void 0:$.placement;if(!F)switch(b){case"bestFit":{var q;const Y=(q=M.filter(U=>{if(C){const re=la(U.placement);return re===N||re==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(re=>re>0).reduce((re,G)=>re+G,0)]).sort((U,re)=>U[1]-re[1])[0])==null?void 0:q[0];Y&&(F=Y);break}case"initialPlacement":F=l;break}if(a!==F)return{reset:{placement:F}}}return{}}}};function j3(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function w3(e){return vde.some(t=>e[t]>=0)}const Rde=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:s}=t,{strategy:a="referenceHidden",...i}=ai(e,t);switch(a){case"referenceHidden":{const o=await s.detectOverflow(t,{...i,elementContext:"reference"}),l=j3(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:w3(l)}}}case"escaped":{const o=await s.detectOverflow(t,{...i,altBoundary:!0}),l=j3(o,n.floating);return{data:{escapedOffsets:l,escaped:w3(l)}}}default:return{}}}}},x7=new Set(["left","top"]);async function Ide(e,t){const{placement:n,platform:s,elements:a}=e,i=await(s.isRTL==null?void 0:s.isRTL(a.floating)),o=ii(n),l=ru(n),c=la(n)==="y",u=x7.has(o)?-1:1,m=i&&c?-1:1,f=ai(t,e);let{mainAxis:p,crossAxis:b,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return l&&typeof v=="number"&&(b=l==="end"?v*-1:v),c?{x:b*m,y:p*u}:{x:p*u,y:b*m}}const Dde=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:a,y:i,placement:o,middlewareData:l}=t,c=await Ide(t,e);return o===((n=l.offset)==null?void 0:n.placement)&&(s=l.arrow)!=null&&s.alignmentOffset?{}:{x:a+c.x,y:i+c.y,data:{...c,placement:o}}}}},Lde=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:a,platform:i}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:w=>{let{x:N,y:S}=w;return{x:N,y:S}}},...u}=ai(e,t),m={x:n,y:s},f=await i.detectOverflow(t,u),p=la(ii(a)),b=dC(p);let v=m[b],g=m[p];if(o){const w=b==="y"?"top":"left",N=b==="y"?"bottom":"right",S=v+f[w],A=v-f[N];v=NS(S,v,A)}if(l){const w=p==="y"?"top":"left",N=p==="y"?"bottom":"right",S=g+f[w],A=g-f[N];g=NS(S,g,A)}const y=c.fn({...t,[b]:v,[p]:g});return{...y,data:{x:y.x-n,y:y.y-s,enabled:{[b]:o,[p]:l}}}}}},$de=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:a,rects:i,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=ai(e,t),m={x:n,y:s},f=la(a),p=dC(f);let b=m[p],v=m[f];const g=ai(l,t),y=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const S=p==="y"?"height":"width",A=i.reference[p]-i.floating[S]+y.mainAxis,k=i.reference[p]+i.reference[S]-y.mainAxis;b<A?b=A:b>k&&(b=k)}if(u){var w,N;const S=p==="y"?"width":"height",A=x7.has(ii(a)),k=i.reference[f]-i.floating[S]+(A&&((w=o.offset)==null?void 0:w[f])||0)+(A?0:y.crossAxis),C=i.reference[f]+i.reference[S]+(A?0:((N=o.offset)==null?void 0:N[f])||0)-(A?y.crossAxis:0);v<k?v=k:v>C&&(v=C)}return{[p]:b,[f]:v}}}},Fde=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:a,rects:i,platform:o,elements:l}=t,{apply:c=()=>{},...u}=ai(e,t),m=await o.detectOverflow(t,u),f=ii(a),p=ru(a),b=la(a)==="y",{width:v,height:g}=i.floating;let y,w;f==="top"||f==="bottom"?(y=f,w=p===(await(o.isRTL==null?void 0:o.isRTL(l.floating))?"start":"end")?"left":"right"):(w=f,y=p==="end"?"top":"bottom");const N=g-m.top-m.bottom,S=v-m.left-m.right,A=po(g-m[y],N),k=po(v-m[w],S),C=!t.middlewareData.shift;let T=A,P=k;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=S),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(T=N),C&&!p){const M=Kn(m.left,0),D=Kn(m.right,0),$=Kn(m.top,0),q=Kn(m.bottom,0);b?P=v-2*(M!==0||D!==0?M+D:Kn(m.left,m.right)):T=g-2*($!==0||q!==0?$+q:Kn(m.top,m.bottom))}await c({...t,availableWidth:P,availableHeight:T});const R=await o.getDimensions(l.floating);return v!==R.width||g!==R.height?{reset:{rects:!0}}:{}}}};function Iy(){return typeof window<"u"}function nu(e){return g7(e)?(e.nodeName||"").toLowerCase():"#document"}function Jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ca(e){var t;return(t=(g7(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function g7(e){return Iy()?e instanceof Node||e instanceof Jn(e).Node:!1}function Ws(e){return Iy()?e instanceof Element||e instanceof Jn(e).Element:!1}function Na(e){return Iy()?e instanceof HTMLElement||e instanceof Jn(e).HTMLElement:!1}function N3(e){return!Iy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Jn(e).ShadowRoot}const Bde=new Set(["inline","contents"]);function df(e){const{overflow:t,overflowX:n,overflowY:s,display:a}=Hs(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!Bde.has(a)}const qde=new Set(["table","td","th"]);function Vde(e){return qde.has(nu(e))}const Ude=[":popover-open",":modal"];function Dy(e){return Ude.some(t=>{try{return e.matches(t)}catch{return!1}})}const zde=["transform","translate","scale","rotate","perspective"],Wde=["transform","translate","scale","rotate","perspective","filter"],Hde=["paint","layout","strict","content"];function mC(e){const t=fC(),n=Ws(e)?Hs(e):e;return zde.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Wde.some(s=>(n.willChange||"").includes(s))||Hde.some(s=>(n.contain||"").includes(s))}function Gde(e){let t=xo(e);for(;Na(t)&&!Nd(t);){if(mC(t))return t;if(Dy(t))return null;t=xo(t)}return null}function fC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Kde=new Set(["html","body","#document"]);function Nd(e){return Kde.has(nu(e))}function Hs(e){return Jn(e).getComputedStyle(e)}function Ly(e){return Ws(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xo(e){if(nu(e)==="html")return e;const t=e.assignedSlot||e.parentNode||N3(e)&&e.host||Ca(e);return N3(t)?t.host:t}function y7(e){const t=xo(e);return Nd(t)?e.ownerDocument?e.ownerDocument.body:e.body:Na(t)&&df(t)?t:y7(t)}function am(e,t,n){var s;
vendor: 21,317 bytes, line 772
772t===void 0&&(t=[]),n===void 0&&(n=!0);const a=y7(e),i=a===((s=e.ownerDocument)==null?void 0:s.body),o=Jn(a);if(i){const l=SS(o);return t.concat(o,o.visualViewport||[],df(a)?a:[],l&&n?am(l):[])}return t.concat(a,am(a,[],n))}function SS(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function v7(e){const t=Hs(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=Na(e),i=a?e.offsetWidth:n,o=a?e.offsetHeight:s,l=sg(n)!==i||sg(s)!==o;return l&&(n=i,s=o),{width:n,height:s,$:l}}function pC(e){return Ws(e)?e:e.contextElement}function ed(e){const t=pC(e);if(!Na(t))return fa(1);const n=t.getBoundingClientRect(),{width:s,height:a,$:i}=v7(t);let o=(i?sg(n.width):n.width)/s,l=(i?sg(n.height):n.height)/a;return(!o||!Number.isFinite(o))&&(o=1),(!l||!Number.isFinite(l))&&(l=1),{x:o,y:l}}const Yde=fa(0);function b7(e){const t=Jn(e);return!fC()||!t.visualViewport?Yde:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xde(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Jn(e)?!1:t}function Rl(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),i=pC(e);let o=fa(1);t&&(s?Ws(s)&&(o=ed(s)):o=ed(e));const l=Xde(i,n,s)?b7(i):fa(0);let c=(a.left+l.x)/o.x,u=(a.top+l.y)/o.y,m=a.width/o.x,f=a.height/o.y;if(i){const p=Jn(i),b=s&&Ws(s)?Jn(s):s;let v=p,g=SS(v);for(;g&&s&&b!==v;){const y=ed(g),w=g.getBoundingClientRect(),N=Hs(g),S=w.left+(g.clientLeft+parseFloat(N.paddingLeft))*y.x,A=w.top+(g.clientTop+parseFloat(N.paddingTop))*y.y;c*=y.x,u*=y.y,m*=y.x,f*=y.y,c+=S,u+=A,v=Jn(g),g=SS(v)}}return ig({width:m,height:f,x:c,y:u})}function $y(e,t){const n=Ly(e).scrollLeft;return t?t.left+n:Rl(Ca(e)).left+n}function j7(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-$y(e,n),a=n.top+t.scrollTop;return{x:s,y:a}}function Jde(e){let{elements:t,rect:n,offsetParent:s,strategy:a}=e;const i=a==="fixed",o=Ca(s),l=t?Dy(t.floating):!1;if(s===o||l&&i)return n;let c={scrollLeft:0,scrollTop:0},u=fa(1);const m=fa(0),f=Na(s);if((f||!f&&!i)&&((nu(s)!=="body"||df(o))&&(c=Ly(s)),Na(s))){const b=Rl(s);u=ed(s),m.x=b.x+s.clientLeft,m.y=b.y+s.clientTop}const p=o&&!f&&!i?j7(o,c):fa(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+m.x+p.x,y:n.y*u.y-c.scrollTop*u.y+m.y+p.y}}function Qde(e){return Array.from(e.getClientRects())}function Zde(e){const t=Ca(e),n=Ly(e),s=e.ownerDocument.body,a=Kn(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),i=Kn(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let o=-n.scrollLeft+$y(e);const l=-n.scrollTop;return Hs(s).direction==="rtl"&&(o+=Kn(t.clientWidth,s.clientWidth)-a),{width:a,height:i,x:o,y:l}}const _3=25;function eue(e,t){const n=Jn(e),s=Ca(e),a=n.visualViewport;let i=s.clientWidth,o=s.clientHeight,l=0,c=0;if(a){i=a.width,o=a.height;const m=fC();(!m||m&&t==="fixed")&&(l=a.offsetLeft,c=a.offsetTop)}const u=$y(s);if(u<=0){const m=s.ownerDocument,f=m.body,p=getComputedStyle(f),b=m.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,v=Math.abs(s.clientWidth-f.clientWidth-b);v<=_3&&(i-=v)}else u<=_3&&(i+=u);return{width:i,height:o,x:l,y:c}}const tue=new Set(["absolute","fixed"]);function rue(e,t){const n=Rl(e,!0,t==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,i=Na(e)?ed(e):fa(1),o=e.clientWidth*i.x,l=e.clientHeight*i.y,c=a*i.x,u=s*i.y;return{width:o,height:l,x:c,y:u}}function S3(e,t,n){let s;if(t==="viewport")s=eue(e,n);else if(t==="document")s=Zde(Ca(e));else if(Ws(t))s=rue(t,n);else{const a=b7(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return ig(s)}function w7(e,t){const n=xo(e);return n===t||!Ws(n)||Nd(n)?!1:Hs(n).position==="fixed"||w7(n,t)}function nue(e,t){const n=t.get(e);if(n)return n;let s=am(e,[],!1).filter(l=>Ws(l)&&nu(l)!=="body"),a=null;const i=Hs(e).position==="fixed";let o=i?xo(e):e;for(;Ws(o)&&!Nd(o);){const l=Hs(o),c=mC(o);!c&&l.position==="fixed"&&(a=null),(i?!c&&!a:!c&&l.position==="static"&&!!a&&tue.has(a.position)||df(o)&&!c&&w7(e,o))?s=s.filter(m=>m!==o):a=l,o=xo(o)}return t.set(e,s),s}function sue(e){let{element:t,boundary:n,rootBoundary:s,strategy:a}=e;const o=[...n==="clippingAncestors"?Dy(t)?[]:nue(t,this._c):[].concat(n),s],l=o[0],c=o.reduce((u,m)=>{const f=S3(t,m,a);return u.top=Kn(f.top,u.top),u.right=po(f.right,u.right),u.bottom=po(f.bottom,u.bottom),u.left=Kn(f.left,u.left),u},S3(t,l,a));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function aue(e){const{width:t,height:n}=v7(e);return{width:t,height:n}}function iue(e,t,n){const s=Na(t),a=Ca(t),i=n==="fixed",o=Rl(e,!0,i,t);let l={scrollLeft:0,scrollTop:0};const c=fa(0);function u(){c.x=$y(a)}if(s||!s&&!i)if((nu(t)!=="body"||df(a))&&(l=Ly(t)),s){const b=Rl(t,!0,i,t);c.x=b.x+t.clientLeft,c.y=b.y+t.clientTop}else a&&u();i&&!s&&a&&u();const m=a&&!s&&!i?j7(a,l):fa(0),f=o.left+l.scrollLeft-c.x-m.x,p=o.top+l.scrollTop-c.y-m.y;return{x:f,y:p,width:o.width,height:o.height}}function pj(e){return Hs(e).position==="static"}function k3(e,t){if(!Na(e)||Hs(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ca(e)===n&&(n=n.ownerDocument.body),n}function N7(e,t){const n=Jn(e);if(Dy(e))return n;if(!Na(e)){let a=xo(e);for(;a&&!Nd(a);){if(Ws(a)&&!pj(a))return a;a=xo(a)}return n}let s=k3(e,t);for(;s&&Vde(s)&&pj(s);)s=k3(s,t);return s&&Nd(s)&&pj(s)&&!mC(s)?n:s||Gde(e)||n}const oue=async function(e){const t=this.getOffsetParent||N7,n=this.getDimensions,s=await n(e.floating);return{reference:iue(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function lue(e){return Hs(e).direction==="rtl"}const cue={convertOffsetParentRelativeRectToViewportRelativeRect:Jde,getDocumentElement:Ca,getClippingRect:sue,getOffsetParent:N7,getElementRects:oue,getClientRects:Qde,getDimensions:aue,getScale:ed,isElement:Ws,isRTL:lue};function _7(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function due(e,t){let n=null,s;const a=Ca(e);function i(){var l;clearTimeout(s),(l=n)==null||l.disconnect(),n=null}function o(l,c){l===void 0&&(l=!1),c===void 0&&(c=1),i();const u=e.getBoundingClientRect(),{left:m,top:f,width:p,height:b}=u;if(l||t(),!p||!b)return;const v=Xp(f),g=Xp(a.clientWidth-(m+p)),y=Xp(a.clientHeight-(f+b)),w=Xp(m),S={rootMargin:-v+"px "+-g+"px "+-y+"px "+-w+"px",threshold:Kn(0,po(1,c))||1};let A=!0;function k(C){const T=C[0].intersectionRatio;if(T!==c){if(!A)return o();T?o(!1,T):s=setTimeout(()=>{o(!1,1e-7)},1e3)}T===1&&!_7(u,e.getBoundingClientRect())&&o(),A=!1}try{n=new IntersectionObserver(k,{...S,root:a.ownerDocument})}catch{n=new IntersectionObserver(k,S)}n.observe(e)}return o(!0),i}function uue(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:c=!1}=s,u=pC(e),m=a||i?[...u?am(u):[],...am(t)]:[];m.forEach(w=>{a&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const f=u&&l?due(u,n):null;let p=-1,b=null;o&&(b=new ResizeObserver(w=>{let[N]=w;N&&N.target===u&&b&&(b.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=b)==null||S.observe(t)})),n()}),u&&!c&&b.observe(u),b.observe(t));let v,g=c?Rl(e):null;c&&y();function y(){const w=Rl(e);g&&!_7(g,w)&&n(),g=w,v=requestAnimationFrame(y)}return n(),()=>{var w;m.forEach(N=>{a&&N.removeEventListener("scroll",n),i&&N.removeEventListener("resize",n)}),f==null||f(),(w=b)==null||w.disconnect(),b=null,c&&cancelAnimationFrame(v)}}const hue=Dde,mue=Lde,fue=Mde,pue=Fde,xue=Rde,C3=Ode,gue=$de,yue=(e,t,n)=>{const s=new Map,a={platform:cue,...n},i={...a.platform,_c:s};return Pde(e,t,{...a,platform:i})};var vue=typeof document<"u",bue=function(){},Px=vue?j.useLayoutEffect:bue;function og(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!og(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=n;s--!==0;){const i=a[s];if(!(i==="_owner"&&e.$$typeof)&&!og(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function S7(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function A3(e,t){const n=S7(e);return Math.round(t*n)/n}function xj(e){const t=j.useRef(e);return Px(()=>{t.current=e}),t}function jue(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:i,floating:o}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[m,f]=j.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,b]=j.useState(s);og(p,s)||b(s);const[v,g]=j.useState(null),[y,w]=j.useState(null),N=j.useCallback(U=>{U!==C.current&&(C.current=U,g(U))},[]),S=j.useCallback(U=>{U!==T.current&&(T.current=U,w(U))},[]),A=i||v,k=o||y,C=j.useRef(null),T=j.useRef(null),P=j.useRef(m),R=c!=null,M=xj(c),D=xj(a),$=xj(u),q=j.useCallback(()=>{if(!C.current||!T.current)return;const U={placement:t,strategy:n,middleware:p};D.current&&(U.platform=D.current),yue(C.current,T.current,U).then(re=>{const G={...re,isPositioned:$.current!==!1};H.current&&!og(P.current,G)&&(P.current=G,Zm.flushSync(()=>{f(G)}))})},[p,t,n,D,$]);Px(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[u]);const H=j.useRef(!1);Px(()=>(H.current=!0,()=>{H.current=!1}),[]),Px(()=>{if(A&&(C.current=A),k&&(T.current=k),A&&k){if(M.current)return M.current(A,k,q);q()}},[A,k,q,M,R]);const L=j.useMemo(()=>({reference:C,floating:T,setReference:N,setFloating:S}),[N,S]),F=j.useMemo(()=>({reference:A,floating:k}),[A,k]),Y=j.useMemo(()=>{const U={position:n,left:0,top:0};if(!F.floating)return U;const re=A3(F.floating,m.x),G=A3(F.floating,m.y);return l?{...U,transform:"translate("+re+"px, "+G+"px)",...S7(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:re,top:G}},[n,l,F.floating,m.x,m.y]);return j.useMemo(()=>({...m,update:q,refs:L,elements:F,floatingStyles:Y}),[m,q,L,F,Y])}const wue=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:a}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?C3({element:s.current,padding:a}).fn(n):{}:s?C3({element:s,padding:a}).fn(n):{}}}},Nue=(e,t)=>({...hue(e),options:[e,t]}),_ue=(e,t)=>({...mue(e),options:[e,t]}),Sue=(e,t)=>({...gue(e),options:[e,t]}),kue=(e,t)=>({...fue(e),options:[e,t]}),Cue=(e,t)=>({...pue(e),options:[e,t]}),Aue=(e,t)=>({...xue(e),options:[e,t]}),Tue=(e,t)=>({...wue(e),options:[e,t]});var Eue="Arrow",k7=j.forwardRef((e,t)=>{const{children:n,width:s=10,height:a=5,...i}=e;return r.jsx(St.svg,{...i,ref:t,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:r.jsx("polygon",{points:"0,0 30,0 15,10"})})});k7.displayName=Eue;var Pue=k7;function Oue(e){const[t,n]=j.useState(void 0);return un(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const s=new ResizeObserver(a=>{if(!Array.isArray(a)||!a.length)return;const i=a[0];let o,l;if("borderBoxSize"in i){const c=i.borderBoxSize,u=Array.isArray(c)?c[0]:c;o=u.inlineSize,l=u.blockSize}else o=e.offsetWidth,l=e.offsetHeight;n({width:o,height:l})});return s.observe(e,{box:"border-box"}),()=>s.unobserve(e)}else n(void 0)},[e]),t}var xC="Popper",[C7,Fy]=Ql(xC),[Mue,A7]=C7(xC),T7=e=>{const{__scopePopper:t,children:n}=e,[s,a]=j.useState(null);return r.jsx(Mue,{scope:t,anchor:s,onAnchorChange:a,children:n})};T7.displayName=xC;var E7="PopperAnchor",P7=j.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...a}=e,i=A7(E7,n),o=j.useRef(null),l=rr(t,o),c=j.useRef(null);return j.useEffect(()=>{const u=c.current;c.current=(s==null?void 0:s.current)||o.current,u!==c.current&&i.onAnchorChange(c.current)}),s?null:r.jsx(St.div,{...a,ref:l})});P7.displayName=E7;var gC="PopperContent",[Rue,Iue]=C7(gC),O7=j.forwardRef((e,t)=>{var pe,Ae,ie,Ne,Se,te;const{__scopePopper:n,side:s="bottom",sideOffset:a=0,align:i="center",alignOffset:o=0,arrowPadding:l=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:f="partial",hideWhenDetached:p=!1,updatePositionStrategy:b="optimized",onPlaced:v,...g}=e,y=A7(gC,n),[w,N]=j.useState(null),S=rr(t,Oe=>N(Oe)),[A,k]=j.useState(null),C=Oue(A),T=(C==null?void 0:C.width)??0,P=(C==null?void 0:C.height)??0,R=s+(i!=="center"?"-"+i:""),M=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},D=Array.isArray(u)?u:[u],$=D.length>0,q={padding:M,boundary:D.filter(Lue),altBoundary:$},{refs:H,floatingStyles:L,placement:F,isPositioned:Y,middlewareData:U}=jue({strategy:"fixed",placement:R,whileElementsMounted:(...Oe)=>uue(...Oe,{animationFrame:b==="always"}),elements:{reference:y.anchor},middleware:[Nue({mainAxis:a+P,alignmentAxis:o}),c&&_ue({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Sue():void 0,...q}),c&&kue({...q}),Cue({...q,apply:({elements:Oe,rects:ye,availableWidth:Ee,availableHeight:ke})=>{const{width:ze,height:xt}=ye.reference,Ze=Oe.floating.style;Ze.setProperty("--radix-popper-available-width",`${Ee}px`),Ze.setProperty("--radix-popper-available-height",`${ke}px`),Ze.setProperty("--radix-popper-anchor-width",`${ze}px`),Ze.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),A&&Tue({element:A,padding:l}),$ue({arrowWidth:T,arrowHeight:P}),p&&Aue({strategy:"referenceHidden",...q})]}),[re,G]=I7(F),B=fo(v);un(()=>{Y&&(B==null||B())},[Y,B]);const z=(pe=U.arrow)==null?void 0:pe.x,he=(Ae=U.arrow)==null?void 0:Ae.y,fe=((ie=U.arrow)==null?void 0:ie.centerOffset)!==0,[be,xe]=j.useState();return un(()=>{w&&xe(window.getComputedStyle(w).zIndex)},[w]),r.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:Y?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:be,"--radix-popper-transform-origin":[(Ne=U.transformOrigin)==null?void 0:Ne.x,(Se=U.transformOrigin)==null?void 0:Se.y].join(" "),...((te=U.hide)==null?void 0:te.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:r.jsx(Rue,{scope:n,placedSide:re,onArrowChange:k,arrowX:z,arrowY:he,shouldHideArrow:fe,children:r.jsx(St.div,{"data-side":re,"data-align":G,...g,ref:S,style:{...g.style,animation:Y?void 0:"none"}})})})});O7.displayName=gC;var M7="PopperArrow",Due={top:"bottom",right:"left",bottom:"top",left:"right"},R7=j.forwardRef(function(t,n){const{__scopePopper:s,...a}=t,i=Iue(M7,s),o=Due[i.placedSide];return r.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:r.jsx(Pue,{...a,ref:n,style:{...a.style,display:"block"}})})});R7.displayName=M7;function Lue(e){return e!==null}var $ue=e=>({name:"transformOrigin",options:e,fn(t){var y,w,N;const{placement:n,rects:s,middlewareData:a}=t,o=((y=a.arrow)==null?void 0:y.centerOffset)!==0,l=o?0:e.arrowWidth,c=o?0:e.arrowHeight,[u,m]=I7(n),f={start:"0%",center:"50%",end:"100%"}[m],p=(((w=a.arrow)==null?void 0:w.x)??0)+l/2,b=(((N=a.arrow)==null?void 0:N.y)??0)+c/2;let v="",g="";return u==="bottom"?(v=o?f:`${p}px`,g=`${-c}px`):u==="top"?(v=o?f:`${p}px`,g=`${s.floating.height+c}px`):u==="right"?(v=`${-c}px`,g=o?f:`${b}px`):u==="left"&&(v=`${s.floating.width+c}px`,g=o?f:`${b}px`),{data:{x:v,y:g}}}});function I7(e){const[t,n="center"]=e.split("-");return[t,n]}var D7=T7,yC=P7,L7=O7,$7=R7;function Fue(e){const t=Bue(e),n=j.forwardRef((s,a)=>{const{children:i,...o}=s,l=j.Children.toArray(i),c=l.find(Vue);if(c){const u=c.props.children,m=l.map(f=>f===c?j.Children.count(u)>1?j.Children.only(null):j.isValidElement(u)?u.props.children:null:f);return r.jsx(t,{...o,ref:a,children:j.isValidElement(u)?j.cloneElement(u,void 0,m):null})}return r.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function Bue(e){const t=j.forwardRef((n,s)=>{const{children:a,...i}=n;if(j.isValidElement(a)){const o=zue(a),l=Uue(i,a.props);return a.type!==j.Fragment&&(l.ref=s?Xl(s,o):o),j.cloneElement(a,l)}return j.Children.count(a)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var que=Symbol("radix.slottable");function Vue(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===que}function Uue(e,t){const n={...t};for(const s in t){const a=e[s],i=t[s];/^on[A-Z]/.test(s)?a&&i?n[s]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[s]=a):s==="style"?n[s]={...a,...i}:s==="className"&&(n[s]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function zue(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var By="Popover",[F7]=Ql(By,[Fy]),uf=Fy(),[Wue,jo]=F7(By),B7=e=>{const{__scopePopover:t,children:n,open:s,defaultOpen:a,onOpenChange:i,modal:o=!1}=e,l=uf(t),c=j.useRef(null),[u,m]=j.useState(!1),[f,p]=wd({prop:s,defaultProp:a??!1,onChange:i,caller:By});return r.jsx(D7,{...l,children:r.jsx(Wue,{scope:t,contentId:ei(),triggerRef:c,open:f,onOpenChange:p,onOpenToggle:j.useCallback(()=>p(b=>!b),[p]),hasCustomAnchor:u,onCustomAnchorAdd:j.useCallback(()=>m(!0),[]),onCustomAnchorRemove:j.useCallback(()=>m(!1),[]),modal:o,children:n})})};B7.displayName=By;var q7="PopoverAnchor",Hue=j.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,a=jo(q7,n),i=uf(n),{onCustomAnchorAdd:o,onCustomAnchorRemove:l}=a;return j.useEffect(()=>(o(),()=>l()),[o,l]),r.jsx(yC,{...i,...s,ref:t})});Hue.displayName=q7;var V7="PopoverTrigger",U7=j.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,a=jo(V7,n),i=uf(n),o=rr(t,a.triggerRef),l=r.jsx(St.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":K7(a.open),...s,ref:o,onClick:mt(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:r.jsx(yC,{asChild:!0,...i,children:l})});U7.displayName=V7;var vC="PopoverPortal",[Gue,Kue]=F7(vC,{forceMount:void 0}),z7=e=>{const{__scopePopover:t,forceMount:n,children:s,container:a}=e,i=jo(vC,t);return r.jsx(Gue,{scope:t,forceMount:n,children:r.jsx(Zl,{present:n||i.open,children:r.jsx(Cy,{asChild:!0,container:a,children:s})})})};z7.displayName=vC;var _d="PopoverContent",W7=j.forwardRef((e,t)=>{const n=Kue(_d,e.__scopePopover),{forceMount:s=n.forceMount,...a}=e,i=jo(_d,e.__scopePopover);return r.jsx(Zl,{present:s||i.open,children:i.modal?r.jsx(Xue,{...a,ref:t}):r.jsx(Jue,{...a,ref:t})})});W7.displayName=_d;var Yue=Fue("PopoverContent.RemoveScroll"),Xue=j.forwardRef((e,t)=>{const n=jo(_d,e.__scopePopover),s=j.useRef(null),a=rr(t,s),i=j.useRef(!1);return j.useEffect(()=>{const o=s.current;if(o)return iC(o)},[]),r.jsx(Ty,{as:Yue,allowPinchZoom:!0,children:r.jsx(H7,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:mt(e.onCloseAutoFocus,o=>{var l;o.preventDefault(),i.current||(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:mt(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;i.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:mt(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1})})})}),Jue=j.forwardRef((e,t)=>{const n=jo(_d,e.__scopePopover),s=j.useRef(!1),a=j.useRef(!1);return r.jsx(H7,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o,l;(o=e.onCloseAutoFocus)==null||o.call(e,i),i.defaultPrevented||(s.current||(l=n.triggerRef.current)==null||l.focus(),i.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:i=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(s.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const o=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(o))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),H7=j.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:o,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:m,...f}=e,p=jo(_d,n),b=uf(n);return aC(),r.jsx(ky,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:i,children:r.jsx(Sy,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:m,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:r.jsx(L7,{"data-state":K7(p.open),role:"dialog",id:p.contentId,...b,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),G7="PopoverClose",Que=j.forwardRef((e,t)=>
772{const{__scopePopover:n,...s}=e,a=jo(G7,n);return r.jsx(St.button,{type:"button",...s,ref:t,onClick:mt(e.onClick,()=>a.onOpenChange(!1))})});Que.displayName=G7;var Zue="PopoverArrow",ehe=j.forwardRef((e,t)=>{const{__scopePopover:n,...s}=e,a=uf(n);return r.jsx($7,{...a,...s,ref:t})});ehe.displayName=Zue;function K7(e){return e?"open":"closed"}var the=B7,rhe=U7,nhe=z7,Y7=W7;const she=the,ahe=rhe,X7=j.forwardRef(({className:e,align:t="center",sideOffset:n=4,...s},a)=>r.jsx(nhe,{children:r.jsx(Y7,{ref:a,align:t,sideOffset:n,className:lt("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...s})}));X7.displayName=Y7.displayName;function qy(){let e=localStorage.getItem("cm_fp");return e||(e=Math.random().toString(36).slice(2)+Date.now().toString(36),localStorage.setItem("cm_fp",e)),e}function ihe(e=""){const t=e.trim().split(/\s+/).filter(Boolean).length;return`${Math.max(1,Math.round(t/200))} min read`}function jr(e){return e?e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(1)+"K":String(e):"0"}const no={contributor:{label:"Contributor",color:"bg-blue-100 text-blue-800",min:10},top_contributor:{label:"Top Contributor",color:"bg-purple-100 text-purple-800",min:50},travel_expert:{label:"Travel Expert",color:"bg-green-100 text-green-800",min:100},restaurant_critic:{label:"Restaurant Critic",color:"bg-red-100 text-red-800",min:75},property_expert:{label:"Property Expert",color:"bg-amber-100 text-amber-800",min:80},chelsea_insider:{label:"Chelsea Insider",color:"bg-primary/10 text-primary",min:200},business_leader:{label:"Business Leader",color:"bg-gray-100 text-gray-700",min:150},luxury_traveller:{label:"Luxury Traveller",color:"bg-cyan-100 text-cyan-800",min:120}};function Il(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const s=Math.floor(n/60);if(s<24)return`${s}h ago`;const a=Math.floor(s/24);return a<30?`${a}d ago`:new Date(e).toLocaleDateString("en-GB",{day:"numeric",month:"short"})}function ohe({article:e,compact:t=!1}){const[n,s]=j.useState(null),[a,i]=j.useState(!1),[o,l]=j.useState(!1),{toast:c}=tk(),u=qy(),m=j.useCallback(async()=>{if(!(e!=null&&e.id))return;const g=await W.entities.ArticleEngagement.filter({article_id:e.id});if(g.length){const y=g[0];s(y);const w=f(y.liked_fingerprints),N=f(y.bookmarked_fingerprints);i(w.includes(u)),l(N.includes(u))}else{const y=ihe(e.content||""),w=await W.entities.ArticleEngagement.create({article_id:e.id,article_title:e.title,article_category:e.category,reading_time_display:y,liked_fingerprints:"[]",bookmarked_fingerprints:"[]"});s(w)}},[e==null?void 0:e.id]);j.useEffect(()=>{m()},[m]),j.useEffect(()=>{if(!(e!=null&&e.id)||!(n!=null&&n.id))return;const g=`view_${e.id}_${new Date().toDateString()}`;if(sessionStorage.getItem(g))return;sessionStorage.setItem(g,"1");const w=f(n.viewed_fingerprints||"[]").includes(u);W.entities.ArticleEngagement.update(n.id,{views_total:(n.views_total||0)+1,views_today:(n.views_today||0)+1,views_this_week:(n.views_this_week||0)+1,views_this_month:(n.views_this_month||0)+1,views_unique:w?n.views_unique||0:(n.views_unique||0)+1,views_returning:w?(n.views_returning||0)+1:n.views_returning||0,last_viewed:new Date().toISOString()})},[n==null?void 0:n.id]);function f(g){try{return JSON.parse(g||"[]")}catch{return[]}}const p=async()=>{if(!(n!=null&&n.id))return;const g=f(n.liked_fingerprints);let y,w;a?(y=g.filter(S=>S!==u),w=Math.max(0,(n.likes||0)-1)):(y=[...g,u],w=(n.likes||0)+1),i(!a);const N={...n,likes:w,liked_fingerprints:JSON.stringify(y)};s(N),await W.entities.ArticleEngagement.update(n.id,{likes:w,liked_fingerprints:JSON.stringify(y)})},b=async()=>{if(!(n!=null&&n.id))return;const g=f(n.bookmarked_fingerprints);let y,w;o?(y=g.filter(S=>S!==u),w=Math.max(0,(n.bookmarks||0)-1)):(y=[...g,u],w=(n.bookmarks||0)+1),l(!o);const N={...n,bookmarks:w,bookmarked_fingerprints:JSON.stringify(y)};s(N),await W.entities.ArticleEngagement.update(n.id,{bookmarks:w,bookmarked_fingerprints:JSON.stringify(y)}),c({title:o?"Bookmark removed":"Article bookmarked",description:o?"":"Saved to your reading list."})},v=async g=>{const y=window.location.href,w=(e==null?void 0:e.title)||"";if(g==="twitter"?window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(w)}&url=${encodeURIComponent(y)}`,"_blank"):g==="facebook"?window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(y)}`,"_blank"):(await navigator.clipboard.writeText(y),c({title:"Link copied!"})),n!=null&&n.id){const N=(n.shares||0)+1;s(S=>({...S,shares:N})),W.entities.ArticleEngagement.update(n.id,{shares:N})}};return t?r.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Nr,{className:"w-3 h-3"}),jr(n==null?void 0:n.views_total)]}),r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(On,{className:"w-3 h-3"}),jr(n==null?void 0:n.likes)]}),r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(bs,{className:"w-3 h-3"}),jr(n==null?void 0:n.comments_count)]}),(n==null?void 0:n.reading_time_display)&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Vt,{className:"w-3 h-3"}),n.reading_time_display]})]}):r.jsxs("div",{className:"flex items-center justify-between gap-2 py-3 border-y border-border flex-wrap",children:[r.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground flex-wrap",children:[(n==null?void 0:n.reading_time_display)&&r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx(Vt,{className:"w-4 h-4"}),n.reading_time_display]}),(n==null?void 0:n.trending_score)>0&&r.jsxs("span",{className:"flex items-center gap-1.5 text-orange-600",children:[r.jsx(Xr,{className:"w-4 h-4"}),"Trending"]})]}),r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsxs(K,{variant:"ghost",size:"sm",onClick:p,className:`gap-1.5 ${a?"text-red-500":"text-muted-foreground"}`,children:[r.jsx(On,{className:`w-4 h-4 ${a?"fill-red-500":""}`}),jr(n==null?void 0:n.likes)]}),r.jsxs(K,{variant:"ghost",size:"sm",onClick:b,className:`gap-1.5 ${o?"text-primary":"text-muted-foreground"}`,children:[r.jsx(ga,{className:`w-4 h-4 ${o?"fill-primary":""}`}),jr(n==null?void 0:n.bookmarks)]}),r.jsxs("span",{className:"text-muted-foreground text-xs ml-1 flex items-center gap-1",children:[r.jsx(bs,{className:"w-4 h-4"}),jr(n==null?void 0:n.comments_count)]}),r.jsxs(she,{children:[r.jsx(ahe,{asChild:!0,children:r.jsxs(K,{variant:"ghost",size:"sm",className:"gap-1.5 text-muted-foreground ml-1",children:[r.jsx(ws,{className:"w-4 h-4"}),jr(n==null?void 0:n.shares)]})}),r.jsx(X7,{className:"w-44 p-2",children:r.jsxs("div",{className:"space-y-1",children:[r.jsxs("button",{onClick:()=>v("twitter"),className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded hover:bg-muted",children:[r.jsx(gd,{className:"w-4 h-4"}),"Twitter / X"]}),r.jsxs("button",{onClick:()=>v("facebook"),className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded hover:bg-muted",children:[r.jsx(Mx,{className:"w-4 h-4"}),"Facebook"]}),r.jsxs("button",{onClick:()=>v("copy"),className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded hover:bg-muted",children:[r.jsx(KG,{className:"w-4 h-4"}),"Copy link"]})]})})]})]})]})}function lhe({name:e,url:t,size:n="w-8 h-8"}){if(t)return r.jsx("img",{src:t,alt:e,className:`${n} rounded-full object-cover flex-shrink-0`});const s=(e||"?").split(" ").map(o=>o[0]).slice(0,2).join("").toUpperCase(),a=["bg-primary","bg-blue-500","bg-green-600","bg-purple-600","bg-red-500","bg-amber-500","bg-cyan-600"],i=a[(e==null?void 0:e.charCodeAt(0))%a.length]||"bg-primary";return r.jsx("div",{className:`${n} ${i} text-white rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0`,children:s})}function J7({onSubmit:e,placeholder:t="Join the discussion...",autoFocus:n=!1}){const[s,a]=j.useState(()=>localStorage.getItem("cm_name")||""),[i,o]=j.useState(""),[l,c]=j.useState(!1),u=async()=>{!i.trim()||!s.trim()||(c(!0),localStorage.setItem("cm_name",s),await e({author_name:s,content:i.trim()}),o(""),c(!1))};return r.jsxs("div",{className:"space-y-2",children:[r.jsx("input",{value:s,onChange:m=>a(m.target.value),placeholder:"Your name",className:"w-full border border-input rounded-md px-3 py-1.5 text-sm bg-transparent focus:outline-none focus:ring-1 focus:ring-ring"}),r.jsx("textarea",{value:i,onChange:m=>
772o(m.target.value),placeholder:t,autoFocus:n,className:"w-full border border-input rounded-md px-3 py-2 text-sm bg-transparent focus:outline-none focus:ring-1 focus:ring-ring resize-none h-20"}),r.jsx("div",{className:"flex justify-end",children:r.jsx(K,{size:"sm",onClick:u,disabled:l||!i.trim()||!s.trim(),className:"bg-foreground text-background hover:bg-foreground/90",children:l?"Posting...":"Post Comment"})})]})}function kS({comment:e,isAdmin:t,onReply:n,onLike:s,onPin:a,onDelete:i,depth:o=0}){const[l,c]=j.useState(!1),[u,m]=j.useState(o<1),[f,p]=j.useState([]),[b,v]=j.useState(!1),g=qy(),y=JSON.parse(e.liked_by||"[]").includes(g),w=async()=>{if(b){m(!u);return}const A=await W.entities.Comment.filter({parent_comment_id:e.id},"created_date");p(A||[]),v(!0),m(!0)},N=async A=>{await n({...A,parent_comment_id:e.id,depth:(e.depth||0)+1}),c(!1),v(!1),setTimeout(w,500)},S=e.is_editor_comment?{label:"Chelsea Monthly",color:"bg-primary/10 text-primary"}:e.is_author_reply?{label:"Author",color:"bg-blue-100 text-blue-700"}:null;return r.jsxs("div",{className:`${o>0?"border-l-2 border-border pl-4 ml-4":""}`,children:[r.jsxs("div",{className:"group flex gap-3 py-3",children:[r.jsx(lhe,{name:e.author_name,url:e.author_avatar,size:"w-8 h-8"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap mb-1",children:[r.jsx("span",{className:"font-semibold text-sm",children:e.author_name}),S&&r.jsx(ge,{className:`text-xs px-1.5 py-0 ${S.color}`,children:S.label}),e.is_pinned&&r.jsxs(ge,{className:"text-xs px-1.5 py-0 bg-amber-100 text-amber-700",children:[r.jsx(Gh,{className:"w-2.5 h-2.5 mr-0.5 inline"}),"Pinned"]}),r.jsx("span",{className:"text-xs text-muted-foreground",children:Il(e.created_date)})]}),r.jsx("p",{className:"text-sm text-foreground/90 leading-relaxed",children:e.content}),r.jsxs("div",{className:"flex items-center gap-2 mt-1.5",children:[r.jsxs("button",{onClick:()=>s(e),className:`flex items-center gap-1 text-xs transition-colors ${y?"text-red-500":"text-muted-foreground hover:text-red-500"}`,children:[r.jsx(On,{className:`w-3.5 h-3.5 ${y?"fill-red-500":""}`}),e.likes||0]}),r.jsxs("button",{onClick:()=>c(!l),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[r.jsx(OK,{className:"w-3.5 h-3.5"}),"Reply"]}),e.reply_count>0&&r.jsxs("button",{onClick:w,className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[u?r.jsx(dy,{className:"w-3.5 h-3.5"}):r.jsx(Sa,{className:"w-3.5 h-3.5"}),e.reply_count," ",e.reply_count===1?"reply":"replies"]}),t&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>a(e),className:"text-xs text-muted-foreground hover:text-amber-600 transition-colors opacity-0 group-hover:opacity-100",children:r.jsx(Gh,{className:"w-3.5 h-3.5"})}),r.jsx("button",{onClick:()=>i(e),className:"text-xs text-muted-foreground hover:text-red-600 transition-colors opacity-0 group-hover:opacity-100",children:r.jsx(e8,{className:"w-3.5 h-3.5"})})]})]}),l&&r.jsx("div",{className:"mt-2",children:r.jsx(J7,{onSubmit:N,placeholder:`Reply to ${e.author_name}...`,autoFocus:!0})})]})]}),u&&f.length>0&&r.jsx("div",{className:"space-y-0",children:f.map(A=>r.jsx(kS,{comment:A,isAdmin:t,onReply:n,onLike:s,onPin:a,onDelete:i,depth:o+1},A.id))})]})}function che(e,t,n){const s=Date.now(),a=1440*60*1e3;let i=180;if(n){const u=new Date(n.replace(" ","T")).getTime();!isNaN(u)&&u<s&&(i=Math.max(Math.floor((s-u)/a),1))}const l=1+(e||"").split("").reduce((u,m)=>u+m.charCodeAt(0),0)*(t+3)%i;return new Date(s-l*a).toISOString()}function su({articleId:e,discussionId:t,isAdmin:n=!1,articleDate:s,customSeeded:a}){const[i,o]=j.useState([]),[l,c]=j.useState(!0),{toast:u}=tk(),m=e||t,f=async()=>{const A=e?{article_id:e,depth:0}:{discussion_id:t,depth:0},k=await W.entities.Comment.filter({...A,status:"published"},"-created_date");let C=[];a&&a.length>0?C=a.map((P,R)=>({id:`seeded-${R}`,author_name:P.author_name,content:P.content,likes:P.likes||0,liked_by:"[]",reply_count:0,depth:0,status:"published",created_date:new Date(Date.now()-(P.hoursAgo||1)*36e5).toISOString(),is_seeded:!0})):C=gde(e||t,5).map((P,R)=>({id:`seeded-${R}`,author_name:P.author,content:P.text,likes:Math.floor(3+(e||"x").charCodeAt(R%4)*(R+1)%28),liked_by:"[]",reply_count:0,depth:0,status:"published",created_date:che(e,R,s),is_seeded:!0}));const T=[...k||[],...C].sort((P,R)=>new Date(R.created_date)-new Date(P.created_date));o(T),c(!1)};j.useEffect(()=>{m&&f()},[m]);const p=async A=>{const k=await W.entities.Comment.create({...A,article_id:e||void 0,discussion_id:t||void 0,depth:0,likes:0,liked_by:"[]",status:"published"});if(o(C=>[k,...C]),e){const C=await W.entities.ArticleEngagement.filter({article_id:e});
772C[0]&&W.entities.ArticleEngagement.update(C[0].id,{comments_count:(C[0].comments_count||0)+1})}if(t){const C=await W.entities.Discussion.filter({id:t});C[0]&&W.entities.Discussion.update(C[0].id,{comment_count:(C[0].comment_count||0)+1,last_activity:new Date().toISOString()})}u({title:"Comment posted!"})},b=async A=>{if(await W.entities.Comment.create({...A,article_id:e||void 0,discussion_id:t||void 0,likes:0,liked_by:"[]",status:"published"}),A.parent_comment_id){const k=i.find(C=>C.id===A.parent_comment_id);k&&(await W.entities.Comment.update(A.parent_comment_id,{reply_count:(k.reply_count||0)+1}),o(C=>C.map(T=>T.id===A.parent_comment_id?{...T,reply_count:(T.reply_count||0)+1}:T)))}u({title:"Reply posted!"})},v=async A=>{if(A.is_seeded){o(M=>M.map(D=>D.id===A.id?{...D,likes:(D.likes||0)+1}:D));return}const k=qy(),C=JSON.parse(A.liked_by||"[]"),T=C.includes(k),P=T?C.filter(M=>M!==k):[...C,k],R=T?Math.max(0,(A.likes||0)-1):(A.likes||0)+1;o(M=>M.map(D=>D.id===A.id?{...D,likes:R,liked_by:JSON.stringify(P)}:D)),await W.entities.Comment.update(A.id,{likes:R,liked_by:JSON.stringify(P)})},g=async A=>{await W.entities.Comment.update(A.id,{is_pinned:!A.is_pinned}),f()},y=async A=>{await W.entities.Comment.update(A.id,{status:"rejected"}),o(k=>k.filter(C=>C.id!==A.id))},w=i.filter(A=>!A.parent_comment_id||A.depth===0),N=w.filter(A=>A.is_pinned),S=w.filter(A=>!A.is_pinned);return r.jsxs("div",{className:"mt-8",children:[r.jsxs("h3",{className:"text-lg font-bold font-heading mb-4 flex items-center gap-2",children:[r.jsx(bs,{className:"w-5 h-5"}),"Discussion (",i.length,")"]}),r.jsx("div",{className:"mb-6",children:r.jsx(J7,{onSubmit:p})}),l?r.jsx("div",{className:"text-sm text-muted-foreground text-center py-4",children:"Loading comments..."}):r.jsxs("div",{className:"divide-y divide-border",children:[N.map(A=>r.jsx(kS,{comment:A,isAdmin:n,onReply:b,onLike:v,onPin:g,onDelete:y},A.id)),S.map(A=>r.jsx(kS,{comment:A,isAdmin:n,onReply:b,onLike:v,onPin:g,onDelete:y},A.id)),i.length===0&&r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"Be the first to comment on this story."})]})]})}function T3(){const{id:e,slug:t}=yo(),n=t||e,[s,a]=j.useState(null),[i,o]=j.useState(!0),[l,c]=j.useState(null),[u,m]=j.useState(null),[f,p]=j.useState(""),[b,v]=j.useState(!1);j.useEffect(()=>{const A=localStorage.getItem("member_email")||"";p(A),W.entities.Article.filter({slug:n}).then(C=>C==null?void 0:C[0]).then(C=>C||W.entities.Article.filter({id:n}).then(T=>T==null?void 0:T[0])).then(async C=>{if(C){if(C.custom_url&&C.custom_url!==`/${n}`&&window.location.pathname!==C.custom_url){window.location.replace(C.custom_url);return}a(sC(C));const T=await g(C.id,A);m(T)}else c("Article not found.")}).catch(C=>{c((C==null?void 0:C.message)||"Failed to load article.")}).finally(()=>o(!1))},[n]);const g=async(A,k)=>{try{return await W.functions.invoke("checkArticleAccess",{article_id:A,user_email:k})}catch{return{access:"granted",reason:"public"}}},y=A=>{window.location.href=`/membership?upgrade=${A}&email=${encodeURIComponent(f)}`};if(i)return r.jsx("div",{className:"flex items-center justify-center min-h-screen",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})});if(l||!s)return r.jsxs("div",{className:"max-w-2xl mx-auto px-6 py-24 text-center",children:[r.jsx("p",{className:"text-muted-foreground text-lg mb-6",children:l||"Article not found."}),r.jsx(se,{to:"/Articles",className:"text-primary font-bold underline",children:"â Back to Articles"})]});s.content?s.content.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim():s.excerpt;const w=s.canonical_url||(s.slug?`https://chelseamonthly.com/${s.slug}/`:null),N=rg(s),S=u&&u.access==="denied";return r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsx(pde,{isOpen:b,accessLevel:u==null?void 0:u.access_level,currentMembership:u==null?void 0:u.reason,onUpgrade:y,onClose:()=>v(!1),teaserText:u==null?void 0:u.teaser_text}),r.jsx("div",{className:"max-w-4xl mx-auto px-6 pt-8",children:r.jsxs(se,{to:"/Articles",className:"inline-flex items-center gap-2 text-muted-foreground hover:text-primary text-sm font-medium transition-colors",children:[r.jsx(Ct,{className:"w-4 h-4"})," Back to All Stories"]})}),r.jsx("div",{className:"max-w-4xl mx-auto px-6 pt-6",children:r.jsx("div",{className:"rounded-sm overflow-hidden",style:{maxHeight:"480px"},children:r.jsx(Dn,{src:s.image_url,category:s.category,articleId:s.id,alt:s.title,className:"w-full object-cover",style:{maxHeight:"480px",width:"100%"}})})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-10 relative",children:[s.category&&r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-widest mb-3 block",children:s.category}),r.jsx("h1",{className:"text-3xl sm:text-4xl font-bold text-foreground leading-tight mb-6",style:{fontFamily:"'Montserrat', sans-serif"},children:s.title}),r.jsxs("div",{className:"flex flex-wrap items-center gap-4 text-sm text-muted-foreground border-b border-border pb-6 mb
772-8",children:[s.author_image&&r.jsx("img",{src:s.author_image,alt:"",className:"w-8 h-8 rounded-full"}),s.author_name&&r.jsx("span",{className:"font-medium text-foreground",children:s.author_name}),N&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Jt,{className:"w-3 h-3"})," ",N]}),s.read_time&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Vt,{className:"w-3 h-3"})," ",s.read_time]}),r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Nr,{className:"w-3 h-3"})," ",yde(s.id,s.views)," views"]})]}),r.jsx(ohe,{article:s}),r.jsx("div",{className:"mb-8"}),s.content?r.jsxs(r.Fragment,{children:[r.jsx("style",{children:` 773 .article-body h1, .article-body h2, .article-body h3, .article-body h4 { 774 font-family: 'Montserrat', sans-serif; 775 font-weight: 700; 776 color: #1a1a1a; 777 margin-top: 2.5rem; 778 margin-bottom: 1rem; 779 line-height: 1.3; 780 } 781 .article-body h2 { font-size: 1.6rem; letter-spacing: -0.01em; } 782 .article-body h3 { font-size: 1.25rem; letter-spacing: 0.01em; } 783 .article-body p { 784 font-family: 'Lato', sans-serif; 785 font-size: 1.05rem; 786 line-height: 1.9; 787 color: #2a2a2a; 788 margin-bottom: 1.5rem; 789 } 790 .article-body blockquote { 791 border-left: 3px solid hsl(var(--primary)); 792 margin: 2.5rem 0; 793 padding: 1rem 0 1rem 1.75rem; 794 font-size: 1.15rem; 795 font-style: italic; 796 color: #444; 797 line-height: 1.7; 798 } 799 .article-body blockquote strong { 800 font-style: normal; 801 font-size: 0.8rem; 802 font-weight: 700; 803 text-transform: uppercase; 804 letter-spacing: 0.1em; 805 color: hsl(var(--primary)); 806 display: block; 807 margin-top: 0.75rem; 808 } 809 .article-body ul, .article-body ol { 810 margin: 1.25rem 0 1.5rem 1.5rem; 811 color: #2a2a2a; 812 line-height: 1.9; 813 } 814 .article-body li { margin-bottom: 0.5rem; font-size: 1.05rem; } 815 .article-body a { color: hsl(var(--primary)); text-decoration: underline; } 816 .article-body em { font-style: italic; } 817 .article-body strong { font-weight: 700; } 818 .article-body hr { 819 border: none; 820 border-top: 1px solid hsl(var(--border)); 821 margin: 2.5rem 0; 822 } 823 `}),r.jsx("div",{className:`article-body max-w-none ${S?"blur-sm select-none opacity-50":""}`,dangerouslySetInnerHTML:{__html:s.content}}),S&&r.jsx(xde,{article:s,accessLevel:u==null?void 0:u.access_level,currentMembership:f?"member":"free",onUpgrade:y,excerpt:(u==null?void 0:u.teaser_text)||s.excerpt})]}):r.jsxs(r.Fragment,{children:[s.excerpt&&r.jsx("p",{className:"text-foreground leading-relaxed text-xl font-light border-l-4 border-primary pl-6 mb-8",children:s.excerpt}),w?r.jsxs("div",{className:"mt-4 p-6 bg-muted/40 rounded-sm border border-border text-center",children:[r.jsx("p",{className:"text-muted-foreground text-sm mb-4",children:"Read the full article on Chelsea Monthly"}),r.jsx("a",{href:w,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 bg-primary text-primary-foreground font-bold px-8 py-3 text-sm uppercase tracking-widest hover:bg-primary/90 transition-colors",children:"Read Full Article â"})]}):r.jsx("p",{className:"text-muted-foreground italic",children:"No content available for this article."})]}),!S&&r.jsx("div",{className:"mt-8 pt-4 border-t border-border",children:r.jsx(su,{articleId:s.id,articleDate:s.published_date})})]})]})}function dhe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),[a,i]=j.useState(""),[o,l]=j.useState("all"),[c,u]=j.useState([]);j.useEffect(()=>{W.entities.MagazineIssue.list("-issue_date",500).then(f=>{t(f||[]);const p=[...new Set(f.map(b=>
823b.issue_date?new Date(b.issue_date).getFullYear():null).filter(Boolean))].sort((b,v)=>v-b);u(p),s(!1)}).catch(()=>s(!1))},[]);const m=e.filter(f=>{const p=!a||(f.title||"").toLowerCase().includes(a.toLowerCase()),b=o==="all"||f.issue_date&&new Date(f.issue_date).getFullYear()===parseInt(o);return p&&b});return r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"relative bg-secondary overflow-hidden",style:{minHeight:"40vh"},children:[r.jsxs("div",{className:"absolute inset-0 pointer-events-none",children:[r.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-primary/10 rounded-full blur-[120px]"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-80 h-80 bg-accent/10 rounded-full blur-[100px]"})]}),r.jsxs("div",{className:"relative z-10 flex flex-col items-center justify-center text-center px-6",style:{minHeight:"40vh"},children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-widest mb-3 block",children:"Chelsea Monthly"}),r.jsx("h1",{className:"text-5xl sm:text-6xl font-bold text-secondary-foreground mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Magazine Archive"}),r.jsx("p",{className:"text-secondary-foreground/60 text-lg max-w-xl",children:"Explore our complete collection of Chelsea Monthly issues."})]})]}),n?r.jsx("div",{className:"flex items-center justify-center py-24",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})}):r.jsxs(r.Fragment,{children:[r.jsx("section",{className:"bg-card border-b border-border sticky top-0 z-30 shadow-sm",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-4",children:r.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-start sm:items-center",children:[r.jsxs("div",{className:"relative flex-1 max-w-sm",children:[r.jsx(dn,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),r.jsx(de,{value:a,onChange:f=>i(f.target.value),placeholder:"Search issues...",className:"pl-9 bg-muted border-border"})]}),r.jsxs("div",{className:"relative",children:[r.jsxs("select",{value:o,onChange:f=>l(f.target.value),className:"appearance-none px-4 py-2 bg-muted text-muted-foreground rounded border border-border text-sm font-medium pr-8 cursor-pointer hover:bg-primary/10 transition-colors",children:[r.jsx("option",{value:"all",children:"All Years"}),c.map(f=>r.jsx("option",{value:f,children:f},f))]}),r.jsx(Sa,{className:"absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none"})]})]})})}),r.jsx("section",{className:"py-12 bg-background",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6",children:m.length===0?r.jsx("div",{className:"text-center py-24 text-muted-foreground",children:r.jsx("p",{className:"text-lg font-semibold",children:"No issues found."})}):r.jsxs(r.Fragment,{children:[r.jsxs("p",{className:"text-muted-foreground text-sm mb-8",children:["Showing ",r.jsx("span",{className:"font-bold text-foreground",children:m.length})," of ",r.jsx("span",{className:"font-bold text-foreground",children:e.length})," issues"]}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-8",children:m.map(f=>r.jsx(se,{to:`/magazine/${f.id}`,className:"group",children:r.jsxs("div",{className:"bg-card rounded-lg overflow-hidden shadow-lg hover:shadow-2xl transition-all duration-300",children:[f.cover_image&&r.jsx("div",{className:"relative w-full aspect-[3/4] overflow-hidden bg-muted",children:r.jsx("img",{src:f.cover_image,alt:f.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"})}),r.jsxs("div",{className:"p-6",children:[f.issue_number&&r.jsxs("span",{className:"text-xs font-bold text-primary uppercase tracking-wider mb-2 block",children:["Issue ",f.issue_number]}),r.jsx("h3",{className:"text-xl font-bold text-foreground mb-2 line-clamp-2",style:{fontFamily:"'Montserrat', sans-serif"},children:f.title}),f.issue_date&&r.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:new Date(f.issue_date).toLocaleDateString("en-GB",{year:"numeric",month:"long"})}),f.description&&r.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 mb-4",children:f.description}),r.jsx("span",{className:"inline-flex items-center gap-2 text-primary text-sm font-bold uppercase tracking-widest group-hover:gap-3 transition-all",children:"View Issue â"})]})]})},f.id))})]})})})]})]})}function uhe(){const{id:e}=yo();ka();const[t,n]=j.useState(null),[s,a]=j.useState(!0),[i,o]=j.useState(null);return j.useEffect(()=>{W.entities.MagazineIssue.get(e).then(l=>{n(l),a(!1)}).catch(l=>{o((l==null?void 0:l.message)||"Issue not found"),a(!1)})},[e]),s?r.jsx("div",{className:"flex items-center justify-center min-h-screen",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})}):i||!t?r.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center px-6",children:r.jsxs("div",{className:"text-center",children:[r.jsx("h1",{className:"text-3xl font-bold text-foreground mb-2",children:"Issue Not Found"}),r.jsx("p",{className:"text-muted-foreground mb-6",children:i}),r.jsxs(se,{to:"/magazine",className:"inline-flex items-center gap-2 text-primary font-bold hover:text-primary/90",children:[r.jsx(Ct,{className:"w-4 h-4"})," Back to Archive"]})]})}):r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsx("div",{className:"bg-card border-b border-border sticky top-0 z-30",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-4",children:r.jsxs(se,{to:"/magazine",className:"inline-flex items-center gap-2 text-primary font-bold hover:text-primary/90 transition-colors",children:[r.jsx(Ct,{className:"w-4 h-4"})," Back to Archive"]})})}),r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-12",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-12",children:[r.jsx("div",{className:"lg:col-span-1",children:t.cover_image&&r.jsxs("div",{className:"sticky top-20",children:[r.jsx("div",{className:"relative w-full aspect-[3/4] rounded-lg overflow-hidden shadow-2xl bg-muted",children:r.jsx("img",{src:t.cover_image,alt:t.title,className:"w-full h-full object-cover"})}),r.jsxs("div",{className:"space-y-3 mt-6",children:[t.pdf_file&&r.jsxs("a",{href:t.pdf_file,download:!0,className:"flex items-center justify-center gap-2 w-full px-6 py-3 bg-primary text-primary-foreground font-bold rounded hover:bg-primary/90 transition-colors",children:[r.jsx(hy,{className:"w-4 h-4"})," Download PDF"]}),r.jsxs("button",{className:"flex items-center justify-center gap-2 w-full px-6 py-3 bg-muted text-muted-foreground font-bold rounded hover:bg-muted/80 transition-colors",children:[r.jsx(ws,{className:"w-4 h-4"})," Share"]}),r.jsx("button",{className:"w-full px-6 py-3 bg-accent text-accent-foreground font-bold rounded hover:bg-accent/90 transition-colors",children:"Subscribe Now"})]})]})}),r.jsx("div",{className:"lg:col-span-2",children:r.jsxs("div",{className:"space-y-8",children:[t.issue_number&&r.jsxs("span",{className:"text-xs font-bold text-primary uppercase tracking-widest",children:["Issue ",t.issue_number]}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-5xl font-bold text-foreground mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:t.title}),t.issue_date&&r.jsx("p",{className:"text-lg text-muted-foreground",children:new Date(t.issue_date).toLocaleDateString("en-GB",{year:"numeric",month:"long",day:"numeric"})})]}),t.description&&r.jsx("div",{className:"prose prose-invert max-w-none",children:r.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:t.description})}),r.jsxs("div",{className:"grid grid-cols-2 gap-6 py-8 border-y border-border",children:[t.issue_number&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground mb-1",children:"Issue Number"}),r.jsx("p",{className:"text-xl font-bold text-foreground",children:t.issue_number})]}),t.issue_date&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground mb-1",children:"Published"}),r.jsx("p",{className:"text-xl font-bold text-foreground",children:new Date(t.issue_date).toLocaleDateString("en-GB",{year:"numeric",month:"long"})})]}),t.category&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground mb-1",children:"Category"}),r.jsx("p",{className:"text-xl font-bold text-foreground",children:t.category})]})]}),t.featured&&r.jsx("div",{className:"bg-accent/10 border border-accent rounded-lg p-6",children:r.jsx("p",{className:"text-accent font-bold text-lg",children:"â
Featured Edition"})}),r.jsxs("div",{className:"bg-secondary p-8 rounded-lg",children:[r.jsx("h3",{className:"text-2xl font-bold text-secondary-foreground mb-3",children:"Want to read more?"}
823),r.jsx("p",{className:"text-secondary-foreground/70 mb-6",children:"Subscribe to Chelsea Monthly and receive both print and digital editions delivered to you."}),r.jsx("button",{className:"px-8 py-3 bg-primary text-primary-foreground font-bold uppercase tracking-wider rounded hover:bg-primary/90 transition-colors",children:"Subscribe Now"})]})]})})]})})]})}const hhe={draft:"bg-slate-100 text-slate-800",submitted:"bg-blue-100 text-blue-800",under_review:"bg-yellow-100 text-yellow-800",approved:"bg-green-100 text-green-800",rejected:"bg-red-100 text-red-800",changes_requested:"bg-orange-100 text-orange-800",scheduled:"bg-purple-100 text-purple-800",published:"bg-emerald-100 text-emerald-800"},mhe={draft:Rn,submitted:Vt,under_review:Ln,approved:qt,changes_requested:Ln,scheduled:Vt,published:qt};function fhe(){const{user:e}=vo(),[t,n]=j.useState([]),[s,a]=j.useState([]),[i,o]=j.useState(!0),[l,c]=j.useState("all");j.useEffect(()=>{u()},[e]);const u=async()=>{if(e)try{const v=await W.entities.ArticleDraft.filter(e.role==="admin"?{}:{journalist_id:e.id},"-created_date",100);n(v||[]);const g=await W.entities.ArticleNotification.filter({recipient_id:e.id},"-created_date",20);a(g||[])}finally{o(!1)}},m=t.filter(v=>l==="all"?!0:v.status===l),f=t.filter(v=>v.status==="draft").length,p=t.filter(v=>v.status==="submitted").length,b=t.filter(v=>v.status==="published").length;return!e||e.role!=="journalist"&&e.role!=="admin"?r.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:r.jsxs("div",{className:"text-center",children:[r.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Access Denied"}),r.jsx("p",{className:"text-muted-foreground",children:"This dashboard is for journalists only."})]})}):r.jsxs("div",{className:"min-h-screen bg-muted/20",children:[r.jsx("div",{className:"bg-background border-b border-border sticky top-0 z-40",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-4 flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-3xl font-bold text-foreground",children:"Newsroom"}),r.jsxs("p",{className:"text-muted-foreground",children:["Welcome back, ",e.full_name]})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(se,{to:"/journalist/profile",children:r.jsx(K,{variant:"outline",size:"icon",children:r.jsx(o8,{className:"w-4 h-4"})})}),r.jsx(se,{to:"/journalist/new-article",children:r.jsxs(K,{className:"gap-2",children:[r.jsx(jn,{className:"w-4 h-4"})," New Article"]})})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-8",children:[r.jsx(oe,{children:r.jsx(ce,{className:"pt-6",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Total Articles"}),r.jsx("p",{className:"text-3xl font-bold",children:t.length})]}),r.jsx(Rn,{className:"w-8 h-8 text-muted-foreground opacity-30"})]})})}),r.jsx(oe,{children:r.jsx(ce,{className:"pt-6",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Drafts"}),r.jsx("p",{className:"text-3xl font-bold",children:f})]}),r.jsx(Rn,{className:"w-8 h-8 text-slate-500 opacity-30"})]})})}),r.jsx(oe,{children:r.jsx(ce,{className:"pt-6",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Under Review"}),r.jsx("p",{className:"text-3xl font-bold",children:p})]}),r.jsx(Vt,{className:"w-8 h-8 text-yellow-500 opacity-30"})]})})}),r.jsx(oe,{children:r.jsx(ce,{className:"pt-6",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Published"}),r.jsx("p",{className:"text-3xl font-bold",children:b})]}),r.jsx(qt,{className:"w-8 h-8 text-emerald-500 opacity-30"})]})})})]}),s.length>0&&r.jsxs(oe,{className:"mb-8 border-blue-200 bg-blue-50",children:[r.jsx(ut,{className:"pb-3",children:r.jsxs(ht,{className:"text-lg",children:["Notifications (",s.filter(v=>!v.read).length,")"]})}),r.jsx(ce,{className:"space-y-2 max-h-40 overflow-y-auto",children:s.map(v=>r.jsxs("div",{className:`p-3 rounded text-sm ${v.read?"bg-white/50":"bg-white border border-blue-200"}`,children:[r.jsx("p",{className:"font-medium text-foreground",children:v.message}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:new Date(v.created_date).toLocaleDateString()})]},v.id))})]}),r.jsx("div",{className:"flex gap-2 mb-6 border-b border-border",children:["all","draft","submitted","approved","published","changes_requested"].map(v=>r.jsx("button",{onClick:()=>c(v),className:`px-4 py-2 text-sm font-medium border-b-2 -mb-px transition-colors ${l===v?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:v.replace(/_/g," ").charAt(0).toUpperCase()+v.slice(1).replace(/_/g," ")},v))}),r.jsx("div",{className:"space-y-3",children:i?r.jsx("div",{className:"text-center py-12",children:"Loading articles..."}):m.length===0?r.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[r.jsx("p",{children:"No articles in this category."}),r.jsx(se,{to:"/journalist/new-article",children:r.jsx(K,{className:"mt-4",children:"Create Your First Article"})})]}):m.map(v=>{const g=mhe[v.status]||Rn;return r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsxs(ce,{className:"p-4 flex items-center justify-between gap-4",children:[r.jsxs("div",{className:"flex items-center gap-4 flex-1 min-w-0",children:[r.jsx(g,{className:"w-5 h-5 text-muted-foreground flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx(se,{to:`/journalist/article/${v.id}`,className:"hover:underline",children:r.jsx("h3",{className:"font-semibold text-foreground truncate",children:v.title})}),r.jsx("p",{className:"text-sm text-muted-foreground",children:new Date(v.created_date).toLocaleDateString()})]})]}),r.jsxs("div",{className:"flex items-center gap-3 flex-shrink-0",children:[r.jsx(ge,{className:hhe[v.status],children:v.status.replace(/_/g," ")}),r.jsx(se,{to:`/journalist/article/${v.id}`,children:r.jsx(K,{variant:"ghost",size:"sm",children:"Edit"})})]})]})},v.id)})})]})]})}const lg=j.forwardRef(({className:e,...t},n)=>
823r.jsx("textarea",{className:lt("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));lg.displayName="Textarea";function Q7({article:e,onSave:t,onSubmit:n}){const[s,a]=j.useState((e==null?void 0:e.title)||""),[i,o]=j.useState((e==null?void 0:e.excerpt)||""),[l,c]=j.useState((e==null?void 0:e.content)||""),[u,m]=j.useState((e==null?void 0:e.category)||""),[f,p]=j.useState(!1),[b,v]=j.useState(!1),g=async()=>{p(!0);try{await t({title:s,excerpt:i,content:l,category:u})}finally{p(!1)}},y=async()=>{if(!s||!i||!l){alert("Please fill in all required fields");return}v(!0);try{await n({title:s,excerpt:i,content:l,category:u})}finally{v(!1)}};return r.jsxs(oe,{className:"border-0 shadow-lg",children:[r.jsx(ut,{className:"border-b bg-muted/30 pb-4",children:r.jsx(ht,{children:"Article Editor"})}),r.jsxs(ce,{className:"p-6 space-y-6",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-semibold mb-2 block",children:"Title *"}),r.jsx(de,{value:s,onChange:w=>a(w.target.value),placeholder:"Article title",className:"text-lg"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-semibold mb-2 block",children:"Category"}),r.jsx(de,{value:u,onChange:w=>m(w.target.value),placeholder:"e.g., Travel, Fashion, Food"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-semibold mb-2 block",children:"Excerpt *"}),r.jsx(lg,{value:i,onChange:w=>o(w.target.value),placeholder:"Brief summary (150-200 words)",rows:3})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-semibold mb-2 block",children:"Content *"}),r.jsx(lg,{value:l,onChange:w=>c(w.target.value),placeholder:"Full article content",rows:10})]}),r.jsxs("div",{className:"flex gap-3 pt-4 border-t",children:[r.jsxs(K,{onClick:g,variant:"outline",disabled:f,className:"gap-2",children:[r.jsx(a8,{className:"w-4 h-4"})," Save Draft"]}),r.jsxs(K,{onClick:y,disabled:b,className:"gap-2",children:[r.jsx(i8,{className:"w-4 h-4"})," Submit for Review"]})]})]})]})}function phe(){const{user:e}=vo(),t=ka(),[n,s]=j.useState(""),a=async o=>{try{const l=await W.entities.ArticleDraft.create({...o,journalist_id:e.id,status:"draft"});alert("Draft saved successfully"),t(`/journalist/article/${l.id}`)}catch(l){s(l.message)}},i=async o=>{try{const l=await W.entities.ArticleDraft.create({...o,journalist_id:e.id,status:"submitted",last_submitted:new Date().toISOString()});alert("Article submitted for review"),t("/journalist/dashboard")}catch(l){s(l.message)}};return r.jsx("div",{className:"min-h-screen bg-muted/20 p-6",children:r.jsxs("div",{className:"max-w-4xl mx-auto",children:[r.jsx("div",{className:"mb-6",children:r.jsx(se,{to:"/journalist/dashboard",children:r.jsxs(K,{variant:"ghost",className:"gap-2",children:[r.jsx(Ct,{className:"w-4 h-4"})," Back to Dashboard"]})})}),n&&r.jsx("div",{className:"bg-red-50 border border-red-200 text-red-700 p-4 rounded mb-6",children:n}),r.jsx(Q7,{article:null,onSave:a,onSubmit:i})]})})}function xhe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),[a,i]=j.useState(!1);j.useEffect(()=>{o()},[]);const o=async()=>{try{const m=await W.auth.me(),f=await W.entities.MediaFile.filter({journalist_id:m.id},"-created_date",100);t(f||[])}finally{s(!1)}},l=async m=>{var p;const f=(p=m.target.files)==null?void 0:p[0];if(f){i(!0);try{const b=await W.auth.me(),v=await W.integrations.Core.UploadFile({file:f});await W.entities.MediaFile.create({filename:f.name,file_url:v.file_url,file_type:f.type.startsWith("image")?"image":"document",journalist_id:b.id}),await o()}finally{i(!1)}}},c=async m=>{confirm("Delete this file?")&&(await W.entities.MediaFile.delete(m),await o())},u=m=>{navigator.clipboard.writeText(m),alert("URL copied to clipboard")};return n?r.jsx("div",{className:"text-center py-8",children:"Loading media..."}):r.jsxs("div",{className:"space-y-6",children:[r.jsx("div",{className:"border-2 border-dashed border-border rounded-lg p-8 text-center",children:r.jsxs("label",{className:"cursor-pointer",children:[r.jsxs("div",{className:"flex flex-col items-center gap-2",children:[r.jsx(Jm,{className:"w-8 h-8 text-muted-foreground"}),r.jsx("span",{className:"text-sm font-medium",children:"Click to upload or drag and drop"}),r.jsx("span",{className:"text-xs text-muted-foreground",children:"PNG, JPG, PDF up to 10MB"})]}),r.jsx("input",{type:"file",onChange:l,disabled:a,className:"hidden",accept:"image/*,.pdf"})]})}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:e.map(m=>r.jsx(oe,{className:"overflow-hidden",children:r.jsxs(ce,{className:"p-4",children:[m.file_type==="image"&&r.jsx("img",{src:m.file_url,alt:m.filename,className:"w-full h-32 object-cover rounded mb-3"}),r.jsx("p",{className:"text-sm font-medium truncate mb-3",children:m.filename}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs(K,{size:"sm",variant:"outline",onClick:()=>u(m.file_url),className:"flex-1 gap-1",children:[r.jsx(QL,{className:"w-3 h-3"})," Copy URL"]}),r.jsx(K,{size:"sm",variant:"destructive",onClick:()=>
vendor: 4,344 bytes, line 823
823c(m.id),children:r.jsx(my,{className:"w-3 h-3"})})]})]})},m.id))}),e.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:r.jsx("p",{children:"No files uploaded yet. Start by uploading your first image."})})]})}function E3(e){const t=ghe(e),n=j.forwardRef((s,a)=>{const{children:i,...o}=s,l=j.Children.toArray(i),c=l.find(vhe);if(c){const u=c.props.children,m=l.map(f=>f===c?j.Children.count(u)>1?j.Children.only(null):j.isValidElement(u)?u.props.children:null:f);return r.jsx(t,{...o,ref:a,children:j.isValidElement(u)?j.cloneElement(u,void 0,m):null})}return r.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function ghe(e){const t=j.forwardRef((n,s)=>{const{children:a,...i}=n;if(j.isValidElement(a)){const o=jhe(a),l=bhe(i,a.props);return a.type!==j.Fragment&&(l.ref=s?Xl(s,o):o),j.cloneElement(a,l)}return j.Children.count(a)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var yhe=Symbol("radix.slottable");function vhe(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===yhe}function bhe(e,t){const n={...t};for(const s in t){const a=e[s],i=t[s];/^on[A-Z]/.test(s)?a&&i?n[s]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[s]=a):s==="style"?n[s]={...a,...i}:s==="className"&&(n[s]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function jhe(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Z7(e){const t=e+"CollectionProvider",[n,s]=Ql(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=g=>{const{scope:y,children:w}=g,N=X.useRef(null),S=X.useRef(new Map).current;return r.jsx(a,{scope:y,itemMap:S,collectionRef:N,children:w})};o.displayName=t;const l=e+"CollectionSlot",c=E3(l),u=X.forwardRef((g,y)=>{const{scope:w,children:N}=g,S=i(l,w),A=rr(y,S.collectionRef);return r.jsx(c,{ref:A,children:N})});u.displayName=l;const m=e+"CollectionItemSlot",f="data-radix-collection-item",p=E3(m),b=X.forwardRef((g,y)=>{const{scope:w,children:N,...S}=g,A=X.useRef(null),k=rr(y,A),C=i(m,w);return X.useEffect(()=>(C.itemMap.set(A,{ref:A,...S}),()=>void C.itemMap.delete(A))),r.jsx(p,{[f]:"",ref:k,children:N})});b.displayName=m;function v(g){const y=i(e+"CollectionConsumer",g);return X.useCallback(()=>{const N=y.collectionRef.current;if(!N)return[];const S=Array.from(N.querySelectorAll(`[${f}]`));return Array.from(y.itemMap.values()).sort((C,T)=>S.indexOf(C.ref.current)-S.indexOf(T.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:o,Slot:u,ItemSlot:b},v,s]}var whe=j.createContext(void 0);function bC(e){const t=j.useContext(whe);return e||t||"ltr"}var gj="rovingFocusGroup.onEntryFocus",Nhe={bubbles:!1,cancelable:!0},hf="RovingFocusGroup",[CS,eq,_he]=Z7(hf),[She,tq]=Ql(hf,[_he]),[khe,Che]=She(hf),rq=j.forwardRef((e,t)=>r.jsx(CS.Provider,{scope:e.__scopeRovingFocusGroup,children:r.jsx(CS.Slot,{scope:e.__scopeRovingFocusGroup,children:r.jsx(Ahe,{...e,ref:t})})}));rq.displayName=hf;var Ahe=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:s,loop:a=!1,dir:i,currentTabStopId:o,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...f}=e,p=j.useRef(null),b=rr(t,p),v=bC(i),[g,y]=wd({prop:o,defaultProp:l??null,onChange:c,caller:hf}),[w,N]=j.useState(!1),S=fo(u),A=eq(n),k=j.useRef(!1),[C,T]=j.useState(0);return j.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(gj,S),()=>P.removeEventListener(gj,S)},[S]),r.jsx(khe,{scope:n,orientation:s,dir:v,loop:a,currentTabStopId:g,onItemFocus:j.useCallback(P=>y(P),[y]),onItemShiftTab:j.useCallback(()=>N(!0),[]),onFocusableItemAdd:j.useCallback(()=>T(P=>P+1),[]),onFocusableItemRemove:j.useCallback(()=>T(P=>P-1),[]),children:r.jsx(St.div,{tabIndex:w||C===0?-1:0,"data-orientation":s,...f,ref:b,style:{outline:"none",...e.style},onMouseDown:mt(e.onMouseDown,()=>{k.current=!0}),onFocus:mt(e.onFocus,P=>{const R=!k.current;if(P.target===P.currentTarget&&R&&!w){const M=new CustomEvent(gj,Nhe);if(P.currentTarget.dispatchEvent(M),!M.defaultPrevented){const D=A().filter(F=>F.focusable),$=D.find(F=>F.active),q=D.find(F=>
vendor: 4,247 bytes, line 823
823F.id===g),L=[$,q,...D].filter(Boolean).map(F=>F.ref.current);aq(L,m)}}k.current=!1}),onBlur:mt(e.onBlur,()=>N(!1))})})}),nq="RovingFocusGroupItem",sq=j.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:s=!0,active:a=!1,tabStopId:i,children:o,...l}=e,c=ei(),u=i||c,m=Che(nq,n),f=m.currentTabStopId===u,p=eq(n),{onFocusableItemAdd:b,onFocusableItemRemove:v,currentTabStopId:g}=m;return j.useEffect(()=>{if(s)return b(),()=>v()},[s,b,v]),r.jsx(CS.ItemSlot,{scope:n,id:u,focusable:s,active:a,children:r.jsx(St.span,{tabIndex:f?0:-1,"data-orientation":m.orientation,...l,ref:t,onMouseDown:mt(e.onMouseDown,y=>{s?m.onItemFocus(u):y.preventDefault()}),onFocus:mt(e.onFocus,()=>m.onItemFocus(u)),onKeyDown:mt(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){m.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const w=Phe(y,m.orientation,m.dir);if(w!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let S=p().filter(A=>A.focusable).map(A=>A.ref.current);if(w==="last")S.reverse();else if(w==="prev"||w==="next"){w==="prev"&&S.reverse();const A=S.indexOf(y.currentTarget);S=m.loop?Ohe(S,A+1):S.slice(A+1)}setTimeout(()=>aq(S))}}),children:typeof o=="function"?o({isCurrentTabStop:f,hasTabStop:g!=null}):o})})});sq.displayName=nq;var The={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ehe(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Phe(e,t,n){const s=Ehe(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(s))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(s)))return The[s]}function aq(e,t=!1){const n=document.activeElement;for(const s of e)if(s===n||(s.focus({preventScroll:t}),document.activeElement!==n))return}function Ohe(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var Mhe=rq,Rhe=sq,Vy="Tabs",[Ihe]=Ql(Vy,[tq]),iq=tq(),[Dhe,jC]=Ihe(Vy),oq=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,onValueChange:a,defaultValue:i,orientation:o="horizontal",dir:l,activationMode:c="automatic",...u}=e,m=bC(l),[f,p]=wd({prop:s,onChange:a,defaultProp:i??"",caller:Vy});return r.jsx(Dhe,{scope:n,baseId:ei(),value:f,onValueChange:p,orientation:o,dir:m,activationMode:c,children:r.jsx(St.div,{dir:m,"data-orientation":o,...u,ref:t})})});oq.displayName=Vy;var lq="TabsList",cq=j.forwardRef((e,t)=>{const{__scopeTabs:n,loop:s=!0,...a}=e,i=jC(lq,n),o=iq(n);return r.jsx(Mhe,{asChild:!0,...o,orientation:i.orientation,dir:i.dir,loop:s,children:r.jsx(St.div,{role:"tablist","aria-orientation":i.orientation,...a,ref:t})})});cq.displayName=lq;var dq="TabsTrigger",uq=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,disabled:a=!1,...i}=e,o=jC(dq,n),l=iq(n),c=fq(o.baseId,s),u=pq(o.baseId,s),m=s===o.value;return r.jsx(Rhe,{asChild:!0,...l,focusable:!a,active:m,children:r.jsx(St.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":u,"data-state":m?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c,...i,ref:t,onMouseDown:mt(e.onMouseDown,f=>{!a&&f.button===0&&f.ctrlKey===!1?o.onValueChange(s):f.preventDefault()}),onKeyDown:mt(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&o.onValueChange(s)}),onFocus:mt(e.onFocus,()=>{const f=o.activationMode!=="manual";!m&&!a&&f&&o.onValueChange(s)})})})});uq.displayName=dq;var hq="TabsContent",mq=j.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,forceMount:a,children:i,...o}=e,l=jC(hq,n),c=fq(l.baseId,s),u=pq(l.baseId,s),m=s===l.value,f=j.useRef(m);return j.useEffect(()=>{const p=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(p)},[]),r.jsx(Zl,{present:a||m,children:({present:p})=>r.jsx(St.div,{"data-state":m?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:p&&i})})});mq.displayName=hq;function fq(e,t){return`${e}-trigger-${t}`}function pq(e,t){return`${e}-content-${t}`}var Lhe=oq,xq=cq,gq=uq,yq=mq;const Aa=Lhe,Ys=j.forwardRef(({className:e,...t},n)=>r.jsx(xq,{ref:n,className:lt("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",e),...t}));Ys.displayName=xq.displayName;
823const ft=j.forwardRef(({className:e,...t},n)=>r.jsx(gq,{ref:n,className:lt("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",e),...t}));ft.displayName=gq.displayName;const pt=j.forwardRef(({className:e,...t},n)=>r.jsx(yq,{ref:n,className:lt("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));pt.displayName=yq.displayName;const $he={draft:"bg-slate-100 text-slate-800",submitted:"bg-blue-100 text-blue-800",approved:"bg-green-100 text-green-800",rejected:"bg-red-100 text-red-800",changes_requested:"bg-orange-100 text-orange-800"};function Fhe(){const{id:e}=yo(),t=ka(),{user:n}=vo(),[s,a]=j.useState(null),[i,o]=j.useState(!0),[l,c]=j.useState("");j.useEffect(()=>{u()},[e]);const u=async()=>{try{const p=await W.entities.ArticleDraft.get(e);if(p.journalist_id!==(n==null?void 0:n.id)&&(n==null?void 0:n.role)!=="admin"){c("You don't have permission to edit this article");return}a(p)}catch{c("Article not found")}finally{o(!1)}},m=async p=>{try{await W.entities.ArticleDraft.update(e,{...p,status:"draft"}),alert("Draft saved"),await u()}catch(b){c(b.message)}},f=async p=>{try{await W.entities.ArticleDraft.update(e,{...p,status:"submitted",last_submitted:new Date().toISOString()}),alert("Article submitted for review"),t("/journalist/dashboard")}catch(b){c(b.message)}};return i?r.jsx("div",{className:"p-6 text-center",children:"Loading..."}):s?r.jsx("div",{className:"min-h-screen bg-muted/20 p-6",children:r.jsxs("div",{className:"max-w-5xl mx-auto",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsx(se,{to:"/journalist/dashboard",children:r.jsxs(K,{variant:"ghost",className:"gap-2",children:[r.jsx(Ct,{className:"w-4 h-4"})," Back to Dashboard"]})}),r.jsx(ge,{className:$he[s.status],children:s.status.replace(/_/g," ")})]}),l&&r.jsxs("div",{className:"bg-red-50 border border-red-200 text-red-700 p-4 rounded mb-6 flex gap-2",children:[r.jsx(Ln,{className:"w-5 h-5 flex-shrink-0 mt-0.5"}),l]}),s.editor_notes&&r.jsxs(oe,{className:"mb-6 border-orange-200 bg-orange-50",children:[r.jsx(ut,{className:"pb-3",children:r.jsx(ht,{className:"text-lg",children:"Editor Feedback"})}),r.jsx(ce,{children:r.jsx("p",{className:"text-foreground",children:s.editor_notes})})]}),r.jsxs(Aa,{defaultValue:"editor",className:"mb-8",children:[r.jsxs(Ys,{className:"grid w-full grid-cols-3",children:[r.jsx(ft,{value:"editor",children:"Edit Article"}),r.jsx(ft,{value:"media",children:"Media Library"}),r.jsx(ft,{value:"info",children:"Info"})]}),r.jsx(pt,{value:"editor",className:"mt-6",children:r.jsx(Q7,{article:s,onSave:m,onSubmit:f})}),r.jsx(pt,{value:"media",className:"mt-6",children:r.jsx(xhe,{})}),r.jsx(pt,{value:"info",className:"mt-6",children:r.jsx(oe,{children:r.jsxs(ce,{className:"pt-6 space-y-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-muted-foreground",children:"Created"}),r.jsx("p",{className:"font-medium",children:new Date(s.created_date).toLocaleString()})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-muted-foreground",children:"Last Updated"}),r.jsx("p",{className:"font-medium",children:new Date(s.updated_date).toLocaleString()})]}),s.last_submitted&&r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-muted-foreground",children:"Last Submitted"}),r.jsx("p",{className:"font-medium",children:new Date(s.last_submitted).toLocaleString()})]})]})})})]})]})}):r.jsx("div",{className:"min-h-screen bg-muted/20 p-6 flex items-center justify-center",children:r.jsxs("div",{className:"text-center",children:[r.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Article Not Found"}),r.jsx(se,{to:"/journalist/dashboard",children:r.jsx(K,{children:"Return to Dashboard"})})]})})}const Bhe={submitted:"bg-blue-100 text-blue-800",under_review:"bg-yellow-100 text-yellow-800",approved:"bg-green-100 text-green-800",rejected:"bg-red-100 text-red-800",changes_requested:"bg-orange-100 text-orange-800"};function qhe(){const{user:e}=vo(),[t,n]=j.useState([]),[s,a]=j.useState(null),[i,o]=j.useState(""),[l,c]=j.useState(!0),[u,m]=j.useState(!1);j.useEffect(()=>{f()},[]);const f=async()=>{try{const g=await W.entities.ArticleDraft.filter({status:"submitted"},"-created_date",100);n(g||[])}finally{c(!1)}},p=async()=>
823{if(s){m(!0);try{await W.asServiceRole.functions.invoke("approveArticle",{articleId:s.id}),alert("Article approved!"),a(null),o(""),await f()}finally{m(!1)}}},b=async()=>{if(s){m(!0);try{await W.asServiceRole.functions.invoke("rejectArticle",{articleId:s.id,notes:i}),alert("Article rejected!"),a(null),o(""),await f()}finally{m(!1)}}},v=async()=>{if(s){m(!0);try{await W.asServiceRole.functions.invoke("requestArticleChanges",{articleId:s.id,notes:i}),alert("Changes requested!"),a(null),o(""),await f()}finally{m(!1)}}};return(e==null?void 0:e.role)!=="editor"&&(e==null?void 0:e.role)!=="admin"?r.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:r.jsxs("div",{className:"text-center",children:[r.jsx("h1",{className:"text-2xl font-bold mb-2",children:"Access Denied"}),r.jsx("p",{className:"text-muted-foreground",children:"This panel is for editors only."})]})}):r.jsx("div",{className:"min-h-screen bg-muted/20 p-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto",children:[r.jsx("h1",{className:"text-3xl font-bold mb-2",children:"Editorial Review"}),r.jsx("p",{className:"text-muted-foreground mb-8",children:"Review and approve journalist submissions"}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[r.jsx("div",{className:"lg:col-span-1",children:r.jsxs(oe,{children:[r.jsx(ut,{children:r.jsxs(ht,{className:"text-lg",children:["Pending Reviews (",t.length,")"]})}),r.jsx(ce,{className:"space-y-2 max-h-[600px] overflow-y-auto",children:l?r.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."}):t.length===0?r.jsx("p",{className:"text-sm text-muted-foreground",children:"No submissions pen
823ding"}):t.map(g=>r.jsxs("button",{onClick:()=>a(g),className:`w-full text-left p-3 rounded border-l-4 transition-colors ${(s==null?void 0:s.id)===g.id?"bg-primary/10 border-primary":"bg-muted/50 border-border hover:bg-muted"}`,children:[r.jsx("p",{className:"font-medium text-sm line-clamp-2",children:g.title}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:g.created_by_id?"By Journalist":"Unknown"})]},g.id))})]})}),r.jsx("div",{className:"lg:col-span-2",children:s?r.jsxs("div",{className:"space-y-6",children:[r.jsxs(oe,{children:[r.jsx(ut,{className:"border-b pb-4",children:r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx(ht,{className:"line-clamp-2",children:s.title}),r.jsxs("p",{className:"text-sm text-muted-foreground mt-2",children:["Submitted ",new Date(s.last_submitted||s.created_date).toLocaleDateString()]})]}),r.jsx(ge,{className:Bhe[s.status],children:s.status.replace(/_/g," ")})]})}),r.jsxs(ce,{className:"pt-6 space-y-4",children:[s.category&&r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-muted-foreground",children:"Category"}),r.jsx("p",{className:"font-medium",children:s.category})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-muted-foreground",children:"Excerpt"}),r.jsx("p",{className:"text-sm",children:s.excerpt})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm text-muted-foreground",children:"Content"}),r.jsx("div",{className:"bg-muted/30 p-4 rounded text-sm max-h-48 overflow-y-auto",children:s.content})]})]})]}),r.jsxs(oe,{children:[r.jsx(ut,{children:r.jsx(ht,{className:"text-lg",children:"Review & Feedback"})}),r.jsxs(ce,{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Editor Notes (optional)"}),r.jsx(lg,{value:i,onChange:g=>o(g.target.value),placeholder:"Add feedback for the journalist...",rows:4})]}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-2",children:[r.jsxs(K,{onClick:p,disabled:u,className:"flex-1 gap-2 bg-emerald-600 hover:bg-emerald-700",children:[r.jsx(qt,{className:"w-4 h-4"})," Approve"]}),r.jsxs(K,{onClick:v,disabled:u||!i,variant:"outline",className:"flex-1 gap-2",children:[r.jsx(Ln,{className:"w-4 h-4"})," Request Changes"]}),r.jsxs(K,{onClick:b,disabled:u,variant:"destructive",className:"flex-1 gap-2",children:[r.jsx(Cl,{className:"w-4 h-4"})," Reject"]})]})]})]})]}):r.jsx(oe,{className:"flex items-center justify-center py-12",children:r.jsx("div",{className:"text-center text-muted-foreground",children:r.jsx("p",{children:"Select an article to review"})})})})]})]})})}function Vhe({onSelect:e,selectedLevel:t,loading:n}){const s=[{id:"digital",name:"Digital Member",price:"£9.99",period:"/month",description:"Unlimited digital access",features:["Unlimited digital articles","Premium features","Member-only content","Digital archive","Ad-free reading"],cta:"Subscribe Now",icon:Al,highlight:!1},{id:"print_digital",name:"Print + Digital",price:"£19.99",period:"/month + £2.00 postage",description:"Everything plus printed magazine",features:["Everything in Digital","Printed monthly magazine","Subscriber benefits","Exclusive competitions","Priority support"],cta:"Subscribe Now",icon:rt,highlight:!0}];return r.jsx("div",{className:"py-12 bg-background",children:r.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-12",children:[r.jsx("h2",{className:"text-4xl font-serif mb-4",children:"Chelsea Monthly Membership"}),r.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"Join Chelsea Monthly and enjoy unlimited premium content from today"})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:s.map(a=>{const i=a.icon,o=t===a.id;return r.jsxs("div",{className:`relative rounded-lg border-2 transition-all overflow-hidden ${a.highlight?"border-primary md:scale-105 shadow-2xl shadow-primary/20":"border-border hover:border-primary/50"} ${o?"border-primary bg-primary/5":"bg-card"}`,children:[a.highlight&&r.jsx("div",{className:"absolute top-0 left-0 right-0 bg-primary text-primary-foreground py-1 text-center text-xs font-bold uppercase tracking-widest",children:"Most Popular"}),r.jsxs("div",{className:`p-8 ${a.highlight?"pt-16":""}`,children:[i&&r.jsx(i,{className:"w-8 h-8 text-primary mb-4"}),r.jsx("h3",{className:"text-2xl font-bold mb-2",children:a.name}),r.jsx("p",{className:"text-muted-foreground text-sm mb-4",children:a.description}),r.jsx("div",{className:"mb-6",children:r.jsxs("div",{className:"flex items-baseline gap-1",children:[r.jsx("span",{className:"text-4xl font-bold",children:a.price}
823),a.period&&r.jsx("span",{className:"text-muted-foreground",children:a.period})]})}),r.jsx(K,{onClick:()=>e(a.id),disabled:n||o,className:`w-full mb-6 ${a.highlight?"bg-primary hover:bg-primary/90":""}`,variant:o?"secondary":"default",children:o?"â Selected":a.cta}),r.jsx("div",{className:"space-y-3",children:a.features.map(l=>r.jsxs("div",{className:"flex items-start gap-3 text-sm",children:[r.jsx(ia,{className:"w-4 h-4 text-primary flex-shrink-0 mt-0.5"}),r.jsx("span",{children:l})]},l))})]})]},a.id)})}),r.jsx("div",{className:"mt-12 bg-muted/30 rounded-lg p-8 text-center max-w-2xl mx-auto",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:[r.jsx("strong",{children:"Cancel anytime."})," No hidden fees or long-term commitments. Manage your subscription from your member dashboard."]})})]})})}const Uhe={digital:{color:"bg-blue-100 text-blue-900",features:["Unlimited premium articles","Digital magazine archive","Premium travel guides","Member newsletters","Ad-free reading"]},print_digital:{color:"bg-purple-100 text-purple-900",features:["Everything in Digital","Monthly print magazine","Event invitations","Partner discounts","Subscriber benefits"]}};function zhe({email:e}){const[t,n]=j.useState(null),[s,a]=j.useState([]),[i,o]=j.useState([]),[l,c]=j.useState(null),[u,m]=j.useState(""),[f,p]=j.useState(!0);j.useEffect(()=>{b()},[e]);const b=async()=>{try{const[y,w]=await Promise.all([W.functions.invoke("getSubscriptionStatus",{email:e}),W.entities.MemberProfile.filter({user_email:e},"-created_date",1).then(N=>N==null?void 0:N[0])]);if(n(y),c(w),y){const N=await W.entities.PaymentHistory.filter({user_email:e},"-payment_date",10);a(N||[])}}finally{p(!1)}};if(f)return r.jsx("div",{className:"text-center py-12",children:"Loading dashboard..."});const v=t&&Uhe[t==null?void 0:t.membership_level],g=t!=null&&t.member_since?new Date(t.member_since).toLocaleDateString("en-GB",{year:"numeric",month:"long"}):"Recently";return r.jsx("div",{className:"min-h-screen bg-muted/20",children:r.jsxs("div",{className:"max-w-6xl mx-auto px-6 py-8",children:[r.jsxs("div",{className:"mb-8",children:[r.jsxs("div",{className:"flex items-start justify-between gap-4 mb-6",children:[r.jsxs("div",{children:[r.jsx("h1",{className:"text-4xl font-serif mb-2",children:"My Club"}),r.jsx("p",{className:"text-muted-foreground",children:e})]}),(t==null?void 0:t.membership_level)!=="free"&&r.jsxs("div",{className:"text-right",children:[r.jsxs(ge,{className:"bg-purple-100 text-purple-900 mb-2",children:[r.jsx(Lt,{className:"w-3 h-3 mr-1"}),(t==null?void 0:t.membership_level)==="digital"?"Digital Member":"Chelsea Club Member"]}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Member since ",g]})]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:[r.jsx(oe,{children:r.jsxs(ce,{className:"pt-6",children:[r.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Status"}),r.jsx("p",{className:"text-2xl font-bold capitalize",children:(t==null?void 0:t.status)==="active"?"â Active":t==null?void 0:t.status})]})}),r.jsx(oe,{children:r.jsxs(ce,{className:"pt-6",children:[r.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Renews"}),r.jsx("p",{className:"text-lg font-semibold",children:t!=null&&t.current_period_end?new Date(t.current_period_end).toLocaleDateString():"â"})]})}),r.jsx(oe,{children:r.jsxs(ce,{className:"pt-6",children:[r.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Saved"}),r.jsx("p",{className:"text-2xl font-bold",children:t!=null&&t.saved_articles?JSON.parse(t.saved_articles).length:0})]})}),r.jsx(oe,{children:r.jsxs(ce,{className:"pt-6",children:[r.jsx("p",{className:"text-sm text-muted-foreground mb-1",children:"Total Spent"}),r.jsxs("p",{className:"text-lg font-semibold",children:["£",(s.reduce((y,w)=>y+w.amount,0)/100).toFixed(2)]})]})})]})]}),r.jsxs(Aa,{defaultValue:"membership",className:"space-y-6",children:[r.jsxs(Ys,{className:"grid w-full grid-cols-5",children:[r.jsx(ft,{value:"membership",children:"Membership"}),r.jsx(ft,{value:"billing",children:"Billing"}),r.jsx(ft,{value:"delivery",children:"Delivery"}),r.jsx(ft,{value:"profile",children:"Profile"}),r.jsx(ft,{value:"settings",children:"Settings"})]}),r.jsx(pt,{value:"membership",className:"space-y-6",children:r.jsxs(oe,{children:[r.jsx(ut,{children:r.jsxs(ht,{className:"flex items-center gap-2",children:[r.jsx(Lt,{className:"w-5 h-5 text-purple-600"}),"Your Membership"]})}),r.jsxs(ce,{className:"space-y-4",children:[v&&r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold mb-3",children:"Your Benefits"}),r.jsx("div",{className:"space-y-2",children:v.features.map(y=>r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-primary"}),y]},y))})]}),(t==null?void 0:t.cancel_at_period_end)&&r.jsxs("div",{className:"bg-yellow-50 border border-yellow-200 rounded p-3 text-sm text-yellow-800",children:["Your subscription will end on"," ",new Date(t.current_period_end).toLocaleDateString(),"."]}),r.jsxs("div",{className:"flex gap-2 pt-4 border-t",children:[(t==null?void 0:t.membership_level)==="digital"&&r.jsx(K,{className:"flex-1",children:"Upgrade to Chelsea Club"}),(t==null?void 0:t.membership_level)!=="free"&&r.jsx(K,{variant:t!=null&&t.cancel_at_period_end?"secondary":"destructive",className:"flex-1",children:t!=null&&t.cancel_at_period_end?"Reactivate Membership":"Cancel Membership"})]})]})]})}),r.jsx(pt,{value:"billing",className:"space-y-6",children:r.jsxs(oe,{children:[r.jsx(ut,{children:r.jsxs(ht,{className:"flex items-center gap-2",children:[r.jsx(fG,{className:"w-5 h-5"}),"Payment History"]})}),r.jsx(ce,{children:r.jsx("div",{className:"space-y-2 max-h-96 overflow-y-auto",children:s.length===0?r.jsx("p",{className:"text-muted-foreground text-sm",children:"No payments yet"}):r.jsx("div",{className:"space-y-3",children:s.map(y=>r.jsxs("div",{className:"flex items-center justify-between p-3 bg-muted/30 rounded border border-border",children:[r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-sm font-medium",children:y.description}),r.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(y.payment_date).toLocaleDateString()})]}),r.jsxs("div",{className:"text-right",children:[r.jsxs("p",{className:"font-semibold",children:["£",(y.amount/100).toFixed(2)]}),r.jsx(ge,{variant:y.status==="succeeded"?"default":"destructive",className:"text-xs mt-1",children:y.status})]})]},y.id))})})})]})}),r.jsx(pt,{value:"delivery",className:"space-y-6",children:(t==null?void 0:t.membership_level)==="print_digital"&&r.jsxs(oe,{children:[r.jsx(ut,{children:r.jsxs(ht,{className:"flex items-center gap-2",children:[r.jsx(Ft,{className:"w-5 h-5"}),"Print Delivery"]})}),r.jsxs(ce,{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Delivery Address"}),r.jsx("textarea",{placeholder:"Enter your delivery address",value:u,onChange:y=>m(y.target.value),className:"w-full p-3 border border-border rounded resize-none text-sm",rows:4})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Delivery Preferences"}),r.jsx(de,{placeholder:"e.g., Leave with building manager",className:"text-sm"})]}),r.jsx(K,{children:"Save Delivery Details"})]})]})}),r.jsx(pt,{value:"profile",className:"space-y-6",children:r.jsxs(oe,{children:[r.jsx(ut,{children:r.jsx(ht,{children:"Public Profile"})}),r.jsxs(ce,{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Display Name"}),r.jsx(de,{placeholder:"Your name",defaultValue:l==null?void 0:l.display_name})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Bio"}),r.jsx("textarea",{placeholder:"Tell the community about yourself",defaultValue:l==null?void 0:l.biography,className:"w-full p-3 border border-border rounded resize-none text-sm",rows:3})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Location"}),r.jsx(de,{placeholder:"City or neighbourhood",defaultValue:l==null?void 0:l.location})]}),r.jsx(K,{children:"Save Profile"})]})]})}),r.jsx(pt,{value:"settings",className:"space-y-6",children:r.jsxs(oe,{children:[r.jsx(ut,{children:r.jsx(ht,{children:"Account Settings"})}),r.jsxs(ce,{className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Email Address"}),r.jsx(de,{value:e,disabled:!0})]}),r.jsxs(K,{variant:"outline",className:"w-full gap-2",children:[r.jsx(nK,{className:"w-4 h-4"}),"Sign Out"]})]})]})})]})]})})}function Whe(){const[e]=Z8(),[t,n]=j.useState(e.get("email")||""),[s,a]=j.useState(!1),[i,o]=j.useState(null),[l,c]=j.useState(!1),u=()=>{t&&(localStorage.setItem("member_email",t),a(!0))},m=async f=>{c(!0);try{const p=await fetch("/api/create-checkout-session",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({membership_level:f,email:t,return_url:window.location.href})});if(!p.ok)throw new Error("Checkout failed");const{url:b}=await p.json();if(window.self!==window.top){alert("Checkout works best in a published app. Please open this link in a new tab.");return}window.location.href=b}catch(p){alert("Error: "+p.message)}finally{c(!1)}};return s&&t?r.jsx(zhe,{email:t}):r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-gradient-to-br from-foreground to-foreground
823/80 text-background py-16",children:r.jsxs("div",{className:"max-w-2xl mx-auto px-6 text-center",children:[r.jsx("h1",{className:"text-5xl font-serif mb-4",children:"Chelsea Monthly Club"}),r.jsx("p",{className:"text-lg opacity-90",children:"The Private Side of London"}),r.jsx("p",{className:"text-sm opacity-70 mt-2",children:"No free trial â subscribe today for immediate full access"})]})}),r.jsx("div",{className:"max-w-md mx-auto px-6 py-12",children:r.jsx(oe,{className:"mb-8",children:r.jsxs(ce,{className:"pt-6 space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Email Address"}),r.jsx(de,{type:"email",value:t,onChange:f=>n(f.target.value),placeholder:"[email protected]",onKeyPress:f=>f.key==="Enter"&&u()})]}),r.jsx(K,{onClick:u,disabled:!t,className:"w-full",size:"lg",children:"Access My Account"})]})})}),r.jsx(Vhe,{onSelect:m,selectedLevel:i,loading:l})]})}function Hhe({onExplore:e}){return r.jsxs("section",{className:"relative min-h-[600px] bg-gradient-to-br from-foreground via-foreground to-primary/20 text-background overflow-hidden",children:[r.jsx("div",{className:"absolute top-0 right-0 w-96 h-96 bg-primary/10 rounded-full blur-[100px]"}),r.jsx("div",{className:"absolute bottom-0 left-0 w-80 h-80 bg-accent/5 rounded-full blur-[100px]"}),r.jsx("div",{className:"relative z-10 max-w-6xl mx-auto px-6 py-24 flex flex-col items-center justify-center text-center min-h-[600px]",children:r.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.8},className:"space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-center gap-2 mb-4",children:[r.jsx(Lt,{className:"w-6 h-6"}),r.jsx("span",{className:"text-sm font-bold uppercase tracking-[0.2em]",children:"The Private Side of London"})]}),r.jsx("h1",{className:"text-6xl md:text-7xl font-serif leading-tight",children:"Chelsea Monthly Club"}),r.jsx("p",{className:"text-xl md:text-2xl font-light max-w-2xl mx-auto opacity-90",children:"Join London's most discerning readers. Premium journalism, exclusive experiences, and a community that celebrates the finer things."}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center pt-6",children:[r.jsxs(K,{onClick:e,size:"lg",className:"gap-2 bg-background text-foreground hover:bg-background/90 h-12 px-8 text-base font-semibold",children:["Explore Membership ",r.jsx(_t,{className:"w-4 h-4"})]}),r.jsx(K,{variant:"outline",size:"lg",className:"h-12 px-8 text-base font-semibold border-background/30 text-background hover:bg-background/10",children:"View Member Benefits"})]}),r.jsxs("div",{className:"pt-12 flex items-center justify-center gap-8 text-sm opacity-75",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-background"}),"Premium journalism"]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-background"}),"Member events"]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-background"}),"Exclusive content"]})]})]})})]})}function Ghe({onSelect:e}){const t=[{id:"free",name:"Free Reader",price:"£0",period:"forever",tagline:"Discover Chelsea Monthly",cta:"Current Access",ctaVariant:"secondary",features:[{text:"Selected public articles",included:!0},{text:"Community participation",included:!0},{text:"Newsletter access",included:!0},{text:"Limited archive",included:!0},{text:"Premium articles",included:!1},{text:"Full magazine archive",included:!1},{text:"Member events",included:!1},{text:"Print magazine",included:!1}]},{id:"digital",name:"Chelsea Digital Member",price:"£9.99",period:"/month",tagline:"Everything Digital",cta:"Choose Digital",ctaVariant:"default",featured:!1,features:[{text:"Unlimited premium articles",included:!0},{text:"Digital magazine archive",included:!0},{text:"Premium travel guides",included:!0},{text:"Premium reviews",included:!0},{text:"Member newsletters",included:!0},{text:"Community areas",included:!0},{text:"Exclusive competitions",included:!0},{text:"Print magazine",included:!1}]},{id:"print_digital",name:"Chelsea Club Member",price:"£19.99",period:"/month + £2 postage",tagline:"The Complete Experience",cta:"Join the Club",ctaVariant:"default",featured:!0,features:[{text:"Everything in Digital",included:!0},{text:"Monthly print magazine",included:!0},{text:"Priority event access",included:!0},{text:"VIP competitions",included:!0},{text:"Partner discounts",included:!0},{text:"Exclusive experiences",included:!0},{text:"Special editorial access",included:!0},{text:"Subscriber-only events",included:!0}]}];return r.jsx("section",{className:"py-20 bg-background",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-16",children:[r.jsx("h2",{className:"text-4xl font-serif mb-4",children:"Choose Your Chelsea Monthly Experience"}),r.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:"From free access to exclusive club membership, find the perfect plan for your interests"})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-12",children:t.map(n=>r.jsxs("div",{className:`relative rounded-2xl border-2 transition-all overflow-hidden ${n.featured?"border-primary md:scale-105 shadow-2xl shadow-primary/20 bg-gradient-to-br from-primary/5 to-background":"border-border bg-card hover:border-primary/50"}`,children:[n.featured&&r.jsx("div",{className:"absolute top-0 left-0 right-0 bg-primary text-primary-foreground py-2 text-center text-xs font-bold uppercase tracking-widest",children:"â
Most Popular"}),r.jsxs("div",{className:`p-8 ${n.featured?"pt-16":""} space-y-6`,children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-2xl font-bold mb-2",children:n.name}),r.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:n.tagline}),r.jsxs("div",{className:"flex items-baseline gap-1",children:[r.jsx("span",{className:"text-4xl font-bold",children:n.price}),r.jsx("span",{className:"text-muted-foreground text-sm",children:n.period})]})]}),r.jsx(K,{onClick:()=>e(n.id),variant:n.ctaVariant,className:"w-full h-11",children:n.cta}),r.jsx("div",{className:"space-y-3 pt-6 border-t border-border",children:n.features.map((s,a)=>r.jsxs("div",{className:"flex items-start gap-3 text-sm",children:[s.included?r.jsx(ia,{className:"w-4 h-4 text-primary flex-shrink-0 mt-0.5"}
823):r.jsx(ni,{className:"w-4 h-4 text-muted-foreground/30 flex-shrink-0 mt-0.5"}),r.jsx("span",{className:s.included?"text-foreground":"text-muted-foreground/50",children:s.text})]},a))})]})]},n.id))}),r.jsx("div",{className:"bg-muted/30 rounded-xl p-8 text-center",children:r.jsxs("p",{className:"text-sm text-muted-foreground",children:["All memberships include ad-free reading, full archive access, and member community features."," ",r.jsx("span",{className:"font-semibold text-foreground",children:"Cancel anytime, no long-term commitments."})]})})]})})}const Khe=()=>r.jsx("section",{className:"py-20 bg-muted/30",children:r.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[r.jsx("h2",{className:"text-4xl font-serif text-center mb-16",children:"Member Privileges"}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-6",children:[{icon:Yd,title:"Premium Content",desc:"Unlimited access to original reporting and exclusive features"},{icon:Pn,title:"Event Access",desc:"Private members' events and exclusive dining experiences"},{icon:vt,title:"Community",desc:"Connect with London's most discerning readers and tastemakers"},{icon:ba,title:"Early Access",desc:"First access to new features, competitions, and special editions"},{icon:ir,title:"Partner Perks",desc:"Exclusive discounts at luxury brands and member-only venues"}].map((e,t)=>{const n=e.icon;return r.jsx(oe,{className:"border-border hover:border-primary/50 transition-colors",children:r.jsxs(ce,{className:"pt-6",children:[r.jsx(n,{className:"w-8 h-8 text-primary mb-4"}),r.jsx("h3",{className:"font-semibold mb-2",children:e.title}),r.jsx("p",{className:"text-sm text-muted-foreground",children:e.desc})]})},t)})})]})}),Yhe=()=>r.jsx("section",{className:"py-20 bg-background",children:r.jsxs("div",{className:"max-w-6xl mx-auto px-6",children:[r.jsx("h2",{className:"text-4xl font-serif text-center mb-16",children:"What Members Say"}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[{name:"Caroline M.",title:"Luxury Travel Editor",quote:"Chelsea Monthly's journalism is incomparable. The member community is genuinely inspiring.",verified:!0},{name:"James P.",title:"Investment Manager",quote:"The subscriber benefits alone pay for membership. Plus, the monthly magazine is beautifully curated.",verified:!0},{name:"Sophie L.",title:"Designer & Entrepreneur",quote:"Finally, intelligent journalism for people who actually care about quality. Worth every penny.",verified:!0}].map((e,t)=>r.jsx(oe,{children:r.jsxs(ce,{className:"pt-6 space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold",children:e.name}),r.jsx("p",{className:"text-xs text-muted-foreground",children:e.title})]}),e.verified&&r.jsx(ge,{variant:"secondary",className:"text-xs",children:"Verified Member"})]}),r.jsxs("p",{className:"text-sm italic text-muted-foreground",children:['"',e.quote,'"']})]})},t))})]})});function Xhe(){const e=ka(),[t,n]=j.useState(""),s=()=>{var i;(i=document.querySelector('[data-section="pricing"]'))==null||i.scrollIntoView({behavior:"smooth"})},a=i=>{if(i==="free"){e("/");return}e(`/membership?tier=${i}&email=${encodeURIComponent(t)}`)};return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx(Hhe,{onExplore:s}),r.jsx(Khe,{}),r.jsx(Yhe,{}),r.jsx("div",{"data-section":"pricing",children:r.jsx(Ghe,{onSelect:a})}),r.jsx("section",{className:"py-20 bg-foreground text-background",children:r.jsxs("div",{className:"max-w-4xl mx-auto px-6 text-center",children:[r.jsx("h2",{className:"text-4xl font-serif mb-6",children:"Ready to Join the Club?"}),r.jsx("p",{className:"text-lg opacity-90 mb-8 max-w-2xl mx-auto",children:"Membership has its privileges. Experience Chelsea Monthly the way it was meant to be read."}),r.jsx(K,{onClick:s,size:"lg",className:"gap-2 bg-background text-foreground hover:bg-background/90 h-12 px-8",children:"Explore Membership Plans"}),r.jsx("p",{className:"text-xs opacity-60 mt-8",children:"Cancel anytime. No long-term commitment required."})]})})]})}function P3(e,[t,n]){return Math.min(n,Math.max(t,e))}function Jhe(e){const t=Qhe(e),n=j.forwardRef((s,a)=>{const{children:i,...o}=s,l=j.Children.toArray(i),c=l.find(eme);if(c){const u=c.props.children,m=l.map(f=>f===c?j.Children.count(u)>1?j.Children.only(null):j.isValidElement(u)?u.props.children:null:f);return r.jsx(t,{...o,ref:a,children:j.isValidElement(u)?j.cloneElement(u,void 0,m):null})}return r.jsx(t,{...o,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}function Qhe(e){const t=j.forwardRef((n,s)=>{const{children:a,...i}=n;
vendor: 17,994 bytes, line 823
823if(j.isValidElement(a)){const o=rme(a),l=tme(i,a.props);return a.type!==j.Fragment&&(l.ref=s?Xl(s,o):o),j.cloneElement(a,l)}return j.Children.count(a)>1?j.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Zhe=Symbol("radix.slottable");function eme(e){return j.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Zhe}function tme(e,t){const n={...t};for(const s in t){const a=e[s],i=t[s];/^on[A-Z]/.test(s)?a&&i?n[s]=(...l)=>{const c=i(...l);return a(...l),c}:a&&(n[s]=a):s==="style"?n[s]={...a,...i}:s==="className"&&(n[s]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function rme(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function nme(e){const t=j.useRef({value:e,previous:e});return j.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var vq=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),sme="VisuallyHidden",ame=j.forwardRef((e,t)=>r.jsx(St.span,{...e,ref:t,style:{...vq,...e.style}}));ame.displayName=sme;var ime=[" ","Enter","ArrowUp","ArrowDown"],ome=[" ","Enter"],Dl="Select",[Uy,zy,lme]=Z7(Dl),[au]=Ql(Dl,[lme,Fy]),Wy=Fy(),[cme,wo]=au(Dl),[dme,ume]=au(Dl),bq=e=>{const{__scopeSelect:t,children:n,open:s,defaultOpen:a,onOpenChange:i,value:o,defaultValue:l,onValueChange:c,dir:u,name:m,autoComplete:f,disabled:p,required:b,form:v}=e,g=Wy(t),[y,w]=j.useState(null),[N,S]=j.useState(null),[A,k]=j.useState(!1),C=bC(u),[T,P]=wd({prop:s,defaultProp:a??!1,onChange:i,caller:Dl}),[R,M]=wd({prop:o,defaultProp:l,onChange:c,caller:Dl}),D=j.useRef(null),$=y?v||!!y.closest("form"):!0,[q,H]=j.useState(new Set),L=Array.from(q).map(F=>F.props.value).join(";");return r.jsx(D7,{...g,children:r.jsxs(cme,{required:b,scope:t,trigger:y,onTriggerChange:w,valueNode:N,onValueNodeChange:S,valueNodeHasChildren:A,onValueNodeHasChildrenChange:k,contentId:ei(),value:R,onValueChange:M,open:T,onOpenChange:P,dir:C,triggerPointerDownPosRef:D,disabled:p,children:[r.jsx(Uy.Provider,{scope:t,children:r.jsx(dme,{scope:e.__scopeSelect,onNativeOptionAdd:j.useCallback(F=>{H(Y=>new Set(Y).add(F))},[]),onNativeOptionRemove:j.useCallback(F=>{H(Y=>{const U=new Set(Y);return U.delete(F),U})},[]),children:n})}),$?r.jsxs(zq,{"aria-hidden":!0,required:b,tabIndex:-1,name:m,autoComplete:f,value:R,onChange:F=>M(F.target.value),disabled:p,form:v,children:[R===void 0?r.jsx("option",{value:""}):null,Array.from(q)]},L):null]})})};bq.displayName=Dl;var jq="SelectTrigger",wq=j.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:s=!1,...a}=e,i=Wy(n),o=wo(jq,n),l=o.disabled||s,c=rr(t,o.onTriggerChange),u=zy(n),m=j.useRef("touch"),[f,p,b]=Hq(g=>{const y=u().filter(S=>!S.disabled),w=y.find(S=>S.value===o.value),N=Gq(y,g,w);N!==void 0&&o.onValueChange(N.value)}),v=g=>{l||(o.onOpenChange(!0),b()),g&&(o.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return r.jsx(yC,{asChild:!0,...i,children:r.jsx(St.button,{type:"button",role:"combobox","aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":"none",dir:o.dir,"data-state":o.open?"open":"closed",disabled:l,"data-disabled":l?"":void 0,"data-placeholder":Wq(o.value)?"":void 0,...a,ref:c,onClick:mt(a.onClick,g=>{g.currentTarget.focus(),m.current!=="mouse"&&v(g)}),onPointerDown:mt(a.onPointerDown,g=>{m.current=g.pointerType;const y=g.target;y.hasPointerCapture(g.pointerId)&&y.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(v(g),g.preventDefault())}),onKeyDown:mt(a.onKeyDown,g=>{const y=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(y&&g.key===" ")&&ime.includes(g.key)&&(v(),g.preventDefault())})})})});wq.displayName=jq;var Nq="SelectValue",_q=j.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:a,children:i,placeholder:o="",...l}=e,c=wo(Nq,n),{onValueNodeHasChildrenChange:u}=c,m=i!==void 0,f=rr(t,c.onValueNodeChange);return un(()=>{u(m)},[u,m]),r.jsx(St.span,{...l,ref:f,style:{pointerEvents:"none"},children:Wq(c.value)?r.jsx(r.Fragment,{children:o}):i})});_q.displayName=Nq;var hme="SelectIcon",Sq=j.forwardRef((e,t)=>{const{__scopeSelect:n,children:s,...a}=e;return r.jsx(St.span,{"aria-hidden":!0,...a,ref:t,children:s||"â¼"})});Sq.displayName=hme;var mme="SelectPortal",kq=e=>r.jsx(Cy,{asChild:!0,...e});kq.displayName=mme;var Ll="SelectContent",Cq=j.forwardRef((e,t)=>{const n=wo(Ll,e.__scopeSelect),[s,a]=j.useState();if(un(()=>{a(new DocumentFragment)},[]),!n.open){const i=s;return i?Zm.createPortal(r.jsx(Aq,{scope:e.__scopeSelect,children:r.jsx(Uy.Slot,{scope:e.__scopeSelect,children:r.jsx("div",{children:e.children})})}),i):null}return r.jsx(Tq,{...e,ref:t})});Cq.displayName=Ll;var Ds=10,[Aq,No]=au(Ll),fme="SelectContentImpl",pme=Jhe("SelectContent.RemoveScroll"),Tq=j.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:i,onPointerDownOutside:o,side:l,sideOffset:c,align:u,alignOffset:m,arrowPadding:f,collisionBoundary:p,collisionPadding:b,sticky:v,hideWhenDetached:g,avoidCollisions:y,...w}=e,N=wo(Ll,n),[S,A]=j.useState(null),[k,C]=j.useState(null),T=rr(t,pe=>A(pe)),[P,R]=j.useState(null),[M,D]=j.useState(null),$=zy(n),[q,H]=j.useState(!1),L=j.useRef(!1);j.useEffect(()=>{if(S)return iC(S)},[S]),aC();const F=j.useCallback(pe=>{const[Ae,...ie]=$().map(te=>te.ref.current),[Ne]=ie.slice(-1),Se=document.activeElement;for(const te of pe)if(te===Se||(te==null||te.scrollIntoView({block:"nearest"}),te===Ae&&k&&(k.scrollTop=0),te===Ne&&k&&(k.scrollTop=k.scrollHeight),te==null||te.focus(),document.activeElement!==Se))return},[$,k]),Y=j.useCallback(()=>F([P,S]),[F,P,S]);j.useEffect(()=>{q&&Y()},[q,Y]);const{onOpenChange:U,triggerPointerDownPosRef:re}=N;j.useEffect(()=>{if(S){let pe={x:0,y:0};const Ae=Ne=>{var Se,te;pe={x:Math.abs(Math.round(Ne.pageX)-(((Se=re.current)==null?void 0:Se.x)??0)),y:Math.abs(Math.round(Ne.pageY)-(((te=re.current)==null?void 0:te.y)??0))}},ie=Ne=>{pe.x<=10&&pe.y<=10?Ne.preventDefault():S.contains(Ne.target)||U(!1),document.removeEventListener("pointermove",Ae),re.current=null};return re.current!==null&&(document.addEventListener("pointermove",Ae),document.addEventListener("pointerup",ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ae),document.removeEventListener("pointerup",ie,{capture:!0})}}},[S,U,re]),j.useEffect(()=>{const pe=()=>U(!1);return window.addEventListener("blur",pe),window.addEventListener("resize",pe),()=>{window.removeEventListener("blur",pe),window.removeEventListener("resize",pe)}},[U]);const[G,B]=Hq(pe=>{const Ae=$().filter(Se=>!Se.disabled),ie=Ae.find(Se=>Se.ref.current===document.activeElement),Ne=Gq(Ae,pe,ie);Ne&&setTimeout(()=>Ne.ref.current.focus())}),z=j.useCallback((pe,Ae,ie)=>{const Ne=!L.current&&!ie;(N.value!==void 0&&N.value===Ae||Ne)&&(R(pe),Ne&&(L.current=!0))},[N.value]),he=j.useCallback(()=>S==null?void 0:S.focus(),[S]),fe=j.useCallback((pe,Ae,ie)=>{const Ne=!L.current&&!ie;(N.value!==void 0&&N.value===Ae||Ne)&&D(pe)},[N.value]),be=s==="popper"?AS:Eq,xe=be===AS?{side:l,sideOffset:c,align:u,alignOffset:m,arrowPadding:f,collisionBoundary:p,collisionPadding:b,sticky:v,hideWhenDetached:g,avoidCollisions:y}:{};return r.jsx(Aq,{scope:n,content:S,viewport:k,onViewportChange:C,itemRefCallback:z,selectedItem:P,onItemLeave:he,itemTextRefCallback:fe,focusSelectedItem:Y,selectedItemText:M,position:s,isPositioned:q,searchRef:G,children:r.jsx(Ty,{as:pme,allowPinchZoom:!0,children:r.jsx(ky,{asChild:!0,trapped:N.open,onMountAutoFocus:pe=>{pe.preventDefault()},onUnmountAutoFocus:mt(a,pe=>{var Ae;(Ae=N.trigger)==null||Ae.focus({preventScroll:!0}),pe.preventDefault()}),children:r.jsx(Sy,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:pe=>pe.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:r.jsx(be,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:pe=>pe.preventDefault(),...w,...xe,onPlaced:()=>H(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:mt(w.onKeyDown,pe=>{const Ae=pe.ctrlKey||pe.altKey||pe.metaKey;if(pe.key==="Tab"&&pe.preventDefault(),!Ae&&pe.key.length===1&&B(pe.key),["ArrowUp","ArrowDown","Home","End"].includes(pe.key)){let Ne=$().filter(Se=>!Se.disabled).map(Se=>Se.ref.current);if(["ArrowUp","End"].includes(pe.key)&&(Ne=Ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(pe.key)){const Se=pe.target,te=Ne.indexOf(Se);Ne=Ne.slice(te+1)}setTimeout(()=>F(Ne)),pe.preventDefault()}})})})})})})});Tq.displayName=fme;var xme="SelectItemAlignedPosition",Eq=j.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s,...a}=e,i=wo(Ll,n),o=No(Ll,n),[l,c]=j.useState(null),[u,m]=j.useState(null),f=rr(t,T=>m(T)),p=zy(n),b=j.useRef(!1),v=j.useRef(!0),{viewport:g,selectedItem:y,selectedItemText:w,focusSelectedItem:N}=o,S=j.useCallback(()=>{if(i.trigger&&i.valueNode&&l&&u&&g&&y&&w){const T=i.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),R=i.valueNode.getBoundingClientRect(),M=w.getBoundingClientRect();if(i.dir!=="rtl"){const Se=M.left-P.left,te=R.left-Se,Oe=T.left-te,ye=T.width+Oe,Ee=Math.max(ye,P.width),ke=window.innerWidth-Ds,ze=P3(te,[Ds,Math.max(Ds,ke-Ee)]);l.style.minWidth=ye+"px",l.style.left=ze+"px"}else{const Se=P.right-M.right,te=window.innerWidth-R.right-Se,Oe=window.innerWidth-T.right-te,ye=T.width+Oe,Ee=Math.max(ye,P.width),ke=window.innerWidth-Ds,ze=P3(te,[Ds,Math.max(Ds,ke-Ee)]);l.style.minWidth=ye+"px",l.style.right=ze+"px"}const D=p(),$=window.innerHeight-Ds*2,q=g.scrollHeight,H=window.getComputedStyle(u),L=parseInt(H.borderTopWidth,10),F=parseInt(H.paddingTop,10),Y=parseInt(H.borderBottomWidth,10),U=parseInt(H.paddingBottom,10),re=L+F+q+U+Y,G=Math.min(y.offsetHeight*5,re),B=window.getComputedStyle(g),z=parseInt(B.paddingTop,10),he=parseInt(B.paddingBottom,10),fe=T.top+T.height/2-Ds,be=$-fe,xe=y.offsetHeight/2,pe=y.offsetTop+xe,Ae=L+F+pe,ie=re-Ae;if(Ae<=fe){const Se=D.length>0&&y===D[D.length-1].ref.current;l.style.bottom="0px";const te=u.clientHeight-g.offsetTop-g.offsetHeight,Oe=Math.max(be,xe+(Se?he:0)+te+Y),ye=Ae+Oe;l.style.height=ye+"px"}else{const Se=D.length>0&&y===D[0].ref.current;l.style.top="0px";const Oe=Math.max(fe,L+g.offsetTop+(Se?z:0)+xe)+ie;l.style.height=Oe+"px",g.scrollTop=Ae-fe+g.offsetTop}l.style.margin=`${Ds}px 0`,l.style.minHeight=G+"px",l.style.maxHeight=$+"px",s==null||s(),requestAnimationFrame(()=>b.current=!0)}},[p,i.trigger,i.valueNode,l,u,g,y,w,i.dir,s]);un(()=>S(),[S]);const[A,k]=j.useState();un(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const C=j.useCallback(T=>{T&&v.current===!0&&(S(),N==null||N(),v.current=!1)},[S,N]);return r.jsx(yme,{scope:n,contentWrapper:l,shouldExpandOnScrollRef:b,onScrollButtonChange:C,children:r.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:r.jsx(St.div,{...a,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}})})})});Eq.displayName=xme;var gme="SelectPopperPosition",AS=j.forwardRef((e,t)=>{const{__scopeSelect:n,align:s="start",collisionPadding:a=Ds,...i}=e,o=Wy(n);return r.jsx(L7,{...o,...i,ref:t,align:s,collisionPadding:a,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});AS.displayName=gme;var[yme,wC]=au(Ll,{}),TS="SelectViewport",Pq=j.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s,...a}=e,i=No(TS,n),o=wC(TS,n),l=rr(t,i.onViewportChange),c=j.useRef(0);return r.jsxs(r.Fragment,{children:[r.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),r.jsx(Uy.Slot,{scope:n,children:r.jsx(St.div,{"data-radix-select-viewport":"",role:"presentation",...a,ref:l,style:{position:"relative",flex:1,overflow:"hidden auto",...a.style},onScroll:mt(a.onScroll,u=>{const m=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:p}=o;if(p!=null&&p.current&&f){const b=Math.abs(c.current-m.scrollTop);if(b>0){const v=window.innerHeight-Ds*2,g=parseFloat(f.style.minHeight),y=parseFloat(f.style.height),w=Math.max(g,y);if(w<v){const N=w+b,S=Math.min(v,N),A=N-S;f.style.height=S+"px",f.style.bottom==="0px"&&(m.scrollTop=A>0?A:0,f.style.justifyContent="flex-end")}}}c.current=m.scrollTop})})})]})});Pq.displayName=TS;var Oq="SelectGroup",[vme,bme]=au(Oq),jme=j.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=ei();return r.jsx(vme,{scope:n,id:a,children:r.jsx(St.div,{role:"group","aria-labelledby":a,...s,ref:t})})});jme.displayName=Oq;var Mq="SelectLabel",Rq=j.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=bme(Mq,n);return r.jsx(St.div,{id:a.id,...s,ref:t})});Rq.displayName=Mq;var cg="SelectItem",[wme,Iq]=au(cg),Dq=j.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:a=!1,textValue:i,...o}=e,l=wo(cg,n),c=No(cg,n),u=l.value===s,[m,f]=j.useState(i??""),[p,b]=j.useState(!1),v=rr(t,N=>{var S;return(S=c.itemRefCallback)==null?void 0:S.call(c,N,s,a)}),g=ei(),y=j.useRef("touch"),w=()=>{a||(l.onValueChange(s),l.onOpenChange(!1))};if(s==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return r.jsx(wme,{scope:n,value:s,disabled:a,textId:g,isSelected:u,onItemTextChange:j.useCallback(N=>{f(S=>S||((N==null?void 0:N.textContent)??"").trim())},[]),children:r.jsx(Uy.ItemSlot,{scope:n,value:s,disabled:a,textValue:m,children:r.jsx(St.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1,...o,ref:v,onFocus:mt(o.onFocus,()=>b(!0)),onBlur:mt(o.onBlur,()=>b(!1)),onClick:mt(o.onClick,()=>{y.current!=="mouse"&&w()}),onPointerUp:mt(o.onPointerUp,()=>{y.current==="mouse"&&w()}),onPointerDown:mt(o.onPointerDown,N=>{y.current=N.pointerType}),onPointerMove:mt(o.onPointerMove,N=>{var S;y.current=N.pointerType,a?(S=c.onItemLeave)==null||S.call(c):y.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:mt(o.onPointerLeave,N=>{var S;N.currentTarget===document.activeElement&&((S=c.onItemLeave)==null||S.call(c))}),onKeyDown:mt(o.onKeyDown,N=>{var A;((A=c.searchRef)==null?void 0:A.current)!==""&&N.key===" "||(ome.includes(N.key)&&w(),N.key===" "&&N.preventDefault())})})})})});Dq.displayName=cg;var Eh="SelectItemText",Lq=j.forwardRef((e,t)=>{const{__scopeSelect:n,className:s,style:a,...i}=e,o=wo(Eh,n),l=No(Eh,n),c=Iq(Eh,n),u=ume(Eh,n),[m,f]=j.useState(null),p=rr(t,w=>f(w),c.onItemTextChange,w=>{var N;return(N=l.itemTextRefCallback)==null?void 0:N.call(l,w,c.value,c.disabled)}),b=m==null?void 0:m.textContent,v=j.useMemo(()=>r.jsx("option",{value:c.value,disabled:c.disabled,children:b},c.value),[c.disabled,c.value,b]),{onNativeOptionAdd:g,onNativeOptionRemove:y}=u;return un(()=>(g(v),()=>y(v)),[g,y,v]),r.jsxs(r.Fragment,{children:[r.jsx(St.span,{id:c.textId,...i,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?Zm.createPortal(i.children,o.valueNode):null]})});Lq.displayName=Eh;var $q="SelectItemIndicator",Fq=j.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e;return Iq($q,n).isSelected?r.jsx(St.span,{"aria-hidden":!0,...s,ref:t}):null});Fq.displayName=$q;var ES="SelectScrollUpButton",Bq=j.forwardRef((e,t)=>{const n=No(ES,e.__scopeSelect),s=wC(ES,e.__scopeSelect),[a,i]=j.useState(!1),o=rr(t,s.onScrollButtonChange);return un(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollTop>0;i(u)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),a?r.jsx(Vq,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop-c.offsetHeight)}}):null});Bq.displayName=ES;var PS="SelectScrollDownButton",qq=j.forwardRef((e,t)=>{const n=No(PS,e.__scopeSelect),s=wC(PS,e.__scopeSelect),[a,i]=j.useState(!1),o=rr(t,s.onScrollButtonChange);return un(()=>{if(n.viewport&&n.isPositioned){let l=function(){const u=c.scrollHeight-c.clientHeight,m=Math.ceil(c.scrollTop)<u;i(m)};const c=n.viewport;return l(),c.addEventListener("scroll",l),()=>c.removeEventListener("scroll",l)}},[n.viewport,n.isPositioned]),a?r.jsx(Vq,{...e,ref:o,onAutoScroll:()=>{const{viewport:l,selectedItem:c}=n;l&&c&&(l.scrollTop=l.scrollTop+c.offsetHeight)}}):null});qq.displayName=PS;var Vq=j.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s,...a}=e,i=No("SelectScrollButton",n),o=j.useRef(null),l=zy(n),c=j.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return j.useEffect(()=>()=>c(),[c]),un(()=>{var m;const u=l().find(f=>f.ref.current===document.activeElement);(m=u==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[l]),r.jsx(St.div,{"aria-hidden":!0,...a,ref:t,style:{flexShrink:0,...a.style},onPointerDown:mt(a.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(s,50))}),onPointerMove:mt(a.onPointerMove,()=>{var u;(u=i.onItemLeave)==null||u.call(i),o.current===null&&(o.current=window.setInterval(s,50))}),onPointerLeave:mt(a.onPointerLeave,()=>{c()})})}),Nme="SelectSeparator",Uq=j.forwardRef((e,t)=>
vendor: 4,626 bytes, line 823
823{const{__scopeSelect:n,...s}=e;return r.jsx(St.div,{"aria-hidden":!0,...s,ref:t})});Uq.displayName=Nme;var OS="SelectArrow",_me=j.forwardRef((e,t)=>{const{__scopeSelect:n,...s}=e,a=Wy(n),i=wo(OS,n),o=No(OS,n);return i.open&&o.position==="popper"?r.jsx($7,{...a,...s,ref:t}):null});_me.displayName=OS;var Sme="SelectBubbleInput",zq=j.forwardRef(({__scopeSelect:e,value:t,...n},s)=>{const a=j.useRef(null),i=rr(s,a),o=nme(t);return j.useEffect(()=>{const l=a.current;if(!l)return;const c=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(c,"value").set;if(o!==t&&m){const f=new Event("change",{bubbles:!0});m.call(l,t),l.dispatchEvent(f)}},[o,t]),r.jsx(St.select,{...n,style:{...vq,...n.style},ref:i,defaultValue:t})});zq.displayName=Sme;function Wq(e){return e===""||e===void 0}function Hq(e){const t=fo(e),n=j.useRef(""),s=j.useRef(0),a=j.useCallback(o=>{const l=n.current+o;t(l),(function c(u){n.current=u,window.clearTimeout(s.current),u!==""&&(s.current=window.setTimeout(()=>c(""),1e3))})(l)},[t]),i=j.useCallback(()=>{n.current="",window.clearTimeout(s.current)},[]);return j.useEffect(()=>()=>window.clearTimeout(s.current),[]),[n,a,i]}function Gq(e,t,n){const a=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let o=kme(e,Math.max(i,0));a.length===1&&(o=o.filter(u=>u!==n));const c=o.find(u=>u.textValue.toLowerCase().startsWith(a.toLowerCase()));return c!==n?c:void 0}function kme(e,t){return e.map((n,s)=>e[(t+s)%e.length])}var Cme=bq,Kq=wq,Ame=_q,Tme=Sq,Eme=kq,Yq=Cq,Pme=Pq,Xq=Rq,Jq=Dq,Ome=Lq,Mme=Fq,Qq=Bq,Zq=qq,eV=Uq;const Xe=Cme,Je=Ame,He=j.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(Kq,{ref:s,className:lt("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,r.jsx(Tme,{asChild:!0,children:r.jsx(Sa,{className:"h-4 w-4 opacity-50"})})]}));He.displayName=Kq.displayName;const tV=j.forwardRef(({className:e,...t},n)=>r.jsx(Qq,{ref:n,className:lt("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(dy,{className:"h-4 w-4"})}));tV.displayName=Qq.displayName;const rV=j.forwardRef(({className:e,...t},n)=>r.jsx(Zq,{ref:n,className:lt("flex cursor-default items-center justify-center py-1",e),...t,children:r.jsx(Sa,{className:"h-4 w-4"})}));rV.displayName=Zq.displayName;const Ge=j.forwardRef(({className:e,children:t,position:n="popper",...s},a)=>r.jsx(Eme,{children:r.jsxs(Yq,{ref:a,className:lt("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...s,children:[r.jsx(tV,{}),r.jsx(Pme,{className:lt("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),r.jsx(rV,{})]})}));Ge.displayName=Yq.displayName;const Rme=j.forwardRef(({className:e,...t},n)=>r.jsx(Xq,{ref:n,className:lt("px-2 py-1.5 text-sm font-semibold",e),...t}));Rme.displayName=Xq.displayName;const Pe=j.forwardRef(({className:e,children:t,...n},s)=>r.jsxs(Jq,{ref:s,className:lt("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[r.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:r.jsx(Mme,{children:r.jsx(ia,{className:"h-4 w-4"})})}),r.jsx(Ome,{children:t})]}));Pe.displayName=Jq.displayName;const Ime=j.forwardRef(({className:e,...t},n)=>r.jsx(eV,{ref:n,className:lt("-mx-1 my-1 h-px bg-muted",e),...t}));Ime.displayName=eV.displayName;const Dme=["Travel","Hotels & Resorts","Restaurants","Fine Dining","Property","Interior Design","Motoring","Supercars","Electric Vehicles","Watches","Yachts","Private Aviation","Fashion","Beauty","Wellness","Business","Investment","Chelsea","Kensington","Knightsbridge","London","
823Luxury Retail","Entertainment","Culture","Music"];function Lme({onSuccess:e}){const[t,n]=j.useState({name:"",source_type:"rss",feed_url:"",priority:"5",categories:[]}),[s,a]=j.useState(!1),i=l=>{n(c=>({...c,categories:c.categories.includes(l)?c.categories.filter(u=>u!==l):[...c.categories,l]}))},o=async l=>{if(l.preventDefault(),!t.name||!t.feed_url){alert("Name and feed URL are required");return}try{a(!0),await W.entities.ContentSource.create({name:t.name,source_type:t.source_type,feed_url:t.feed_url,priority:parseInt(t.priority),categories:JSON.stringify(t.categories),is_active:!0,success_rate:100}),e==null||e()}catch(c){alert("Error: "+c.message)}finally{a(!1)}};return r.jsxs("form",{onSubmit:o,className:"space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Source Name"}),r.jsx(de,{value:t.name,onChange:l=>n({...t,name:l.target.value}),placeholder:"e.g., Robb Report, Architectural Digest",required:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Feed Type"}),r.jsxs(Xe,{value:t.source_type,onValueChange:l=>n({...t,source_type:l}),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"rss",children:"RSS Feed"}),r.jsx(Pe,{value:"api",children:"REST API"}),r.jsx(Pe,{value:"website",children:"Website Scrape"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Feed URL"}),r.jsx(de,{value:t.feed_url,onChange:l=>n({...t,feed_url:l.target.value}),placeholder:"https://example.com/feed",required:!0})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-2",children:"Priority (1-10)"}),r.jsxs(Xe,{value:t.priority,onValueChange:l=>n({...t,priority:l}),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:[1,2,3,4,5,6,7,8,9,10].map(l=>r.jsx(Pe,{value:l.toString(),children:l},l))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-sm font-medium block mb-3",children:"Target Categories"}),r.jsx("div",{className:"grid grid-cols-2 gap-2 max-h-64 overflow-y-auto p-2 border border-input rounded",children:Dme.map(l=>r.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:t.categories.includes(l),onChange:()=>i(l),className:"w-4 h-4"}),r.jsx("span",{className:"text-sm",children:l})]},l))})]}),r.jsx(K,{type:"submit",disabled:s,className:"w-full",children:s?"Adding...":"Add Source"})]})}function $me({onRefresh:e}){const[t,n]=j.useState([]),[s,a]=j.useState(!0),[i,o]=j.useState(null);j.useEffect(()=>{l()},[]);const l=async()=>{try{const m=await W.entities.ContentSource.list("-created_date",100);n(m||[])}finally{a(!1)}},c=async m=>{if(confirm("Delete this source?"))try{await W.entities.ContentSource.delete(m),l(),e==null||e()}catch(f){alert("Error: "+f.message)}},u=async m=>{try{await W.entities.ContentSource.update(m.id,{is_active:!m.is_active}),l()}catch(f){alert("Error: "+f.message)}};return s?r.jsx("div",{children:"Loading sources..."}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs(hr,{open:i==="new",onOpenChange:m=>!m&&o(null),children:[r.jsx(hde,{asChild:!0,children:r.jsxs(K,{onClick:()=>o("new"),className:"mb-4",children:[r.jsx(jn,{className:"w-4 h-4 mr-2"}),"Add News Source"]})}),r.jsxs(or,{children:[r.jsx(kr,{children:r.jsx(Cr,{children:"Add Content Source"})}),r.jsx(Lme,{onSuccess:()=>{o(null),l(),e==null||e()}})]})]}),r.jsx("div",{className:"grid gap-4",children:t.length===0?r.jsx(oe,{children:r.jsx(ce,{className:"pt-6 text-center text-muted-foreground",children:"No sources configured. Add one to begin discovery."})}):t.map(m=>r.jsx(oe,{children:r.jsx(ce,{className:"pt-6",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx("h3",{className:"font-semibold text-lg",children:m.name}),r.jsx(ge,{variant:m.is_active?"default":"secondary",children:m.is_active?"Active":"Inactive"})]}),r.jsx("p",{className:"text-sm text-muted-foreground mb-3 break-all",children:m.feed_url}),r.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[r.jsxs("span",{children:["Type: ",m.source_type]}
823),r.jsxs("span",{children:["Priority: ",m.priority,"/10"]}),m.last_checked&&r.jsxs("span",{children:["Last checked: ",new Date(m.last_checked).toLocaleDateString()]})]}),m.last_story_count>0&&r.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs",children:[r.jsx(uy,{className:"w-3 h-3 text-green-600"}),r.jsxs("span",{children:[m.last_story_count," stories found in last check"]})]}),m.error_log&&JSON.parse(m.error_log).length>0&&r.jsxs("div",{className:"mt-3 flex items-center gap-2 text-xs text-red-600",children:[r.jsx(Ln,{className:"w-3 h-3"}),r.jsx("span",{children:"Recent errors detected"})]})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(K,{variant:"outline",size:"sm",onClick:()=>u(m),children:m.is_active?"Disable":"Enable"}),r.jsx(K,{variant:"ghost",size:"icon",onClick:()=>c(m.id),children:r.jsx(my,{className:"w-4 h-4 text-destructive"})})]})]})})},m.id))})]})}const Fme={discovered:"bg-slate-100 text-slate-700",scored:"bg-blue-100 text-blue-700",analyzing:"bg-yellow-100 text-yellow-700",generating:"bg-orange-100 text-orange-700",analyzed:"bg-purple-100 text-purple-700",ready:"bg-green-100 text-green-700",published:"bg-emerald-600 text-white",rejected:"bg-red-100 text-red-700"},Bme={green:"bg-green-500 text-white",yellow:"bg-yellow-500 text-white",red:"bg-red-500 text-white"},qme={rss:"ð¡",google_news:"ð",website_monitor:"ð",website:"ð"},Vme=["All","Travel","Property","Motoring","Fashion & Style","Food & Drink","Watches","Yachts","Business","Beauty & Wellness","Local London","Lifestyle"];function Ume({onRefresh:e}){const[t,n]=j.useState([]),[s,a]=j.useState("all"),[i,o]=j.useState("All"),[l,c]=j.useState(!0),[u,m]=j.useState({});j.useEffect(()=>{f()},[s,i]);const f=async()=>{c(!0);try{let g={};s!=="all"&&(g.status=s),i!=="All"&&(g.recommended_section=i);const y=await W.entities.DiscoveredStory.filter(g,"-story_score",100);n(y||[])}finally{c(!1)}},p=async g=>{m(y=>({...y,[g]:!0}));try{await W.functions.invoke("analyzeStory",{discovered_story_id:g}),f(),e==null||e()}catch(y){alert("Analysis failed: "+y.message)}finally{m(y=>({...y,[g]:!1}))}},b=async g=>{confirm("Delete this story?")&&(await W.entities.DiscoveredStory.delete(g),f(),e==null||e())},v=({value:g,label:y,color:w})=>r.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[r.jsx("span",{className:"text-muted-foreground w-20 shrink-0",children:y}),r.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:`h-full rounded-full ${w}`,style:{width:`${g||0}%`}})}),r.jsx("span",{className:"font-mono font-medium w-6",children:g||0})]});return r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"space-y-3",children:[r.jsx("div",{className:"flex flex-wrap gap-1.5",children:["all","scored","analyzed","ready","published","rejected"].map(g=>r.jsx("button",{onClick:()=>a(g),className:`px-3 py-1 rounded text-xs font-medium transition-colors border ${s===g?"bg-foreground text-background border-foreground":"border-border hover:border-foreground
823/30"}`,children:g.charAt(0).toUpperCase()+g.slice(1)},g))}),r.jsx("div",{className:"flex flex-wrap gap-1.5",children:Vme.map(g=>r.jsx("button",{onClick:()=>o(g),className:`px-2.5 py-1 rounded text-xs transition-colors border ${i===g?"bg-primary text-primary-foreground border-primary":"border-border hover:border-primary/40"}`,children:g},g))})]}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:[t.length," stories found"]}),l?r.jsx("div",{className:"flex items-center justify-center py-12",children:r.jsx("div",{className:"w-6 h-6 border-2 border-muted border-t-foreground rounded-full animate-spin"})}):r.jsx("div",{className:"grid gap-4",children:t.length===0?r.jsx(oe,{children:r.jsx(ce,{className:"pt-6 text-center text-muted-foreground",children:"No stories found"})}):t.map(g=>{var y;return r.jsx(oe,{className:"overflow-hidden",children:r.jsx(ce,{className:"pt-0 p-0",children:r.jsxs("div",{className:"flex gap-4 p-5",children:[g.image_url&&r.jsx("img",{src:g.image_url,alt:"",className:"w-20 h-20 object-cover rounded shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[r.jsx("h3",{className:"font-semibold text-sm leading-snug flex-1",children:g.original_title}),r.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[g.publication_recommendation&&r.jsx(ge,{className:`${Bme[g.publication_recommendation]} text-xs px-2 py-0`,children:(y=g.publication_recommendation)==null?void 0:y.toUpperCase()}),r.jsx(ge,{className:`${Fme[g.status]||""} text-xs px-2 py-0`,children:g.status})]})]}),r.jsxs("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-muted-foreground mb-3",children:[r.jsxs("span",{children:[qme[g.source_type]||"ð°"," ",g.source_name]}),g.recommended_section&&r.jsx("span",{className:"font-medium text-foreground",children:g.recommended_section}),g.discovery_keywords&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(dn,{className:"w-3 h-3"}),g.discovery_keywords]})]}),(g.story_score>0||g.luxury_relevance_score>0)&&r.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-1 mb-3",children:[r.jsx(v,{value:g.story_score,label:"Story",color:"bg-blue-500"}),r.jsx(v,{value:g.seo_opportunity_score,label:"SEO",color:"bg-green-500"}),r.jsx(v,{value:g.luxury_relevance_score,label:"Luxury",color:"bg-amber-500"}),r.jsx(v,{value:g.location_relevance_score,label:"Location",color:"bg-purple-500"})]}),r.jsxs("div",{className:"flex gap-2",children:[g.status==="scored"&&r.jsxs(K,{size:"sm",onClick:()=>p(g.id),disabled:u[g.id],children:[r.jsx(Al,{className:"w-3 h-3 mr-1"}),u[g.id]?"Analyzing...":"Analyze"]}),r.jsx("a",{href:g.original_url,target:"_blank",rel:"noopener noreferrer",children:r.jsxs(K,{size:"sm",variant:"outline",children:[r.jsx(Nr,{className:"w-3 h-3 mr-1"})," Source"]})}),r.jsx(K,{size:"sm",variant:"ghost",onClick:()=>b(g.id),children:r.jsx(my,{className:"w-3 h-3 text-destructive"})})]})]})]})})},g.id)})})]})}function zme(){const[e,t]=j.useState([]),[n,s]=j.useState(!0);j.useEffect(()=>{a()},[]);const a=async()=>{try{const o=await W.entities.NewsroomLog.list("-created_date",20);t(o||[])}finally{s(!1)}},i={completed:r.jsx(uy,{className:"w-4 h-4 text-green-600"}),failed:r.jsx(Ln,{className:"w-4 h-4 text-red-600"}),running:r.jsx(Vt,{className:"w-4 h-4 text-blue-600 animate-pulse"})};return n?r.jsx("div",{className:"py-4 text-sm text-muted-foreground",children:"Loading logs..."}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(n8,{className:"w-5 h-5 text-muted-foreground"}),r.jsx("h3",{className:"font-semibold",children:"Run History"})]}),e.length===0?r.jsx("p",{className:"text-sm text-muted-foreground",children:"No runs recorded yet."}):e.map(o=>{var l;return r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[i[o.status],r.jsx("span",{className:"font-medium capitalize",children:(l=o.run_type)==null?void 0:l.replace("_"," ")}),r.jsx(ge,{variant:"outline",className:"text-xs",children:o.status})]}),r.jsx("span",{className:"text-xs text-muted-foreground",children:o.started_at?new Date(o.started_at).toLocaleStr
823ing("en-GB"):"â"})]}),r.jsxs("div",{className:"grid grid-cols-4 gap-3 text-center",children:[r.jsxs("div",{className:"bg-blue-50 rounded p-2",children:[r.jsx("div",{className:"text-lg font-bold text-blue-700",children:o.total_discovered||0}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"Discovered"})]}),r.jsxs("div",{className:"bg-purple-50 rounded p-2",children:[r.jsx("div",{className:"text-lg font-bold text-purple-700",children:o.generated||0}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"Generated"})]}),r.jsxs("div",{className:"bg-green-50 rounded p-2",children:[r.jsx("div",{className:"text-lg font-bold text-green-700",children:o.published||0}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"Published"})]}),r.jsxs("div",{className:"bg-red-50 rounded p-2",children:[r.jsx("div",{className:"text-lg font-bold text-red-700",children:o.rejected||0}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"Rejected"})]})]}),o.errors&&JSON.parse(o.errors||"[]").length>0&&r.jsxs("div",{className:"mt-3 text-xs text-red-600 bg-red-50 p-2 rounded",children:[JSON.parse(o.errors)[0],JSON.parse(o.errors).length>1&&` (+${JSON.parse(o.errors).length-1} more)`]})]})},o.id)})]})}function Wme(){const[e,t]=j.useState("discovery"),[n,s]=j.useState(null),[a,i]=j.useState(!1),[o,l]=j.useState(!1);j.useEffect(()=>{c()},[]);const c=async()=>{try{const[f,p,b,v,g]=await Promise.all([W.entities.ContentSource.filter({is_active:!0},"-created_date",200),W.entities.DiscoveredStory.filter({status:"scored"},"-created_date",200),W.entities.DiscoveredStory.filter({status:"analyzed"},"-created_date",200),W.entities.GeneratedArticle.filter({status:"ready"},"-created_date",200),W.entities.GeneratedArticle.filter({status:"published"},"-created_date",200)]);s({activeSources:(f==null?void 0:f.length)||0,scored:(p==null?void 0:p.length)||0,analyzed:(b==null?void 0:b.length)||0,ready:(v==null?void 0:v.length)||0,published:(g==null?void 0:g.length)||0})}catch{}},u=async()=>{i(!0);try{const f=await W.functions.invoke("discoverStories",{});alert(`Discovery complete: ${(f==null?void 0:f.total_discovered)||0} new stories found 824RSS: ${(f==null?void 0:f.rss_stories)||0} | Google News: ${(f==null?void 0:f.google_news_stories)||0} | Monitors: ${(f==null?void 0:f.website_monitor_stories)||0}`),c()}catch(f){alert("Discovery error: "+f.message)}finally{i(!1)}},m=async()=>{if(confirm("Run the full Morning Editorial Engine? This will discover stories, generate articles with AI, create images and auto-publish GREEN content. This may take several minutes.")){l(!0);try{const f=await W.functions.invoke("morningEditorialRun",{});alert(`Morning run complete! 825â ${(f==null?void 0:f.generated)||0} articles generated 826ð° ${(f==null?void 0:f.published)||0} auto-published 827ð ${(f==null?void 0:f.discovered)||0} stories discovered`),c()}catch(f){alert("Morning run error: "+f.message)}finally{l(!1)}}};return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-8",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-1",children:"Chelsea Monthly"}),r.jsx("h1",{className:"text-3xl font-serif mb-1",children:"Autonomous Editorial Intelligence"}),r.jsx("p",{className:"text-background/60 text-sm",children:"24-hour AI-powered luxury media newsroom"})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsxs(K,{variant:"outline",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",onClick:u,disabled:a,children:[r.jsx(ts,{className:`w-4 h-4 mr-2 ${a?"animate-spin":""}`}),"Run Discovery"]}),r.jsx(se,{to:"/admin/generation",children:r.jsxs(K,{variant:"outline",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",children:[r.jsx(Kh,{className:"w-4 h-4 mr-2"})," Generation Engine"]})}),r.jsx(se,{to:"/revenue",children:r.jsx(K,{variant:"outline",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",children:"Revenue Centre"})}),r.jsxs(K,{className:"bg-primary text-primary-foreground",onClick:m,disabled:o||a,children:[r.jsx(SK,{className:`w-4 h-4 mr-2 ${o?"animate-pulse":""}`}),o?"Running Morning Engine...":"Morning Editorial Run"]})]})]})})}),r.jsx("div",{className:"bg-muted/30 border-b border-border/30 py-3",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6",children:r.jsxs("div",{className:"flex items-center gap-6 text-xs text-muted-foreground",children:[r.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-foreground",children:[r.jsx("span",{className:"w-5 h-5 rounded-full bg-blue-600 text-white text-xs flex items-center justify-center font-bold",children:"1"}),r.jsx(DK,{className:"w-3 h-3"})," RSS Feeds"]}),r.jsx("div",{className:"text-border",children:"â"}),r.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-foreground",children:[r.jsx("span",{className:"w-5 h-5 rounded-full bg-purple-600 text-white text-xs flex items-center justify-center font-bold",children:"2"}),r.jsx(dn,{className:"w-3 h-3"})," Google News Discovery"]}),r.jsx("div",{className:"text-border",children:"â"}),r.jsxs("div",{className:"flex items-center gap-1.5 font-medium text-foreground",children:[r.jsx("span",{className:"w-5 h-5 rounded-full bg-amber-600 text-white text-xs flex items-center justify-center font-bold",children:"3"}),r.jsx(Zn,{className:"w-3 h-3"})," Website Monitors"]}),r.jsx("div",{className:"text-border ml-auto",children:"â"}),r.jsx("div",{className:"flex items-center gap-1.5",children:"Scoring"}),r.jsx("div",{className:"text-border",children:"â"}),r.jsx("div",{className:"flex items-center gap-1.5",children:"AI Generation"}),r.jsx("div",{className:"text-border",children:"â"}),r.jsx("div",{className:"flex items-center gap-1.5",children:"Image Engine"}),r.jsx("div",{className:"text-border",children:"â"}),r.jsx("div",{className:"flex items-center gap-1.5 font-medium text-green-700",children:"Publish"})]})})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[r.jsx("div",{className:"grid grid-cols-5 ga
827p-4 mb-8",children:[{label:"Active Sources",value:(n==null?void 0:n.activeSources)??"â",color:"text-blue-600",sub:"RSS + Google + Monitor"},{label:"Scored Stories",value:(n==null?void 0:n.scored)??"â",color:"text-slate-600",sub:"Awaiting generation"},{label:"Analyzed",value:(n==null?void 0:n.analyzed)??"â",color:"text-purple-600",sub:"With AI analysis"},{label:"Ready to Publish",value:(n==null?void 0:n.ready)??"â",color:"text-amber-600",sub:"Awaiting schedule"},{label:"Published Today",value:(n==null?void 0:n.published)??"â",color:"text-green-600",sub:"Auto-published"}].map(f=>r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:f.label}),r.jsx("div",{className:`text-3xl font-bold ${f.color}`,children:f.value}),r.jsx("div",{className:"text-xs text-muted-foreground mt-1",children:f.sub})]})},f.label))}),r.jsxs(Aa,{value:e,onValueChange:t,children:[r.jsxs(Ys,{className:"mb-6",children:[r.jsx(ft,{value:"discovery",children:"Story Discovery"}),r.jsx(ft,{value:"sources",children:"Source Management"}),r.jsx(ft,{value:"logs",children:"Run Logs"}),r.jsx(ft,{value:"schedule",children:"Publishing Schedule"})]}),r.jsx(pt,{value:"discovery",children:r.jsx(Ume,{onRefresh:c})}),r.jsx(pt,{value:"sources",children:r.jsx($me,{onRefresh:c})}),r.jsx(pt,{value:"logs",children:r.jsx(zme,{})}),r.jsx(pt,{value:"schedule",children:r.jsxs(oe,{children:[r.jsx(ut,{children:r.jsxs(ht,{className:"flex items-center gap-2",children:[r.jsx(Vt,{className:"w-5 h-5"})," Automated Publishing Schedule"]})}),r.jsx(ce,{children:r.jsxs("div",{className:"space-y-3",children:[r.jsx("div",{className:"grid grid-cols-3 gap-3",children:["06:00","08:00","10:00","12:00","14:00","16:00","18:00","20:00","22:00"].map(f=>r.jsxs("div",{className:"flex items-center gap-3 p-3 border border-border rounded-lg",children:[r.jsx("div",{className:"w-16 text-lg font-mono font-bold text-primary",children:f}),r.jsxs("div",{children:[r.jsx("div",{className:"text-sm font-medium",children:"Publishing Slot"}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"Highest-scored story"})]}),r.jsx(uy,{className:"w-4 h-4 text-green-500 ml-auto"})]},f))}),r.jsxs("div",{className:"mt-6 p-4 bg-muted/30 rounded-lg text-sm text-muted-foreground space-y-2",children:[r.jsxs("p",{children:[r.jsx("span",{className:"font-medium text-green-700",children:"ð¢ GREEN content"})," â Auto-published immediately (travel news, hotel openings, restaurant launches, lifestyle trends)"]}),r.jsxs("p",{children:[r.jsx("span",{className:"font-medium text-yellow-700",children:"ð¡ YELLOW content"})," â Published after AI quality validation (passes fact, brand safety, SEO checks)"]}),r.jsxs("p",{children:[r.jsx("span",{className:"font-medium text-red-700",children:"ð´ RED content"})," â Held for editorial approval (legal, political, reputation-sensitive)"]}),r.jsxs("p",{className:"pt-2 border-t border-border",children:["Target: ",r.jsx("strong",{children:"20â50 articles daily"})," across all sections. Morning editorial run: ",r.jsx("strong",{children:"06:00 GMT daily"}),"."]})]})]})})]})})]})]})]})}const Hme=["Breaking News","Luxury Feature","Travel Feature","Restaurant Review","Hotel Review","Property Feature","Business Feature","Lifestyle Feature","Fashion Feature","Motoring Feature","Watch Feature","Yacht Feature"],Gme=[{value:"short_news",label:"Short News",range:"300â500 words",icon:"â¡"},{value:"standard_feature",label:"Standard Feature",range:"800â1,200 words",icon:"ð"},{value:"premium_feature",label:"Premium Feature",range:"1,500â2,500 words",icon:"â"},{value:"longform_editorial",label:"Long-Form Editorial",range:"3,000+ words",icon:"ð"}];function nV({story:e,onClose:t,onSuccess:n,regenerateFromId:s=null}){const[a,i]=j.useState("Luxury Feature"),[o,l]=j.useState("standard_feature"),[c,u]=j.useState(!1),[m,f]=j.useState(null),p=async()=>{u(!0);try{const v=await W.functions.invoke("generateArticle",{discovered_story_id:e.id,article_format:a,article_length:o,regenerate_from_id:s});f(v)}catch(v){alert("Generation failed: "+v.message)}finally{u(!1)}},b={green:"bg-green-500",yellow:"bg-amber-500",red:"bg-red-500"};return r.jsx(hr,{open:!0,onOpenChange:t,children:r.jsxs(or,{className:"max-w-lg",children:[r.jsx(kr,{children:r.jsxs(Cr,{className:"flex items-center gap-2",children:[r.jsx(Kh,{className:"w-5 h-5"})," Generate Article"]})}),m?r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:`flex items-center gap-3 p-4 rounded-lg ${m.auto_rejected?"bg-red-50 border border-red-200":"bg-green-50 border border-green-200"}`,children:[r.jsx("div",{className:`w-10 h-10 rounded-full flex items-center justify-center text-white text-lg ${b[m.publication_tier]||"bg-muted"}`,children:m.publication_tier==="green"?"â":m.publication_tier==="yellow"?"~":"â"}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold",children:m.auto_rejected?"Article Rejected":"Article Generated!"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:m.title})]})]}),r.jsxs("div",{className:"grid grid-cols-3 gap-2 text-center",children:[r.jsxs("div",{className:"bg-muted/40 rounded p-3",children:[r.jsx("div",{className:"text-2xl font-bold",children:m.overall_score}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"Quality Score"})]}),r.jsxs("div",{className:"bg-muted/40 rounded p-3",children:[r.jsx("div",{className:"text-2xl font-bold",children:m.word_count}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"Words"})]}),r.jsxs("div",{className:"bg-muted/40 rounded p-3",children:[r.jsx("div",{className:`text-sm font-bold uppercase ${m.publication_tier==="green"?"text-green-600":m.publication_tier==="yellow"?"text-amber-600":"text-red-600"}`,children:m.publication_tier}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"Tier"})]})]}),r.jsxs("div",{className:"flex justify-end gap-2",children:[r.jsx(K,{variant:"outline",onClick:t,children:"Close"}),r.jsx(K,{onClick:n,children:"View in CMS"})]})]}):r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"bg-muted/40 rounded-lg p-3",children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Source Story"}),r.jsx("p",{className:"text-sm font-medium leading-snug",children:e.original_title}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[e.source_name," · ",e.recommended_section]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("label",{className:"text-sm font-medium",children:"Article Format"}),r.jsxs(Xe,{value:a,onValueChange:i,children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:Hme.map(v=>r.jsx(Pe,{value:v,children:v},v))})]})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-sm font-medium",children:"Article Length"}),r.jsx("div",{className:"grid grid-cols-2 gap-2",children:Gme.map(v=>r.jsxs("button",{onClick:()=>l(v.value),className:`p-3 rounded-lg border text-left transition-colors ${o===v.value?"border-foreground bg-foreground
827/5":"border-border hover:border-foreground/30"}`,children:[r.jsx("div",{className:"text-base mb-0.5",children:v.icon}),r.jsx("div",{className:"text-xs font-semibold",children:v.label}),r.jsx("div",{className:"text-xs text-muted-foreground",children:v.range})]},v.value))})]}),r.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[r.jsx(K,{variant:"outline",onClick:t,children:"Cancel"}),r.jsx(K,{onClick:p,disabled:c,children:c?r.jsxs(r.Fragment,{children:[r.jsx(va,{className:"w-4 h-4 mr-2 animate-spin"}),"Generatingâ¦"]}):r.jsxs(r.Fragment,{children:[r.jsx(Kh,{className:"w-4 h-4 mr-2"}),"Generate"]})})]}),c&&r.jsx("p",{className:"text-xs text-center text-muted-foreground",children:"AI is extracting entities, generating your article and scoring quality⦠this takes ~30 seconds"})]})]})})}const Kme={green:"bg-green-500 text-white",yellow:"bg-amber-500 text-white",red:"bg-red-500 text-white"},Yme={rss:"ð¡",google_news:"ð",website_monitor:"ð",website:"ð"};function Xme({onArticleGenerated:e}){const[t,n]=j.useState([]),[s,a]=j.useState(!0),[i,o]=j.useState(null),[l,c]=j.useState("All"),u=["All","Travel","Property","Motoring","Fashion & Style","Food & Drink","Watches","Yachts","Business","Beauty & Wellness","Local London","Lifestyle"];j.useEffect(()=>{m()},[l]);const m=async()=>{a(!0);try{let p={status:"scored"};l!=="All"&&(p.recommended_section=l);const b=await W.entities.DiscoveredStory.filter(p,"-story_score",80);n(b||[])}finally{a(!1)}},f=({value:p,color:b})=>r.jsx("div",{className:"flex-1 h-1 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:`h-full rounded-full ${b}`,style:{width:`${p||0}%`}})});return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-lg",children:"Generation Queue"}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:[t.length," stories ready for article generation"]})]}),r.jsxs(K,{variant:"outline",size:"sm",onClick:m,children:[r.jsx(ts,{className:"w-3.5 h-3.5 mr-1.5"})," Refresh"]})]}),r.jsx("div",{className:"flex flex-wrap gap-1.5",children:u.map(p=>r.jsx("button",{onClick:()=>c(p),className:`px-2.5 py-1 rounded text-xs transition-colors border ${l===p?"bg-foreground text-background border-foreground":"border-border hover:border-foreground
827/30"}`,children:p},p))}),s?r.jsx("div",{className:"flex justify-center py-8",children:r.jsx("div",{className:"w-5 h-5 border-2 border-muted border-t-foreground rounded-full animate-spin"})}):t.length===0?r.jsx(oe,{children:r.jsx(ce,{className:"pt-6 text-center text-muted-foreground text-sm",children:"No stories in queue for this filter"})}):r.jsx("div",{className:"grid gap-3",children:t.map(p=>r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsx(ce,{className:"p-4",children:r.jsxs("div",{className:"flex items-start gap-4",children:[p.image_url&&r.jsx("img",{src:p.image_url,alt:"",className:"w-16 h-16 object-cover rounded shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-start justify-between gap-2 mb-1.5",children:[r.jsx("h4",{className:"font-medium text-sm leading-snug",children:p.original_title}),r.jsx("div",{className:"flex gap-1 shrink-0",children:p.publication_recommendation&&r.jsx(ge,{className:`${Kme[p.publication_recommendation]} text-xs px-1.5 py-0`,children:p.publication_recommendation.toUpperCase()})})]}),r.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground mb-2",children:[r.jsxs("span",{children:[Yme[p.source_type]||"ð°"," ",p.source_name]}),p.recommended_section&&r.jsx("span",{className:"font-medium text-foreground",children:p.recommended_section})]}),r.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[r.jsx("span",{className:"text-xs text-muted-foreground w-12",children:"Score"}),r.jsx(f,{value:p.story_score,color:"bg-blue-500"}),r.jsx("span",{className:"text-xs font-mono font-medium",children:p.story_score||0}),r.jsx(f,{value:p.luxury_relevance_score,color:"bg-amber-500"}),r.jsx("span",{className:"text-xs font-mono font-medium",children:p.luxury_relevance_score||0})]}),r.jsxs(K,{size:"sm",onClick:()=>o(p),children:[r.jsx(Kh,{className:"w-3.5 h-3.5 mr-1.5"})," Generate Article"]})]})]})})},p.id))}),i&&r.jsx(nV,{story:i,onClose:()=>o(null),onSuccess:()=>{o(null),m(),e==null||e()}})]})}const Jme={draft:"bg-slate-100 text-slate-700",review:"bg-blue-100 text-blue-700",approved:"bg-green-100 text-green-700",rejected:"bg-red-100 text-red-700",published:"bg-emerald-600 text-white",generating:"bg-yellow-100 text-yellow-700"},Qme={green:"bg-green-500",yellow:"bg-amber-500",red:"bg-red-500"},Zme=e=>e>=80?"text-green-600":e>=60?"text-amber-600":"text-red-600";function efe({selectedId:e,onSelect:t,refreshKey:n}){const[s,a]=j.useState([]),[i,o]=j.useState(!0),[l,c]=j.useState("all");j.useEffect(()=>{u()},[l,n]);const u=async()=>{o(!0);try{let m={};l!=="all"&&(m.status=l);const f=await W.entities.GeneratedArticle.filter(m,"-created_date",100);a(f||[])}finally{o(!1)}};return r.jsxs("div",{className:"flex flex-col h-full",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsx("h3",{className:"font-semibold",children:"Generated Articles"}),r.jsx(K,{variant:"ghost",size:"sm",onClick:u,disabled:i,children:r.jsx(ts,{className:`w-3.5 h-3.5 ${i?"animate-spin":""}`})})]}),r.jsx("div",{className:"flex flex-wrap gap-1 mb-3",children:["all","draft","review","approved","rejected","published"].map(m=>r.jsx("button",{onClick:()=>c(m),className:`px-2 py-0.5 rounded text-xs transition-colors border ${l===m?"bg-foreground text-background border-foreground":"border-border"}`,children:m},m))}),r.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-1",children:i?r.jsx("div",{className:"flex justify-center py-6",children:r.jsx("div",{className:"w-4 h-4 border-2 border-muted border-t-foreground rounded-full animate-spin"})}):s.length===0?r.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:"No articles found"}):s.map(m=>r.jsxs("button",{onClick:()=>t(m),className:`w-full text-left p-3 rounded-lg border transition-all hover:shadow-sm ${e===m.id?"border-foreground bg-foreground
827/5":"border-border hover:border-foreground/30"}`,children:[r.jsxs("div",{className:"flex items-start gap-2 mb-1",children:[m.publication_tier&&r.jsx("div",{className:`w-2 h-2 rounded-full mt-1.5 shrink-0 ${Qme[m.publication_tier]}`}),r.jsx("p",{className:"text-xs font-medium leading-snug line-clamp-2 flex-1",children:m.title}),r.jsx(Us,{className:"w-3 h-3 text-muted-foreground mt-0.5 shrink-0"})]}),r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx(ge,{className:`${Jme[m.status]||""} text-xs px-1.5 py-0`,children:m.status}),r.jsx("span",{className:"text-xs text-muted-foreground",children:m.article_format}),m.score_overall>0&&r.jsx("span",{className:`text-xs font-bold font-mono ml-auto ${Zme(m.score_overall)}`,children:m.score_overall}),m.version>1&&r.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[r.jsx(t8,{className:"w-2.5 h-2.5"}),"v",m.version]})]})]},m.id))})]})}const sV=e=>e>=80?"text-green-600":e>=60?"text-amber-600":"text-red-600",aV=e=>e>=80?"bg-green-500":e>=60?"bg-amber-500":"bg-red-500",tfe={low:"bg-slate-100 text-slate-600",medium:"bg-blue-100 text-blue-600",high:"bg-green-100 text-green-700",very_high:"bg-emerald-100 text-emerald-700"},rfe={green:"bg-green-500 text-white",yellow:"bg-amber-500 text-white",red:"bg-red-500 text-white"};function Ic({label:e,value:t}){return r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:"text-xs text-muted-foreground w-32 shrink-0",children:e}),r.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:`h-full rounded-full transition-all ${aV(t)}`,style:{width:`${t}%`}})}),r.jsx("span",{className:`text-sm font-bold font-mono w-8 text-right ${sV(t)}`,children:t})]})}function Dc({text:e}){const[t,n]=j.useState(!1),s=()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)};return r.jsx("button",{onClick:s,className:"text-muted-foreground hover:text-foreground transition-colors",children:t?r.jsx(ia,{className:"w-3.5 h-3.5 text-green-600"}):r.jsx(QL,{className:"w-3.5 h-3.5"})})}function nfe({article:e,story:t,onApprove:n,onReject:s,onRegenerate:a}){const[i,o]=j.useState("article");if(!e)return r.jsx("div",{className:"flex items-center justify-center h-full min-h-64 text-muted-foreground text-sm",children:r.jsxs("div",{className:"text-center",children:[r.jsx(Nr,{className:"w-8 h-8 mx-auto mb-2 opacity-30"}),r.jsx("p",{children:"Select an article to preview"})]})});const l=Di(e.alternative_headlines,[]),c=Di(e.pull_quotes,[]),u=Di(e.image_captions,[]),m=Di(e.social_captions,{}),f=Di(e.tags,[]),p=Di(e.internal_links,[]),b=Di(e.extracted_entities,{}),v=Di(e.key_facts,[]);return r.jsxs("div",{className:"space-y-4 h-full",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.publication_tier&&r.jsx(ge,{className:`${rfe[e.publication_tier]} text-xs`,children:e.publication_tier.toUpperCase()}),r.jsx(ge,{variant:"outline",className:"text-xs",children:e.article_format}),r.jsxs(ge,{variant:"outline",className:"text-xs",children:[e.word_count," words"]}),r.jsxs(ge,{variant:"outline",className:"text-xs",children:["v",e.version||1]})]}),r.jsx("h2",{className:"font-bold text-lg leading-tight",children:e.title}),e.standfirst&&r.jsx("p",{className:"text-sm text-muted-foreground mt-1 italic",children:e.standfirst})]}),r.jsxs("div",{className:"flex gap-2 shrink-0",children:[a&&r.jsx(K,{size:"sm",variant:"outline",onClick:()=>a(e),children:"Regenerate"}),s&&e.status!=="rejected"&&r.jsx(K,{size:"sm",variant:"destructive",onClick:()=>s(e.id),children:"Reject"}),n&&e.status==="draft"&&r.jsx(K,{size:"sm",onClick:()=>n(e.id),children:"Approve"})]})]}),r.jsx(oe,{children:r.jsxs(ce,{className:"pt-4 pb-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2 mb-3",children:[r.jsx(Ic,{label:"Readability",value:e.score_readability||0}),r.jsx(Ic,{label:"SEO",value:e.score_seo||0}),r.jsx(Ic,{label:"Originality",value:e.score_originality||0}),r.jsx(Ic,{label:"Luxury Relevance",value:e.score_luxury_relevance||0}),r.jsx(Ic,{label:"Brand Safety",value:e.score_brand_safety||0}),r.jsx(Ic,{label:"Editorial Quality",value:e.score_editorial_quality||0})]}),r.jsxs("div",{className:"flex items-center gap-3 pt-3 border-t border-border",children:[r.jsx("span",{className:"text-sm font-medium",children:"Overall"}),r.jsx("div",{className:"flex-1 h-3 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:`h-full rounded-full ${aV(e.score_overall||0)}`,style:{width:`${e.score_overall||0}%`}})}),r.jsx("span",{className:`text-xl font-bold font-mono ${sV(e.score_overall||0)}`,children:e.score_overall||0}),r.jsx("span",{className:"text-xs text-muted-foreground",children:"/100"})]})]})}),r.jsx("div",{className:"grid grid-cols-4 gap-2",children:[{label:"Traffic",value:e.traffic_potential},{label:"Search",value:e.search_potential},{label:"Engagement",value:e.engagement_potential},{label:"Commercial",value:e.commercial_value}].map(g=>{var y;return r.jsxs("div",{className:"text-center bg-muted/30 rounded-lg p-2",children:[r.jsx("div",{className:"text-xs text-muted-foreground mb-1",children:g.label}),r.jsx(ge,{className:`${tfe[g.value]||""} text-xs`,children:((y=g.value)==null?void 0:y.replace("_"," "))||"â"})]},g.label)})}),r.jsxs(Aa,{value:i,onValueChange:o,children:[r.jsxs(Ys,{className:"flex flex-wrap h-auto gap-1",children:[r.jsx(ft,{value:"article",className:"text-xs",children:"Article"}),r.jsx(ft,{value:"headlines",className:"text-xs",children:"Headlines"}),r.jsx(ft,{value:"seo",className:"text-xs",children:"SEO"}),r.jsx(ft,{value:"social",className:"text-xs",children:"Social"}),r.jsx(ft,{value:"entities",className:"text-xs",children:"Entities"}),r.jsx(ft,{value:"linking",className:"text-xs",children:"Linking"}),t&&r.jsx(ft,{value:"source",className:"text-xs",children:"Source"})]}),r.jsx(pt,{value:"article",className:"mt-3",children:r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[c.length>0&&r.jsxs("div",{className:"mb-4 p-3 border-l-4 border-primary bg-primary/5 rounded-r",children:[r.jsx(ja,{className:"w-4 h-4 text-primary mb-1"}),r.jsx("p",{className:"italic text-sm font-medium",children:c[0]})]}),r.jsx("div",{className:"prose prose-sm max-w-none text-sm leading-relaxed",dangerouslySetInnerHTML:{__html:e.content||""}})]})})}),r.jsxs(pt,{value:"headlines",className:"mt-3 space-y-3",children:[r.jsx(oe,{children:r.jsxs(ce,{className:"pt-4 space-y-3",children:[r.jsxs("div",{className:"flex items-start justify-between gap-2 p-2 bg-primary/5 rounded border border-primary/20",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-0.5",children:"Primary Headline"}),r.jsx("p",{className:"font-bold",children:e.title})]}),r.jsx(Dc,{text:e.title})]}),r.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Alternative Headlines (A/B Testing)"}),l.map((g,y)=>r.jsxs("div",{className:"flex items-center justify-between gap-2 p-2 border rounded",children:[r.jsx("p",{className:"text-sm",children:g}),r.jsx(Dc,{text:g})]},y))]})}),c.length>0&&r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2 pt-4",children:r.jsxs(ht,{className:"text-sm flex items-center gap-1.5",children:[r.jsx(ja,{className:"w-4 h-4"})," Pull Quotes"]})}),r.jsx(ce,{className:"space-y-2",children:c.map((g,y)=>r.jsxs("div",{className:"flex gap-2 p-2 bg-muted/30 rounded",children:[r.jsxs("p",{className:"text-sm italic flex-1",children:['"',g,'"']}),r.jsx(Dc,{text:g})]},y))})]}),u.length>0&&r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2 pt-4",children:r.jsxs(ht,{className:"text-sm flex items-center gap-1.5",children:[r.jsx(Xm,{className:"w-4 h-4"})," Image Captions"]})}),r.jsx(ce,{className:"space-y-2",children:u.map((g,y)=>r.jsxs("div",{className:"flex gap-2 p-2 border rounded",children:[r.jsx("p",{className:"text-xs flex-1",children:g}),r.jsx(Dc,{text:g})]},y))})]})]}),r.jsx(pt,{value:"seo",className:"mt-3 space-y-3",children:r.jsx(oe,{children:r.jsxs(ce,{className:"pt-4 space-y-3",children:[[{label:"SEO Title",value:e.seo_headline},{label:"Meta Description",value:e.seo_description},{label:"Excerpt",value:e.excerpt}].map(({label:g,value:y})=>r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsx("span",{className:"text-xs font-medium text-muted-foreground",children:g}),y&&r.jsxs(r.Fragment,{children:[r.jsxs("span",{className:"text-xs text-muted-foreground",children:[y.length," chars"]}),r.jsx(Dc,{text:y})]})]}),r.jsx("p",{className:"text-sm bg-muted/30 rounded p-2",children:y||"â"})]},g)),f.length>0&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Tags"}),r.jsx("div",{className:"flex flex-wrap gap-1.5",children:f.map((g,y)=>r.jsx(ge,{variant:"outline",className:"text-xs",children:g},y))})]})]})})}),r.jsx(pt,{value:"social",className:"mt-3 space-y-3",children:Object.entries(m).map(([g,y])=>r.jsx(oe,{children:r.jsxs(ce,{className:"pt-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("span",{className:"text-sm font-semibold capitalize",children:g}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("span",{className:"text-xs text-muted-foreground",children:[String(y).length," chars"]}),r.jsx(Dc,{text:y})]})]}),r.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:y})]})},g))}),r.jsx(pt,{value:"entities",className:"mt-3 space-y-3",children:r.jsx(oe,{children:r.jsxs(ce,{className:"pt-4 space-y-4",children:[v.length>0&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide mb-2",children:"Key Facts"}),r.jsx("ul",{className:"space-y-1",children:v.map((g,y)=>r.jsxs("li",{className:"text-sm flex gap-2",children:[r.jsx("span",{className:"text-muted-foreground shrink-0",children:"â¢"}),g]},y))})]}),[{label:"People",items:b.people},{label:"Brands",items:b.brands},{label:"Locations",items:b.locations},{label:"Dates",items:b.dates}].filter(g=>{var y;return((y=g.items)==null?void 0:y.length)>0}).map(g=>r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide mb-2",children:g.label}),r.jsx("div",{className:"flex flex-wrap gap-1.5",children:g.items.map((y,w)=>r.jsx(ge,{variant:"outline",className:"text-xs",children:y},w))})]},g.label))]})})}),r.jsx(pt,{value:"linking",className:"mt-3",children:r.jsx(oe,{children:r.jsxs(ce,{className:"pt-4 space-y-3",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:"Suggested internal linking opportunities"}),p.map((g,y)=>r.jsxs("div",{className:"flex items-start gap-3 p-2 border rounded",children:[r.jsx(XG,{className:"w-4 h-4 text-muted-foreground mt-0.5 shrink-0"}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium",children:g.anchor_text}),r.jsx("p",{className:"text-xs text-muted-foreground",children:g.suggested_topic})]})]},y)),p.length===0&&r.jsx("p",{className:"text-sm text-muted-foreground",children:"No suggestions available"})]})})}),t&&r.jsx(pt,{value:"source",className:"mt-3",children:r.jsx(oe,{children:r.jsxs(ce,{className:"pt-4 space-y-3",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Original Title"}),r.jsx("p",{className:"text-sm font-medium",children:t.original_title})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Source"}),r.jsx("p",{className:"text-sm",children:t.source_name})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:"Excerpt"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:t.original_excerpt})]}),r.jsx("a",{href:t.original_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary underline block",children:"View original source â"})]})})})]})]})}function Di(e,t){try{return JSON.parse(e||"null")??t}catch{return t}}const sfe=e=>e>=80?"text-green-600":e>=60?"text-amber-600":"text-red-600";function afe({storyId:e,currentArticleId:t,onSelectVersion:n}){const[s,a]=j.useState([]),[i,o]=j.useState(!1),[l,c]=j.useState(!1);j.useEffect(()=>{e&&l&&u()},[e,l]);const u=async()=>{o(!0);try{const m=await W.entities.GeneratedArticle.filter({discovered_story_id:e}
827,"-created_date",20);a(m||[])}finally{o(!1)}};return e?r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2 pt-3",children:r.jsxs("button",{onClick:()=>c(!l),className:"flex items-center justify-between w-full",children:[r.jsxs(ht,{className:"text-sm flex items-center gap-2",children:[r.jsx(t8,{className:"w-4 h-4"})," Version History"]}),l?r.jsx(Sa,{className:"w-4 h-4"}):r.jsx(Us,{className:"w-4 h-4"})]})}),l&&r.jsx(ce,{className:"pt-0 space-y-2",children:i?r.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading..."}):s.length===0?r.jsx("p",{className:"text-xs text-muted-foreground",children:"No versions found"}):s.map(m=>r.jsxs("button",{onClick:()=>n(m),className:`w-full text-left p-2 rounded border transition-colors hover:border-foreground/30 ${m.id===t?"border-foreground bg-foreground/5":"border-border"}`,children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("span",{className:"text-xs font-mono font-bold text-muted-foreground",children:["v",m.version||1]}),r.jsx("span",{className:"text-xs font-medium truncate max-w-48",children:m.article_format})]}),r.jsx("span",{className:`text-xs font-bold font-mono ${sfe(m.score_overall||0)}`,children:m.score_overall||0})]}),r.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[r.jsx(Vt,{className:"w-2.5 h-2.5 text-muted-foreground"}),r.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(m.created_date).toLocaleString("en-GB",{dateStyle:"short",timeStyle:"short"})}),r.jsx(ge,{variant:"outline",className:"text-xs px-1 py-0",children:m.status})]})]},m.id))})]}):null}function ife(){const[e,t]=j.useState("cms"),[n,s]=j.useState(null),[a,i]=j.useState(null),[o,l]=j.useState(null),[c,u]=j.useState(0),[m,f]=j.useState(null);j.useEffect(()=>{p()},[c]);const p=async()=>{try{const[N,S,A,k]=await Promise.all([W.entities.GeneratedArticle.filter({status:"draft"},"-created_date",200),W.entities.GeneratedArticle.filter({status:"approved"},"-created_date",200),W.entities.GeneratedArticle.filter({status:"published"},"-created_date",200),W.entities.GeneratedArticle.filter({status:"rejected"},"-created_date",200)]);l({drafts:(N==null?void 0:N.length)||0,approved:(S==null?void 0:S.length)||0,published:(A==null?void 0:A.length)||0,rejected:(k==null?void 0:k.length)||0})}catch{}},b=async N=>{if(s(N),N!=null&&N.discovered_story_id)try{const S=await W.entities.DiscoveredStory.get("DiscoveredStory",N.discovered_story_id);i(S||null)}catch{i(null)}},v=async N=>{await W.entities.GeneratedArticle.update(N,{status:"approved"}),s(S=>(S==null?void 0:S.id)===N?{...S,status:"approved"}:S),u(S=>S+1)},g=async N=>{const S=prompt("Rejection reason (optional):");await W.entities.GeneratedArticle.update(N,{status:"rejected",rejection_reason:S||"Manually rejected"}),s(A=>(A==null?void 0:A.id)===N?{...A,status:"rejected"}:A),u(A=>A+1)},y=N=>{f(N)},w=async N=>{var A;const S=n;if(S)try{const k=await W.entities.Article.create({title:S.title,excerpt:S.excerpt,content:S.content,category:S.category,author_name:"Chelsea Monthly Editorial Team",image_url:S.generated_image_url||null,published_date:new Date().toISOString(),read_time:`${Math.ceil((S.word_count||800)/200)} min read`,tag:ofe(S.tags,[])[0]||S.category||"Lifestyle",slug:(A=S.title)==null?void 0:A.toLowerCase().replace(/[^a-z0-9]+/g,"-").slice(0,80),seo_title:S.seo_headline,seo_description:S.seo_description,status:"published"});await W.entities.GeneratedArticle.update(N,{status:"published",article_id:k.id}),s(C=>(C==null?void 0:C.id)===N?{...C,status:"published",article_id:k.id}:C),u(C=>C+1),alert("Article published to the live site!")}catch(k){alert("Publish failed: "+k.message)}};return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background",children:r.jsxs("div",{className:"max-w-screen-2xl mx-auto px-6 py-6",children:[r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-background/40 text-xs uppercase tracking-widest mb-1",children:"Chelsea Monthly · Editorial Intelligence"}),r.jsx("h1",{className:"text-2xl font-serif mb-0.5",children:"Content Generation Engine"}),r.jsx("p",{className:"text-background/60 text-sm",children:"AI-powered article generation with Chelsea Monthly editorial voice"})]}),r.jsxs(K,{variant:"outline",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",onClick:()=>u(N=>N+1),children:[r.jsx(ts,{className:"w-4 h-4 mr-2"})," Refresh"]})]}),r.jsx("div",{className:"flex items-center gap-3 mt-4 text-xs text-background/60",children:[{step:"1",label:"Discover"},{step:"2",label:"Score"},{step:"3",label:"Extract Entities"},{step:"4",label:"Generate"},{step:"5",label:"Score Quality"},{step:"6",label:"Review"},{step:"7",label:"Publish"}].map((N,S)=>r.jsxs("span",{className:"flex items-center gap-2",children:[S>0&&r.jsx("span",{className:"text-background/30",children:"â"}),r.jsxs("span",{className:S===3?"text-primary font-semibold":"",children:[N.step,". ",N.label]})]},N.step))})]})}),r.jsx("div",{className:"bg-muted/20 border-b border-border/30",children:r.jsx("div",{className:"max-w-screen-2xl mx-auto px-6 py-4",children:r.jsx("div",{className:"grid grid-cols-4 gap-4",children:[{label:"In Draft",value:(o==null?void 0:o.drafts)??"â",color:"text-slate-700"},{label:"Approved",value:(o==null?void 0:o.approved)??"â",color:"text-green-700"},{label:"Published",value:(o==null?void 0:o.published)??"â",color:"text-emerald-700"},{label:"Rejected",value:(o==null?void 0:o.rejected)??"â",color:"text-red-700"}].map(N=>r.jsxs("div",{className:"bg-background rounded-lg border p-4 text-center",children:[r.jsx("div",{className:`text-2xl font-bold ${N.color}`,children:N.value}),r.jsx("div",{className:"text-xs text-muted-foreground mt-0.5",children:N.label})]},N.label))})})}),r.jsx("div",{className:"max-w-screen-2xl mx-auto px-6 py-6",children:r.jsxs(Aa,{value:e,onValueChange:t,children:[r.jsxs(Ys,{className:"mb-6",children:[r.jsxs(ft,{value:"cms",className:"gap-2",children:[r.jsx(Rn,{className:"w-4 h-4"})," Article CMS"]}),r.jsxs(ft,{value:"queue",className:"gap-2",children:[r.jsx(Kh,{className:"w-4 h-4"})," Generation Queue"]})]}),r.jsx(pt,{value:"cms",children:r.jsxs("div",{className:"grid grid-cols-12 gap-5",style:{minHeight:"75vh"},children:[r.jsx("div",{className:"col-span-3 border-r border-border pr-4",children:r.jsx(efe,{selectedId:n==null?void 0:n.id,onSelect:b,refreshKey:c})}),r.jsx("div",{className:"col-span-6 overflow-y-auto",children:n?r.jsx(nfe,{article:n,story:a,onApprove:v,onReject:g,onRegenerate:y}):r.jsx("div",{className:"flex items-center justify-center h-64 text-muted-foreground",children:r.jsxs("div",{className:"text-center",children:[r.jsx(n8,{className:"w-10 h-10 mx-auto mb-2 opacity-20"}),r.jsx("p",{className:"text-sm",children:"Select an article from the list to preview"})]})})}),r.jsx("div",{className:"col-span-3 border-l border-border pl-4 space-y-4",children:n&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:"Actions"}),n.status==="draft"&&r.jsx(K,{className:"w-full",size:"sm",onClick:()=>v(n.id),children:"Approve Article"}),n.status==="approved"&&r.jsx(K,{className:"w-full bg-green-600 hover:bg-green-700",size:"sm",onClick:()=>w(n.id),children:"Publish to Site"}),r.jsx(K,{variant:"outline",className:"w-full",size:"sm",onClick:()=>y(n),children:"Regenerate"}),n.status!=="rejected"&&r.jsx(K,{variant:"destructive",className:"w-full",size:"sm",onClick:()=>g(n.id),children:"Reject"})]}),r.jsx(afe,{storyId:n.discovered_story_id,currentArticleId:n.id,onSelectVersion:b}),n.image_prompt&&r.jsx(oe,{children:r.jsxs(ce,{className:"pt-3 pb-3",children:[r.jsx("p",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-2",children:"Image Prompt"}),r.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:n.image_prompt})]})})]})})]})}),r.jsx(pt,{value:"queue",children:r.jsx(Xme,{onArticleGenerated:()=>{u(N=>N+1),t("cms")}})})]})}),m&&r.jsx(nV,{story:{id:m.discovered_story_id,original_title:m.title,source_name:"Previous version",recommended_section:m.section},onClose:()=>f(null),onSuccess:()=>{f(null),u(N=>N+1)},regenerateFromId:m.id})]})}function ofe(e,t){try{return JSON.parse(e||"null")??t}catch{return t}}const Jp=e=>
827`£${Number(e||0).toLocaleString("en-GB",{minimumFractionDigits:0})}`;function lfe(){var o;const[e,t]=j.useState(null),[n,s]=j.useState(!0);j.useEffect(()=>{a()},[]);const a=async()=>{s(!0);try{const[l,c,u,m,f]=await Promise.all([W.entities.AdvertisingCampaign.list("-created_date",200),W.entities.Lead.list("-created_date",200),W.entities.Invoice.list("-created_date",200),W.entities.AdvertisingPlacement.list("-created_date",100),W.entities.Advertiser.list("-created_date",100)]),p=l.filter(w=>w.status==="active"),b=u.filter(w=>w.status==="paid").reduce((w,N)=>w+(N.total_amount||0),0),v=u.filter(w=>w.status==="outstanding"||w.status==="overdue").reduce((w,N)=>w+(N.total_amount||0),0),g=c.filter(w=>!["won","lost"].includes(w.status)).reduce((w,N)=>w+(N.estimated_budget||0),0),y=m.filter(w=>w.status==="booked").length;t({activeCampaigns:p.length,monthRevenue:b,outstanding:v,pipelineValue:g,totalLeads:c.length,newLeads:c.filter(w=>w.status==="new_lead").length,totalAdvertisers:f.filter(w=>w.status==="active").length,inventoryUtil:m.length?Math.round(y/m.length*100):0,upcomingRenewals:l.filter(w=>{const A=(new Date(w.end_date)-new Date)/(1e3*60*60*24);return A>=0&&A<=30}).length,topCampaigns:p.slice(0,5)})}catch(l){console.error(l)}finally{s(!1)}},i=[{label:"Commercial Dashboard",href:"/revenue/dashboard",icon:ya,desc:"Revenue, campaigns & KPIs"},{label:"Advertisers & CRM",href:"/revenue/advertisers",icon:vt,desc:"Manage advertisers & leads"},{label:"Campaigns",href:"/revenue/campaigns",icon:Ix,desc:"Active & upcoming campaigns"},{label:"Ad Inventory",href:"/revenue/inventory",icon:$x,desc:"Placements & availability"},{label:"Sponsored Content",href:"/revenue/sponsored",icon:Yd,desc:"Sponsored articles & posts"},{label:"Invoicing",href:"/revenue/invoicing",icon:$n,desc:"Invoices & payments"},{label:"Proposals",href:"/revenue/proposals",icon:Rn,desc:"Generate branded proposals"},{label:"Rate Card",href:"/revenue/rate-card",icon:rt,desc:"Packages & pricing"},{label:"Media Kit",href:"/revenue/media-kit",icon:Jt,desc:"Audience stats & kit editor"}];return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-8",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-1",children:"Chelsea Monthly"}),r.jsx("h1",{className:"text-3xl font-heading font-bold mb-1",children:"Revenue Centre"}),r.jsx("p",{className:"text-background/60 text-sm",children:"Commercial operating platform â advertising, sponsorship & media sales"})]}),r.jsxs(K,{variant:"outline",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",onClick:a,children:[r.jsx(ts,{className:"w-4 h-4 mr-2"})," Refresh"]})]})})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[n?r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8 animate-pulse",children:[...Array(8)].map((l,c)=>r.jsx("div",{className:"h-24 bg-muted rounded-lg"},c))}):r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[{label:"Monthly Revenue",value:Jp(e==null?void 0:e.monthRevenue),sub:"Paid invoices",color:"text-green-600",icon:Xr},{label:"Active Campaigns",value:e==null?void 0:e.activeCampaigns,sub:"Running now",color:"text-blue-600",icon:Ix},{label:"Outstanding",value:Jp(e==null?void 0:e.outstanding),sub:"Unpaid invoices",color:"text-amber-600",icon:$n},{label:"Pipeline Value",value:Jp(e==null?void 0:e.pipelineValue),sub:"Open leads",color:"text-purple-600",icon:$x},{label:"Active Advertisers",value:e==null?void 0:e.totalAdvertisers,sub:"Accounts",color:"text-foreground",icon:vt},{label:"New Leads",value:e==null?void 0:e.newLeads,sub:`${e==null?void 0:e.totalLeads} total`,color:"text-cyan-600",icon:rt},{label:"Inventory Utilisation",value:`${e==null?void 0:e.inventoryUtil}%`,sub:"Placements booked",color:"text-indigo-600",icon:ya},{label:"Upcoming Renewals",value:e==null?void 0:e.upcomingRenewals,sub:"Next 30 days",color:"text-rose-600",icon:Jt}].map(({label:l,value:c,sub:u,color:m,icon:f})=>r.jsx(oe,{children:r.jsx(ce,{className:"pt-5",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:l}),r.jsx("p",{className:`text-2xl font-bold ${m}`,children:c}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:u})]}),r.jsx(f,{className:`w-5 h-5 ${m} opacity-40`})]})})},l))}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 mb-8",children:i.map(({label:l,href:c,icon:u,desc:m})=>r.jsx(se,{to:c,children:r.jsx(oe,{className:"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer group h-full",children:r.jsx(ce,{className:"pt-6 pb-5",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center group-hover:bg-primary/20 transition-colors",children:r.jsx(u,{className:"w-5 h-5 text-primary"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold text-foreground text-sm",children:l}),r.jsx("p",{className:"text-xs text-muted-foreground",children:m})]})]}),r.jsx(_t,{className:"w-4 h-4 text-muted-foreground group-hover:text-primary transition-colors"})]})})})},c))}),((o=e==null?void 0:e.topCampaigns)==null?void 0:o.length)>0&&r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-3",children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(ht,{className:"text-base",children:"Active Campaigns"}),r.jsx(se,{to:"/revenue/campaigns",children:r.jsx(K,{variant:"ghost",size:"sm",children:"View all"})})]})}),r.jsx(ce,{children:r.jsx("div",{className:"space-y-2",children:e.topCampaigns.map(l=>r.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium",children:l.campaign_name}),r.jsx("p",{className:"text-xs text-muted-foreground",children:l.advertiser_name})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:"text-sm font-semibold text-green-700",children:Jp(l.revenue_generated)}),r.jsx(ge,{variant:"secondary",className:"text-xs",children:l.campaign_type})]})]},l.id))})})]})]})]})}var yj,O3;function Bn(){if(O3)return yj;O3=1;var e=Array.isArray;return yj=e,yj}var vj,M3;function iV(){if(M3)return vj;M3=1;var e=typeof Ep=="object"&&Ep&&Ep.Object===Object&&Ep;return vj=e,vj}var bj,R3;function Ta(){if(R3)return bj;R3=1;var e=iV(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return bj=n,bj}var jj,I3;function mf(){if(I3)return jj;I3=1;var e=Ta(),t=e.Symbol;return jj=t,jj}var wj,D3;function cfe(){if(D3)return wj;D3=1;var e=mf(),t=Object.prototype,n=t.hasOwnProperty,s=t.toString,a=e?e.toStringTag:void 0;function i(o){var l=n.call(o,a),c=o[a];try{o[a]=void 0;var u=!0}catch{}var m=s.call(o);return u&&(l?o[a]=c:delete o[a]),m}return wj=i,wj}var Nj,L3;function dfe(){if(L3)return Nj;L3=1;var e=Object.prototype,t=e.toString;function n(s){return t.call(s)}return Nj=n,Nj}var _j,$3;function hi(){if($3)return _j;$3=1;
vendor: 6,008 bytes, line 827
827var e=mf(),t=cfe(),n=dfe(),s="[object Null]",a="[object Undefined]",i=e?e.toStringTag:void 0;function o(l){return l==null?l===void 0?a:s:i&&i in Object(l)?t(l):n(l)}return _j=o,_j}var Sj,F3;function mi(){if(F3)return Sj;F3=1;function e(t){return t!=null&&typeof t=="object"}return Sj=e,Sj}var kj,B3;function iu(){if(B3)return kj;B3=1;var e=hi(),t=mi(),n="[object Symbol]";function s(a){return typeof a=="symbol"||t(a)&&e(a)==n}return kj=s,kj}var Cj,q3;function NC(){if(q3)return Cj;q3=1;var e=Bn(),t=iu(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function a(i,o){if(e(i))return!1;var l=typeof i;return l=="number"||l=="symbol"||l=="boolean"||i==null||t(i)?!0:s.test(i)||!n.test(i)||o!=null&&i in Object(o)}return Cj=a,Cj}var Aj,V3;function _o(){if(V3)return Aj;V3=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return Aj=e,Aj}var Tj,U3;function _C(){if(U3)return Tj;U3=1;var e=hi(),t=_o(),n="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",i="[object Proxy]";function o(l){if(!t(l))return!1;var c=e(l);return c==s||c==a||c==n||c==i}return Tj=o,Tj}var Ej,z3;function ufe(){if(z3)return Ej;z3=1;var e=Ta(),t=e["__core-js_shared__"];return Ej=t,Ej}var Pj,W3;function hfe(){if(W3)return Pj;W3=1;var e=ufe(),t=(function(){var s=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})();function n(s){return!!t&&t in s}return Pj=n,Pj}var Oj,H3;function oV(){if(H3)return Oj;H3=1;var e=Function.prototype,t=e.toString;function n(s){if(s!=null){try{return t.call(s)}catch{}try{return s+""}catch{}}return""}return Oj=n,Oj}var Mj,G3;function mfe(){if(G3)return Mj;G3=1;var e=_C(),t=hfe(),n=_o(),s=oV(),a=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,o=Function.prototype,l=Object.prototype,c=o.toString,u=l.hasOwnProperty,m=RegExp("^"+c.call(u).replace(a,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function f(p){if(!n(p)||t(p))return!1;var b=e(p)?m:i;return b.test(s(p))}return Mj=f,Mj}var Rj,K3;function ffe(){if(K3)return Rj;K3=1;function e(t,n){return t==null?void 0:t[n]}return Rj=e,Rj}var Ij,Y3;function ec(){if(Y3)return Ij;Y3=1;var e=mfe(),t=ffe();function n(s,a){var i=t(s,a);return e(i)?i:void 0}return Ij=n,Ij}var Dj,X3;function Hy(){if(X3)return Dj;X3=1;var e=ec(),t=e(Object,"create");return Dj=t,Dj}var Lj,J3;function pfe(){if(J3)return Lj;J3=1;var e=Hy();function t(){this.__data__=e?e(null):{},this.size=0}return Lj=t,Lj}var $j,Q3;function xfe(){if(Q3)return $j;Q3=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return $j=e,$j}var Fj,Z3;function gfe(){if(Z3)return Fj;Z3=1;var e=Hy(),t="__lodash_hash_undefined__",n=Object.prototype,s=n.hasOwnProperty;function a(i){var o=this.__data__;if(e){var l=o[i];return l===t?void 0:l}return s.call(o,i)?o[i]:void 0}return Fj=a,Fj}var Bj,e5;function yfe(){if(e5)return Bj;e5=1;var e=Hy(),t=Object.prototype,n=t.hasOwnProperty;function s(a){var i=this.__data__;return e?i[a]!==void 0:n.call(i,a)}return Bj=s,Bj}var qj,t5;function vfe(){if(t5)return qj;t5=1;var e=Hy(),t="__lodash_hash_undefined__";function n(s,a){var i=this.__data__;return this.size+=this.has(s)?0:1,i[s]=e&&a===void 0?t:a,this}return qj=n,qj}var Vj,r5;function bfe(){if(r5)return Vj;r5=1;var e=pfe(),t=xfe(),n=gfe(),s=yfe(),a=vfe();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=s,i.prototype.set=a,Vj=i,Vj}var Uj,n5;function jfe(){if(n5)return Uj;n5=1;function e(){this.__data__=[],this.size=0}return Uj=e,Uj}var zj,s5;function SC(){if(s5)return zj;s5=1;function e(t,n){return t===n||t!==t&&n!==n}return zj=e,zj}var Wj,a5;function Gy(){if(a5)return Wj;a5=1;var e=SC();function t(n,s){for(var a=n.length;a--;)if(e(n[a][0],s))return a;return-1}return Wj=t,Wj}var Hj,i5;function wfe(){if(i5)return Hj;i5=1;var e=Gy(),t=Array.prototype,n=t.splice;function s(a){var i=this.__data__,o=e(i,a);if(o<0)return!1;var l=i.length-1;return o==l?i.pop():n.call(i,o,1),--this.size,!0}return Hj=s,Hj}var Gj,o5;function Nfe(){if(o5)return Gj;o5=1;var e=Gy();function t(n){var s=this.__data__,a=e(s,n);return a<0?void 0:s[a][1]}return Gj=t,Gj}var Kj,l5;function _fe(){if(l5)return Kj;l5=1;var e=Gy();function t(n){return e(this.__data__,n)>-1}return Kj=t,Kj}var Yj,c5;function Sfe(){if(c5)return Yj;c5=1;var e=Gy();function t(n,s){var a=this.__data__,i=e(a,n);return i<0?(++this.size,a.push([n,s])):a[i][1]=s,this}return Yj=t,Yj}var Xj,d5;function Ky(){if(d5)return Xj;d5=1;var e=jfe(),t=wfe(),n=Nfe(),s=_fe(),a=Sfe();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=s,i.prototype.set=a,Xj=i,Xj}var Jj,u5;function kC(){if(u5)return Jj;u5=1;var e=ec(),t=Ta(),n=e(t,"Map");return Jj=n,Jj}var Qj,h5;function kfe(){if(h5)return Qj;h5=1;var e=bfe(),t=Ky(),n=kC();function s(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Qj=s,Qj}var Zj,m5;function Cfe(){if(m5)return Zj;m5=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Zj=e,Zj}var ew,f5;function Yy(){if(f5)return ew;f5=1;var e=Cfe();function t(n,s){var a=n.__data__;return e(s)?a[typeof s=="string"?"string":"hash"]:a.map}return ew=t,ew}var tw,p5;function Afe(){if(p5)return tw;p5=1;var e=Yy();function t(n){var s=e(this,n).delete(n);return this.size-=s?1:0,s}return tw=t,tw}var rw,x5;function Tfe(){if(x5)return rw;x5=1;var e=Yy();function t(n){return e(this,n).get(n)}return rw=t,rw}var nw,g5;function Efe(){if(g5)return nw;g5=1;var e=Yy();function t(n){return e(this,n).has(n)}return nw=t,nw}var sw,y5;function Pfe(){if(y5)return sw;y5=1;var e=Yy();function t(n,s){var a=e(this,n),i=a.size;return a.set(n,s),this.size+=a.size==i?0:1,this}return sw=t,sw}var aw,v5;function CC(){if(v5)return aw;v5=1;
vendor: 11,091 bytes, lines 827-835
827var e=kfe(),t=Afe(),n=Tfe(),s=Efe(),a=Pfe();function i(o){var l=-1,c=o==null?0:o.length;for(this.clear();++l<c;){var u=o[l];this.set(u[0],u[1])}}return i.prototype.clear=e,i.prototype.delete=t,i.prototype.get=n,i.prototype.has=s,i.prototype.set=a,aw=i,aw}var iw,b5;function lV(){if(b5)return iw;b5=1;var e=CC(),t="Expected a function";function n(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new TypeError(t);var i=function(){var o=arguments,l=a?a.apply(this,o):o[0],c=i.cache;if(c.has(l))return c.get(l);var u=s.apply(this,o);return i.cache=c.set(l,u)||c,u};return i.cache=new(n.Cache||e),i}return n.Cache=e,iw=n,iw}var ow,j5;function Ofe(){if(j5)return ow;j5=1;var e=lV(),t=500;function n(s){var a=e(s,function(o){return i.size===t&&i.clear(),o}),i=a.cache;return a}return ow=n,ow}var lw,w5;function Mfe(){if(w5)return lw;w5=1;var e=Ofe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,s=e(function(a){var i=[];return a.charCodeAt(0)===46&&i.push(""),a.replace(t,function(o,l,c,u){i.push(c?u.replace(n,"$1"):l||o)}),i});return lw=s,lw}var cw,N5;function AC(){if(N5)return cw;N5=1;function e(t,n){for(var s=-1,a=t==null?0:t.length,i=Array(a);++s<a;)i[s]=n(t[s],s,t);return i}return cw=e,cw}var dw,_5;function Rfe(){if(_5)return dw;_5=1;var e=mf(),t=AC(),n=Bn(),s=iu(),a=e?e.prototype:void 0,i=a?a.toString:void 0;function o(l){if(typeof l=="string")return l;if(n(l))return t(l,o)+"";if(s(l))return i?i.call(l):"";var c=l+"";return c=="0"&&1/l==-1/0?"-0":c}return dw=o,dw}var uw,S5;function cV(){if(S5)return uw;S5=1;var e=Rfe();function t(n){return n==null?"":e(n)}return uw=t,uw}var hw,k5;function dV(){if(k5)return hw;k5=1;var e=Bn(),t=NC(),n=Mfe(),s=cV();function a(i,o){return e(i)?i:t(i,o)?[i]:n(s(i))}return hw=a,hw}var mw,C5;function Xy(){if(C5)return mw;C5=1;var e=iu();function t(n){if(typeof n=="string"||e(n))return n;var s=n+"";return s=="0"&&1/n==-1/0?"-0":s}return mw=t,mw}var fw,A5;function TC(){if(A5)return fw;A5=1;var e=dV(),t=Xy();function n(s,a){a=e(a,s);for(var i=0,o=a.length;s!=null&&i<o;)s=s[t(a[i++])];return i&&i==o?s:void 0}return fw=n,fw}var pw,T5;function uV(){if(T5)return pw;T5=1;var e=TC();function t(n,s,a){var i=n==null?void 0:e(n,s);return i===void 0?a:i}return pw=t,pw}var Ife=uV();const Qn=Et(Ife);var xw,E5;function Dfe(){if(E5)return xw;E5=1;function e(t){return t==null}return xw=e,xw}var Lfe=Dfe();const yt=Et(Lfe);var gw,P5;function $fe(){if(P5)return gw;P5=1;var e=hi(),t=Bn(),n=mi(),s="[object String]";function a(i){return typeof i=="string"||!t(i)&&n(i)&&e(i)==s}return gw=a,gw}var Ffe=$fe();const $l=Et(Ffe);var Bfe=_C();const at=Et(Bfe);var qfe=_o();const ou=Et(qfe);var yw={exports:{}},Pt={};/** 828 * @license React 829 * react-is.production.min.js 830 * 831 * Copyright (c) Facebook, Inc. and its affiliates. 832 * 833 * This source code is licensed under the MIT license found in the 834 * LICENSE file in the root directory of this source tree. 835 */var O5;function Vfe(){if(O5)return Pt;O5=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),m=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen"),v;v=Symbol.for("react.module.reference");function g(y){if(typeof y=="object"&&y!==null){var w=y.$$typeof;switch(w){case e:switch(y=y.type,y){case n:case a:case s:case u:case m:return y;default:switch(y=y&&y.$$typeof,y){case l:case o:case c:case p:case f:case i:return y;default:return w}}case t:return w}}}return Pt.ContextConsumer=o,Pt.ContextProvider=i,Pt.Element=e,Pt.ForwardRef=c,Pt.Fragment=n,Pt.Lazy=p,Pt.Memo=f,Pt.Portal=t,Pt.Profiler=a,Pt.StrictMode=s,Pt.Suspense=u,Pt.SuspenseList=m,Pt.isAsyncMode=function(){return!1},Pt.isConcurrentMode=function(){return!1},Pt.isContextConsumer=function(y){return g(y)===o},Pt.isContextProvider=function(y){return g(y)===i},Pt.isElement=function(y){return typeof y=="object"&&y!==null&&y.$$typeof===e},Pt.isForwardRef=function(y){return g(y)===c},Pt.isFragment=function(y){return g(y)===n},Pt.isLazy=function(y){return g(y)===p},Pt.isMemo=function(y){return g(y)===f},Pt.isPortal=function(y){return g(y)===t},Pt.isProfiler=function(y){return g(y)===a},Pt.isStrictMode=function(y){return g(y)===s},Pt.isSuspense=function(y){return g(y)===u},Pt.isSuspenseList=function(y){return g(y)===m},Pt.isValidElementType=function(y){return typeof y=="string"||typeof y=="function"||y===n||y===a||y===s||y===u||y===m||y===b||typeof y=="object"&&y!==null&&(y.$$typeof===p||y.$$typeof===f||y.$$typeof===i||y.$$typeof===o||y.$$typeof===c||y.$$typeof===v||y.getModuleId!==void 0)},Pt.typeOf=g,Pt}var M5;function Ufe(){return M5||(M5=1,yw.exports=Vfe()),yw.exports}var zfe=Ufe(),vw,R5;function hV(){if(R5)return vw;R5=1;var e=hi(),t=mi(),n="[object Number]";function s(a){return typeof a=="number"||t(a)&&e(a)==n}return vw=s,vw}var bw,I5;function Wfe(){if(I5)return bw;I5=1;var e=hV();function t(n){return e(n)&&n!=+n}return bw=t,bw}var Hfe=Wfe();const ff=Et(Hfe);var Gfe=hV();const Kfe=Et(Gfe);var gn=function(t){return t===0?0:t>0?1:-1},cl=function(t){return $l(t)&&t.indexOf("%")===t.length-1},Te=function(t){return Kfe(t)&&!ff(t)},Yfe=function(t){return yt(t)},Mr=function(t){return Te(t)||$l(t)},Xfe=0,pf=function(t){var n=++Xfe;return"".concat(t||"").concat(n)},yn=function(t,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Te(t)&&!$l(t))return s;var i;if(cl(t)){var o=t.indexOf("%");i=n*parseFloat(t.slice(0,o))/100}else i=+t;return ff(i)&&(i=s),a&&i>n&&(i=n),i},Wi=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},Jfe=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,s={},a=0;a<n;a++)if(!s[t[a]])s[t[a]]=!0;else return!0;return!1},Ui=function(t,n){return Te(t)&&Te(n)?function(s){return t+s*(n-t)}:function(){return n}};function MS(e,t,n){return!e||!e.length?null:e.find(function(s){return s&&(typeof t=="function"?t(s):Qn(s,t))===n})}var Qfe=function(t,n){return Te(t)&&Te(n)?t-n:$l(t)&&$l(n)?t.localeCompare(n):t instanceof Date&&n instanceof Date?t.getTime()-n.getTime():String(t).localeCompare(String(n))};function td(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var s in t)if({}.hasOwnProperty.call(t,s)&&!{}.hasOwnProperty.call(e,s))return!1;return!0}function RS(e){"@babel/helpers - typeof";return RS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},RS(e)}var Zfe=["viewBox","children"],epe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],D5=["points","pathLength"],jw={svg:Zfe,polygon:D5,polyline:D5},EC=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onF
835ocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"],dg=function(t,n){if(!t||typeof t=="function"||typeof t=="boolean")return null;var s=t;if(j.isValidElement(t)&&(s=t.props),!ou(s))return null;var a={};return Object.keys(s).forEach(function(i){EC.includes(i)&&(a[i]=n||function(o){return s[i](s,o)})}),a},tpe=function(t,n,s){return function(a){return t(n,s,a),null}},Fl=function(t,n,s){if(!ou(t)||RS(t)!=="object")return null;var a=null;return Object.keys(t).forEach(function(i){var o=t[i];EC.includes(i)&&typeof o=="function"&&(a||(a={}),a[i]=tpe(o,n,s))}),a},rpe=["children"],npe=["children"];function L5(e,t){if(e==null)return{};var n=spe(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function spe(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}var $5={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},ti=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},F5=null,ww=null,PC=function e(t){if(t===F5&&Array.isArray(ww))return ww;var n=[];return j.Children.forEach(t,function(s){yt(s)||(zfe.isFragment(s)?n=n.concat(e(s.props.children)):n.push(s))}),ww=n,F5=t,n};function vs(e,t){var n=[],s=[];return Array.isArray(t)?s=t.map(function(a){return ti(a)}):s=[ti(t)],PC(e).forEach(function(a){var i=Qn(a,"type.displayName")||Qn(a,"type.n
835ame");s.indexOf(i)!==-1&&n.push(a)}),n}function Gn(e,t){var n=vs(e,t);return n&&n[0]}var B5=function(t){if(!t||!t.props)return!1;var n=t.props,s=n.width,a=n.height;return!(!Te(s)||s<=0||!Te(a)||a<=0)},ape=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],ipe=function(t){return t&&t.type&&$l(t.type)&&ape.indexOf(t.type)>=0},ope=function(t,n,s,a){var i,o=(i=jw==null?void 0:jw[a])!==null&&i!==void 0?i:[];return n.startsWith("data-")||!at(t)&&(a&&o.includes(n)||epe.includes(n))||s&&EC.includes(n)},nt=function(t,n,s){if(!t||typeof t=="function"||typeof t=="boolean")return null;var a=t;if(j.isValidElement(t)&&(a=t.props),!ou(a))return null;var i={};return Object.keys(a).forEach(function(o){var l;ope((l=a)===null||l===void 0?void 0:l[o],o,n,s)&&(i[o]=a[o])}),i},IS=function e(t,n){if(t===n)return!0;var s=j.Children.count(t);if(s!==j.Children.count(n))return!1;if(s===0)return!0;if(s===1)return q5(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var a=0;a<s;a++){var i=t[a],o=n[a];if(Array.isArray(i)||Array.isArray(o)){if(!e(i,o))return!1}else if(!q5(i,o))return!1}return!0},q5=function(t,n){if(yt(t)&&yt(n))return!0;if(!yt(t)&&!yt(n)){var s=t.props||{},a=s.children,i=L5(s,rpe),o=n.props||{},l=o.children,c=L5(o,npe);return a&&l?td(i,c)&&IS(a,l):!a&&!l?td(i,c):!1}return!1},V5=function(t,n){var s=[],a={};return PC(t).forEach(function(i,o){if(ipe(i))s.push(i);else if(i){var l=ti(i.type),c=n[l]||{},u=c.handler,m=c.once;if(u&&(!m||!a[l])){var f=u(i,l,o);s.push(f),a[l]=!0}}}),s},lpe=function(t){var n=t&&t.type;return n&&$5[n]?$5[n]:null},cpe=function(t,n){return PC(n).indexOf(t)},dpe=["children","width","height","viewBox","className","style","title","desc"];function DS(){return DS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},DS.apply(this,arguments)}function upe(e,t){if(e==null)return{};var n=hpe(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function hpe(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function LS(e){var t=e.children,n=e.width,s=e.height,a=e.viewBox,i=e.className,o=e.style,l=e.title,c=e.desc,u=upe(e,dpe),m=a||{width:n,height:s,x:0,y:0},f=ct("recharts-surface",i);return X.createElement("svg",DS({},nt(u,!0,"svg"),{className:f,width:n,height:s,style:o,viewBox:"".concat(m.x," ").concat(m.y," ").concat(m.width," ").concat(m.height)}),X.createElement("title",null,l),X.createElement("desc",null,c),t)}var mpe=["children","className"];function $S(){return $S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},$S.apply(this,arguments)}function fpe(e,t){if(e==null)return{};var n=ppe(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function ppe(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}var Dt=X.forwardRef(function(e,t){var n=e.children,s=e.className,a=fpe(e,mpe),i=ct("recharts-layer",s);return X.createElement("g",$S({className:i},nt(a,!0),{ref:t}),n)}),Vs=function(t,n){for(var s=arguments.length,a=new Array(s>2?s-2:0),i=2;i<s;i++)a[i-2]=arguments[i]},Nw,U5;function xpe(){if(U5)return Nw;U5=1;function e(t,n,s){var a=-1,i=t.length;n<0&&(n=-n>i?0:i+n),s=s>i?i:s,s<0&&(s+=i),i=n>s?0:s-n>>>0,n>>>=0;for(var o=Array(i);++a<i;)o[a]=t[a+n];return o}
835return Nw=e,Nw}var _w,z5;function gpe(){if(z5)return _w;z5=1;var e=xpe();function t(n,s,a){var i=n.length;return a=a===void 0?i:a,!s&&a>=i?n:e(n,s,a)}return _w=t,_w}var Sw,W5;function mV(){if(W5)return Sw;W5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",a=t+n+s,i="\\ufe0e\\ufe0f",o="\\u200d",l=RegExp("["+o+e+a+i+"]");function c(u){return l.test(u)}return Sw=c,Sw}var kw,H5;function ype(){if(H5)return kw;H5=1;function e(t){return t.split("")}return kw=e,kw}var Cw,G5;function vpe(){if(G5)return Cw;G5=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",a=t+n+s,i="\\ufe0e\\ufe0f",o="["+e+"]",l="["+a+"]",c="\\ud83c[\\udffb-\\udfff]",u="(?:"+l+"|"+c+")",m="[^"+e+"]",f="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",b="\\u200d",v=u+"?",g="["+i+"]?",y="(?:"+b+"(?:"+[m,f,p].join("|")+")"+g+v+")*",w=g+v+y,N="(?:"+[m+l+"?",l,f,p,o].join("|")+")",S=RegExp(c+"(?="+c+")|"+N+w,"g");function A(k){return k.match(S)||[]}return Cw=A,Cw}var Aw,K5;function bpe(){if(K5)return Aw;K5=1;var e=ype(),t=mV(),n=vpe();function s(a){return t(a)?n(a):e(a)}return Aw=s,Aw}var Tw,Y5;function jpe(){if(Y5)return Tw;Y5=1;var e=gpe(),t=mV(),n=bpe(),s=cV();function a(i){return function(o){o=s(o);var l=t(o)?n(o):void 0,c=l?l[0]:o.charAt(0),u=l?e(l,1).join(""):o.slice(1);return c[i]()+u}}return Tw=a,Tw}var Ew,X5;function wpe(){if(X5)return Ew;X5=1;var e=jpe(),t=e("toUpperCase");return Ew=t,Ew}var Npe=wpe();const Jy=Et(Npe);function Ht(e){return function(){return e}}const fV=Math.cos,ug=Math.sin,Xs=Math.sqrt,hg=Math.PI,Qy=2*hg,FS=Math.PI,BS=2*FS,nl=1e-6,_pe=BS-nl;function pV(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Spe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return pV;const n=10**t;return function(s){this._+=s[0];for(let a=1,i=s.length;a<i;++a)this._+=Math.round(arguments[a]*n)/n+s[a]}}class kpe{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?pV:Spe(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,s,a){this._append`Q${+t},${+n},${this._x1=+s},${this._y1=+a}`}bezierCurveTo(t,n,s,a,i,o){this._append`C${+t},${+n},${+s},${+a},${this._x1=+i},${this._y1=+o}`}arcTo(t,n,s,a,i){if(t=+t,n=+n,s=+s,a=+a,i=+i,i<0)throw new Error(`negative radius: ${i}`);let o=this._x1,l=this._y1,c=s-t,u=a-n,m=o-t,f=l-n,p=m*m+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(p>nl)if(!(Math.abs(f*c-u*m)>nl)||!i)this._append`L${this._x1=t},${this._y1=n}`;else{let b=s-o,v=a-l,g=c*c+u*u,y=b*b+v*v,w=Math.sqrt(g),N=Math.sqrt(p),S=i*Math.tan((FS-Math.acos((g+p-y)/(2*w*N)))/2),A=S/N,k=S/w;Math.abs(A-1)>nl&&this._append`L${t+A*m},${n+A*f}`,this._append`A${i},${i},0,0,${+(f*b>m*v)},${this._x1=t+k*c},${this._y1=n+k*u}`}}arc(t,n,s,a,i,o){if(t=+t,n=+n,s=+s,o=!!o,s<0)throw new Error(`negative radius: ${s}`);let l=s*Math.cos(a),c=s*Math.sin(a),u=t+l,m=n+c,f=1^o,p=o?a-i:i-a;this._x1===null?this._append`M${u},${m}`:(Math.abs(this._x1-u)>nl||Math.abs(this._y1-m)>nl)&&this._append`L${u},${m}`,s&&(p<0&&(p=p%BS+BS),p>_pe?this._append`A${s},${s},0,1,${f},${t-l},${n-c}A${s},${s},0,1,${f},${this._x1=u},${this._y1=m}`:p>nl&&this._append`A${s},${s},0,${+(p>=FS)},${f},${this._x1=t+s*Math.cos(i)},${this._y1=n+s*Math.sin(i)}`)}rect(t,n,s,a){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${s=+s}v${+a}h${-s}Z`}toString(){return this._}}function OC(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const s=Math.floor(n);if(!(s>=0))throw new RangeError(`invalid digits: ${n}`);t=s}return e},()=>new kpe(t)}function MC(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xV(e){this._context=e}xV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Zy(e){return new xV(e)}function gV(e){return e[0]}function yV(e){return e[1]}function vV(e,t){var n=Ht(!0),s=null,a=Zy,i=null,o=OC(l);e=typeof e=="function"?e:e===void 0?gV:Ht(e),t=typeof t=="function"?t:t===void 0?yV:Ht(t);function l(c){var u,m=(c=MC(c)).length,f,p=!1,b;for(s==null&&(i=a(b=o())),u=0;u<=m;++u)!(u<m&&n(f=c[u],u,c))===p&&((p=!p)?i.lineStart():i.lineEnd()),p&&i.point(+e(f,u,c),+t(f,u,c));if(b)return i=null,b+""||null}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:Ht(+c),l):e},l.y=function(c){return arguments.length?(t=typeof c=="function"?c:Ht(+c),l):t},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Ht(!!c),l):n},l.curve=function(c){return arguments.length?(a=c,s!=null&&(i=a(s)),l):a},l.context=function(c){return arguments.length?(c==null?s=i=null:i=a(s=c),l):s},l}function Qp(e,t,n){var s=null,a=Ht(!0),i=null,o=Zy,l=null,c=OC(u);e=typeof e=="function"?e:e===void 0?gV:Ht(+e),t=typeof t=="function"?t:Ht(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?yV:Ht(+n);function u(f){var p,b,v,g=(f=MC(f)).length,y,w=!1,N,S=new Array(g),A=new Array(g);for(i==null&&(l=o(N=c())),p=0;p<=g;++p){if(!(p<g&&a(y=f[p],p,f))===w)if(w=!w)b=p,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),v=p-1;v>=b;--v)l.point(S[v],A[v]);l.lineEnd(),l.areaEnd()}w&&(S[p]=+e(y,p,f),A[p]=+t(y,p,f),l.point(s?+s(y,p,f):S[p],n?+n(y,p,f):A[p]))}if(N)return l=null,N+""||null}function m(){return vV().defined(a).curve(o).context(i)}return u.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ht(+f),s=null,u):e},u.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ht(+f),u):e},u.x1=function(f){return arguments.length?(s=f==null?null:typeof f=="function"?f:Ht(+f),u):s},u.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ht(+f),n=null,u):t},u.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ht(+f),u):t},u.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ht(+f),u):n},u.lineX0=u.lineY0=function(){return m().x(e).y(t)},u.lineY1=function(){return m().x(e).y(n)},u.lineX1=function(){return m().x(s).y(t)},u.defined=function(f){return arguments.length?(a=typeof f=="function"?f:Ht(!!f),u):a},u.curve=function(f){return arguments.length?(o=f,i!=null&&(l=o(i)),u):o},u.context=function(f){return arguments.length?(f==null?i=l=null:l=o(i=f),u):i},u}class bV{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}
vendor: 8,443 bytes, line 835
835point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Cpe(e){return new bV(e,!0)}function Ape(e){return new bV(e,!1)}const RC={draw(e,t){const n=Xs(t/hg);e.moveTo(n,0),e.arc(0,0,n,0,Qy)}},Tpe={draw(e,t){const n=Xs(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},jV=Xs(1/3),Epe=jV*2,Ppe={draw(e,t){const n=Xs(t/Epe),s=n*jV;e.moveTo(0,-n),e.lineTo(s,0),e.lineTo(0,n),e.lineTo(-s,0),e.closePath()}},Ope={draw(e,t){const n=Xs(t),s=-n/2;e.rect(s,s,n,n)}},Mpe=.8908130915292852,wV=ug(hg/10)/ug(7*hg/10),Rpe=ug(Qy/10)*wV,Ipe=-fV(Qy/10)*wV,Dpe={draw(e,t){const n=Xs(t*Mpe),s=Rpe*n,a=Ipe*n;e.moveTo(0,-n),e.lineTo(s,a);for(let i=1;i<5;++i){const o=Qy*i/5,l=fV(o),c=ug(o);e.lineTo(c*n,-l*n),e.lineTo(l*s-c*a,c*s+l*a)}e.closePath()}},Pw=Xs(3),Lpe={draw(e,t){const n=-Xs(t/(Pw*3));e.moveTo(0,n*2),e.lineTo(-Pw*n,-n),e.lineTo(Pw*n,-n),e.closePath()}},ds=-.5,us=Xs(3)/2,qS=1/Xs(12),$pe=(qS/2+1)*3,Fpe={draw(e,t){const n=Xs(t/$pe),s=n/2,a=n*qS,i=s,o=n*qS+n,l=-i,c=o;e.moveTo(s,a),e.lineTo(i,o),e.lineTo(l,c),e.lineTo(ds*s-us*a,us*s+ds*a),e.lineTo(ds*i-us*o,us*i+ds*o),e.lineTo(ds*l-us*c,us*l+ds*c),e.lineTo(ds*s+us*a,ds*a-us*s),e.lineTo(ds*i+us*o,ds*o-us*i),e.lineTo(ds*l+us*c,ds*c-us*l),e.closePath()}};function Bpe(e,t){let n=null,s=OC(a);e=typeof e=="function"?e:Ht(e||RC),t=typeof t=="function"?t:Ht(t===void 0?64:+t);function a(){let i;if(n||(n=i=s()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return a.type=function(i){return arguments.length?(e=typeof i=="function"?i:Ht(i),a):e},a.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ht(+i),a):t},a.context=function(i){return arguments.length?(n=i??null,a):n},a}function mg(){}function fg(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function NV(e){this._context=e}NV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:fg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function qpe(e){return new NV(e)}function _V(e){this._context=e}_V.prototype={areaStart:mg,areaEnd:mg,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:fg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Vpe(e){return new _V(e)}function SV(e){this._context=e}SV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,s=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,s):this._context.moveTo(n,s);break;case 3:this._point=4;default:fg(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Upe(e){return new SV(e)}function kV(e){this._context=e}kV.prototype={areaStart:mg,areaEnd:mg,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function zpe(e){return new kV(e)}function J5(e){return e<0?-1:1}function Q5(e,t,n){var s=e._x1-e._x0,a=t-e._x1,i=(e._y1-e._y0)/(s||a<0&&-0),o=(n-e._y1)/(a||s<0&&-0),l=(i*a+o*s)/(s+a);return(J5(i)+J5(o))*Math.min(Math.abs(i),Math.abs(o),.5*Math.abs(l))||0}function Z5(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Ow(e,t,n){var s=e._x0,a=e._y0,i=e._x1,o=e._y1,l=(i-s)/3;e._context.bezierCurveTo(s+l,a+l*t,i-l,o-l*n,i,o)}function pg(e){this._context=e}pg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ow(this,this._t0,Z5(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Ow(this,Z5(this,n=Q5(this,e,t)),n);break;default:Ow(this,this._t0,n=Q5(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function CV(e){this._context=new AV(e)}(CV.prototype=Object.create(pg.prototype)).point=function(e,t){pg.prototype.point.call(this,t,e)};function AV(e){this._context=e}AV.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,s,a,i){this._context.bezierCurveTo(t,e,s,n,i,a)}};function Wpe(e){return new pg(e)}function Hpe(e){return new CV(e)}function TV(e){this._context=e}TV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var s=eM(e),a=eM(t),i=0,o=1;o<n;++i,++o)this._context.bezierCurveTo(s[0][i],a[0][i],s[1][i],a[1][i],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function eM(e){var t,n=e.length-1,s,a=new Array(n),i=new Array(n),o=new Array(n);for(a[0]=0,i[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)a[t]=1,i[t]=4,o[t]=4*e[t]+2*e[t+1];for(a[n-1]=2,i[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)s=a[t]/i[t-1],i[t]-=s,o[t]-=s*o[t-1];for(a[n-1]=o[n-1]/i[n-1],t=n-2;t>=0;--t)a[t]=(o[t]-a[t+1])/i[t];for(i[n-1]=(e[n]+a[n-1])/2,t=0;t<n-1;++t)i[t]=2*e[t+1]-a[t+1];return[a,i]}function Gpe(e){return new TV(e)}function ev(e,t){this._context=e,this._t=t}ev.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;
vendor: 18,722 bytes, lines 835-838
835default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function Kpe(e){return new ev(e,.5)}function Ype(e){return new ev(e,0)}function Xpe(e){return new ev(e,1)}function Sd(e,t){if((o=e.length)>1)for(var n=1,s,a,i=e[t[0]],o,l=i.length;n<o;++n)for(a=i,i=e[t[n]],s=0;s<l;++s)i[s][1]+=i[s][0]=isNaN(a[s][1])?a[s][0]:a[s][1]}function VS(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function Jpe(e,t){return e[t]}function Qpe(e){const t=[];return t.key=e,t}function Zpe(){var e=Ht([]),t=VS,n=Sd,s=Jpe;function a(i){var o=Array.from(e.apply(this,arguments),Qpe),l,c=o.length,u=-1,m;for(const f of i)for(l=0,++u;l<c;++l)(o[l][u]=[0,+s(f,o[l].key,u,i)]).data=f;for(l=0,m=MC(t(o));l<c;++l)o[m[l]].index=l;return n(o,m),o}return a.keys=function(i){return arguments.length?(e=typeof i=="function"?i:Ht(Array.from(i)),a):e},a.value=function(i){return arguments.length?(s=typeof i=="function"?i:Ht(+i),a):s},a.order=function(i){return arguments.length?(t=i==null?VS:typeof i=="function"?i:Ht(Array.from(i)),a):t},a.offset=function(i){return arguments.length?(n=i??Sd,a):n},a}function exe(e,t){if((s=e.length)>0){for(var n,s,a=0,i=e[0].length,o;a<i;++a){for(o=n=0;n<s;++n)o+=e[n][a][1]||0;if(o)for(n=0;n<s;++n)e[n][a][1]/=o}Sd(e,t)}}function txe(e,t){if((a=e.length)>0){for(var n=0,s=e[t[0]],a,i=s.length;n<i;++n){for(var o=0,l=0;o<a;++o)l+=e[o][n][1]||0;s[n][1]+=s[n][0]=-l/2}Sd(e,t)}}function rxe(e,t){if(!(!((o=e.length)>0)||!((i=(a=e[t[0]]).length)>0))){for(var n=0,s=1,a,i,o;s<i;++s){for(var l=0,c=0,u=0;l<o;++l){for(var m=e[t[l]],f=m[s][1]||0,p=m[s-1][1]||0,b=(f-p)/2,v=0;v<l;++v){var g=e[t[v]],y=g[s][1]||0,w=g[s-1][1]||0;b+=y-w}c+=f,u+=b*f}a[s-1][1]+=a[s-1][0]=n,c&&(n-=u/c)}a[s-1][1]+=a[s-1][0]=n,Sd(e,t)}}function im(e){"@babel/helpers - typeof";return im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},im(e)}var nxe=["type","size","sizeType"];function US(){return US=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},US.apply(this,arguments)}function tM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function rM(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tM(Object(n),!0).forEach(function(s){sxe(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tM(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function sxe(e,t,n){return t=axe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function axe(e){var t=ixe(e,"string");return im(t)=="symbol"?t:t+""}function ixe(e,t){if(im(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(im(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oxe(e,t){if(e==null)return{};var n=lxe(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function lxe(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}var EV={symbolCircle:RC,symbolCross:Tpe,symbolDiamond:Ppe,symbolSquare:Ope,symbolStar:Dpe,symbolTriangle:Lpe,symbolWye:Fpe},cxe=Math.PI/180,dxe=function(t){var n="symbol".concat(Jy(t));return EV[n]||RC},uxe=function(t,n,s){if(n==="area")return t;switch(s){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*cxe;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.pow(Math.tan(a),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},hxe=function(t,n){EV["symbol".concat(Jy(t))]=n},IC=function(t){var n=t.type,s=n===void 0?"circle":n,a=t.size,i=a===void 0?64:a,o=t.sizeType,l=o===void 0?"area":o,c=oxe(t,nxe),u=rM(rM({},c),{},{type:s,size:i,sizeType:l}),m=function(){var y=dxe(s),w=Bpe().type(y).size(uxe(i,l,s));return w()},f=u.className,p=u.cx,b=u.cy,v=nt(u,!0);return p===+p&&b===+b&&i===+i?X.createElement("path",US({},v,{className:ct("recharts-symbols",f),transform:"translate(".concat(p,", ").concat(b,")"),d:m()})):null};IC.registerSymbol=hxe;function kd(e){"@babel/helpers - typeof";return kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kd(e)}function zS(){return zS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},zS.apply(this,arguments)}function nM(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function mxe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nM(Object(n),!0).forEach(function(s){om(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nM(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function fxe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pxe(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,OV(s.key),s)}}function xxe(e,t,n){return t&&pxe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function gxe(e,t,n){return t=xg(t),yxe(e,PV()?Reflect.construct(t,n||[],xg(e).constructor):t.apply(e,n))}function yxe(e,t){if(t&&(kd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return vxe(e)}function vxe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function PV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(PV=function(){return!!e})()}function xg(e){return xg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},xg(e)}function bxe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&WS(e,t)}function WS(e,t){return WS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},WS(e,t)}function om(e,t,n){return t=OV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OV(e){var t=jxe(e,"string");return kd(t)=="symbol"?t:t+""}function jxe(e,t){if(kd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(kd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var hs=32,DC=(function(e){function t(){return fxe(this,t),gxe(this,t,arguments)}return bxe(t,e),xxe(t,[{key:"renderIcon",value:function(s){var a=this.props.inactiveColor,i=hs/2,o=hs/6,l=hs/3,c=s.inactive?a:s.color;if(s.type==="plainline")return X.createElement("line",{strokeWidth:4,fill:"none",stroke:c,strokeDasharray:s.payload.strokeDasharray,x1:0,y1:i,x2:hs,y2:i,className:"recharts-legend-icon"});if(s.type==="line")return X.createElement("path",{strokeWidth:4,fill:"none",stroke:c,d:"M0,".concat(i,"h").concat(l,` 836 A`).concat(o,",").concat(o,",0,1,1,").concat(2*l,",").concat(i,` 837 H`).concat(hs,"M").concat(2*l,",").concat(i,` 838 A`).concat(o,",").concat(o,",0,1,1,").concat(l,",").concat(i),className:"recharts-legend-icon"});if(s.type==="rect")return X.createElement("path",{stroke:"none",fill:c,d:"M0,".concat(hs/8,"h").concat(hs,"v").concat(hs*3/4,"h").concat(-hs,"z"),className:"recharts-legend-icon"});if(X.isValidElement(s.legendIcon)){var u=mxe({},s);return delete u.legendIcon,X.cloneElement(s.legendIcon,u)}return X.createElement(IC,{fill:c,cx:i,cy:i,size:hs,sizeType:"diameter",type:s.type})}},{key:"renderItems",value:function(){var s=this,a=this.props,i=a.payload,o=a.iconSize,l=a.layout,c=a.formatter,u=a.inactiveColor,m={x:0,y:0,width:hs,height:hs},f={display:l==="horizontal"?"inline-block":"block",marginRight:10},p={display:"inline-block",verticalAlign:"middle",marginRight:4};return i.map(function(b,v){var g=b.formatter||c,y=ct(om(om({"recharts-legend-item":!0},"legend-item-".concat(v),!0),"inactive",b.inactive));if(b.type==="none")return null;var w=at(b.value)?null:b.value;Vs(!at(b.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: <Bar name="Name of my Data"/>`);var N=b.inactive?u:b.color;return X.createElement("li",zS({className:y,style:f,key:"legend-item-".concat(v)},Fl(s.props,b,v)),X.createElement(LS,{width:o,height:o,viewBox:m,style:p},s.renderIcon(b)),X.createElement("span",{className:"recharts-legend-item-text",style:{color:N}},g?g(w,b,v):w))})}},{key:"render",value:function(){var s=this.props,a=s.payload,i=s.layout,o=s.align;if(!a||!a.length)return null;var l={padding:0,margin:0,textAlign:i==="horizontal"?o:"left"};return X.createElement("ul",{className:"recharts-default-legend",style:l},this.renderItems())}}])})(j.PureComponent);om(DC,"displayName","Legend");om(DC,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var Mw,sM;function wxe(){if(sM)return Mw;sM=1;var e=Ky();function t(){this.__data__=new e,this.size=0}return Mw=t,Mw}var Rw,aM;function Nxe(){if(aM)return Rw;aM=1;function e(t){var n=this.__data__,s=n.delete(t);return this.size=n.size,s}return Rw=e,Rw}var Iw,iM;function _xe(){if(iM)return Iw;iM=1;function e(t){return this.__data__.get(t)}return Iw=e,Iw}var Dw,oM;function Sxe(){if(oM)return Dw;oM=1;function e(t){return this.__data__.has(t)}return Dw=e,Dw}var Lw,lM;function kxe(){if(lM)return Lw;lM=1;var e=Ky(),t=kC(),n=CC(),s=200;function a(i,o){var l=this.__data__;if(l instanceof e){var c=l.__data__;if(!t||c.length<s-1)return c.push([i,o]),this.size=++l.size,this;l=this.__data__=new n(c)}return l.set(i,o),this.size=l.size,this}return Lw=a,Lw}var $w,cM;function MV(){if(cM)return $w;cM=1;var e=Ky(),t=wxe(),n=Nxe(),s=_xe(),a=Sxe(),i=kxe();function o(l){var c=this.__data__=new e(l);this.size=c.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=s,o.prototype.has=a,o.prototype.set=i,$w=o,$w}var Fw,dM;function Cxe(){if(dM)return Fw;dM=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return Fw=t,Fw}var Bw,uM;function Axe(){if(uM)return Bw;uM=1;function e(t){return this.__data__.has(t)}return Bw=e,Bw}var qw,hM;function RV(){if(hM)return qw;hM=1;var e=CC(),t=Cxe(),n=Axe();function s(a){var i=-1,o=a==null?0:a.length;for(this.__data__=new e;++i<o;)this.add(a[i])}return s.prototype.add=s.prototype.push=t,s.prototype.has=n,qw=s,qw}var Vw,mM;function IV(){if(mM)return Vw;mM=1;function e(t,n){for(var s=-1,a=t==null?0:t.length;++s<a;)if(n(t[s],s,t))return!0;return!1}return Vw=e,Vw}var Uw,fM;function DV(){if(fM)return Uw;fM=1;function e(t,n){return t.has(n)}return Uw=e,Uw}var zw,pM;function LV(){if(pM)return zw;pM=1;var e=RV(),t=IV(),n=DV(),s=1,a=2;function i(o,l,c,u,m,f){var p=c&s,b=o.length,v=l.length;if(b!=v&&!(p&&v>b))return!1;var g=f.get(o),y=f.get(l);if(g&&y)return g==l&&y==o;var w=-1,N=!0,S=c&a?new e:void 0;for(f.set(o,l),f.set(l,o);++w<b;){var A=o[w],k=l[w];if(u)var C=p?u(k,A,w,l,o,f):u(A,k,w,o,l,f);if(C!==void 0){if(C)continue;N=!1;break}if(S){if(!t(l,function(T,P){if(!n(S,P)&&(A===T||m(A,T,c,u,f)))return S.push(P)})){N=!1;break}}else if(!(A===k||m(A,k,c,u,f))){N=!1;break}}return f.delete(o),f.delete(l),N}return zw=i,zw}var Ww,xM;function Txe(){if(xM)return Ww;xM=1;var e=Ta(),t=e.Uint8Array;return Ww=t,Ww}var Hw,gM;function Exe(){if(gM)return Hw;gM=1;function e(t){var n=-1,s=Array(t.size);return t.forEach(function(a,i){s[++n]=[i,a]}),s}return Hw=e,Hw}var Gw,yM;function LC(){if(yM)return Gw;yM=1;function e(t){var n=-1,s=Array(t.size);return t.forEach(function(a){s[++n]=a}),s}return Gw=e,Gw}var Kw,vM;function Pxe(){if(vM)return Kw;vM=1;var e=mf(),t=Txe(),n=SC(),s=LV(),a=Exe(),i=LC(),o=1,l=2,c="[object Boolean]",u="[object Date]",m="[object Error]",f="[object Map]",p="[object Number]",b="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",w="[object ArrayBuffer]",N="[object DataView]",S=e?e.prototype:void 0,A=S?S.valueOf:void 0;function k(C,T,P,R,M,D,$){switch(P){case N:if(C.byteLength!=T.byteLength||C.byteOffset!=T.byteOffset)return!1;C=C.buffer,T=T.buffer;case w:return!(C.byteLength!=T.byteLength||!D(new t(C),new t(T)));case c:case u:case p:return n(+C,+T);case m:return C.name==T.name&&C.message==T.message;case b:case g:return C==T+"";case f:var q=a;case v:var H=R&o;if(q||(q=i),C.size!=T.size&&!H)return!1;var L=$.get(C);if(L)return L==T;R|=l,$.set(C,T);var F=s(q(C),q(T),R,M,D,$);return $.delete(C),F;case y:if(A)return A.call(C)==A.call(T)}return!1}return Kw=k,Kw}var Yw,bM;function $V(){if(bM)return Yw;bM=1;function e(t,n){for(var s=-1,a=n.length,i=t.length;++s<a;)t[i+s]=n[s];return t}return Yw=e,Yw}var Xw,jM;function Oxe(){if(jM)return Xw;jM=1;var e=$V(),t=Bn();function n(s,a,i){var o=a(s);return t(s)?o:e(o,i(s))}return Xw=n,Xw}var Jw,wM;function Mxe(){if(wM)return Jw;wM=1;function e(t,n){for(var s=-1,a=t==null?0:t.length,i=0,o=[];++s<a;){var l=t[s];n(l,s,t)&&(o[i++]=l)}return o}return Jw=e,Jw}var Qw,NM;function Rxe(){if(NM)return Qw;NM=1;function e(){return[]}return Qw=e,Qw}var Zw,_M;function Ixe(){if(_M)return Zw;_M=1;var e=Mxe(),t=Rxe(),n=Object.prototype,s=n.propertyIsEnumerable,a=Object.getOwnPropertySymbols,i=a?function(o){return o==null?[]:(o=Object(o),e(a(o),function(l){return s.call(o,l)}))}:t;return Zw=i,Zw}var eN,SM;function Dxe(){if(SM)return eN;SM=1;function e(t,n){for(var s=-1,a=Array(t);++s<t;)a[s]=n(s);return a}return eN=e,eN}var tN,kM;function Lxe(){if(kM)return tN;kM=1;var e=hi(),t=mi(),n="[object Arguments]";function s(a){return t(a)&&e(a)==n}return tN=s,tN}var rN,CM;function $C(){if(CM)return rN;CM=1;var e=Lxe(),t=mi(),n=Object.prototype,s=n.hasOwnProperty,a=n.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(o){return t(o)&&s.call(o,"callee")&&!a.call(o,"callee")};return rN=i,rN}var Ph={exports:{}},nN,AM;function $xe(){if(AM)return nN;AM=1;function e(){return!1}return nN=e,nN}Ph.exports;var TM;function FV(){return TM||(TM=1,(function(e,t){var n=Ta(),s=$xe(),a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===a,l=o?n.Buffer:void 0,c=l?l.isBuffer:void 0,u=c||s;e.exports=u})(Ph,Ph.exports)),Ph.exports}var sN,EM;function FC(){if(EM)return sN;EM=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(s,a){var i=typeof s;return a=a??e,!!a&&(i=="number"||i!="symbol"&&t.test(s))&&s>-1&&s%1==0&&s<a}return sN=n,sN}var aN,PM;function BC(){if(PM)return aN;PM=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return aN=t,aN}var iN,OM;function Fxe(){if(OM)return iN;OM=1;var e=hi(),t=BC(),n=mi(),s="[object Arguments]",a="[object Array]",i="[object Boolean]",o="[object Date]",l="[object Error]",c="[object Function]",u="[object Map]",m="[object Number]",f="[object Object]",p="[object RegExp]",b="[object Set]",v="[object String]",g="[object WeakMap]",y="[object ArrayBuffer]",w="[object DataView]",N="[object Float32Array]",S="[object Float64Array]",A="[object Int8Array]",k="[object Int16Array]",C="[object Int32Array]",T="[object Uint8Array]",P="[object Uint8ClampedArray]",R="[object Uint16Array]",M="[object Uint32Array]",D={};D[N]=D[S]=D[A]=D[k]=D[C]=D[T]=D[P]=D[R]=D[M]=!0,D[s]=D[a]=D[y]=D[i]=D[w]=D[o]=D[l]=D[c]=D[u]=D[m]=D[f]=D[p]=D[b]=D[v]=D[g]=!1;function $(q){return n(q)&&t(q.length)&&!!D[e(q)]}return iN=$,iN}var oN,MM;function BV(){if(MM)return oN;MM=1;function e(t){return function(n){return t(n)}}return oN=e,oN}var Oh={exports:{}};Oh.exports;var RM;function Bxe(){return RM||(RM=1,(function(e,t){var n=iV(),s=t&&!t.nodeType&&t,a=s&&!0&&e&&!e.nodeType&&e,i=a&&a.exports===s,o=i&&n.process,l=(function(){try{var c=a&&a.require&&a.require("util").types;return c||o&&o.binding&&o.binding("util")}catch{}})();e.exports=l})(Oh,Oh.exports)),Oh.exports}var lN,IM;function qV(){if(IM)return lN;IM=1;var e=Fxe(),t=BV(),n=Bxe(),s=n&&n.isTypedArray,a=s?t(s):e;return lN=a,lN}var cN,DM;function qxe(){if(DM)return cN;DM=1;var e=Dxe(),t=$C(),n=Bn(),s=FV(),a=FC(),i=qV(),o=Object.prototype,l=o.hasOwnProperty;function c(u,m){var f=n(u),p=!f&&t(u),b=!f&&!p&&s(u),v=!f&&!p&&!b&&i(u),g=f||p||b||v,y=g?e(u.length,String):[],w=y.length;for(var N in u)(m||l.call(u,N))&&!(g&&(N=="length"||b&&(N=="offset"||N=="parent")||v&&(N=="buffer"||N=="byteLength"||N=="byteOffset")||a(N,w)))&&y.push(N);return y}return cN=c,cN}var dN,LM;function Vxe(){if(LM)return dN;LM=1;var e=Object.prototype;function t(n){var s=n&&n.constructor,a=typeof s=="function"&&s.prototype||e;return n===a}return dN=t,dN}var uN,$M;function VV(){if($M)return uN;$M=1;function e(t,n){return function(s){return t(n(s))}}return uN=e,uN}var hN,FM;function Uxe(){if(FM)return hN;FM=1;var e=VV(),t=e(Object.keys,Object);return hN=t,hN}var mN,BM;function zxe(){if(BM)return mN;BM=1;var e=Vxe(),t=Uxe(),n=Object.prototype,s=n.hasOwnProperty;function a(i){if(!e(i))return t(i);var o=[];for(var l in Object(i))s.call(i,l)&&l!="constructor"&&o.push(l);return o}return mN=a,mN}var fN,qM;function xf(){if(qM)return fN;qM=1;var e=_C(),t=BC();function n(s){return s!=null&&t(s.length)&&!e(s)}return fN=n,fN}var pN,VM;function tv(){if(VM)return pN;VM=1;var e=qxe(),t=zxe(),n=xf();function s(a){return n(a)?e(a):t(a)}return pN=s,pN}var xN,UM;function Wxe(){if(UM)return xN;UM=1;var e=Oxe(),t=Ixe(),n=tv();function s(a){return e(a,n,t)}return xN=s,xN}var gN,zM;
vendor: 2,477 bytes, line 838
838function Hxe(){if(zM)return gN;zM=1;var e=Wxe(),t=1,n=Object.prototype,s=n.hasOwnProperty;function a(i,o,l,c,u,m){var f=l&t,p=e(i),b=p.length,v=e(o),g=v.length;if(b!=g&&!f)return!1;for(var y=b;y--;){var w=p[y];if(!(f?w in o:s.call(o,w)))return!1}var N=m.get(i),S=m.get(o);if(N&&S)return N==o&&S==i;var A=!0;m.set(i,o),m.set(o,i);for(var k=f;++y<b;){w=p[y];var C=i[w],T=o[w];if(c)var P=f?c(T,C,w,o,i,m):c(C,T,w,i,o,m);if(!(P===void 0?C===T||u(C,T,l,c,m):P)){A=!1;break}k||(k=w=="constructor")}if(A&&!k){var R=i.constructor,M=o.constructor;R!=M&&"constructor"in i&&"constructor"in o&&!(typeof R=="function"&&R instanceof R&&typeof M=="function"&&M instanceof M)&&(A=!1)}return m.delete(i),m.delete(o),A}return gN=a,gN}var yN,WM;function Gxe(){if(WM)return yN;WM=1;var e=ec(),t=Ta(),n=e(t,"DataView");return yN=n,yN}var vN,HM;function Kxe(){if(HM)return vN;HM=1;var e=ec(),t=Ta(),n=e(t,"Promise");return vN=n,vN}var bN,GM;function UV(){if(GM)return bN;GM=1;var e=ec(),t=Ta(),n=e(t,"Set");return bN=n,bN}var jN,KM;function Yxe(){if(KM)return jN;KM=1;var e=ec(),t=Ta(),n=e(t,"WeakMap");return jN=n,jN}var wN,YM;function Xxe(){if(YM)return wN;YM=1;var e=Gxe(),t=kC(),n=Kxe(),s=UV(),a=Yxe(),i=hi(),o=oV(),l="[object Map]",c="[object Object]",u="[object Promise]",m="[object Set]",f="[object WeakMap]",p="[object DataView]",b=o(e),v=o(t),g=o(n),y=o(s),w=o(a),N=i;return(e&&N(new e(new ArrayBuffer(1)))!=p||t&&N(new t)!=l||n&&N(n.resolve())!=u||s&&N(new s)!=m||a&&N(new a)!=f)&&(N=function(S){var A=i(S),k=A==c?S.constructor:void 0,C=k?o(k):"";if(C)switch(C){case b:return p;case v:return l;case g:return u;case y:return m;case w:return f}return A}),wN=N,wN}var NN,XM;function Jxe(){if(XM)return NN;XM=1;var e=MV(),t=LV(),n=Pxe(),s=Hxe(),a=Xxe(),i=Bn(),o=FV(),l=qV(),c=1,u="[object Arguments]",m="[object Array]",f="[object Object]",p=Object.prototype,b=p.hasOwnProperty;function v(g,y,w,N,S,A){var k=i(g),C=i(y),T=k?m:a(g),P=C?m:a(y);T=T==u?f:T,P=P==u?f:P;var R=T==f,M=P==f,D=T==P;if(D&&o(g)){if(!o(y))return!1;k=!0,R=!1}if(D&&!R)return A||(A=new e),k||l(g)?t(g,y,w,N,S,A):n(g,y,T,w,N,S,A);if(!(w&c)){var $=R&&b.call(g,"__wrapped__"),q=M&&b.call(y,"__wrapped__");if($||q){var H=$?g.value():g,L=q?y.value():y;return A||(A=new e),S(H,L,w,N,A)}}return D?(A||(A=new e),s(g,y,w,N,S,A)):!1}return NN=v,NN}var _N,JM;function qC(){if(JM)return _N;JM=1;var e=Jxe(),t=mi();function n(s,a,i,o,l){return s===a?!0:s==null||a==null||!t(s)&&!t(a)?s!==s&&a!==a:e(s,a,i,o,n,l)}return _N=n,_N}var SN,QM;
vendor: 44,485 bytes, lines 838-845
838function Qxe(){if(QM)return SN;QM=1;var e=MV(),t=qC(),n=1,s=2;function a(i,o,l,c){var u=l.length,m=u,f=!c;if(i==null)return!m;for(i=Object(i);u--;){var p=l[u];if(f&&p[2]?p[1]!==i[p[0]]:!(p[0]in i))return!1}for(;++u<m;){p=l[u];var b=p[0],v=i[b],g=p[1];if(f&&p[2]){if(v===void 0&&!(b in i))return!1}else{var y=new e;if(c)var w=c(v,g,b,i,o,y);if(!(w===void 0?t(g,v,n|s,c,y):w))return!1}}return!0}return SN=a,SN}var kN,ZM;function zV(){if(ZM)return kN;ZM=1;var e=_o();function t(n){return n===n&&!e(n)}return kN=t,kN}var CN,eR;function Zxe(){if(eR)return CN;eR=1;var e=zV(),t=tv();function n(s){for(var a=t(s),i=a.length;i--;){var o=a[i],l=s[o];a[i]=[o,l,e(l)]}return a}return CN=n,CN}var AN,tR;function WV(){if(tR)return AN;tR=1;function e(t,n){return function(s){return s==null?!1:s[t]===n&&(n!==void 0||t in Object(s))}}return AN=e,AN}var TN,rR;function ege(){if(rR)return TN;rR=1;var e=Qxe(),t=Zxe(),n=WV();function s(a){var i=t(a);return i.length==1&&i[0][2]?n(i[0][0],i[0][1]):function(o){return o===a||e(o,a,i)}}return TN=s,TN}var EN,nR;function tge(){if(nR)return EN;nR=1;function e(t,n){return t!=null&&n in Object(t)}return EN=e,EN}var PN,sR;function rge(){if(sR)return PN;sR=1;var e=dV(),t=$C(),n=Bn(),s=FC(),a=BC(),i=Xy();function o(l,c,u){c=e(c,l);for(var m=-1,f=c.length,p=!1;++m<f;){var b=i(c[m]);if(!(p=l!=null&&u(l,b)))break;l=l[b]}return p||++m!=f?p:(f=l==null?0:l.length,!!f&&a(f)&&s(b,f)&&(n(l)||t(l)))}return PN=o,PN}var ON,aR;function nge(){if(aR)return ON;aR=1;var e=tge(),t=rge();function n(s,a){return s!=null&&t(s,a,e)}return ON=n,ON}var MN,iR;function sge(){if(iR)return MN;iR=1;var e=qC(),t=uV(),n=nge(),s=NC(),a=zV(),i=WV(),o=Xy(),l=1,c=2;function u(m,f){return s(m)&&a(f)?i(o(m),f):function(p){var b=t(p,m);return b===void 0&&b===f?n(p,m):e(f,b,l|c)}}return MN=u,MN}var RN,oR;function lu(){if(oR)return RN;oR=1;function e(t){return t}return RN=e,RN}var IN,lR;function age(){if(lR)return IN;lR=1;function e(t){return function(n){return n==null?void 0:n[t]}}return IN=e,IN}var DN,cR;function ige(){if(cR)return DN;cR=1;var e=TC();function t(n){return function(s){return e(s,n)}}return DN=t,DN}var LN,dR;function oge(){if(dR)return LN;dR=1;var e=age(),t=ige(),n=NC(),s=Xy();function a(i){return n(i)?e(s(i)):t(i)}return LN=a,LN}var $N,uR;function Ea(){if(uR)return $N;uR=1;var e=ege(),t=sge(),n=lu(),s=Bn(),a=oge();function i(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?s(o)?t(o[0],o[1]):e(o):a(o)}return $N=i,$N}var FN,hR;function HV(){if(hR)return FN;hR=1;function e(t,n,s,a){for(var i=t.length,o=s+(a?1:-1);a?o--:++o<i;)if(n(t[o],o,t))return o;return-1}return FN=e,FN}var BN,mR;function lge(){if(mR)return BN;mR=1;function e(t){return t!==t}return BN=e,BN}var qN,fR;function cge(){if(fR)return qN;fR=1;function e(t,n,s){for(var a=s-1,i=t.length;++a<i;)if(t[a]===n)return a;return-1}return qN=e,qN}var VN,pR;function dge(){if(pR)return VN;pR=1;var e=HV(),t=lge(),n=cge();function s(a,i,o){return i===i?n(a,i,o):e(a,t,o)}return VN=s,VN}var UN,xR;function uge(){if(xR)return UN;xR=1;var e=dge();function t(n,s){var a=n==null?0:n.length;return!!a&&e(n,s,0)>-1}return UN=t,UN}var zN,gR;function hge(){if(gR)return zN;gR=1;function e(t,n,s){for(var a=-1,i=t==null?0:t.length;++a<i;)if(s(n,t[a]))return!0;return!1}return zN=e,zN}var WN,yR;function mge(){if(yR)return WN;yR=1;function e(){}return WN=e,WN}var HN,vR;function fge(){if(vR)return HN;vR=1;var e=UV(),t=mge(),n=LC(),s=1/0,a=e&&1/n(new e([,-0]))[1]==s?function(i){return new e(i)}:t;return HN=a,HN}var GN,bR;function pge(){if(bR)return GN;bR=1;var e=RV(),t=uge(),n=hge(),s=DV(),a=fge(),i=LC(),o=200;function l(c,u,m){var f=-1,p=t,b=c.length,v=!0,g=[],y=g;if(m)v=!1,p=n;else if(b>=o){var w=u?null:a(c);if(w)return i(w);v=!1,p=s,y=new e}else y=u?[]:g;e:for(;++f<b;){var N=c[f],S=u?u(N):N;if(N=m||N!==0?N:0,v&&S===S){for(var A=y.length;A--;)if(y[A]===S)continue e;u&&y.push(S),g.push(N)}else p(y,S,m)||(y!==g&&y.push(S),g.push(N))}return g}return GN=l,GN}var KN,jR;function xge(){if(jR)return KN;jR=1;var e=Ea(),t=pge();function n(s,a){return s&&s.length?t(s,e(a,2)):[]}return KN=n,KN}var gge=xge();const wR=Et(gge);function GV(e,t,n){return t===!0?wR(e,n):at(t)?wR(e,t):e}function Cd(e){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cd(e)}var yge=["ref"];function NR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function qa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?NR(Object(n),!0).forEach(function(s){rv(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):NR(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function vge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _R(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,YV(s.key),s)}}function bge(e,t,n){return t&&_R(e.prototype,t),n&&_R(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function jge(e,t,n){return t=gg(t),wge(e,KV()?Reflect.construct(t,n||[],gg(e).constructor):t.apply(e,n))}function wge(e,t){if(t&&(Cd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Nge(e)}function Nge(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function KV(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(KV=function(){return!!e})()}function gg(e){return gg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},gg(e)}function _ge(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HS(e,t)}function HS(e,t){return HS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},HS(e,t)}function rv(e,t,n){return t=YV(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YV(e){var t=Sge(e,"string");return Cd(t)=="symbol"?t:t+""}function Sge(e,t){if(Cd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Cd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function kge(e,t){if(e==null)return{};var n=Cge(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function Cge(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function Age(e){return e.value}function Tge(e,t){if(X.isValidElement(e))return X.cloneElement(e,t);if(typeof e=="function")return X.createElement(e,t);t.ref;var n=kge(t,yge);return X.createElement(DC,n)}var SR=1,rd=(function(e){function t(){var n;vge(this,t);for(var s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return n=jge(this,t,[].concat(a)),rv(n,"lastBoundingBox",{width:-1,height:-1}),n}return _ge(t,e),bge(t,[{key:"componentDidMount",value:function(){this.updateBBox()}},{key:"componentDidUpdate",value:function(){this.updateBBox()}},{key:"getBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var s=this.wrapperNode.getBoundingClientRect();return s.height=this.wrapperNode.offsetHeight,s.width=this.wrapperNode.offsetWidth,s}return null}},{key:"updateBBox",value:function(){var s=this.props.onBBoxUpdate,a=this.getBBox();a?(Math.abs(a.width-this.lastBoundingBox.width)>SR||Math.abs(a.height-this.lastBoundingBox.height)>SR)&&(this.lastBoundingBox.width=a.width,this.lastBoundingBox.height=a.height,s&&s(a)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,s&&s(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?qa({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(s){var a=this.props,i=a.layout,o=a.align,l=a.verticalAlign,c=a.margin,u=a.chartWidth,m=a.chartHeight,f,p;if(!s||(s.left===void 0||s.left===null)&&(s.right===void 0||s.right===null))if(o==="center"&&i==="vertical"){var b=this.getBBoxSnapshot();f={left:((u||0)-b.width)/2}}else f=o==="right"?{right:c&&c.right||0}:{left:c&&c.left||0};if(!s||(s.top===void 0||s.top===null)&&(s.bottom===void 0||s.bottom===null))if(l==="middle"){var v=this.getBBoxSnapshot();p={top:((m||0)-v.height)/2}}else p=l==="bottom"?{bottom:c&&c.bottom||0}:{top:c&&c.top||0};return qa(qa({},f),p)}},{key:"render",value:function(){var s=this,a=this.props,i=a.content,o=a.width,l=a.height,c=a.wrapperStyle,u=a.payloadUniqBy,m=a.payload,f=qa(qa({position:"absolute",width:o||"auto",height:l||"auto"},this.getDefaultPosition(c)),c);return X.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(b){s.wrapperNode=b}},Tge(i,qa(qa({},this.props),{},{payload:GV(m,u,Age)})))}}],[{key:"getWithHeight",value:function(s,a){var i=qa(qa({},this.defaultProps),s.props),o=i.layout;return o==="vertical"&&Te(s.props.height)?{height:s.props.height}:o==="horizontal"?{width:s.props.width||a}:null}}])})(j.PureComponent);rv(rd,"displayName","Legend");rv(rd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var YN,kR;function Ege(){if(kR)return YN;kR=1;var e=mf(),t=$C(),n=Bn(),s=e?e.isConcatSpreadable:void 0;function a(i){return n(i)||t(i)||!!(s&&i&&i[s])}return YN=a,YN}var XN,CR;function XV(){if(CR)return XN;CR=1;var e=$V(),t=Ege();function n(s,a,i,o,l){var c=-1,u=s.length;for(i||(i=t),l||(l=[]);++c<u;){var m=s[c];a>0&&i(m)?a>1?n(m,a-1,i,o,l):e(l,m):o||(l[l.length]=m)}return l}return XN=n,XN}var JN,AR;function Pge(){if(AR)return JN;AR=1;function e(t){return function(n,s,a){for(var i=-1,o=Object(n),l=a(n),c=l.length;c--;){var u=l[t?c:++i];if(s(o[u],u,o)===!1)break}return n}}return JN=e,JN}var QN,TR;function Oge(){if(TR)return QN;TR=1;var e=Pge(),t=e();return QN=t,QN}var ZN,ER;function JV(){if(ER)return ZN;ER=1;var e=Oge(),t=tv();function n(s,a){return s&&e(s,a,t)}return ZN=n,ZN}var e1,PR;function Mge(){if(PR)return e1;PR=1;var e=xf();function t(n,s){return function(a,i){if(a==null)return a;if(!e(a))return n(a,i);for(var o=a.length,l=s?o:-1,c=Object(a);(s?l--:++l<o)&&i(c[l],l,c)!==!1;);return a}}return e1=t,e1}var t1,OR;function VC(){if(OR)return t1;OR=1;var e=JV(),t=Mge(),n=t(e);return t1=n,t1}var r1,MR;function QV(){if(MR)return r1;MR=1;var e=VC(),t=xf();function n(s,a){var i=-1,o=t(s)?Array(s.length):[];return e(s,function(l,c,u){o[++i]=a(l,c,u)}),o}return r1=n,r1}var n1,RR;function Rge(){if(RR)return n1;RR=1;function e(t,n){var s=t.length;for(t.sort(n);s--;)t[s]=t[s].value;return t}return n1=e,n1}var s1,IR;function Ige(){if(IR)return s1;IR=1;var e=iu();function t(n,s){if(n!==s){var a=n!==void 0,i=n===null,o=n===n,l=e(n),c=s!==void 0,u=s===null,m=s===s,f=e(s);if(!u&&!f&&!l&&n>s||l&&c&&m&&!u&&!f||i&&c&&m||!a&&m||!o)return 1;if(!i&&!l&&!f&&n<s||f&&a&&o&&!i&&!l||u&&a&&o||!c&&o||!m)return-1}return 0}return s1=t,s1}var a1,DR;function Dge(){if(DR)return a1;DR=1;var e=Ige();function t(n,s,a){for(var i=-1,o=n.criteria,l=s.criteria,c=o.length,u=a.length;++i<c;){var m=e(o[i],l[i]);if(m){if(i>=u)return m;var f=a[i];return m*(f=="desc"?-1:1)}}return n.index-s.index}return a1=t,a1}var i1,LR;function Lge(){if(LR)return i1;LR=1;var e=AC(),t=TC(),n=Ea(),s=QV(),a=Rge(),i=BV(),o=Dge(),l=lu(),c=Bn();function u(m,f,p){f.length?f=e(f,function(g){return c(g)?function(y){return t(y,g.length===1?g[0]:g)}:g}):f=[l];var b=-1;f=e(f,i(n));var v=s(m,function(g,y,w){var N=e(f,function(S){return S(g)});return{criteria:N,index:++b,value:g}});return a(v,function(g,y){return o(g,y,p)})}return i1=u,i1}var o1,$R;function $ge(){if($R)return o1;$R=1;function e(t,n,s){switch(s.length){case 0:return t.call(n);case 1:return t.call(n,s[0]);case 2:return t.call(n,s[0],s[1]);case 3:return t.call(n,s[0],s[1],s[2])}return t.apply(n,s)}return o1=e,o1}var l1,FR;function Fge(){if(FR)return l1;FR=1;var e=$ge(),t=Math.max;function n(s,a,i){return a=t(a===void 0?s.length-1:a,0),function(){for(var o=arguments,l=-1,c=t(o.length-a,0),u=Array(c);++l<c;)u[l]=o[a+l];l=-1;for(var m=Array(a+1);++l<a;)m[l]=o[l];return m[a]=i(u),e(s,this,m)}}return l1=n,l1}var c1,BR;function Bge(){if(BR)return c1;BR=1;function e(t){return function(){return t}}return c1=e,c1}var d1,qR;function ZV(){if(qR)return d1;qR=1;var e=ec(),t=(function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}})();return d1=t,d1}var u1,VR;function qge(){if(VR)return u1;VR=1;var e=Bge(),t=ZV(),n=lu(),s=t?function(a,i){return t(a,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:n;return u1=s,u1}var h1,UR;function Vge(){if(UR)return h1;UR=1;var e=800,t=16,n=Date.now;function s(a){var i=0,o=0;return function(){var l=n(),c=t-(l-o);if(o=l,c>0){if(++i>=e)return arguments[0]}else i=0;return a.apply(void 0,arguments)}}return h1=s,h1}var m1,zR;function Uge(){if(zR)return m1;zR=1;var e=qge(),t=Vge(),n=t(e);return m1=n,m1}var f1,WR;function zge(){if(WR)return f1;WR=1;var e=lu(),t=Fge(),n=Uge();function s(a,i){return n(t(a,i,e),a+"")}return f1=s,f1}var p1,HR;function nv(){if(HR)return p1;HR=1;var e=SC(),t=xf(),n=FC(),s=_o();function a(i,o,l){if(!s(l))return!1;var c=typeof o;return(c=="number"?t(l)&&n(o,l.length):c=="string"&&o in l)?e(l[o],i):!1}return p1=a,p1}var x1,GR;function Wge(){if(GR)return x1;GR=1;var e=XV(),t=Lge(),n=zge(),s=nv(),a=n(function(i,o){if(i==null)return[];var l=o.length;return l>1&&s(i,o[0],o[1])?o=[]:l>2&&s(o[0],o[1],o[2])&&(o=[o[0]]),t(i,e(o,1),[])});return x1=a,x1}var Hge=Wge();const UC=Et(Hge);function lm(e){"@babel/helpers - typeof";return lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lm(e)}function GS(){return GS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},GS.apply(this,arguments)}function Gge(e,t){return Jge(e)||Xge(e,t)||Yge(e,t)||Kge()}function Kge(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 839In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yge(e,t){if(e){if(typeof e=="string")return KR(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KR(e,t)}}function KR(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function Xge(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function Jge(e){if(Array.isArray(e))return e}function YR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function g1(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YR(Object(n),!0).forEach(function(s){Qge(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YR(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Qge(e,t,n){return t=Zge(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zge(e){var t=eye(e,"string");return lm(t)=="symbol"?t:t+""}function eye(e,t){if(lm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(lm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tye(e){return Array.isArray(e)&&Mr(e[0])&&Mr(e[1])?e.join(" ~ "):e}var rye=function(t){var n=t.separator,s=n===void 0?" : ":n,a=t.contentStyle,i=a===void 0?{}:a,o=t.itemStyle,l=o===void 0?{}:o,c=t.labelStyle,u=c===void 0?{}:c,m=t.payload,f=t.formatter,p=t.itemSorter,b=t.wrapperClassName,v=t.labelClassName,g=t.label,y=t.labelFormatter,w=t.accessibilityLayer,N=w===void 0?!1:w,S=function(){if(m&&m.length){var $={padding:0,margin:0},q=(p?UC(m,p):m).map(function(H,L){if(H.type==="none")return null;var F=g1({display:"block",paddingTop:4,paddingBottom:4,color:H.color||"#000"},l),Y=H.formatter||f||tye,U=H.value,re=H.name,G=U,B=re;if(Y&&G!=null&&B!=null){var z=Y(U,re,H,L,m);if(Array.isArray(z)){var he=Gge(z,2);G=he[0],B=he[1]}else G=z}return X.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(L),style:F},Mr(B)?X.createElement("span",{className:"recharts-tooltip-item-name"},B):null,Mr(B)?X.createElement("span",{className:"recharts-tooltip-item-separator"},s):null,X.createElement("span",{className:"recharts-tooltip-item-value"},G),X.createElement("span",{className:"recharts-tooltip-item-unit"},H.unit||""))});return X.createElement("ul",{className:"recharts-tooltip-item-list",style:$},q)}return null},A=g1({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},i),k=g1({margin:0},u),C=!yt(g),T=C?g:"",P=ct("recharts-default-tooltip",b),R=ct("recharts-tooltip-label",v);C&&y&&m!==void 0&&m!==null&&(T=y(g,m));var M=N?{role:"status","aria-live":"assertive"}:{};return X.createElement("div",GS({className:P,style:A},M),X.createElement("p",{className:R,style:k},X.isValidElement(T)?T:"".concat(T)),S())};function cm(e){"@babel/helpers - typeof";return cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cm(e)}function Zp(e,t,n){return t=nye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nye(e){var t=sye(e,"string");return cm(t)=="symbol"?t:t+""}function sye(e,t){if(cm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(cm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ih="recharts-tooltip-wrapper",aye={visibility:"hidden"};function iye(e){var t=e.coordinate,n=e.translateX,s=e.translateY;return ct(ih,Zp(Zp(Zp(Zp({},"".concat(ih,"-right"),Te(n)&&t&&Te(t.x)&&n>=t.x),"".concat(ih,"-left"),Te(n)&&t&&Te(t.x)&&n<t.x),"".concat(ih,"-bottom"),Te(s)&&t&&Te(t.y)&&s>=t.y),"".concat(ih,"-top"),Te(s)&&t&&Te(t.y)&&s<t.y))}function XR(e){var t=e.allowEscapeViewBox,n=e.coordinate,s=e.key,a=e.offsetTopLeft,i=e.position,o=e.reverseDirection,l=e.tooltipDimension,c=e.viewBox,u=e.viewBoxDimension;if(i&&Te(i[s]))return i[s];var m=n[s]-l-a,f=n[s]+a;if(t[s])return o[s]?m:f;if(o[s]){var p=m,b=c[s];return p<b?Math.max(f,c[s]):Math.max(m,c[s])}var v=f+l,g=c[s]+u;return v>g?Math.max(m,c[s]):Math.max(f,c[s])}function oye(e){var t=e.translateX,n=e.translateY,s=e.useTranslate3d;return{transform:s?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function lye(e){var t=e.allowEscapeViewBox,n=e.coordinate,s=e.offsetTopLeft,a=e.position,i=e.reverseDirection,o=e.tooltipBox,l=e.useTranslate3d,c=e.viewBox,u,m,f;return o.height>0&&o.width>0&&n?(m=XR({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:s,position:a,reverseDirection:i,tooltipDimension:o.width,viewBox:c,viewBoxDimension:c.width}),f=XR({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:s,position:a,reverseDirection:i,tooltipDimension:o.height,viewBox:c,viewBoxDimension:c.height}),u=oye({translateX:m,translateY:f,useTranslate3d:l})):u=aye,{cssProperties:u,cssClasses:iye({translateX:m,translateY:f,coordinate:n})}}function Ad(e){"@babel/helpers - typeof";return Ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ad(e)}function JR(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function QR(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?JR(Object(n),!0).forEach(function(s){YS(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):JR(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function cye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dye(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,tU(s.key),s)}}function uye(e,t,n){return t&&dye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function hye(e,t,n){return t=yg(t),mye(e,eU()?Reflect.construct(t,n||[],yg(e).constructor):t.apply(e,n))}function mye(e,t){if(t&&(Ad(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fye(e)}function fye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(eU=function(){return!!e})()}function yg(e){return yg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},yg(e)}function pye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&KS(e,t)}function KS(e,t){return KS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},KS(e,t)}function YS(e,t,n){return t=tU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tU(e){var t=xye(e,"string");return Ad(t)=="symbol"?t:t+""}function xye(e,t){if(Ad(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Ad(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var ZR=1,gye=(function(e){function t(){var n;cye(this,t);for(var s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return n=hye(this,t,[].concat(a)),YS(n,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0},lastBoundingBox:{width:-1,height:-1}}),YS(n,"handleKeyDown",function(o){if(o.key==="Escape"){var l,c,u,m;n.setState({dismissed:!0,dismissedAtCoordinate:{x:(l=(c=n.props.coordinate)===null||c===void 0?void 0:c.x)!==null&&l!==void 0?l:0,y:(u=(m=n.props.coordinate)===null||m===void 0?void 0:m.y)!==null&&u!==void 0?u:0}})}}),n}return pye(t,e),uye(t,[{key:"updateBBox",value:function(){if(this.wrapperNode&&this.wrapperNode.getBoundingClientRect){var s=this.wrapperNode.getBoundingClientRect();(Math.abs(s.width-this.state.lastBoundingBox.width)>ZR||Math.abs(s.height-this.state.lastBoundingBox.height)>ZR)&&this.setState({lastBoundingBox:{width:s.width,height:s.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var s,a;this.props.active&&this.updateBBox(),this.state.dismissed&&(((s=this.props.coordinate)===null||s===void 0?void 0:s.x)!==this.state.dismissedAtCoordinate.x||((a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var s=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.children,m=a.coordinate,f=a.hasPayload,p=a.isAnimationActive,b=a.offset,v=a.position,g=a.reverseDirection,y=a.useTranslate3d,w=a.viewBox,N=a.wrapperStyle,S=lye({allowEscapeViewBox:o,coordinate:m,offsetTopLeft:b,position:v,reverseDirection:g,tooltipBox:this.state.lastBoundingBox,useTranslate3d:y,viewBox:w}),A=S.cssClasses,k=S.cssProperties,C=QR(QR({transition:p&&i?"transform ".concat(l,"ms ").concat(c):void 0},k),{},{pointerEvents:"none",visibility:!this.state.dismissed&&i&&f?"visible":"hidden",position:"absolute",top:0,left:0},N);return X.createElement("div",{tabIndex:-1,className:A,style:C,ref:function(P){s.wrapperNode=P}},u)}}])})(j.PureComponent),yye=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},cu={isSsr:yye()};function Td(e){"@babel/helpers - typeof";return Td=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Td(e)}function e6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function t6(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?e6(Object(n),!0).forEach(function(s){zC(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e6(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function vye(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bye(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,nU(s.key),s)}}function jye(e,t,n){return t&&bye(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wye(e,t,n){return t=vg(t),Nye(e,rU()?Reflect.construct(t,n||[],vg(e).constructor):t.apply(e,n))}function Nye(e,t){if(t&&(Td(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _ye(e)}function _ye(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rU(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rU=function(){return!!e})()}function vg(e){return vg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},vg(e)}function Sye(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XS(e,t)}function XS(e,t){return XS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},XS(e,t)}function zC(e,t,n){return t=nU(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nU(e){var t=kye(e,"string");return Td(t)=="symbol"?t:t+""}function kye(e,t){if(Td(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Td(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function Cye(e){return e.dataKey}function Aye(e,t){return X.isValidElement(e)?X.cloneElement(e,t):typeof e=="function"?X.createElement(e,t):X.createElement(rye,t)}var xn=(function(e){function t(){return vye(this,t),wye(this,t,arguments)}return Sye(t,e),jye(t,[{key:"render",value:function(){var s=this,a=this.props,i=a.active,o=a.allowEscapeViewBox,l=a.animationDuration,c=a.animationEasing,u=a.content,m=a.coordinate,f=a.filterNull,p=a.isAnimationActive,b=a.offset,v=a.payload,g=a.payloadUniqBy,y=a.position,w=a.reverseDirection,N=a.useTranslate3d,S=a.viewBox,A=a.wrapperStyle,k=v??[];f&&k.length&&(k=GV(v.filter(function(T){return T.value!=null&&(T.hide!==!0||s.props.includeHidden)}),g,Cye));var C=k.length>0;return X.createElement(gye,{allowEscapeViewBox:o,animationDuration:l,animationEasing:c,isAnimationActive:p,active:i,coordinate:m,hasPayload:C,offset:b,position:y,reverseDirection:w,useTranslate3d:N,viewBox:S,wrapperStyle:A},Aye(u,t6(t6({},this.props),{},{payload:k})))}}])})(j.PureComponent);zC(xn,"displayName","Tooltip");zC(xn,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!cu.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var y1,r6;function Tye(){if(r6)return y1;r6=1;var e=Ta(),t=function(){return e.Date.now()};return y1=t,y1}var v1,n6;function Eye(){if(n6)return v1;n6=1;var e=/\s/;function t(n){for(var s=n.length;s--&&e.test(n.charAt(s)););return s}return v1=t,v1}var b1,s6;function Pye(){if(s6)return b1;s6=1;var e=Eye(),t=/^\s+/;function n(s){return s&&s.slice(0,e(s)+1).replace(t,"")}return b1=n,b1}var j1,a6;function sU(){if(a6)return j1;a6=1;var e=Pye(),t=_o(),n=iu(),s=NaN,a=/^[-+]0x[0-9a-f]+$/i,i=/^0b[01]+$/i,o=/^0o[0-7]+$/i,l=parseInt;function c(u){if(typeof u=="number")return u;if(n(u))return s;if(t(u)){var m=typeof u.valueOf=="function"?u.valueOf():u;u=t(m)?m+"":m}if(typeof u!="string")return u===0?u:+u;u=e(u);var f=i.test(u);return f||o.test(u)?l(u.slice(2),f?2:8):a.test(u)?s:+u}return j1=c,j1}var w1,i6;function Oye(){if(i6)return w1;i6=1;var e=_o(),t=Tye(),n=sU(),s="Expected a function",a=Math.max,i=Math.min;function o(l,c,u){var m,f,p,b,v,g,y=0,w=!1,N=!1,S=!0;if(typeof l!="function")throw new TypeError(s);c=n(c)||0,e(u)&&(w=!!u.leading,N="maxWait"in u,p=N?a(n(u.maxWait)||0,c):p,S="trailing"in u?!!u.trailing:S);function A(q){var H=m,L=f;return m=f=void 0,y=q,b=l.apply(L,H),b}function k(q){return y=q,v=setTimeout(P,c),w?A(q):b}function C(q){var H=q-g,L=q-y,F=c-H;return N?i(F,p-L):F}function T(q){var H=q-g,L=q-y;return g===void 0||H>=c||H<0||N&&L>=p}function P(){var q=t();if(T(q))return R(q);v=setTimeout(P,C(q))}function R(q){return v=void 0,S&&m?A(q):(m=f=void 0,b)}function M(){v!==void 0&&clearTimeout(v),y=0,m=g=f=v=void 0}function D(){return v===void 0?b:R(t())}function $(){var q=t(),H=T(q);if(m=arguments,f=this,g=q,H){if(v===void 0)return k(g);if(N)return clearTimeout(v),v=setTimeout(P,c),A(g)}return v===void 0&&(v=setTimeout(P,c)),b}return $.cancel=M,$.flush=D,$}return w1=o,w1}var N1,o6;function Mye(){if(o6)return N1;o6=1;var e=Oye(),t=_o(),n="Expected a function";function s(a,i,o){var l=!0,c=!0;if(typeof a!="function")throw new TypeError(n);return t(o)&&(l="leading"in o?!!o.leading:l,c="trailing"in o?!!o.trailing:c),e(a,i,{leading:l,maxWait:i,trailing:c})}return N1=s,N1}var Rye=Mye();const aU=Et(Rye);function dm(e){"@babel/helpers - typeof";return dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dm(e)}function l6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function ex(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?l6(Object(n),!0).forEach(function(s){Iye(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l6(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Iye(e,t,n){return t=Dye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dye(e){var t=Lye(e,"string");return dm(t)=="symbol"?t:t+""}function Lye(e,t){if(dm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(dm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $ye(e,t){return Vye(e)||qye(e,t)||Bye(e,t)||Fye()}function Fye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 840In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bye(e,t){if(e){if(typeof e=="string")return c6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c6(e,t)}}function c6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function qye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function Vye(e){if(Array.isArray(e))return e}var bg=j.forwardRef(function(e,t){var n=e.aspect,s=e.initialDimension,a=s===void 0?{width:-1,height:-1}:s,i=e.width,o=i===void 0?"100%":i,l=e.height,c=l===void 0?"100%":l,u=e.minWidth,m=u===void 0?0:u,f=e.minHeight,p=e.maxHeight,b=e.children,v=e.debounce,g=v===void 0?0:v,y=e.id,w=e.className,N=e.onResize,S=e.style,A=S===void 0?{}:S,k=j.useRef(null),C=j.useRef();C.current=N,j.useImperativeHandle(t,function(){return Object.defineProperty(k.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),k.current},configurable:!0})});var T=j.useState({containerWidth:a.width,containerHeight:a.height}),P=$ye(T,2),R=P[0],M=P[1],D=j.useCallback(function(q,H){M(function(L){var F=Math.round(q),Y=Math.round(H);return L.containerWidth===F&&L.containerHeight===Y?L:{containerWidth:F,containerHeight:Y}})},[]);j.useEffect(function(){var q=function(re){var G,B=re[0].contentRect,z=B.width,he=B.height;D(z,he),(G=C.current)===null||G===void 0||G.call(C,z,he)};g>0&&(q=aU(q,g,{trailing:!0,leading:!1}));var H=new ResizeObserver(q),L=k.current.getBoundingClientRect(),F=L.width,Y=L.height;return D(F,Y),H.observe(k.current),function(){H.disconnect()}},[D,g]);var $=j.useMemo(function(){var q=R.containerWidth,H=R.containerHeight;if(q<0||H<0)return null;Vs(cl(o)||cl(c),`The width(%s) and height(%s) are both fixed numbers, 841 maybe you don't need to use a ResponsiveContainer.`,o,c),Vs(!n||n>0,"The aspect(%s) must be greater than zero.",n);var L=cl(o)?q:o,F=cl(c)?H:c;n&&n>0&&(L?F=L/n:F&&(L=F*n),p&&F>p&&(F=p)),Vs(L>0||F>0,`The width(%s) and height(%s) of chart should be greater than 0, 842 please check the style of container, or the props width(%s) and height(%s), 843 or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the 844 height and width.`,L,F,o,c,m,f,n);var Y=!Array.isArray(b)&&ti(b.type).endsWith("Chart");return X.Children.map(b,function(U){return X.isValidElement(U)?j.cloneElement(U,ex({width:L,height:F},Y?{style:ex({height:"100%",width:"100%",maxHeight:F,maxWidth:L},U.props.style)}:{})):U})},[n,b,c,p,f,m,R,o]);return X.createElement("div",{id:y?"".concat(y):void 0,className:ct("recharts-responsive-container",w),style:ex(ex({},A),{},{width:o,height:c,minWidth:m,minHeight:f,maxHeight:p}),ref:k},$)}),gf=function(t){return null};gf.displayName="Cell";function um(e){"@babel/helpers - typeof";return um=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},um(e)}function d6(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function JS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d6(Object(n),!0).forEach(function(s){Uye(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d6(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Uye(e,t,n){return t=zye(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zye(e){var t=Wye(e,"string");return um(t)=="symbol"?t:t+""}function Wye(e,t){if(um(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(um(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lc={widthCache:{},cacheCount:0},Hye=2e3,Gye={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},u6="recharts_measurement_span";function Kye(e){var t=JS({},e);return Object.keys(t).forEach(function(n){t[n]||delete t[n]}),t}var qh=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||cu.isSsr)return{width:0,height:0};var s=Kye(n),a=JSON.stringify({text:t,copyStyle:s});if(Lc.widthCache[a])return Lc.widthCache[a];try{var i=document.getElementById(u6);i||(i=document.createElement("span"),i.setAttribute("id",u6),i.setAttribute("aria-hidden","true"),document.body.appendChild(i));var o=JS(JS({},Gye),s);Object.assign(i.style,o),i.textContent="".concat(t);var l=i.getBoundingClientRect(),c={width:l.width,height:l.height};return Lc.widthCache[a]=c,++Lc.cacheCount>Hye&&(Lc.cacheCount=0,Lc.widthCache={}),c}catch{return{width:0,height:0}}},Yye=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function hm(e){"@babel/helpers - typeof";return hm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hm(e)}function jg(e,t){return Zye(e)||Qye(e,t)||Jye(e,t)||Xye()}function Xye(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 845In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jye(e,t){if(e){if(typeof e=="string")return h6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h6(e,t)}}function h6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function Qye(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function Zye(e){if(Array.isArray(e))return e}function eve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m6(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,rve(s.key),s)}}function tve(e,t,n){return t&&m6(e.prototype,t),n&&m6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function rve(e){var t=nve(e,"string");return hm(t)=="symbol"?t:t+""}function nve(e,t){if(hm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(hm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var f6=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,p6=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,sve=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,ave=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,iU={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},ive=Object.keys(iU),Gc="NaN";function ove(e,t){return e*iU[t]}var tx=(function(){function e(t,n){eve(this,e),this.num=t,this.unit=n,this.num=t,this.unit=n,Number.isNaN(t)&&(this.unit=""),n!==""&&!sve.test(n)&&(this.num=NaN,this.unit=""),ive.includes(n)&&(this.num=ove(t,n),this.unit="px")}return tve(e,[{key:"add",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num+n.num,this.unit)}},{key:"subtract",value:function(n){return this.unit!==n.unit?new e(NaN,""):new e(this.num-n.num,this.unit)}},{key:"multiply",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num*n.num,this.unit||n.unit)}},{key:"divide",value:function(n){return this.unit!==""&&n.unit!==""&&this.unit!==n.unit?new e(NaN,""):new e(this.num/n.num,this.unit||n.unit)}},{key:"toString",value:function(){return"".concat(this.num).concat(this.unit)}},{key:"isNaN",value:function(){return Number.isNaN(this.num)}}],[{key:"parse",value:function(n){var s,a=(s=ave.exec(n))!==null&&s!==void 0?s:[],i=jg(a,3),o=i[1],l=i[2];return new e(parseFloat(o),l??"")}}])})();function oU(e){if(e.includes(Gc))return Gc;for(var t=e;t.includes("*")||t.includes("/");){var n,s=(n=f6.exec(t))!==null&&n!==void 0?n:[],a=jg(s,4),i=a[1],o=a[2],l=a[3],c=tx.parse(i??""),u=tx.parse(l??""),m=o==="*"?c.multiply(u):c.divide(u);if(m.isNaN())return Gc;t=t.replace(f6,m.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var f,p=(f=p6.exec(t))!==null&&f!==void 0?f:[],b=jg(p,4),v=b[1],g=b[2],y=b[3],w=tx.parse(v??""),N=tx.parse(y??""),S=g==="+"?w.add(N):w.subtract(N);if(S.isNaN())return Gc;t=t.replace(p6,S.toString())}return t}var x6=/\(([^()]*)\)/;function lve(e){for(var t=e;t.includes("(");){var n=x6.exec(t),s=jg(n,2),a=s[1];t=t.replace(x6,oU(a))}return t}function cve(e){var t=e.replace(/\s+/g,"");return t=lve(t),t=oU(t),t}function dve(e){try{return cve(e)}catch{return Gc}}function _1(e){var t=dve(e.slice(5,-1));return t===Gc?"":t}var uve=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],hve=["dx","dy","angle","className","breakAll"];function QS(){return QS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},QS.apply(this,arguments)}function g6(e,t){if(e==null)return{};var n=mve(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function mve(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function y6(e,t){return gve(e)||xve(e,t)||pve(e,t)||fve()}
845function fve(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 846In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pve(e,t){if(e){if(typeof e=="string")return v6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v6(e,t)}}function v6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function xve(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function gve(e){if(Array.isArray(e))return e}var lU=/[ \f\n\r\t\v\u2028\u2029]+/,cU=function(t){var n=t.children,s=t.breakAll,a=t.style;try{var i=[];yt(n)||(s?i=n.toString().split(""):i=n.toString().split(lU));var o=i.map(function(c){return{word:c,width:qh(c,a).width}}),l=s?0:qh(" ",a).width;return{wordsWithComputedWidth:o,spaceWidth:l}}catch{return null}},yve=function(t,n,s,a,i){var o=t.maxLines,l=t.children,c=t.style,u=t.breakAll,m=Te(o),f=l,p=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return L.reduce(function(F,Y){var U=Y.word,re=Y.width,G=F[F.length-1];if(G&&(a==null||i||G.width+re+s<Number(a)))G.words.push(U),G.width+=re+s;else{var B={words:[U],width:re};F.push(B)}return F},[])},b=p(n),v=function(L){return L.reduce(function(F,Y){return F.width>Y.width?F:Y})};if(!m)return b;for(var g="â¦",y=function(L){var F=f.slice(0,L),Y=cU({breakAll:u,style:c,children:F+g}).wordsWithComputedWidth,U=p(Y),re=U.length>o||v(U).width>Number(a);return[re,U]},w=0,N=f.length-1,S=0,A;w<=N&&S<=f.length-1;){var k=Math.floor((w+N)/2),C=k-1,T=y(C),P=y6(T,2),R=P[0],M=P[1],D=y(k),$=y6(D,1),q=$[0];if(!R&&!q&&(w=k+1),R&&q&&(N=k-1),!R&&q){A=M;break}S++}return A||b},b6=function(t){var n=yt(t)?[]:t.toString().split(lU);return[{words:n}]},vve=function(t){var n=t.width,s=t.scaleToFit,a=t.children,i=t.style,o=t.breakAll,l=t.maxLines;if((n||s)&&!cu.isSsr){var c,u,m=cU({breakAll:o,children:a,style:i});if(m){var f=m.wordsWithComputedWidth,p=m.spaceWidth;c=f,u=p}else return b6(a);return yve({breakAll:o,children:a,maxLines:l,style:i},c,u,n,s)}return b6(a)},j6="#808080",Bl=function(t){var n=t.x,s=n===void 0?0:n,a=t.y,i=a===void 0?0:a,o=t.lineHeight,l=o===void 0?"1em":o,c=t.capHeight,u=c===void 0?"0.71em":c,m=t.scaleToFit,f=m===void 0?!1:m,p=t.textAnchor,b=p===void 0?"start":p,v=t.verticalAnchor,g=v===void 0?"end":v,y=t.fill,w=y===void 0?j6:y,N=g6(t,uve),S=j.useMemo(function(){return vve({breakAll:N.breakAll,children:N.children,maxLines:N.maxLines,scaleToFit:f,style:N.style,width:N.width})},[N.breakAll,N.children,N.maxLines,f,N.style,N.width]),A=N.dx,k=N.dy,C=N.angle,T=N.className,P=N.breakAll,R=g6(N,hve);if(!Mr(s)||!Mr(i))return null;var M=s+(Te(A)?A:0),D=i+(Te(k)?k:0),$;switch(g){case"start":$=_1("calc(".concat(u,")"));break;case"middle":$=_1("calc(".concat((S.length-1)/2," * -").concat(l," + (").concat(u," / 2))"));break;default:$=_1("calc(".concat(S.length-1," * -").concat(l,")"));break}var q=[];if(f){var H=S[0].width,L=N.width;q.push("scale(".concat((Te(L)?L/H:1)/H,")"))}return C&&q.push("rotate(".concat(C,", ").concat(M,", ").concat(D,")")),q.length&&(R.transform=q.join(" ")),X.createElement("text",QS({},nt(R,!0),{x:M,y:D,className:ct("recharts-text",T),textAnchor:b,fill:w.includes("url")?j6:w}),S.map(function(F,Y){var U=F.words.join(P?"":" ");return X.createElement("tspan",{x:M,dy:Y===0?$:l,key:"".concat(U,"-").concat(Y)},U)}))};function lo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function bve(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function WC(e){let t,n,s;e.length!==2?(t=lo,n=(l,c)=>lo(e(l),c),s=(l,c)=>e(l)-c):(t=e===lo||e===bve?e:jve,n=e,s=e);function a(l,c,u=0,m=l.length){if(u<m){if(t(c,c)!==0)return m;do{const f=u+m>>>1;n(l[f],c)<0?u=f+1:m=f}while(u<m)}return u}function i(l,c,u=0,m=l.length){if(u<m){if(t(c,c)!==0)return m;do{const f=u+m>>>1;n(l[f],c)<=0?u=f+1:m=f}while(u<m)}return u}function o(l,c,u=0,m=l.length){const f=a(l,c,u,m-1);return f>u&&s(l[f-1],c)>-s(l[f],c)?f-1:f}return{left:a,center:o,right:i}}function jve(){return 0}function dU(e){return e===null?NaN:+e}function*wve(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const Nve=WC(lo),yf=Nve.right;WC(dU).center;class w6 extends Map{constructor(t,n=kve){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[s,a]of t)this.set(s,a)}get(t){return super.get(N6(this,t))}has(t){return super.has(N6(this,t))}set(t,n){return super.set(_ve(this,t),n)}delete(t){return super.delete(Sve(this,t))}}function N6({_intern:e,_key:t},n){const s=t(n);return e.has(s)?e.get(s):n}function _ve({_intern:e,_key:t},n){const s=t(n);return e.has(s)?e.get(s):(e.set(s,n),n)}function Sve({_intern:e,_key:t},n){const s=t(n);return e.has(s)&&(n=e.get(s),e.delete(s)),n}function kve(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Cve(e=lo){if(e===lo)return uU;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const s=e(t,n);return s||s===0?s:(e(n,n)===0)-(e(t,t)===0)}}function uU(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const Ave=Math.sqrt(50),Tve=Math.sqrt(10),Eve=Math.sqrt(2);function wg(e,t,n){const s=(t-e)/Math.max(0,n),a=Math.floor(Math.log10(s)),i=s/Math.pow(10,a),o=i>=Ave?10:i>=Tve?5:i>=Eve?2:1;let l,c,u;return a<0?(u=Math.pow(10,-a)/o,l=Math.round(e*u),c=Math.round(t*u),l/u<e&&++l,c/u>t&&--c,u=-u):(u=Math.pow(10,a)*o,l=Math.round(e/u),c=Math.round(t/u),l*u<e&&++l,c*u>t&&--c),c<l&&.5<=n&&n<2?wg(e,t,n*2):[l,c,u]}function ZS(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const s=t<e,[a,i,o]=s?wg(t,e,n):wg(e,t,n);if(!(i>=a))return[];const l=i-a+1,c=new Array(l);if(s)if(o<0)for(let u=0;u<l;++u)c[u]=(i-u)/-o;else for(let u=0;u<l;++u)c[u]=(i-u)*o;else if(o<0)for(let u=0;u<l;++u)c[u]=(a+u)/-o;else for(let u=0;u<l;++u)c[u]=(a+u)*o;return c}function e2(e,t,n){return t=+t,e=+e,n=+n,wg(e,t,n)[2]}function t2(e,t,n){t=+t,e=+e,n=+n;const s=t<e,a=s?e2(t,e,n):e2(e,t,n);return(s?-1:1)*(a<0?1/-a:a)}function _6(e,t){let n;for(const s of e)s!=null&&(n<s||n===void 0&&s>=s)&&(n=s);return n}function S6(e,t){let n;for(const s of e)s!=null&&(n>s||n===void 0&&s>=s)&&(n=s);return n}function hU(e,t,n=0,s=1/0,a){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),s=Math.floor(Math.min(e.length-1,s)),!(n<=t&&t<=s))return e;for(a=a===void 0?uU:Cve(a);s>n;){if(s-n>600){const c=s-n+1,u=t-n+1,m=Math.log(c),f=.5*Math.exp(2*m/3),p=.5*Math.sqrt(m*f*(c-f)/c)*(u-c/2<0?-1:1),b=Math.max(n,Math.floor(t-u*f/c+p)),v=Math.min(s,Math.floor(t+(c-u)*f/c+p));hU(e,t,b,v,a)}const i=e[t];let o=n,l=s;for(oh(e,n,t),a(e[s],i)>0&&oh(e,n,s);o<l;){for(oh(e,o,l),++o,--l;a(e[o],i)<0;)++o;for(;a(e[l],i)>0;)--l}a(e[n],i)===0?oh(e,n,l):(++l,oh(e,l,s)),l<=t&&(n=l+1),t<=l&&(s=l-1)}return e}function oh(e,t,n){const s=e[t];e[t]=e[n],e[n]=s}function Pve(e,t,n){if(e=Float64Array.from(wve(e)),!(!(s=e.length)||isNaN(t=+t))){if(t<=0||s<2)return S6(e);if(t>=1)return _6(e);var s,a=(s-1)*t,i=Math.floor(a),o=_6(hU(e,i).subarray(0,i+1)),l=S6(e.subarray(i+1));return o+(l-o)*(a-i)}}function Ove(e,t,n=dU){if(!(!(s=e.length)||isNaN(t=+t))){if(t<=0||s<2)return+n(e[0],0,e);if(t>=1)return+n(e[s-1],s-1,e);var s,a=(s-1)*t,i=Math.floor(a),o=+n(e[i],i,e),l=+n(e[i+1],i+1,e);return o+(l-o)*(a-i)}}function Mve(e,t,n){e=+e,t=+t,n=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+n;for(var s=-1,a=Math.max(0,Math.ceil((t-e)/n))|0,i=new Array(a);++s<a;)i[s]=e+s*n;return i}function _s(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function fi(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}
vendor: 9,093 bytes, line 846
846const r2=Symbol("implicit");function HC(){var e=new w6,t=[],n=[],s=r2;function a(i){let o=e.get(i);if(o===void 0){if(s!==r2)return s;e.set(i,o=t.push(i)-1)}return n[o%n.length]}return a.domain=function(i){if(!arguments.length)return t.slice();t=[],e=new w6;for(const o of i)e.has(o)||e.set(o,t.push(o)-1);return a},a.range=function(i){return arguments.length?(n=Array.from(i),a):n.slice()},a.unknown=function(i){return arguments.length?(s=i,a):s},a.copy=function(){return HC(t,n).unknown(s)},_s.apply(a,arguments),a}function mm(){var e=HC().unknown(void 0),t=e.domain,n=e.range,s=0,a=1,i,o,l=!1,c=0,u=0,m=.5;delete e.unknown;function f(){var p=t().length,b=a<s,v=b?a:s,g=b?s:a;i=(g-v)/Math.max(1,p-c+u*2),l&&(i=Math.floor(i)),v+=(g-v-i*(p-c))*m,o=i*(1-c),l&&(v=Math.round(v),o=Math.round(o));var y=Mve(p).map(function(w){return v+i*w});return n(b?y.reverse():y)}return e.domain=function(p){return arguments.length?(t(p),f()):t()},e.range=function(p){return arguments.length?([s,a]=p,s=+s,a=+a,f()):[s,a]},e.rangeRound=function(p){return[s,a]=p,s=+s,a=+a,l=!0,f()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(p){return arguments.length?(l=!!p,f()):l},e.padding=function(p){return arguments.length?(c=Math.min(1,u=+p),f()):c},e.paddingInner=function(p){return arguments.length?(c=Math.min(1,p),f()):c},e.paddingOuter=function(p){return arguments.length?(u=+p,f()):u},e.align=function(p){return arguments.length?(m=Math.max(0,Math.min(1,p)),f()):m},e.copy=function(){return mm(t(),[s,a]).round(l).paddingInner(c).paddingOuter(u).align(m)},_s.apply(f(),arguments)}function mU(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return mU(t())},e}function Vh(){return mU(mm.apply(null,arguments).paddingInner(1))}function GC(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fU(e,t){var n=Object.create(e.prototype);for(var s in t)n[s]=t[s];return n}function vf(){}var fm=.7,Ng=1/fm,nd="\\s*([+-]?\\d+)\\s*",pm="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",pa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Rve=/^#([0-9a-f]{3,8})$/,Ive=new RegExp(`^rgb\\(${nd},${nd},${nd}\\)$`),Dve=new RegExp(`^rgb\\(${pa},${pa},${pa}\\)$`),Lve=new RegExp(`^rgba\\(${nd},${nd},${nd},${pm}\\)$`),$ve=new RegExp(`^rgba\\(${pa},${pa},${pa},${pm}\\)$`),Fve=new RegExp(`^hsl\\(${pm},${pa},${pa}\\)$`),Bve=new RegExp(`^hsla\\(${pm},${pa},${pa},${pm}\\)$`),k6={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};GC(vf,xm,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:C6,formatHex:C6,formatHex8:qve,formatHsl:Vve,formatRgb:A6,toString:A6});function C6(){return this.rgb().formatHex()}function qve(){return this.rgb().formatHex8()}function Vve(){return pU(this).formatHsl()}function A6(){return this.rgb().formatRgb()}function xm(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Rve.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?T6(t):n===3?new Mn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?rx(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?rx(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Ive.exec(e))?new Mn(t[1],t[2],t[3],1):(t=Dve.exec(e))?new Mn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lve.exec(e))?rx(t[1],t[2],t[3],t[4]):(t=$ve.exec(e))?rx(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Fve.exec(e))?O6(t[1],t[2]/100,t[3]/100,1):(t=Bve.exec(e))?O6(t[1],t[2]/100,t[3]/100,t[4]):k6.hasOwnProperty(e)?T6(k6[e]):e==="transparent"?new Mn(NaN,NaN,NaN,0):null}function T6(e){return new Mn(e>>16&255,e>>8&255,e&255,1)}function rx(e,t,n,s){return s<=0&&(e=t=n=NaN),new Mn(e,t,n,s)}function Uve(e){return e instanceof vf||(e=xm(e)),e?(e=e.rgb(),new Mn(e.r,e.g,e.b,e.opacity)):new Mn}function n2(e,t,n,s){return arguments.length===1?Uve(e):new Mn(e,t,n,s??1)}function Mn(e,t,n,s){this.r=+e,this.g=+t,this.b=+n,this.opacity=+s}GC(Mn,n2,fU(vf,{brighter(e){return e=e==null?Ng:Math.pow(Ng,e),new Mn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?fm:Math.pow(fm,e),new Mn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Mn(Sl(this.r),Sl(this.g),Sl(this.b),_g(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:E6,formatHex:E6,formatHex8:zve,formatRgb:P6,toString:P6}));function E6(){return`#${dl(this.r)}${dl(this.g)}${dl(this.b)}`}function zve(){return`#${dl(this.r)}${dl(this.g)}${dl(this.b)}${dl((isNaN(this.opacity)?1:this.opacity)*255)}`}function P6(){const e=_g(this.opacity);return`${e===1?"rgb(":"rgba("}${Sl(this.r)}, ${Sl(this.g)}, ${Sl(this.b)}${e===1?")":`, ${e})`}`}function _g(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Sl(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function dl(e){return e=Sl(e),(e<16?"0":"")+e.toString(16)}function O6(e,t,n,s){return s<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new qs(e,t,n,s)}function pU(e){if(e instanceof qs)return new qs(e.h,e.s,e.l,e.opacity);if(e instanceof vf||(e=xm(e)),!e)return new qs;if(e instanceof qs)return e;e=e.rgb();var t=e.r/255,n=e.g/255,s=e.b/255,a=Math.min(t,n,s),i=Math.max(t,n,s),o=NaN,l=i-a,c=(i+a)/2;return l?(t===i?o=(n-s)/l+(n<s)*6:n===i?o=(s-t)/l+2:o=(t-n)/l+4,l/=c<.5?i+a:2-i-a,o*=60):l=c>0&&c<1?0:o,new qs(o,l,c,e.opacity)}function Wve(e,t,n,s){return arguments.length===1?pU(e):new qs(e,t,n,s??1)}function qs(e,t,n,s){this.h=+e,this.s=+t,this.l=+n,this.opacity=+s}GC(qs,Wve,fU(vf,{brighter(e){return e=e==null?Ng:Math.pow(Ng,e),new qs(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?fm:Math.pow(fm,e),new qs(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,s=n+(n<.5?n:1-n)*t,a=2*n-s;return new Mn(S1(e>=240?e-240:e+120,a,s),S1(e,a,s),S1(e<120?e+240:e-120,a,s),this.opacity)},clamp(){return new qs(M6(this.h),nx(this.s),nx(this.l),_g(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=_g(this.opacity);return`${e===1?"hsl(":"hsla("}${M6(this.h)}, ${nx(this.s)*100}%, ${nx(this.l)*100}%${e===1?")":`, ${e})`}`}}));function M6(e){return e=(e||0)%360,e<0?e+360:e}function nx(e){return Math.max(0,Math.min(1,e||0))}function S1(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}
vendor: 4,136 bytes, line 846
846const KC=e=>()=>e;function Hve(e,t){return function(n){return e+n*t}}function Gve(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(s){return Math.pow(e+s*t,n)}}function Kve(e){return(e=+e)==1?xU:function(t,n){return n-t?Gve(t,n,e):KC(isNaN(t)?n:t)}}function xU(e,t){var n=t-e;return n?Hve(e,n):KC(isNaN(e)?t:e)}const R6=(function e(t){var n=Kve(t);function s(a,i){var o=n((a=n2(a)).r,(i=n2(i)).r),l=n(a.g,i.g),c=n(a.b,i.b),u=xU(a.opacity,i.opacity);return function(m){return a.r=o(m),a.g=l(m),a.b=c(m),a.opacity=u(m),a+""}}return s.gamma=e,s})(1);function Yve(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,s=t.slice(),a;return function(i){for(a=0;a<n;++a)s[a]=e[a]*(1-i)+t[a]*i;return s}}function Xve(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Jve(e,t){var n=t?t.length:0,s=e?Math.min(n,e.length):0,a=new Array(s),i=new Array(n),o;for(o=0;o<s;++o)a[o]=du(e[o],t[o]);for(;o<n;++o)i[o]=t[o];return function(l){for(o=0;o<s;++o)i[o]=a[o](l);return i}}function Qve(e,t){var n=new Date;return e=+e,t=+t,function(s){return n.setTime(e*(1-s)+t*s),n}}function Sg(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function Zve(e,t){var n={},s={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?n[a]=du(e[a],t[a]):s[a]=t[a];return function(i){for(a in n)s[a]=n[a](i);return s}}var s2=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,k1=new RegExp(s2.source,"g");function ebe(e){return function(){return e}}function tbe(e){return function(t){return e(t)+""}}function rbe(e,t){var n=s2.lastIndex=k1.lastIndex=0,s,a,i,o=-1,l=[],c=[];for(e=e+"",t=t+"";(s=s2.exec(e))&&(a=k1.exec(t));)(i=a.index)>n&&(i=t.slice(n,i),l[o]?l[o]+=i:l[++o]=i),(s=s[0])===(a=a[0])?l[o]?l[o]+=a:l[++o]=a:(l[++o]=null,c.push({i:o,x:Sg(s,a)})),n=k1.lastIndex;return n<t.length&&(i=t.slice(n),l[o]?l[o]+=i:l[++o]=i),l.length<2?c[0]?tbe(c[0].x):ebe(t):(t=c.length,function(u){for(var m=0,f;m<t;++m)l[(f=c[m]).i]=f.x(u);return l.join("")})}function du(e,t){var n=typeof t,s;return t==null||n==="boolean"?KC(t):(n==="number"?Sg:n==="string"?(s=xm(t))?(t=s,R6):rbe:t instanceof xm?R6:t instanceof Date?Qve:Xve(t)?Yve:Array.isArray(t)?Jve:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Zve:Sg)(e,t)}function YC(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function nbe(e,t){t===void 0&&(t=e,e=du);for(var n=0,s=t.length-1,a=t[0],i=new Array(s<0?0:s);n<s;)i[n]=e(a,a=t[++n]);return function(o){var l=Math.max(0,Math.min(s-1,Math.floor(o*=s)));return i[l](o-l)}}function sbe(e){return function(){return e}}function kg(e){return+e}var I6=[0,1];function vn(e){return e}function a2(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:sbe(isNaN(t)?NaN:.5)}function abe(e,t){var n;return e>t&&(n=e,e=t,t=n),function(s){return Math.max(e,Math.min(t,s))}}function ibe(e,t,n){var s=e[0],a=e[1],i=t[0],o=t[1];return a<s?(s=a2(a,s),i=n(o,i)):(s=a2(s,a),i=n(i,o)),function(l){return i(s(l))}}function obe(e,t,n){var s=Math.min(e.length,t.length)-1,a=new Array(s),i=new Array(s),o=-1;for(e[s]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<s;)a[o]=a2(e[o],e[o+1]),i[o]=n(t[o],t[o+1]);return function(l){var c=yf(e,l,1,s)-1;return i[c](a[c](l))}}function bf(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function sv(){var e=I6,t=I6,n=du,s,a,i,o=vn,l,c,u;function m(){var p=Math.min(e.length,t.length);return o!==vn&&(o=abe(e[0],e[p-1])),l=p>2?obe:ibe,c=u=null,f}function f(p){return p==null||isNaN(p=+p)?i:(c||(c=l(e.map(s),t,n)))(s(o(p)))}return f.invert=function(p){return o(a((u||(u=l(t,e.map(s),Sg)))(p)))},f.domain=function(p){return arguments.length?(e=Array.from(p,kg),m()):e.slice()},f.range=function(p){return arguments.length?(t=Array.from(p),m()):t.slice()},f.rangeRound=function(p){return t=Array.from(p),n=YC,m()},f.clamp=function(p){return arguments.length?(o=p?!0:vn,m()):o!==vn},f.interpolate=function(p){return arguments.length?(n=p,m()):n},f.unknown=function(p){return arguments.length?(i=p,f):i},function(p,b){return s=p,a=b,m()}}function XC(){return sv()(vn,vn)}
vendor: 7,713 bytes, line 846
846function lbe(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Cg(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),s=e.slice(0,n);return[s.length>1?s[0]+s.slice(2):s,+e.slice(n+1)]}function Ed(e){return e=Cg(Math.abs(e)),e?e[1]:NaN}function cbe(e,t){return function(n,s){for(var a=n.length,i=[],o=0,l=e[0],c=0;a>0&&l>0&&(c+l+1>s&&(l=Math.max(1,s-c)),i.push(n.substring(a-=l,a+l)),!((c+=l+1)>s));)l=e[o=(o+1)%e.length];return i.reverse().join(t)}}function dbe(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ube=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function gm(e){if(!(t=ube.exec(e)))throw new Error("invalid format: "+e);var t;return new JC({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}gm.prototype=JC.prototype;function JC(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}JC.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function hbe(e){e:for(var t=e.length,n=1,s=-1,a;n<t;++n)switch(e[n]){case".":s=a=n;break;case"0":s===0&&(s=n),a=n;break;default:if(!+e[n])break e;s>0&&(s=0);break}return s>0?e.slice(0,s)+e.slice(a+1):e}var Ag;function mbe(e,t){var n=Cg(e,t);if(!n)return Ag=void 0,e.toPrecision(t);var s=n[0],a=n[1],i=a-(Ag=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,o=s.length;return i===o?s:i>o?s+new Array(i-o+1).join("0"):i>0?s.slice(0,i)+"."+s.slice(i):"0."+new Array(1-i).join("0")+Cg(e,Math.max(0,t+i-1))[0]}function D6(e,t){var n=Cg(e,t);if(!n)return e+"";var s=n[0],a=n[1];return a<0?"0."+new Array(-a).join("0")+s:s.length>a+1?s.slice(0,a+1)+"."+s.slice(a+1):s+new Array(a-s.length+2).join("0")}const L6={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lbe,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>D6(e*100,t),r:D6,s:mbe,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function $6(e){return e}var F6=Array.prototype.map,B6=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function fbe(e){var t=e.grouping===void 0||e.thousands===void 0?$6:cbe(F6.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",s=e.currency===void 0?"":e.currency[1]+"",a=e.decimal===void 0?".":e.decimal+"",i=e.numerals===void 0?$6:dbe(F6.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",l=e.minus===void 0?"â":e.minus+"",c=e.nan===void 0?"NaN":e.nan+"";function u(f,p){f=gm(f);var b=f.fill,v=f.align,g=f.sign,y=f.symbol,w=f.zero,N=f.width,S=f.comma,A=f.precision,k=f.trim,C=f.type;C==="n"?(S=!0,C="g"):L6[C]||(A===void 0&&(A=12),k=!0,C="g"),(w||b==="0"&&v==="=")&&(w=!0,b="0",v="=");var T=(p&&p.prefix!==void 0?p.prefix:"")+(y==="$"?n:y==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():""),P=(y==="$"?s:/[%p]/.test(C)?o:"")+(p&&p.suffix!==void 0?p.suffix:""),R=L6[C],M=/[defgprs%]/.test(C);A=A===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,A)):Math.max(0,Math.min(20,A));function D($){var q=T,H=P,L,F,Y;if(C==="c")H=R($)+H,$="";else{$=+$;var U=$<0||1/$<0;if($=isNaN($)?c:R(Math.abs($),A),k&&($=hbe($)),U&&+$==0&&g!=="+"&&(U=!1),q=(U?g==="("?g:l:g==="-"||g==="("?"":g)+q,H=(C==="s"&&!isNaN($)&&Ag!==void 0?B6[8+Ag/3]:"")+H+(U&&g==="("?")":""),M){for(L=-1,F=$.length;++L<F;)if(Y=$.charCodeAt(L),48>Y||Y>57){H=(Y===46?a+$.slice(L+1):$.slice(L))+H,$=$.slice(0,L);break}}}S&&!w&&($=t($,1/0));var re=q.length+$.length+H.length,G=re<N?new Array(N-re+1).join(b):"";switch(S&&w&&($=t(G+$,G.length?N-H.length:1/0),G=""),v){case"<":$=q+$+H+G;break;case"=":$=q+G+$+H;break;case"^":$=G.slice(0,re=G.length>>1)+q+$+H+G.slice(re);break;default:$=G+q+$+H;break}return i($)}return D.toString=function(){return f+""},D}function m(f,p){var b=Math.max(-8,Math.min(8,Math.floor(Ed(p)/3)))*3,v=Math.pow(10,-b),g=u((f=gm(f),f.type="f",f),{suffix:B6[8+b/3]});return function(y){return g(v*y)}}return{format:u,formatPrefix:m}}var sx,QC,gU;pbe({thousands:",",grouping:[3],currency:["$",""]});function pbe(e){return sx=fbe(e),QC=sx.format,gU=sx.formatPrefix,sx}function xbe(e){return Math.max(0,-Ed(Math.abs(e)))}function gbe(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ed(t)/3)))*3-Ed(Math.abs(e)))}function ybe(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ed(t)-Ed(e))+1}function yU(e,t,n,s){var a=t2(e,t,n),i;switch(s=gm(s??",f"),s.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return s.precision==null&&!isNaN(i=gbe(a,o))&&(s.precision=i),gU(s,o)}case"":case"e":case"g":case"p":case"r":{s.precision==null&&!isNaN(i=ybe(a,Math.max(Math.abs(e),Math.abs(t))))&&(s.precision=i-(s.type==="e"));break}case"f":case"%":{s.precision==null&&!isNaN(i=xbe(a))&&(s.precision=i-(s.type==="%")*2);break}}return QC(s)}function So(e){var t=e.domain;return e.ticks=function(n){var s=t();return ZS(s[0],s[s.length-1],n??10)},e.tickFormat=function(n,s){var a=t();return yU(a[0],a[a.length-1],n??10,s)},e.nice=function(n){n==null&&(n=10);var s=t(),a=0,i=s.length-1,o=s[a],l=s[i],c,u,m=10;for(l<o&&(u=o,o=l,l=u,u=a,a=i,i=u);m-- >0;){if(u=e2(o,l,n),u===c)return s[a]=o,s[i]=l,t(s);if(u>0)o=Math.floor(o/u)*u,l=Math.ceil(l/u)*u;else if(u<0)o=Math.ceil(o*u)/u,l=Math.floor(l*u)/u;else break;c=u}return e},e}function Tg(){var e=XC();return e.copy=function(){return bf(e,Tg())},_s.apply(e,arguments),So(e)}function vU(e){var t;function n(s){return s==null||isNaN(s=+s)?t:s}return n.invert=n,n.domain=n.range=function(s){return arguments.length?(e=Array.from(s,kg),n):e.slice()},n.unknown=function(s){return arguments.length?(t=s,n):t},n.copy=function(){return vU(e).unknown(t)},e=arguments.length?Array.from(e,kg):[0,1],So(n)}function bU(e,t){e=e.slice();var n=0,s=e.length-1,a=e[n],i=e[s],o;return i<a&&(o=n,n=s,s=o,o=a,a=i,i=o),e[n]=t.floor(a),e[s]=t.ceil(i),e}function q6(e){return Math.log(e)}function V6(e){return Math.exp(e)}function vbe(e){return-Math.log(-e)}function bbe(e){return-Math.exp(-e)}function jbe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function wbe(e){return e===10?jbe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function Nbe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function U6(e){return(t,n)=>-e(-t,n)}function ZC(e){const t=e(q6,V6),n=t.domain;let s=10,a,i;function o(){return a=Nbe(s),i=wbe(s),n()[0]<0?(a=U6(a),i=U6(i),e(vbe,bbe)):e(q6,V6),t}return t.base=function(l){return arguments.length?(s=+l,o()):s},t.domain=function(l){return arguments.length?(n(l),o()):n()},t.ticks=l=>{const c=n();let u=c[0],m=c[c.length-1];const f=m<u;f&&([u,m]=[m,u]);let p=a(u),b=a(m),v,g;const y=l==null?10:+l;let w=[];if(!(s%1)&&b-p<y){if(p=Math.floor(p),b=Math.ceil(b),u>0){for(;p<=b;++p)for(v=1;v<s;++v)if(g=p<0?v/i(-p):v*i(p),!(g<u)){if(g>m)break;w.push(g)}}else for(;p<=b;++p)for(v=s-1;v>=1;--v)if(g=p>0?v/i(-p):v*i(p),!(g<u)){if(g>m)break;w.push(g)}w.length*2<y&&(w=ZS(u,m,y))}else w=ZS(p,b,Math.min(b-p,y)).map(i);return f?w.reverse():w},t.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=s===10?"s":","),typeof c!="function"&&(!(s%1)&&(c=gm(c)).precision==null&&(c.trim=!0),c=
846QC(c)),l===1/0)return c;const u=Math.max(1,s*l/t.ticks().length);return m=>{let f=m/i(Math.round(a(m)));return f*s<s-.5&&(f*=s),f<=u?c(m):""}},t.nice=()=>n(bU(n(),{floor:l=>i(Math.floor(a(l))),ceil:l=>i(Math.ceil(a(l)))})),t}function jU(){const e=ZC(sv()).domain([1,10]);return e.copy=()=>bf(e,jU()).base(e.base()),_s.apply(e,arguments),e}function z6(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function W6(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function eA(e){var t=1,n=e(z6(t),W6(t));return n.constant=function(s){return arguments.length?e(z6(t=+s),W6(t)):t},So(n)}function wU(){var e=eA(sv());return e.copy=function(){return bf(e,wU()).constant(e.constant())},_s.apply(e,arguments)}function H6(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function _be(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function Sbe(e){return e<0?-e*e:e*e}function tA(e){var t=e(vn,vn),n=1;function s(){return n===1?e(vn,vn):n===.5?e(_be,Sbe):e(H6(n),H6(1/n))}return t.exponent=function(a){return arguments.length?(n=+a,s()):n},So(t)}function rA(){var e=tA(sv());return e.copy=function(){return bf(e,rA()).exponent(e.exponent())},_s.apply(e,arguments),e}function kbe(){return rA.apply(null,arguments).exponent(.5)}function G6(e){return Math.sign(e)*e*e}function Cbe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function NU(){var e=XC(),t=[0,1],n=!1,s;function a(i){var o=Cbe(e(i));return isNaN(o)?s:n?Math.round(o):o}return a.invert=function(i){return e.invert(G6(i))},a.domain=function(i){return arguments.length?(e.domain(i),a):e.domain()},a.range=function(i){return arguments.length?(e.range((t=Array.from(i,kg)).map(G6)),a):t.slice()},a.rangeRound=function(i){return a.range(i).round(!0)},a.round=function(i){return arguments.length?(n=!!i,a):n},a.clamp=function(i){return arguments.length?(e.clamp(i),a):e.clamp()},a.unknown=function(i){return arguments.length?(s=i,a):s},a.copy=function(){return NU(e.domain(),t).round(n).clamp(e.clamp()).unknown(s)},_s.apply(a,arguments),So(a)}function _U(){var e=[],t=[],n=[],s;function a(){var o=0,l=Math.max(1,t.length);for(n=new Array(l-1);++o<l;)n[o-1]=Ove(e,o/l);return i}function i(o){return o==null||isNaN(o=+o)?s:t[yf(n,o)]}return i.invertExtent=function(o){var l=t.indexOf(o);return l<0?[NaN,NaN]:[l>0?n[l-1]:e[0],l<n.length?n[l]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let l of o)l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(lo),a()},i.range=function(o){return arguments.length?(t=Array.from(o),a()):t.slice()},i.unknown=function(o){return arguments.length?(s=o,i):s},i.quantiles=function(){return n.slice()},i.copy=function(){return _U().domain(e).range(t).unknown(s)},_s.apply(i,arguments)}function SU(){var e=0,t=1,n=1,s=[.5],a=[0,1],i;function o(c){return c!=null&&c<=c?a[yf(s,c,0,n)]:i}function l(){var c=-1;for(s=new Array(n);++c<n;)s[c]=((c+1)*t-(c-n)*e)/(n+1);return o}return o.domain=function(c){return arguments.length?([e,t]=c,e=+e,t=+t,l()):[e,t]},o.range=function(c){return arguments.length?(n=(a=Array.from(c)).length-1,l()):a.slice()},o.invertExtent=function(c){var u=a.indexOf(c);return u<0?[NaN,NaN]:u<1?[e,s[0]]:u>=n?[s[n-1],t]:[s[u-1],s[u]]},o.unknown=function(c){return arguments.length&&(i=c),o},o.thresholds=function(){return s.slice()},o.copy=function(){return SU().domain([e,t]).range(a).unknown(i)},_s.apply(So(o),arguments)}function kU(){var e=[.5],t=[0,1],n,s=1;function a(i){return i!=null&&i<=i?t[yf(e,i,0,s)]:n}return a.domain=function(i){return arguments.length?(e=Array.from(i),s=Math.min(e.length,t.length-1),a):e.slice()},a.range=function(i){return arguments.length?(t=Array.from(i),s=Math.min(e.length,t.length-1),a):t.slice()},a.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},a.unknown=function(i){return arguments.length?(n=i,a):n},a.copy=function(){return kU().domain(e).range(t).unknown(n)},_s.apply(a,arguments)}const C1=new Date,A1=new Date;function Rr(e,t,n,s){function a(i){return e(i=arguments.length===0?new Date:new Date(+i)),i}return a.floor=i=>(e(i=new Date(+i)),i),a.ceil=i=>(e(i=new Date(i-1)),t(i,1),e(i),i),a.round=i=>{const o=a(i),l=a.ceil(i);return i-o<l-i?o:l},a.offset=(i,o)=>(t(i=new Date(+i),o==null?1:Math.floor(o)),i),a.range=(i,o,l)=>{const c=[];if(i=a.ceil(i),l=l==null?1:Math.floor(l),!(i<o)||!(l>0))return c;let u;do c.push(u=new Date(+i)),t(i,l),e(i);while(u<i&&i<o);return c},a.filter=i=>Rr(o=>{if(o>=o)for(;e(o),!i(o);)o.setTime(o-1)},(o,l)=>{if(o>=o)if(l<0)for(;++l<=0;)for(;t(o,-1),!i(o););else for(;--l>=0;)for(;t(o,1),!i(o););}),n&&(a.count=(i,o)=>(C1.setTime(+i),A1.setTime(+o),e(C1),e(A1),Math.floor(n(C1,A1))),a.every=i=>(i=Math.floor(i),!isFinite(i)||!(i>0)?null:i>1?a.filter(s?o=>s(o)%i===0:o=>a.count(0,o)%i===0):a)),a}const Eg=Rr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Eg.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Rr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Eg);Eg.range;const Ka=1e3,ys=Ka*60,Ya=ys*60,oi=Ya*24,nA=oi*7,K6=oi*30,T1=oi*365,ul=Rr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Ka)},(e,t)=>(t-e)/Ka,e=>e.getUTCSeconds());ul.range;const sA=Rr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ka)},(e,t)=>{e.setTime(+e+t*ys)},(e,t)=>(t-e)/ys,e=>e.getMinutes());sA.range;const aA=Rr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*ys)},(e,t)=>(t-e)/ys,e=>e.getUTCMinutes());aA.range;const iA=Rr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Ka-e.getMinutes()*ys)},(e,t)=>{e.setTime(+e+t*Ya)},(e,t)=>(t-e)/Ya,e=>e.getHours());iA.range;
vendor: 4,720 bytes, line 846
846const oA=Rr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ya)},(e,t)=>(t-e)/Ya,e=>e.getUTCHours());oA.range;const jf=Rr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*ys)/oi,e=>e.getDate()-1);jf.range;const av=Rr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/oi,e=>e.getUTCDate()-1);av.range;const CU=Rr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/oi,e=>Math.floor(e/oi));CU.range;function tc(e){return Rr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*ys)/nA)}const iv=tc(0),Pg=tc(1),Abe=tc(2),Tbe=tc(3),Pd=tc(4),Ebe=tc(5),Pbe=tc(6);iv.range;Pg.range;Abe.range;Tbe.range;Pd.range;Ebe.range;Pbe.range;function rc(e){return Rr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/nA)}const ov=rc(0),Og=rc(1),Obe=rc(2),Mbe=rc(3),Od=rc(4),Rbe=rc(5),Ibe=rc(6);ov.range;Og.range;Obe.range;Mbe.range;Od.range;Rbe.range;Ibe.range;const lA=Rr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());lA.range;const cA=Rr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());cA.range;const li=Rr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());li.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Rr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});li.range;const ci=Rr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());ci.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Rr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});ci.range;function AU(e,t,n,s,a,i){const o=[[ul,1,Ka],[ul,5,5*Ka],[ul,15,15*Ka],[ul,30,30*Ka],[i,1,ys],[i,5,5*ys],[i,15,15*ys],[i,30,30*ys],[a,1,Ya],[a,3,3*Ya],[a,6,6*Ya],[a,12,12*Ya],[s,1,oi],[s,2,2*oi],[n,1,nA],[t,1,K6],[t,3,3*K6],[e,1,T1]];function l(u,m,f){const p=m<u;p&&([u,m]=[m,u]);const b=f&&typeof f.range=="function"?f:c(u,m,f),v=b?b.range(u,+m+1):[];return p?v.reverse():v}function c(u,m,f){const p=Math.abs(m-u)/f,b=WC(([,,y])=>y).right(o,p);if(b===o.length)return e.every(t2(u/T1,m/T1,f));if(b===0)return Eg.every(Math.max(t2(u,m,f),1));const[v,g]=o[p/o[b-1][2]<o[b][2]/p?b-1:b];return v.every(g)}return[l,c]}const[Dbe,Lbe]=AU(ci,cA,ov,CU,oA,aA),[$be,Fbe]=AU(li,lA,iv,jf,iA,sA);function E1(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function P1(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function lh(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Bbe(e){var t=e.dateTime,n=e.date,s=e.time,a=e.periods,i=e.days,o=e.shortDays,l=e.months,c=e.shortMonths,u=ch(a),m=dh(a),f=ch(i),p=dh(i),b=ch(o),v=dh(o),g=ch(l),y=dh(l),w=ch(c),N=dh(c),S={a:Y,A:U,b:re,B:G,c:null,d:eI,e:eI,f:c0e,g:v0e,G:j0e,H:i0e,I:o0e,j:l0e,L:TU,m:d0e,M:u0e,p:B,q:z,Q:nI,s:sI,S:h0e,u:m0e,U:f0e,V:p0e,w:x0e,W:g0e,x:null,X:null,y:y0e,Y:b0e,Z:w0e,"%":rI},A={a:he,A:fe,b:be,B:xe,c:null,d:tI,e:tI,f:k0e,g:D0e,G:$0e,H:N0e,I:_0e,j:S0e,L:PU,m:C0e,M:A0e,p:pe,q:Ae,Q:nI,s:sI,S:T0e,u:E0e,U:P0e,V:O0e,w:M0e,W:R0e,x:null,X:null,y:I0e,Y:L0e,Z:F0e,"%":rI},k={a:M,A:D,b:$,B:q,c:H,d:Q6,e:Q6,f:r0e,g:J6,G:X6,H:Z6,I:Z6,j:Qbe,L:t0e,m:Jbe,M:Zbe,p:R,q:Xbe,Q:s0e,s:a0e,S:e0e,u:Wbe,U:Hbe,V:Gbe,w:zbe,W:Kbe,x:L,X:F,y:J6,Y:X6,Z:Ybe,"%":n0e};S.x=C(n,S),S.X=C(s,S),S.c=C(t,S),A.x=C(n,A),A.X=C(s,A),A.c=C(t,A);function C(ie,Ne){return function(Se){var te=[],Oe=-1,ye=0,Ee=ie.length,ke,ze,xt;for(Se instanceof Date||(Se=new Date(+Se));++Oe<Ee;)ie.charCodeAt(Oe)===37&&(te.push(ie.slice(ye,Oe)),(ze=Y6[ke=ie.charAt(++Oe)])!=null?ke=ie.charAt(++Oe):ze=ke==="e"?" ":"0",(xt=Ne[ke])&&(ke=xt(Se,ze)),te.push(ke),ye=Oe+1);return te.push(ie.slice(ye,Oe)),te.join("")}}function T(ie,Ne){return function(Se){var te=lh(1900,void 0,1),Oe=P(te,ie,Se+="",0),ye,Ee;if(Oe!=Se.length)return null;if("Q"in te)return new Date(te.Q);if("s"in te)return new Date(te.s*1e3+("L"in te?te.L:0));
vendor: 7,305 bytes, line 846
846if(Ne&&!("Z"in te)&&(te.Z=0),"p"in te&&(te.H=te.H%12+te.p*12),te.m===void 0&&(te.m="q"in te?te.q:0),"V"in te){if(te.V<1||te.V>53)return null;"w"in te||(te.w=1),"Z"in te?(ye=P1(lh(te.y,0,1)),Ee=ye.getUTCDay(),ye=Ee>4||Ee===0?Og.ceil(ye):Og(ye),ye=av.offset(ye,(te.V-1)*7),te.y=ye.getUTCFullYear(),te.m=ye.getUTCMonth(),te.d=ye.getUTCDate()+(te.w+6)%7):(ye=E1(lh(te.y,0,1)),Ee=ye.getDay(),ye=Ee>4||Ee===0?Pg.ceil(ye):Pg(ye),ye=jf.offset(ye,(te.V-1)*7),te.y=ye.getFullYear(),te.m=ye.getMonth(),te.d=ye.getDate()+(te.w+6)%7)}else("W"in te||"U"in te)&&("w"in te||(te.w="u"in te?te.u%7:"W"in te?1:0),Ee="Z"in te?P1(lh(te.y,0,1)).getUTCDay():E1(lh(te.y,0,1)).getDay(),te.m=0,te.d="W"in te?(te.w+6)%7+te.W*7-(Ee+5)%7:te.w+te.U*7-(Ee+6)%7);return"Z"in te?(te.H+=te.Z/100|0,te.M+=te.Z%100,P1(te)):E1(te)}}function P(ie,Ne,Se,te){for(var Oe=0,ye=Ne.length,Ee=Se.length,ke,ze;Oe<ye;){if(te>=Ee)return-1;if(ke=Ne.charCodeAt(Oe++),ke===37){if(ke=Ne.charAt(Oe++),ze=k[ke in Y6?Ne.charAt(Oe++):ke],!ze||(te=ze(ie,Se,te))<0)return-1}else if(ke!=Se.charCodeAt(te++))return-1}return te}function R(ie,Ne,Se){var te=u.exec(Ne.slice(Se));return te?(ie.p=m.get(te[0].toLowerCase()),Se+te[0].length):-1}function M(ie,Ne,Se){var te=b.exec(Ne.slice(Se));return te?(ie.w=v.get(te[0].toLowerCase()),Se+te[0].length):-1}function D(ie,Ne,Se){var te=f.exec(Ne.slice(Se));return te?(ie.w=p.get(te[0].toLowerCase()),Se+te[0].length):-1}function $(ie,Ne,Se){var te=w.exec(Ne.slice(Se));return te?(ie.m=N.get(te[0].toLowerCase()),Se+te[0].length):-1}function q(ie,Ne,Se){var te=g.exec(Ne.slice(Se));return te?(ie.m=y.get(te[0].toLowerCase()),Se+te[0].length):-1}function H(ie,Ne,Se){return P(ie,t,Ne,Se)}function L(ie,Ne,Se){return P(ie,n,Ne,Se)}function F(ie,Ne,Se){return P(ie,s,Ne,Se)}function Y(ie){return o[ie.getDay()]}function U(ie){return i[ie.getDay()]}function re(ie){return c[ie.getMonth()]}function G(ie){return l[ie.getMonth()]}function B(ie){return a[+(ie.getHours()>=12)]}function z(ie){return 1+~~(ie.getMonth()/3)}function he(ie){return o[ie.getUTCDay()]}function fe(ie){return i[ie.getUTCDay()]}function be(ie){return c[ie.getUTCMonth()]}function xe(ie){return l[ie.getUTCMonth()]}function pe(ie){return a[+(ie.getUTCHours()>=12)]}function Ae(ie){return 1+~~(ie.getUTCMonth()/3)}return{format:function(ie){var Ne=C(ie+="",S);return Ne.toString=function(){return ie},Ne},parse:function(ie){var Ne=T(ie+="",!1);return Ne.toString=function(){return ie},Ne},utcFormat:function(ie){var Ne=C(ie+="",A);return Ne.toString=function(){return ie},Ne},utcParse:function(ie){var Ne=T(ie+="",!0);return Ne.toString=function(){return ie},Ne}}}var Y6={"-":"",_:" ",0:"0"},Vr=/^\s*\d+/,qbe=/^%/,Vbe=/[\\^$*+?|[\]().{}]/g;function Tt(e,t,n){var s=e<0?"-":"",a=(s?-e:e)+"",i=a.length;return s+(i<n?new Array(n-i+1).join(t)+a:a)}function Ube(e){return e.replace(Vbe,"\\$&")}function ch(e){return new RegExp("^(?:"+e.map(Ube).join("|")+")","i")}function dh(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function zbe(e,t,n){var s=Vr.exec(t.slice(n,n+1));return s?(e.w=+s[0],n+s[0].length):-1}function Wbe(e,t,n){var s=Vr.exec(t.slice(n,n+1));return s?(e.u=+s[0],n+s[0].length):-1}function Hbe(e,t,n){var s=Vr.exec(t.slice(n,n+2));return s?(e.U=+s[0],n+s[0].length):-1}function Gbe(e,t,n){var s=Vr.exec(t.slice(n,n+2));return s?(e.V=+s[0],n+s[0].length):-1}function Kbe(e,t,n){var s=Vr.exec(t.slice(n,n+2));return s?(e.W=+s[0],n+s[0].length):-1}function X6(e,t,n){var s=Vr.exec(t.slice(n,n+4));return s?(e.y=+s[0],n+s[0].length):-1}function J6(e,t,n){var s=Vr.exec(t.slice(n,n+2));return s?(e.y=+s[0]+(+s[0]>68?1900:2e3),n+s[0].length):-1}function Ybe(e,t,n){var s=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return s?(e.Z=s[1]?0:-(s[2]+(s[3]||"00")),n+s[0].length):-1}function Xbe(e,t,n){var s=Vr.exec(t.slice(n,n+1));return s?(e.q=s[0]*3-3,n+s[0].length):-1}function Jbe(e,t,n){var s=Vr.exec(t.slice(n,n+2));return s?(e.m=s[0]-1,n+s[0].length):-1}function Q6(e,t,n){var s=Vr.exec(t.slice(n,n+2));return s?(e.d=+s[0],n+s[0].length):-1}function Qbe(e,t,n){var s=Vr.exec(t.slice(n,n+3));return s?(e.m=0,e.d=+s[0],n+s[0].length):-1}function Z6(e,t,n){var s=Vr.exec(t.slice(n,n+2));return s?(e.H=+s[0],n+s[0].length):-1}function Zbe(e,t,n){var s=Vr.exec(t.slice(n,n+2));return s?(e.M=+s[0],n+s[0].length):-1}function e0e(e,t,n){var s=Vr.exec(t.slice(n,n+2));return s?(e.S=+s[0],n+s[0].length):-1}function t0e(e,t,n){var s=Vr.exec(t.slice(n,n+3));return s?(e.L=+s[0],n+s[0].length):-1}function r0e(e,t,n){var s=Vr.exec(t.slice(n,n+6));return s?(e.L=Math.floor(s[0]/1e3),n+s[0].length):-1}function n0e(e,t,n){var s=qbe.exec(t.slice(n,n+1));return s?n+s[0].length:-1}function s0e(e,t,n){var s=Vr.exec(t.slice(n));return s?(e.Q=+s[0],n+s[0].length):-1}function a0e(e,t,n){var s=Vr.exec(t.slice(n));return s?(e.s=+s[0],n+s[0].length):-1}function eI(e,t){return Tt(e.getDate(),t,2)}function i0e(e,t){return Tt(e.getHours(),t,2)}function o0e(e,t){return Tt(e.getHours()%12||12,t,2)}function l0e(e,t){return Tt(1+jf.count(li(e),e),t,3)}function TU(e,t){return Tt(e.getMilliseconds(),t,3)}function c0e(e,t){return TU(e,t)+"000"}function d0e(e,t){return Tt(e.getMonth()+1,t,2)}function u0e(e,t){return Tt(e.getMinutes(),t,2)}function h0e(e,t){return Tt(e.getSeconds(),t,2)}function m0e(e){var t=e.getDay();return t===0?7:t}function f0e(e,t){return Tt(iv.count(li(e)-1,e),t,2)}function EU(e){var t=e.getDay();return t>=4||t===0?Pd(e):Pd.ceil(e)}function p0e(e,t){return e=EU(e),Tt(Pd.count(li(e),e)+(li(e).getDay()===4),t,2)}function x0e(e){return e.getDay()}function g0e(e,t){return Tt(Pg.count(li(e)-1,e),t,2)}function y0e(e,t){return Tt(e.getFullYear()%100,t,2)}function v0e(e,t){return e=EU(e),Tt(e.getFullYear()%100,t,2)}function b0e(e,t){return Tt(e.getFullYear()%1e4,t,4)}function j0e(e,t){var n=e.getDay();return e=n>=4||n===0?Pd(e):Pd.ceil(e),Tt(e.getFullYear()%1e4,t,4)}function w0e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Tt(t/60|0,"0",2)+Tt(t%60,"0",2)}function tI(e,t){return Tt(e.getUTCDate(),t,2)}function N0e(e,t){return Tt(e.getUTCHours(),t,2)}function _0e(e,t){return Tt(e.getUTCHours()%12||12,t,2)}function S0e(e,t){return Tt(1+av.count(ci(e),e),t,3)}function PU(e,t){return Tt(e.getUTCMilliseconds(),t,3)}function k0e(e,t){return PU(e,t)+"000"}function C0e(e,t){return Tt(e.getUTCMonth()+1,t,2)}function A0e(e,t){return Tt(e.getUTCMinutes(),t,2)}function T0e(e,t){return Tt(e.getUTCSeconds(),t,2)}function E0e(e){var t=e.getUTCDay();return t===0?7:t}function P0e(e,t){return Tt(ov.count(ci(e)-1,e),t,2)}function OU(e){var t=e.getUTCDay();return t>=4||t===0?Od(e):Od.ceil(e)}function O0e(e,t){return e=OU(e),Tt(Od.count(ci(e),e)+(ci(e).getUTCDay()===4),t,2)}function M0e(e){return e.getUTCDay()}function R0e(e,t){return Tt(Og.count(ci(e)-1,e),t,2)}function I0e(e,t){return Tt(e.getUTCFullYear()%100,t,2)}function D0e(e,t){return e=OU(e),Tt(e.getUTCFullYear()%100,t,2)}function L0e(e,t){return Tt(e.getUTCFullYear()%1e4,t,4)}function $0e(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Od(e):Od.ceil(e),Tt(e.getUTCFullYear()%1e4,t,4)}function F0e(){return"+0000"}function rI(){return"%"}function nI(e){return+e}function sI(e){return Math.floor(+e/1e3)}var $c,MU,RU;B0e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
846ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function B0e(e){return $c=Bbe(e),MU=$c.format,$c.parse,RU=$c.utcFormat,$c.utcParse,$c}function q0e(e){return new Date(e)}function V0e(e){return e instanceof Date?+e:+new Date(+e)}function dA(e,t,n,s,a,i,o,l,c,u){var m=XC(),f=m.invert,p=m.domain,b=u(".%L"),v=u(":%S"),g=u("%I:%M"),y=u("%I %p"),w=u("%a %d"),N=u("%b %d"),S=u("%B"),A=u("%Y");function k(C){return(c(C)<C?b:l(C)<C?v:o(C)<C?g:i(C)<C?y:s(C)<C?a(C)<C?w:N:n(C)<C?S:A)(C)}return m.invert=function(C){return new Date(f(C))},m.domain=function(C){return arguments.length?p(Array.from(C,V0e)):p().map(q0e)},m.ticks=function(C){var T=p();return e(T[0],T[T.length-1],C??10)},m.tickFormat=function(C,T){return T==null?k:u(T)},m.nice=function(C){var T=p();return(!C||typeof C.range!="function")&&(C=t(T[0],T[T.length-1],C??10)),C?p(bU(T,C)):m},m.copy=function(){return bf(m,dA(e,t,n,s,a,i,o,l,c,u))},m}function U0e(){return _s.apply(dA($be,Fbe,li,lA,iv,jf,iA,sA,ul,MU).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function z0e(){return _s.apply(dA(Dbe,Lbe,ci,cA,ov,av,oA,aA,ul,RU).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function lv(){var e=0,t=1,n,s,a,i,o=vn,l=!1,c;function u(f){return f==null||isNaN(f=+f)?c:o(a===0?.5:(f=(i(f)-n)*a,l?Math.max(0,Math.min(1,f)):f))}u.domain=function(f){return arguments.length?([e,t]=f,n=i(e=+e),s=i(t=+t),a=n===s?0:1/(s-n),u):[e,t]},u.clamp=function(f){return arguments.length?(l=!!f,u):l},u.interpolator=function(f){return arguments.length?(o=f,u):o};function m(f){return function(p){var b,v;return arguments.length?([b,v]=p,o=f(b,v),u):[o(0),o(1)]}}return u.range=m(du),u.rangeRound=m(YC),u.unknown=function(f){return arguments.length?(c=f,u):c},function(f){return i=f,n=f(e),s=f(t),a=n===s?0:1/(s-n),u}}function ko(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function IU(){var e=So(lv()(vn));return e.copy=function(){return ko(e,IU())},fi.apply(e,arguments)}function DU(){var e=ZC(lv()).domain([1,10]);return e.copy=function(){return ko(e,DU()).base(e.base())},fi.apply(e,arguments)}function LU(){var e=eA(lv());return e.copy=function(){return ko(e,LU()).constant(e.constant())},fi.apply(e,arguments)}function uA(){var e=tA(lv());return e.copy=function(){return ko(e,uA()).exponent(e.exponent())},fi.apply(e,arguments)}function W0e(){return uA.apply(null,arguments).exponent(.5)}function $U(){var e=[],t=vn;function n(s){if(s!=null&&!isNaN(s=+s))return t((yf(e,s,1)-1)/(e.length-1))}return n.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let a of s)a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(lo),n},n.interpolator=function(s){return arguments.length?(t=s,n):t},n.range=function(){return e.map((s,a)=>t(a/(e.length-1)))},n.quantiles=function(s){return Array.from({length:s+1},(a,i)=>Pve(e,i/s))},n.copy=function(){return $U(t).domain(e)},fi.apply(n,arguments)}function cv(){var e=0,t=.5,n=1,s=1,a,i,o,l,c,u=vn,m,f=!1,p;function b(g){return isNaN(g=+g)?p:(g=.5+((g=+m(g))-i)*(s*g<s*i?l:c),u(f?Math.max(0,Math.min(1,g)):g))}b.domain=function(g){return arguments.length?([e,t,n]=g,a=m(e=+e),i=m(t=+t),o=m(n=+n),l=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),s=i<a?-1:1,b):[e,t,n]},b.clamp=function(g){return arguments.length?(f=!!g,b):f},b.interpolator=function(g){return arguments.length?(u=g,b):u};function v(g){return function(y){var w,N,S;return arguments.length?([w,N,S]=y,u=nbe(g,[w,N,S]),b):[u(0),u(.5),u(1)]}}return b.range=v(du),b.rangeRound=v(YC),b.unknown=function(g){return arguments.length?(p=g,b):p},function(g){return m=g,a=g(e),i=g(t),o=g(n),l=a===i?0:.5/(i-a),c=i===o?0:.5/(o-i),s=i<a?-1:1,b}}function FU(){var e=So(cv()(vn));return e.copy=function(){return ko(e,FU())},fi.apply(e,arguments)}function BU(){var e=ZC(cv()).domain([.1,1,10]);return e.copy=function(){return ko(e,BU()).base(e.base())},fi.apply(e,arguments)}function qU(){var e=eA(cv());return e.copy=function(){return ko(e,qU()).constant(e.constant())},fi.apply(e,arguments)}function hA(){var e=tA(cv());return e.copy=function(){return ko(e,hA()).exponent(e.exponent())},fi.apply(e,arguments)}function H0e(){return hA.apply(null,arguments).exponent(.5)}const aI=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:mm,scaleDiverging:FU,scaleDivergingLog:BU,scaleDivergingPow:hA,scaleDivergingSqrt:H0e,scaleDivergingSymlog:qU,scaleIdentity:vU,scaleImplicit:r2,scaleLinear:Tg,scaleLog:jU,scaleOrdinal:HC,scalePoint:Vh,scalePow:rA,scaleQuantile:_U,scaleQuantize:SU,scaleRadial:NU,scaleSequential:IU,scaleSequentialLog:DU,scaleSequentialPow:uA,scaleSequentialQuantile:$U,scaleSequentialSqrt:W0e,scaleSequentialSymlog:LU,scaleSqrt:kbe,scaleSymlog:wU,scaleThreshold:kU,scaleTime:U0e,scaleUtc:z0e,tickFormat:yU},Symbol.toStringTag,{value:"Module"}));var O1,iI;function dv(){if(iI)return O1;iI=1;var e=iu();function t(n,s,a){for(var i=-1,o=n.length;++i<o;){var l=n[i],c=s(l);if(c!=null&&(u===void 0?c===c&&!e(c):a(c,u)))var u=c,m=l}return m}return O1=t,O1}var M1,oI;function VU(){if(oI)return M1;oI=1;function e(t,n){return t>n}return M1=e,M1}var R1,lI;
vendor: 133,581 bytes, lines 846-892
846function G0e(){if(lI)return R1;lI=1;var e=dv(),t=VU(),n=lu();function s(a){return a&&a.length?e(a,n,t):void 0}return R1=s,R1}var K0e=G0e();const uv=Et(K0e);var I1,cI;function UU(){if(cI)return I1;cI=1;function e(t,n){return t<n}return I1=e,I1}var D1,dI;function Y0e(){if(dI)return D1;dI=1;var e=dv(),t=UU(),n=lu();function s(a){return a&&a.length?e(a,n,t):void 0}return D1=s,D1}var X0e=Y0e();const hv=Et(X0e);var L1,uI;function J0e(){if(uI)return L1;uI=1;var e=AC(),t=Ea(),n=QV(),s=Bn();function a(i,o){var l=s(i)?e:n;return l(i,t(o,3))}return L1=a,L1}var $1,hI;function Q0e(){if(hI)return $1;hI=1;var e=XV(),t=J0e();function n(s,a){return e(t(s,a),1)}return $1=n,$1}var Z0e=Q0e();const eje=Et(Z0e);var F1,mI;function tje(){if(mI)return F1;mI=1;var e=qC();function t(n,s){return e(n,s)}return F1=t,F1}var rje=tje();const mv=Et(rje);var uu=1e9,nje={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},fA,tr=!0,js="[DecimalError] ",kl=js+"Invalid argument: ",mA=js+"Exponent out of range: ",hu=Math.floor,sl=Math.pow,sje=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Yn,Br=1e7,Xt=7,zU=9007199254740991,Mg=hu(zU/Xt),$e={};$e.absoluteValue=$e.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};$e.comparedTo=$e.cmp=function(e){var t,n,s,a,i=this;if(e=new i.constructor(e),i.s!==e.s)return i.s||-e.s;if(i.e!==e.e)return i.e>e.e^i.s<0?1:-1;for(s=i.d.length,a=e.d.length,t=0,n=s<a?s:a;t<n;++t)if(i.d[t]!==e.d[t])return i.d[t]>e.d[t]^i.s<0?1:-1;return s===a?0:s>a^i.s<0?1:-1};$e.decimalPlaces=$e.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*Xt;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};$e.dividedBy=$e.div=function(e){return ri(this,new this.constructor(e))};$e.dividedToIntegerBy=$e.idiv=function(e){var t=this,n=t.constructor;return Bt(ri(t,new n(e),0,1),n.precision)};$e.equals=$e.eq=function(e){return!this.cmp(e)};$e.exponent=function(){return Sr(this)};$e.greaterThan=$e.gt=function(e){return this.cmp(e)>0};$e.greaterThanOrEqualTo=$e.gte=function(e){return this.cmp(e)>=0};$e.isInteger=$e.isint=function(){return this.e>this.d.length-2};$e.isNegative=$e.isneg=function(){return this.s<0};$e.isPositive=$e.ispos=function(){return this.s>0};$e.isZero=function(){return this.s===0};$e.lessThan=$e.lt=function(e){return this.cmp(e)<0};$e.lessThanOrEqualTo=$e.lte=function(e){return this.cmp(e)<1};$e.logarithm=$e.log=function(e){var t,n=this,s=n.constructor,a=s.precision,i=a+5;if(e===void 0)e=new s(10);else if(e=new s(e),e.s<1||e.eq(Yn))throw Error(js+"NaN");if(n.s<1)throw Error(js+(n.s?"NaN":"-Infinity"));return n.eq(Yn)?new s(0):(tr=!1,t=ri(ym(n,i),ym(e,i),i),tr=!0,Bt(t,a))};$e.minus=$e.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?GU(t,e):WU(t,(e.s=-e.s,e))};$e.modulo=$e.mod=function(e){var t,n=this,s=n.constructor,a=s.precision;if(e=new s(e),!e.s)throw Error(js+"NaN");return n.s?(tr=!1,t=ri(n,e,0,1).times(e),tr=!0,n.minus(t)):Bt(new s(n),a)};$e.naturalExponential=$e.exp=function(){return HU(this)};$e.naturalLogarithm=$e.ln=function(){return ym(this)};$e.negated=$e.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};$e.plus=$e.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?WU(t,e):GU(t,(e.s=-e.s,e))};$e.precision=$e.sd=function(e){var t,n,s,a=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(kl+e);if(t=Sr(a)+1,s=a.d.length-1,n=s*Xt+1,s=a.d[s],s){for(;s%10==0;s/=10)n--;for(s=a.d[0];s>=10;s/=10)n++}return e&&t>n?t:n};$e.squareRoot=$e.sqrt=function(){var e,t,n,s,a,i,o,l=this,c=l.constructor;if(l.s<1){if(!l.s)return new c(0);throw Error(js+"NaN")}for(e=Sr(l),tr=!1,a=Math.sqrt(+l),a==0||a==1/0?(t=ca(l.d),(t.length+e)%2==0&&(t+="0"),a=Math.sqrt(t),e=hu((e+1)/2)-(e<0||e%2),a==1/0?t="5e"+e:(t=a.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),s=new c(t)):s=new c(a.toString()),n=c.precision,a=o=n+3;;)if(i=s,s=i.plus(ri(l,i,o+2)).times(.5),ca(i.d).slice(0,o)===(t=ca(s.d)).slice(0,o)){if(t=t.slice(o-3,o+1),a==o&&t=="4999"){if(Bt(i,n+1,0),i.times(i).eq(l)){s=i;break}}else if(t!="9999")break;o+=4}return tr=!0,Bt(s,n)};$e.times=$e.mul=function(e){var t,n,s,a,i,o,l,c,u,m=this,f=m.constructor,p=m.d,b=(e=new f(e)).d;if(!m.s||!e.s)return new f(0);for(e.s*=m.s,n=m.e+e.e,c=p.length,u=b.length,c<u&&(i=p,p=b,b=i,o=c,c=u,u=o),i=[],o=c+u,s=o;s--;)i.push(0);for(s=u;--s>=0;){for(t=0,a=c+s;a>s;)l=i[a]+b[s]*p[a-s-1]+t,i[a--]=l%Br|0,t=l/Br|0;i[a]=(i[a]+t)%Br|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=n,tr?Bt(e,f.precision):e};$e.toDecimalPlaces=$e.todp=function(e,t){var n=this,s=n.constructor;return n=new s(n),e===void 0?n:(_a(e,0,uu),t===void 0?t=s.rounding:_a(t,0,8),Bt(n,e+Sr(n)+1,t))};$e.toExponential=function(e,t){var n,s=this,a=s.constructor;return e===void 0?n=ql(s,!0):(_a(e,0,uu),t===void 0?t=a.rounding:_a(t,0,8),s=Bt(new a(s),e+1,t),n=ql(s,!0,e+1)),n};$e.toFixed=function(e,t){var n,s,a=this,i=a.constructor;return e===void 0?ql(a):(_a(e,0,uu),t===void 0?t=i.rounding:_a(t,0,8),s=Bt(new i(a),e+Sr(a)+1,t),n=ql(s.abs(),!1,e+Sr(s)+1),a.isneg()&&!a.isZero()?"-"+n:n)};$e.toInteger=$e.toint=function(){var e=this,t=e.constructor;return Bt(new t(e),Sr(e)+1,t.rounding)};$e.toNumber=function(){return+this};$e.toPower=$e.pow=function(e){var t,n,s,a,i,o,l=this,c=l.constructor,u=12,m=+(e=new c(e));if(!e.s)return new c(Yn);if(l=new c(l),!l.s){if(e.s<1)throw Error(js+"Infinity");return l}if(l.eq(Yn))return l;if(s=c.precision,e.eq(Yn))return Bt(l,s);if(t=e.e,n=e.d.length-1,o=t>=n,i=l.s,o){if((n=m<0?-m:m)<=zU){for(a=new c(Yn),t=Math.ceil(s/Xt+4),tr=!1;n%2&&(a=a.times(l),pI(a.d,t)),n=hu(n/2),n!==0;)l=l.times(l),pI(l.d,t);return tr=!0,e.s<0?new c(Yn).div(a):Bt(a,s)}}else if(i<0)throw Error(js+"NaN");return i=i<0&&e.d[Math.max(t,n)]&1?-1:1,l.s=1,tr=!1,a=e.times(ym(l,s+u)),tr=!0,a=HU(a),a.s=i,a};$e.toPrecision=function(e,t){var n,s,a=this,i=a.constructor;return e===void 0?(n=Sr(a),s=ql(a,n<=i.toExpNeg||n>=i.toExpPos)):(_a(e,1,uu),t===void 0?t=i.rounding:_a(t,0,8),a=Bt(new i(a),e,t),n=Sr(a),s=ql(a,e<=n||n<=i.toExpNeg,e)),s};$e.toSignificantDigits=$e.tosd=function(e,t){var n=this,s=n.constructor;return e===void 0?(e=s.precision,t=s.rounding):(_a(e,1,uu),t===void 0?t=s.rounding:_a(t,0,8)),Bt(new s(n),e,t)};$e.toString=$e.valueOf=$e.val=$e.toJSON=$e[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Sr(e),n=e.constructor;return ql(e,t<=n.toExpNeg||t>=n.toExpPos)};function WU(e,t){var n,s,a,i,o,l,c,u,m=e.constructor,f=m.precision;if(!e.s||!t.s)return t.s||(t=new m(e)),tr?Bt(t,f):t;if(c=e.d,u=t.d,o=e.e,a=t.e,c=c.slice(),i=o-a,i){for(i<0?(s=c,i=-i,l=u.length):(s=u,a=o,l=c.length),o=Math.ceil(f/Xt),l=o>l?o+1:l+1,i>l&&(i=l,s.length=1),s.reverse();i--;)s.push(0);s.reverse()}for(l=c.length,i=u.length,l-i<0&&(i=l,s=u,u=c,c=s),n=0;i;)n=(c[--i]=c[i]+u[i]+n)/Br|0,c[i]%=Br;for(n&&(c.unshift(n),++a),l=c.length;c[--l]==0;)c.pop();return t.d=c,t.e=a,tr?Bt(t,f):t}function _a(e,t,n){if(e!==~~e||e<t||e>n)throw Error(kl+e)}function ca(e){var t,n,s,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)s=e[t]+"",n=Xt-s.length,n&&(i+=zi(n)),i+=s;o=e[t],s=o+"",n=Xt-s.length,n&&(i+=zi(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}var ri=(function(){function e(s,a){var i,o=0,l=s.length;for(s=s.slice();l--;)i=s[l]*a+o,s[l]=i%Br|0,o=i/Br|0;return o&&s.unshift(o),s}function t(s,a,i,o){var l,c;if(i!=o)c=i>o?1:-1;else for(l=c=0;l<i;l++)if(s[l]!=a[l]){c=s[l]>a[l]?1:-1;break}return c}function n(s,a,i){for(var o=0;i--;)s[i]-=o,o=s[i]<a[i]?1:0,s[i]=o*Br+s[i]-a[i];for(;!s[0]&&s.length>1;)s.shift()}return function(s,a,i,o){var l,c,u,m,f,p,b,v,g,y,w,N,S,A,k,C,T,P,R=s.constructor,M=s.s==a.s?1:-1,D=s.d,$=a.d;if(!s.s)return new R(s);if(!a.s)throw Error(js+"Division by zero");for(c=s.e-a.e,T=$.length,k=D.length,b=new R(M),v=b.d=[],u=0;$[u]==(D[u]||0);)++u;if($[u]>(D[u]||0)&&--c,i==null?N=i=R.precision:o?N=i+(Sr(s)-Sr(a))+1:N=i,N<0)return new R(0);if(N=N/Xt+2|0,u=0,T==1)for(m=0,$=$[0],N++;(u<k||m)&&N--;u++)S=m*Br+(D[u]||0),v[u]=S/$|0,m=S%$|0;else{for(m=Br/($[0]+1)|0,m>1&&($=e($,m),D=e(D,m),T=$.length,k=D.length),A=T,g=D.slice(0,T),y=g.length;y<T;)g[y++]=0;P=$.slice(),P.unshift(0),C=$[0],$[1]>=Br/2&&++C;do m=0,l=t($,g,T,y),l<0?(w=g[0],T!=y&&(w=w*Br+(g[1]||0)),m=w/C|0,m>1?(m>=Br&&(m=Br-1),f=e($,m),p=f.length,y=g.length,l=t(f,g,p,y),l==1&&(m--,n(f,T<p?P:$,p))):(m==0&&(l=m=1),f=$.slice()),p=f.length,p<y&&f.unshift(0),n(g,f,y),l==-1&&(y=g.length,l=t($,g,T,y),l<1&&(m++,n(g,T<y?P:$,y))),y=g.length):l===0&&(m++,g=[0]),v[u++]=m,l&&g[0]?g[y++]=D[A]||0:(g=[D[A]],y=1);while((A++<k||g[0]!==void 0)&&N--)}return v[0]||v.shift(),b.e=c,Bt(b,o?i+Sr(b)+1:i)}})();function HU(e,t){var n,s,a,i,o,l,c=0,u=0,m=e.constructor,f=m.precision;if(Sr(e)>16)throw Error(mA+Sr(e));if(!e.s)return new m(Yn);for(tr=!1,l=f,o=new m(.03125);e.abs().gte(.1);)e=e.times(o),u+=5;for(s=Math.log(sl(2,u))/Math.LN10*2+5|0,l+=s,n=a=i=new m(Yn),m.precision=l;;){if(a=Bt(a.times(e),l),n=n.times(++c),o=i.plus(ri(a,n,l)),ca(o.d).slice(0,l)===ca(i.d).slice(0,l)){for(;u--;)i=Bt(i.times(i),l);return m.precision=f,t==null?(tr=!0,Bt(i,f)):i}i=o}}function Sr(e){for(var t=e.e*Xt,n=e.d[0];n>=10;n/=10)t++;return t}function B1(e,t,n){if(t>e.LN10.sd())throw tr=!0,n&&(e.precision=n),Error(js+"LN10 precision limit exceeded");return Bt(new e(e.LN10),t)}function zi(e){for(var t="";e--;)t+="0";return t}function ym(e,t){var n,s,a,i,o,l,c,u,m,f=1,p=10,b=e,v=b.d,g=b.constructor,y=g.precision;if(b.s<1)throw Error(js+(b.s?"NaN":"-Infinity"));if(b.eq(Yn))return new g(0);if(t==null?(tr=!1,u=y):u=t,b.eq(10))return t==null&&(tr=!0),B1(g,u);if(u+=p,g.precision=u,n=ca(v),s=n.charAt(0),i=Sr(b),Math.abs(i)<15e14){for(;s<7&&s!=1||s==1&&n.charAt(1)>3;)b=b.times(e),n=ca(b.d),s=n.charAt(0),f++;i=Sr(b),s>1?(b=new g("0."+n),i++):b=new g(s+"."+n.slice(1))}else return c=B1(g,u+2,y).times(i+""),b=ym(new g(s+"."+n.slice(1)),u-p).plus(c),g.precision=y,t==null?(tr=!0,Bt(b,y)):b;for(l=o=b=ri(b.minus(Yn),b.plus(Yn),u),m=Bt(b.times(b),u),a=3;;){if(o=Bt(o.times(m),u),c=l.plus(ri(o,new g(a),u)),ca(c.d).slice(0,u)===ca(l.d).slice(0,u))return l=l.times(2),i!==0&&(l=l.plus(B1(g,u+2,y).times(i+""))),l=ri(l,new g(f),u),g.precision=y,t==null?(tr=!0,Bt(l,y)):l;l=c,a+=2}}function fI(e,t){var n,s,a;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(s=t.search(/e/i))>0?(n<0&&(n=s),n+=+t.slice(s+1),t=t.substring(0,s)):n<0&&(n=t.length),s=0;t.charCodeAt(s)===48;)++s;for(a=t.length;t.charCodeAt(a-1)===48;)--a;if(t=t.slice(s,a),t){if(a-=s,n=n-s-1,e.e=hu(n/Xt),e.d=[],s=(n+1)%Xt,n<0&&(s+=Xt),s<a){for(s&&e.d.push(+t.slice(0,s)),a-=Xt;s<a;)e.d.push(+t.slice(s,s+=Xt));t=t.slice(s),s=Xt-t.length}else s-=a;for(;s--;)t+="0";if(e.d.push(+t),tr&&(e.e>Mg||e.e<-Mg))throw Error(mA+n)}else e.s=0,e.e=0,e.d=[0];return e}function Bt(e,t,n){var s,a,i,o,l,c,u,m,f=e.d;for(o=1,i=f[0];i>=10;i/=10)o++;if(s=t-o,s<0)s+=Xt,a=t,u=f[m=0];else{if(m=Math.ceil((s+1)/Xt),i=f.length,m>=i)return e;for(u=i=f[m],o=1;i>=10;i/=10)o++;s%=Xt,a=s-Xt+o}if(n!==void 0&&(i=sl(10,o-a-1),l=u/i%10|0,c=t<0||f[m+1]!==void 0||u%i,c=n<4?(l||c)&&(n==0||n==(e.s<0?3:2)):l>5||l==5&&(n==4||c||n==6&&(s>0?a>0?u/sl(10,o-a):0:f[m-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return c?(i=Sr(e),f.length=1,t=t-i-1,f[0]=sl(10,(Xt-t%Xt)%Xt),e.e=hu(-t/Xt)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(s==0?(f.length=m,i=1,m--):(f.length=m+1,i=sl(10,Xt-s),f[m]=a>0?(u/sl(10,o-a)%sl(10,a)|0)*i:0),c)for(;;)if(m==0){(f[0]+=i)==Br&&(f[0]=1,++e.e);break}else{if(f[m]+=i,f[m]!=Br)break;f[m--]=0,i=1}for(s=f.length;f[--s]===0;)f.pop();if(tr&&(e.e>Mg||e.e<-Mg))throw Error(mA+Sr(e));return e}function GU(e,t){var n,s,a,i,o,l,c,u,m,f,p=e.constructor,b=p.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new p(e),tr?Bt(t,b):t;if(c=e.d,f=t.d,s=t.e,u=e.e,c=c.slice(),o=u-s,o){for(m=o<0,m?(n=c,o=-o,l=f.length):(n=f,s=u,l=c.length),a=Math.max(Math.ceil(b/Xt),l)+2,o>a&&(o=a,n.length=1),n.reverse(),a=o;a--;)n.push(0);n.reverse()}else{for(a=c.length,l=f.length,m=a<l,m&&(l=a),a=0;a<l;a++)if(c[a]!=f[a]){m=c[a]<f[a];break}o=0}for(m&&(n=c,c=f,f=n,t.s=-t.s),l=c.length,a=f.length-l;a>0;--a)c[l++]=0;for(a=f.length;a>o;){if(c[--a]<f[a]){for(i=a;i&&c[--i]===0;)c[i]=Br-1;--c[i],c[a]+=Br}c[a]-=f[a]}for(;c[--l]===0;)c.pop();for(;c[0]===0;c.shift())--s;return c[0]?(t.d=c,t.e=s,tr?Bt(t,b):t):new p(0)}function ql(e,t,n){var s,a=Sr(e),i=ca(e.d),o=i.length;return t?(n&&(s=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+zi(s):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(a<0?"e":"e+")+a):a<0?(i="0."+zi(-a-1)+i,n&&(s=n-o)>0&&(i+=zi(s))):a>=o?(i+=zi(a+1-o),n&&(s=n-a-1)>0&&(i=i+"."+zi(s))):((s=a+1)<o&&(i=i.slice(0,s)+"."+i.slice(s)),n&&(s=n-o)>0&&(a+1===o&&(i+="."),i+=zi(s))),e.s<0?"-"+i:i}function pI(e,t){if(e.length>t)return e.length=t,!0}function KU(e){var t,n,s;function a(i){var o=this;if(!(o instanceof a))return new a(i);if(o.constructor=a,i instanceof a){o.s=i.s,o.e=i.e,o.d=(i=i.d)?i.slice():i;return}if(typeof i=="number"){if(i*0!==0)throw Error(kl+i);if(i>0)o.s=1;else if(i<0)i=-i,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(i===~~i&&i<1e7){o.e=0,o.d=[i];return}return fI(o,i.toString())}else if(typeof i!="string")throw Error(kl+i);if(i.charCodeAt(0)===45?(i=i.slice(1),o.s=-1):o.s=1,sje.test(i))fI(o,i);else throw Error(kl+i)}if(a.prototype=$e,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.clone=KU,a.config=a.set=aje,e===void 0&&(e={}),e)for(s=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<s.length;)e.hasOwnProperty(n=s[t++])||(e[n]=this[n]);return a.config(e),a}function aje(e){if(!e||typeof e!="object")throw Error(js+"Object expected");var t,n,s,a=["precision",1,uu,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<a.length;t+=3)if((s=e[n=a[t]])!==void 0)if(hu(s)===s&&s>=a[t+1]&&s<=a[t+2])this[n]=s;else throw Error(kl+n+": "+s);if((s=e[n="LN10"])!==void 0)if(s==Math.LN10)this[n]=new this(s);else throw Error(kl+n+": "+s);return this}var fA=KU(nje);Yn=new fA(1);const $t=fA;function ije(e){return dje(e)||cje(e)||lje(e)||oje()}function oje(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 847In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lje(e,t){if(e){if(typeof e=="string")return i2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i2(e,t)}}function cje(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function dje(e){if(Array.isArray(e))return i2(e)}function i2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}var uje=function(t){return t},YU={},XU=function(t){return t===YU},xI=function(t){return function n(){return arguments.length===0||arguments.length===1&&XU(arguments.length<=0?void 0:arguments[0])?n:t.apply(void 0,arguments)}},hje=function e(t,n){return t===1?n:xI(function(){for(var s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];var o=a.filter(function(l){return l!==YU}).length;return o>=t?n.apply(void 0,a):e(t-o,xI(function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var m=a.map(function(f){return XU(f)?c.shift():f});return n.apply(void 0,ije(m).concat(c))}))})},fv=function(t){return hje(t.length,t)},o2=function(t,n){for(var s=[],a=t;a<n;++a)s[a-t]=a;return s},mje=fv(function(e,t){return Array.isArray(t)?t.map(e):Object.keys(t).map(function(n){return t[n]}).map(e)}),fje=function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];if(!n.length)return uje;var a=n.reverse(),i=a[0],o=a.slice(1);return function(){return o.reduce(function(l,c){return c(l)},i.apply(void 0,arguments))}},l2=function(t){return Array.isArray(t)?t.reverse():t.split("").reverse.join("")},JU=function(t){var n=null,s=null;return function(){for(var a=arguments.length,i=new Array(a),o=0;o<a;o++)i[o]=arguments[o];return n&&i.every(function(l,c){return l===n[c]})||(n=i,s=t.apply(void 0,i)),s}};function pje(e){var t;return e===0?t=1:t=Math.floor(new $t(e).abs().log(10).toNumber())+1,t}function xje(e,t,n){for(var s=new $t(e),a=0,i=[];s.lt(t)&&a<1e5;)i.push(s.toNumber()),s=s.add(n),a++;return i}var gje=fv(function(e,t,n){var s=+e,a=+t;return s+n*(a-s)}),yje=fv(function(e,t,n){var s=t-+e;return s=s||1/0,(n-e)/s}),vje=fv(function(e,t,n){var s=t-+e;return s=s||1/0,Math.max(0,Math.min(1,(n-e)/s))});const pv={rangeStep:xje,getDigitCount:pje,interpolateNumber:gje,uninterpolateNumber:yje,uninterpolateTruncation:vje};function c2(e){return wje(e)||jje(e)||QU(e)||bje()}function bje(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 848In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jje(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function wje(e){if(Array.isArray(e))return d2(e)}function vm(e,t){return Sje(e)||_je(e,t)||QU(e,t)||Nje()}function Nje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 849In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QU(e,t){if(e){if(typeof e=="string")return d2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d2(e,t)}}function d2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function _je(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],s=!0,a=!1,i=void 0;try{for(var o=e[Symbol.iterator](),l;!(s=(l=o.next()).done)&&(n.push(l.value),!(t&&n.length===t));s=!0);}catch(c){a=!0,i=c}finally{try{!s&&o.return!=null&&o.return()}finally{if(a)throw i}}return n}}function Sje(e){if(Array.isArray(e))return e}function ZU(e){var t=vm(e,2),n=t[0],s=t[1],a=n,i=s;return n>s&&(a=s,i=n),[a,i]}function ez(e,t,n){if(e.lte(0))return new $t(0);var s=pv.getDigitCount(e.toNumber()),a=new $t(10).pow(s),i=e.div(a),o=s!==1?.05:.1,l=new $t(Math.ceil(i.div(o).toNumber())).add(n).mul(o),c=l.mul(a);return t?c:new $t(Math.ceil(c))}function kje(e,t,n){var s=1,a=new $t(e);if(!a.isint()&&n){var i=Math.abs(e);i<1?(s=new $t(10).pow(pv.getDigitCount(e)-1),a=new $t(Math.floor(a.div(s).toNumber())).mul(s)):i>1&&(a=new $t(Math.floor(e)))}else e===0?a=new $t(Math.floor((t-1)/2)):n||(a=new $t(Math.floor(e)));var o=Math.floor((t-1)/2),l=fje(mje(function(c){return a.add(new $t(c-o).mul(s)).toNumber()}),o2);return l(0,t)}function tz(e,t,n,s){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new $t(0),tickMin:new $t(0),tickMax:new $t(0)};var i=ez(new $t(t).sub(e).div(n-1),s,a),o;e<=0&&t>=0?o=new $t(0):(o=new $t(e).add(t).div(2),o=o.sub(new $t(o).mod(i)));var l=Math.ceil(o.sub(e).div(i).toNumber()),c=Math.ceil(new $t(t).sub(o).div(i).toNumber()),u=l+c+1;return u>n?tz(e,t,n,s,a+1):(u<n&&(c=t>0?c+(n-u):c,l=t>0?l:l+(n-u)),{step:i,tickMin:o.sub(new $t(l).mul(i)),tickMax:o.add(new $t(c).mul(i))})}function Cje(e){var t=vm(e,2),n=t[0],s=t[1],a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(a,2),l=ZU([n,s]),c=vm(l,2),u=c[0],m=c[1];if(u===-1/0||m===1/0){var f=m===1/0?[u].concat(c2(o2(0,a-1).map(function(){return 1/0}))):[].concat(c2(o2(0,a-1).map(function(){return-1/0})),[m]);return n>s?l2(f):f}if(u===m)return kje(u,a,i);var p=tz(u,m,o,i),b=p.step,v=p.tickMin,g=p.tickMax,y=pv.rangeStep(v,g.add(new $t(.1).mul(b)),b);return n>s?l2(y):y}function Aje(e,t){var n=vm(e,2),s=n[0],a=n[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=ZU([s,a]),l=vm(o,2),c=l[0],u=l[1];if(c===-1/0||u===1/0)return[s,a];if(c===u)return[c];var m=Math.max(t,2),f=ez(new $t(u).sub(c).div(m-1),i,0),p=[].concat(c2(pv.rangeStep(new $t(c),new $t(u).sub(new $t(.99).mul(f)),f)),[u]);return s>a?l2(p):p}var Tje=JU(Cje),Eje=JU(Aje),Pje="Invariant failed";function Vl(e,t){throw new Error(Pje)}var Oje=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function Md(e){"@babel/helpers - typeof";return Md=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Md(e)}function Rg(){return Rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Rg.apply(this,arguments)}function Mje(e,t){return Lje(e)||Dje(e,t)||Ije(e,t)||Rje()}function Rje(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 850In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ije(e,t){if(e){if(typeof e=="string")return gI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gI(e,t)}}function gI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function Dje(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function Lje(e){if(Array.isArray(e))return e}function $je(e,t){if(e==null)return{};var n=Fje(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function Fje(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function Bje(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qje(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,sz(s.key),s)}}function Vje(e,t,n){return t&&qje(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uje(e,t,n){return t=Ig(t),zje(e,rz()?Reflect.construct(t,n||[],Ig(e).constructor):t.apply(e,n))}function zje(e,t){if(t&&(Md(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Wje(e)}function Wje(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function rz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(rz=function(){return!!e})()}function Ig(e){return Ig=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Ig(e)}function Hje(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u2(e,t)}function u2(e,t){return u2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},u2(e,t)}function nz(e,t,n){return t=sz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sz(e){var t=Gje(e,"string");return Md(t)=="symbol"?t:t+""}function Gje(e,t){if(Md(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Md(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var xv=(function(e){function t(){return Bje(this,t),Uje(this,t,arguments)}return Hje(t,e),Vje(t,[{key:"render",value:function(){var s=this.props,a=s.offset,i=s.layout,o=s.width,l=s.dataKey,c=s.data,u=s.dataPointFormatter,m=s.xAxis,f=s.yAxis,p=$je(s,Oje),b=nt(p,!1);this.props.direction==="x"&&m.type!=="number"&&Vl();var v=c.map(function(g){var y=u(g,l),w=y.x,N=y.y,S=y.value,A=y.errorVal;if(!A)return null;var k=[],C,T;if(Array.isArray(A)){var P=Mje(A,2);C=P[0],T=P[1]}else C=T=A;if(i==="vertical"){var R=m.scale,M=N+a,D=M+o,$=M-o,q=R(S-C),H=R(S+T);k.push({x1:H,y1:D,x2:H,y2:$}),k.push({x1:q,y1:M,x2:H,y2:M}),k.push({x1:q,y1:D,x2:q,y2:$})}else if(i==="horizontal"){var L=f.scale,F=w+a,Y=F-o,U=F+o,re=L(S-C),G=L(S+T);k.push({x1:Y,y1:G,x2:U,y2:G}),k.push({x1:F,y1:re,x2:F,y2:G}),k.push({x1:Y,y1:re,x2:U,y2:re})}return X.createElement(Dt,Rg({className:"recharts-errorBar",key:"bar-".concat(k.map(function(B){return"".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))},b),k.map(function(B){return X.createElement("line",Rg({},B,{key:"line-".concat(B.x1,"-").concat(B.x2,"-").concat(B.y1,"-").concat(B.y2)}))}))});return X.createElement(Dt,{className:"recharts-errorBars"},v)}}])})(X.Component);nz(xv,"defaultProps",{stroke:"black",strokeWidth:1.5,width:5,offset:0,layout:"horizontal"});nz(xv,"displayName","ErrorBar");function bm(e){"@babel/helpers - typeof";return bm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bm(e)}function yI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function Ko(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yI(Object(n),!0).forEach(function(s){Kje(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yI(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Kje(e,t,n){return t=Yje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yje(e){var t=Xje(e,"string");return bm(t)=="symbol"?t:t+""}function Xje(e,t){if(bm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(bm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var az=function(t){var n=t.children,s=t.formattedGraphicalItems,a=t.legendWidth,i=t.legendContent,o=Gn(n,rd);if(!o)return null;var l=rd.defaultProps,c=l!==void 0?Ko(Ko({},l),o.props):{},u;return o.props&&o.props.payload?u=o.props&&o.props.payload:i==="children"?u=(s||[]).reduce(function(m,f){var p=f.item,b=f.props,v=b.sectors||b.data||[];return m.concat(v.map(function(g){return{type:o.props.iconType||p.props.legendType,value:g.name,color:g.fill,payload:g}}))},[]):u=(s||[]).map(function(m){var f=m.item,p=f.type.defaultProps,b=p!==void 0?Ko(Ko({},p),f.props):{},v=b.dataKey,g=b.name,y=b.legendType,w=b.hide;return{inactive:w,dataKey:v,type:c.iconType||y||"square",color:pA(f),value:g||v,payload:b}}),Ko(Ko(Ko({},c),rd.getWithHeight(o,a)),{},{payload:u,item:o})};function jm(e){"@babel/helpers - typeof";return jm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jm(e)}function vI(e){return ewe(e)||Zje(e)||Qje(e)||Jje()}function Jje(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 851In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qje(e,t){if(e){if(typeof e=="string")return h2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h2(e,t)}}function Zje(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ewe(e){if(Array.isArray(e))return h2(e)}function h2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function bI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function ur(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?bI(Object(n),!0).forEach(function(s){sd(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):bI(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function sd(e,t,n){return t=twe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function twe(e){var t=rwe(e,"string");return jm(t)=="symbol"?t:t+""}function rwe(e,t){if(jm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(jm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function on(e,t,n){return yt(e)||yt(t)?n:Mr(t)?Qn(e,t,n):at(t)?t(e):n}function Uh(e,t,n,s){var a=eje(e,function(l){return on(l,t)});if(n==="number"){var i=a.filter(function(l){return Te(l)||parseFloat(l)});return i.length?[hv(i),uv(i)]:[1/0,-1/0]}var o=s?a.filter(function(l){return!yt(l)}):a;return o.map(function(l){return Mr(l)||l instanceof Date?l:""})}var nwe=function(t){var n,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],a=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,o=-1,l=(n=s==null?void 0:s.length)!==null&&n!==void 0?n:0;if(l<=1)return 0;if(i&&i.axisType==="angleAxis"&&Math.abs(Math.abs(i.range[1]-i.range[0])-360)<=1e-6)for(var c=i.range,u=0;u<l;u++){var m=u>0?a[u-1].coordinate:a[l-1].coordinate,f=a[u].coordinate,p=u>=l-1?a[0].coordinate:a[u+1].coordinate,b=void 0;if(gn(f-m)!==gn(p-f)){var v=[];if(gn(p-f)===gn(c[1]-c[0])){b=p;var g=f+c[1]-c[0];v[0]=Math.min(g,(g+m)/2),v[1]=Math.max(g,(g+m)/2)}else{b=m;var y=p+c[1]-c[0];v[0]=Math.min(f,(y+f)/2),v[1]=Math.max(f,(y+f)/2)}var w=[Math.min(f,(b+f)/2),Math.max(f,(b+f)/2)];if(t>w[0]&&t<=w[1]||t>=v[0]&&t<=v[1]){o=a[u].index;break}}else{var N=Math.min(m,p),S=Math.max(m,p);if(t>(N+f)/2&&t<=(S+f)/2){o=a[u].index;break}}}else for(var A=0;A<l;A++)if(A===0&&t<=(s[A].coordinate+s[A+1].coordinate)/2||A>0&&A<l-1&&t>(s[A].coordinate+s[A-1].coordinate)/2&&t<=(s[A].coordinate+s[A+1].coordinate)/2||A===l-1&&t>(s[A].coordinate+s[A-1].coordinate)/2){o=s[A].index;break}return o},pA=function(t){var n,s=t,a=s.type.displayName,i=(n=t.type)!==null&&n!==void 0&&n.defaultProps?ur(ur({},t.type.defaultProps),t.props):t.props,o=i.stroke,l=i.fill,c;switch(a){case"Line":c=o;break;case"Area":case"Radar":c=o&&o!=="none"?o:l;break;default:c=l;break}return c},swe=function(t){var n=t.barSize,s=t.totalSize,a=t.stackGroups,i=a===void 0?{}:a;if(!i)return{};for(var o={},l=Object.keys(i),c=0,u=l.length;c<u;c++)for(var m=i[l[c]].stackGroups,f=Object.keys(m),p=0,b=f.length;p<b;p++){var v=m[f[p]],g=v.items,y=v.cateAxisId,w=g.filter(function(T){return ti(T.type).indexOf("Bar")>=0});if(w&&w.length){var N=w[0].type.defaultProps,S=N!==void 0?ur(ur({},N),w[0].props):w[0].props,A=S.barSize,k=S[y];o[k]||(o[k]=[]);var C=yt(A)?n:A;o[k].push({item:w[0],stackList:w.slice(1),barSize:yt(C)?void 0:yn(C,s,0)})}}return o},awe=function(t){var n=t.barGap,s=t.barCategoryGap,a=t.bandSize,i=t.sizeList,o=i===void 0?[]:i,l=t.maxBarSize,c=o.length;if(c<1)return null;var u=yn(n,a,0,!0),m,f=[];if(o[0].barSize===+o[0].barSize){var p=!1,b=a/c,v=o.reduce(function(A,k){return A+k.barSize||0},0);v+=(c-1)*u,v>=a&&(v-=(c-1)*u,u=0),v>=a&&b>0&&(p=!0,b*=.9,v=c*b);var g=(a-v)/2>>0,y={offset:g-u,size:0};m=o.reduce(function(A,k){var C={item:k.item,position:{offset:y.offset+y.size+u,size:p?b:k.barSize}},T=[].concat(vI(A),[C]);return y=T[T.length-1].position,k.stackList&&k.stackList.length&&k.stackList.forEach(function(P){T.push({item:P,position:y})}),T},f)}else{var w=yn(s,a,0,!0);a-2*w-(c-1)*u<=0&&(u=0);var N=(a-2*w-(c-1)*u)/c;N>1&&(N>>=0);var S=l===+l?Math.min(N,l):N;m=o.reduce(function(A,k,C){var T=[].concat(vI(A),[{item:k.item,position:{offset:w+(N+u)*C+(N-S)/2,size:S}}]);return k.stackList&&k.stackList.length&&k.stackList.forEach(function(P){T.push({item:P,position:T[T.length-1].position})}),T},f)}return m},iwe=function(t,n,s,a){var i=s.children,o=s.width,l=s.margin,c=o-(l.left||0)-(l.right||0),u=az({children:i,legendWidth:c});if(u){var m=a||{},f=m.width,p=m.height,b=u.align,v=u.verticalAlign,g=u.layout;if((g==="vertical"||g==="horizontal"&&v==="middle")&&b!=="center"&&Te(t[b]))return ur(ur({},t),{},sd({},b,t[b]+(f||0)));if((g==="horizontal"||g==="vertical"&&b==="center")&&v!=="middle"&&Te(t[v]))return ur(ur({},t),{},sd({},v,t[v]+(p||0)))}return t},owe=function(t,n,s){return yt(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||s==="x"?n==="xAxis":s==="y"?n==="yAxis":!0},iz=function(t,n,s,a,i){var o=n.props.children,l=vs(o,xv).filter(function(u){return owe(a,i,u.props.direction)});if(l&&l.length){var c=l.map(function(u){return u.props.dataKey});return t.reduce(function(u,m){var f=on(m,s);if(yt(f))return u;var p=Array.isArray(f)?[hv(f),uv(f)]:[f,f],b=c.reduce(function(v,g){var y=on(m,g,0),w=p[0]-Math.abs(Array.isArray(y)?y[0]:y),N=p[1]+Math.abs(Array.isArray(y)?y[1]:y);return[Math.min(w,v[0]),Math.max(N,v[1])]},[1/0,-1/0]);return[Math.min(b[0],u[0]),Math.max(b[1],u[1])]},[1/0,-1/0])}return null},lwe=function(t,n,s,a,i){var o=n.map(function(l){return iz(t,l,s,i,a)}).filter(function(l){return!yt(l)});return o&&o.length?o.reduce(function(l,c){return[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]):null},oz=function(t,n,s,a,i){var o=n.map(function(c){var u=c.props.dataKey;return s==="number"&&u&&iz(t,c,u,a)||Uh(t,u,s,i)});if(s==="number")return o.reduce(function(c,u){return[Math.min(c[0],u[0]),Math.max(c[1],u[1])]},[1/0,-1/0]);var l={};return o.reduce(function(c,u){for(var m=0,f=u.length;m<f;m++)l[u[m]]||(l[u[m]]=!0,c.push(u[m]));return c},[])},lz=function(t,n){return t==="horizontal"&&n==="xAxis"||t==="vertical"&&n==="yAxis"||t==="centric"&&n==="angleAxis"||t==="radial"&&n==="radiusAxis"},cz=function(t,n,s,a){if(a)return t.map(function(c){return c.coordinate});var i,o,l=t.map(function(c){return c.coordinate===n&&(i=!0),c.coordinate===s&&(o=!0),c.coordinate});return i||l.push(n),o||l.push(s),l},Xa=function(t,n,s){if(!t)return null;var a=t.scale,i=t.duplicateDomain,o=t.type,l=t.range,c=t.realScaleType==="scaleBand"?a.bandwidth()/2:2,u=(n||s)&&o==="category"&&a.bandwidth?a.bandwidth()/c:0;if(u=t.axisType==="angleAxis"&&(l==null?void 0:l.length)>=2?gn(l[0]-l[1])*2*u:u,n&&(t.ticks||t.niceTicks)){var m=(t.ticks||t.niceTicks).map(function(f){var p=i?i.indexOf(f):f;return{coordinate:a(p)+u,value:f,offset:u}});return m.filter(function(f){return!ff(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,p){return{coordinate:a(f)+u,value:f,index:p,offset:u}}):a.ticks&&!s?a.ticks(t.tickCount).map(function(f){return{coordinate:a(f)+u,value:f,offset:u}}):a.domain().map(function(f,p){return{coordinate:a(f)+u,value:i?i[f]:f,index:p,offset:u}})},q1=new WeakMap,ax=function(t,n){if(typeof n!="function")return t;q1.has(t)||q1.set(t,new WeakMap);var s=q1.get(t);if(s.has(n))return s.get(n);var a=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return s.set(n,a),a},dz=function(t,n,s){var a=t.scale,i=t.type,o=t.layout,l=t.axisType;if(a==="auto")return o==="radial"&&l==="radiusAxis"?{scale:mm(),realScaleType:"band"}:o==="radial"&&l==="angleAxis"?{scale:Tg(),realScaleType:"linear"}:i==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!s)?{scale:Vh(),realScaleType:"point"}:i==="category"?{scale:mm(),realScaleType:"band"}:{scale:Tg(),realScaleType:"linear"};if($l(a)){var c="scale".concat(Jy(a));return{scale:(aI[c]||Vh)(),realScaleType:aI[c]?c:"point"}}return at(a)?{scale:a}:{scale:Vh(),realScaleType:"point"}},jI=1e-4,uz=function(t){var n=t.domain();if(!(!n||n.length<=2)){var s=n.length,a=t.range(),i=Math.min(a[0],a[1])-jI,o=Math.max(a[0],a[1])+jI,l=t(n[0]),c=t(n[s-1]);(l<i||l>o||c<i||c>o)&&t.domain([n[0],n[s-1]])}},cwe=function(t,n){if(!t)return null;for(var s=0,a=t.length;s<a;s++)if(t[s].item===n)return t[s].position;return null},dwe=function(t,n){if(!n||n.length!==2||!Te(n[0])||!Te(n[1]))return t;var s=Math.min(n[0],n[1]),a=Math.max(n[0],n[1]),i=[t[0],t[1]];return(!Te(t[0])||t[0]<s)&&(i[0]=s),(!Te(t[1])||t[1]>a)&&(i[1]=a),i[0]>a&&(i[0]=a),i[1]<s&&(i[1]=s),i},uwe=function(t){var n=t.length;if(!(n<=0))for(var s=0,a=t[0].length;s<a;++s)for(var i=0,o=0,l=0;l<n;++l){var c=ff(t[l][s][1])?t[l][s][0]:t[l][s][1];c>=0?(t[l][s][0]=i,t[l][s][1]=i+c,i=t[l][s][1]):(t[l][s][0]=o,t[l][s][1]=o+c,o=t[l][s][1])}},hwe=function(t){var n=t.length;if(!(n<=0))for(var s=0,a=t[0].length;s<a;++s)for(var i=0,o=0;o<n;++o){var l=ff(t[o][s][1])?t[o][s][0]:t[o][s][1];l>=0?(t[o][s][0]=i,t[o][s][1]=i+l,i=t[o][s][1]):(t[o][s][0]=0,t[o][s][1]=0)}},mwe={sign:uwe,expand:exe,none:Sd,silhouette:txe,wiggle:rxe,positive:hwe},fwe=function(t,n,s){var a=n.map(function(l){return l.props.dataKey}),i=mwe[s],o=Zpe().keys(a).value(function(l,c){return+on(l,c,0)}).order(VS).offset(i);return o(t)},pwe=function(t,n,s,a,i,o){if(!t)return null;var l=o?n.reverse():n,c={},u=l.reduce(function(f,p){var b,v=(b=p.type)!==null&&b!==void 0&&b.defaultProps?ur(ur({},p.type.defaultProps),p.props):p.props,g=v.stackId,y=v.hide;if(y)return f;var w=v[s],N=f[w]||{hasStack:!1,stackGroups:{}};if(Mr(g)){var S=N.stackGroups[g]||{numericAxisId:s,cateAxisId:a,items:[]};S.items.push(p),N.hasStack=!0,N.stackGroups[g]=S}else N.stackGroups[pf("_stackId_")]={numericAxisId:s,cateAxisId:a,items:[p]};return ur(ur({},f),{},sd({},w,N))},c),m={};return Object.keys(u).reduce(function(f,p){var b=u[p];if(b.hasStack){var v={};b.stackGroups=Object.keys(b.stackGroups).reduce(function(g,y){var w=b.stackGroups[y];return ur(ur({},g),{},sd({},y,{numericAxisId:s,cateAxisId:a,items:w.items,stackedData:fwe(t,w.items,i)}))},v)}return ur(ur({},f),{},sd({},p,b))},m)},hz=function(t,n){var s=n.realScaleType,a=n.type,i=n.tickCount,o=n.originalDomain,l=n.allowDecimals,c=s||n.scale;if(c!=="auto"&&c!=="linear")return null;if(i&&a==="number"&&o&&(o[0]==="auto"||o[1]==="auto")){var u=t.domain();if(!u.length)return null;var m=Tje(u,i,l);return t.domain([hv(m),uv(m)]),{niceTicks:m}}if(i&&a==="number"){var f=t.domain(),p=Eje(f,i,l);return{niceTicks:p}}return null},wI=function(t){var n=t.axis,s=t.ticks,a=t.offset,i=t.bandSize,o=t.entry,l=t.index;if(n.type==="category")return s[l]?s[l].coordinate+a:null;var c=on(o,n.dataKey,n.domain[l]);return yt(c)?null:n.scale(c)-i/2+a},xwe=function(t){var n=t.numericAxis,s=n.scale.domain();if(n.type==="number"){var a=Math.min(s[0],s[1]),i=Math.max(s[0],s[1]);return a<=0&&i>=0?0:i<0?i:a}return s[0]},gwe=function(t,n){var s,a=(s=t.type)!==null&&s!==void 0&&s.defaultProps?ur(ur({},t.type.defaultProps),t.props):t.props,i=a.stackId;if(Mr(i)){var o=n[i];if(o){var l=o.items.indexOf(t);return l>=0?o.stackedData[l]:null}}return null},ywe=function(t){return t.reduce(function(n,s){return[hv(s.concat([n[0]]).filter(Te)),uv(s.concat([n[1]]).filter(Te))]},[1/0,-1/0])},mz=function(t,n,s){return Object.keys(t).reduce(function(a,i){var o=t[i],l=o.stackedData,c=l.reduce(function(u,m){var f=ywe(m.slice(n,s+1));return[Math.min(u[0],f[0]),Math.max(u[1],f[1])]},[1/0,-1/0]);return[Math.min(c[0],a[0]),Math.max(c[1],a[1])]},[1/0,-1/0]).map(function(a){return a===1/0||a===-1/0?0:a})},NI=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,_I=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,m2=function(t,n,s){if(at(t))return t(n,s);if(!Array.isArray(t))return n;var a=[];if(Te(t[0]))a[0]=s?t[0]:Math.min(t[0],n[0]);else if(NI.test(t[0])){var i=+NI.exec(t[0])[1];a[0]=n[0]-i}else at(t[0])?a[0]=t[0](n[0]):a[0]=n[0];if(Te(t[1]))a[1]=s?t[1]:Math.max(t[1],n[1]);else if(_I.test(t[1])){var o=+_I.exec(t[1])[1];a[1]=n[1]+o}else at(t[1])?a[1]=t[1](n[1]):a[1]=n[1];return a},Dg=function(t,n,s){if(t&&t.scale&&t.scale.bandwidth){var a=t.scale.bandwidth();if(!s||a>0)return a}if(t&&n&&n.length>=2){for(var i=UC(n,function(f){return f.coordinate}),o=1/0,l=1,c=i.length;l<c;l++){var u=i[l],m=i[l-1];o=Math.min((u.coordinate||0)-(m.coordinate||0),o)}return o===1/0?0:o}return s?void 0:0},SI=function(t,n,s){return!t||!t.length||mv(t,Qn(s,"type.defaultProps.domain"))?n:t},fz=function(t,n){var s=t.type.defaultProps?ur(ur({},t.type.defaultProps),t.props):t.props,a=s.dataKey,i=s.name,o=s.unit,l=s.formatter,c=s.tooltipType,u=s.chartType,m=s.hide;return ur(ur({},nt(t,!1)),{},{dataKey:a,unit:o,formatter:l,name:i||a,color:pA(t),value:on(n,a),type:c,payload:n,chartType:u,hide:m})};function wm(e){"@babel/helpers - typeof";return wm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wm(e)}function kI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function za(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?kI(Object(n),!0).forEach(function(s){pz(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kI(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function pz(e,t,n){return t=vwe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vwe(e){var t=bwe(e,"string");return wm(t)=="symbol"?t:t+""}function bwe(e,t){if(wm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(wm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jwe(e,t){return Swe(e)||_we(e,t)||Nwe(e,t)||wwe()}function wwe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 852In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nwe(e,t){if(e){if(typeof e=="string")return CI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return CI(e,t)}}function CI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function _we(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function Swe(e){if(Array.isArray(e))return e}var Lg=Math.PI/180,kwe=function(t){return t*180/Math.PI},Gt=function(t,n,s,a){return{x:t+Math.cos(-Lg*a)*s,y:n+Math.sin(-Lg*a)*s}},xz=function(t,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(s.left||0)-(s.right||0)),Math.abs(n-(s.top||0)-(s.bottom||0)))/2},Cwe=function(t,n,s,a,i){var o=t.width,l=t.height,c=t.startAngle,u=t.endAngle,m=yn(t.cx,o,o/2),f=yn(t.cy,l,l/2),p=xz(o,l,s),b=yn(t.innerRadius,p,0),v=yn(t.outerRadius,p,p*.8),g=Object.keys(n);return g.reduce(function(y,w){var N=n[w],S=N.domain,A=N.reversed,k;if(yt(N.range))a==="angleAxis"?k=[c,u]:a==="radiusAxis"&&(k=[b,v]),A&&(k=[k[1],k[0]]);else{k=N.range;var C=k,T=jwe(C,2);c=T[0],u=T[1]}var P=dz(N,i),R=P.realScaleType,M=P.scale;M.domain(S).range(k),uz(M);var D=hz(M,za(za({},N),{},{realScaleType:R})),$=za(za(za({},N),D),{},{range:k,radius:v,realScaleType:R,scale:M,cx:m,cy:f,innerRadius:b,outerRadius:v,startAngle:c,endAngle:u});return za(za({},y),{},pz({},w,$))},{})},Awe=function(t,n){var s=t.x,a=t.y,i=n.x,o=n.y;return Math.sqrt(Math.pow(s-i,2)+Math.pow(a-o,2))},Twe=function(t,n){var s=t.x,a=t.y,i=n.cx,o=n.cy,l=Awe({x:s,y:a},{x:i,y:o});if(l<=0)return{radius:l};var c=(s-i)/l,u=Math.acos(c);return a>o&&(u=2*Math.PI-u),{radius:l,angle:kwe(u),angleInRadian:u}},Ewe=function(t){var n=t.startAngle,s=t.endAngle,a=Math.floor(n/360),i=Math.floor(s/360),o=Math.min(a,i);return{startAngle:n-o*360,endAngle:s-o*360}},Pwe=function(t,n){var s=n.startAngle,a=n.endAngle,i=Math.floor(s/360),o=Math.floor(a/360),l=Math.min(i,o);return t+l*360},AI=function(t,n){var s=t.x,a=t.y,i=Twe({x:s,y:a},n),o=i.radius,l=i.angle,c=n.innerRadius,u=n.outerRadius;if(o<c||o>u)return!1;if(o===0)return!0;var m=Ewe(n),f=m.startAngle,p=m.endAngle,b=l,v;if(f<=p){for(;b>p;)b-=360;for(;b<f;)b+=360;v=b>=f&&b<=p}else{for(;b>f;)b-=360;for(;b<p;)b+=360;v=b>=p&&b<=f}return v?za(za({},n),{},{radius:o,angle:Pwe(b,n)}):null},gz=function(t){return!j.isValidElement(t)&&!at(t)&&typeof t!="boolean"?t.className:""};function Nm(e){"@babel/helpers - typeof";return Nm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nm(e)}var Owe=["offset"];function Mwe(e){return Lwe(e)||Dwe(e)||Iwe(e)||Rwe()}function Rwe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 853In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Iwe(e,t){if(e){if(typeof e=="string")return f2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f2(e,t)}}function Dwe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Lwe(e){if(Array.isArray(e))return f2(e)}function f2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function $we(e,t){if(e==null)return{};var n=Fwe(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function Fwe(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function TI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function Or(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TI(Object(n),!0).forEach(function(s){Bwe(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TI(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Bwe(e,t,n){return t=qwe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qwe(e){var t=Vwe(e,"string");return Nm(t)=="symbol"?t:t+""}function Vwe(e,t){if(Nm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Nm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},_m.apply(this,arguments)}var Uwe=function(t){var n=t.value,s=t.formatter,a=yt(t.children)?n:t.children;return at(s)?s(a):a},zwe=function(t,n){var s=gn(n-t),a=Math.min(Math.abs(n-t),360);return s*a},Wwe=function(t,n,s){var a=t.position,i=t.viewBox,o=t.offset,l=t.className,c=i,u=c.cx,m=c.cy,f=c.innerRadius,p=c.outerRadius,b=c.startAngle,v=c.endAngle,g=c.clockWise,y=(f+p)/2,w=zwe(b,v),N=w>=0?1:-1,S,A;a==="insideStart"?(S=b+N*o,A=g):a==="insideEnd"?(S=v-N*o,A=!g):a==="end"&&(S=v+N*o,A=g),A=w<=0?A:!A;var k=Gt(u,m,y,S),C=Gt(u,m,y,S+(A?1:-1)*359),T="M".concat(k.x,",").concat(k.y,` 854 A`).concat(y,",").concat(y,",0,1,").concat(A?0:1,`, 855 `).concat(C.x,",").concat(C.y),P=yt(t.id)?pf("recharts-radial-line-"):t.id;return X.createElement("text",_m({},s,{dominantBaseline:"central",className:ct("recharts-radial-bar-label",l)}),X.createElement("defs",null,X.createElement("path",{id:P,d:T})),X.createElement("textPath",{xlinkHref:"#".concat(P)},n))},Hwe=function(t){var n=t.viewBox,s=t.offset,a=t.position,i=n,o=i.cx,l=i.cy,c=i.innerRadius,u=i.outerRadius,m=i.startAngle,f=i.endAngle,p=(m+f)/2;if(a==="outside"){var b=Gt(o,l,u+s,p),v=b.x,g=b.y;return{x:v,y:g,textAnchor:v>=o?"start":"end",verticalAnchor:"middle"}}if(a==="center")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"middle"};if(a==="centerTop")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"start"};if(a==="centerBottom")return{x:o,y:l,textAnchor:"middle",verticalAnchor:"end"};var y=(c+u)/2,w=Gt(o,l,y,p),N=w.x,S=w.y;return{x:N,y:S,textAnchor:"middle",verticalAnchor:"middle"}},Gwe=function(t){var n=t.viewBox,s=t.parentViewBox,a=t.offset,i=t.position,o=n,l=o.x,c=o.y,u=o.width,m=o.height,f=m>=0?1:-1,p=f*a,b=f>0?"end":"start",v=f>0?"start":"end",g=u>=0?1:-1,y=g*a,w=g>0?"end":"start",N=g>0?"start":"end";if(i==="top"){var S={x:l+u/2,y:c-f*a,textAnchor:"middle",verticalAnchor:b};return Or(Or({},S),s?{height:Math.max(c-s.y,0),width:u}:{})}if(i==="bottom"){var A={x:l+u/2,y:c+m+p,textAnchor:"middle",verticalAnchor:v};return Or(Or({},A),s?{height:Math.max(s.y+s.height-(c+m),0),width:u}:{})}if(i==="left"){var k={x:l-y,y:c+m/2,textAnchor:w,verticalAnchor:"middle"};return Or(Or({},k),s?{width:Math.max(k.x-s.x,0),height:m}:{})}if(i==="right"){var C={x:l+u+y,y:c+m/2,textAnchor:N,verticalAnchor:"middle"};return Or(Or({},C),s?{width:Math.max(s.x+s.width-C.x,0),height:m}:{})}var T=s?{width:u,height:m}:{};return i==="insideLeft"?Or({x:l+y,y:c+m/2,textAnchor:N,verticalAnchor:"middle"},T):i==="insideRight"?Or({x:l+u-y,y:c+m/2,textAnchor:w,verticalAnchor:"middle"},T):i==="insideTop"?Or({x:l+u/2,y:c+p,textAnchor:"middle",verticalAnchor:v},T):i==="insideBottom"?Or({x:l+u/2,y:c+m-p,textAnchor:"middle",verticalAnchor:b},T):i==="insideTopLeft"?Or({x:l+y,y:c+p,textAnchor:N,verticalAnchor:v},T):i==="insideTopRight"?Or({x:l+u-y,y:c+p,textAnchor:w,verticalAnchor:v},T):i==="insideBottomLeft"?Or({x:l+y,y:c+m-p,textAnchor:N,verticalAnchor:b},T):i==="insideBottomRight"?Or({x:l+u-y,y:c+m-p,textAnchor:w,verticalAnchor:b},T):ou(i)&&(Te(i.x)||cl(i.x))&&(Te(i.y)||cl(i.y))?Or({x:l+yn(i.x,u),y:c+yn(i.y,m),textAnchor:"end",verticalAnchor:"end"},T):Or({x:l+u/2,y:c+m/2,textAnchor:"middle",verticalAnchor:"middle"},T)},Kwe=function(t){return"cx"in t&&Te(t.cx)};function qr(e){var t=e.offset,n=t===void 0?5:t,s=$we(e,Owe),a=Or({offset:n},s),i=a.viewBox,o=a.position,l=a.value,c=a.children,u=a.content,m=a.className,f=m===void 0?"":m,p=a.textBreakAll;if(!i||yt(l)&&yt(c)&&!j.isValidElement(u)&&!at(u))return null;if(j.isValidElement(u))return j.cloneElement(u,a);var b;if(at(u)){if(b=j.createElement(u,a),j.isValidElement(b))return b}else b=Uwe(a);var v=Kwe(i),g=nt(a,!0);if(v&&(o==="insideStart"||o==="insideEnd"||o==="end"))return Wwe(a,b,g);var y=v?Hwe(a):Gwe(a);return X.createElement(Bl,_m({className:ct("recharts-label",f)},g,y,{breakAll:p}),b)}qr.displayName="Label";var yz=function(t){var n=t.cx,s=t.cy,a=t.angle,i=t.startAngle,o=t.endAngle,l=t.r,c=t.radius,u=t.innerRadius,m=t.outerRadius,f=t.x,p=t.y,b=t.top,v=t.left,g=t.width,y=t.height,w=t.clockWise,N=t.labelViewBox;if(N)return N;if(Te(g)&&Te(y)){if(Te(f)&&Te(p))return{x:f,y:p,width:g,height:y};if(Te(b)&&Te(v))return{x:b,y:v,width:g,height:y}}return Te(f)&&Te(p)?{x:f,y:p,width:0,height:0}:Te(n)&&Te(s)?{cx:n,cy:s,startAngle:i||a||0,endAngle:o||a||0,innerRadius:u||0,outerRadius:m||c||l||0,clockWise:w}:t.viewBox?t.viewBox:{}},Ywe=function(t,n){return t?t===!0?X.createElement(qr,{key:"label-implicit",viewBox:n}):Mr(t)?X.createElement(qr,{key:"label-implicit",viewBox:n,value:t}):j.isValidElement(t)?t.type===qr?j.cloneElement(t,{key:"label-implicit",viewBox:n}):X.createElement(qr,{key:"label-implicit",content:t,viewBox:n}):at(t)?X.createElement(qr,{key:"label-implicit",content:t,viewBox:n}):ou(t)?X.createElement(qr,_m({viewBox:n},t,{key:"label-implicit"})):null:null},Xwe=function(t,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&s&&!t.label)return null;var a=t.children,i=yz(t),o=vs(a,qr).map(function(c,u){return j.cloneElement(c,{viewBox:n||i,key:"label-".concat(u)})});if(!s)return o;var l=Ywe(t.label,n||i);return[l].concat(Mwe(o))};qr.parseViewBox=yz;qr.renderCallByParent=Xwe;var V1,EI;function Jwe(){if(EI)return V1;EI=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return V1=e,V1}var Qwe=Jwe();const Zwe=Et(Qwe);function Sm(e){"@babel/helpers - typeof";return Sm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sm(e)}var eNe=["valueAccessor"],tNe=["data","dataKey","clockWise","id","textBreakAll"];function rNe(e){return iNe(e)||aNe(e)||sNe(e)||nNe()}function nNe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 856In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function sNe(e,t){if(e){if(typeof e=="string")return p2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return p2(e,t)}}function aNe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function iNe(e){if(Array.isArray(e))return p2(e)}function p2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},$g.apply(this,arguments)}function PI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function OI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PI(Object(n),!0).forEach(function(s){oNe(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PI(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function oNe(e,t,n){return t=lNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lNe(e){var t=cNe(e,"string");return Sm(t)=="symbol"?t:t+""}function cNe(e,t){if(Sm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Sm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function MI(e,t){if(e==null)return{};var n=dNe(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function dNe(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}var uNe=function(t){return Array.isArray(t.value)?Zwe(t.value):t.value};function co(e){var t=e.valueAccessor,n=t===void 0?uNe:t,s=MI(e,eNe),a=s.data,i=s.dataKey,o=s.clockWise,l=s.id,c=s.textBreakAll,u=MI(s,tNe);return!a||!a.length?null:X.createElement(Dt,{className:"recharts-label-list"},a.map(function(m,f){var p=yt(i)?n(m,f):on(m&&m.payload,i),b=yt(l)?{}:{id:"".concat(l,"-").concat(f)};return X.createElement(qr,$g({},nt(m,!0),u,b,{parentViewBox:m.parentViewBox,value:p,textBreakAll:c,viewBox:qr.parseViewBox(yt(o)?m:OI(OI({},m),{},{clockWise:o})),key:"label-".concat(f),index:f}))}))}co.displayName="LabelList";function hNe(e,t){return e?e===!0?X.createElement(co,{key:"labelList-implicit",data:t}):X.isValidElement(e)||at(e)?X.createElement(co,{key:"labelList-implicit",data:t,content:e}):ou(e)?X.createElement(co,$g({data:t},e,{key:"labelList-implicit"})):null:null}function mNe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var s=e.children,a=vs(s,co).map(function(o,l){return j.cloneElement(o,{data:t,key:"labelList-".concat(l)})});if(!n)return a;var i=hNe(e.label,t);return[i].concat(rNe(a))}co.renderCallByParent=mNe;function km(e){"@babel/helpers - typeof";return km=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},km(e)}function x2(){return x2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},x2.apply(this,arguments)}function RI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function II(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RI(Object(n),!0).forEach(function(s){fNe(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RI(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function fNe(e,t,n){return t=pNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pNe(e){var t=xNe(e,"string");return km(t)=="symbol"?t:t+""}function xNe(e,t){if(km(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(km(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gNe=function(t,n){var s=gn(n-t),a=Math.min(Math.abs(n-t),359.999);return s*a},ix=function(t){var n=t.cx,s=t.cy,a=t.radius,i=t.angle,o=t.sign,l=t.isExternal,c=t.cornerRadius,u=t.cornerIsExternal,m=c*(l?1:-1)+a,f=Math.asin(c/m)/Lg,p=u?i:i+o*f,b=Gt(n,s,m,p),v=Gt(n,s,a,p),g=u?i-o*f:i,y=Gt(n,s,m*Math.cos(f*Lg),g);return{center:b,circleTangency:v,lineTangency:y,theta:f}},vz=function(t){var n=t.cx,s=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.startAngle,l=t.endAngle,c=gNe(o,l),u=o+c,m=Gt(n,s,i,o),f=Gt(n,s,i,u),p="M ".concat(m.x,",").concat(m.y,` 857 A `).concat(i,",").concat(i,`,0, 858 `).concat(+(Math.abs(c)>180),",").concat(+(o>u),`, 859 `).concat(f.x,",").concat(f.y,` 860 `);if(a>0){var b=Gt(n,s,a,o),v=Gt(n,s,a,u);p+="L ".concat(v.x,",").concat(v.y,` 861 A `).concat(a,",").concat(a,`,0, 862 `).concat(+(Math.abs(c)>180),",").concat(+(o<=u),`, 863 `).concat(b.x,",").concat(b.y," Z")}else p+="L ".concat(n,",").concat(s," Z");return p},yNe=function(t){var n=t.cx,s=t.cy,a=t.innerRadius,i=t.outerRadius,o=t.cornerRadius,l=t.forceCornerRadius,c=t.cornerIsExternal,u=t.startAngle,m=t.endAngle,f=gn(m-u),p=ix({cx:n,cy:s,radius:i,angle:u,sign:f,cornerRadius:o,cornerIsExternal:c}),b=p.circleTangency,v=p.lineTangency,g=p.theta,y=ix({cx:n,cy:s,radius:i,angle:m,sign:-f,cornerRadius:o,cornerIsExternal:c}),w=y.circleTangency,N=y.lineTangency,S=y.theta,A=c?Math.abs(u-m):Math.abs(u-m)-g-S;if(A<0)return l?"M ".concat(v.x,",").concat(v.y,` 864 a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0 865 a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0 866 `):vz({cx:n,cy:s,innerRadius:a,outerRadius:i,startAngle:u,endAngle:m});var k="M ".concat(v.x,",").concat(v.y,` 867 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(b.x,",").concat(b.y,` 868 A`).concat(i,",").concat(i,",0,").concat(+(A>180),",").concat(+(f<0),",").concat(w.x,",").concat(w.y,` 869 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(N.x,",").concat(N.y,` 870 `);if(a>0){var C=ix({cx:n,cy:s,radius:a,angle:u,sign:f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),T=C.circleTangency,P=C.lineTangency,R=C.theta,M=ix({cx:n,cy:s,radius:a,angle:m,sign:-f,isExternal:!0,cornerRadius:o,cornerIsExternal:c}),D=M.circleTangency,$=M.lineTangency,q=M.theta,H=c?Math.abs(u-m):Math.abs(u-m)-R-q;if(H<0&&o===0)return"".concat(k,"L").concat(n,",").concat(s,"Z");k+="L".concat($.x,",").concat($.y,` 871 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(D.x,",").concat(D.y,` 872 A`).concat(a,",").concat(a,",0,").concat(+(H>180),",").concat(+(f>0),",").concat(T.x,",").concat(T.y,` 873 A`).concat(o,",").concat(o,",0,0,").concat(+(f<0),",").concat(P.x,",").concat(P.y,"Z")}else k+="L".concat(n,",").concat(s,"Z");return k},vNe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},bz=function(t){var n=II(II({},vNe),t),s=n.cx,a=n.cy,i=n.innerRadius,o=n.outerRadius,l=n.cornerRadius,c=n.forceCornerRadius,u=n.cornerIsExternal,m=n.startAngle,f=n.endAngle,p=n.className;if(o<i||m===f)return null;var b=ct("recharts-sector",p),v=o-i,g=yn(l,v,0,!0),y;return g>0&&Math.abs(m-f)<360?y=yNe({cx:s,cy:a,innerRadius:i,outerRadius:o,cornerRadius:Math.min(g,v/2),forceCornerRadius:c,cornerIsExternal:u,startAngle:m,endAngle:f}):y=vz({cx:s,cy:a,innerRadius:i,outerRadius:o,startAngle:m,endAngle:f}),X.createElement("path",x2({},nt(n,!0),{className:b,d:y,role:"img"}))};function Cm(e){"@babel/helpers - typeof";return Cm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cm(e)}function g2(){return g2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},g2.apply(this,arguments)}function DI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function LI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DI(Object(n),!0).forEach(function(s){bNe(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DI(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function bNe(e,t,n){return t=jNe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jNe(e){var t=wNe(e,"string");return Cm(t)=="symbol"?t:t+""}function wNe(e,t){if(Cm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Cm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $I={curveBasisClosed:Vpe,curveBasisOpen:Upe,curveBasis:qpe,curveBumpX:Cpe,curveBumpY:Ape,curveLinearClosed:zpe,curveLinear:Zy,curveMonotoneX:Wpe,curveMonotoneY:Hpe,curveNatural:Gpe,curveStep:Kpe,curveStepAfter:Xpe,curveStepBefore:Ype},ox=function(t){return t.x===+t.x&&t.y===+t.y},uh=function(t){return t.x},hh=function(t){return t.y},NNe=function(t,n){if(at(t))return t;var s="curve".concat(Jy(t));return(s==="curveMonotone"||s==="curveBump")&&n?$I["".concat(s).concat(n==="vertical"?"Y":"X")]:$I[s]||Zy},_Ne=function(t){var n=t.type,s=n===void 0?"linear":n,a=t.points,i=a===void 0?[]:a,o=t.baseLine,l=t.layout,c=t.connectNulls,u=c===void 0?!1:c,m=NNe(s,l),f=u?i.filter(function(g){return ox(g)}):i,p;if(Array.isArray(o)){var b=u?o.filter(function(g){return ox(g)}):o,v=f.map(function(g,y){return LI(LI({},g),{},{base:b[y]})});return l==="vertical"?p=Qp().y(hh).x1(uh).x0(function(g){return g.base.x}):p=Qp().x(uh).y1(hh).y0(function(g){return g.base.y}),p.defined(ox).curve(m),p(v)}return l==="vertical"&&Te(o)?p=Qp().y(hh).x1(uh).x0(o):Te(o)?p=Qp().x(uh).y1(hh).y0(o):p=vV().x(uh).y(hh),p.defined(ox).curve(m),p(f)},y2=function(t){var n=t.className,s=t.points,a=t.path,i=t.pathRef;if((!s||!s.length)&&!a)return null;var o=s&&s.length?_Ne(t):a;return j.createElement("path",g2({},nt(t,!1),dg(t),{className:ct("recharts-curve",n),d:o,ref:i}))},U1={exports:{}},z1,FI;function SNe(){if(FI)return z1;FI=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return z1=e,z1}var W1,BI;function kNe(){if(BI)return W1;BI=1;var e=SNe();function t(){}function n(){}return n.resetWarningCache=t,W1=function(){function s(o,l,c,u,m,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}s.isRequired=s;function a(){return s}var i={array:s,bigint:s,bool:s,func:s,number:s,object:s,string:s,symbol:s,any:s,arrayOf:a,element:s,elementType:s,instanceOf:a,node:s,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},W1}var qI;function CNe(){return qI||(qI=1,U1.exports=kNe()()),U1.exports}var ANe=CNe();const Ot=Et(ANe),{getOwnPropertyNames:TNe,getOwnPropertySymbols:ENe}=Object,{hasOwnProperty:PNe}=Object.prototype;function H1(e,t){return function(s,a,i){return e(s,a,i)&&t(s,a,i)}}function lx(e){return function(n,s,a){if(!n||!s||typeof n!="object"||typeof s!="object")return e(n,s,a);const{cache:i}=a,o=i.get(n),l=i.get(s);if(o&&l)return o===s&&l===n;i.set(n,s),i.set(s,n);const c=e(n,s,a);return i.delete(n),i.delete(s),c}}function ONe(e){return e!=null?e[Symbol.toStringTag]:void 0}function VI(e){return TNe(e).concat(ENe(e))}const MNe=Object.hasOwn||((e,t)=>PNe.call(e,t));function nc(e,t){return e===t||!e&&!t&&e!==e&&t!==t}const RNe="__v",INe="__o",DNe="_owner",{getOwnPropertyDescriptor:UI,keys:zI}=Object;function LNe(e,t){return e.byteLength===t.byteLength&&Fg(new Uint8Array(e),new Uint8Array(t))}function $Ne(e,t,n){let s=e.length;if(t.length!==s)return!1;for(;s-- >0;)if(!n.equals(e[s],t[s],s,s,e,t,n))return!1;return!0}function FNe(e,t){return e.byteLength===t.byteLength&&Fg(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function BNe(e,t){return nc(e.getTime(),t.getTime())}function qNe(e,t){return e.name===t.name&&e.message===t.message&&e.cause===t.cause&&e.stack===t.stack}function VNe(e,t){return e===t}function WI(e,t,n){const s=e.size;if(s!==t.size)return!1;if(!s)return!0;const a=new Array(s),i=e.entries();let o,l,c=0;for(;(o=i.next())&&!o.done;){const u=t.entries();let m=!1,f=0;for(;(l=u.next())&&!l.done;){if(a[f]){f++;continue}const p=o.value,b=l.value;if(n.equals(p[0],b[0],c,f,e,t,n)&&n.equals(p[1],b[1],p[0],b[0],e,t,n)){m=a[f]=!0;break}f++}if(!m)return!1;c++}return!0}const UNe=nc;function zNe(e,t,n){const s=zI(e);let a=s.length;if(zI(t).length!==a)return!1;for(;a-- >0;)if(!jz(e,t,n,s[a]))return!1;return!0}function mh(e,t,n){const s=VI(e);let a=s.length;if(VI(t).length!==a)return!1;let i,o,l;for(;a-- >0;)if(i=s[a],!jz(e,t,n,i)||(o=UI(e,i),l=UI(t,i),(o||l)&&(!o||!l||o.configurable!==l.configurable||o.enumerable!==l.enumerable||o.writable!==l.writable)))return!1;return!0}function WNe(e,t){return nc(e.valueOf(),t.valueOf())}function HNe(e,t){return e.source===t.source&&e.flags===t.flags}function HI(e,t,n){const s=e.size;if(s!==t.size)return!1;if(!s)return!0;const a=new Array(s),i=e.values();let o,l;for(;(o=i.next())&&!o.done;){const c=t.values();let u=!1,m=0;for(;(l=c.next())&&!l.done;){if(!a[m]&&n.equals(o.value,l.value,o.value,l.value,e,t,n)){u=a[m]=!0;break}m++}if(!u)return!1}return!0}function Fg(e,t){let n=e.byteLength;if(t.byteLength!==n||e.byteOffset!==t.byteOffset)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}function GNe(e,t){return e.hostname===t.hostname&&e.pathname===t.pathname&&e.protocol===t.protocol&&e.port===t.port&&e.hash===t.hash&&e.username===t.username&&e.password===t.password}function jz(e,t,n,s){return(s===DNe||s===INe||s===RNe)&&(e.$$typeof||t.$$typeof)?!0:MNe(t,s)&&n.equals(e[s],t[s],s,s,e,t,n)}const KNe="[object ArrayBuffer]",YNe="[object Arguments]",XNe="[object Boolean]",JNe="[object DataView]",QNe="[object Date]",ZNe="[object Error]",e1e="[object Map]",t1e="[object Number]",r1e="[object Object]",n1e="[object RegExp]",s1e="[object Set]",a1e="[object String]",i1e={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},o1e="[object URL]",l1e=Object.prototype.toString;function c1e({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:s,areErrorsEqual:a,areFunctionsEqual:i,areMapsEqual:o,areNumbersEqual:l,areObjectsEqual:c,arePrimitiveWrappersEqual:u,areRegExpsEqual:m,areSetsEqual:f,areTypedArraysEqual:p,areUrlsEqual:b,unknownTagComparators:v}){return function(y,w,N){if(y===w)return!0;if(y==null||w==null)return!1;const S=typeof y;if(S!==typeof w)return!1;if(S!=="object")return S==="number"?l(y,w,N):S==="function"?i(y,w,N):!1;const A=y.constructor;if(A!==w.constructor)return!1;if(A===Object)return c(y,w,N);if(Array.isArray(y))return t(y,w,N);if(A===Date)return s(y,w,N);if(A===RegExp)return m(y,w,N);if(A===Map)return o(y,w,N);if(A===Set)return f(y,w,N);const k=l1e.call(y);if(k===QNe)return s(y,w,N);if(k===n1e)return m(y,w,N);if(k===e1e)return o(y,w,N);if(k===s1e)return f(y,w,N);if(k===r1e)return typeof y.then!="function"&&typeof w.then!="function"&&c(y,w,N);if(k===o1e)return b(y,w,N);if(k===ZNe)return a(y,w,N);if(k===YNe)return c(y,w,N);if(i1e[k])return p(y,w,N);if(k===KNe)return e(y,w,N);if(k===JNe)return n(y,w,N);if(k===XNe||k===t1e||k===a1e)return u(y,w,N);if(v){let C=v[k];if(!C){const T=ONe(y);T&&(C=v[T])}if(C)return C(y,w,N)}return!1}}function d1e({circular:e,createCustomConfig:t,strict:n}){let s={areArrayBuffersEqual:LNe,areArraysEqual:n?mh:$Ne,areDataViewsEqual:FNe,areDatesEqual:BNe,areErrorsEqual:qNe,areFunctionsEqual:VNe,areMapsEqual:n?H1(WI,mh):WI,areNumbersEqual:UNe,areObjectsEqual:n?mh:zNe,arePrimitiveWrappersEqual:WNe,areRegExpsEqual:HNe,areSetsEqual:n?H1(HI,mh):HI,areTypedArraysEqual:n?H1(Fg,mh):Fg,areUrlsEqual:GNe,unknownTagComparators:void 0};if(t&&(s=Object.assign({},s,t(s))),e){const a=lx(s.areArraysEqual),i=lx(s.areMapsEqual),o=lx(s.areObjectsEqual),l=lx(s.areSetsEqual);s=Object.assign({},s,{areArraysEqual:a,areMapsEqual:i,areObjectsEqual:o,areSetsEqual:l})}return s}function u1e(e){return function(t,n,s,a,i,o,l){return e(t,n,l)}}function h1e({circular:e,comparator:t,createState:n,equals:s,strict:a}){if(n)return function(l,c){const{cache:u=e?new WeakMap:void 0,meta:m}=n();return t(l,c,{cache:u,equals:s,meta:m,strict:a})};if(e)return function(l,c){return t(l,c,{cache:new WeakMap,equals:s,meta:void 0,strict:a})};const i={cache:void 0,equals:s,meta:void 0,strict:a};return function(l,c){return t(l,c,i)}}const m1e=Co();Co({strict:!0});Co({circular:!0});Co({circular:!0,strict:!0});Co({createInternalComparator:()=>nc});Co({strict:!0,createInternalComparator:()=>nc});Co({circular:!0,createInternalComparator:()=>nc});Co({circular:!0,createInternalComparator:()=>nc,strict:!0});function Co(e={}){const{circular:t=!1,createInternalComparator:n,createState:s,strict:a=!1}=e,i=d1e(e),o=c1e(i),l=n?n(o):u1e(o);return h1e({circular:t,comparator:o,createState:s,equals:l,strict:a})}function f1e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function GI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,s=function a(i){n<0&&(n=i),i-n>t?(e(i),n=-1):f1e(a)};requestAnimationFrame(s)}function v2(e){"@babel/helpers - typeof";return v2=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},v2(e)}function p1e(e){return v1e(e)||y1e(e)||g1e(e)||x1e()}function x1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 874In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function g1e(e,t){if(e){if(typeof e=="string")return KI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KI(e,t)}}function KI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function y1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function v1e(e){if(Array.isArray(e))return e}function b1e(){var e={},t=function(){return null},n=!1,s=function a(i){if(!n){if(Array.isArray(i)){if(!i.length)return;var o=i,l=p1e(o),c=l[0],u=l.slice(1);if(typeof c=="number"){GI(a.bind(null,u),c);return}a(c),GI(a.bind(null,u));return}v2(i)==="object"&&(e=i,t(e)),typeof i=="function"&&i()}};return{stop:function(){n=!0},start:function(i){n=!1,s(i)},subscribe:function(i){return t=i,function(){t=function(){return null}}}}}function Am(e){"@babel/helpers - typeof";return Am=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Am(e)}function YI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function XI(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YI(Object(n),!0).forEach(function(s){wz(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YI(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function wz(e,t,n){return t=j1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j1e(e){var t=w1e(e,"string");return Am(t)==="symbol"?t:String(t)}function w1e(e,t){if(Am(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Am(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var N1e=function(t,n){return[Object.keys(t),Object.keys(n)].reduce(function(s,a){return s.filter(function(i){return a.includes(i)})})},_1e=function(t){return t},S1e=function(t){return t.replace(/([A-Z])/g,function(n){return"-".concat(n.toLowerCase())})},zh=function(t,n){return Object.keys(n).reduce(function(s,a){return XI(XI({},s),{},wz({},a,t(a,n[a])))},{})},JI=function(t,n,s){return t.map(function(a){return"".concat(S1e(a)," ").concat(n,"ms ").concat(s)}).join(",")};function k1e(e,t){return T1e(e)||A1e(e,t)||Nz(e,t)||C1e()}function C1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 875In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function A1e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function T1e(e){if(Array.isArray(e))return e}function E1e(e){return M1e(e)||O1e(e)||Nz(e)||P1e()}function P1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 876In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Nz(e,t){if(e){if(typeof e=="string")return b2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b2(e,t)}}function O1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function M1e(e){if(Array.isArray(e))return b2(e)}function b2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}var Bg=1e-4,_z=function(t,n){return[0,3*t,3*n-6*t,3*t-3*n+1]},Sz=function(t,n){return t.map(function(s,a){return s*Math.pow(n,a)}).reduce(function(s,a){return s+a})},QI=function(t,n){return function(s){var a=_z(t,n);return Sz(a,s)}},R1e=function(t,n){return function(s){var a=_z(t,n),i=[].concat(E1e(a.map(function(o,l){return o*l}).slice(1)),[0]);return Sz(i,s)}},ZI=function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];var a=n[0],i=n[1],o=n[2],l=n[3];if(n.length===1)switch(n[0]){case"linear":a=0,i=0,o=1,l=1;break;case"ease":a=.25,i=.1,o=.25,l=1;break;case"ease-in":a=.42,i=0,o=1,l=1;break;case"ease-out":a=.42,i=0,o=.58,l=1;break;case"ease-in-out":a=0,i=0,o=.58,l=1;break;default:{var c=n[0].split("(");if(c[0]==="cubic-bezier"&&c[1].split(")")[0].split(",").length===4){var u=c[1].split(")")[0].split(",").map(function(y){return parseFloat(y)}),m=k1e(u,4);a=m[0],i=m[1],o=m[2],l=m[3]}}}var f=QI(a,o),p=QI(i,l),b=R1e(a,o),v=function(w){return w>1?1:w<0?0:w},g=function(w){for(var N=w>1?1:w,S=N,A=0;A<8;++A){var k=f(S)-N,C=b(S);if(Math.abs(k-N)<Bg||C<Bg)return p(S);S=v(S-k/C)}return p(S)};return g.isStepper=!1,g},I1e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,s=n===void 0?100:n,a=t.damping,i=a===void 0?8:a,o=t.dt,l=o===void 0?17:o,c=function(m,f,p){var b=-(m-f)*s,v=p*i,g=p+(b-v)*l/1e3,y=p*l/1e3+m;return Math.abs(y-f)<Bg&&Math.abs(g)<Bg?[f,0]:[y,g]};return c.isStepper=!0,c.dt=l,c},D1e=function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];var a=n[0];if(typeof a=="string")switch(a){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return ZI(a);case"spring":return I1e();default:if(a.split("(")[0]==="cubic-bezier")return ZI(a)}return typeof a=="function"?a:null};function Tm(e){"@babel/helpers - typeof";return Tm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tm(e)}function eD(e){return F1e(e)||$1e(e)||kz(e)||L1e()}function L1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 877In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function F1e(e){if(Array.isArray(e))return w2(e)}function tD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function Hr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tD(Object(n),!0).forEach(function(s){j2(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function j2(e,t,n){return t=B1e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function B1e(e){var t=q1e(e,"string");return Tm(t)==="symbol"?t:String(t)}function q1e(e,t){if(Tm(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Tm(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function V1e(e,t){return W1e(e)||z1e(e,t)||kz(e,t)||U1e()}function U1e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 878In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kz(e,t){if(e){if(typeof e=="string")return w2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w2(e,t)}}function w2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function z1e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function W1e(e){if(Array.isArray(e))return e}var qg=function(t,n,s){return t+(n-t)*s},N2=function(t){var n=t.from,s=t.to;return n!==s},H1e=function e(t,n,s){var a=zh(function(i,o){if(N2(o)){var l=t(o.from,o.to,o.velocity),c=V1e(l,2),u=c[0],m=c[1];return Hr(Hr({},o),{},{from:u,velocity:m})}return o},n);return s<1?zh(function(i,o){return N2(o)?Hr(Hr({},o),{},{velocity:qg(o.velocity,a[i].velocity,s),from:qg(o.from,a[i].from,s)}):o},n):e(t,a,s-1)};const G1e=(function(e,t,n,s,a){var i=N1e(e,t),o=i.reduce(function(y,w){return Hr(Hr({},y),{},j2({},w,[e[w],t[w]]))},{}),l=i.reduce(function(y,w){return Hr(Hr({},y),{},j2({},w,{from:e[w],velocity:0,to:t[w]}))},{}),c=-1,u,m,f=function(){return null},p=function(){return zh(function(w,N){return N.from},l)},b=function(){return!Object.values(l).filter(N2).length},v=function(w){u||(u=w);var N=w-u,S=N/n.dt;l=H1e(n,l,S),a(Hr(Hr(Hr({},e),t),p())),u=w,b()||(c=requestAnimationFrame(f))},g=function(w){m||(m=w);var N=(w-m)/s,S=zh(function(k,C){return qg.apply(void 0,eD(C).concat([n(N)]))},o);if(a(Hr(Hr(Hr({},e),t),S)),N<1)c=requestAnimationFrame(f);else{var A=zh(function(k,C){return qg.apply(void 0,eD(C).concat([n(1)]))},o);a(Hr(Hr(Hr({},e),t),A))}};return f=n.isStepper?v:g,function(){return requestAnimationFrame(f),function(){cancelAnimationFrame(c)}}});function Rd(e){"@babel/helpers - typeof";return Rd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rd(e)}var K1e=["children","begin","duration","attributeName","easing","isActive","steps","from","to","canBegin","onAnimationEnd","shouldReAnimate","onAnimationReStart"];function Y1e(e,t){if(e==null)return{};var n=X1e(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function X1e(e,t){if(e==null)return{};var n={},s=Object.keys(e),a,i;for(i=0;i<s.length;i++)a=s[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function G1(e){return e_e(e)||Z1e(e)||Q1e(e)||J1e()}function J1e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 879In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Q1e(e,t){if(e){if(typeof e=="string")return _2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _2(e,t)}}function Z1e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function e_e(e){if(Array.isArray(e))return _2(e)}function _2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function rD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function Rs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rD(Object(n),!0).forEach(function(s){Mh(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Mh(e,t,n){return t=Cz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function r_e(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Cz(s.key),s)}}function n_e(e,t,n){return t&&r_e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Cz(e){var t=s_e(e,"string");return Rd(t)==="symbol"?t:String(t)}function s_e(e,t){if(Rd(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Rd(s)!=="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&S2(e,t)}function S2(e,t){return S2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},S2(e,t)}function i_e(e){var t=o_e();return function(){var s=Vg(e),a;if(t){var i=Vg(this).constructor;a=Reflect.construct(s,arguments,i)}else a=s.apply(this,arguments);return k2(this,a)}}function k2(e,t){if(t&&(Rd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return C2(e)}function C2(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o_e(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Vg(e){return Vg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Vg(e)}var di=(function(e){a_e(n,e);var t=i_e(n);function n(s,a){var i;t_e(this,n),i=t.call(this,s,a);var o=i.props,l=o.isActive,c=o.attributeName,u=o.from,m=o.to,f=o.steps,p=o.children,b=o.duration;if(i.handleStyleChange=i.handleStyleChange.bind(C2(i)),i.changeStyle=i.changeStyle.bind(C2(i)),!l||b<=0)return i.state={style:{}},typeof p=="function"&&(i.state={style:m}),k2(i);if(f&&f.length)i.state={style:f[0].style};else if(u){if(typeof p=="function")return i.state={style:u},k2(i);i.state={style:c?Mh({},c,u):u}}else i.state={style:{}};return i}return n_e(n,[{key:"componentDidMount",value:function(){var a=this.props,i=a.isActive,o=a.canBegin;this.mounted=!0,!(!i||!o)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(a){var i=this.props,o=i.isActive,l=i.canBegin,c=i.attributeName,u=i.shouldReAnimate,m=i.to,f=i.from,p=this.state.style;if(l){if(!o){var b={style:c?Mh({},c,m):m};this.state&&p&&(c&&p[c]!==m||!c&&p!==m)&&this.setState(b);return}if(!(m1e(a.to,m)&&a.canBegin&&a.isActive)){var v=!a.canBegin||!a.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var g=v||u?f:a.to;if(this.state&&p){var y={style:c?Mh({},c,g):g};(c&&p[c]!==g||!c&&p!==g)&&this.setState(y)}this.runAnimation(Rs(Rs({},this.props),{},{from:g,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var a=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),a&&a()}},{key:"handleStyleChange",value:function(a){this.changeStyle(a)}},{key:"changeStyle",value:function(a){this.mounted&&this.setState({style:a})}},{key:"runJSAnimation",value:function(a){var i=this,o=a.from,l=a.to,c=a.duration,u=a.easing,m=a.begin,f=a.onAnimationEnd,p=a.onAnimationStart,b=G1e(o,l,D1e(u),c,this.changeStyle),v=function(){i.stopJSAnimation=b()};this.manager.start([p,m,v,c,f])}},{key:"runStepAnimation",value:function(a){var i=this,o=a.steps,l=a.begin,c=a.onAnimationStart,u=o[0],m=u.style,f=u.duration,p=f===void 0?0:f,b=function(g,y,w){if(w===0)return g;var N=y.duration,S=y.easing,A=S===void 0?"ease":S,k=y.style,C=y.properties,T=y.onAnimationEnd,P=w>0?o[w-1]:y,R=C||Object.keys(k);if(typeof A=="function"||A==="spring")return[].concat(G1(g),[i.runJSAnimation.bind(i,{from:P.style,to:k,duration:N,easing:A}),N]);var M=JI(R,N,A),D=Rs(Rs(Rs({},P.style),k),{},{transition:M});return[].concat(G1(g),[D,N,T]).filter(_1e)};return this.manager.start([c].concat(G1(o.reduce(b,[m,Math.max(p,l)])),[a.onAnimationEnd]))}},{key:"runAnimation",value:function(a){this.manager||(this.manager=b1e());var i=a.begin,o=a.duration,l=a.attributeName,c=a.to,u=a.easing,m=a.onAnimationStart,f=a.onAnimationEnd,p=a.steps,b=a.children,v=this.manager;if(this.unSubscribe=v.subscribe(this.handleStyleChange),typeof u=="function"||typeof b=="function"||u==="spring"){this.runJSAnimation(a);return}if(p.length>1){this.runStepAnimation(a);return}var g=l?Mh({},l,c):c,y=JI(Object.keys(g),o,u);v.start([m,i,Rs(Rs({},g),{},{transition:y}),o,f])}},{key:"render",value:function(){var a=this.props,i=a.children;a.begin;var o=a.duration;a.attributeName,a.easing;var l=a.isActive;a.steps,a.from,a.to,a.canBegin,a.onAnimationEnd,a.shouldReAnimate,a.onAnimationReStart;var c=Y1e(a,K1e),u=j.Children.count(i),m=this.state.style;if(typeof i=="function")return i(m);if(!l||u===0||o<=0)return i;var f=function(b){var v=b.props,g=v.style,y=g===void 0?{}:g,w=v.className,N=j.cloneElement(b,Rs(Rs({},c),{},{style:Rs(Rs({},y),m),className:w}));return N};return u===1?f(j.Children.only(i)):X.createElement("div",null,j.Children.map(i,function(p){return f(p)}))}}]),n})(j.PureComponent);di.displayName="Animate";di.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};di.propTypes={from:Ot.oneOfType([Ot.object,Ot.string]),to:Ot.oneOfType([Ot.object,Ot.string]),attributeName:Ot.string,duration:Ot.number,begin:Ot.number,easing:Ot.oneOfType([Ot.string,Ot.func]),steps:Ot.arrayOf(Ot.shape({duration:Ot.number.isRequired,style:Ot.object.isRequired,easing:Ot.oneOfType([Ot.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Ot.func]),properties:Ot.arrayOf("string"),onAnimationEnd:Ot.func})),children:Ot.oneOfType([Ot.node,Ot.func]),isActive:Ot.bool,canBegin:Ot.bool,onAnimationEnd:Ot.func,shouldReAnimate:Ot.bool,onAnimationStart:Ot.func,onAnimationReStart:Ot.func};function Em(e){"@babel/helpers - typeof";return Em=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Em(e)}function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Ug.apply(this,arguments)}function l_e(e,t){return h_e(e)||u_e(e,t)||d_e(e,t)||c_e()}function c_e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 880In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function d_e(e,t){if(e){if(typeof e=="string")return nD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nD(e,t)}}function nD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function u_e(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function h_e(e){if(Array.isArray(e))return e}function sD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function aD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sD(Object(n),!0).forEach(function(s){m_e(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function m_e(e,t,n){return t=f_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f_e(e){var t=p_e(e,"string");return Em(t)=="symbol"?t:t+""}function p_e(e,t){if(Em(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Em(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iD=function(t,n,s,a,i){var o=Math.min(Math.abs(s)/2,Math.abs(a)/2),l=a>=0?1:-1,c=s>=0?1:-1,u=a>=0&&s>=0||a<0&&s<0?1:0,m;if(o>0&&i instanceof Array){for(var f=[0,0,0,0],p=0,b=4;p<b;p++)f[p]=i[p]>o?o:i[p];m="M".concat(t,",").concat(n+l*f[0]),f[0]>0&&(m+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(u,",").concat(t+c*f[0],",").concat(n)),m+="L ".concat(t+s-c*f[1],",").concat(n),f[1]>0&&(m+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(u,`, 881 `).concat(t+s,",").concat(n+l*f[1])),m+="L ".concat(t+s,",").concat(n+a-l*f[2]),f[2]>0&&(m+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(u,`, 882 `).concat(t+s-c*f[2],",").concat(n+a)),m+="L ".concat(t+c*f[3],",").concat(n+a),f[3]>0&&(m+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(u,`, 883 `).concat(t,",").concat(n+a-l*f[3])),m+="Z"}else if(o>0&&i===+i&&i>0){var v=Math.min(o,i);m="M ".concat(t,",").concat(n+l*v,` 884 A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+c*v,",").concat(n,` 885 L `).concat(t+s-c*v,",").concat(n,` 886 A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+s,",").concat(n+l*v,` 887 L `).concat(t+s,",").concat(n+a-l*v,` 888 A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t+s-c*v,",").concat(n+a,` 889 L `).concat(t+c*v,",").concat(n+a,` 890 A `).concat(v,",").concat(v,",0,0,").concat(u,",").concat(t,",").concat(n+a-l*v," Z")}else m="M ".concat(t,",").concat(n," h ").concat(s," v ").concat(a," h ").concat(-s," Z");return m},x_e=function(t,n){if(!t||!n)return!1;var s=t.x,a=t.y,i=n.x,o=n.y,l=n.width,c=n.height;if(Math.abs(l)>0&&Math.abs(c)>0){var u=Math.min(i,i+l),m=Math.max(i,i+l),f=Math.min(o,o+c),p=Math.max(o,o+c);return s>=u&&s<=m&&a>=f&&a<=p}return!1},g_e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},xA=function(t){var n=aD(aD({},g_e),t),s=j.useRef(),a=j.useState(-1),i=l_e(a,2),o=i[0],l=i[1];j.useEffect(function(){if(s.current&&s.current.getTotalLength)try{var A=s.current.getTotalLength();A&&l(A)}catch{}},[]);var c=n.x,u=n.y,m=n.width,f=n.height,p=n.radius,b=n.className,v=n.animationEasing,g=n.animationDuration,y=n.animationBegin,w=n.isAnimationActive,N=n.isUpdateAnimationActive;if(c!==+c||u!==+u||m!==+m||f!==+f||m===0||f===0)return null;var S=ct("recharts-rectangle",b);return N?X.createElement(di,{canBegin:o>0,from:{width:m,height:f,x:c,y:u},to:{width:m,height:f,x:c,y:u},duration:g,animationEasing:v,isActive:N},function(A){var k=A.width,C=A.height,T=A.x,P=A.y;return X.createElement(di,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,isActive:w,easing:v},X.createElement("path",Ug({},nt(n,!0),{className:S,d:iD(T,P,k,C,p),ref:s})))}):X.createElement("path",Ug({},nt(n,!0),{className:S,d:iD(c,u,m,f,p)}))},y_e=["points","className","baseLinePoints","connectNulls"];function Kc(){return Kc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Kc.apply(this,arguments)}function v_e(e,t){if(e==null)return{};var n=b_e(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function b_e(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function oD(e){return __e(e)||N_e(e)||w_e(e)||j_e()}function j_e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 891In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function w_e(e,t){if(e){if(typeof e=="string")return A2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A2(e,t)}}function N_e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function __e(e){if(Array.isArray(e))return A2(e)}function A2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}var lD=function(t){return t&&t.x===+t.x&&t.y===+t.y},S_e=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=[[]];return t.forEach(function(s){lD(s)?n[n.length-1].push(s):n[n.length-1].length>0&&n.push([])}),lD(t[0])&&n[n.length-1].push(t[0]),n[n.length-1].length<=0&&(n=n.slice(0,-1)),n},Wh=function(t,n){var s=S_e(t);n&&(s=[s.reduce(function(i,o){return[].concat(oD(i),oD(o))},[])]);var a=s.map(function(i){return i.reduce(function(o,l,c){return"".concat(o).concat(c===0?"M":"L").concat(l.x,",").concat(l.y)},"")}).join("");return s.length===1?"".concat(a,"Z"):a},k_e=function(t,n,s){var a=Wh(t,s);return"".concat(a.slice(-1)==="Z"?a.slice(0,-1):a,"L").concat(Wh(n.reverse(),s).slice(1))},C_e=function(t){var n=t.points,s=t.className,a=t.baseLinePoints,i=t.connectNulls,o=v_e(t,y_e);if(!n||!n.length)return null;var l=ct("recharts-polygon",s);if(a&&a.length){var c=o.stroke&&o.stroke!=="none",u=k_e(n,a,i);return X.createElement("g",{className:l},X.createElement("path",Kc({},nt(o,!0),{fill:u.slice(-1)==="Z"?o.fill:"none",stroke:"none",d:u})),c?X.createElement("path",Kc({},nt(o,!0),{fill:"none",d:Wh(n,i)})):null,c?X.createElement("path",Kc({},nt(o,!0),{fill:"none",d:Wh(a,i)})):null)}var m=Wh(n,i);return X.createElement("path",Kc({},nt(o,!0),{fill:m.slice(-1)==="Z"?o.fill:"none",className:l,d:m}))};function T2(){return T2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},T2.apply(this,arguments)}var gA=function(t){var n=t.cx,s=t.cy,a=t.r,i=t.className,o=ct("recharts-dot",i);return n===+n&&s===+s&&a===+a?j.createElement("circle",T2({},nt(t,!1),dg(t),{className:o,cx:n,cy:s,r:a})):null};function Pm(e){"@babel/helpers - typeof";return Pm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pm(e)}var A_e=["x","y","top","left","width","height","className"];function E2(){return E2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},E2.apply(this,arguments)}function cD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function T_e(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cD(Object(n),!0).forEach(function(s){E_e(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function E_e(e,t,n){return t=P_e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function P_e(e){var t=O_e(e,"string");return Pm(t)=="symbol"?t:t+""}function O_e(e,t){if(Pm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Pm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function M_e(e,t){if(e==null)return{};var n=R_e(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function R_e(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}var I_e=function(t,n,s,a,i,o){return"M".concat(t,",").concat(i,"v").concat(a,"M").concat(o,",").concat(n,"h").concat(s)},D_e=function(t){var n=t.x,s=n===void 0?0:n,a=t.y,i=a===void 0?0:a,o=t.top,l=o===void 0?0:o,c=t.left,u=c===void 0?0:c,m=t.width,f=m===void 0?0:m,p=t.height,b=p===void 0?0:p,v=t.className,g=M_e(t,A_e),y=T_e({x:s,y:i,top:l,left:u,width:f,height:b},g);return!Te(s)||!Te(i)||!Te(f)||!Te(b)||!Te(l)||!Te(u)?null:X.createElement("path",E2({},nt(y,!0),{className:ct("recharts-cross",v),d:I_e(s,i,f,b,l,u)}))},K1,dD;function L_e(){if(dD)return K1;dD=1;var e=dv(),t=VU(),n=Ea();function s(a,i){return a&&a.length?e(a,n(i,2),t):void 0}return K1=s,K1}var $_e=L_e();const F_e=Et($_e);var Y1,uD;function B_e(){if(uD)return Y1;uD=1;var e=dv(),t=Ea(),n=UU();function s(a,i){return a&&a.length?e(a,t(i,2),n):void 0}return Y1=s,Y1}var q_e=B_e();const V_e=Et(q_e);var U_e=["cx","cy","angle","ticks","axisLine"],z_e=["ticks","tick","angle","tickFormatter","stroke"];function Id(e){"@babel/helpers - typeof";return Id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Id(e)}function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Hh.apply(this,arguments)}function hD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function Yo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hD(Object(n),!0).forEach(function(s){gv(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function mD(e,t){if(e==null)return{};var n=W_e(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function W_e(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function H_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fD(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Tz(s.key),s)}}function G_e(e,t,n){return t&&fD(e.prototype,t),n&&fD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function K_e(e,t,n){return t=zg(t),Y_e(e,Az()?Reflect.construct(t,n||[],zg(e).constructor):t.apply(e,n))}function Y_e(e,t){if(t&&(Id(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return X_e(e)}function X_e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Az(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Az=function(){return!!e})()}function zg(e){return zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},zg(e)}function J_e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&P2(e,t)}function P2(e,t){return P2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},P2(e,t)}function gv(e,t,n){return t=Tz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tz(e){var t=Q_e(e,"string");return Id(t)=="symbol"?t:t+""}function Q_e(e,t){if(Id(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Id(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var yv=(function(e){function t(){return H_e(this,t),K_e(this,t,arguments)}return J_e(t,e),G_e(t,[{key:"getTickValueCoord",value:function(s){var a=s.coordinate,i=this.props,o=i.angle,l=i.cx,c=i.cy;return Gt(l,c,a,o)}},{key:"getTickTextAnchor",value:function(){var s=this.props.orientation,a;switch(s){case"left":a="end";break;case"right":a="start";break;default:a="middle";break}return a}},{key:"getViewBox",value:function(){var s=this.props,a=s.cx,i=s.cy,o=s.angle,l=s.ticks,c=F_e(l,function(m){return m.coordinate||0}),u=V_e(l,function(m){return m.coordinate||0});return{cx:a,cy:i,startAngle:o,endAngle:o,innerRadius:u.coordinate||0,outerRadius:c.coordinate||0}}},{key:"renderAxisLine",value:function(){var s=this.props,a=s.cx,i=s.cy,o=s.angle,l=s.ticks,c=s.axisLine,u=mD(s,U_e),m=l.reduce(function(v,g){return[Math.min(v[0],g.coordinate),Math.max(v[1],g.coordinate)]},[1/0,-1/0]),f=Gt(a,i,m[0],o),p=Gt(a,i,m[1],o),b=Yo(Yo(Yo({},nt(u,!1)),{},{fill:"none"},nt(c,!1)),{},{x1:f.x,y1:f.y,x2:p.x,y2:p.y});return X.createElement("line",Hh({className:"recharts-polar-radius-axis-line"},b))}},{key:"renderTicks",value:function(){var s=this,a=this.props,i=a.ticks,o=a.tick,l=a.angle,c=a.tickFormatter,u=a.stroke,m=mD(a,z_e),f=this.getTickTextAnchor(),p=nt(m,!1),b=nt(o,!1),v=i.map(function(g,y){var w=s.getTickValueCoord(g),N=Yo(Yo(Yo(Yo({textAnchor:f,transform:"rotate(".concat(90-l,", ").concat(w.x,", ").concat(w.y,")")},p),{},{stroke:"none",fill:u},b),{},{index:y},w),{},{payload:g});return X.createElement(Dt,Hh({className:ct("recharts-polar-radius-axis-tick",gz(o)),key:"tick-".concat(g.coordinate)},Fl(s.props,g,y)),t.renderTickItem(o,N,c?c(g.value,y):g.value))});return X.createElement(Dt,{className:"recharts-polar-radius-axis-ticks"},v)}},{key:"render",value:function(){var s=this.props,a=s.ticks,i=s.axisLine,o=s.tick;return!a||!a.length?null:X.createElement(Dt,{className:ct("recharts-polar-radius-axis",this.props.className)},i&&this.renderAxisLine(),o&&this.renderTicks(),qr.renderCallByParent(this.props,this.getViewBox()))}}],[{key:"renderTickItem",value:function(s,a,i){var o;return X.isValidElement(s)?o=X.cloneElement(s,a):at(s)?o=s(a):o=X.createElement(Bl,Hh({},a,{className:"recharts-polar-radius-axis-tick-value"}),i),o}}])})(j.PureComponent);gv(yv,"displayName","PolarRadiusAxis");gv(yv,"axisType","radiusAxis");gv(yv,"defaultProps",{type:"number",radiusAxisId:0,cx:0,cy:0,angle:0,orientation:"right",stroke:"#ccc",axisLine:!0,tick:!0,tickCount:5,allowDataOverflow:!1,scale:"auto",allowDuplicatedCategory:!0});function Dd(e){"@babel/helpers - typeof";return Dd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dd(e)}function al(){return al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},al.apply(this,arguments)}function pD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function Xo(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pD(Object(n),!0).forEach(function(s){vv(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Z_e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xD(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Pz(s.key),s)}}function eSe(e,t,n){return t&&xD(e.prototype,t),n&&xD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tSe(e,t,n){return t=Wg(t),rSe(e,Ez()?Reflect.construct(t,n||[],Wg(e).constructor):t.apply(e,n))}function rSe(e,t){if(t&&(Dd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nSe(e)}function nSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Ez(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Ez=function(){return!!e})()}function Wg(e){return Wg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Wg(e)}function sSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O2(e,t)}function O2(e,t){return O2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},O2(e,t)}function vv(e,t,n){return t=Pz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Pz(e){var t=aSe(e,"string");return Dd(t)=="symbol"?t:t+""}function aSe(e,t){if(Dd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Dd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iSe=Math.PI/180,gD=1e-5,bv=(function(e){function t(){return Z_e(this,t),tSe(this,t,arguments)}return sSe(t,e),eSe(t,[{key:"getTickLineCoord",value:function(s){var a=this.props,i=a.cx,o=a.cy,l=a.radius,c=a.orientation,u=a.tickSize,m=u||8,f=Gt(i,o,l,s.coordinate),p=Gt(i,o,l+(c==="inner"?-1:1)*m,s.coordinate);return{x1:f.x,y1:f.y,x2:p.x,y2:p.y}}},{key:"getTickTextAnchor",value:function(s){var a=this.props.orientation,i=Math.cos(-s.coordinate*iSe),o;return i>gD?o=a==="outer"?"start":"end":i<-gD?o=a==="outer"?"end":"start":o="middle",o}},{key:"renderAxisLine",value:function(){var s=this.props,a=s.cx,i=s.cy,o=s.radius,l=s.axisLine,c=s.axisLineType,u=Xo(Xo({},nt(this.props,!1)),{},{fill:"none"},nt(l,!1));if(c==="circle")return X.createElement(gA,al({className:"recharts-polar-angle-axis-line"},u,{cx:a,cy:i,r:o}));var m=this.props.ticks,f=m.map(function(p){return Gt(a,i,o,p.coordinate)});return X.createElement(C_e,al({className:"recharts-polar-angle-axis-line"},u,{points:f}))}},{key:"renderTicks",value:function(){var s=this,a=this.props,i=a.ticks,o=a.tick,l=a.tickLine,c=a.tickFormatter,u=a.stroke,m=nt(this.props,!1),f=nt(o,!1),p=Xo(Xo({},m),{},{fill:"none"},nt(l,!1)),b=i.map(function(v,g){var y=s.getTickLineCoord(v),w=s.getTickTextAnchor(v),N=Xo(Xo(Xo({textAnchor:w},m),{},{stroke:"none",fill:u},f),{},{index:g,payload:v,x:y.x2,y:y.y2});return X.createElement(Dt,al({className:ct("recharts-polar-angle-axis-tick",gz(o)),key:"tick-".concat(v.coordinate)},Fl(s.props,v,g)),l&&X.createElement("line",al({className:"recharts-polar-angle-axis-tick-line"},p,y)),o&&t.renderTickItem(o,N,c?c(v.value,g):v.value))});return X.createElement(Dt,{className:"recharts-polar-angle-axis-ticks"},b)}},{key:"render",value:function(){var s=this.props,a=s.ticks,i=s.radius,o=s.axisLine;return i<=0||!a||!a.length?null:X.createElement(Dt,{className:ct("recharts-polar-angle-axis",this.props.className)},o&&this.renderAxisLine(),this.renderTicks())}}],[{key:"renderTickItem",value:function(s,a,i){var o;return X.isValidElement(s)?o=X.cloneElement(s,a):at(s)?o=s(a):o=X.createElement(Bl,al({},a,{className:"recharts-polar-angle-axis-tick-value"}),i),o}}])})(j.PureComponent);vv(bv,"displayName","PolarAngleAxis");vv(bv,"axisType","angleAxis");vv(bv,"defaultProps",{type:"category",angleAxisId:0,scale:"auto",cx:0,cy:0,orientation:"outer",axisLine:!0,tickLine:!0,tickSize:8,tick:!0,hide:!1,allowDuplicatedCategory:!0});var X1,yD;function oSe(){if(yD)return X1;yD=1;var e=VV(),t=e(Object.getPrototypeOf,Object);return X1=t,X1}var J1,vD;function lSe(){if(vD)return J1;vD=1;var e=hi(),t=oSe(),n=mi(),s="[object Object]",a=Function.prototype,i=Object.prototype,o=a.toString,l=i.hasOwnProperty,c=o.call(Object);function u(m){if(!n(m)||e(m)!=s)return!1;var f=t(m);if(f===null)return!0;var p=l.call(f,"constructor")&&f.constructor;return typeof p=="function"&&p instanceof p&&o.call(p)==c}return J1=u,J1}var cSe=lSe();const dSe=Et(cSe);var Q1,bD;function uSe(){if(bD)return Q1;bD=1;var e=hi(),t=mi(),n="[object Boolean]";function s(a){return a===!0||a===!1||t(a)&&e(a)==n}return Q1=s,Q1}var hSe=uSe();const mSe=Et(hSe);function Om(e){"@babel/helpers - typeof";return Om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Om(e)}function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Hg.apply(this,arguments)}function fSe(e,t){return ySe(e)||gSe(e,t)||xSe(e,t)||pSe()}function pSe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 892In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xSe(e,t){if(e){if(typeof e=="string")return jD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jD(e,t)}}function jD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function gSe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function ySe(e){if(Array.isArray(e))return e}function wD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function ND(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wD(Object(n),!0).forEach(function(s){vSe(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function vSe(e,t,n){return t=bSe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function bSe(e){var t=jSe(e,"string");return Om(t)=="symbol"?t:t+""}function jSe(e,t){if(Om(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Om(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var _D=function(t,n,s,a,i){var o=s-a,l;return l="M ".concat(t,",").concat(n),l+="L ".concat(t+s,",").concat(n),l+="L ".concat(t+s-o/2,",").concat(n+i),l+="L ".concat(t+s-o/2-a,",").concat(n+i),l+="L ".concat(t,",").concat(n," Z"),l},wSe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},NSe=function(t){var n=ND(ND({},wSe),t),s=j.useRef(),a=j.useState(-1),i=fSe(a,2),o=i[0],l=i[1];j.useEffect(function(){if(s.current&&s.current.getTotalLength)try{var S=s.current.getTotalLength();S&&l(S)}catch{}},[]);var c=n.x,u=n.y,m=n.upperWidth,f=n.lowerWidth,p=n.height,b=n.className,v=n.animationEasing,g=n.animationDuration,y=n.animationBegin,w=n.isUpdateAnimationActive;if(c!==+c||u!==+u||m!==+m||f!==+f||p!==+p||m===0&&f===0||p===0)return null;var N=ct("recharts-trapezoid",b);return w?X.createElement(di,{canBegin:o>0,from:{upperWidth:0,lowerWidth:0,height:p,x:c,y:u},to:{upperWidth:m,lowerWidth:f,height:p,x:c,y:u},duration:g,animationEasing:v,isActive:w},function(S){var A=S.upperWidth,k=S.lowerWidth,C=S.height,T=S.x,P=S.y;return X.createElement(di,{canBegin:o>0,from:"0px ".concat(o===-1?1:o,"px"),to:"".concat(o,"px 0px"),attributeName:"strokeDasharray",begin:y,duration:g,easing:v},X.createElement("path",Hg({},nt(n,!0),{className:N,d:_D(T,P,A,k,C),ref:s})))}):X.createElement("g",null,X.createElement("path",Hg({},nt(n,!0),{className:N,d:_D(c,u,m,f,p)})))},_Se=["option","shapeType","propTransformer","activeClassName","isActive"];function Mm(e){"@babel/helpers - typeof";return Mm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mm(e)}function SSe(e,t){if(e==null)return{};var n=kSe(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function kSe(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function SD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function Gg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?SD(Object(n),!0).forEach(function(s){CSe(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):SD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function CSe(e,t,n){return t=ASe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ASe(e){var t=TSe(e,"string");return Mm(t)=="symbol"?t:t+""}function TSe(e,t){if(Mm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Mm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ESe(e,t){return Gg(Gg({},t),e)}function PSe(e,t){return e==="symbols"}function kD(e){var t=e.shapeType,n=e.elementProps;switch(t){case"rectangle":return X.createElement(xA,n);case"trapezoid":return X.createElement(NSe,n);case"sector":return X.createElement(bz,n);case"symbols":if(PSe(t))return X.createElement(IC,n);break;default:return null}}function OSe(e){return j.isValidElement(e)?e.props:e}function Oz(e){var t=e.option,n=e.shapeType,s=e.propTransformer,a=s===void 0?ESe:s,i=e.activeClassName,o=i===void 0?"recharts-active-shape":i,l=e.isActive,c=SSe(e,_Se),u;if(j.isValidElement(t))u=j.cloneElement(t,Gg(Gg({},c),OSe(t)));else if(at(t))u=t(c);else if(dSe(t)&&!mSe(t)){var m=a(t,c);u=X.createElement(kD,{shapeType:n,elementProps:m})}else{var f=c;u=X.createElement(kD,{shapeType:n,elementProps:f})}return l?X.createElement(Dt,{className:o},u):u}function jv(e,t){return t!=null&&"trapezoids"in e.props}function wv(e,t){return t!=null&&"sectors"in e.props}function Rm(e,t){return t!=null&&"points"in e.props}function MSe(e,t){var n,s,a=e.x===(t==null||(n=t.labelViewBox)===null||n===void 0?void 0:n.x)||e.x===t.x,i=e.y===(t==null||(s=t.labelViewBox)===null||s===void 0?void 0:s.y)||e.y===t.y;return a&&i}function RSe(e,t){var n=e.endAngle===t.endAngle,s=e.startAngle===t.startAngle;return n&&s}function ISe(e,t){var n=e.x===t.x,s=e.y===t.y,a=e.z===t.z;return n&&s&&a}function DSe(e,t){var n;return jv(e,t)?n=MSe:wv(e,t)?n=RSe:Rm(e,t)&&(n=ISe),n}function LSe(e,t){var n;return jv(e,t)?n="trapezoids":wv(e,t)?n="sectors":Rm(e,t)&&(n="points"),n}function $Se(e,t){if(jv(e,t)){var n;return(n=t.tooltipPayload)===null||n===void 0||(n=n[0])===null||n===void 0||(n=n.payload)===null||n===void 0?void 0:n.payload}if(wv(e,t)){var s;return(s=t.tooltipPayload)===null||s===void 0||(s=s[0])===null||s===void 0||(s=s.payload)===null||s===void 0?void 0:s.payload}return Rm(e,t)?t.payload:{}}function FSe(e){var t=e.activeTooltipItem,n=e.graphicalItem,s=e.itemData,a=LSe(n,t),i=$Se(n,t),o=s.filter(function(c,u){var m=mv(i,c),f=n.props[a].filter(function(v){var g=DSe(n,t);return g(v,t)}),p=n.props[a].indexOf(f[f.length-1]),b=u===p;return m&&b}),l=s.indexOf(o[o.length-1]);return l}var Ox;function Ld(e){"@babel/helpers - typeof";return Ld=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ld(e)}function Yc(){return Yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Yc.apply(this,arguments)}function CD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function Wt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CD(Object(n),!0).forEach(function(s){gs(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function BSe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AD(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Rz(s.key),s)}}function qSe(e,t,n){return t&&AD(e.prototype,t),n&&AD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function VSe(e,t,n){return t=Kg(t),USe(e,Mz()?Reflect.construct(t,n||[],Kg(e).constructor):t.apply(e,n))}function USe(e,t){if(t&&(Ld(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return zSe(e)}function zSe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Mz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Mz=function(){return!!e})()}function Kg(e){return Kg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Kg(e)}function WSe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M2(e,t)}function M2(e,t){return M2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},M2(e,t)}function gs(e,t,n){return t=Rz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rz(e){var t=HSe(e,"string");return Ld(t)=="symbol"?t:t+""}function HSe(e,t){if(Ld(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Ld(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Pa=(function(e){function t(n){var s;return BSe(this,t),s=VSe(this,t,[n]),gs(s,"pieRef",null),gs(s,"sectorRefs",[]),gs(s,"id",pf("recharts-pie-")),gs(s,"handleAnimationEnd",function(){var a=s.props.onAnimationEnd;s.setState({isAnimationFinished:!0}),at(a)&&a()}),gs(s,"handleAnimationStart",function(){var a=s.props.onAnimationStart;s.setState({isAnimationFinished:!1}),at(a)&&a()}),s.state={isAnimationFinished:!n.isAnimationActive,prevIsAnimationActive:n.isAnimationActive,prevAnimationId:n.animationId,sectorToFocus:0},s}return WSe(t,e),qSe(t,[{key:"isActiveIndex",value:function(s){var a=this.props.activeIndex;return Array.isArray(a)?a.indexOf(s)!==-1:s===a}},{key:"hasActiveIndex",value:function(){var s=this.props.activeIndex;return Array.isArray(s)?s.length!==0:s||s===0}},{key:"renderLabels",value:function(s){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.label,l=i.labelLine,c=i.dataKey,u=i.valueKey,m=nt(this.props,!1),f=nt(o,!1),p=nt(l,!1),b=o&&o.offsetRadius||20,v=s.map(function(g,y){var w=(g.startAngle+g.endAngle)/2,N=Gt(g.cx,g.cy,g.outerRadius+b,w),S=Wt(Wt(Wt(Wt({},m),g),{},{stroke:"none"},f),{},{index:y,textAnchor:t.getTextAnchor(N.x,g.cx)},N),A=Wt(Wt(Wt(Wt({},m),g),{},{fill:"none",stroke:g.fill},p),{},{index:y,points:[Gt(g.cx,g.cy,g.outerRadius,w),N]}),k=c;return yt(c)&&yt(u)?k="value":yt(c)&&(k=u),X.createElement(Dt,{key:"label-".concat(g.startAngle,"-").concat(g.endAngle,"-").concat(g.midAngle,"-").concat(y)},l&&t.renderLabelLineItem(l,A,"line"),t.renderLabelItem(o,S,on(g,k)))});return X.createElement(Dt,{className:"recharts-pie-labels"},v)}},{key:"renderSectorsStatically",value:function(s){var a=this,i=this.props,o=i.activeShape,l=i.blendStroke,c=i.inactiveShape;return s.map(function(u,m){if((u==null?void 0:u.startAngle)===0&&(u==null?void 0:u.endAngle)===0&&s.length!==1)return null;var f=a.isActiveIndex(m),p=c&&a.hasActiveIndex()?c:null,b=f?o:p,v=Wt(Wt({},u),{},{stroke:l?u.fill:u.stroke,tabIndex:-1});return X.createElement(Dt,Yc({ref:function(y){y&&!a.sectorRefs.includes(y)&&a.sectorRefs.push(y)},tabIndex:-1,className:"recharts-pie-sector"},Fl(a.props,u,m),{key:"sector-".concat(u==null?void 0:u.startAngle,"-").concat(u==null?void 0:u.endAngle,"-").concat(u.midAngle,"-").concat(m)}),X.createElement(Oz,Yc({option:b,isActive:f,shapeType:"sector"},v)))})}},{key:"renderSectorsWithAnimation",value:function(){var s=this,a=this.props,i=a.sectors,o=a.isAnimationActive,l=a.animationBegin,c=a.animationDuration,u=a.animationEasing,m=a.animationId,f=this.state,p=f.prevSectors,b=f.prevIsAnimationActive;return X.createElement(di,{begin:l,duration:c,isActive:o,easing:u,from:{t:0},to:{t:1},key:"pie-".concat(m,"-").concat(b),onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},function(v){var g=v.t,y=[],w=i&&i[0],N=w.startAngle;return i.forEach(function(S,A){var k=p&&p[A],C=A>0?Qn(S,"paddingAngle",0):0;if(k){var T=Ui(k.endAngle-k.startAngle,S.endAngle-S.startAngle),P=Wt(Wt({},S),{},{startAngle:N+C,endAngle:N+T(g)+C});y.push(P),N=P.endAngle}else{var R=S.endAngle,M=S.startAngle,D=Ui(0,R-M),$=D(g),q=Wt(Wt({},S),{},{startAngle:N+C,endAngle:N+$+C});y.push(q),N=q.endAngle}}),X.createElement(Dt,null,s.renderSectorsStatically(y))})}},{key:"attachKeyboardHandlers",value:function(s){var a=this;s.onkeydown=function(i){if(!i.altKey)switch(i.key){case"ArrowLeft":{var o=++a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[o].focus(),a.setState({sectorToFocus:o});break}case"ArrowRight":{var l=--a.state.sectorToFocus<0?a.sectorRefs.length-1:a.state.sectorToFocus%a.sectorRefs.length;a.sectorRefs[l].focus(),a.setState({sectorToFocus:l});break}case"Escape":{a.sectorRefs[a.state.sectorToFocus].blur(),a.setState({sectorToFocus:0});break}}}}},{key:"renderSectors",value:function(){var s=this.props,a=s.sectors,i=s.isAnimationActive,o=this.state.prevSectors;return i&&a&&a.length&&(!o||!mv(o,a))?this.renderSectorsWithAnimation():this.renderSectorsStatically(a)}},{key:"componentDidMount",value:function(){this.pieRef&&this.attachKeyboardHandlers(this.pieRef)}},{key:"render",value:function(){var s=this,a=this.props,i=a.hide,o=a.sectors,l=a.className,c=a.label,u=a.cx,m=a.cy,f=a.innerRadius,p=a.outerRadius,b=a.isAnimationActive,v=this.state.isAnimationFinished;if(i||!o||!o.length||!Te(u)||!Te(m)||!Te(f)||!Te(p))return null;var g=ct("recharts-pie",l);return X.createElement(Dt,{tabIndex:this.props.rootTabIndex,className:g,ref:function(w){s.pieRef=w}},this.renderSectors(),c&&this.renderLabels(o),qr.renderCallByParent(this.props,null,!1),(!b||v)&&co.renderCallByParent(this.props,o,!1))}}],[{key:"getDerivedStateFromProps",value:function(s,a){return a.prevIsAnimationActive!==s.isAnimationActive?{prevIsAnimationActive:s.isAnimationActive,prevAnimationId:s.animationId,curSectors:s.sectors,prevSectors:[],isAnimationFinished:!0}:s.isAnimationActive&&s.animationId!==a.prevAnimationId?{prevAnimationId:s.animationId,curSectors:s.sectors,prevSectors:a.curSectors,isAnimationFinished:!0}:s.sectors!==a.curSectors?{curSectors:s.sectors,isAnimationFinished:!0}:null}},{key:"getTextAnchor",value:function(s,a){return s>a?"start":s<a?"end":"middle"}},{key:"renderLabelLineItem",value:function(s,a,i){if(X.isValidElement(s))return X.cloneElement(s,a);if(at(s))return s(a);var o=ct("recharts-pie-label-line",typeof s!="boolean"?s.className:"");return X.createElement(y2,Yc({},a,{key:i,type:"linear",className:o}))}},{key:"renderLabelItem",value:function(s,a,i){if(X.isValidElement(s))return X.cloneElement(s,a);var o=i;if(at(s)&&(o=s(a),X.isValidElement(o)))return o;var l=ct("recharts-pie-label-text",typeof s!="boolean"&&!at(s)?s.className:"");return X.createElement(Bl,Yc({},a,{alignmentBaseline:"middle",className:l}),o)}}])})(j.PureComponent);Ox=Pa;gs(Pa,"displayName","Pie");gs(Pa,"defaultProps",{stroke:"#fff",fill:"#808080",legendType:"rect",cx:"50%",cy:"50%",startAngle:0,endAngle:360,innerRadius:0,outerRadius:"80%",paddingAngle:0,labelLine:!0,hide:!1,minAngle:0,isAnimationActive:!cu.isSsr,animationBegin:400,animationDuration:1500,animationEasing:"ease",nameKey:"name",blendStroke:!1,rootTabIndex:0});gs(Pa,"parseDeltaAngle",function(e,t){var n=gn(t-e),s=Math.min(Math.abs(t-e),360);return n*s});gs(Pa,"getRealPieData",function(e){var t=e.data,n=e.children,s=nt(e,!1),a=vs(n,gf);return t&&t.length?t.map(function(i,o){return Wt(Wt(Wt({payload:i},s),i),a&&a[o]&&a[o].props)}):a&&a.length?a.map(function(i){return Wt(Wt({},s),i.props)}):[]});gs(Pa,"parseCoordinateOfPie",function(e,t){var n=t.top,s=t.left,a=t.width,i=t.height,o=xz(a,i),l=s+yn(e.cx,a,a/2),c=n+yn(e.cy,i,i/2),u=yn(e.innerRadius,o,0),m=yn(e.outerRadius,o,o*.8),f=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:m,maxRadius:f}});gs(Pa,"getComposedData",function(e){var t=e.item,n=e.offset,s=t.type.defaultProps!==void 0?Wt(Wt({},t.type.defaultProps),t.props):t.props,a=Ox.getRealPieData(s);if(!a||!a.length)return null;var i=s.cornerRadius,o=s.startAngle,l=s.endAngle,c=s.paddingAngle,u=s.dataKey,m=s.nameKey,f=s.valueKey,p=s.tooltipType,b=Math.abs(s.minAngle),v=Ox.parseCoordinateOfPie(s,n),g=Ox.parseDeltaAngle(o,l),y=Math.abs(g),w=u;yt(u)&&yt(f)?(Vs(!1,`Use "dataKey" to specify the value of pie,
893 the props "valueKey" will be deprecated in 1.1.0`),w="value"):yt(u)&&(Vs(!1,`Use "dataKey" to specify the value of pie, 894 the props "valueKey" will be deprecated in 1.1.0`),w=f);var N=a.filter(function(P){return on(P,w,0)!==0}).length,S=(y>=360?N:N-1)*c,A=y-N*b-S,k=a.reduce(function(P,R){var M=on(R,w,0);return P+(Te(M)?M:0)},0),C;if(k>0){var T;C=a.map(function(P,R){var M=on(P,w,0),D=on(P,m,R),$=(Te(M)?M:0)/k,q;R?q=T.endAngle+gn(g)*c*(M!==0?1:0):q=o;var H=q+gn(g)*((M!==0?b:0)+$*A),L=(q+H)/2,F=(v.innerRadius+v.outerRadius)/2,Y=[{name:D,value:M,payload:P,dataKey:w,type:p}],U=Gt(v.cx,v.cy,F,L);return T=Wt(Wt(Wt({percent:$,cornerRadius:i,name:D,tooltipPayload:Y,midAngle:L,middleRadius:F,tooltipPosition:U},P),v),{},{value:on(P,w),startAngle:q,endAngle:H,payload:P,paddingAngle:gn(g)*c}),T})}return Wt(Wt({},v),{},{sectors:C,data:a})});var Z1,TD;function GSe(){if(TD)return Z1;TD=1;var e=Math.ceil,t=Math.max;function n(s,a,i,o){for(var l=-1,c=t(e((a-s)/(i||1)),0),u=Array(c);c--;)u[o?c:++l]=s,s+=i;return u}return Z1=n,Z1}var e_,ED;function Iz(){if(ED)return e_;ED=1;var e=sU(),t=1/0,n=17976931348623157e292;function s(a){if(!a)return a===0?a:0;if(a=e(a),a===t||a===-t){var i=a<0?-1:1;return i*n}return a===a?a:0}return e_=s,e_}var t_,PD;function KSe(){if(PD)return t_;PD=1;var e=GSe(),t=nv(),n=Iz();function s(a){return function(i,o,l){return l&&typeof l!="number"&&t(i,o,l)&&(o=l=void 0),i=n(i),o===void 0?(o=i,i=0):o=n(o),l=l===void 0?i<o?1:-1:n(l),e(i,o,l,a)}}return t_=s,t_}var r_,OD;function YSe(){if(OD)return r_;OD=1;var e=KSe(),t=e();return r_=t,r_}var XSe=YSe();const Yg=Et(XSe);function Im(e){"@babel/helpers - typeof";return Im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Im(e)}function MD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function RD(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MD(Object(n),!0).forEach(function(s){Dz(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Dz(e,t,n){return t=JSe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JSe(e){var t=QSe(e,"string");return Im(t)=="symbol"?t:t+""}function QSe(e,t){if(Im(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Im(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ZSe=["Webkit","Moz","O","ms"],e2e=function(t,n){var s=t.replace(/(\w)/,function(i){return i.toUpperCase()}),a=ZSe.reduce(function(i,o){return RD(RD({},i),{},Dz({},o+s,n))},{});return a[t]=n,a};function $d(e){"@babel/helpers - typeof";return $d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$d(e)}function Xg(){return Xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Xg.apply(this,arguments)}function ID(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function n_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ID(Object(n),!0).forEach(function(s){Hn(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ID(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function t2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DD(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,$z(s.key),s)}}
vendor: 72,789 bytes, lines 894-896
894function r2e(e,t,n){return t&&DD(e.prototype,t),n&&DD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function n2e(e,t,n){return t=Jg(t),s2e(e,Lz()?Reflect.construct(t,n||[],Jg(e).constructor):t.apply(e,n))}function s2e(e,t){if(t&&($d(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a2e(e)}function a2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Lz=function(){return!!e})()}function Jg(e){return Jg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Jg(e)}function i2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R2(e,t)}function R2(e,t){return R2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},R2(e,t)}function Hn(e,t,n){return t=$z(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $z(e){var t=o2e(e,"string");return $d(t)=="symbol"?t:t+""}function o2e(e,t){if($d(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if($d(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var l2e=function(t){var n=t.data,s=t.startIndex,a=t.endIndex,i=t.x,o=t.width,l=t.travellerWidth;if(!n||!n.length)return{};var c=n.length,u=Vh().domain(Yg(0,c)).range([i,i+o-l]),m=u.domain().map(function(f){return u(f)});return{isTextActive:!1,isSlideMoving:!1,isTravellerMoving:!1,isTravellerFocused:!1,startX:u(s),endX:u(a),scale:u,scaleValues:m}},LD=function(t){return t.changedTouches&&!!t.changedTouches.length},Fd=(function(e){function t(n){var s;return t2e(this,t),s=n2e(this,t,[n]),Hn(s,"handleDrag",function(a){s.leaveTimer&&(clearTimeout(s.leaveTimer),s.leaveTimer=null),s.state.isTravellerMoving?s.handleTravellerMove(a):s.state.isSlideMoving&&s.handleSlideDrag(a)}),Hn(s,"handleTouchMove",function(a){a.changedTouches!=null&&a.changedTouches.length>0&&s.handleDrag(a.changedTouches[0])}),Hn(s,"handleDragEnd",function(){s.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var a=s.props,i=a.endIndex,o=a.onDragEnd,l=a.startIndex;o==null||o({endIndex:i,startIndex:l})}),s.detachDragEndListener()}),Hn(s,"handleLeaveWrapper",function(){(s.state.isTravellerMoving||s.state.isSlideMoving)&&(s.leaveTimer=window.setTimeout(s.handleDragEnd,s.props.leaveTimeOut))}),Hn(s,"handleEnterSlideOrTraveller",function(){s.setState({isTextActive:!0})}),Hn(s,"handleLeaveSlideOrTraveller",function(){s.setState({isTextActive:!1})}),Hn(s,"handleSlideDragStart",function(a){var i=LD(a)?a.changedTouches[0]:a;s.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:i.pageX}),s.attachDragEndListener()}),s.travellerDragStartHandlers={startX:s.handleTravellerDragStart.bind(s,"startX"),endX:s.handleTravellerDragStart.bind(s,"endX")},s.state={},s}return i2e(t,e),r2e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(s){var a=s.startX,i=s.endX,o=this.state.scaleValues,l=this.props,c=l.gap,u=l.data,m=u.length-1,f=Math.min(a,i),p=Math.max(a,i),b=t.getIndexInRange(o,f),v=t.getIndexInRange(o,p);return{startIndex:b-b%c,endIndex:v===m?m:v-v%c}}},{key:"getTextOfTick",value:function(s){var a=this.props,i=a.data,o=a.tickFormatter,l=a.dataKey,c=on(i[s],l,s);return at(o)?o(c,s):c}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(s){var a=this.state,i=a.slideMoveStartX,o=a.startX,l=a.endX,c=this.props,u=c.x,m=c.width,f=c.travellerWidth,p=c.startIndex,b=c.endIndex,v=c.onChange,g=s.pageX-i;g>0?g=Math.min(g,u+m-f-l,u+m-f-o):g<0&&(g=Math.max(g,u-o,u-l));var y=this.getIndex({startX:o+g,endX:l+g});(y.startIndex!==p||y.endIndex!==b)&&v&&v(y),this.setState({startX:o+g,endX:l+g,slideMoveStartX:s.pageX})}},{key:"handleTravellerDragStart",value:function(s,a){var i=LD(a)?a.changedTouches[0]:a;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:s,brushMoveStartX:i.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(s){var a=this.state,i=a.brushMoveStartX,o=a.movingTravellerId,l=a.endX,c=a.startX,u=this.state[o],m=this.props,f=m.x,p=m.width,b=m.travellerWidth,v=m.onChange,g=m.gap,y=m.data,w={startX:this.state.startX,endX:this.state.endX},N=s.pageX-i;N>0?N=Math.min(N,f+p-b-u):N<0&&(N=Math.max(N,f-u)),w[o]=u+N;var S=this.getIndex(w),A=S.startIndex,k=S.endIndex,C=function(){var P=y.length-1;return o==="startX"&&(l>c?A%g===0:k%g===0)||l<c&&k===P||o==="endX"&&(l>c?k%g===0:A%g===0)||l>c&&k===P};this.setState(Hn(Hn({},o,u+N),"brushMoveStartX",s.pageX),function(){v&&C()&&v(S)})}},{key:"handleTravellerMoveKeyboard",value:function(s,a){var i=this,o=this.state,l=o.scaleValues,c=o.startX,u=o.endX,m=this.state[a],f=l.indexOf(m);if(f!==-1){var p=f+s;if(!(p===-1||p>=l.length)){var b=l[p];a==="startX"&&b>=u||a==="endX"&&b<=c||this.setState(Hn({},a,b),function(){i.props.onChange(i.getIndex({startX:i.state.startX,endX:i.state.endX}))})}}}},{key:"renderBackground",value:function(){var s=this.props,a=s.x,i=s.y,o=s.width,l=s.height,c=s.fill,u=s.stroke;return X.createElement("rect",{stroke:u,fill:c,x:a,y:i,width:o,height:l})}},{key:"renderPanorama",value:function(){var s=this.props,a=s.x,i=s.y,o=s.width,l=s.height,c=s.data,u=s.children,m=s.padding,f=j.Children.only(u);return f?X.cloneElement(f,{x:a,y:i,width:o,height:l,margin:m,compact:!0,data:c}):null}},{key:"renderTravellerLayer",value:function(s,a){var i,o,l=this,c=this.props,u=c.y,m=c.travellerWidth,f=c.height,p=c.traveller,b=c.ariaLabel,v=c.data,g=c.startIndex,y=c.endIndex,w=Math.max(s,this.props.x),N=n_(n_({},nt(this.props,!1)),{},{x:w,y:u,width:m,height:f}),S=b||"Min value: ".concat((i=v[g])===null||i===void 0?void 0:i.name,", Max value: ").concat((o=v[y])===null||o===void 0?void 0:o.name);return X.createElement(Dt,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":s,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[a],onTouchStart:this.travellerDragStartHandlers[a],onKeyDown:function(k){["ArrowLeft","ArrowRight"].includes(k.key)&&(k.preventDefault(),k.stopPropagation(),l.handleTravellerMoveKeyboard(k.key==="ArrowRight"?1:-1,a))},onFocus:function(){l.setState({isTravellerFocused:!0})},onBlur:function(){l.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(p,N))}},{key:"renderSlide",value:function(s,a){var i=this.props,o=i.y,l=i.height,c=i.stroke,u=i.travellerWidth,m=Math.min(s,a)+u,f=Math.max(Math.abs(a-s)-u,0);return X.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:c,fillOpacity:.2,x:m,y:o,width:f,height:l})}},{key:"renderText",value:function(){var s=this.props,a=s.startIndex,i=s.endIndex,o=s.y,l=s.height,c=s.travellerWidth,u=s.stroke,m=this.state,f=m.startX,p=m.endX,b=5,v={pointerEvents:"none",fill:u};return X.createElement(Dt,{className:"recharts-brush-texts"},X.createElement(Bl,Xg({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,p)-b,y:o+l/2},v),this.getTextOfTick(a)),X.createElement(Bl,Xg({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,p)+c+b,y:o+l/2},v),this.getTextOfTick(i)))}},{key:"render",value:function(){var s=this.props,a=s.data,i=s.className,o=s.children,l=s.x,c=s.y,u=s.width,m=s.height,f=s.alwaysShowText,p=this.state,b=p.startX,v=p.endX,g=p.isTextActive,y=p.isSlideMoving,w=p.isTravellerMoving,N=p.isTravellerFocused;if(!a||!a.length||!Te(l)||!Te(c)||!Te(u)||!Te(m)||u<=0||m<=0)return null;var S=ct("recharts-brush",i),A=X.Children.count(o)===1,k=e2e("userSelect","none");return X.createElement(Dt,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:k},this.renderBackground(),A&&this.renderPanorama(),this.renderSlide(b,v),this.renderTravellerLayer(b,"startX"),this.renderTravellerLayer(v,"endX"),(g||y||w||N||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(s){var a=s.x,i=s.y,o=s.width,l=s.height,c=s.stroke,u=Math.floor(i+l/2)-1;return X.createElement(X.Fragment,null,X.createElement("rect",{x:a,y:i,width:o,height:l,fill:c,stroke:"none"}),X.createElement("line",{x1:a+1,y1:u,x2:a+o-1,y2:u,fill:"none",stroke:"#fff"}),X.createElement("line",{x1:a+1,y1:u+2,x2:a+o-1,y2:u+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(s,a){var i;return X.isValidElement(s)?i=X.cloneElement(s,a):at(s)?i=s(a):i=t.renderDefaultTraveller(a),i}},{key:"getDerivedStateFromProps",value:function(s,a){var i=s.data,o=s.width,l=s.x,c=s.travellerWidth,u=s.updateId,m=s.startIndex,f=s.endIndex;if(i!==a.prevData||u!==a.prevUpdateId)return n_({prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o},i&&i.length?l2e({data:i,width:o,x:l,travellerWidth:c,startIndex:m,endIndex:f}):{scale:null,scaleValues:null});if(a.scale&&(o!==a.prevWidth||l!==a.prevX||c!==a.prevTravellerWidth)){a.scale.range([l,l+o-c]);var p=a.scale.domain().map(function(b){return a.scale(b)});return{prevData:i,prevTravellerWidth:c,prevUpdateId:u,prevX:l,prevWidth:o,startX:a.scale(s.startIndex),endX:a.scale(s.endIndex),scaleValues:p}}return null}},{key:"getIndexInRange",value:function(s,a){for(var i=s.length,o=0,l=i-1;l-o>1;){var c=Math.floor((o+l)/2);s[c]>a?l=c:o=c}return a>=s[l]?l:o}}])})(j.PureComponent);Hn(Fd,"displayName","Brush");Hn(Fd,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var s_,$D;function c2e(){if($D)return s_;$D=1;var e=VC();function t(n,s){var a;return e(n,function(i,o,l){return a=s(i,o,l),!a}),!!a}return s_=t,s_}var a_,FD;function d2e(){if(FD)return a_;FD=1;var e=IV(),t=Ea(),n=c2e(),s=Bn(),a=nv();function i(o,l,c){var u=s(o)?e:n;return c&&a(o,l,c)&&(l=void 0),u(o,t(l,3))}return a_=i,a_}var u2e=d2e();const h2e=Et(u2e);var xa=function(t,n){var s=t.alwaysShow,a=t.ifOverflow;return s&&(a="extendDomain"),a===n},i_,BD;function m2e(){if(BD)return i_;BD=1;var e=ZV();function t(n,s,a){s=="__proto__"&&e?e(n,s,{configurable:!0,enumerable:!0,value:a,writable:!0}):n[s]=a}return i_=t,i_}var o_,qD;function f2e(){if(qD)return o_;qD=1;var e=m2e(),t=JV(),n=Ea();function s(a,i){var o={};return i=n(i,3),t(a,function(l,c,u){e(o,c,i(l,c,u))}),o}return o_=s,o_}var p2e=f2e();const x2e=Et(p2e);var l_,VD;function g2e(){if(VD)return l_;VD=1;function e(t,n){for(var s=-1,a=t==null?0:t.length;++s<a;)if(!n(t[s],s,t))return!1;return!0}return l_=e,l_}var c_,UD;function y2e(){if(UD)return c_;UD=1;var e=VC();function t(n,s){var a=!0;return e(n,function(i,o,l){return a=!!s(i,o,l),a}),a}return c_=t,c_}var d_,zD;function v2e(){if(zD)return d_;zD=1;var e=g2e(),t=y2e(),n=Ea(),s=Bn(),a=nv();function i(o,l,c){var u=s(o)?e:t;return c&&a(o,l,c)&&(l=void 0),u(o,n(l,3))}return d_=i,d_}var b2e=v2e();const Fz=Et(b2e);var j2e=["x","y"];function Dm(e){"@babel/helpers - typeof";return Dm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dm(e)}function I2(){return I2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},I2.apply(this,arguments)}function WD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function fh(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WD(Object(n),!0).forEach(function(s){w2e(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function w2e(e,t,n){return t=N2e(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function N2e(e){var t=_2e(e,"string");return Dm(t)=="symbol"?t:t+""}function _2e(e,t){if(Dm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Dm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function S2e(e,t){if(e==null)return{};var n=k2e(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function k2e(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function C2e(e,t){var n=e.x,s=e.y,a=S2e(e,j2e),i="".concat(n),o=parseInt(i,10),l="".concat(s),c=parseInt(l,10),u="".concat(t.height||a.height),m=parseInt(u,10),f="".concat(t.width||a.width),p=parseInt(f,10);return fh(fh(fh(fh(fh({},t),a),o?{x:o}:{}),c?{y:c}:{}),{},{height:m,width:p,name:t.name,radius:t.radius})}function HD(e){return X.createElement(Oz,I2({shapeType:"rectangle",propTransformer:C2e,activeClassName:"recharts-active-bar"},e))}var A2e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(s,a){if(typeof t=="number")return t;var i=Te(s)||Yfe(s);return i?t(s,a):(i||Vl(),n)}},T2e=["value","background"],Bz;function Bd(e){"@babel/helpers - typeof";return Bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bd(e)}function E2e(e,t){if(e==null)return{};var n=P2e(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function P2e(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function Qg(){return Qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Qg.apply(this,arguments)}function GD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function br(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GD(Object(n),!0).forEach(function(s){so(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function O2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function KD(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Vz(s.key),s)}}function M2e(e,t,n){return t&&KD(e.prototype,t),n&&KD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function R2e(e,t,n){return t=Zg(t),I2e(e,qz()?Reflect.construct(t,n||[],Zg(e).constructor):t.apply(e,n))}function I2e(e,t){if(t&&(Bd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return D2e(e)}function D2e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(qz=function(){return!!e})()}function Zg(e){return Zg=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zg(e)}function L2e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D2(e,t)}function D2(e,t){return D2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},D2(e,t)}function so(e,t,n){return t=Vz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vz(e){var t=$2e(e,"string");return Bd(t)=="symbol"?t:t+""}function $2e(e,t){if(Bd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Bd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Gs=(function(e){function t(){var n;O2e(this,t);for(var s=arguments.length,a=new Array(s),i=0;i<s;i++)a[i]=arguments[i];return n=R2e(this,t,[].concat(a)),so(n,"state",{isAnimationFinished:!1}),so(n,"id",pf("recharts-bar-")),so(n,"handleAnimationEnd",function(){var o=n.props.onAnimationEnd;n.setState({isAnimationFinished:!0}),o&&o()}),so(n,"handleAnimationStart",function(){var o=n.props.onAnimationStart;n.setState({isAnimationFinished:!1}),o&&o()}),n}return L2e(t,e),M2e(t,[{key:"renderRectanglesStatically",value:function(s){var a=this,i=this.props,o=i.shape,l=i.dataKey,c=i.activeIndex,u=i.activeBar,m=nt(this.props,!1);return s&&s.map(function(f,p){var b=p===c,v=b?u:o,g=br(br(br({},m),f),{},{isActive:b,option:v,index:p,dataKey:l,onAnimationStart:a.handleAnimationStart,onAnimationEnd:a.handleAnimationEnd});return X.createElement(Dt,Qg({className:"recharts-bar-rectangle"},Fl(a.props,f,p),{key:"rectangle-".concat(f==null?void 0:f.x,"-").concat(f==null?void 0:f.y,"-").concat(f==null?void 0:f.value,"-").concat(p)}),X.createElement(HD,g))})}},{key:"renderRectanglesWithAnimation",value:function(){var s=this,a=this.props,i=a.data,o=a.layout,l=a.isAnimationActive,c=a.animationBegin,u=a.animationDuration,m=a.animationEasing,f=a.animationId,p=this.state.prevData;return X.createElement(di,{begin:c,duration:u,isActive:l,easing:m,from:{t:0},to:{t:1},key:"bar-".concat(f),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(b){var v=b.t,g=i.map(function(y,w){var N=p&&p[w];if(N){var S=Ui(N.x,y.x),A=Ui(N.y,y.y),k=Ui(N.width,y.width),C=Ui(N.height,y.height);return br(br({},y),{},{x:S(v),y:A(v),width:k(v),height:C(v)})}if(o==="horizontal"){var T=Ui(0,y.height),P=T(v);return br(br({},y),{},{y:y.y+y.height-P,height:P})}var R=Ui(0,y.width),M=R(v);return br(br({},y),{},{width:M})});return X.createElement(Dt,null,s.renderRectanglesStatically(g))})}},{key:"renderRectangles",value:function(){var s=this.props,a=s.data,i=s.isAnimationActive,o=this.state.prevData;return i&&a&&a.length&&(!o||!mv(o,a))?this.renderRectanglesWithAnimation():this.renderRectanglesStatically(a)}},{key:"renderBackground",value:function(){var s=this,a=this.props,i=a.data,o=a.dataKey,l=a.activeIndex,c=nt(this.props.background,!1);return i.map(function(u,m){u.value;var f=u.background,p=E2e(u,T2e);if(!f)return null;var b=br(br(br(br(br({},p),{},{fill:"#eee"},f),c),Fl(s.props,u,m)),{},{onAnimationStart:s.handleAnimationStart,onAnimationEnd:s.handleAnimationEnd,dataKey:o,index:m,className:"recharts-bar-background-rectangle"});return X.createElement(HD,Qg({key:"background-bar-".concat(m),option:s.props.background,isActive:m===l},b))})}},{key:"renderErrorBar",value:function(s,a){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var i=this.props,o=i.data,l=i.xAxis,c=i.yAxis,u=i.layout,m=i.children,f=vs(m,xv);if(!f)return null;var p=u==="vertical"?o[0].height/2:o[0].width/2,b=function(y,w){var N=Array.isArray(y.value)?y.value[1]:y.value;return{x:y.x,y:y.y,value:N,errorVal:on(y,w)}},v={clipPath:s?"url(#clipPath-".concat(a,")"):null};return X.createElement(Dt,v,f.map(function(g){return X.cloneElement(g,{key:"error-bar-".concat(a,"-").concat(g.props.dataKey),data:o,xAxis:l,yAxis:c,layout:u,offset:p,dataPointFormatter:b})}))}},{key:"render",value:function(){var s=this.props,a=s.hide,i=s.data,o=s.className,l=s.xAxis,c=s.yAxis,u=s.left,m=s.top,f=s.width,p=s.height,b=s.isAnimationActive,v=s.background,g=s.id;if(a||!i||!i.length)return null;var y=this.state.isAnimationFinished,w=ct("recharts-bar",o),N=l&&l.allowDataOverflow,S=c&&c.allowDataOverflow,A=N||S,k=yt(g)?this.id:g;return X.createElement(Dt,{className:w},N||S?X.createElement("defs",null,X.createElement("clipPath",{id:"clipPath-".concat(k)},X.createElement("rect",{x:N?u:u-f/2,y:S?m:m-p/2,width:N?f:f*2,height:S?p:p*2}))):null,X.createElement(Dt,{className:"recharts-bar-rectangles",clipPath:A?"url(#clipPath-".concat(k,")"):null},v?this.renderBackground():null,this.renderRectangles()),this.renderErrorBar(A,k),(!b||y)&&co.renderCallByParent(this.props,i))}}],[{key:"getDerivedStateFromProps",value:function(s,a){return s.animationId!==a.prevAnimationId?{prevAnimationId:s.animationId,curData:s.data,prevData:a.curData}:s.data!==a.curData?{curData:s.data}:null}}])})(j.PureComponent);Bz=Gs;so(Gs,"displayName","Bar");so(Gs,"defaultProps",{xAxisId:0,yAxisId:0,legendType:"rect",minPointSize:0,hide:!1,data:[],layout:"vertical",activeBar:!1,isAnimationActive:!cu.isSsr,animationBegin:0,animationDuration:400,animationEasing:"ease"});so(Gs,"getComposedData",function(e){var t=e.props,n=e.item,s=e.barPosition,a=e.bandSize,i=e.xAxis,o=e.yAxis,l=e.xAxisTicks,c=e.yAxisTicks,u=e.stackedData,m=e.dataStartIndex,f=e.displayedData,p=e.offset,b=cwe(s,n);if(!b)return null;var v=t.layout,g=n.type.defaultProps,y=g!==void 0?br(br({},g),n.props):n.props,w=y.dataKey,N=y.children,S=y.minPointSize,A=v==="horizontal"?o:i,k=u?A.scale.domain():null,C=xwe({numericAxis:A}),T=vs(N,gf),P=f.map(function(R,M){var D,$,q,H,L,F;u?D=dwe(u[m+M],k):(D=on(R,w),Array.isArray(D)||(D=[C,D]));var Y=A2e(S,Bz.defaultProps.minPointSize)(D[1],M);if(v==="horizontal"){var U,re=[o.scale(D[0]),o.scale(D[1])],G=re[0],B=re[1];$=wI({axis:i,ticks:l,bandSize:a,offset:b.offset,entry:R,index:M}),q=(U=B??G)!==null&&U!==void 0?U:void 0,H=b.size;var z=G-B;if(L=Number.isNaN(z)?0:z,F={x:$,y:o.y,width:H,height:o.height},Math.abs(Y)>0&&Math.abs(L)<Math.abs(Y)){var he=gn(L||Y)*(Math.abs(Y)-Math.abs(L));q-=he,L+=he}}else{var fe=[i.scale(D[0]),i.scale(D[1])],be=fe[0],xe=fe[1];if($=be,q=wI({axis:o,ticks:c,bandSize:a,offset:b.offset,entry:R,index:M}),H=xe-be,L=b.size,F={x:i.x,y:q,width:i.width,height:L},Math.abs(Y)>0&&Math.abs(H)<Math.abs(Y)){var pe=gn(H||Y)*(Math.abs(Y)-Math.abs(H));H+=pe}}return br(br(br({},R),{},{x:$,y:q,width:H,height:L,value:u?D:D[1],payload:R,background:F},T&&T[M]&&T[M].props),{},{tooltipPayload:[fz(n,R)],tooltipPosition:{x:$+H/2,y:q+L/2}})});return br({data:P,layout:v},p)});function Lm(e){"@babel/helpers - typeof";return Lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lm(e)}function F2e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function YD(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,Uz(s.key),s)}}function B2e(e,t,n){return t&&YD(e.prototype,t),n&&YD(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function XD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function Bs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XD(Object(n),!0).forEach(function(s){Nv(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XD(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Nv(e,t,n){return t=Uz(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Uz(e){var t=q2e(e,"string");return Lm(t)=="symbol"?t:t+""}function q2e(e,t){if(Lm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Lm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var V2e=function(t,n,s,a,i){var o=t.width,l=t.height,c=t.layout,u=t.children,m=Object.keys(n),f={left:s.left,leftMirror:s.left,right:o-s.right,rightMirror:o-s.right,top:s.top,topMirror:s.top,bottom:l-s.bottom,bottomMirror:l-s.bottom},p=!!Gn(u,Gs);return m.reduce(function(b,v){var g=n[v],y=g.orientation,w=g.domain,N=g.padding,S=N===void 0?{}:N,A=g.mirror,k=g.reversed,C="".concat(y).concat(A?"Mirror":""),T,P,R,M,D;if(g.type==="number"&&(g.padding==="gap"||g.padding==="no-gap")){var $=w[1]-w[0],q=1/0,H=g.categoricalDomain.sort(Qfe);if(H.forEach(function(fe,be){be>0&&(q=Math.min((fe||0)-(H[be-1]||0),q))}),Number.isFinite(q)){var L=q/$,F=g.layout==="vertical"?s.height:s.width;if(g.padding==="gap"&&(T=L*F/2),g.padding==="no-gap"){var Y=yn(t.barCategoryGap,L*F),U=L*F/2;T=U-Y-(U-Y)/F*Y}}}a==="xAxis"?P=[s.left+(S.left||0)+(T||0),s.left+s.width-(S.right||0)-(T||0)]:a==="yAxis"?P=c==="horizontal"?[s.top+s.height-(S.bottom||0),s.top+(S.top||0)]:[s.top+(S.top||0)+(T||0),s.top+s.height-(S.bottom||0)-(T||0)]:P=g.range,k&&(P=[P[1],P[0]]);var re=dz(g,i,p),G=re.scale,B=re.realScaleType;G.domain(w).range(P),uz(G);var z=hz(G,Bs(Bs({},g),{},{realScaleType:B}));a==="xAxis"?(D=y==="top"&&!A||y==="bottom"&&A,R=s.left,M=f[C]-D*g.height):a==="yAxis"&&(D=y==="left"&&!A||y==="right"&&A,R=f[C]-D*g.width,M=s.top);var he=Bs(Bs(Bs({},g),z),{},{realScaleType:B,x:R,y:M,scale:G,width:a==="xAxis"?s.width:g.width,height:a==="yAxis"?s.height:g.height});return he.bandSize=Dg(he,z),!g.hide&&a==="xAxis"?f[C]+=(D?-1:1)*he.height:g.hide||(f[C]+=(D?-1:1)*he.width),Bs(Bs({},b),{},Nv({},v,he))},{})},zz=function(t,n){var s=t.x,a=t.y,i=n.x,o=n.y;return{x:Math.min(s,i),y:Math.min(a,o),width:Math.abs(i-s),height:Math.abs(o-a)}},U2e=function(t){var n=t.x1,s=t.y1,a=t.x2,i=t.y2;return zz({x:n,y:s},{x:a,y:i})},Wz=(function(){function e(t){F2e(this,e),this.scale=t}return B2e(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=s.bandAware,i=s.position;if(n!==void 0){if(i)switch(i){case"start":return this.scale(n);case"middle":{var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+o}case"end":{var l=this.bandwidth?this.bandwidth():0;return this.scale(n)+l}default:return this.scale(n)}if(a){var c=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+c}return this.scale(n)}}},{key:"isInRange",value:function(n){var s=this.range(),a=s[0],i=s[s.length-1];return a<=i?n>=a&&n<=i:n>=i&&n<=a}}],[{key:"create",value:function(n){return new e(n)}}])})();Nv(Wz,"EPS",1e-4);var yA=function(t){var n=Object.keys(t).reduce(function(s,a){return Bs(Bs({},s),{},Nv({},a,Wz.create(t[a])))},{});return Bs(Bs({},n),{},{apply:function(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.bandAware,l=i.position;return x2e(a,function(c,u){return n[u].apply(c,{bandAware:o,position:l})})},isInRange:function(a){return Fz(a,function(i,o){return n[o].isInRange(i)})}})};function z2e(e){return(e%180+180)%180}var W2e=function(t){var n=t.width,s=t.height,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=z2e(a),o=i*Math.PI/180,l=Math.atan(s/n),c=o>l&&o<Math.PI-l?s/Math.sin(o):n/Math.cos(o);return Math.abs(c)},u_,JD;function H2e(){if(JD)return u_;JD=1;var e=Ea(),t=xf(),n=tv();function s(a){return function(i,o,l){var c=Object(i);if(!t(i)){var u=e(o,3);i=n(i),o=function(f){return u(c[f],f,c)}}var m=a(i,o,l);return m>-1?c[u?i[m]:m]:void 0}}return u_=s,u_}var h_,QD;function G2e(){if(QD)return h_;QD=1;var e=Iz();function t(n){var s=e(n),a=s%1;return s===s?a?s-a:s:0}return h_=t,h_}var m_,ZD;function K2e(){if(ZD)return m_;ZD=1;var e=HV(),t=Ea(),n=G2e(),s=Math.max;function a(i,o,l){var c=i==null?0:i.length;if(!c)return-1;var u=l==null?0:n(l);return u<0&&(u=s(c+u,0)),e(i,t(o,3),u)}return m_=a,m_}var f_,eL;function Y2e(){if(eL)return f_;eL=1;var e=H2e(),t=K2e(),n=e(t);return f_=n,f_}var X2e=Y2e();const J2e=Et(X2e);var Q2e=lV();const Z2e=Et(Q2e);var eke=Z2e(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),vA=j.createContext(void 0),bA=j.createContext(void 0),Hz=j.createContext(void 0),Gz=j.createContext({}),Kz=j.createContext(void 0),Yz=j.createContext(0),Xz=j.createContext(0),tL=function(t){var n=t.state,s=n.xAxisMap,a=n.yAxisMap,i=n.offset,o=t.clipPathId,l=t.children,c=t.width,u=t.height,m=eke(i);return X.createElement(vA.Provider,{value:s},X.createElement(bA.Provider,{value:a},X.createElement(Gz.Provider,{value:i},X.createElement(Hz.Provider,{value:m},X.createElement(Kz.Provider,{value:o},X.createElement(Yz.Provider,{value:u},X.createElement(Xz.Provider,{value:c},l)))))))},tke=function(){return j.useContext(Kz)},Jz=function(t){var n=j.useContext(vA);n==null&&Vl();var s=n[t];return s==null&&Vl(),s},rke=function(){var t=j.useContext(vA);return Wi(t)},nke=function(){var t=j.useContext(bA),n=J2e(t,function(s){return Fz(s.domain,Number.isFinite)});return n||Wi(t)},Qz=function(t){var n=j.useContext(bA);n==null&&Vl();var s=n[t];return s==null&&Vl(),s},ske=function(){var t=j.useContext(Hz);return t},ake=function(){return j.useContext(Gz)},jA=function(){return j.useContext(Xz)},wA=function(){return j.useContext(Yz)};function qd(e){"@babel/helpers - typeof";return qd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qd(e)}function ike(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oke(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,e9(s.key),s)}}function lke(e,t,n){return t&&oke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function cke(e,t,n){return t=ey(t),dke(e,Zz()?Reflect.construct(t,n||[],ey(e).constructor):t.apply(e,n))}function dke(e,t){if(t&&(qd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return uke(e)}function uke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Zz(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Zz=function(){return!!e})()}function ey(e){return ey=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ey(e)}function hke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&L2(e,t)}function L2(e,t){return L2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},L2(e,t)}function rL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function nL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rL(Object(n),!0).forEach(function(s){NA(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rL(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function NA(e,t,n){return t=e9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function e9(e){var t=mke(e,"string");return qd(t)=="symbol"?t:t+""}function mke(e,t){if(qd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(qd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function fke(e,t){return yke(e)||gke(e,t)||xke(e,t)||pke()}function pke(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 895In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xke(e,t){if(e){if(typeof e=="string")return sL(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return sL(e,t)}}function sL(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function gke(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function yke(e){if(Array.isArray(e))return e}function $2(){return $2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},$2.apply(this,arguments)}var vke=function(t,n){var s;return X.isValidElement(t)?s=X.cloneElement(t,n):at(t)?s=t(n):s=X.createElement("line",$2({},n,{className:"recharts-reference-line-line"})),s},bke=function(t,n,s,a,i,o,l,c,u){var m=i.x,f=i.y,p=i.width,b=i.height;if(s){var v=u.y,g=t.y.apply(v,{position:o});if(xa(u,"discard")&&!t.y.isInRange(g))return null;var y=[{x:m+p,y:g},{x:m,y:g}];return c==="left"?y.reverse():y}if(n){var w=u.x,N=t.x.apply(w,{position:o});if(xa(u,"discard")&&!t.x.isInRange(N))return null;var S=[{x:N,y:f+b},{x:N,y:f}];return l==="top"?S.reverse():S}if(a){var A=u.segment,k=A.map(function(C){return t.apply(C,{position:o})});return xa(u,"discard")&&h2e(k,function(C){return!t.isInRange(C)})?null:k}return null};function jke(e){var t=e.x,n=e.y,s=e.segment,a=e.xAxisId,i=e.yAxisId,o=e.shape,l=e.className,c=e.alwaysShow,u=tke(),m=Jz(a),f=Qz(i),p=ske();if(!u||!p)return null;Vs(c===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var b=yA({x:m.scale,y:f.scale}),v=Mr(t),g=Mr(n),y=s&&s.length===2,w=bke(b,v,g,y,p,e.position,m.orientation,f.orientation,e);if(!w)return null;var N=fke(w,2),S=N[0],A=S.x,k=S.y,C=N[1],T=C.x,P=C.y,R=xa(e,"hidden")?"url(#".concat(u,")"):void 0,M=nL(nL({clipPath:R},nt(e,!0)),{},{x1:A,y1:k,x2:T,y2:P});return X.createElement(Dt,{className:ct("recharts-reference-line",l)},vke(o,M),qr.renderCallByParent(e,U2e({x1:A,y1:k,x2:T,y2:P})))}var _A=(function(e){function t(){return ike(this,t),cke(this,t,arguments)}return hke(t,e),lke(t,[{key:"render",value:function(){return X.createElement(jke,this.props)}}])})(X.Component);NA(_A,"displayName","ReferenceLine");NA(_A,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function F2(){return F2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},F2.apply(this,arguments)}function Vd(e){"@babel/helpers - typeof";return Vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vd(e)}function aL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function iL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aL(Object(n),!0).forEach(function(s){_v(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aL(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function wke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nke(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,r9(s.key),s)}}function _ke(e,t,n){return t&&Nke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ske(e,t,n){return t=ty(t),kke(e,t9()?Reflect.construct(t,n||[],ty(e).constructor):t.apply(e,n))}function kke(e,t){if(t&&(Vd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Cke(e)}function Cke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function t9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(t9=function(){return!!e})()}function ty(e){return ty=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ty(e)}function Ake(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&B2(e,t)}function B2(e,t){return B2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},B2(e,t)}function _v(e,t,n){return t=r9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r9(e){var t=Tke(e,"string");return Vd(t)=="symbol"?t:t+""}function Tke(e,t){if(Vd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Vd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Eke=function(t){var n=t.x,s=t.y,a=t.xAxis,i=t.yAxis,o=yA({x:a.scale,y:i.scale}),l=o.apply({x:n,y:s},{bandAware:!0});return xa(t,"discard")&&!o.isInRange(l)?null:l},Sv=(function(e){function t(){return wke(this,t),Ske(this,t,arguments)}return Ake(t,e),_ke(t,[{key:"render",value:function(){var s=this.props,a=s.x,i=s.y,o=s.r,l=s.alwaysShow,c=s.clipPathId,u=Mr(a),m=Mr(i);if(Vs(l===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.'),!u||!m)return null;var f=Eke(this.props);if(!f)return null;var p=f.x,b=f.y,v=this.props,g=v.shape,y=v.className,w=xa(this.props,"hidden")?"url(#".concat(c,")"):void 0,N=iL(iL({clipPath:w},nt(this.props,!0)),{},{cx:p,cy:b});return X.createElement(Dt,{className:ct("recharts-reference-dot",y)},t.renderDot(g,N),qr.renderCallByParent(this.props,{x:p-o,y:b-o,width:2*o,height:2*o}))}}])})(X.Component);_v(Sv,"displayName","ReferenceDot");_v(Sv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#fff",stroke:"#ccc",fillOpacity:1,strokeWidth:1});_v(Sv,"renderDot",function(e,t){var n;return X.isValidElement(e)?n=X.cloneElement(e,t):at(e)?n=e(t):n=X.createElement(gA,F2({},t,{cx:t.cx,cy:t.cy,className:"recharts-reference-dot-dot"})),n});function q2(){return q2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},q2.apply(this,arguments)}function Ud(e){"@babel/helpers - typeof";return Ud=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ud(e)}function oL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function lL(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oL(Object(n),!0).forEach(function(s){kv(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oL(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function Pke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Oke(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s9(s.key),s)}}function Mke(e,t,n){return t&&Oke(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Rke(e,t,n){return t=ry(t),Ike(e,n9()?Reflect.construct(t,n||[],ry(e).constructor):t.apply(e,n))}function Ike(e,t){if(t&&(Ud(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Dke(e)}function Dke(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function n9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(n9=function(){return!!e})()}function ry(e){return ry=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ry(e)}function Lke(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V2(e,t)}function V2(e,t){return V2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},V2(e,t)}function kv(e,t,n){return t=s9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s9(e){var t=$ke(e,"string");return Ud(t)=="symbol"?t:t+""}function $ke(e,t){if(Ud(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Ud(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var Fke=function(t,n,s,a,i){var o=i.x1,l=i.x2,c=i.y1,u=i.y2,m=i.xAxis,f=i.yAxis;if(!m||!f)return null;var p=yA({x:m.scale,y:f.scale}),b={x:t?p.x.apply(o,{position:"start"}):p.x.rangeMin,y:s?p.y.apply(c,{position:"start"}):p.y.rangeMin},v={x:n?p.x.apply(l,{position:"end"}):p.x.rangeMax,y:a?p.y.apply(u,{position:"end"}):p.y.rangeMax};return xa(i,"discard")&&(!p.isInRange(b)||!p.isInRange(v))?null:zz(b,v)},Cv=(function(e){function t(){return Pke(this,t),Rke(this,t,arguments)}return Lke(t,e),Mke(t,[{key:"render",value:function(){var s=this.props,a=s.x1,i=s.x2,o=s.y1,l=s.y2,c=s.className,u=s.alwaysShow,m=s.clipPathId;Vs(u===void 0,'The alwaysShow prop is deprecated. Please use ifOverflow="extendDomain" instead.');var f=Mr(a),p=Mr(i),b=Mr(o),v=Mr(l),g=this.props.shape;if(!f&&!p&&!b&&!v&&!g)return null;var y=Fke(f,p,b,v,this.props);if(!y&&!g)return null;var w=xa(this.props,"hidden")?"url(#".concat(m,")"):void 0;return X.createElement(Dt,{className:ct("recharts-reference-area",c)},t.renderRect(g,lL(lL({clipPath:w},nt(this.props,!0)),y)),qr.renderCallByParent(this.props,y))}}])})(X.Component);kv(Cv,"displayName","ReferenceArea");kv(Cv,"defaultProps",{isFront:!1,ifOverflow:"discard",xAxisId:0,yAxisId:0,r:10,fill:"#ccc",fillOpacity:.5,stroke:"none",strokeWidth:1});kv(Cv,"renderRect",function(e,t){var n;return X.isValidElement(e)?n=X.cloneElement(e,t):at(e)?n=e(t):n=X.createElement(xA,q2({},t,{className:"recharts-reference-area-rect"})),n});function a9(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var s=[],a=0;a<e.length;a+=t)s.push(e[a]);return s}function Bke(e,t,n){var s={width:e.width+t.width,height:e.height+t.height};return W2e(s,n)}function qke(e,t,n){var s=n==="width",a=e.x,i=e.y,o=e.width,l=e.height;return t===1?{start:s?a:i,end:s?a+o:i+l}:{start:s?a+o:i+l,end:s?a:i}}function ny(e,t,n,s,a){if(e*t<e*s||e*t>e*a)return!1;var i=n();return e*(t-e*i/2-s)>=0&&e*(t+e*i/2-a)<=0}function Vke(e,t){return a9(e,t+1)}function Uke(e,t,n,s,a){for(var i=(s||[]).slice(),o=t.start,l=t.end,c=0,u=1,m=o,f=function(){var v=s==null?void 0:s[c];if(v===void 0)return{v:a9(s,u)};var g=c,y,w=function(){return y===void 0&&(y=n(v,g)),y},N=v.coordinate,S=c===0||ny(e,N,w,m,l);S||(c=0,m=o,u+=1),S&&(m=N+e*(w()/2+a),c+=u)},p;u<=i.length;)if(p=f(),p)return p.v;return[]}function $m(e){"@babel/helpers - typeof";return $m=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$m(e)}function cL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cL(Object(n),!0).forEach(function(s){zke(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cL(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function zke(e,t,n){return t=Wke(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wke(e){var t=Hke(e,"string");return $m(t)=="symbol"?t:t+""}function Hke(e,t){if($m(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if($m(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gke(e,t,n,s,a){for(var i=(s||[]).slice(),o=i.length,l=t.start,c=t.end,u=function(p){var b=i[p],v,g=function(){return v===void 0&&(v=n(b,p)),v};if(p===o-1){var y=e*(b.coordinate+e*g()/2-c);i[p]=b=sn(sn({},b),{},{tickCoord:y>0?b.coordinate-y*e:b.coordinate})}else i[p]=b=sn(sn({},b),{},{tickCoord:b.coordinate});var w=ny(e,b.tickCoord,g,l,c);w&&(c=b.tickCoord-e*(g()/2+a),i[p]=sn(sn({},b),{},{isShow:!0}))},m=o-1;m>=0;m--)u(m);return i}function Kke(e,t,n,s,a,i){var o=(s||[]).slice(),l=o.length,c=t.start,u=t.end;if(i){var m=s[l-1],f=n(m,l-1),p=e*(m.coordinate+e*f/2-u);o[l-1]=m=sn(sn({},m),{},{tickCoord:p>0?m.coordinate-p*e:m.coordinate});var b=ny(e,m.tickCoord,function(){return f},c,u);b&&(u=m.tickCoord-e*(f/2+a),o[l-1]=sn(sn({},m),{},{isShow:!0}))}for(var v=i?l-1:l,g=function(N){var S=o[N],A,k=function(){return A===void 0&&(A=n(S,N)),A};if(N===0){var C=e*(S.coordinate-e*k()/2-c);o[N]=S=sn(sn({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else o[N]=S=sn(sn({},S),{},{tickCoord:S.coordinate});var T=ny(e,S.tickCoord,k,c,u);T&&(c=S.tickCoord+e*(k()/2+a),o[N]=sn(sn({},S),{},{isShow:!0}))},y=0;y<v;y++)g(y);return o}function SA(e,t,n){var s=e.tick,a=e.ticks,i=e.viewBox,o=e.minTickGap,l=e.orientation,c=e.interval,u=e.tickFormatter,m=e.unit,f=e.angle;if(!a||!a.length||!s)return[];if(Te(c)||cu.isSsr)return Vke(a,typeof c=="number"&&Te(c)?c:0);var p=[],b=l==="top"||l==="bottom"?"width":"height",v=m&&b==="width"?qh(m,{fontSize:t,letterSpacing:n}):{width:0,height:0},g=function(S,A){var k=at(u)?u(S.value,A):S.value;return b==="width"?Bke(qh(k,{fontSize:t,letterSpacing:n}),v,f):qh(k,{fontSize:t,letterSpacing:n})[b]},y=a.length>=2?gn(a[1].coordinate-a[0].coordinate):1,w=qke(i,y,b);return c==="equidistantPreserveStart"?Uke(y,w,g,a,o):(c==="preserveStart"||c==="preserveStartEnd"?p=Kke(y,w,g,a,o,c==="preserveStartEnd"):p=Gke(y,w,g,a,o),p.filter(function(N){return N.isShow}))}var Yke=["viewBox"],Xke=["viewBox"],Jke=["ticks"];function zd(e){"@babel/helpers - typeof";return zd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zd(e)}function Xc(){return Xc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Xc.apply(this,arguments)}function dL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function Pr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dL(Object(n),!0).forEach(function(s){kA(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dL(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function p_(e,t){if(e==null)return{};var n=Qke(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function Qke(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function Zke(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uL(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,o9(s.key),s)}}function eCe(e,t,n){return t&&uL(e.prototype,t),n&&uL(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function tCe(e,t,n){return t=sy(t),rCe(e,i9()?Reflect.construct(t,n||[],sy(e).constructor):t.apply(e,n))}function rCe(e,t){if(t&&(zd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return nCe(e)}function nCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(i9=function(){return!!e})()}function sy(e){return sy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},sy(e)}function sCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&U2(e,t)}function U2(e,t){return U2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},U2(e,t)}function kA(e,t,n){return t=o9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o9(e){var t=aCe(e,"string");return zd(t)=="symbol"?t:t+""}function aCe(e,t){if(zd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(zd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mu=(function(e){function t(n){var s;return Zke(this,t),s=tCe(this,t,[n]),s.state={fontSize:"",letterSpacing:""},s}return sCe(t,e),eCe(t,[{key:"shouldComponentUpdate",value:function(s,a){var i=s.viewBox,o=p_(s,Yke),l=this.props,c=l.viewBox,u=p_(l,Xke);return!td(i,c)||!td(o,u)||!td(a,this.state)}},{key:"componentDidMount",value:function(){var s=this.layerReference;if(s){var a=s.getElementsByClassName("recharts-cartesian-axis-tick-value")[0];a&&this.setState({fontSize:window.getComputedStyle(a).fontSize,letterSpacing:window.getComputedStyle(a).letterSpacing})}}},{key:"getTickLineCoord",value:function(s){var a=this.props,i=a.x,o=a.y,l=a.width,c=a.height,u=a.orientation,m=a.tickSize,f=a.mirror,p=a.tickMargin,b,v,g,y,w,N,S=f?-1:1,A=s.tickSize||m,k=Te(s.tickCoord)?s.tickCoord:s.coordinate;switch(u){case"top":b=v=s.coordinate,y=o+ +!f*c,g=y-S*A,N=g-S*p,w=k;break;case"left":g=y=s.coordinate,v=i+ +!f*l,b=v-S*A,w=b-S*p,N=k;break;case"right":g=y=s.coordinate,v=i+ +f*l,b=v+S*A,w=b+S*p,N=k;break;default:b=v=s.coordinate,y=o+ +f*c,g=y+S*A,N=g+S*p,w=k;break}return{line:{x1:b,y1:g,x2:v,y2:y},tick:{x:w,y:N}}}},{key:"getTickTextAnchor",value:function(){var s=this.props,a=s.orientation,i=s.mirror,o;switch(a){case"left":o=i?"start":"end";break;case"right":o=i?"end":"start";break;default:o="middle";break}return o}},{key:"getTickVerticalAnchor",value:function(){var s=this.props,a=s.orientation,i=s.mirror,o="end";switch(a){case"left":case"right":o="middle";break;case"top":o=i?"start":"end";break;default:o=i?"end":"start";break}return o}},{key:"renderAxisLine",value:function(){var s=this.props,a=s.x,i=s.y,o=s.width,l=s.height,c=s.orientation,u=s.mirror,m=s.axisLine,f=Pr(Pr(Pr({},nt(this.props,!1)),nt(m,!1)),{},{fill:"none"});if(c==="top"||c==="bottom"){var p=+(c==="top"&&!u||c==="bottom"&&u);f=Pr(Pr({},f),{},{x1:a,y1:i+p*l,x2:a+o,y2:i+p*l})}else{var b=+(c==="left"&&!u||c==="right"&&u);f=Pr(Pr({},f),{},{x1:a+b*o,y1:i,x2:a+b*o,y2:i+l})}return X.createElement("line",Xc({},f,{className:ct("recharts-cartesian-axis-line",Qn(m,"className"))}))}},{key:"renderTicks",value:function(s,a,i){var o=this,l=this.props,c=l.tickLine,u=l.stroke,m=l.tick,f=l.tickFormatter,p=l.unit,b=SA(Pr(Pr({},this.props),{},{ticks:s}),a,i),v=this.getTickTextAnchor(),g=this.getTickVerticalAnchor(),y=nt(this.props,!1),w=nt(m,!1),N=Pr(Pr({},y),{},{fill:"none"},nt(c,!1)),S=b.map(function(A,k){var C=o.getTickLineCoord(A),T=C.line,P=C.tick,R=Pr(Pr(Pr(Pr({textAnchor:v,verticalAnchor:g},y),{},{stroke:"none",fill:u},w),P),{},{index:k,payload:A,visibleTicksCount:b.length,tickFormatter:f});return X.createElement(Dt,Xc({className:"recharts-cartesian-axis-tick",key:"tick-".concat(A.value,"-").concat(A.coordinate,"-").concat(A.tickCoord)},Fl(o.props,A,k)),c&&X.createElement("line",Xc({},N,T,{className:ct("recharts-cartesian-axis-tick-line",Qn(c,"className"))})),m&&t.renderTickItem(m,R,"".concat(at(f)?f(A.value,k):A.value).concat(p||"")))});return X.createElement("g",{className:"recharts-cartesian-axis-ticks"},S)}},{key:"render",value:function(){var s=this,a=this.props,i=a.axisLine,o=a.width,l=a.height,c=a.ticksGenerator,u=a.className,m=a.hide;if(m)return null;var f=this.props,p=f.ticks,b=p_(f,Jke),v=p;return at(c)&&(v=p&&p.length>0?c(this.props):c(b)),o<=0||l<=0||!v||!v.length?null:X.createElement(Dt,{className:ct("recharts-cartesian-axis",u),ref:function(y){s.layerReference=y}},i&&this.renderAxisLine(),this.renderTicks(v,this.state.fontSize,this.state.letterSpacing),qr.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(s,a,i){var o,l=ct(a.className,"recharts-cartesian-axis-tick-value");return X.isValidElement(s)?o=X.cloneElement(s,Pr(Pr({},a),{},{className:l})):at(s)?o=s(Pr(Pr({},a),{},{className:l})):o=X.createElement(Bl,Xc({},a,{className:"recharts-cartesian-axis-tick-value"}),i),o}}])})(j.Component);kA(mu,"displayName","CartesianAxis");kA(mu,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var iCe=["x1","y1","x2","y2","key"],oCe=["offset"];function Ul(e){"@babel/helpers - typeof";return Ul=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ul(e)}function hL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function an(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hL(Object(n),!0).forEach(function(s){lCe(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hL(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function lCe(e,t,n){return t=cCe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cCe(e){var t=dCe(e,"string");return Ul(t)=="symbol"?t:t+""}function dCe(e,t){if(Ul(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Ul(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function hl(){return hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},hl.apply(this,arguments)}function mL(e,t){if(e==null)return{};var n=uCe(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function uCe(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}var hCe=function(t){var n=t.fill;if(!n||n==="none")return null;var s=t.fillOpacity,a=t.x,i=t.y,o=t.width,l=t.height,c=t.ry;return X.createElement("rect",{x:a,y:i,ry:c,width:o,height:l,stroke:"none",fill:n,fillOpacity:s,className:"recharts-cartesian-grid-bg"})};function l9(e,t){var n;if(X.isValidElement(e))n=X.cloneElement(e,t);else if(at(e))n=e(t);else{var s=t.x1,a=t.y1,i=t.x2,o=t.y2,l=t.key,c=mL(t,iCe),u=nt(c,!1);u.offset;var m=mL(u,oCe);n=X.createElement("line",hl({},m,{x1:s,y1:a,x2:i,y2:o,fill:"none",key:l}))}return n}function mCe(e){var t=e.x,n=e.width,s=e.horizontal,a=s===void 0?!0:s,i=e.horizontalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(l,c){var u=an(an({},e),{},{x1:t,y1:l,x2:t+n,y2:l,key:"line-".concat(c),index:c});return l9(a,u)});return X.createElement("g",{className:"recharts-cartesian-grid-horizontal"},o)}function fCe(e){var t=e.y,n=e.height,s=e.vertical,a=s===void 0?!0:s,i=e.verticalPoints;if(!a||!i||!i.length)return null;var o=i.map(function(l,c){var u=an(an({},e),{},{x1:l,y1:t,x2:l,y2:t+n,key:"line-".concat(c),index:c});return l9(a,u)});return X.createElement("g",{className:"recharts-cartesian-grid-vertical"},o)}function pCe(e){var t=e.horizontalFill,n=e.fillOpacity,s=e.x,a=e.y,i=e.width,o=e.height,l=e.horizontalPoints,c=e.horizontal,u=c===void 0?!0:c;if(!u||!t||!t.length)return null;var m=l.map(function(p){return Math.round(p+a-a)}).sort(function(p,b){return p-b});a!==m[0]&&m.unshift(0);var f=m.map(function(p,b){var v=!m[b+1],g=v?a+o-p:m[b+1]-p;if(g<=0)return null;var y=b%t.length;return X.createElement("rect",{key:"react-".concat(b),y:p,x:s,height:g,width:i,stroke:"none",fill:t[y],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return X.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function xCe(e){var t=e.vertical,n=t===void 0?!0:t,s=e.verticalFill,a=e.fillOpacity,i=e.x,o=e.y,l=e.width,c=e.height,u=e.verticalPoints;if(!n||!s||!s.length)return null;var m=u.map(function(p){return Math.round(p+i-i)}).sort(function(p,b){return p-b});i!==m[0]&&m.unshift(0);var f=m.map(function(p,b){var v=!m[b+1],g=v?i+l-p:m[b+1]-p;if(g<=0)return null;var y=b%s.length;return X.createElement("rect",{key:"react-".concat(b),x:p,y:o,width:g,height:c,stroke:"none",fill:s[y],fillOpacity:a,className:"recharts-cartesian-grid-bg"})});return X.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var gCe=function(t,n){var s=t.xAxis,a=t.width,i=t.height,o=t.offset;return cz(SA(an(an(an({},mu.defaultProps),s),{},{ticks:Xa(s,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.left,o.left+o.width,n)},yCe=function(t,n){var s=t.yAxis,a=t.width,i=t.height,o=t.offset;return cz(SA(an(an(an({},mu.defaultProps),s),{},{ticks:Xa(s,!0),viewBox:{x:0,y:0,width:a,height:i}})),o.top,o.top+o.height,n)},Fc={horizontal:!0,vertical:!0,stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function Fm(e){var t,n,s,a,i,o,l=jA(),c=wA(),u=ake(),m=an(an({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Fc.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Fc.fill,horizontal:(s=e.horizontal)!==null&&s!==void 0?s:Fc.horizontal,horizontalFill:(a=e.horizontalFill)!==null&&a!==void 0?a:Fc.horizontalFill,vertical:(i=e.vertical)!==null&&i!==void 0?i:Fc.vertical,verticalFill:(o=e.verticalFill)!==null&&o!==void 0?o:Fc.verticalFill,x:Te(e.x)?e.x:u.left,y:Te(e.y)?e.y:u.top,width:Te(e.width)?e.width:u.width,height:Te(e.height)?e.height:u.height}),f=m.x,p=m.y,b=m.width,v=m.height,g=m.syncWithTicks,y=m.horizontalValues,w=m.verticalValues,N=rke(),S=nke();if(!Te(b)||b<=0||!Te(v)||v<=0||!Te(f)||f!==+f||!Te(p)||p!==+p)return null;var A=m.verticalCoordinatesGenerator||gCe,k=m.horizontalCoordinatesGenerator||yCe,C=m.horizontalPoints,T=m.verticalPoints;if((!C||!C.length)&&at(k)){var P=y&&y.length,R=k({yAxis:S?an(an({},S),{},{ticks:P?y:S.ticks}):void 0,width:l,height:c,offset:u},P?!0:g);Vs(Array.isArray(R),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(Ul(R),"]")),Array.isArray(R)&&(C=R)}if((!T||!T.length)&&at(A)){var M=w&&w.length,D=A({xAxis:N?an(an({},N),{},{ticks:M?w:N.ticks}):void 0,width:l,height:c,offset:u},M?!0:g);Vs(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(Ul(D),"]")),Array.isArray(D)&&(T=D)}return X.createElement("g",{className:"recharts-cartesian-grid"},X.createElement(hCe,{fill:m.fill,fillOpacity:m.fillOpacity,x:m.x,y:m.y,width:m.width,height:m.height,ry:m.ry}),X.createElement(mCe,hl({},m,{offset:u,horizontalPoints:C,xAxis:N,yAxis:S})),X.createElement(fCe,hl({},m,{offset:u,verticalPoints:T,xAxis:N,yAxis:S})),X.createElement(pCe,hl({},m,{horizontalPoints:C})),X.createElement(xCe,hl({},m,{verticalPoints:T})))}Fm.displayName="CartesianGrid";function Wd(e){"@babel/helpers - typeof";return Wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wd(e)}function vCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bCe(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,u9(s.key),s)}}function jCe(e,t,n){return t&&bCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function wCe(e,t,n){return t=ay(t),NCe(e,c9()?Reflect.construct(t,n||[],ay(e).constructor):t.apply(e,n))}function NCe(e,t){if(t&&(Wd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return _Ce(e)}function _Ce(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function c9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(c9=function(){return!!e})()}function ay(e){return ay=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},ay(e)}function SCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z2(e,t)}function z2(e,t){return z2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},z2(e,t)}function d9(e,t,n){return t=u9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u9(e){var t=kCe(e,"string");return Wd(t)=="symbol"?t:t+""}function kCe(e,t){if(Wd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Wd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function W2(){return W2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},W2.apply(this,arguments)}function CCe(e){var t=e.xAxisId,n=jA(),s=wA(),a=Jz(t);return a==null?null:j.createElement(mu,W2({},a,{className:ct("recharts-".concat(a.axisType," ").concat(a.axisType),a.className),viewBox:{x:0,y:0,width:n,height:s},ticksGenerator:function(o){return Xa(o,!0)}}))}var zl=(function(e){function t(){return vCe(this,t),wCe(this,t,arguments)}return SCe(t,e),jCe(t,[{key:"render",value:function(){return j.createElement(CCe,this.props)}}])})(j.Component);d9(zl,"displayName","XAxis");d9(zl,"defaultProps",{allowDecimals:!0,hide:!1,orientation:"bottom",width:0,height:30,mirror:!1,xAxisId:0,tickCount:5,type:"category",padding:{left:0,right:0},allowDataOverflow:!1,scale:"auto",reversed:!1,allowDuplicatedCategory:!0});function Hd(e){"@babel/helpers - typeof";return Hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hd(e)}function ACe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TCe(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,f9(s.key),s)}}function ECe(e,t,n){return t&&TCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PCe(e,t,n){return t=iy(t),OCe(e,h9()?Reflect.construct(t,n||[],iy(e).constructor):t.apply(e,n))}function OCe(e,t){if(t&&(Hd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return MCe(e)}function MCe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(h9=function(){return!!e})()}function iy(e){return iy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},iy(e)}function RCe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&H2(e,t)}function H2(e,t){return H2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},H2(e,t)}function m9(e,t,n){return t=f9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f9(e){var t=ICe(e,"string");return Hd(t)=="symbol"?t:t+""}function ICe(e,t){if(Hd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Hd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function G2(){return G2=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},G2.apply(this,arguments)}var DCe=function(t){var n=t.yAxisId,s=jA(),a=wA(),i=Qz(n);return i==null?null:j.createElement(mu,G2({},i,{className:ct("recharts-".concat(i.axisType," ").concat(i.axisType),i.className),viewBox:{x:0,y:0,width:s,height:a},ticksGenerator:function(l){return Xa(l,!0)}}))},Wl=(function(e){function t(){return ACe(this,t),PCe(this,t,arguments)}return RCe(t,e),ECe(t,[{key:"render",value:function(){return j.createElement(DCe,this.props)}}])})(j.Component);m9(Wl,"displayName","YAxis");m9(Wl,"defaultProps",{allowDuplicatedCategory:!0,allowDecimals:!0,hide:!1,orientation:"left",width:60,height:0,mirror:!1,yAxisId:0,tickCount:5,type:"number",padding:{top:0,bottom:0},allowDataOverflow:!1,scale:"auto",reversed:!1});function fL(e){return BCe(e)||FCe(e)||$Ce(e)||LCe()}function LCe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 896In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $Ce(e,t){if(e){if(typeof e=="string")return K2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return K2(e,t)}}function FCe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function BCe(e){if(Array.isArray(e))return K2(e)}function K2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}var Y2=function(t,n,s,a,i){var o=vs(t,_A),l=vs(t,Sv),c=[].concat(fL(o),fL(l)),u=vs(t,Cv),m="".concat(a,"Id"),f=a[0],p=n;if(c.length&&(p=c.reduce(function(g,y){if(y.props[m]===s&&xa(y.props,"extendDomain")&&Te(y.props[f])){var w=y.props[f];return[Math.min(g[0],w),Math.max(g[1],w)]}return g},p)),u.length){var b="".concat(f,"1"),v="".concat(f,"2");p=u.reduce(function(g,y){if(y.props[m]===s&&xa(y.props,"extendDomain")&&Te(y.props[b])&&Te(y.props[v])){var w=y.props[b],N=y.props[v];return[Math.min(g[0],w,N),Math.max(g[1],w,N)]}return g},p)}return i&&i.length&&(p=i.reduce(function(g,y){return Te(y)?[Math.min(g[0],y),Math.max(g[1],y)]:g},p)),p},x_={exports:{}},pL;function qCe(){return pL||(pL=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(n=!1));function a(c,u,m){this.fn=c,this.context=u,this.once=m||!1}function i(c,u,m,f,p){if(typeof m!="function")throw new TypeError("The listener must be a function");var b=new a(m,f||c,p),v=n?n+u:u;return c._events[v]?c._events[v].fn?c._events[v]=[c._events[v],b]:c._events[v].push(b):(c._events[v]=b,c._eventsCount++),c}function o(c,u){--c._eventsCount===0?c._events=new s:delete c._events[u]}function l(){this._events=new s,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],m,f;if(this._eventsCount===0)return u;for(f in m=this._events)t.call(m,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(m)):u},l.prototype.listeners=function(u){var m=n?n+u:u,f=this._events[m];if(!f)return[];if(f.fn)return[f.fn];for(var p=0,b=f.length,v=new Array(b);p<b;p++)v[p]=f[p].fn;return v},l.prototype.listenerCount=function(u){var m=n?n+u:u,f=this._events[m];return f?f.fn?1:f.length:0},l.prototype.emit=function(u,m,f,p,b,v){var g=n?n+u:u;if(!this._events[g])return!1;var y=this._events[g],w=arguments.length,N,S;if(y.fn){switch(y.once&&this.removeListener(u,y.fn,void 0,!0),w){case 1:return y.fn.call(y.context),!0;case 2:return y.fn.call(y.context,m),!0;case 3:return y.fn.call(y.context,m,f),!0;case 4:return y.fn.call(y.context,m,f,p),!0;case 5:return y.fn.call(y.context,m,f,p,b),!0;case 6:return y.fn.call(y.context,m,f,p,b,v),!0}for(S=1,N=new Array(w-1);S<w;S++)N[S-1]=arguments[S];
vendor: 1,195 bytes, line 896
896y.fn.apply(y.context,N)}else{var A=y.length,k;for(S=0;S<A;S++)switch(y[S].once&&this.removeListener(u,y[S].fn,void 0,!0),w){case 1:y[S].fn.call(y[S].context);break;case 2:y[S].fn.call(y[S].context,m);break;case 3:y[S].fn.call(y[S].context,m,f);break;case 4:y[S].fn.call(y[S].context,m,f,p);break;default:if(!N)for(k=1,N=new Array(w-1);k<w;k++)N[k-1]=arguments[k];y[S].fn.apply(y[S].context,N)}}return!0},l.prototype.on=function(u,m,f){return i(this,u,m,f,!1)},l.prototype.once=function(u,m,f){return i(this,u,m,f,!0)},l.prototype.removeListener=function(u,m,f,p){var b=n?n+u:u;if(!this._events[b])return this;if(!m)return o(this,b),this;var v=this._events[b];if(v.fn)v.fn===m&&(!p||v.once)&&(!f||v.context===f)&&o(this,b);else{for(var g=0,y=[],w=v.length;g<w;g++)(v[g].fn!==m||p&&!v[g].once||f&&v[g].context!==f)&&y.push(v[g]);y.length?this._events[b]=y.length===1?y[0]:y:o(this,b)}return this},l.prototype.removeAllListeners=function(u){var m;return u?(m=n?n+u:u,this._events[m]&&o(this,m)):(this._events=new s,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=n,l.EventEmitter=l,e.exports=l})(x_)),x_.exports}var VCe=qCe();
vendor: 37,249 bytes, lines 896-898
896const UCe=Et(VCe);var g_=new UCe,y_="recharts.syncMouseEvents";function Bm(e){"@babel/helpers - typeof";return Bm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bm(e)}function zCe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function WCe(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,p9(s.key),s)}}function HCe(e,t,n){return t&&WCe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function v_(e,t,n){return t=p9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p9(e){var t=GCe(e,"string");return Bm(t)=="symbol"?t:t+""}function GCe(e,t){if(Bm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Bm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var KCe=(function(){function e(){zCe(this,e),v_(this,"activeIndex",0),v_(this,"coordinateList",[]),v_(this,"layout","horizontal")}return HCe(e,[{key:"setDetails",value:function(n){var s,a=n.coordinateList,i=a===void 0?null:a,o=n.container,l=o===void 0?null:o,c=n.layout,u=c===void 0?null:c,m=n.offset,f=m===void 0?null:m,p=n.mouseHandlerCallback,b=p===void 0?null:p;this.coordinateList=(s=i??this.coordinateList)!==null&&s!==void 0?s:[],this.container=l??this.container,this.layout=u??this.layout,this.offset=f??this.offset,this.mouseHandlerCallback=b??this.mouseHandlerCallback,this.activeIndex=Math.min(Math.max(this.activeIndex,0),this.coordinateList.length-1)}},{key:"focus",value:function(){this.spoofMouse()}},{key:"keyboardEvent",value:function(n){if(this.coordinateList.length!==0)switch(n.key){case"ArrowRight":{if(this.layout!=="horizontal")return;this.activeIndex=Math.min(this.activeIndex+1,this.coordinateList.length-1),this.spoofMouse();break}case"ArrowLeft":{if(this.layout!=="horizontal")return;this.activeIndex=Math.max(this.activeIndex-1,0),this.spoofMouse();break}}}},{key:"setIndex",value:function(n){this.activeIndex=n}},{key:"spoofMouse",value:function(){var n,s;if(this.layout==="horizontal"&&this.coordinateList.length!==0){var a=this.container.getBoundingClientRect(),i=a.x,o=a.y,l=a.height,c=this.coordinateList[this.activeIndex].coordinate,u=((n=window)===null||n===void 0?void 0:n.scrollX)||0,m=((s=window)===null||s===void 0?void 0:s.scrollY)||0,f=i+c+u,p=o+this.offset.top+l/2+m;this.mouseHandlerCallback({pageX:f,pageY:p})}}}])})();function YCe(e,t,n){if(n==="number"&&t===!0&&Array.isArray(e)){var s=e==null?void 0:e[0],a=e==null?void 0:e[1];if(s&&a&&Te(s)&&Te(a))return!0}return!1}function XCe(e,t,n,s){var a=s/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-a:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-a,width:e==="horizontal"?s:n.width-1,height:e==="horizontal"?n.height-1:s}}function x9(e){var t=e.cx,n=e.cy,s=e.radius,a=e.startAngle,i=e.endAngle,o=Gt(t,n,s,a),l=Gt(t,n,s,i);return{points:[o,l],cx:t,cy:n,radius:s,startAngle:a,endAngle:i}}function JCe(e,t,n){var s,a,i,o;if(e==="horizontal")s=t.x,i=s,a=n.top,o=n.top+n.height;else if(e==="vertical")a=t.y,o=a,s=n.left,i=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var l=t.cx,c=t.cy,u=t.innerRadius,m=t.outerRadius,f=t.angle,p=Gt(l,c,u,f),b=Gt(l,c,m,f);s=p.x,a=p.y,i=b.x,o=b.y}else return x9(t);return[{x:s,y:a},{x:i,y:o}]}function qm(e){"@babel/helpers - typeof";return qm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qm(e)}function xL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function cx(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xL(Object(n),!0).forEach(function(s){QCe(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xL(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function QCe(e,t,n){return t=ZCe(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZCe(e){var t=eAe(e,"string");return qm(t)=="symbol"?t:t+""}function eAe(e,t){if(qm(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(qm(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tAe(e){var t,n,s=e.element,a=e.tooltipEventType,i=e.isActive,o=e.activeCoordinate,l=e.activePayload,c=e.offset,u=e.activeTooltipIndex,m=e.tooltipAxisBandSize,f=e.layout,p=e.chartName,b=(t=s.props.cursor)!==null&&t!==void 0?t:(n=s.type.defaultProps)===null||n===void 0?void 0:n.cursor;if(!s||!b||!i||!o||p!=="ScatterChart"&&a!=="axis")return null;var v,g=y2;if(p==="ScatterChart")v=o,g=D_e;else if(p==="BarChart")v=XCe(f,o,c,m),g=xA;else if(f==="radial"){var y=x9(o),w=y.cx,N=y.cy,S=y.radius,A=y.startAngle,k=y.endAngle;v={cx:w,cy:N,startAngle:A,endAngle:k,innerRadius:S,outerRadius:S},g=bz}else v={points:JCe(f,o,c)},g=y2;var C=cx(cx(cx(cx({stroke:"#ccc",pointerEvents:"none"},c),v),nt(b,!1)),{},{payload:l,payloadIndex:u,className:ct("recharts-tooltip-cursor",b.className)});return j.isValidElement(b)?j.cloneElement(b,C):j.createElement(g,C)}var rAe=["item"],nAe=["children","className","width","height","style","compact","title","desc"];function Gd(e){"@babel/helpers - typeof";return Gd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gd(e)}function Jc(){return Jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Jc.apply(this,arguments)}function gL(e,t){return iAe(e)||aAe(e,t)||y9(e,t)||sAe()}function sAe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 897In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function aAe(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var s,a,i,o,l=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,t!==0)for(;!(c=(s=i.call(n)).done)&&(l.push(s.value),l.length!==t);c=!0);}catch(m){u=!0,a=m}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw a}}return l}}function iAe(e){if(Array.isArray(e))return e}function yL(e,t){if(e==null)return{};var n=oAe(e,t),s,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)s=i[a],!(t.indexOf(s)>=0)&&Object.prototype.propertyIsEnumerable.call(e,s)&&(n[s]=e[s])}return n}function oAe(e,t){if(e==null)return{};var n={};for(var s in e)if(Object.prototype.hasOwnProperty.call(e,s)){if(t.indexOf(s)>=0)continue;n[s]=e[s]}return n}function lAe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function cAe(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,v9(s.key),s)}}function dAe(e,t,n){return t&&cAe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function uAe(e,t,n){return t=oy(t),hAe(e,g9()?Reflect.construct(t,n||[],oy(e).constructor):t.apply(e,n))}function hAe(e,t){if(t&&(Gd(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return mAe(e)}function mAe(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g9(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(g9=function(){return!!e})()}function oy(e){return oy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},oy(e)}function fAe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X2(e,t)}function X2(e,t){return X2=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,a){return s.__proto__=a,s},X2(e,t)}function Kd(e){return gAe(e)||xAe(e)||y9(e)||pAe()}function pAe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. 898In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function y9(e,t){if(e){if(typeof e=="string")return J2(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return J2(e,t)}}function xAe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gAe(e){if(Array.isArray(e))return J2(e)}function J2(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,s=new Array(t);n<t;n++)s[n]=e[n];return s}function vL(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),n.push.apply(n,s)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?vL(Object(n),!0).forEach(function(s){et(e,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vL(Object(n)).forEach(function(s){Object.defineProperty(e,s,Object.getOwnPropertyDescriptor(n,s))})}return e}function et(e,t,n){return t=v9(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function v9(e){var t=yAe(e,"string");return Gd(t)=="symbol"?t:t+""}function yAe(e,t){if(Gd(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var s=n.call(e,t);if(Gd(s)!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var vAe={xAxis:["bottom","top"],yAxis:["left","right"]},bAe={width:"100%",height:"100%"},b9={x:0,y:0};function dx(e){return e}var jAe=function(t,n){return n==="horizontal"?t.x:n==="vertical"?t.y:n==="centric"?t.angle:t.radius},wAe=function(t,n,s,a){var i=n.find(function(m){return m&&m.index===s});if(i){if(t==="horizontal")return{x:i.coordinate,y:a.y};if(t==="vertical")return{x:a.x,y:i.coordinate};if(t==="centric"){var o=i.coordinate,l=a.radius;return me(me(me({},a),Gt(a.cx,a.cy,l,o)),{},{angle:o,radius:l})}var c=i.coordinate,u=a.angle;return me(me(me({},a),Gt(a.cx,a.cy,c,u)),{},{angle:u,radius:c})}return b9},Av=function(t,n){var s=n.graphicalItems,a=n.dataStartIndex,i=n.dataEndIndex,o=(s??[]).reduce(function(l,c){var u=c.props.data;return u&&u.length?[].concat(Kd(l),Kd(u)):l},[]);return o.length>0?o:t&&t.length&&Te(a)&&Te(i)?t.slice(a,i+1):[]};function j9(e){return e==="number"?[0,"auto"]:void 0}var Q2=function(t,n,s,a){var i=t.graphicalItems,o=t.tooltipAxis,l=Av(n,t);return s<0||!i||!i.length||s>=l.length?null:i.reduce(function(c,u){var m,f=(m=u.props.data)!==null&&m!==void 0?m:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=s&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var p;if(o.dataKey&&!o.allowDuplicatedCategory){var b=f===void 0?l:f;p=MS(b,o.dataKey,a)}else p=f&&f[s]||l[s];return p?[].concat(Kd(c),[fz(u,p)]):c},[])},bL=function(t,n,s,a){var i=a||{x:t.chartX,y:t.chartY},o=jAe(i,s),l=t.orderedTooltipTicks,c=t.tooltipAxis,u=t.tooltipTicks,m=nwe(o,l,u,c);if(m>=0&&u){var f=u[m]&&u[m].value,p=Q2(t,n,m,f),b=wAe(s,l,m,i);return{activeTooltipIndex:m,activeLabel:f,activePayload:p,activeCoordinate:b}}return null},NAe=function(t,n){var s=n.axes,a=n.graphicalItems,i=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,m=t.layout,f=t.children,p=t.stackOffset,b=lz(m,i);return s.reduce(function(v,g){var y,w=g.type.defaultProps!==void 0?me(me({},g.type.defaultProps),g.props):g.props,N=w.type,S=w.dataKey,A=w.allowDataOverflow,k=w.allowDuplicatedCategory,C=w.scale,T=w.ticks,P=w.includeHidden,R=w[o];if(v[R])return v;var M=Av(t.data,{graphicalItems:a.filter(function(z){var he,fe=o in z.props?z.props[o]:(he=z.type.defaultProps)===null||he===void 0?void 0:he[o];return fe===R}),dataStartIndex:c,dataEndIndex:u}),D=M.length,$,q,H;YCe(w.domain,A,N)&&($=m2(w.domain,null,A),b&&(N==="number"||C!=="auto")&&(H=Uh(M,S,"category")));var L=j9(N);if(!$||$.length===0){var F,Y=(F=w.domain)!==null&&F!==void 0?F:L;if(S){if($=Uh(M,S,N),N==="category"&&b){var U=Jfe($);k&&U?(q=$,$=Yg(0,D)):k||($=SI(Y,$,g).reduce(function(z,he){return z.indexOf(he)>=0?z:[].concat(Kd(z),[he])},[]))}else if(N==="category")k?$=$.filter(function(z){return z!==""&&!yt(z)}):$=SI(Y,$,g).reduce(function(z,he){return z.indexOf(he)>=0||he===""||yt(he)?z:[].concat(Kd(z),[he])},[]);else if(N==="number"){var re=lwe(M,a.filter(function(z){var he,fe,be=o in z.props?z.props[o]:(he=z.type.defaultProps)===null||he===void 0?void 0:he[o],xe="hide"in z.props?z.props.hide:(fe=z.type.defaultProps)===null||fe===void 0?void 0:fe.hide;return be===R&&(P||!xe)}),S,i,m);re&&($=re)}b&&(N==="number"||C!=="auto")&&(H=Uh(M,S,"category"))}else b?$=Yg(0,D):l&&l[R]&&l[R].hasStack&&N==="number"?$=p==="expand"?[0,1]:mz(l[R].stackGroups,c,u):$=oz(M,a.filter(function(z){var he=o in z.props?z.props[o]:z.type.defaultProps[o],fe="hide"in z.props?z.props.hide:z.type.defaultProps.hide;return he===R&&(P||!fe)}),N,m,!0);if(N==="number")$=Y2(f,$,R,i,T),Y&&($=m2(Y,$,A));else if(N==="category"&&Y){var G=Y,B=$.every(function(z){return G.indexOf(z)>=0});B&&($=G)}}return me(me({},v),{},et({},R,me(me({},w),{},{axisType:i,domain:$,categoricalDomain:H,duplicateDomain:q,originalDomain:(y=w.domain)!==null&&y!==void 0?y:L,isCategorical:b,layout:m})))},{})},_Ae=function(t,n){var s=n.graphicalItems,a=n.Axis,i=n.axisType,o=n.axisIdKey,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,m=t.layout,f=t.children,p=Av(t.data,{graphicalItems:s,dataStartIndex:c,dataEndIndex:u}),b=p.length,v=lz(m,i),g=-1;return s.reduce(function(y,w){var N=w.type.defaultProps!==void 0?me(me({},w.type.defaultProps),w.props):w.props,S=N[o],A=j9("number");if(!y[S]){g++;var k;return v?k=Yg(0,b):l&&l[S]&&l[S].hasStack?(k=mz(l[S].stackGroups,c,u),k=Y2(f,k,S,i)):(k=m2(A,oz(p,s.filter(function(C){var T,P,R=o in C.props?C.props[o]:(T=C.type.defaultProps)===null||T===void 0?void 0:T[o],M="hide"in C.props?C.props.hide:(P=C.type.defaultProps)===null||P===void 0?void 0:P.hide;return R===S&&!M}),"number",m),a.defaultProps.allowDataOverflow),k=Y2(f,k,S,i)),me(me({},y),{},et({},S,me(me({axisType:i},a.defaultProps),{},{hide:!0,orientation:Qn(vAe,"".concat(i,".").concat(g%2),null),domain:k,originalDomain:A,isCategorical:v,layout:m})))}return y},{})},SAe=function(t,n){var s=n.axisType,a=s===void 0?"xAxis":s,i=n.AxisComp,o=n.graphicalItems,l=n.stackGroups,c=n.dataStartIndex,u=n.dataEndIndex,m=t.children,f="".concat(a,"Id"),p=vs(m,i),b={};return p&&p.length?b=NAe(t,{axes:p,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u}):o&&o.length&&(b=_Ae(t,{Axis:i,graphicalItems:o,axisType:a,axisIdKey:f,stackGroups:l,dataStartIndex:c,dataEndIndex:u})),b},kAe=function(t){var n=Wi(t),s=Xa(n,!1,!0);return{tooltipTicks:s,orderedTooltipTicks:UC(s,function(a){return a.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Dg(n,s)}},jL=function(t){var n=t.children,s=t.defaultShowTooltip,a=Gn(n,Fd),i=0,o=0;return t.data&&t.data.length!==0&&(o=t.data.length-1),a&&a.props&&(a.props.startIndex>=0&&(i=a.props.startIndex),a.props.endIndex>=0&&(o=a.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:i,dataEndIndex:o,activeTooltipIndex:-1,isTooltipActive:!!s}},CAe=function(t){return!t||!t.length?!1:t.some(function(n){var s=ti(n&&n.type);return s&&s.indexOf("Bar")>=0})},wL=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},AAe=function(t,n){var s=t.props,a=t.graphicalItems,i=t.xAxisMap,o=i===void 0?{}:i,l=t.yAxisMap,c=l===void 0?{}:l,u=s.width,m=s.height,f=s.children,p=s.margin||{},b=Gn(f,Fd),v=Gn(f,rd),g=Object.keys(c).reduce(function(k,C){var T=c[C],P=T.orientation;return!T.mirror&&!T.hide?me(me({},k),{},et({},P,k[P]+T.width)):k},{left:p.left||0,right:p.right||0}),y=Object.keys(o).reduce(function(k,C){var T=o[C],P=T.orientation;return!T.mirror&&!T.hide?me(me({},k),{},et({},P,Qn(k,"".concat(P))+T.height)):k},{top:p.top||0,bottom:p.bottom||0}),w=me(me({},y),g),N=w.bottom;b&&(w.bottom+=b.props.height||Fd.defaultProps.height),v&&n&&(w=iwe(w,a,s,n));var S=u-w.left-w.right,A=m-w.top-w.bottom;return me(me({brushBottom:N},w),{},{width:Math.max(S,0),height:Math.max(A,0)})},TAe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},w9=function(t){var n=t.chartName,s=t.GraphicalChild,a=t.defaultTooltipEventType,i=a===void 0?"axis":a,o=t.validateTooltipEventTypes,l=o===void 0?["axis"]:o,c=t.axisComponents,u=t.legendContent,m=t.formatAxisMap,f=t.defaultProps,p=function(w,N){var S=N.graphicalItems,A=N.stackGroups,k=N.offset,C=N.updateId,T=N.dataStartIndex,P=N.dataEndIndex,R=w.barSize,M=w.layout,D=w.barGap,$=w.barCategoryGap,q=w.maxBarSize,H=wL(M),L=H.numericAxisName,F=H.cateAxisName,Y=CAe(S),U=[];return S.forEach(function(re,G){var B=Av(w.data,{graphicalItems:[re],dataStartIndex:T,dataEndIndex:P}),z=re.type.defaultProps!==void 0?me(me({},re.type.defaultProps),re.props):re.props,he=z.dataKey,fe=z.maxBarSize,be=z["".concat(L,"Id")],xe=z["".concat(F,"Id")],pe={},Ae=c.reduce(function(ot,We){var Nt=N["".concat(We.axisType,"Map")],mr=z["".concat(We.axisType,"Id")];Nt&&Nt[mr]||We.axisType==="zAxis"||Vl();var wn=Nt[mr];return me(me({},ot),{},et(et({},We.axisType,wn),"".concat(We.axisType,"Ticks"),Xa(wn)))},pe),ie=Ae[F],Ne=Ae["".concat(F,"Ticks")],Se=A&&A[be]&&A[be].hasStack&&gwe(re,A[be].stackGroups),te=ti(re.type).indexOf("Bar")>=0,Oe=Dg(ie,Ne),ye=[],Ee=Y&&swe({barSize:R,stackGroups:A,totalSize:TAe(Ae,F)});if(te){var ke,ze,xt=yt(fe)?q:fe,Ze=(ke=(ze=Dg(ie,Ne,!0))!==null&&ze!==void 0?ze:xt)!==null&&ke!==void 0?ke:0;ye=awe({barGap:D,barCategoryGap:$,bandSize:Ze!==Oe?Ze:Oe,sizeList:Ee[xe],maxBarSize:xt}),Ze!==Oe&&(ye=ye.map(function(ot){return me(me({},ot),{},{position:me(me({},ot.position),{},{offset:ot.position.offset-Ze/2})})}))}var it=re&&re.type&&re.type.getComposedData;it&&U.push({props:me(me({},it(me(me({},Ae),{},{displayedData:B,props:w,dataKey:he,item:re,bandSize:Oe,barPosition:ye,offset:k,stackedData:Se,layout:M,dataStartIndex:T,dataEndIndex:P}))),{},et(et(et({key:re.key||"item-".concat(G)},L,Ae[L]),F,Ae[F]),"animationId",C)),childIndex:cpe(re,w.children),item:re})}),U},b=function(w,N){var S=w.props,A=w.dataStartIndex,k=w.dataEndIndex,C=w.updateId;if(!B5({props:S}))return null;var T=S.children,P=S.layout,R=S.stackOffset,M=S.data,D=S.reverseStackOrder,$=wL(P),q=$.numericAxisName,H=$.cateAxisName,L=vs(T,s),F=pwe(M,L,"".concat(q,"Id"),"".concat(H,"Id"),R,D),Y=c.reduce(function(z,he){var fe="".concat(he.axisType,"Map");return me(me({},z),{},et({},fe,SAe(S,me(me({},he),{},{graphicalItems:L,stackGroups:he.axisType===q&&F,dataStartIndex:A,dataEndIndex:k}))))},{}),U=AAe(me(me({},Y),{},{props:S,graphicalItems:L}),N==null?void 0:N.legendBBox);Object.keys(Y).forEach(function(z){Y[z]=m(S,Y[z],U,z.replace("Map",""),n)});var re=Y["".concat(H,"Map")],G=kAe(re),B=p(S,me(me({},Y),{},{dataStartIndex:A,dataEndIndex:k,updateId:C,graphicalItems:L,stackGroups:F,offset:U}));return me(me({formattedGraphicalItems:B,graphicalItems:L,offset:U,stackGroups:F},G),Y)},v=(function(y){function w(N){var S,A,k;return lAe(this,w),k=uAe(this,w,[N]),et(k,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),et(k,"accessibilityManager",new KCe),et(k,"handleLegendBBoxUpdate",function(C){if(C){var T=k.state,P=T.dataStartIndex,R=T.dataEndIndex,M=T.updateId;k.setState(me({legendBBox:C},b({props:k.props,dataStartIndex:P,dataEndIndex:R,updateId:M},me(me({},k.state),{},{legendBBox:C}))))}}),et(k,"handleReceiveSyncEvent",function(C,T,P){if(k.props.syncId===C){if(P===k.eventEmitterSymbol&&typeof k.props.syncMethod!="function")return;k.applySyncEvent(T)}}),et(k,"handleBrushChange",function(C){var T=C.startIndex,P=C.endIndex;if(T!==k.state.dataStartIndex||P!==k.state.dataEndIndex){var R=k.state.updateId;k.setState(function(){return me({dataStartIndex:T,dataEndIndex:P},b({props:k.props,dataStartIndex:T,dataEndIndex:P,updateId:R},k.state))}),k.triggerSyncEvent({dataStartIndex:T,dataEndIndex:P})}}),et(k,"handleMouseEnter",function(C){var T=k.getMouseInfo(C);if(T){var P=me(me({},T),{},{isTooltipActive:!0});k.setState(P),k.triggerSyncEvent(P);var R=k.props.onMouseEnter;at(R)&&R(P,C)}}),et(k,"triggeredAfterMouseMove",function(C){var T=k.getMouseInfo(C),P=T?me(me({},T),{},{isTooltipActive:!0}):{isTooltipActive:!1};k.setState(P),k.triggerSyncEvent(P);var R=k.props.onMouseMove;at(R)&&R(P,C)}),et(k,"handleItemMouseEnter",function(C){k.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),et(k,"handleItemMouseLeave",function(){k.setState(function(){return{isTooltipActive:!1}})}),et(k,"handleMouseMove",function(C){C.persist(),k.throttleTriggeredAfterMouseMove(C)}),et(k,"handleMouseLeave",function(C){k.throttleTriggeredAfterMouseMove.cancel();var T={isTooltipActive:!1};k.setState(T),k.triggerSyncEvent(T);var P=k.props.onMouseLeave;at(P)&&P(T,C)}),et(k,"handleOuterEvent",function(C){var T=lpe(C),P=Qn(k.props,"".concat(T));if(T&&at(P)){var R,M;/.*touch.*/i.test(T)?M=k.getMouseInfo(C.changedTouches[0]):M=k.getMouseInfo(C),P((R=M)!==null&&R!==void 0?R:{},C)}}),et(k,"handleClick",function(C){var T=k.getMouseInfo(C);if(T){var P=me(me({},T),{},{isTooltipActive:!0});k.setState(P),k.triggerSyncEvent(P);var R=k.props.onClick;at(R)&&R(P,C)}}),et(k,"handleMouseDown",function(C){var T=k.props.onMouseDown;if(at(T)){var P=k.getMouseInfo(C);T(P,C)}}),et(k,"handleMouseUp",function(C){var T=k.props.onMouseUp;if(at(T)){var P=k.getMouseInfo(C);T(P,C)}}),et(k,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&k.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),et(k,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&k.handleMouseDown(C.changedTouches[0])}),et(k,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&k.handleMouseUp(C.changedTouches[0])}),et(k,"handleDoubleClick",function(C){var T=k.props.onDoubleClick;if(at(T)){var P=k.getMouseInfo(C);T(P,C)}}),et(k,"handleContextMenu",function(C){var T=k.props.onContextMenu;if(at(T)){var P=k.getMouseInfo(C);T(P,C)}}),et(k,"triggerSyncEvent",function(C){k.props.syncId!==void 0&&g_.emit(y_,k.props.syncId,C,k.eventEmitterSymbol)}),et(k,"applySyncEvent",function(C){var T=k.props,P=T.layout,R=T.syncMethod,M=k.state.updateId,D=C.dataStartIndex,$=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)k.setState(me({dataStartIndex:D,dataEndIndex:$},b({props:k.props,dataStartIndex:D,dataEndIndex:$,updateId:M},k.state)));else if(C.activeTooltipIndex!==void 0){var q=C.chartX,H=C.chartY,L=C.activeTooltipIndex,F=k.state,Y=F.offset,U=F.tooltipTicks;if(!Y)return;if(typeof R=="function")L=R(U,C);else if(R==="value"){L=-1;for(var re=0;re<U.length;re++)if(U[re].value===C.activeLabel){L=re;break}}var G=me(me({},Y),{},{x:Y.left,y:Y.top}),B=Math.min(q,G.x+G.width),z=Math.min(H,G.y+G.height),he=U[L]&&U[L].value,fe=Q2(k.state,k.props.data,L),be=U[L]?{x:P==="horizontal"?U[L].coordinate:B,y:P==="horizontal"?z:U[L].coordinate}:b9;k.setState(me(me({},C),{},{activeLabel:he,activeCoordinate:be,activePayload:fe,activeTooltipIndex:L}))}else k.setState(C)}),et(k,"renderCursor",function(C){var T,P=k.state,R=P.isTooltipActive,M=P.activeCoordinate,D=P.activePayload,$=P.offset,q=P.activeTooltipIndex,H=P.tooltipAxisBandSize,L=k.getTooltipEventType(),F=(T=C.props.active)!==null&&T!==void 0?T:R,Y=k.props.layout,U=C.key||"_recharts-cursor";return X.createElement(tAe,{key:U,activeCoordinate:M,activePayload:D,activeTooltipIndex:q,chartName:n,element:C,isActive:F,layout:Y,offset:$,tooltipAxisBandSize:H,tooltipEventType:L})}),et(k,"renderPolarAxis",function(C,T,P){var R=Qn(C,"type.axisType"),M=Qn(k.state,"".concat(R,"Map")),D=C.type.defaultProps,$=D!==void 0?me(me({},D),C.props):C.props,q=M&&M[$["".concat(R,"Id")]];return j.cloneElement(C,me(me({},q),{},{className:ct(R,q.className),key:C.key||"".concat(T,"-").concat(P),ticks:Xa(q,!0)}))}),et(k,"renderPolarGrid",function(C){var T=C.props,P=T.radialLines,R=T.polarAngles,M=T.polarRadius,D=k.state,$=D.radiusAxisMap,q=D.angleAxisMap,H=Wi($),L=Wi(q),F=L.cx,Y=L.cy,U=L.innerRadius,re=L.outerRadius;return j.cloneElement(C,{polarAngles:Array.isArray(R)?R:Xa(L,!0).map(function(G){return G.coordinate}),polarRadius:Array.isArray(M)?M:Xa(H,!0).map(function(G){return G.coordinate}),cx:F,cy:Y,innerRadius:U,outerRadius:re,key:C.key||"polar-grid",radialLines:P})}),et(k,"renderLegend",function(){var C=k.state.formattedGraphicalItems,T=k.props,P=T.children,R=T.width,M=T.height,D=k.props.margin||{},$=R-(D.left||0)-(D.right||0),q=az({children:P,formattedGraphicalItems:C,legendWidth:$,legendContent:u});if(!q)return null;var H=q.item,L=yL(q,rAe);return j.cloneElement(H,me(me({},L),{},{chartWidth:R,chartHeight:M,margin:D,onBBoxUpdate:k.handleLegendBBoxUpdate}))}),et(k,"renderTooltip",function(){var C,T=k.props,P=T.children,R=T.accessibilityLayer,M=Gn(P,xn);if(!M)return null;var D=k.state,$=D.isTooltipActive,q=D.activeCoordinate,H=D.activePayload,L=D.activeLabel,F=D.offset,Y=(C=M.props.active)!==null&&C!==void 0?C:$;return j.cloneElement(M,{viewBox:me(me({},F),{},{x:F.left,y:F.top}),active:Y,label:L,payload:Y?H:[],coordinate:q,accessibilityLayer:R})}),et(k,"renderBrush",function(C){var T=k.props,P=T.margin,R=T.data,M=k.state,D=M.offset,$=M.dataStartIndex,q=M.dataEndIndex,H=M.updateId;return j.cloneElement(C,{key:C.key||"_recharts-brush",onChange:ax(k.handleBrushChange,C.props.onChange),data:R,x:Te(C.props.x)?C.props.x:D.left,y:Te(C.props.y)?C.props.y:D.top+D.height+D.brushBottom-(P.bottom||0),width:Te(C.props.width)?C.props.width:D.width,startIndex:$,endIndex:q,updateId:"brush-".concat(H)})}),et(k,"renderReferenceElement",function(C,T,P){if(!C)return null;var R=k,M=R.clipPathId,D=k.state,$=D.xAxisMap,q=D.yAxisMap,H=D.offset,L=C.type.defaultProps||{},F=C.props,Y=F.xAxisId,U=Y===void 0?L.xAxisId:Y,re=F.yAxisId,G=re===void 0?L.yAxisId:re;return j.cloneElement(C,{key:C.key||"".concat(T,"-").concat(P),xAxis:$[U],yAxis:q[G],viewBox:{x:H.left,y:H.top,width:H.width,height:H.height},clipPathId:M})}),et(k,"renderActivePoints",function(C){var T=C.item,P=C.activePoint,R=C.basePoint,M=C.childIndex,D=C.isRange,$=[],q=T.props.key,H=T.item.type.defaultProps!==void 0?me(me({},T.item.type.defaultProps),T.item.props):T.item.props,L=H.activeDot,F=H.dataKey,Y=me(me({index:M,dataKey:F,cx:P.x,cy:P.y,r:4,fill:pA(T.item),strokeWidth:2,stroke:"#fff",payload:P.payload,value:P.value},nt(L,!1)),dg(L));return $.push(w.renderActiveDot(L,Y,"".concat(q,"-activePoint-").concat(M))),R?$.push(w.renderActiveDot(L,me(me({},Y),{},{cx:R.x,cy:R.y}),"".concat(q,"-basePoint-").concat(M))):D&&$.push(null),$}),et(k,"renderGraphicChild",function(C,T,P){var R=k.filterFormatItem(C,T,P);if(!R)return null;var M=k.getTooltipEventType(),D=k.state,$=D.isTooltipActive,q=D.tooltipAxis,H=D.activeTooltipIndex,L=D.activeLabel,F=k.props.children,Y=Gn(F,xn),U=R.props,re=U.points,G=U.isRange,B=U.baseLine,z=R.item.type.defaultProps!==void 0?me(me({},R.item.type.defaultProps),R.item.props):R.item.props,he=z.activeDot,fe=z.hide,be=z.activeBar,xe=z.activeShape,pe=!!(!fe&&$&&Y&&(he||be||xe)),Ae={};M!=="axis"&&Y&&Y.props.trigger==="click"?Ae={onClick:ax(k.handleItemMouseEnter,C.props.onClick)}:M!=="axis"&&(Ae={onMouseLeave:ax(k.handleItemMouseLeave,C.props.onMouseLeave),onMouseEnter:ax(k.handleItemMouseEnter,C.props.onMouseEnter)});var ie=j.cloneElement(C,me(me({},R.props),Ae));function Ne(We){return typeof q.dataKey=="function"?q.dataKey(We.payload):null}if(pe)if(H>=0){var Se,te;if(q.dataKey&&!q.allowDuplicatedCategory){var Oe=typeof q.dataKey=="function"?Ne:"payload.".concat(q.dataKey.toString());Se=MS(re,Oe,L),te=G&&B&&MS(B,Oe,L)}else Se=re==null?void 0:re[H],te=G&&B&&B[H];if(xe||be){var ye=C.props.activeIndex!==void 0?C.props.activeIndex:H;return[j.cloneElement(C,me(me(me({},R.props),Ae),{},{activeIndex:ye})),null,null]}if(!yt(Se))return[ie].concat(Kd(k.renderActivePoints({item:R,activePoint:Se,basePoint:te,childIndex:H,isRange:G})))}else{var Ee,ke=(Ee=k.getItemByXY(k.state.activeCoordinate))!==null&&Ee!==void 0?Ee:{graphicalItem:ie},ze=ke.graphicalItem,xt=ze.item,Ze=xt===void 0?C:xt,it=ze.childIndex,ot=me(me(me({},R.props),Ae),{},{activeIndex:it});return[j.cloneElement(Ze,ot),null,null]}return G?[ie,null,null]:[ie,null]}),et(k,"renderCustomized",function(C,T,P){return j.cloneElement(C,me(me({key:"recharts-customized-".concat(P)},k.props),k.state))}),et(k,"renderMap",{CartesianGrid:{handler:dx,once:!0},ReferenceArea:{handler:k.renderReferenceElement},ReferenceLine:{handler:dx},ReferenceDot:{handler:k.renderReferenceElement},XAxis:{handler:dx},YAxis:{handler:dx},Brush:{handler:k.renderBrush,once:!0},Bar:{handler:k.renderGraphicChild},Line:{handler:k.renderGraphicChild},Area:{handler:k.renderGraphicChild},Radar:{handler:k.renderGraphicChild},RadialBar:{handler:k.renderGraphicChild},Scatter:{handler:k.renderGraphicChild},Pie:{handler:k.renderGraphicChild},Funnel:{handler:k.renderGraphicChild},Tooltip:{handler:k.renderCursor,once:!0},PolarGrid:{handler:k.renderPolarGrid,once:!0},PolarAngleAxis:{handler:k.renderPolarAxis},PolarRadiusAxis:{handler:k.renderPolarAxis},Customized:{handler:k.renderCustomized}}),k.clipPathId="".concat((S=N.id)!==null&&S!==void 0?S:pf("recharts"),"-clip"),k.throttleTriggeredAfterMouseMove=aU(k.triggeredAfterMouseMove,(A=N.throttleDelay)!==null&&A!==void 0?A:1e3/60),k.state={},k}return fAe(w,y),dAe(w,[{key:"componentDidMount",value:function(){var S,A;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(A=this.props.margin.top)!==null&&A!==void 0?A:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,A=S.children,k=S.data,C=S.height,T=S.layout,P=Gn(A,xn);if(P){var R=P.props.defaultIndex;if(!(typeof R!="number"||R<0||R>this.state.tooltipTicks.length-1)){var M=this.state.tooltipTicks[R]&&this.state.tooltipTicks[R].value,D=Q2(this.state,k,R,M),$=this.state.tooltipTicks[R].coordinate,q=(this.state.offset.top+C)/2,H=T==="horizontal",L=H?{x:$,y:q}:{y:$,x:q},F=this.state.formattedGraphicalItems.find(function(U){var re=U.item;return re.type.name==="Scatter"});F&&(L=me(me({},L),F.props.points[R].tooltipPosition),D=F.props.points[R].tooltipPayload);var Y={activeTooltipIndex:R,isTooltipActive:!0,activeLabel:M,activePayload:D,activeCoordinate:L};this.setState(Y),this.renderCursor(P),this.accessibilityManager.setIndex(R)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,A){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==A.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var k,C;this.accessibilityManager.setDetails({offset:{left:(k=this.props.margin.left)!==null&&k!==void 0?k:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){IS([Gn(S.children,xn)],[Gn(this.props.children,xn)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=Gn(this.props.children,xn);if(S&&typeof S.props.shared=="boolean"){var A=S.props.shared?"axis":"item";return l.indexOf(A)>=0?A:i}return i}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var A=this.container,k=A.getBoundingClientRect(),C=Yye(k),T={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},P=k.width/A.offsetWidth||1,R=this.inRange(T.chartX,T.chartY,P);if(!R)return null;var M=this.state,D=M.xAxisMap,$=M.yAxisMap,q=this.getTooltipEventType(),H=bL(this.state,this.props.data,this.props.layout,R);if(q!=="axis"&&D&&$){var L=Wi(D).scale,F=Wi($).scale,Y=L&&L.invert?L.invert(T.chartX):null,U=F&&F.invert?F.invert(T.chartY):null;return me(me({},T),{},{xValue:Y,yValue:U},H)}return H?me(me({},T),H):null}},{key:"inRange",value:function(S,A){var k=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,T=S/k,P=A/k;if(C==="horizontal"||C==="vertical"){var R=this.state.offset,M=T>=R.left&&T<=R.left+R.width&&P>=R.top&&P<=R.top+R.height;return M?{x:T,y:P}:null}var D=this.state,$=D.angleAxisMap,q=D.radiusAxisMap;if($&&q){var H=Wi($);return AI({x:T,y:P},H)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,A=this.getTooltipEventType(),k=Gn(S,xn),C={};k&&A==="axis"&&(k.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var T=dg(this.props,this.handleOuterEvent);return me(me({},T),C)}},{key:"addListener",value:function(){g_.on(y_,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){g_.removeListener(y_,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,A,k){for(var C=this.state.formattedGraphicalItems,T=0,P=C.length;T<P;T++){var R=C[T];if(R.item===S||R.props.key===S.key||A===ti(R.item.type)&&k===R.childIndex)return R}return null}},{key:"renderClipPath",value:function(){var S=this.clipPathId,A=this.state.offset,k=A.left,C=A.top,T=A.height,P=A.width;return X.createElement("defs",null,X.createElement("clipPath",{id:S},X.createElement("rect",{x:k,y:C,height:T,width:P})))}},{key:"getXScales",value:function(){var S=this.state.xAxisMap;return S?Object.entries(S).reduce(function(A,k){var C=gL(k,2),T=C[0],P=C[1];return me(me({},A),{},et({},T,P.scale))},{}):null}},{key:"getYScales",value:function(){var S=this.state.yAxisMap;return S?Object.entries(S).reduce(function(A,k){var C=gL(k,2),T=C[0],P=C[1];return me(me({},A),{},et({},T,P.scale))},{}):null}},{key:"getXScaleByAxisId",value:function(S){var A;return(A=this.state.xAxisMap)===null||A===void 0||(A=A[S])===null||A===void 0?void 0:A.scale}},{key:"getYScaleByAxisId",value:function(S){var A;return(A=this.state.yAxisMap)===null||A===void 0||(A=A[S])===null||A===void 0?void 0:A.scale}},{key:"getItemByXY",value:function(S){var A=this.state,k=A.formattedGraphicalItems,C=A.activeItem;if(k&&k.length)for(var T=0,P=k.length;T<P;T++){var R=k[T],M=R.props,D=R.item,$=D.type.defaultProps!==void 0?me(me({},D.type.defaultProps),D.props):D.props,q=ti(D.type);if(q==="Bar"){var H=(M.data||[]).find(function(U){return x_e(S,U)});if(H)return{graphicalItem:R,payload:H}}else if(q==="RadialBar"){var L=(M.data||[]).find(function(U){return AI(S,U)});if(L)return{graphicalItem:R,payload:L}}else if(jv(R,C)||wv(R,C)||Rm(R,C)){var F=FSe({graphicalItem:R,activeTooltipItem:C,itemData:$.data}),Y=$.activeIndex===void 0?F:$.activeIndex;return{graphicalItem:me(me({},R),{},{childIndex:Y}),payload:Rm(R,C)?$.data[F]:R.props.data[F]}}}return null}},{key:"render",value:function(){var S=this;if(!B5(this))return null;var A=this.props,k=A.children,C=A.className,T=A.width,P=A.height,R=A.style,M=A.compact,D=A.title,$=A.desc,q=yL(A,nAe),H=nt(q,!1);if(M)return X.createElement(tL,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},X.createElement(LS,Jc({},H,{width:T,height:P,title:D,desc:$}),this.renderClipPath(),V5(k,this.renderMap)));if(this.props.accessibilityLayer){var L,F;H.tabIndex=(L=this.props.tabIndex)!==null&&L!==void 0?L:0,H.role=(F=this.props.role)!==null&&F!==void 0?F:"application",H.onKeyDown=function(U){S.accessibilityManager.keyboardEvent(U)},H.onFocus=function(){S.accessibilityManager.focus()}}var Y=this.parseEventsOfWrapper();return X.createElement(tL,{state:this.state,width:this.props.width,height:this.props.height,clipPathId:this.clipPathId},X.createElement("div",Jc({className:ct("recharts-wrapper",C),style:me({position:"relative",curs
898or:"default",width:T,height:P},R)},Y,{ref:function(re){S.container=re}}),X.createElement(LS,Jc({},H,{width:T,height:P,title:D,desc:$,style:bAe}),this.renderClipPath(),V5(k,this.renderMap)),this.renderLegend(),this.renderTooltip()))}}])})(j.Component);et(v,"displayName",n),et(v,"defaultProps",me({layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:{top:5,right:5,bottom:5,left:5},reverseStackOrder:!1,syncMethod:"index"},f)),et(v,"getDerivedStateFromProps",function(y,w){var N=y.dataKey,S=y.data,A=y.children,k=y.width,C=y.height,T=y.layout,P=y.stackOffset,R=y.margin,M=w.dataStartIndex,D=w.dataEndIndex;if(w.updateId===void 0){var $=jL(y);return me(me(me({},$),{},{updateId:0},b(me(me({props:y},$),{},{updateId:0}),w)),{},{prevDataKey:N,prevData:S,prevWidth:k,prevHeight:C,prevLayout:T,prevStackOffset:P,prevMargin:R,prevChildren:A})}if(N!==w.prevDataKey||S!==w.prevData||k!==w.prevWidth||C!==w.prevHeight||T!==w.prevLayout||P!==w.prevStackOffset||!td(R,w.prevMargin)){var q=jL(y),H={chartX:w.chartX,chartY:w.chartY,isTooltipActive:w.isTooltipActive},L=me(me({},bL(w,S,T)),{},{updateId:w.updateId+1}),F=me(me(me({},q),H),L);return me(me(me({},F),b(me({props:y},F),w)),{},{prevDataKey:N,prevData:S,prevWidth:k,prevHeight:C,prevLayout:T,prevStackOffset:P,prevMargin:R,prevChildren:A})}if(!IS(A,w.prevChildren)){var Y,U,re,G,B=Gn(A,Fd),z=B&&(Y=(U=B.props)===null||U===void 0?void 0:U.startIndex)!==null&&Y!==void 0?Y:M,he=B&&(re=(G=B.props)===null||G===void 0?void 0:G.endIndex)!==null&&re!==void 0?re:D,fe=z!==M||he!==D,be=!yt(S),xe=be&&!fe?w.updateId:w.updateId+1;return me(me({updateId:xe},b(me(me({props:y},w),{},{updateId:xe,dataStartIndex:z,dataEndIndex:he}),w)),{},{prevChildren:A,dataStartIndex:z,dataEndIndex:he})}return null}),et(v,"renderActiveDot",function(y,w,N){var S;return j.isValidElement(y)?S=j.cloneElement(y,w):at(y)?S=y(w):S=X.createElement(gA,w),X.createElement(Dt,{className:"recharts-active-dot",key:N},S)});var g=j.forwardRef(function(w,N){return X.createElement(v,Jc({},w,{ref:N}))});return g.displayName=v.displayName,g},ly=w9({chartName:"BarChart",GraphicalChild:Gs,defaultTooltipEventType:"axis",validateTooltipEventTypes:["axis","item"],axisComponents:[{axisType:"xAxis",AxisComp:zl},{axisType:"yAxis",AxisComp:Wl}],formatAxisMap:V2e}),N9=w9({chartName:"PieChart",GraphicalChild:Pa,validateTooltipEventTypes:["item"],defaultTooltipEventType:"item",legendContent:"children",axisComponents:[{axisType:"angleAxis",AxisComp:bv},{axisType:"radiusAxis",AxisComp:yv}],formatAxisMap:Cwe,defaultProps:{layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"}});const ph=e=>`£${Number(e||0).toLocaleString("en-GB")}`,Li=["#c9a96e","#1a1a1a","#6b7280","#d97706","#059669","#7c3aed"];function EAe(){var l,c,u,m;const[e,t]=j.useState(null),[n,s]=j.useState(!0),[a,i]=j.useState("30");j.useEffect(()=>{o()},[a]);const o=async()=>{s(!0);try{const[f,p,b,v,g,y]=await Promise.all([W.entities.AdvertisingCampaign.list("-created_date",500),W.entities.Invoice.list("-created_date",500),W.entities.Lead.list("-created_date",200),W.entities.Advertiser.list("-created_date",100),W.entities.AdvertisingPlacement.list("-created_date",100),W.entities.CampaignPerformance.list("-date",90)]),w=p.filter(L=>L.status==="paid"),N=p.filter(L=>["outstanding","overdue"].includes(L.status)),S=p.filter(L=>L.status==="overdue"),A=w.reduce((L,F)=>L+(F.total_amount||0),0),k=N.reduce((L,F)=>L+(F.total_amount||0),0),C={};w.forEach(L=>{var Y;const F=L.paid_date?L.paid_date.slice(0,7):(Y=L.issue_date)==null?void 0:Y.slice(0,7);F&&(C[F]=(C[F]||0)+(L.total_amount||0))});const T=Object.entries(C).sort().slice(-6).map(([L,F])=>({month:L.slice(5)+"/"+L.slice(2,4),revenue:F})),P={};w.forEach(L=>{const F=L.advertiser_name||L.advertiser_id||"Unknown";P[F]=(P[F]||0)+(L.total_amount||0)});const R=Object.entries(P).sort((L,F)=>F[1]-L[1]).slice(0,6).map(([L,F])=>({name:L,value:F})),M={};f.forEach(L=>{M[L.campaign_type||"display"]=(M[L.campaign_type||"display"]||0)+1});const D=Object.entries(M).map(([L,F])=>({name:L,value:F})),$=[{stage:"New Lead",count:b.filter(L=>L.status==="new_lead").length},{stage:"Contacted",count:b.filter(L=>L.status==="contacted").length},{stage:"Proposal",count:b.filter(L=>L.status==="proposal_sent").length},{stage:"Negotiation",count:b.filter(L=>L.status==="negotiation").length},{stage:"Won",count:b.filter(L=>L.status==="won").length}],q=f.filter(L=>L.status==="active"),H=q.sort((L,F)=>(F.revenue_generated||0)-(L.revenue_generated||0)).slice(0,5);t({totalRevenue:A,outstandingAmt:k,overdue:S.length,activeCampaigns:q.length,totalAdvert
898isers:v.filter(L=>L.status==="active").length,inventoryUtil:g.length?Math.round(g.filter(L=>L.status==="booked").length/g.length*100):0,revenueByMonth:T,topAdvertisers:R,campaignTypes:D,pipeline:$,topCampaigns:H,totalImpressions:y.reduce((L,F)=>L+(F.impressions||0),0),totalClicks:y.reduce((L,F)=>L+(F.clicks||0),0)})}catch(f){console.error(f)}finally{s(!1)}};return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(se,{to:"/revenue",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Revenue Centre"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Commercial Dashboard"})]})]}),r.jsxs(K,{variant:"outline",size:"sm",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",onClick:o,children:[r.jsx(ts,{className:"w-4 h-4 mr-2"})," Refresh"]})]})}),r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-8",children:n?r.jsx("div",{className:"grid grid-cols-4 gap-4 animate-pulse",children:[...Array(8)].map((f,p)=>r.jsx("div",{className:"h-24 bg-muted rounded-lg"},p))}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[{label:"Total Revenue",value:ph(e==null?void 0:e.totalRevenue),icon:Xr,color:"text-green-600"},{label:"Outstanding",value:ph(e==null?void 0:e.outstandingAmt),icon:$n,color:"text-amber-600"},{label:"Active Campaigns",value:e==null?void 0:e.activeCampaigns,icon:Ix,color:"text-blue-600"},{label:"Active Advertisers",value:e==null?void 0:e.totalAdvertisers,icon:vt,color:"text-purple-600"},{label:"Overdue Invoices",value:e==null?void 0:e.overdue,icon:$n,color:"text-red-600"},{label:"Inventory Used",value:`${e==null?void 0:e.inventoryUtil}%`,icon:Ix,color:"text-indigo-600"},{label:"Total Impressions",value:((e==null?void 0:e.totalImpressions)||0).toLocaleString(),icon:Xr,color:"text-cyan-600"},{label:"Total Clicks",value:((e==null?void 0:e.totalClicks)||0).toLocaleString(),icon:vt,color:"text-rose-600"}].map(({label:f,value:p,icon:b,color:v})=>r.jsx(oe,{children:r.jsx(ce,{className:"pt-5",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:f}),r.jsx("p",{className:`text-2xl font-bold ${v}`,children:p})]}),r.jsx(b,{className:`w-5 h-5 ${v} opacity-30`})]})})},f))}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6",children:[r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2",children:r.jsx(ht,{className:"text-sm",children:"Revenue by Month"})}),r.jsx(ce,{children:(l=e==null?void 0:e.revenueByMonth)!=null&&l.length?r.jsx(bg,{width:"100%",height:200,children:r.jsxs(ly,{data:e.revenueByMonth,children:[r.jsx(Fm,{strokeDasharray:"3 3",stroke:"#f0f0f0"}),r.jsx(zl,{dataKey:"month",tick:{fontSize:11}}),r.jsx(Wl,{tick:{fontSize:11},tickFormatter:f=>`£${(f/1e3).toFixed(0)}k`}),r.jsx(xn,{formatter:f=>ph(f)}),r.jsx(Gs,{dataKey:"revenue",fill:"hsl(var(--primary))",radius:[3,3,0,0]})]})}):r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No revenue data yet"})})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2",children:r.jsx(ht,{className:"text-sm",children:"Lead Pipeline"})}),r.jsx(ce,{children:r.jsx(bg,{width:"100%",height:200,children:r.jsxs(ly,{data:e==null?void 0:e.pipeline,layout:"vertical",children:[r.jsx(Fm,{strokeDasharray:"3 3",stroke:"#f0f0f0"}),r.jsx(zl,{type:"number",tick:{fontSize:11}}),r.jsx(Wl,{dataKey:"stage",type:"category",tick:{fontSize:11},width:80}),r.jsx(xn,{}),r.jsx(Gs,{dataKey:"count",fill:"hsl(var(--secondary))",radius:[0,3,3,0]})]})})})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2",children:r.jsx(ht,{className:"text-sm",children:"Revenue by Advertiser"})}),r.jsx(ce,{children:(c=e==null?void 0:e.topAdvertisers)!=null&&c.length?r.jsx("div",{className:"space-y-2",children:e.topAdvertisers.map((f,p)=>r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-4 h-4 rounded-sm flex-shrink-0",style:{backgroundColor:Li[p%Li.length]}}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex justify-between text-sm",children:[r.jsx("span",{className:"truncate font-medium",children:f.name}),r.jsx("span",{className:"text-green-700 font-semibold ml-2",children:ph(f.value)})]}),r.jsx("div",{className:"w-full bg-muted rounded h-1 mt-1",children:r.jsx("div",{className:"h-1 rounded",style:{backgroundColor:Li[p%Li.length],width:`${f.value/e.topAdvertisers[0].value*100}%`}})})]})]},f.name))}):r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No advertiser revenue yet"})})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2",children:r.jsx(ht,{className:"text-sm",children:"Campaign Types"})}),r.jsx(ce,{children:(u=e==null?void 0:e.campaignTypes)!=null&&u.length?r.jsxs("div",{className:"flex gap-4 items-center justify-center",children:[r.jsxs(N9,{width:140,height:140,children:[r.jsx(Pa,{data:e.campaignTypes,dataKey:"value",cx:65,cy:65,outerRadius:60,children:e.campaignTypes.map((f,p)=>r.jsx(gf,{fill:Li[p%Li.length]},p))}),r.jsx(xn,{})]}),r.jsx("div",{className:"space-y-1.5",children:e.campaignTypes.map((f,p)=>r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:Li[p%Li.length]}}),r.jsx("span",{className:"capitalize",children:f.name.replace(/_/g," ")}),r.jsx("span",{className:"text-muted-foreground ml-auto",children:f.value})]},f.name))})]}):r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No campaigns yet"})})]})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-3",children:r.jsx(ht,{className:"text-base",children:"Top Performing Campaigns"})}),r.jsx(ce,{children:(m=e==null?void 0:e.topCampaigns)!=null&&m.length?r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"text-muted-foreground text-xs border-b border-border",children:[r.jsx("th",{className:"text-left pb-2 font-medium",children:"Campaign"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Advertiser"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Type"}),r.jsx("th",{className:"text-right pb-2 font-medium",children:"Impressions"}),r.jsx("th",{className:"text-right pb-2 font-medium",children:"Clicks"}),r.jsx("th",{className:"text-right pb-2 font-medium",children:"Revenue"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Status"})]})}),r.jsx("tbody",{children:e.topCampaigns.map(f=>r.jsxs("tr",{className:"border-b border-border last:border-0",children:[r.jsx("td",{className:"py-2 font-medium",children:f.campaign_name}),r.jsx("td",{className:"py-2 text-muted-foreground",children:f.advertiser_name}),r.jsx("td",{className:"py-2",children:r.jsx(ge,{variant:"outline",className:"text-xs capitalize",children:(f.campaign_type||"").replace(/_/g," ")})}),r.jsx("td",{className:"py-2 text-right",children:(f.total_impressions||0).toLocaleStr
898ing()}),r.jsx("td",{className:"py-2 text-right",children:(f.total_clicks||0).toLocaleString()}),r.jsx("td",{className:"py-2 text-right font-semibold text-green-700",children:ph(f.revenue_generated)}),r.jsx("td",{className:"py-2",children:r.jsx(ge,{className:"text-xs bg-green-100 text-green-800",children:f.status})})]},f.id))})]})}):r.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:"No active campaigns yet"})})]})]})})]})}const b_=e=>`£${Number(e||0).toLocaleString("en-GB")}`,PAe={active:"bg-green-100 text-green-800",inactive:"bg-gray-100 text-gray-800",prospect:"bg-blue-100 text-blue-800",churned:"bg-red-100 text-red-800"},OAe={new_lead:"bg-blue-100 text-blue-800",contacted:"bg-yellow-100 text-yellow-800",proposal_sent:"bg-purple-100 text-purple-800",negotiation:"bg-orange-100 text-orange-800",won:"bg-green-100 text-green-800",lost:"bg-red-100 text-red-800"};function MAe({advertiser:e,onSave:t,onClose:n}){const[s,a]=j.useState(e||{company_name:"",contact_name:"",email:"",phone:"",website:"",industry:"",status:"prospect",tier:"bronze",notes:""}),[i,o]=j.useState(!1),l=(u,m)=>a(f=>({...f,[u]:m})),c=async()=>{o(!0),e!=null&&e.id?await W.entities.Advertiser.update(e.id,s):await W.entities.Advertiser.create(s),t()};return r.jsx(hr,{open:!0,onOpenChange:n,children:r.jsxs(or,{className:"max-w-lg",children:[r.jsx(kr,{children:r.jsx(Cr,{children:e!=null&&e.id?"Edit Advertiser":"New Advertiser"})}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Company Name *"}),r.jsx(de,{value:s.company_name,onChange:u=>l("company_name",u.target.value),placeholder:"Company name"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Contact Name"}),r.jsx(de,{value:s.contact_name,onChange:u=>l("contact_name",u.target.value),placeholder:"Full name"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Email"}),r.jsx(de,{value:s.email,onChange:u=>l("email",u.target.value),placeholder:"[email protected]"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Phone"}),r.jsx(de,{value:s.phone,onChange:u=>l("phone",u.target.value),placeholder:"+44..."})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Website"}),r.jsx(de,{value:s.website,onChange:u=>l("website",u.target.value),placeholder:"https://..."})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Industry"}),r.jsx(de,{value:s.industry,onChange:u=>l("industry",u.target.value),placeholder:"Luxury, Fashion..."})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Status"}),r.jsxs(Xe,{value:s.status,onValueChange:u=>l("status",u),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["prospect","active","inactive","churned"].map(u=>r.jsx(Pe,{value:u,children:u},u))})]})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Notes"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-20 resize-none bg-transparent",value:s.notes,onChange:u=>l("notes",u.target.value),placeholder:"Notes..."})]})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:n,children:"Cancel"}),r.jsx(K,{onClick:c,disabled:i||!s.company_name,children:i?"Saving...":"Save"})]})]})})}function RAe({lead:e,onSave:t,onClose:n}){const[s,a]=j.useState(e||{company_name:"",contact_name:"",email:"",phone:"",industry:"",estimated_budget:0,interest:"",status:"new_lead",source:"",campaign_notes:""}),[i,o]=j.useState(!1),l=(u,m)=>a(f=>({...f,[u]:m})),c=async()=>{o(!0),e!=null&&e.id?await W.entities.Lead.update(e.id,s):await W.entities.Lead.create(s),t()};return r.jsx(hr,{open:!0,onOpenChange:n,children:r.jsxs(or,{className:"max-w-lg",children:[r.jsx(kr,{children:r.jsx(Cr,{children:e!=null&&e.id?"Edit Lead":"New Lead"})}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Company *"}),r.jsx(de,{value:s.company_name,onChange:u=>l("company_name",u.target.value),placeholder:"Company name"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Contact Name"}),r.jsx(de,{value:s.contact_name,onChange:u=>l("contact_name",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Email"}),r.jsx(de,{value:s.email,onChange:u=>l("email",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Phone"}),r.jsx(de,{value:s.phone,onChange:u=>l("phone",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Budget (£)"}),r.jsx(de,{type:"number",value:s.estimated_budget,onChange:u=>l("estimated_budget",Number(u.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Industry"}),r.jsx(de,{value:s.industry,onChange:u=>l("industry",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Status"}),r.jsxs(Xe,{value:s.status,onValueChange:u=>l("status",u),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["new_lead","contacted","proposal_sent","negotiation","won","lost"].map(u=>r.jsx(Pe,{value:u,children:u.replace(/_/g," ")},u))})]})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Interest / Notes"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-20 resize-none bg-transparent",value:s.campaign_notes,onChange:u=>l("campaign_notes",u.target.value)})]})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:n,children:"Cancel"}),r.jsx(K,{onClick:c,disabled:i||!s.company_name,children:i?"Saving...":"Save"})]})]})})}function IAe(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState(!0),[o,l]=j.useState(""),[c,u]=j.useState("all"),[m,f]=j.useState(!1),[p,b]=j.useState(!1),[v,g]=j.useState(null),[y,w]=j.useState(null),[N,S]=j.useState("advertisers");j.useEffect(()=>{A()},[]);const A=async()=>{i(!0);const[P,R]=await Promise.all([W.entities.Advertiser.list("-created_date",200),W.entities.Lead.list("-created_date",200)]);t(P||[]),s(R||[]),i(!1)},k=e.filter(P=>{var R,M;return(c==="all"||P.status===c)&&(((R=P.company_name)==null?void 0:R.toLowerCase().includes(o.toLowerCase()))||((M=P.contact_name)==null?void 0:M.toLowerCase().includes(o.toLowerCase())))}),C=n.filter(P=>{var R,M;return(c==="all"||P.status===c)&&(((R=P.company_name)==null?void 0:R.toLowerCase().includes(o.toLowerCase()))||((M=P.contact_name)==null?void 0:M.toLowerCase().includes(o.toLowerCase())))}),T=["new_lead","contacted","proposal_sent","negotiation","won","lost"];return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/revenue",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Revenue Centre"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Advertisers & CRM"})]})]})}),r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-8",children:r.jsxs(Aa,{value:N,onValueChange:S,children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs(Ys,{children:[r.jsxs(ft,{value:"advertisers",children:["Advertisers (",e.length,")"]}),r.jsxs(ft,{value:"leads",children:["Lead Pipeline (",n.length,")"]})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("div",{className:"relative",children:[r.jsx(dn,{className:"absolute left-2.5 top-2 w-4 h-4 text-muted-foreground"}),r.jsx(de,{placeholder:"Search...",className:"pl-8 h-8 w-48",value:o,onChange:P=>l(P.target.value)})]}),r.jsxs(Xe,{value:c,onValueChange:u,children:[r.jsx(He,{className:"h-8 w-36",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Status"}),N==="advertisers"?["active","inactive","prospect","churned"].map(P=>r.jsx(Pe,{value:P,children:P},P)):T.map(P=>r.jsx(Pe,{value:P,children:P.replace(/_/g," ")},P))]})]}),N==="advertisers"?r.jsxs(K,{size:"sm",onClick:()=>{g(null),f(!0)},children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"Add Advertiser"]}):r.jsxs(K,{size:"sm",onClick:()=>{w(null),b(!0)},children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"Add Lead"]})]})]}),r.jsx(pt,{value:"advertisers",children:a?r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"grid gap-3",children:[k.map(P=>r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsx(ce,{className:"p-4",children:r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx("h3",{className:"font-semibold",children:P.company_name}),r.jsx(ge,{className:`text-xs ${PAe[P.status]}`,children:P.status}),r.jsx(ge,{variant:"outline",className:"text-xs capitalize",children:P.tier})]}),r.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-muted-foreground",children:[P.contact_name&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(vt,{className:"w-3 h-3"}),P.contact_name]}),P.email&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(es,{className:"w-3 h-3"}),P.email]}),P.phone&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Hl,{className:"w-3 h-3"}),P.phone]}),P.industry&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx($x,{className:"w-3 h-3"}),P.industry]})]})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[P.total_spend>0&&r.jsx("span",{className:"text-green-700 font-semibold text-sm",children:b_(P.total_spend)}),r.jsx(K,{variant:"outline",size:"sm",onClick:()=>{g(P),f(!0)},children:"Edit"})]})]})})},P.id)),k.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No advertisers found."})]})}),r.jsxs(pt,{value:"leads",children:[r.jsx("div",{className:"grid grid-cols-6 gap-2 mb-6",children:T.map(P=>{const R=n.filter(D=>D.status===P).length,M=n.filter(D=>D.status===P).reduce((D,$)=>D+($.estimated_budget||0),0);return r.jsx(oe,{className:"cursor-pointer hover:border-primary/40 transition-colors",onClick:()=>u(P===c?"all":P),children:r.jsxs(ce,{className:"p-3 text-center",children:[r.jsx("p",{className:"text-xs text-muted-foreground capitalize mb-1",children:P.replace(/_/g," ")}),r.jsx("p",{className:"text-xl font-bold",children:R}),M>0&&r.jsx("p",{className:"text-xs text-green-700 font-medium",children:b_(M)})]})},P)}
898)}),a?r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"grid gap-3",children:[C.map(P=>r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsx(ce,{className:"p-4",children:r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx("h3",{className:"font-semibold",children:P.company_name}),r.jsx(ge,{className:`text-xs ${OAe[P.status]}`,children:P.status.replace(/_/g," ")})]}),r.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-muted-foreground",children:[P.contact_name&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(vt,{className:"w-3 h-3"}),P.contact_name]}),P.email&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(es,{className:"w-3 h-3"}),P.email]}),P.industry&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx($x,{className:"w-3 h-3"}),P.industry]})]}),P.campaign_notes&&r.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-1",children:P.campaign_notes})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[P.estimated_budget>0&&r.jsx("span",{className:"text-green-700 font-semibold text-sm",children:b_(P.estimated_budget)}),r.jsx(K,{variant:"outline",size:"sm",onClick:()=>{w(P),b(!0)},children:"Edit"})]})]})})},P.id)),C.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No leads found."})]})]})]})}),m&&r.jsx(MAe,{advertiser:v,onSave:()=>{f(!1),A()},onClose:()=>f(!1)}),p&&r.jsx(RAe,{lead:y,onSave:()=>{b(!1),A()},onClose:()=>b(!1)})]})}const j_=e=>`£${Number(e||0).toLocaleString("en-GB")}`,DAe={draft:"bg-gray-100 text-gray-800",pending:"bg-yellow-100 text-yellow-800",active:"bg-green-100 text-green-800",paused:"bg-orange-100 text-orange-800",completed:"bg-blue-100 text-blue-800",cancelled:"bg-red-100 text-red-800"};function LAe({campaign:e,advertisers:t,onSave:n,onClose:s}){const[a,i]=j.useState(e||{advertiser_id:"",advertiser_name:"",campaign_name:"",campaign_type:"display",status:"draft",start_date:"",end_date:"",budget:0,rate_type:"fixed",rate_amount:0,notes:"",package_tier:""}),[o,l]=j.useState(!1),c=(m,f)=>i(p=>({...p,[m]:f})),u=async()=>{l(!0),e!=null&&e.id?await W.entities.AdvertisingCampaign.update(e.id,a):await W.entities.AdvertisingCampaign.create(a),n()};return r.jsx(hr,{open:!0,onOpenChange:s,children:r.jsxs(or,{className:"max-w-lg",children:[r.jsx(kr,{children:r.jsx(Cr,{children:e!=null&&e.id?"Edit Campaign":"New Campaign"})}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Advertiser"}),r.jsxs(Xe,{value:a.advertiser_id,onValueChange:m=>{const f=t.find(p=>p.id===m);c("advertiser_id",m),c("advertiser_name",(f==null?void 0:f.company_name)||"")},children:[r.jsx(He,{children:r.jsx(Je,{placeholder:"Select advertiser"})}),r.jsx(Ge,{children:t.map(m=>r.jsx(Pe,{value:m.id,children:m.company_name},m.id))})]})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Campaign Name *"}),r.jsx(de,{value:a.campaign_name,onChange:m=>c("campaign_name",m.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Type"}),r.jsxs(Xe,{value:a.campaign_type,onValueChange:m=>c("campaign_type",m),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["display","sponsored_content","newsletter","homepage_takeover","package"].map(m=>r.jsx(Pe,{value:m,children:m.replace(/_/g," ")},m))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Status"}),r.jsxs(Xe,{value:a.status,onValueChange:m=>c("status",m),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["draft","pending","active","paused","completed","cancelled"].map(m=>r.jsx(Pe,{value:m,children:m},m))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Start Date"}),r.jsx(de,{type:"date",value:a.start_date,onChange:m=>c("start_date",m.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"End Date"}),r.jsx(de,{type:"date",value:a.end_date,onChange:m=>c("end_date",m.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Rate Type"}),r.jsxs(Xe,{value:a.rate_type,onValueChange:m=>c("rate_type",m),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["cpm","fixed","monthly","campaign"].map(m=>r.jsx(Pe,{value:m,children:m.toUpperCase()},m))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Rate (£)"}),r.jsx(de,{type:"number",value:a.rate_amount,onChange:m=>c("rate_amount",Number(m.target.value))})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Budget (£)"}),r.jsx(de,{type:"number",value:a.budget,onChange:m=>c("budget",Number(m.target.value))})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Notes"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-16 resize-none bg-transparent",value:a.notes,onChange:m=>c("notes",m.target.value)})]})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:s,children:"Cancel"}),r.jsx(K,{onClick:u,disabled:o||!a.campaign_name,children:o?"Saving...":"Save"})]})]})})}function $Ae(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState(!0),[o,l]=j.useState(""),[c,u]=j.useState("all"),[m,f]=j.useState(!1),[p,b]=j.useState(null);j.useEffect(()=>
898{v()},[]);const v=async()=>{i(!0);const[w,N]=await Promise.all([W.entities.AdvertisingCampaign.list("-created_date",200),W.entities.Advertiser.list("-created_date",100)]);t(w||[]),s(N||[]),i(!1)},g=e.filter(w=>{var N,S;return(c==="all"||w.status===c)&&(((N=w.campaign_name)==null?void 0:N.toLowerCase().includes(o.toLowerCase()))||((S=w.advertiser_name)==null?void 0:S.toLowerCase().includes(o.toLowerCase())))}),y=e.filter(w=>w.status==="active").reduce((w,N)=>w+(N.revenue_generated||0),0);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/revenue",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Revenue Centre"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Campaigns"})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[r.jsx("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[{label:"Active",value:e.filter(w=>w.status==="active").length,color:"text-green-600"},{label:"Pending",value:e.filter(w=>w.status==="pending").length,color:"text-yellow-600"},{label:"Total Revenue",value:j_(y),color:"text-primary"},{label:"Total Campaigns",value:e.length,color:"text-foreground"}].map(w=>r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:w.label}),r.jsx("p",{className:`text-2xl font-bold ${w.color}`,children:w.value})]})},w.label))}),r.jsxs("div",{className:"flex items-center justify-between gap-3 mb-6",children:[r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("div",{className:"relative",children:[r.jsx(dn,{className:"absolute left-2.5 top-2 w-4 h-4 text-muted-foreground"}),r.jsx(de,{placeholder:"Search campaigns...",className:"pl-8 h-8 w-56",value:o,onChange:w=>l(w.target.value)})]}),r.jsxs(Xe,{value:c,onValueChange:u,children:[r.jsx(He,{className:"h-8 w-36",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Status"}),["draft","pending","active","paused","completed","cancelled"].map(w=>r.jsx(Pe,{value:w,children:w},w))]})]})]}),r.jsxs(K,{size:"sm",onClick:()=>{b(null),f(!0)},children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"New Campaign"]})]}),a?r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"space-y-3",children:[g.map(w=>r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsx(ce,{className:"p-4",children:r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx("h3",{className:"font-semibold",children:w.campaign_name}),r.jsx(ge,{className:`text-xs ${DAe[w.status]}`,children:w.status}),r.jsx(ge,{variant:"outline",className:"text-xs capitalize",children:(w.campaign_type||"").replace(/_/g," ")})]}),r.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:w.advertiser_name}),r.jsxs("div",{className:"flex flex-wrap gap-4 text-xs text-muted-foreground",children:[w.start_date&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Jt,{className:"w-3 h-3"}),w.start_date," â ",w.end_date]}),r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(ya,{className:"w-3 h-3"}),(w.total_impressions||0).toLocaleString()," impr."]}),r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(ya,{className:"w-3 h-3"}),(w.total_clicks||0).toLocaleString()," clicks"]}),r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx($n,{className:"w-3 h-3"}),"Budget: ",j_(w.budget)]})]})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:"text-green-700 font-semibold",children:j_(w.revenue_generated)}),r.jsx(K,{variant:"outline",size:"sm",onClick:()=>{b(w),f(!0)},children:"Edit"})]})]})})},w.id)),g.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No campaigns found."})]})]}),m&&r.jsx(LAe,{campaign:p,advertisers:n,onSave:()=>{f(!1),v()},onClose:()=>f(!1)})]})}const w_=e=>
898`£${Number(e||0).toLocaleString("en-GB")}`,FAe={available:"bg-green-100 text-green-800",booked:"bg-blue-100 text-blue-800",reserved:"bg-yellow-100 text-yellow-800",inactive:"bg-gray-100 text-gray-800"},BAe=[{placement_name:"Homepage Hero Banner",placement_type:"homepage_hero",dimensions:"1920Ã500px",price_monthly:2500},{placement_name:"Homepage Leaderboard",placement_type:"homepage_leaderboard",dimensions:"728Ã90px",price_monthly:1200},{placement_name:"Homepage Mid-Page Banner",placement_type:"homepage_mid",dimensions:"970Ã250px",price_monthly:900},{placement_name:"Homepage Sidebar Banner",placement_type:"homepage_sidebar",dimensions:"300Ã600px",price_monthly:800},{placement_name:"Category Page Banner",placement_type:"category_banner",dimensions:"728Ã90px",price_monthly:600},{placement_name:"Article Top Banner",placement_type:"article_top",dimensions:"728Ã90px",price_monthly:500},{placement_name:"Article Mid-Content Banner",placement_type:"article_mid",dimensions:"300Ã250px",price_monthly:450},{placement_name:"Article Footer Banner",placement_type:"article_footer",dimensions:"728Ã90px",price_monthly:350},{placement_name:"Newsletter Banner",placement_type:"newsletter_banner",dimensions:"600Ã150px",price_monthly:1500},{placement_name:"Magazine Archive Banner",placement_type:"magazine_archive",dimensions:"728Ã90px",price_monthly:400},{placement_name:"Community Banner",placement_type:"community_banner",dimensions:"300Ã250px",price_monthly:300},{placement_name:"Premium Member Banner",placement_type:"premium_member_banner",dimensions:"970Ã90px",price_monthly:700}];function qAe({placement:e,advertisers:t,campaigns:n,onSave:s,onClose:a}){const[i,o]=j.useState(e||{placement_name:"",placement_type:"article_top",dimensions:"",price_monthly:0,price_cpm:0,price_fixed:0,status:"available",advertiser_id:"",campaign_id:"",campaign_start_date:"",campaign_end_date:"",destination_url:"",notes:""}),[l,c]=j.useState(!1),u=(f,p)=>o(b=>({...b,[f]:p})),m=async()=>{c(!0),e!=null&&e.id?await W.entities.AdvertisingPlacement.update(e.id,i):await W.entities.AdvertisingPlacement.create(i),s()};return r.jsx(hr,{open:!0,onOpenChange:a,children:r.jsxs(or,{className:"max-w-lg",children:[r.jsx(kr,{children:r.jsx(Cr,{children:e!=null&&e.id?"Edit Placement":"New Placement"})}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Placement Name *"}),r.jsx(de,{value:i.placement_name,onChange:f=>u("placement_name",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Type"}),r.jsxs(Xe,{value:i.placement_type,onValueChange:f=>u("placement_type",f),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["homepage_hero","homepage_leaderboard","homepage_mid","homepage_sidebar","category_banner","article_top","article_mid","article_footer","newsletter_banner","magazine_archive","community_banner","premium_member_banner"].map(f=>r.jsx(Pe,{value:f,children:f.replace(/_/g," ")},f))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Dimensions"}),r.jsx(de,{value:i.dimensions,onChange:f=>u("dimensions",f.target.value),placeholder:"e.g. 728Ã90px"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Price/Month (£)"}),r.jsx(de,{type:"number",value:i.price_monthly,onChange:f=>u("price_monthly",Number(f.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"CPM (£)"}),r.jsx(de,{type:"number",value:i.price_cpm,onChange:f=>u("price_cpm",Number(f.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Status"}),r.jsxs(Xe,{value:i.status,onValueChange:f=>u("status",f),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["available","booked","reserved","inactive"].map(f=>r.jsx(Pe,{value:f,children:f},f))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Advertiser"}),r.jsxs(Xe,{value:i.advertiser_id,onValueChange:f=>u("advertiser_id",f),children:[r.jsx(He,{children:r.jsx(Je,{placeholder:"None"})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:null,children:"None"}),t.map(f=>r.jsx(Pe,{value:f.id,children:f.company_name},f.id))]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Campaign Start"}),r.jsx(de,{type:"date",value:i.campaign_start_date,onChange:f=>u("campaign_start_date",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Campaign End"}),r.jsx(de,{type:"date",value:i.campaign_end_date,onChange:f=>u("campaign_end_date",f.target.value)})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Destination URL"}),r.jsx(de,{value:i.destination_url,onChange:f=>u("destination_url",f.target.value)})]})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:a,children:"Cancel"}),r.jsx(K,{onClick:m,disabled:l||!i.placement_name,children:l?"Saving...":"Save"})]})]})})}function VAe(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState([]),[o,l]=j.useState(!0),[c,u]=j.useState(!1),[m,f]=j.useState(null),[p,b]=j.useState("all"),[v,g]=j.useState(!1);j.useEffect(()=>{y()},[]);const y=async()=>
898{l(!0);const[k,C,T]=await Promise.all([W.entities.AdvertisingPlacement.list("-created_date",100),W.entities.Advertiser.list("-created_date",100),W.entities.AdvertisingCampaign.list("-created_date",100)]);t(k||[]),s(C||[]),i(T||[]),l(!1)},w=async()=>{g(!0),await W.entities.AdvertisingPlacement.bulkCreate(BAe),y(),g(!1)},N=e.filter(k=>p==="all"||k.status===p),S=e.filter(k=>k.status==="booked").length,A=e.length?Math.round(S/e.length*100):0;return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/revenue",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Revenue Centre"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Ad Inventory"})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[r.jsx("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[{label:"Total Placements",value:e.length},{label:"Available",value:e.filter(k=>k.status==="available").length,color:"text-green-600"},{label:"Booked",value:S,color:"text-blue-600"},{label:"Utilisation",value:`${A}%`,color:A>70?"text-green-600":"text-amber-600"}].map(k=>r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:k.label}),r.jsx("p",{className:`text-2xl font-bold ${k.color||"text-foreground"}`,children:k.value})]})},k.label))}),r.jsxs("div",{className:"flex items-center justify-between gap-3 mb-6",children:[r.jsxs(Xe,{value:p,onValueChange:b,children:[r.jsx(He,{className:"h-8 w-36",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Status"}),["available","booked","reserved","inactive"].map(k=>r.jsx(Pe,{value:k,children:k},k))]})]}),r.jsxs("div",{className:"flex gap-2",children:[e.length===0&&r.jsx(K,{variant:"outline",size:"sm",onClick:w,disabled:v,children:v?"Seeding...":"Seed Default Placements"}),r.jsxs(K,{size:"sm",onClick:()=>{f(null),u(!0)},children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"Add Placement"]})]})]}),o?r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"overflow-x-auto",children:[r.jsxs("table",{className:"w-full text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"text-xs text-muted-foreground border-b border-border",children:[r.jsx("th",{className:"text-left pb-2 font-medium",children:"Placement"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Dimensions"}),r.jsx("th",{className:"text-right pb-2 font-medium",children:"Price/Mo"}),r.jsx("th",{className:"text-right pb-2 font-medium",children:"CPM"}),r.jsx("th",{className:"text-right pb-2 font-medium",children:"Impressions"}),r.jsx("th",{className:"text-right pb-2 font-medium",children:"CTR"}),r.jsx("th",{className:"text-right pb-2 font-medium",children:"Revenue"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Status"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Assigned To"}),r.jsx("th",{className:"pb-2"})]})}),r.jsx("tbody",{children:N.map(k=>{const C=n.find(T=>T.id===k.advertiser_id);return r.jsxs("tr",{className:"border-b border-border last:border-0 hover:bg-muted/30",children:[r.jsx("td",{className:"py-2 font-medium",children:k.placement_name}),r.jsx("td",{className:"py-2 text-muted-foreground text-xs",children:k.dimensions}),r.jsx("td",{className:"py-2 text-right",children:w_(k.price_monthly)}),r.jsx("td",{className:"py-2 text-right",children:w_(k.price_cpm)}),r.jsx("td",{className:"py-2 text-right",children:(k.impressions||0).toLocaleString()}),r.jsx("td",{className:"py-2 text-right",children:k.ctr?`${k.ctr.toFixed(2)}%`:"â"}),r.jsx("td",{className:"py-2 text-right text-green-700 font-medium",children:w_(k.revenue_generated)}),r.jsx("td",{className:"py-2",children:r.jsx(ge,{className:`text-xs ${FAe[k.status]}`,children:k.status})}),r.jsx("td",{className:"py-2 text-xs text-muted-foreground",children:(C==null?void 0:C.company_name)||"â"}),r.jsx("td",{className:"py-2",children:r.jsx(K,{variant:"ghost",size:"sm",onClick:()=>{f(k),u(!0)},children:"Edit"})})]},k.id)})})]}),N.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No placements found."})]})]}),c&&r.jsx(qAe,{placement:m,advertisers:n,campaigns:a,onSave:()=>{u(!1),y()},onClose:()=>u(!1)})]})}const ml=e=>
898`£${Number(e||0).toLocaleString("en-GB")}`,UAe={draft:"bg-gray-100 text-gray-800",sent:"bg-blue-100 text-blue-800",paid:"bg-green-100 text-green-800",outstanding:"bg-yellow-100 text-yellow-800",overdue:"bg-red-100 text-red-800",cancelled:"bg-gray-100 text-gray-600"};function zAe({invoice:e,advertisers:t,campaigns:n,onSave:s,onClose:a}){const[i,o]=j.useState(e||{invoice_number:`INV-${Date.now().toString().slice(-6)}`,advertiser_id:"",advertiser_name:"",campaign_id:"",subtotal:0,tax_rate:20,tax_amount:0,total_amount:0,status:"draft",issue_date:new Date().toISOString().slice(0,10),due_date:"",notes:"",line_items:JSON.stringify([{description:"",quantity:1,unit_price:0,total:0}])}),[l,c]=j.useState(!1),u=(v,g)=>o(y=>({...y,[v]:g})),m=(()=>{try{return JSON.parse(i.line_items)}catch{return[]}})(),f=(v,g,y)=>{const w=[...m];w[v]={...w[v],[g]:y},(g==="quantity"||g==="unit_price")&&(w[v].total=(w[v].quantity||0)*(w[v].unit_price||0));const N=w.reduce((A,k)=>A+(k.total||0),0),S=N*((i.tax_rate||0)/100);o(A=>({...A,line_items:JSON.stringify(w),subtotal:N,tax_amount:S,total_amount:N+S}))},p=()=>{const v=[...m,{description:"",quantity:1,unit_price:0,total:0}];u("line_items",JSON.stringify(v))},b=async()=>{c(!0),e!=null&&e.id?await W.entities.Invoice.update(e.id,i):await W.entities.Invoice.create(i),s()};return r.jsx(hr,{open:!0,onOpenChange:a,children:r.jsxs(or,{className:"max-w-2xl",children:[r.jsx(kr,{children:r.jsx(Cr,{children:e!=null&&e.id?"Edit Invoice":"New Invoice"})}),r.jsxs("div",{className:"space-y-4 max-h-[70vh] overflow-y-auto pr-1",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Invoice #"}),r.jsx(de,{value:i.invoice_number,onChange:v=>u("invoice_number",v.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Status"}),r.jsxs(Xe,{value:i.status,onValueChange:v=>u("status",v),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["draft","sent","paid","outstanding","overdue","cancelled"].map(v=>r.jsx(Pe,{value:v,children:v},v))})]})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Advertiser"}),r.jsxs(Xe,{value:i.advertiser_id,onValueChange:v=>{const g=t.find(y=>y.id===v);u("advertiser_id",v),u("advertiser_name",(g==null?void 0:g.company_name)||"")},children:[r.jsx(He,{children:r.jsx(Je,{placeholder:"Select advertiser"})}),r.jsx(Ge,{children:t.map(v=>r.jsx(Pe,{value:v.id,children:v.company_name},v.id))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Issue Date"}),r.jsx(de,{type:"date",value:i.issue_date,onChange:v=>u("issue_date",v.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Due Date"}),r.jsx(de,{type:"date",value:i.due_date,onChange:v=>u("due_date",v.target.value)})]})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("p",{className:"text-sm font-medium",children:"Line Items"}),r.jsxs(K,{variant:"outline",size:"sm",onClick:p,children:[r.jsx(jn,{className:"w-3 h-3 mr-1"}),"Add Line"]})]}),r.jsx("div",{className:"space-y-2",children:m.map((v,g)=>r.jsxs("div",{className:"grid grid-cols-12 gap-2 items-center",children:[r.jsx(de,{className:"col-span-5 text-xs h-8",placeholder:"Description",value:v.description,onChange:y=>f(g,"description",y.target.value)}),r.jsx(de,{className:"col-span-2 text-xs h-8",type:"number",placeholder:"Qty",value:v.quantity,onChange:y=>f(g,"quantity",Number(y.target.value))}),r.jsx(de,{className:"col-span-2 text-xs h-8",type:"number",placeholder:"Unit £",value:v.unit_price,onChange:y=>f(g,"unit_price",Number(y.target.value))}),r.jsx("div",{className:"col-span-3 text-right text-sm font-medium text-green-700",children:ml(v.total)})]},g))})]}),r.jsxs("div",{className:"border-t pt-3 space-y-1 text-sm",children:[r.jsxs("div",{className:"flex justify-between",children:[r.jsx("span",{className:"text-muted-foreground",children:"Subtotal"}),r.jsx("span",{children:ml(i.subtotal)})]}),r.jsxs("div",{className:"flex justify-between items-center gap-2",children:[r.jsx("span",{className:"text-muted-foreground",children:"VAT"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(de,{type:"number",className:"h-7 w-16 text-xs",value:i.tax_rate,onChange:v=>{const g=Number(v.target.value),y=i.subtotal*(g/100);o(w=>({...w,tax_rate:g,tax_amount:y,total_amount:w.subtotal+y}))}}),r.jsx("span",{className:"text-xs",children:"%"}),r.jsx("span",{children:ml(i.tax_amount)})]})]}),r.jsxs("div",{className:"flex justify-between font-bold text-base border-t pt-2",children:[r.jsx("span",{children:"Total"}),r.jsx("span",{children:ml(i.total_amount)})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Notes"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-16 resize-none bg-transparent",value:i.notes,onChange:v=>u("notes",v.target.value)})]})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:a,children:"Cancel"}),r.jsx(K,{onClick:b,disabled:l,children:l?"Saving...":"Save Invoice"})]})]})})}function WAe(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState([]),[o,l]=j.useState(!0),[c,u]=j.useState("all"),[m,f]=j.useState(!1),[p,b]=j.useState(null);j.useEffect(()=>
898{v()},[]);const v=async()=>{l(!0);const[N,S,A]=await Promise.all([W.entities.Invoice.list("-created_date",200),W.entities.Advertiser.list("-created_date",100),W.entities.AdvertisingCampaign.list("-created_date",100)]);t(N||[]),s(S||[]),i(A||[]),l(!1)},g=e.filter(N=>c==="all"||N.status===c),y=e.filter(N=>N.status==="paid").reduce((N,S)=>N+(S.total_amount||0),0),w=e.filter(N=>["outstanding","overdue"].includes(N.status)).reduce((N,S)=>N+(S.total_amount||0),0);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/revenue",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Revenue Centre"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Invoicing"})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[r.jsx("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[{label:"Total Paid",value:ml(y),color:"text-green-600",icon:qt},{label:"Outstanding",value:ml(w),color:"text-amber-600",icon:$n},{label:"Overdue",value:e.filter(N=>N.status==="overdue").length,color:"text-red-600",icon:Ln},{label:"Total Invoices",value:e.length,color:"text-foreground",icon:$n}].map(N=>r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5 flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:N.label}),r.jsx("p",{className:`text-2xl font-bold ${N.color}`,children:N.value})]}),r.jsx(N.icon,{className:`w-5 h-5 ${N.color} opacity-30`})]})},N.label))}),r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs(Xe,{value:c,onValueChange:u,children:[r.jsx(He,{className:"h-8 w-36",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All"}),["draft","sent","paid","outstanding","overdue","cancelled"].map(N=>r.jsx(Pe,{value:N,children:N},N))]})]}),r.jsxs(K,{size:"sm",onClick:()=>{b(null),f(!0)},children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"New Invoice"]})]}),o?r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"overflow-x-auto",children:[r.jsxs("table",{className:"w-full text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"text-xs text-muted-foreground border-b",children:[r.jsx("th",{className:"text-left pb-2 font-medium",children:"Invoice #"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Advertiser"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Issue Date"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Due Date"}),r.jsx("th",{className:"text-right pb-2 font-medium",children:"Total"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Status"}),r.jsx("th",{className:"pb-2"})]})}),r.jsx("tbody",{children:g.map(N=>r.jsxs("tr",{className:"border-b hover:bg-muted/30",children:[r.jsx("td",{className:"py-2 font-mono text-xs",children:N.invoice_number}),r.jsx("td",{className:"py-2 font-medium",children:N.advertiser_name}),r.jsx("td",{className:"py-2 text-muted-foreground",children:N.issue_date}),r.jsx("td",{className:"py-2 text-muted-foreground",children:N.due_date}),r.jsx("td",{className:"py-2 text-right font-semibold",children:ml(N.total_amount)}),r.jsx("td",{className:"py-2",children:r.jsx(ge,{className:`text-xs ${UAe[N.status]}`,children:N.status})}),r.jsx("td",{className:"py-2",children:r.jsx(K,{variant:"ghost",size:"sm",onClick:()=>{b(N),f(!0)},children:"Edit"})})]},N.id))})]}),g.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No invoices found."})]})]}),m&&r.jsx(zAe,{invoice:p,advertisers:n,campaigns:a,onSave:()=>{f(!1),v()},onClose:()=>f(!1)})]})}const _9=e=>`£${Number(e||0).toLocaleString("en-GB")}`,HAe={draft:"bg-gray-100 text-gray-800",sent:"bg-blue-100 text-blue-800",viewed:"bg-purple-100 text-purple-800",accepted:"bg-green-100 text-green-800",rejected:"bg-red-100 text-red-800",expired:"bg-gray-100 text-gray-500"};function GAe({proposal:e,advertisers:t,leads:n,onSave:s,onClose:a}){const[i,o]=j.useState(e||{proposal_title:"",client_name:"",client_email:"",lead_id:"",advertiser_id:"",proposed_package:"",audience_summary:"Chelsea Monthly reaches over 150,000 affluent readers monthly across digital and print platforms. Our audience is predominantly ABC1, aged 35-65, with household incomes exceeding £100,000. Primary interests include luxury living, property, travel, fashion, and fine dining.",campaign_details:"",total_price:0,campaign_start_date:"",campaign_end_date:"",deliverables:JSON.stringify(["Homepage banner placement","Newsletter feature","Social media mention"]),timeline:"",status:"draft",valid_until:"",notes:""}),[l,c]=j.useState(!1),u=(f,p)=>o(b=>({...b,[f]:p})),m=async()=>{c(!0),e!=null&&e.id?await W.entities.Proposal.update(e.id,i):await W.entities.Proposal.create(i),s()};return r.jsx(hr,{open:!0,onOpenChange:a,children:r.jsxs(or,{className:"max-w-2xl",children:[r.jsx(kr,{children:r.jsx(Cr,{children:e!=null&&e.id?"
898Edit Proposal":"New Proposal"})}),r.jsxs("div",{className:"space-y-3 max-h-[70vh] overflow-y-auto pr-1",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Proposal Title *"}),r.jsx(de,{value:i.proposal_title,onChange:f=>u("proposal_title",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Client Name *"}),r.jsx(de,{value:i.client_name,onChange:f=>u("client_name",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Client Email"}),r.jsx(de,{value:i.client_email,onChange:f=>u("client_email",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Advertiser"}),r.jsxs(Xe,{value:i.advertiser_id,onValueChange:f=>u("advertiser_id",f),children:[r.jsx(He,{children:r.jsx(Je,{placeholder:"Select advertiser"})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:null,children:"None"}),t.map(f=>r.jsx(Pe,{value:f.id,children:f.company_name},f.id))]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Package"}),r.jsxs(Xe,{value:i.proposed_package,onValueChange:f=>u("proposed_package",f),children:[r.jsx(He,{children:r.jsx(Je,{placeholder:"Select package"})}),r.jsx(Ge,{children:["Bronze","Silver","Gold","Platinum","Custom"].map(f=>r.jsx(Pe,{value:f,children:f},f))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Campaign Start"}),r.jsx(de,{type:"date",value:i.campaign_start_date,onChange:f=>u("campaign_start_date",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Campaign End"}),r.jsx(de,{type:"date",value:i.campaign_end_date,onChange:f=>u("campaign_end_date",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Total Price (£)"}),r.jsx(de,{type:"number",value:i.total_price,onChange:f=>u("total_price",Number(f.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Valid Until"}),r.jsx(de,{type:"date",value:i.valid_until,onChange:f=>u("valid_until",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Status"}),r.jsxs(Xe,{value:i.status,onValueChange:f=>u("status",f),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["draft","sent","viewed","accepted","rejected","expired"].map(f=>r.jsx(Pe,{value:f,children:f},f))})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Audience Summary"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-24 resize-none bg-transparent",value:i.audience_summary,onChange:f=>u("audience_summary",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Campaign Details"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-24 resize-none bg-transparent",value:i.campaign_details,onChange:f=>u("campaign_details",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Timeline"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-16 resize-none bg-transparent",value:i.timeline,onChange:f=>u("timeline",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Notes"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-16 resize-none bg-transparent",value:i.notes,onChange:f=>u("notes",f.target.value)})]})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:a,children:"Cancel"}),r.jsx(K,{onClick:m,disabled:l||!i.proposal_title||!i.client_name,children:l?"Saving...":"Save Proposal"})]})]})})}function KAe({proposal:e,onClose:t}){const n=(()=>{try{return JSON.parse(e.deliverables)}catch{return[]}})();return r.jsx(hr,{open:!0,onOpenChange:t,children:r.jsxs(or,{className:"max-w-2xl max-h-[90vh] overflow-y-auto",children:[r.jsx(kr,{children:r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-xs uppercase tracking-widest text-muted-foreground mb-1",children:"Chelsea Monthly"}),r.jsx(Cr,{className:"text-xl",children:"Advertising Proposal"})]}),r.jsxs("div",{className:"text-right",children:[r.jsxs("div",{className:"text-2xl font-bold text-primary",children:["£",Number(e.total_price||0).toLocaleStr
898ing()]}),r.jsx("div",{className:"text-xs text-muted-foreground",children:"Investment"})]})]})}),r.jsxs("div",{className:"space-y-5",children:[r.jsxs("div",{className:"bg-muted/30 p-4 rounded-lg",children:[r.jsx("p",{className:"text-sm font-semibold mb-1",children:"Prepared for"}),r.jsx("p",{className:"text-lg font-bold",children:e.client_name}),e.client_email&&r.jsx("p",{className:"text-sm text-muted-foreground",children:e.client_email})]}),e.audience_summary&&r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-sm uppercase tracking-widest text-muted-foreground mb-2",children:"Our Audience"}),r.jsx("p",{className:"text-sm leading-relaxed",children:e.audience_summary})]}),e.proposed_package&&r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-sm uppercase tracking-widest text-muted-foreground mb-2",children:"Package"}),r.jsx(ge,{variant:"default",className:"text-sm px-3 py-1",children:e.proposed_package})]}),e.campaign_details&&r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-sm uppercase tracking-widest text-muted-foreground mb-2",children:"Campaign Details"}),r.jsx("p",{className:"text-sm leading-relaxed",children:e.campaign_details})]}),n.length>0&&r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-sm uppercase tracking-widest text-muted-foreground mb-2",children:"Deliverables"}),r.jsx("ul",{className:"space-y-1",children:n.map((s,a)=>r.jsxs("li",{className:"text-sm flex items-center gap-2",children:[r.jsx("span",{className:"w-1.5 h-1.5 bg-primary rounded-full"}),s]},a))})]}),(e.campaign_start_date||e.campaign_end_date)&&r.jsxs("div",{children:[r.jsx("h3",{className:"font-semibold text-sm uppercase tracking-widest text-muted-foreground mb-2",children:"Timeline"}),r.jsxs("p",{className:"text-sm",children:[e.campaign_start_date," â ",e.campaign_end_date]}),e.timeline&&r.jsx("p",{className:"text-sm mt-1",children:e.timeline})]}),r.jsx("div",{className:"border-t pt-4",children:r.jsxs("div",{className:"flex justify-between items-center",children:[r.jsx("div",{children:r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Valid until: ",e.valid_until||"30 days"]})}),r.jsxs("div",{className:"text-right",children:[r.jsx("p",{className:"text-2xl font-bold",children:_9(e.total_price)}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"+VAT where applicable"})]})]})})]})]})})}function YAe(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState([]),[o,l]=j.useState(!0),[c,u]=j.useState(!1),[m,f]=j.useState(null),[p,b]=j.useState(null),[v,g]=j.useState("all");j.useEffect(()=>{y()},[]);const y=async()=>{l(!0);const[N,S,A]=await Promise.all([W.entities.Proposal.list("-created_date",100),W.entities.Advertiser.list("-created_date",100),W.entities.Lead.list("-created_date",100)]);t(N||[]),s(S||[]),i(A||[]),l(!1)},w=e.filter(N=>v==="all"||N.status===v);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/revenue",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Revenue Centre"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Proposals"})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs(Xe,{value:v,onValueChange:g,children:[r.jsx(He,{className:"h-8 w-36",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All"}),["draft","sent","viewed","accepted","rejected","expired"].map(N=>r.jsx(Pe,{value:N,children:N},N))]})]}),r.jsxs(K,{size:"sm",onClick:()=>{f(null),u(!0)},children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"New Proposal"]})]}),o?r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"grid gap-3",children:[w.map(N=>r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsx(ce,{className:"p-4",children:r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx(Rn,{className:"w-4 h-4 text-muted-foreground"}),r.jsx("h3",{className:"font-semibold",children:N.proposal_title}),r.jsx(ge,{className:`text-xs ${HAe[N.status]}`,children:N.status}),N.proposed_package&&r.jsx(ge,{variant:"outline",className:"text-xs",children:N.proposed_package})]}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:[N.client_name," ",N.client_email&&`⢠${N.client_email}`]}),N.campaign_start_date&&r.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[N.campaign_start_date," â ",N.campaign_end_date]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"font-semibold text-green-700",children:_9(N.total_price)}),r.jsx(K,{variant:"ghost",size:"sm",onClick:()=>b(N),children:r.jsx(Nr,{className:"w-4 h-4"})}),r.jsx(K,{variant:"outline",size:"sm",onClick:()=>{f(N),u(!0)},children:"Edit"})]})]})})},N.id)),w.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No proposals found."})]})]}),c&&r.jsx(GAe,{proposal:m,advertisers:n,leads:a,onSave:()=>{u(!1),y()},onClose:()=>u(!1)}),p&&r.jsx(KAe,{proposal:p,onClose:()=>b(null)})]})}const xh=e=>
898`£${Number(e||0).toLocaleString("en-GB")}`,XAe={bronze:"border-amber-700/30 bg-amber-50",silver:"border-gray-400/40 bg-gray-50",gold:"border-yellow-500/40 bg-yellow-50",platinum:"border-purple-400/30 bg-purple-50",custom:"border-blue-400/30 bg-blue-50"},JAe={bronze:"bg-amber-100 text-amber-800",silver:"bg-gray-100 text-gray-700",gold:"bg-yellow-100 text-yellow-800",platinum:"bg-purple-100 text-purple-800",custom:"bg-blue-100 text-blue-800"},QAe=[{package_name:"Bronze Package",tier:"bronze",description:"Essential digital presence for growing brands",price_monthly:500,price_campaign:1200,sponsored_article_price:800,newsletter_price:300,features:JSON.stringify(["Article footer banner","Newsletter banner","Monthly reporting"]),included_impressions:1e4,included_articles:1},{package_name:"Silver Package",tier:"silver",description:"Enhanced visibility across key placements",price_monthly:1200,price_campaign:3e3,sponsored_article_price:1500,newsletter_price:600,features:JSON.stringify(["Article top & mid banners","Category page banner","Newsletter mid-content","2 sponsored articles/month","Bi-weekly reporting"]),included_impressions:3e4,included_articles:2},{package_name:"Gold Package",tier:"gold",description:"Premium multi-channel luxury brand exposure",price_monthly:2500,price_campaign:6e3,sponsored_article_price:2500,newsletter_price:1e3,homepage_takeover_price:5e3,features:JSON.stringify(["Homepage leaderboard + sidebar","All article placements","Newsletter header","4 sponsored articles/month","Social media mentions","Weekly reporting + account manager"]),included_impressions:8e4,included_articles:4},{package_name:"Platinum Package",tier:"platinum",description:"Ultimate Chelsea Monthly partnership",price_monthly:5e3,price_campaign:12e3,sponsored_article_price:4e3,newsletter_price:2e3,homepage_takeover_price:8e3,features:JSON.stringify(["Homepage hero banner","All premium placements","Newsletter sponsorship","Unlimited sponsored articles","Magazine feature","Homepage takeover days","Dedicated account manager","Daily reporting & insights"]),included_impressions:2e5,included_articles:0}];function ZAe({rateCard:e,onSave:t,onClose:n}){const[s,a]=j.useState(e||{package_name:"",tier:"bronze",description:"",price_monthly:0,price_campaign:0,price_cpm:0,sponsored_article_price:0,newsletter_price:0,homepage_takeover_price:0,included_impressions:0,included_articles:0,features:JSON.stringify([""]),is_active:!0}),[i,o]=j.useState(!1),l=(m,f)=>a(p=>({...p,[m]:f})),c=(()=>{try{return JSON.parse(s.features)}catch{return[""]}})(),u=async()=>{o(!0),e!=null&&e.id?await W.entities.RateCard.update(e.id,s):await W.entities.RateCard.create(s),t()};return r.jsx(hr,{open:!0,onOpenChange:n,children:r.jsxs(or,{className:"max-w-lg",children:[r.jsx(kr,{children:r.jsx(Cr,{children:e!=null&&e.id?"Edit Package":"New Package"})}),r.jsxs("div",{className:"space-y-3 max-h-[70vh] overflow-y-auto pr-1",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Package Name *"}),r.jsx(de,{value:s.package_name,onChange:m=>l("package_name",m.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Tier"}),r.jsxs(Xe,{value:s.tier,onValueChange:m=>l("tier",m),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["bronze","silver","gold","platinum","custom"].map(m=>r.jsx(Pe,{value:m,children:m},m))})]})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Description"}),r.jsx(de,{value:s.description,onChange:m=>l("description",m.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Monthly Price (£)"}),r.jsx(de,{type:"number",value:s.price_monthly,onChange:m=>l("price_monthly",Number(m.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Campaign Price (£)"}),r.jsx(de,{type:"number",value:s.price_campaign,onChange:m=>l("price_campaign",Number(m.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"CPM (£)"}),r.jsx(de,{type:"number",value:s.price_cpm,onChange:m=>l("price_cpm",Number(m.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Sponsored Article (£)"}),r.jsx(de,{type:"number",value:s.sponsored_article_price,onChange:m=>l("sponsored_article_price",Number(m.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Newsletter (£)"}),r.jsx(de,{type:"number",value:s.newsletter_price,onChange:m=>l("newsletter_price",Number(m.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Homepage Takeover (£)"}),r.jsx(de,{type:"number",value:s.homepage_takeover_price,onChange:m=>l("homepage_takeover_price",Number(m.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Included Impressions"}),r.jsx(de,{type:"number",value:s.included_impressions,onChange:m=>l("included_impressions",Number(m.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Included Articles/Mo"}),r.jsx(de,{type:"number",value:s.included_articles,onChange:m=>l("included_articles",Number(m.target.value))})]})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"flex items-center justify-between mb-1",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Features"}),r.jsx(K,{variant:"ghost",size:"sm",onClick:()=>l("features",JSON.stringify([...c,""])),children:r.jsx(jn,{className:"w-3 h-3"})})]}),c.map((m,f)=>r.jsx(de,{className:"mb-1 text-sm h-8",value:m,onChange:p=>{const b=[...c];b[f]=p.target.value,l("features",JSON.stringify(b))},placeholder:`Feature ${f+1}`},f))]})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:n,children:"Cancel"}),r.jsx(K,{onClick:u,disabled:i||!s.package_name,children:i?"Saving...":"Save"})]})]})})}function eTe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),[a,i]=j.useState(!1),[o,l]=j.useState(null),[c,u]=j.useState(!1);j.useEffect(()=>{m()},[]);const m=async()=>{s(!0);const p=await W.entities.RateCard.list("-created_date",50);t(p||[]),s(!1)},f=async()=>{u(!0),await W.entities.RateCard.bulkCreate(QAe),m(),u(!1)};return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/revenue",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Revenue Centre"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Rate Card & Packages"})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("p",{className:"text-muted-foreground text-sm",children:[e.length," packages configured"]}),r.jsxs("div",{className:"flex gap-2",children:[e.length===0&&r.jsx(K,{variant:"outline",size:"sm",onClick:f,disabled:c,
898children:c?"Seeding...":"Load Default Packages"}),r.jsxs(K,{size:"sm",onClick:()=>{l(null),i(!0)},children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"New Package"]})]})]}),n?r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-4 gap-4",children:[e.map(p=>{const b=(()=>{try{return JSON.parse(p.features)}catch{return[]}})();return r.jsxs(oe,{className:`border-2 ${XAe[p.tier]||"border-border bg-card"} relative`,children:[r.jsxs(ut,{className:"pb-2",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(ge,{className:`text-xs capitalize ${JAe[p.tier]}`,children:p.tier}),r.jsx(K,{variant:"ghost",size:"sm",className:"h-7 text-xs",onClick:()=>{l(p),i(!0)},children:"Edit"})]}),r.jsx(ht,{className:"text-lg mt-2",children:p.package_name}),p.description&&r.jsx("p",{className:"text-xs text-muted-foreground",children:p.description})]}),r.jsxs(ce,{className:"space-y-3",children:[r.jsxs("div",{children:[p.price_monthly>0&&r.jsxs("div",{className:"flex items-baseline gap-1",children:[r.jsx("span",{className:"text-3xl font-bold",children:xh(p.price_monthly)}),r.jsx("span",{className:"text-xs text-muted-foreground",children:"/mo"})]}),p.price_campaign>0&&r.jsxs("p",{className:"text-sm text-muted-foreground",children:["Campaign: ",xh(p.price_campaign)]})]}),r.jsxs("div",{className:"space-y-1",children:[p.included_impressions>0&&r.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[r.jsx(ia,{className:"w-3 h-3 text-green-600"}),p.included_impressions.toLocaleString()," impressions"]}),p.sponsored_article_price>0&&r.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[r.jsx(ia,{className:"w-3 h-3 text-green-600"}),"Sponsored articles from ",xh(p.sponsored_article_price)]}),p.newsletter_price>0&&r.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[r.jsx(ia,{className:"w-3 h-3 text-green-600"}),"Newsletter from ",xh(p.newsletter_price)]}),p.homepage_takeover_price>0&&r.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[r.jsx(ia,{className:"w-3 h-3 text-green-600"}),"Takeovers from ",xh(p.homepage_takeover_price)]}),b.filter(Boolean).map((v,g)=>r.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[r.jsx(ia,{className:"w-3 h-3 text-green-600"}),v]},g))]})]})]},p.id)}),e.length===0&&r.jsx("div",{className:"col-span-4 text-center py-12 text-muted-foreground",children:'No packages yet. Click "Load Default Packages" to get started.'})]})]}),a&&r.jsx(ZAe,{rateCard:o,onSave:()=>{i(!1),m()},onClose:()=>i(!1)})]})}const tTe={title:"Chelsea Monthly Media Kit 2026",monthly_readers:15e4,newsletter_subscribers:45e3,social_media_reach:28e4,monthly_page_views:42e4,magazine_circulation:15e3,avg_time_on_site:"4m 32s",demographics_data:JSON.stringify({age_35_65:72,abc1:85,household_income_100k_plus:68,female:58,london_southeast:71}),audience_interests:JSON.stringify(["Luxury Property","Travel & Hospitality","Fine Dining","Fashion & Beauty","Art & Culture","Finance & Wealth","Motoring","Watches & Jewellery"]),advertising_opportunities:JSON.stringify(["Homepage Hero Banner â premium above-fold placement","Article Sponsorship â contextual editorial integration","Newsletter Sponsorship â direct inbox presence","Sponsored Content â branded editorial storytelling","Magazine Print Advertising â luxury print readership","Homepage Takeover â total brand domination","Category Partnership â own a content vertical","Event Sponsorship â exclusive member events"]),case_studies:JSON.stringify([{brand:"Luxury Watch Brand",result:"340% increase in website traffic",campaign:"Homepage takeover + sponsored articles"},{brand:"Prime Property Developer",result:"127 qualified leads in 4 weeks",campaign:"Gold package with 6 sponsored articles"},{brand:"5-Star Hotel Group",result:"£2.3M revenue attributed to campaign",campaign:"Platinum partnership â 3-month takeover"}])};function rTe(){const[e,t]=j.useState(null),[n,s]=j.useState(!0),[a,i]=j.useState(!1),[o,l]=j.useState(!1);j.useEffect(()=>{c()},[]);const c=async()=>{s(!0);const g=await W.entities.MediaKit.list("-created_date",1);g!=null&&g.length?t(g[0]):t({...tTe}),s(!1)},u=async()=>
898{if(i(!0),e.id)await W.entities.MediaKit.update(e.id,e);else{const g=await W.entities.MediaKit.create(e);t(g)}i(!1),alert("Media kit saved!")},m=(g,y)=>t(w=>({...w,[g]:y}));if(n)return r.jsx("div",{className:"flex items-center justify-center min-h-screen",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-foreground rounded-full animate-spin"})});const f=(()=>{try{return JSON.parse(e.demographics_data||"{}")}catch{return{}}})(),p=(()=>{try{return JSON.parse(e.audience_interests||"[]")}catch{return[]}})(),b=(()=>{try{return JSON.parse(e.advertising_opportunities||"[]")}catch{return[]}})(),v=(()=>{try{return JSON.parse(e.case_studies||"[]")}catch{return[]}})();return o?r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsxs("div",{className:"bg-foreground text-background px-6 py-4 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("h1",{className:"text-lg font-bold",children:"Media Kit Preview"}),r.jsx(ge,{variant:"outline",className:"border-background/30 text-background text-xs",children:"Preview Mode"})]}),r.jsx(K,{variant:"outline",size:"sm",className:"border-background/30 text-background hover:bg-background/10 hover:text-background",onClick:()=>l(!1),children:"â Back to Edit"})]}),r.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-12",children:[r.jsxs("div",{className:"text-center mb-12",children:[r.jsx("p",{className:"text-xs uppercase tracking-widest text-muted-foreground mb-2",children:"Chelsea Monthly"}),r.jsx("h1",{className:"text-4xl font-bold font-heading mb-3",children:e.title}),r.jsx("p",{className:"text-muted-foreground",children:"Reach London's most affluent, culturally engaged audience"})]}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-10",children:[{label:"Monthly Readers",value:(e.monthly_readers||0).toLocaleString(),icon:vt},{label:"Newsletter Subscribers",value:(e.newsletter_subscribers||0).toLocaleString(),icon:es},{label:"Social Media Reach",value:(e.social_media_reach||0).toLocaleString(),icon:Zn},{label:"Monthly Page Views",value:(e.monthly_page_views||0).toLocaleString(),icon:ya},{label:"Magazine Circulation",value:(e.magazine_circulation||0).toLocaleString(),icon:Yd},{label:"Avg. Time on Site",value:e.avg_time_on_site||"â",icon:Xr}].map(({label:g,value:y,icon:w})=>r.jsx(oe,{className:"text-center",children:r.jsxs(ce,{className:"pt-6 pb-5",children:[r.jsx(w,{className:"w-6 h-6 text-primary mx-auto mb-2"}),r.jsx("p",{className:"text-2xl font-bold",children:y}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:g})]})},g))}),Object.keys(f).length>0&&r.jsxs(oe,{className:"mb-6",children:[r.jsx(ut,{children:r.jsx(ht,{children:"Audience Demographics"})}),r.jsx(ce,{children:r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:Object.entries(f).map(([g,y])=>r.jsxs("div",{className:"text-center",children:[r.jsxs("p",{className:"text-3xl font-bold text-primary",children:[y,"%"]}),r.jsx("p",{className:"text-xs text-muted-foreground capitalize mt-1",children:g.replace(/_/g," ")})]},g))})})]}),p.length>0&&r.jsxs(oe,{className:"mb-6",children:[r.jsx(ut,{children:r.jsx(ht,{children:"Audience Interests"})}),r.jsx(ce,{children:r.jsx("div",{className:"flex flex-wrap gap-2",children:p.map(g=>r.jsx(ge,{variant:"secondary",className:"text-sm",children:g},g))})})]}),b.length>0&&r.jsxs(oe,{className:"mb-6",children:[r.jsx(ut,{children:r.jsx(ht,{children:"Advertising Opportunities"})}),r.jsx(ce,{children:r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:b.map((g,y)=>r.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[r.jsx("span",{className:"text-primary mt-0.5",children:"â¦"}),g]},y))})})]}),v.length>0&&r.jsxs(oe,{children:[r.jsx(ut,{children:r.jsx(ht,{children:"Success Stories"})}),r.jsx(ce,{children:r.jsx("div",{className:"grid gap-3",children:v.map((g,y)=>r.jsxs("div",{className:"p-4 bg-muted/30 rounded-lg",children:[r.jsx("p",{className:"font-semibold text-sm",children:g.brand}),r.jsx("p",{className:"text-primary font-bold my-1",children:g.result}),r.jsx("p",{className:"text-xs text-muted-foreground",children:g.campaign})]},y))})})]})]})]}):r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(se,{to:"/revenue",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Revenue Centre"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Media Kit Editor"})]})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs(K,{variant:"outline",size:"sm",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",onClick:()=>l(!0),children:[r.jsx(Nr,{className:"w-4 h-4 mr-2"}),"Preview"]}),r.jsxs(K,{size:"sm",className:"bg-primary text-primary-foreground",onClick:u,disabled:a,children:[r.jsx(a8,{className:"w-4 h-4 mr-2"}),a?"Saving...":"Save"]})]})]})}),r.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-8 space-y-6",children:[r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-3",children:r.jsx(ht,{className:"text-base",children:"Kit Title"})}),r.jsx(ce,{children:r.jsx(de,{value:e.title,onChange:g=>m("title",g.target.value)})})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-3",children:r.jsx(ht,{className:"text-base",children:"Audience Statistics"})}),r.jsx(ce,{children:r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:[[{label:"Monthly Readers",key:"monthly_readers"},{label:"Newsletter Subscribers",key:"newsletter_subscribers"},{label:"Social Media Reach",key:"social_media_reach"},{label:"Monthly Page Views",key:"monthly_page_views"},{label:"Magazine Circulation",key:"magazine_circulation"}].map(({label:g,key:y})=>r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:g}),r.jsx(de,{type:"number",value:e[y]||0,onChange:w=>m(y,Number(w.target.value))})]},y)),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Avg. Time on Site"}),r.jsx(de,{value:e.avg_time_on_site||"",onChange:g=>m("avg_time_on_site",g.target.value),placeholder:"e.g. 4m 32s"})]})]})})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-3",children:r.jsx(ht,{className:"text-base",children:"Demographics (% values)"})}),r.jsx(ce,{children:r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:Object.entries(f).map(([g,y])=>r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground capitalize",children:g.replace(/_/g," ")}),r.jsxs("div",{className:"flex gap-1 items-center",children:[r.jsx(de,{type:"number",value:y,onChange:w=>{const N={...f,[g]:Number(w.target.value)};m("demographics_data",JSON.stringify(N))}}),r.jsx("span",{className:"text-sm",children:"%"})]})]},g))})})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-3",children:r.jsx(ht,{className:"text-base",children:"Audience Interests (JSON array)"})}),r.jsx(ce,{children:r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-24 resize-none bg-transparent font-mono",value:e.audience_interests,onChange:g=>m("audience_interests",g.target.value)})})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-3",children:r.jsx(ht,{className:"text-base",children:"Advertising Opportunities (JSON array)"})}),r.jsx(ce,{children:r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-32 resize-none bg-transparent font-mono",value:e.advertising_opportunities,onChange:g=>m("advertising_opportunities",g.target.value)})})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-3",children:r.jsx(ht,{className:"text-base",children:"Case Studies / Success Stories (JSON array)"})}),r.jsxs(ce,{children:[r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-40 resize-none bg-transparent font-mono",value:e.case_studies,onChange:g=>m("case_studies",g.target.value)}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Format: [",'{"brand":"...","result":"...","campaign":"..."}',"]"]})]})]})]})]})}
898const nTe={draft:"bg-gray-100 text-gray-800",pending_review:"bg-yellow-100 text-yellow-800",approved:"bg-blue-100 text-blue-800",live:"bg-green-100 text-green-800",completed:"bg-gray-100 text-gray-600",rejected:"bg-red-100 text-red-800"};function sTe({article:e,advertisers:t,campaigns:n,onSave:s,onClose:a}){const[i,o]=j.useState(e||{advertiser_id:"",campaign_id:"",sponsor_name:"",article_title:"",article_content:"",excerpt:"",image_url:"",category:"Luxury",disclosure_label:"Sponsored Content",cta_button_text:"Find Out More",destination_url:"",campaign_start_date:"",campaign_end_date:"",status:"draft",slug:""}),[l,c]=j.useState(!1),u=(f,p)=>o(b=>({...b,[f]:p})),m=async()=>{c(!0),!i.slug&&i.article_title&&(i.slug=i.article_title.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")),e!=null&&e.id?await W.entities.SponsoredArticle.update(e.id,i):await W.entities.SponsoredArticle.create(i),s()};return r.jsx(hr,{open:!0,onOpenChange:a,children:r.jsxs(or,{className:"max-w-2xl",children:[r.jsx(kr,{children:r.jsx(Cr,{children:e!=null&&e.id?"Edit Sponsored Article":"New Sponsored Article"})}),r.jsx("div",{className:"space-y-3 max-h-[75vh] overflow-y-auto pr-1",children:r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Advertiser"}),r.jsxs(Xe,{value:i.advertiser_id,onValueChange:f=>{const p=t.find(b=>b.id===f);u("advertiser_id",f),p&&u("sponsor_name",p.company_name)},children:[r.jsx(He,{children:r.jsx(Je,{placeholder:"Select advertiser"})}),r.jsx(Ge,{children:t.map(f=>r.jsx(Pe,{value:f.id,children:f.company_name},f.id))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Sponsor Name (display)"}),r.jsx(de,{value:i.sponsor_name,onChange:f=>u("sponsor_name",f.target.value)})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Article Title *"}),r.jsx(de,{value:i.article_title,onChange:f=>u("article_title",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Category"}),r.jsx(de,{value:i.category,onChange:f=>u("category",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Status"}),r.jsxs(Xe,{value:i.status,onValueChange:f=>u("status",f),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["draft","pending_review","approved","live","completed","rejected"].map(f=>r.jsx(Pe,{value:f,children:f.replace(/_/g," ")},f))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Disclosure Label"}),r.jsx(de,{value:i.disclosure_label,onChange:f=>u("disclosure_label",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"CTA Button Text"}),r.jsx(de,{value:i.cta_button_text,onChange:f=>u("cta_button_text",f.target.value)})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Destination URL"}),r.jsx(de,{value:i.destination_url,onChange:f=>u("destination_url",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Start Date"}),r.jsx(de,{type:"date",value:i.campaign_start_date,onChange:f=>u("campaign_start_date",f.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"End Date"}),r.jsx(de,{type:"date",value:i.campaign_end_date,onChange:f=>u("campaign_end_date",f.target.value)})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Featured Image URL"}),r.jsx(de,{value:i.image_url,onChange:f=>u("image_url",f.target.value)})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Excerpt"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-20 resize-none bg-transparent",value:i.excerpt,onChange:f=>u("excerpt",f.target.value)})]}),r.jsxs("div",{className:"col-span-2",children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Article Content (HTML supported)"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-48 resize-none bg-transparent font-mono text-xs",value:i.article_c
898ontent,onChange:f=>u("article_content",f.target.value)})]})]})}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:a,children:"Cancel"}),r.jsx(K,{onClick:m,disabled:l||!i.article_title||!i.sponsor_name,children:l?"Saving...":"Save"})]})]})})}function aTe(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState([]),[o,l]=j.useState(!0),[c,u]=j.useState(!1),[m,f]=j.useState(null),[p,b]=j.useState("all");j.useEffect(()=>{v()},[]);const v=async()=>{l(!0);const[y,w,N]=await Promise.all([W.entities.SponsoredArticle.list("-created_date",100),W.entities.Advertiser.list("-created_date",100),W.entities.AdvertisingCampaign.list("-created_date",100)]);t(y||[]),s(w||[]),i(N||[]),l(!1)},g=e.filter(y=>p==="all"||y.status===p);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/revenue",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Revenue Centre"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Sponsored Content"})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[r.jsx("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[{label:"Total Sponsored",value:e.length},{label:"Live",value:e.filter(y=>y.status==="live").length,color:"text-green-600"},{label:"Pending Review",value:e.filter(y=>y.status==="pending_review").length,color:"text-yellow-600"},{label:"Total Impressions",value:e.reduce((y,w)=>y+(w.impressions||0),0).toLocaleString(),color:"text-blue-600"}].map(y=>r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:y.label}),r.jsx("p",{className:`text-2xl font-bold ${y.color||"text-foreground"}`,children:y.value})]})},y.label))}),r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs(Xe,{value:p,onValueChange:b,children:[r.jsx(He,{className:"h-8 w-36",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All"}),["draft","pending_review","approved","live","completed","rejected"].map(y=>r.jsx(Pe,{value:y,children:y.replace(/_/g," ")},y))]})]}),r.jsxs(K,{size:"sm",onClick:()=>{f(null),u(!0)},children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"New Sponsored Article"]})]}),o?r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"grid gap-4",children:[g.map(y=>r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsx(ce,{className:"p-4",children:r.jsxs("div",{className:"flex gap-4",children:[y.image_url&&r.jsx("img",{src:y.image_url,alt:y.article_title,className:"w-20 h-16 object-cover rounded flex-shrink-0"}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx(ge,{className:"text-xs bg-amber-100 text-amber-800",children:y.disclosure_label||"Sponsored"}),r.jsx(ge,{className:`text-xs ${nTe[y.status]}`,children:y.status.replace(/_/g," ")}),y.category&&r.jsx(ge,{variant:"outline",className:"text-xs",children:y.category})]}),r.jsx("h3",{className:"font-semibold",children:y.article_title}),r.jsx("p",{className:"text-sm text-muted-foreground",children:y.sponsor_name}),y.excerpt&&r.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-1",children:y.excerpt}),r.jsxs("div",{className:"flex gap-4 text-xs text-muted-foreground mt-2",children:[r.jsxs("span",{children:[(y.impressions||0).toLocaleString()," impr."]}),r.jsxs("span",{children:[(y.clicks||0).toLocaleString()," clicks"]}),y.campaign_start_date&&r.jsxs("span",{children:[y.campaign_start_date," â ",y.campaign_end_date]})]})]}),r.jsx("div",{className:"flex gap-1",children:r.jsx(K,{variant:"outline",size:"sm",onClick:()=>{f(y),u(!0)},children:"Edit"})})]})})},y.id)),g.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No sponsored articles found."})]})]}),c&&r.jsx(sTe,{article:m,advertisers:n,campaigns:a,onSave:()=>{u(!1),v()},onClose:()=>u(!1)})]})}const iTe=["Luxury Travel Experiences","Restaurant Experiences","Hotel Experiences","Private Dining","Business Networking","Property Networking","Watch Collecting Events","Motoring Events","Supercar Experiences","Yacht Experiences","Fashion Events","Art & Culture Events","Chelsea Social Events","Kensington Events","Knightsbridge Events","Luxury Brand Launches","Wine Tastings","Champagne Experiences","Investor Events"];function NL({event:e,featured:t=!1}){return r.jsx(se,{to:`/club/events/${e.id}`,children:r.jsxs(oe,{className:`overflow-hidden hover:shadow-xl transition-all duration-300 cursor-pointer group ${t?"h-full":""}`,children:[r.jsxs("div",{className:`relative overflow-hidden ${t?"h-64":"h-48"}`,children:[e.hero_image?r.jsx("img",{src:e.hero_image,alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-foreground to-foreground
898/70 flex items-center justify-center",children:r.jsx(Jt,{className:"w-12 h-12 text-primary opacity-50"})}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"}),r.jsxs("div",{className:"absolute top-3 left-3 flex gap-2",children:[e.is_vip_only&&r.jsx(ge,{className:"bg-primary text-primary-foreground text-xs",children:"VIP Only"}),e.is_members_only&&r.jsx(ge,{className:"bg-foreground text-background text-xs",children:"Members"}),e.requires_invitation&&r.jsx(ge,{className:"bg-purple-600 text-white text-xs",children:"By Invitation"})]}),r.jsx("div",{className:"absolute bottom-3 left-3 right-3",children:r.jsx(ge,{variant:"outline",className:"border-white/40 text-white bg-black/30 text-xs",children:e.category})})]}),r.jsxs(ce,{className:"p-4",children:[r.jsx("h3",{className:`font-bold font-heading mb-2 line-clamp-2 group-hover:text-primary transition-colors ${t?"text-lg":"text-base"}`,children:e.title}),r.jsxs("div",{className:"space-y-1 text-sm text-muted-foreground",children:[e.event_date&&r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Jt,{className:"w-3.5 h-3.5 text-primary"}),r.jsx("span",{children:new Date(e.event_date).toLocaleDateString("en-GB",{weekday:"short",day:"numeric",month:"long",year:"numeric"})}),e.start_time&&r.jsxs("span",{children:["· ",e.start_time]})]}),e.venue_name&&r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Ft,{className:"w-3.5 h-3.5 text-primary"}),r.jsx("span",{className:"truncate",children:e.venue_name})]})]}),r.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-border",children:[r.jsx("div",{children:e.is_free?r.jsx("span",{className:"text-green-700 font-semibold text-sm",children:"Free"}):e.price_standard>0?r.jsxs("span",{className:"font-semibold text-sm",children:["From £",e.price_standard]}):r.jsx("span",{className:"text-muted-foreground text-xs",children:"Price TBC"})}),e.tickets_available>0?r.jsxs("span",{className:"text-xs text-green-700",children:[e.tickets_available-(e.tickets_sold||0)," left"]}):e.tickets_sold>=e.capacity&&e.capacity>0?r.jsx("span",{className:"text-xs text-red-600",children:"Sold out"}):null]})]})]})})}function oTe(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState(!0),[o,l]=j.useState("all");j.useEffect(()=>{c()},[]);const c=async()=>{i(!0);const[p,b]=await Promise.all([W.entities.Event.filter({status:"published"},"event_date",50),W.entities.Experience.filter({status:"active"},"-created_date",12)]);t(p||[]),s(b||[]),i(!1)},u=e.filter(p=>new Date(p.event_date)>=new Date).sort((p,b)=>new Date(p.event_date)-new Date(b.event_date)),m=u.filter(p=>p.featured).slice(0,3),f=o==="all"?u:u.filter(p=>p.category===o);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsxs("div",{className:"relative bg-foreground text-background overflow-hidden",children:[r.jsxs("div",{className:"absolute inset-0 opacity-10",children:[r.jsx("div",{className:"absolute top-0 left-1/4 w-96 h-96 rounded-full bg-primary blur-3xl"}),r.jsx("div",{className:"absolute bottom-0 right-1/4 w-64 h-64 rounded-full bg-primary blur-2xl"})]}),r.jsxs("div",{className:"relative max-w-7xl mx-auto px-6 py-20 text-center",children:[r.jsxs("div",{className:"flex items-center justify-center gap-2 mb-4",children:[r.jsx(Lt,{className:"w-5 h-5 text-primary"}),r.jsx("span",{className:"text-primary text-xs uppercase tracking-[0.3em] font-medium",children:"Chelsea Monthly Club"}),r.jsx(Lt,{className:"w-5 h-5 text-primary"})]}),r.jsxs("h1",{className:"text-5xl md:text-6xl font-bold font-heading mb-4 leading-tight",children:["Where London's Most",r.jsx("br",{}),"Interesting People Meet."]}),r.jsx("p",{className:"text-background/60 text-lg max-w-2xl mx-auto mb-8",children:"Exclusive events, curated experiences and private access for Chelsea Monthly members. From intimate private dining to supercar days â this is London's luxury lifestyle club."}),r.jsxs("div",{className:"flex flex-wrap gap-3 justify-center",children:[r.jsx(se,{to:"/club/events",children:r.jsxs(K,{className:"bg-primary text-primary-foreground hover:bg-primary/90 px-8",children:["Browse Events ",r.jsx(_t,{className:"w-4 h-4 ml-2"})]})}),r.jsx(se,{to:"/club/experiences",children:r.jsx(K,{variant:"outline",className:"border-background/30 text-background hover:bg-background/10 hover:text-background px-8",children:"Luxury Experiences"})}),r.jsx(se,{to:"/membership",children:r.jsxs(K,{variant:"outline",className:"border-background/30 text-background hover:bg-background/10 hover:text-background px-8",children:[r.jsx(Lt,{className:"w-4 h-4 mr-2"})," Become a Member"]})})]})]})]}),r.jsx("div",{className:"bg-primary/10 border-y border-primary/20 py-4",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6",children:r.jsx("div",{className:"flex flex-wrap justify-center gap-8 text-center text-sm",children:[{label:"Events This Season",value:e.length},{label:"Experiences Available",value:n.length},{label:"Exclusive Partners",value:"50+"},{label:"Club Members",value:"2,400+"}].map(p=>r.jsxs("div",{children:[r.jsx("p",{className:"text-2xl font-bold text-foreground",children:p.value}),r.jsx("p",{className:"text-muted-foreground text-xs",children:p.label})]},p.label))})})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-12",children:[m.length>0&&r.jsxs("section",{className:"mb-14",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold font-heading",children:"Featured Events"}),r.jsx("p",{className:"text-muted-foreground text-sm",children:"Unmissable moments, curated for you"})]}),r.jsx(se,{to:"/club/events",children:r.jsxs(K,{variant:"ghost",size:"sm",children:["View all ",r.jsx(_t,{className:"w-4 h-4 ml-1"})]})})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:m.map(p=>r.jsx(NL,{event:p,featured:!0},p.id))})]}),r.jsxs("section",{className:"mb-14",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h2",{className:"text-2xl font-bold font-heading",children:"Upcoming Events"}),r.jsx(se,{to:"/club/calendar",children:r.jsxs(K,{variant:"outline",size:"sm",children:[r.jsx(Jt,{className:"w-4 h-4 mr-1"})," Calendar"]})})]}),r.jsxs("div",{className:"flex gap-2 flex-wrap mb-6",children:[r.jsx("button",{onClick:()=>l("all"),className:`px-3 py-1.5 text-xs rounded-full border transition-colors ${o==="all"?"bg-foreground text-background border-foreground":"border-border hover:border-foreground"}`,children:"All"}),iTe.slice(0,10).map(p=>r.jsx("button",{onClick:()=>l(p),className:`px-3 py-1.5 text-xs rounded-full border transition-colors ${o===p?"bg-foreground text-background border-foreground":"border-border hover:border-foreground"}`,children:p},p))]}),a?r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 animate-pulse",children:[...Array(6)].map((p,b)=>r.jsx("div",{className:"h-72 bg-muted rounded-xl"},b))}):f.length>0?r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:f.slice(0,9).map(p=>r.jsx(NL,{event:p}
898,p.id))}):r.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[r.jsx(Jt,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),r.jsx("p",{className:"font-medium",children:"No upcoming events in this category."}),r.jsxs("p",{className:"text-sm mt-1",children:["Check back soon or ",r.jsx(se,{to:"/club/events",className:"text-primary hover:underline",children:"browse all events"}),"."]})]}),f.length>9&&r.jsx("div",{className:"text-center mt-8",children:r.jsx(se,{to:"/club/events",children:r.jsxs(K,{variant:"outline",children:["View All ",f.length," Events"]})})})]}),n.length>0&&r.jsxs("section",{className:"mb-14",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-2xl font-bold font-heading",children:"Luxury Experiences"}),r.jsx("p",{className:"text-muted-foreground text-sm",children:"Partner experiences curated for discerning members"})]}),r.jsx(se,{to:"/club/experiences",children:r.jsxs(K,{variant:"ghost",size:"sm",children:["View all ",r.jsx(_t,{className:"w-4 h-4 ml-1"})]})})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:n.slice(0,4).map(p=>r.jsx(se,{to:`/club/experiences/${p.id}`,children:r.jsxs(oe,{className:"overflow-hidden hover:shadow-lg transition-all group cursor-pointer",children:[r.jsx("div",{className:"h-40 relative overflow-hidden",children:p.hero_image?r.jsx("img",{src:p.hero_image,alt:p.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center",children:r.jsx(ir,{className:"w-8 h-8 text-primary opacity-50"})})}),r.jsxs(ce,{className:"p-3",children:[r.jsx("p",{className:"text-xs text-primary font-medium mb-1",children:p.category}),r.jsx("h3",{className:"font-semibold text-sm line-clamp-2",children:p.title}),p.partner_brand&&r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:p.partner_brand}),r.jsxs("div",{className:"flex items-center justify-between mt-2",children:[r.jsxs("span",{className:"font-bold text-sm",children:["£",p.price_members||p.price]}),p.is_members_only&&r.jsx(ge,{variant:"outline",className:"text-xs",children:"Members"})]})]})]})},p.id))})]}),r.jsxs("section",{className:"bg-foreground text-background rounded-2xl p-10 text-center",children:[r.jsx(Lt,{className:"w-10 h-10 text-primary mx-auto mb-4"}),r.jsx("h2",{className:"text-3xl font-bold font-heading mb-3",children:"Join Chelsea Monthly Club"}),r.jsx("p",{className:"text-background/60 max-w-xl mx-auto mb-6",children:"Priority access to all events, members-only experiences, exclusive partner benefits, and a community of London's most interesting people."}),r.jsxs("div",{className:"flex gap-3 justify-center flex-wrap",children:[r.jsx(se,{to:"/membership",children:r.jsx(K,{className:"bg-primary text-primary-foreground px-8",children:"Become a Member"})}),r.jsx(se,{to:"/club/benefits",children:r.jsx(K,{variant:"outline",className:"border-background/30 text-background hover:bg-background/10 hover:text-background",children:"View Member Benefits"})})]})]})]})]})}const lTe=["Luxury Travel Experiences","Restaurant Experiences","Hotel Experiences","Private Dining","Business Networking","Property Networking","Watch Collecting Events","Motoring Events","Supercar Experiences","Yacht Experiences","Fashion Events","Art & Culture Events","Chelsea Social Events","Kensington Events","Knightsbridge Events","Luxury Brand Launches","Wine Tastings","Champagne Experiences","Investor Events"];function cTe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),[a,i]=j.useState(""),[o,l]=j.useState("all"),[c,u]=j.useState("grid"),[m,f]=j.useState("upcoming");j.useEffect(()=>{W.entities.Event.filter({status:"published"},"event_date",200).then(v=>{t(v||[]),s(!1)})},[]);const p=new Date,b=e.filter(v=>{var N,S;const g=!a||((N=v.title)==null?void 0:N.toLowerCase().includes(a.toLowerCase()))||((S=v.venue_name)==null?void 0:S.toLowerCase().includes(a.toLowerCase())),y=o==="all"||v.category===o,w=m==="all"?!0:m==="upcoming"?new Date(v.event_date)>=p:new Date(v.event_date)<p;return g&&y&&w}).sort((v,g)=>m==="past"?new Date(g.event_date)-new Date(v.event_date):new Date(v.event_date)-new Date(g.event_date));return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-10",children:r.jsxs("div",{className:"max-w-7xl mx-auto",children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-2",children:"Chelsea Monthly Club"}),r.jsx("h1",{className:"text-4xl font-bold font-heading mb-2",children:"Events"}),r.jsx("p",{className:"text-background/60",children:"Curated experiences for London's most discerning members"})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[r.jsxs("div",{className:"flex flex-wrap gap-3 items-center mb-6",children:[r.jsxs("div",{className:"relative flex-1 min-w-48",children:[r.jsx(dn,{className:"absolute left-2.5 top-2 w-4 h-4 text-muted-foreground"}),r.jsx(de,{placeholder:"Search events...",className:"pl-8 h-9",value:a,onChange:v=>i(v.target.value)})]}),r.jsxs(Xe,{value:o,onValueChange:l,children:[r.jsx(He,{className:"h-9 w-56",children:r.jsx(Je,{placeholder:"All categories"})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Categories"}),lTe.map(v=>r.jsx(Pe,{value:v,children:v},v))]})]}),r.jsxs(Xe,{value:m,onValueChange:f,children:[r.jsx(He,{className:"h-9 w-36",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"upcoming",children:"Upcoming"}),r.jsx(Pe,{value:"past",children:"Past Events"}),r.jsx(Pe,{value:"all",children:"All Events"})]})]}),r.jsxs("div",{className:"flex border border-border rounded-md overflow-hidden",children:[r.jsx("button",{onClick:()=>u("grid"),className:`px-3 py-1.5 transition-colors ${c==="grid"?"bg-foreground text-background":"hover:bg-muted"}`,children:r.jsx(FG,{className:"w-4 h-4"})}),r.jsx("button",{onClick:()=>u("list"),className:`px-3 py-1.5 transition-colors ${c==="list"?"bg-foreground text-background":"hover:bg-muted"}`,children:r.jsx(r8,{className:"w-4 h-4"})})]})]}),r.jsxs("p",{className:"text-sm text-muted-foreground mb-4",children:[b.length," event",b.length!==1?"s":""," found"]}
898),n?r.jsx("div",{className:`grid ${c==="grid"?"grid-cols-1 md:grid-cols-3":"grid-cols-1"} gap-5 animate-pulse`,children:[...Array(6)].map((v,g)=>r.jsx("div",{className:"h-72 bg-muted rounded-xl"},g))}):b.length===0?r.jsxs("div",{className:"text-center py-20 text-muted-foreground",children:[r.jsx(Jt,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),r.jsx("p",{className:"font-medium",children:"No events found."}),r.jsx("p",{className:"text-sm mt-1",children:"Try adjusting your filters."})]}):c==="grid"?r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:b.map(v=>r.jsx(se,{to:`/club/events/${v.id}`,children:r.jsxs(oe,{className:"overflow-hidden hover:shadow-xl transition-all duration-300 cursor-pointer group h-full",children:[r.jsxs("div",{className:"relative h-48 overflow-hidden",children:[v.hero_image?r.jsx("img",{src:v.hero_image,alt:v.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-foreground to-foreground/70 flex items-center justify-center",children:r.jsx(Jt,{className:"w-10 h-10 text-primary opacity-40"})}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/50 to-transparent"}),r.jsxs("div",{className:"absolute top-2 left-2 flex gap-1",children:[v.is_vip_only&&r.jsx(ge,{className:"text-xs bg-primary text-primary-foreground",children:"VIP"}),v.is_members_only&&r.jsx(ge,{className:"text-xs bg-foreground text-background",children:"Members"})]}),r.jsx(ge,{variant:"outline",className:"absolute bottom-2 left-2 border-white/40 text-white bg-black/30 text-xs",children:v.category})]}),r.jsxs(ce,{className:"p-4",children:[r.jsx("h3",{className:"font-bold font-heading mb-2 line-clamp-2 group-hover:text-primary transition-colors",children:v.title}),r.jsxs("div",{className:"space-y-1 text-sm text-muted-foreground",children:[v.event_date&&r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Jt,{className:"w-3.5 h-3.5 text-primary"}),new Date(v.event_date).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}),v.start_time&&` · ${v.start_time}`]}),v.venue_name&&r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx(Ft,{className:"w-3.5 h-3.5 text-primary"}),v.venue_name]})]}),r.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-border",children:[r.jsx("span",{className:"font-semibold text-sm",children:v.is_free?"Free":v.price_standard?`From £${v.price_standard}`:"Price TBC"}),v.status==="sold_out"?r.jsx(ge,{variant:"destructive",className:"text-xs",children:"Sold Out"}):r.jsx(ge,{className:"text-xs bg-green-100 text-green-800",children:"Book Now"})]})]})]})},v.id))}):r.jsx("div",{className:"space-y-3",children:b.map(v=>r.jsx(se,{to:`/club/events/${v.id}`,children:r.jsx(oe,{className:"hover:shadow-md transition-shadow group",children:r.jsxs(ce,{className:"p-4 flex gap-4",children:[r.jsx("div",{className:"w-24 h-20 flex-shrink-0 rounded-lg overflow-hidden",children:v.hero_image?r.jsx("img",{src:v.hero_image,alt:v.title,className:"w-full h-full object-cover"}):r.jsx("div",{className:"w-full h-full bg-muted flex items-center justify-center",children:r.jsx(Jt,{className:"w-5 h-5 text-muted-foreground"})})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx("h3",{className:"font-semibold group-hover:text-primary transition-colors",children:v.title}),r.jsx(ge,{variant:"outline",className:"text-xs shrink-0",children:v.category}),v.is_vip_only&&r.jsx(ge,{className:"text-xs bg-primary text-primary-foreground shrink-0",children:"VIP"})]}),r.jsxs("div",{className:"flex flex-wrap gap-3 text-sm text-muted-foreground",children:[v.event_date&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Jt,{className:"w-3 h-3"}),new Date(v.event_date).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}),v.start_time&&` · ${v.start_time}`]}),v.venue_name&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Ft,{className:"w-3 h-3"}),v.venue_name]})]})]}),r.jsxs("div",{className:"text-right flex-shrink-0",children:[r.jsx("p",{className:"font-bold",children:v.is_free?"Free":v.price_standard?`£${v.price_standard}`:"TBC"}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"per ticket"})]})]})})},v.id))})]})]})}function dTe({event:e,onClose:t,onBooked:n}){const[s,a]=j.useState({name:"",email:"",ticket_type:"standard",quantity:1,special_requirements:""}),[i,o]=j.useState(!1),[l,c]=j.useState(!1),u=(v,g)=>a(y=>({...y,[v]:g})),m=[e.price_standard>0&&{value:"standard",label:`Standard â £${e.price_standard}`},e.price_premium>0&&{value:"premium",label:`Premium â £${e.price_premium}`},e.price_vip>0&&{value:"vip",label:`VIP â £${e.price_vip}`}
898].filter(Boolean),p=({standard:e.price_standard,premium:e.price_premium,vip:e.price_vip}[s.ticket_type]||0)*s.quantity,b=async()=>{o(!0);const v=`CM-${Date.now().toString(36).toUpperCase()}`;await W.entities.MemberBooking.create({event_id:e.id,booking_type:"event",user_email:s.email,user_name:s.name,ticket_type:s.ticket_type,quantity:s.quantity,total_paid:p,status:"confirmed",booking_reference:v,qr_code:v,special_requirements:s.special_requirements}),await W.entities.GuestList.create({event_id:e.id,event_title:e.title,guest_name:s.name,guest_email:s.email,ticket_type:s.ticket_type,status:"confirmed",booking_id:v}),c(!0),o(!1),setTimeout(n,2e3)};return l?r.jsx(hr,{open:!0,onOpenChange:t,children:r.jsx(or,{className:"max-w-sm text-center",children:r.jsxs("div",{className:"py-6",children:[r.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:r.jsx("span",{className:"text-3xl",children:"â"})}),r.jsx("h2",{className:"text-xl font-bold mb-2",children:"Booking Confirmed!"}),r.jsx("p",{className:"text-muted-foreground text-sm",children:"Your tickets have been booked. Check your email for confirmation."})]})})}):r.jsx(hr,{open:!0,onOpenChange:t,children:r.jsxs(or,{className:"max-w-md",children:[r.jsxs(kr,{children:[r.jsx(Cr,{children:"Book Tickets"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:e.title})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Full Name *"}),r.jsx(de,{value:s.name,onChange:v=>u("name",v.target.value),placeholder:"Your full name"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Email *"}),r.jsx(de,{value:s.email,onChange:v=>u("email",v.target.value),placeholder:"[email protected]"})]}),m.length>0&&r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Ticket Type"}),r.jsxs(Xe,{value:s.ticket_type,onValueChange:v=>u("ticket_type",v),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:m.map(v=>r.jsx(Pe,{value:v.value,children:v.label},v.value))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Quantity"}),r.jsxs(Xe,{value:String(s.quantity),onValueChange:v=>u("quantity",Number(v)),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:[1,2,3,4,5,6,8,10].map(v=>r.jsxs(Pe,{value:String(v),children:[v," ticket",v>1?"s":""]},v))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Special Requirements"}),r.jsx(de,{value:s.special_requirements,onChange:v=>u("special_requirements",v.target.value),placeholder:"Dietary requirements, accessibility needs..."})]}),p>0&&r.jsxs("div",{className:"bg-muted/30 rounded-lg p-3 flex justify-between items-center",children:[r.jsx("span",{className:"text-sm text-muted-foreground",children:"Total"}),r.jsxs("span",{className:"text-lg font-bold",children:["£",p.toLocaleString()]})]})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:t,children:"Cancel"}),r.jsx(K,{onClick:b,disabled:i||!s.name||!s.email,className:"bg-primary text-primary-foreground",children:i?"Booking...":e.is_free?"Reserve Place":`Book â £${p}`})]})]})})}function uTe(){const{id:e}=yo(),[t,n]=j.useState(null),[s,a]=j.useState(!0),[i,o]=j.useState(!1),[l,c]=j.useState(0),[u,m]=j.useState([]);if(j.useEffect(()=>{W.entities.Event.filter({id:e}).then(y=>{const w=y==null?void 0:y[0];n(w),a(!1),w!=null&&w.category&&W.entities.Event.filter({status:"published",category:w.category},"event_date",4).then(N=>m((N||[]).filter(S=>S.id!==e).slice(0,3)))})},[e]),s)return r.jsx("div",{className:"min-h-screen flex items-center justify-center",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-foreground rounded-full animate-spin"})});if(!t)return r.jsx("div",{className:"min-h-screen flex items-center justify-center",children:r.jsx("p",{className:"text-muted-foreground",children:"Event not found."})});const f=(()=>{try{return JSON.parse(t.gallery_images||"[]")}catch{return[]}})(),p=(()=>{try{return JSON.parse(t.speakers||"[]")}catch{return[]}})(),b=(()=>{try{return JSON.parse(t.sponsors||"[]")}catch{return[]}})(),v=t.tickets_available-(t.tickets_sold||0),g=t.capacity>0&&(t.tickets_sold||0)>=t.capacity;return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsxs("div",{className:"relative h-[50vh] min-h-[400px] overflow-hidden",children:[t.hero_image?r.jsx("img",{src:t.hero_image,alt:t.title,className:"w-full h-full object-cover"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-foreground to-foreground
898/80"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent"}),r.jsx("div",{className:"absolute top-4 left-4",children:r.jsx(se,{to:"/club/events",children:r.jsxs(K,{variant:"ghost",size:"sm",className:"text-white hover:bg-white/20",children:[r.jsx(Ct,{className:"w-4 h-4 mr-1"})," Events"]})})}),r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-8 max-w-7xl mx-auto",children:[r.jsxs("div",{className:"flex gap-2 mb-3",children:[r.jsx(ge,{variant:"outline",className:"border-white/40 text-white bg-black/30",children:t.category}),t.is_vip_only&&r.jsx(ge,{className:"bg-primary text-primary-foreground",children:"VIP Only"}),t.is_members_only&&r.jsx(ge,{className:"bg-white/20 text-white border border-white/30",children:"Members"})]}),r.jsx("h1",{className:"text-4xl md:text-5xl font-bold text-white font-heading leading-tight mb-2",children:t.title}),t.short_description&&r.jsx("p",{className:"text-white/70 text-lg",children:t.short_description})]})]}),r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-10",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[r.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[t.description&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-3",children:"About This Event"}),r.jsx("div",{className:"prose prose-sm max-w-none text-muted-foreground leading-relaxed whitespace-pre-wrap",children:t.description})]}),p.length>0&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-4",children:"Guest Speakers"}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:p.map((y,w)=>r.jsxs("div",{className:"text-center p-4 bg-muted/30 rounded-xl",children:[y.image&&r.jsx("img",{src:y.image,alt:y.name,className:"w-16 h-16 rounded-full object-cover mx-auto mb-2"}),r.jsx("p",{className:"font-semibold text-sm",children:y.name}),y.title&&r.jsx("p",{className:"text-xs text-muted-foreground",children:y.title}),y.company&&r.jsx("p",{className:"text-xs text-primary",children:y.company})]},w))})]}),f.length>0&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-4",children:"Gallery"}),r.jsxs("div",{className:"relative",children:[r.jsx("img",{src:f[l],alt:`Gallery ${l+1}`,className:"w-full h-64 object-cover rounded-xl"}),f.length>1&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>c(y=>(y-1+f.length)%f.length),className:"absolute left-2 top-1/2 -translate-y-1/2 w-8 h-8 bg-black/50 text-white rounded-full flex items-center justify-center hover:bg-black/70",children:r.jsx(Ym,{className:"w-4 h-4"})}),r.jsx("button",{onClick:()=>c(y=>(y+1)%f.length),className:"absolute right-2 top-1/2 -translate-y-1/2 w-8 h-8 bg-black/50 text-white rounded-full flex items-center justify-center hover:bg-black/70",children:r.jsx(Us,{className:"w-4 h-4"})}),r.jsx("div",{className:"flex gap-1 justify-center mt-2",children:f.map((y,w)=>r.jsx("button",{onClick:()=>c(w),className:`w-2 h-2 rounded-full transition-colors ${w===l?"bg-primary":"bg-muted"}`},w))})]})]}),r.jsx("div",{className:"grid grid-cols-5 gap-1 mt-2",children:f.slice(0,5).map((y,w)=>r.jsx("img",{src:y,alt:"",onClick:()=>c(w),className:`h-14 object-cover rounded cursor-pointer transition-opacity ${w===l?"ring-2 ring-primary":"opacity-60 hover:opacity-100"}`},w))})]}),b.length>0&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-4",children:"Sponsors & Partners"}),r.jsx("div",{className:"flex flex-wrap gap-4",children:b.map((y,w)=>r.jsxs("div",{className:"flex items-center gap-2 px-4 py-2 border border-border rounded-lg",children:[y.logo&&r.jsx("img",{src:y.logo,alt:y.name,className:"h-6 object-contain"}),r.jsx("span",{className:"text-sm font-medium",children:y.name}),y.tier&&r.jsx(ge,{variant:"outline",className:"text-xs",children:y.tier})]},w))})]}),t.post_event_coverage&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-3",children:"Event Coverage"}),r.jsx("div",{className:"prose prose-sm max-w-none text-muted-foreground whitespace-pre-wrap",children:t.post_event_coverage})]}),u.length>0&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-4",children:"Similar Events"}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:u.map(y=>r.jsx(se,{to:`/club/events/${y.id}`,children:r.jsxs(oe,{className:"hover:shadow-md transition-shadow overflow-hidden",children:[y.hero_image&&r.jsx("img",{src:y.hero_image,alt:y.title,className:"w-full h-28 object-cover"}),r.jsxs(ce,{className:"p-3",children:[r.jsx("p",{className:"font-semibold text-sm line-clamp-2",children:y.title}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:y.event_date&&new Date(y.event_date).toLocaleDateString("en-GB",{day:"numeric",month:"short"})})]})]})},y.id))})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(oe,{className:"sticky top-6",children:r.jsxs(ce,{className:"p-5 space-y-4",children:[r.jsx("div",{children:t.is_free?r.jsx("p",{className:"text-2xl font-bold text-green-700",children:"Free Event"}):r.jsxs("div",{className:"space-y-1",children:[t.price_standard>0&&r.jsxs("div",{className:"flex justify-between text-sm",children:[r.jsx("span",{children:"Standard"}),r.jsxs("span",{className:"font-semibold",children:["£",t.price_standard]})]}),t.price_premium>0&&r.jsxs("div",{className:"flex justify-between text-sm",children:[r.jsx("span",{children:"Premium"}),r.jsxs("span",{className:"font-semibold",children:["£",t.price_premium]})]}),t.price_vip>0&&r.jsxs("div",{className:"flex justify-between text-sm",children:[r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Lt,{className:"w-3 h-3 text-primary"}),"VIP"]}),r.jsxs("span",{className:"font-bold text-primary",children:["£",t.price_vip]})]})]})}),r.jsxs("div",{className:"space-y-2.5 text-sm",children:[t.event_date&&r.jsxs("div",{className:"flex items-start gap-2.5",children:[r.jsx(Jt,{className:"w-4 h-4 text-primary mt-0.5 flex-shrink-0"}),r.jsxs("div",{children:[r.jsx("p",{className:"font-medium",children:new Date(t.event_date).toLocaleDateString("en-GB",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}),t.start_time&&r.jsxs("p",{className:"text-muted-foreground",children:[t.start_time,t.end_time&&` â ${t.end_time}`]})]})]}),t.venue_name&&r.jsxs("div",{className:"flex items-start gap-2.5",children:[r.jsx(Ft,{className:"w-4 h-4 text-primary mt-0.5 flex-shrink-0"}),r.jsxs("div",{children:[r.jsx("p",{className:"font-medium",children:t.venue_name}),t.venue_address&&r.jsx("p",{className:"text-muted-foreground text-xs",children:t.venue_address})]})]}),t.capacity>0&&r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(vt,{className:"w-4 h-4 text-primary flex-shrink-0"}),r.jsxs("div",{children:[r.jsx("p",{children:v>0?`${v} places remaining`:g?"Sold out":`Capacity: ${t.capacity}`}),t.capacity>0&&r.jsx("div",{className:"w-full bg-muted rounded-full h-1 mt-1",children:r.jsx("div",{className:"bg-primary h-1 rounded-full",style:{width:`${Math.min(100,(t.tickets_sold||0)/t.capacity*100)}%`}})})]})]}),t.dress_code&&r.jsxs("div",{className:"flex items-center gap-2.5",children:[r.jsx(Lt,{className:"w-4 h-4 text-primary flex-shrink-0"}),r.jsxs("p",{children:["Dress code: ",t.dress_code]})]})]}),g?r.jsx(K,{className:"w-full",variant:"outline",disabled:!0,children:"Sold Out"}):t.status==="cancelled"?r.jsx(K,{className:"w-full",variant:"outline",disabled:!0,children:"Event Cancelled"}):r.jsx(K,{className:"w-full bg-primary text-primary-foreground",onClick:()=>o(!0),children:t.is_free?"Reserve Your Place":t.requires_invitation?"Request Invitation":"Book Tickets"}),t.waitlist_enabled&&g&&r.jsx(K,{variant:"outline",className:"w-full text-sm",onClick:()=>o(!0),children:"Join Waitlist"}),r.jsxs("div",{className:"flex gap-2 pt-1",children:[r.jsxs(K,{variant:"ghost",size:"sm",className:"flex-1 text-xs",children:[r.jsx(On,{className:"w-3 h-3 mr-1"}),"Save"]}),r.jsxs(K,{variant:"ghost",size:"sm",className:"flex-1 text-xs",children:[r.jsx(ws,{className:"w-3 h-3 mr-1"}),"Share"]})]})]})}),t.price_vip>0&&r.jsx(oe,{className:"border-primary/30 bg-primary/5",children:r.jsxs(ce,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx(Lt,{className:"w-4 h-4 text-primary"}),r.jsx("p",{className:"font-semibold text-sm",children:"VIP Experience"})]}),r.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Exclusive access, premium seating, private reception and meet the speakers."}),r.jsxs(K,{size:"sm",className:"w-full bg-primary text-primary-foreground text-xs",onClick:()=>o(!0),children:["Book VIP â £",t.price_vip]})]})}
898),t.is_members_only&&r.jsx(oe,{className:"border-foreground/20 bg-foreground/5",children:r.jsxs(ce,{className:"p-4 text-center",children:[r.jsx(Lt,{className:"w-5 h-5 mx-auto mb-2 text-foreground"}),r.jsx("p",{className:"text-sm font-semibold",children:"Members Only"}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1 mb-3",children:"This event is exclusive to Chelsea Monthly members."}),r.jsx(se,{to:"/membership",children:r.jsx(K,{variant:"outline",size:"sm",className:"w-full text-xs",children:"Become a Member"})})]})})]})]})}),i&&r.jsx(dTe,{event:t,onClose:()=>o(!1),onBooked:()=>o(!1)})]})}const N_=["January","February","March","April","May","June","July","August","September","October","November","December"],hTe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],__={"Restaurant Experiences":"bg-amber-100 text-amber-800 border-amber-200","Motoring Events":"bg-blue-100 text-blue-800 border-blue-200","Private Dining":"bg-purple-100 text-purple-800 border-purple-200","Business Networking":"bg-green-100 text-green-800 border-green-200","Luxury Travel Experiences":"bg-cyan-100 text-cyan-800 border-cyan-200","Fashion Events":"bg-pink-100 text-pink-800 border-pink-200","Wine Tastings":"bg-rose-100 text-rose-800 border-rose-200",default:"bg-primary/10 text-primary border-primary/20"};function mTe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),[a,i]=j.useState(new Date),[o,l]=j.useState("month"),[c,u]=j.useState("all");j.useEffect(()=>{W.entities.Event.filter({status:"published"},"event_date",200).then(k=>{t(k||[]),s(!1)})},[]);const m=a.getFullYear(),f=a.getMonth(),p=new Date(m,f,1),b=new Date(m,f+1,0),v=(p.getDay()+6)%7,g=b.getDate(),y=[];for(let k=0;k<v;k++)y.push(null);for(let k=1;k<=g;k++)y.push(k);const w=k=>{if(!k)return[];const C=`${m}-${String(f+1).padStart(2,"0")}-${String(k).padStart(2,"0")}`;return e.filter(T=>T.event_date===C&&(c==="all"||T.category===c))},N=["Luxury Travel Experiences","Restaurant Experiences","Hotel Experiences","Private Dining","Business Networking","Property Networking","Watch Collecting Events","Motoring Events","Supercar Experiences","Yacht Experiences","Fashion Events","Art & Culture Events","Chelsea Social Events","Kensington Events","Knightsbridge Events","Luxury Brand Launches","Wine Tastings","Champagne Experiences","Investor Events"],S=e.filter(k=>{const C=new Date(k.event_date);return C.getFullYear()===m&&C.getMonth()===f&&(c==="all"||k.category===c)}).sort((k,C)=>new Date(k.event_date)-new Date(C.event_date)),A=new Date;return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-8",children:r.jsxs("div",{className:"max-w-7xl mx-auto",children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-2",children:"Chelsea Monthly Club"}),r.jsx("h1",{className:"text-3xl font-bold font-heading",children:"Event Calendar"})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[r.jsxs("div",{className:"flex items-center justify-between mb-6 flex-wrap gap-3",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:()=>i(new Date(m,f-1)),className:"p-2 hover:bg-muted rounded-lg transition-colors",children:r.jsx(Ym,{className:"w-4 h-4"})}),r.jsxs("h2",{className:"text-xl font-bold font-heading min-w-40 text-center",children:[N_[f]," ",m]}),r.jsx("button",{onClick:()=>i(new Date(m,f+1)),className:"p-2 hover:bg-muted rounded-lg transition-colors",children:r.jsx(Us,{className:"w-4 h-4"})}),r.jsx(K,{variant:"outline",size:"sm",onClick:()=>i(new Date),children:"Today"})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs(Xe,{value:c,onValueChange:u,children:[r.jsx(He,{className:"h-8 w-48",children:r.jsx(Je,{placeholder:"All categories"})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Categories"}),N.map(k=>r.jsx(Pe,{value:k,children:k},k))]})]}),r.jsx("div",{className:"flex border border-border rounded-md overflow-hidden text-xs",children:["month","list"].map(k=>r.jsx("button",{onClick:()=>l(k),className:`px-3 py-1.5 capitalize transition-colors ${o===k?"bg-foreground text-background":"hover:bg-muted"}`,children:k},k))})]})]}),n?r.jsx("div",{className:"h-96 bg-muted rounded-xl animate-pulse"}):o==="month"?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"grid grid-cols-7 gap-px mb-1",children:hTe.map(k=>r.jsx("div",{className:"text-center text-xs font-medium text-muted-foreground py-2",children:k},k))}),r.jsx("div",{className:"grid grid-cols-7 gap-px bg-border rounded-xl overflow-hidden border border-border",children:y.map((k,C)=>{const T=w(k),P=k&&m===A.getFullYear()&&f===A.getMonth()&&k===A.getDate();return r.jsx("div",{className:`bg-card min-h-24 p-1.5 ${k?"":"bg-muted/30"}`,children:k&&r.jsxs(r.Fragment,{children:[r.jsx("div",{className:`w-7 h-7 flex items-center justify-center rounded-full text-sm font-medium mb-1 ${P?"bg-foreground text-background":"text-foreground"}`,children:k}),r.jsxs("div",{className:"space-y-0.5",children:[T.slice(0,3).map(R=>r.jsx(se,{to:`/club/events/${R.id}`,children:r.jsxs("div",{className:`text-xs px-1.5 py-0.5 rounded truncate border ${__[R.category]||__.default} hover:opacity-80 transition-opacity`,children:[R.start_time&&r.jsxs("span",{className:"opacity-60",children:[R.start_time," "]}),R.title]})},R.id)),T.length>3&&r.jsxs("div",{className:"text-xs text-muted-foreground px-1",children:["+",T.length-3," more"]})]})]})},C)})})]}):r.jsx("div",{className:"space-y-3",children:S.length===0?r.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[r.jsx(Jt,{className:"w-10 h-10 mx-auto mb-2 opacity-30"}),r.jsxs("p",{children:["No events in ",N_[f]," ",m]})]}):S.map(k=>r.jsx(se,{to:`/club/events/${k.id}`,children:r.jsx(oe,{className:"hover:shadow-md transition-shadow group",children:r.jsxs(ce,{className:"p-4 flex items-center gap-4",children:[r.jsxs("div",{className:"text-center bg-foreground text-background rounded-lg p-2 w-14 flex-shrink-0",children:[r.jsx("div",{className:"text-xs uppercase",children:N_[new Date(k.event_date).getMonth()].slice(0,3)}),r.jsx("div",{className:"text-2xl font-bold leading-none",children:new Date(k.event_date).getDate()})]}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("h3",{className:"font-semibold group-hover:text-primary transition-colors",children:k.title}),r.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground mt-1",children:[k.start_time&&r.jsx("span",{children:k.start_time}),k.venue_name&&r.jsxs("span",{children:["· ",k.venue_name]})]})]}),r.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[r.jsx(ge,{variant:"outline",className:"text-xs hidden md:inline-flex",children:k.category}),r.jsx("span",{className:"font-semibold text-sm",children:k.is_free?"Free":k.price_standard?`£${k.price_standard}`:"TBC"})]})]})})},k.id))}),r.jsx("div",{className:"mt-6 flex flex-wrap gap-3",children:Object.entries(__).filter(([k])=>k!=="default").slice(0,7).map(([k,C])=>r.jsx("div",{className:`text-xs px-2 py-1 rounded-full border ${C}`,children:k},k))})]})]})}const fTe=["Luxury Hotel Weekends","Restaurant Tasting Events","Private Jet Experiences","Luxury Travel Experiences","Supercar Experiences","Watch Collector Experiences","Luxury Property Tours","Wine & Champagne","Private Yacht","Spa & Wellness","Art & Culture","Fashion & Shopping"];function pTe({experience:e,onClose:t}){const[n,s]=j.useState({name:"",email:"",date:"",notes:""}),[a,i]=j.useState(!1),[o,l]=j.useState(!1),c=(()=>{try{return JSON.parse(e.includes||"[]")}catch{return[]}})(),u=async()=>{i(!0),await W.entities.MemberBooking.create({experience_id:e.id,booking_type:"experience",user_email:n.email,user_name:n.name,ticket_type:"standard",quantity:1,total_paid:e.price_members||e.price,status:"confirmed",booking_reference:`CMX-${Date.now().toString(36).toUpperCase()}`,notes:`Requested date: ${n.date}. ${n.notes}`}),l(!0),i(!1)};return r.jsx(hr,{open:!0,onOpenChange:t,children:r.jsxs(or,{className:"max-w-xl max-h-[90vh] overflow-y-auto",children:[e.hero_image&&r.jsx("img",{src:e.hero_image,alt:e.title,className:"w-full h-48 object-cover rounded-t-lg -mt-6 -mx-6 mb-4",style:{width:"calc(100% + 3rem)"}}),r.jsxs(kr,{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx(ge,{variant:"outline",className:"text-xs",children:e.category}),e.is_members_only&&r.jsx(ge,{className:"text-xs bg-foreground text-background",children:"Members"})]}),r.jsx(Cr,{className:"text-xl",children:e.title}),e.partner_brand&&r.jsx("p",{className:"text-sm text-primary font-medium",children:e.partner_brand})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-wrap gap-3 text-sm text-muted-foreground",children:[e.location&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Ft,{className:"w-3.5 h-3.5"}),e.location]}),e.duration&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Vt,{className:"w-3.5 h-3.5"}),e.duration]}),e.capacity&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(vt,{className:"w-3.5 h-3.5"}),"Max ",e.capacity," guests"]})]}),e.description&&r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.description}),c.length>0&&r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold text-sm mb-2",children:"What's included"}),r.jsx("div",{className:"grid grid-cols-2 gap-1",children:c.map((m,f)=>r.jsxs("div",{className:"flex items-center gap-1.5 text-sm",children:[r.jsx(ia,{className:"w-3 h-3 text-green-600 flex-shrink-0"}),m]},f))})]}),r.jsxs("div",{className:"bg-muted/30 rounded-lg p-3 flex justify-between items-center",children:[r.jsxs("div",{children:[e.price_members&&e.price_members<e.price&&r.jsxs("p",{className:"text-xs text-muted-foreground line-through",children:["£",e.price]}),r.jsxs("p",{className:"text-2xl font-bold",children:["£",e.price_members||e.price]}),e.is_members_only&&r.jsx("p",{className:"text-xs text-primary",children:"Members price"})]}),e.status==="sold_out"&&r.jsx(ge,{variant:"destructive",children:"Sold Out"})]}),o?r.jsxs("div",{className:"text-center py-4 bg-green-50 rounded-lg",children:[r.jsx("p",{className:"font-semibold text-green-800",children:"Booking Confirmed!"}),r.jsx("p",{className:"text-sm text-green-700 mt-1",children:"We'll be in touch to finalise your experience."})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"border-t pt-3",children:[r.jsx("p",{className:"font-semibold text-sm mb-3",children:"Enquire / Book"}),r.jsxs("div",{className:"space-y-2",children:[r.jsx(de,{placeholder:"Your full name",value:n.name,onChange:m=>s(f=>({...f,name:m.target.value}))}),r.jsx(de,{placeholder:"Email address",value:n.email,onChange:m=>s(f=>({...f,email:m.target.value}))}),r.jsx(de,{type:"date",placeholder:"Preferred date",value:n.date,onChange:m=>s(f=>({...f,date:m.target.value}))}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-16 resize-none bg-transparent",placeholder:"Special requirements or notes...",value:n.notes,onChange:m=>s(f=>({...f,notes:m.target.value}))})]})]}),r.jsx(K,{className:"w-full bg-primary text-primary-foreground",onClick:u,disabled:a||!n.email||!n.name||e.status==="sold_out",children:a?"Booking...":"Book This Experience"})]})]})]})})}function xTe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),[a,i]=j.useState("all"),[o,l]=j.useState(null);j.useEffect(()=>{W.entities.Experience.list("-created_date",100).then(u=>{t(u||[]),s(!1)})},[]);
898const c=e.filter(u=>a==="all"||u.category===a);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-10",children:r.jsxs("div",{className:"max-w-7xl mx-auto",children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-2",children:"Chelsea Monthly Club"}),r.jsx("h1",{className:"text-4xl font-bold font-heading mb-2",children:"Luxury Experiences"}),r.jsx("p",{className:"text-background/60",children:"Partner experiences curated exclusively for our members"})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[r.jsxs("div",{className:"flex gap-3 flex-wrap mb-6",children:[r.jsx("button",{onClick:()=>i("all"),className:`px-4 py-2 text-sm rounded-full border transition-colors ${a==="all"?"bg-foreground text-background border-foreground":"border-border hover:border-foreground"}`,children:"All Experiences"}),fTe.map(u=>r.jsx("button",{onClick:()=>i(u),className:`px-4 py-2 text-sm rounded-full border transition-colors ${a===u?"bg-foreground text-background border-foreground":"border-border hover:border-foreground"}`,children:u},u))]}),n?r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 animate-pulse",children:[...Array(6)].map((u,m)=>r.jsx("div",{className:"h-72 bg-muted rounded-xl"},m))}):r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[c.map(u=>r.jsxs(oe,{className:"overflow-hidden hover:shadow-xl transition-all duration-300 cursor-pointer group",onClick:()=>l(u),children:[r.jsxs("div",{className:"relative h-52 overflow-hidden",children:[u.hero_image?r.jsx("img",{src:u.hero_image,alt:u.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center",children:r.jsx(ir,{className:"w-10 h-10 text-primary opacity-40"})}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/40 to-transparent"}),r.jsxs("div",{className:"absolute top-3 left-3 flex gap-1",children:[u.is_members_only&&r.jsx(ge,{className:"text-xs bg-foreground text-background",children:"Members"}),u.featured&&r.jsx(ge,{className:"text-xs bg-primary text-primary-foreground",children:"Featured"}),u.status==="sold_out"&&r.jsx(ge,{variant:"destructive",className:"text-xs",children:"Sold Out"})]})]}),r.jsxs(ce,{className:"p-4",children:[r.jsx("p",{className:"text-xs text-primary font-medium mb-1",children:u.category}),r.jsx("h3",{className:"font-bold font-heading mb-1 group-hover:text-primary transition-colors",children:u.title}),u.partner_brand&&r.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:u.partner_brand}),r.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground mb-3",children:[u.location&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Ft,{className:"w-3 h-3"}),u.location]}),u.duration&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Vt,{className:"w-3 h-3"}),u.duration]})]}),r.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-border",children:[r.jsxs("div",{children:[u.price_members&&u.price_members<u.price&&r.jsxs("p",{className:"text-xs text-muted-foreground line-through",children:["£",u.price]}),r.jsxs("p",{className:"font-bold",children:["£",u.price_members||u.price]})]}),r.jsx(K,{size:"sm",variant:"outline",className:"text-xs",children:"View Details"})]})]})]},u.id)),c.length===0&&r.jsxs("div",{className:"col-span-3 text-center py-16 text-muted-foreground",children:[r.jsx(ir,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),r.jsx("p",{children:"No experiences in this category yet."})]})]})]}),o&&r.jsx(pTe,{experience:o,onClose:()=>l(null)})]})}const gTe=[{title:"Priority Event Access",description:"Book events before they open to the public. Guaranteed places at sold-out events.",category:"Events",icon:"Ticket",featured:!0,available_to:"all"},{title:"Members-Only Experiences",description:"Access to exclusive luxury experiences not available to non-members.",category:"Experiences",icon:"Star",featured:!0,available_to:"all"},{title:"Discounted Tickets",description:"10â25% discount on all standard and premium event tickets.",category:"Savings",icon:"Gift",featured:!1,available_to:"all"},{title:"Private Invitations",description:"Receive personal invitations to VIP and by-invitation-only events.",category:"VIP Access",icon:"Crown",featured:!0,available_to:"digital"},{title:"Exclusive Editorial Content",description:"Members-only articles, guides and luxury lifestyle features.",category:"Content",icon:"Lock",featured:!1,available_to:"all"},{title:"Partner Offers & Discounts",description:"Exclusive discounts at partner hotels, restaurants and luxury brands.",category:"Partners",icon:"Globe",featured:!1,available_to:"all"},{title:"Monthly Magazine Delivery",description:"Chelsea Monthly print edition delivered to your door each month.",category:"Magazine",icon:"Star",featured:!1,available_to:"print_digital"},{title:"Networking Community",description:"Connect with fellow members at events and through our digital community.",category:"Community",icon:"Globe",featured:!1,available_to:"all"}],_L={Crown:Lt,Star:rt,Gift:Rx,Lock:ba,Ticket:Fx,Globe:Zn};function yTe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0);j.useEffect(()=>{W.entities.MemberBenefit.filter({is_active:!0},"-featured",50).then(o=>{o!=null&&o.length?t(o):t(gTe.map((l,c)=>({...l,id:`default-${c}`}))),s(!1)})},[]);const a=e.filter(o=>o.featured),i=e.filter(o=>!o.featured);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsxs("div",{className:"bg-foreground text-background px-6 py-16 text-center",children:[r.jsx(Lt,{className:"w-10 h-10 text-primary mx-auto mb-4"}),r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-3",children:"Chelsea Monthly Club"}),r.jsx("h1",{className:"text-5xl font-bold font-heading mb-4",children:"Member Benefits"}),r.jsx("p",{className:"text-background/60 text-lg max-w-xl mx-auto",children:"Everything that comes with being part of London's most exclusive luxury lifestyle membership."})]}),r.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-12",children:[a.length>0&&r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 mb-10",children:a.map(o=>{const l=_L[o.icon]||rt;return r.jsx(oe,{className:"border-primary/20 bg-primary/5 hover:shadow-lg transition-shadow",children:r.jsxs(ce,{className:"p-6 text-center",children:[r.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3",children:r.jsx(l,{className:"w-6 h-6 text-primary"})}),r.jsx("h3",{className:"font-bold font-heading mb-2",children:o.title}),r.jsx("p",{className:"text-sm text-muted-foreground",children:o.description}),o.partner_brand&&r.jsx("p",{className:"text-xs text-primary mt-2 font-medium",children:o.partner_brand}),o.value&&r.jsxs("p",{className:"text-xs font-semibold text-green-700 mt-1",children:["Worth ",o.value]})]})},o.id)})}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-12",children:i.map(o=>{const l=_L[o.icon]||rt;return r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsxs(ce,{className:"p-4 flex items-start gap-3",children:[r.jsx("div",{className:"w-10 h-10 bg-muted rounded-lg flex items-center justify-center flex-shrink-0",children:r.jsx(l,{className:"w-5 h-5 text-primary"})}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx("h3",{className:"font-semibold text-sm",children:o.title}),o.available_to!=="all"&&r.jsx(ge,{variant:"outline",className:"text-xs capitalize",children:o.available_to.replace(/_/g," ")})]}),r.jsx("p",{className:"text-sm text-muted-foreground",children:o.description}),o.partner_brand&&r.jsx("p",{className:"text-xs text-primary mt-1",children:o.partner_brand})]}),o.redemption_url&&r.jsx("a",{href:o.redemption_url,target:"_blank",rel:"noopener noreferrer",children:r.jsx(Us,{className:"w-4 h-4 text-muted-foreground hover:text-primary"})})]})},o.id)})}),r.jsxs("div",{className:"bg-foreground text-background rounded-2xl p-10 text-center",children:[r.jsx(Lt,{className:"w-8 h-8 text-primary mx-auto mb-3"}),r.jsx("h2",{className:"text-3xl font-bold font-heading mb-2",children:"Ready to Join?"}),r.jsx("p",{className:"text-background/60 mb-6 max-w-md mx-auto",children:"From £15/month. Cancel anytime. All benefits from day one."}),r.jsx(se,{to:"/membership",children:r.jsx(K,{className:"bg-primary text-primary-foreground px-10 text-base",children:"Become a Member"})})]})]})]})}const ux=e=>
898`£${Number(e||0).toLocaleString("en-GB")}`;function vTe(){var o,l;const[e,t]=j.useState(null),[n,s]=j.useState(!0);j.useEffect(()=>{a()},[]);const a=async()=>{s(!0);const[c,u,m,f,p]=await Promise.all([W.entities.Event.list("-created_date",200),W.entities.MemberBooking.list("-created_date",200),W.entities.VIPGuest.list("-created_date",100),W.entities.EventSponsor.list("-created_date",100),W.entities.Experience.list("-created_date",100)]),b=u.reduce((w,N)=>w+(N.total_paid||0),0),v=f.reduce((w,N)=>w+(N.amount||0),0),g=c.filter(w=>w.status==="published"&&new Date(w.event_date)>=new Date),y=u.slice(0,5);t({totalEvents:c.length,upcomingEvents:g.length,totalBookings:u.length,confirmedBookings:u.filter(w=>w.status==="confirmed").length,ticketRevenue:b,sponsorRevenue:v,totalRevenue:b+v,vipGuests:m.length,activeExperiences:p.filter(w=>w.status==="active").length,recentBookings:y,topEvents:g.slice(0,5)}),s(!1)},i=[{label:"Event Manager",href:"/club/admin/events",icon:Jt,desc:"Create & manage events"},{label:"Experience Manager",href:"/club/admin/experiences",icon:rt,desc:"Partner luxury experiences"},{label:"Guest Management",href:"/club/admin/guests",icon:vt,desc:"Guest lists & check-in"},{label:"VIP Guests",href:"/club/admin/vip",icon:Lt,desc:"VIP list & invitations"},{label:"Revenue Dashboard",href:"/club/admin/revenue",icon:ya,desc:"Tickets, sponsors, P&L"},{label:"Sponsorship",href:"/club/admin/sponsorship",icon:$n,desc:"Event sponsors & packages"},{label:"Member Benefits",href:"/club/admin/benefits",icon:Rx,desc:"Manage member perks"},{label:"Venues",href:"/club/admin/venues",icon:Ft,desc:"Venue directory"}];return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-8",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-1",children:"Chelsea Monthly"}),r.jsx("h1",{className:"text-3xl font-bold font-heading mb-1",children:"Club Administration"}),r.jsx("p",{className:"text-background/60 text-sm",children:"Events, Experiences & Members Club Management"})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs(K,{variant:"outline",size:"sm",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",onClick:a,children:[r.jsx(ts,{className:"w-4 h-4 mr-1"}),"Refresh"]}),r.jsx(se,{to:"/club/admin/events",children:r.jsxs(K,{className:"bg-primary text-primary-foreground",children:[r.jsx(Jt,{className:"w-4 h-4 mr-2"}),"New Event"]})})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[n?r.jsx("div",{className:"grid grid-cols-4 gap-4 mb-8 animate-pulse",children:[...Array(8)].map((c,u)=>r.jsx("div",{className:"h-24 bg-muted rounded-lg"},u))}):r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[{label:"Total Revenue",value:ux(e==null?void 0:e.totalRevenue),sub:"Tickets + sponsors",color:"text-green-600",icon:Xr},{label:"Ticket Revenue",value:ux(e==null?void 0:e.ticketRevenue),sub:`${e==null?void 0:e.confirmedBookings} confirmed`,color:"text-blue-600",icon:Fx},{label:"Sponsor Revenue",value:ux(e==null?void 0:e.sponsorRevenue),sub:"Event sponsors",color:"text-purple-600",icon:$n},{label:"Total Bookings",value:e==null?void 0:e.totalBookings,sub:"All time",color:"text-foreground",icon:vt},{label:"Upcoming Events",value:e==null?void 0:e.upcomingEvents,sub:"Published",color:"text-cyan-600",icon:Jt},{label:"Total Events",value:e==null?void 0:e.totalEvents,sub:"All events",color:"text-foreground",icon:Jt},{label:"VIP Guests",value:e==null?void 0:e.vipGuests,sub:"In database",color:"text-amber-600",icon:Lt},{label:"Active Experiences",value:e==null?void 0:e.activeExperiences,sub:"Available now",color:"text-indigo-600",icon:rt}].map(({label:c,value:u,sub:m,color:f,icon:p})=>r.jsx(oe,{children:r.jsx(ce,{className:"pt-5",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:c}),r.jsx("p",{className:`text-2xl font-bold ${f}`,children:u}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:m})]}),r.jsx(p,{className:`w-5 h-5 ${f} opacity-30`})]})})},c))}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 mb-8",children:i.map(({label:c,href:u,icon:m,desc:f})=>r.jsx(se,{to:u,children:r.jsx(oe,{className:"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer group h-full",children:r.jsx(ce,{className:"pt-5 pb-4",children:r.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[r.jsx("div",{className:"w-9 h-9 bg-primary/10 rounded-lg flex items-center justify-center group-hover:bg-primary/20 transition-colors",children:r.jsx(m,{className:"w-4 h-4 text-primary"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold text-sm",children:c}),r.jsx("p",{className:"text-xs text-muted-foreground",children:f})]})]})})})},u))}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r.jsxs(oe,{children:[r.jsxs("div",{className:"flex items-center justify-between p-4 pb-2",children:[r.jsx("h3",{className:"font-semibold",children:"Recent Bookings"}),r.jsx(se,{to:"/club/admin/guests",children:r.jsx(K,{variant:"ghost",size:"sm",className:"text-xs",children:"View all"})})]}),r.jsx(ce,{className:"p-4 pt-0",children:(o=e==null?void 0:e.recentBookings)!=null&&o.length?e.recentBookings.map(c=>r.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium",children:c.user_name||c.user_email}),r.jsxs("p",{className:"text-xs text-muted-foreground capitalize",children:[c.ticket_type," ticket · ",c.booking_reference]})]}),r.jsxs("div",{className:"text-right",children:[r.jsx("p",{className:"text-sm font-semibold text-green-700",children:ux(c.total_paid)}),r.jsx(ge,{variant:"outline",className:"text-xs capitalize",children:c.status})]})]},c.id)):r.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No bookings yet."})})]}),r.jsxs(oe,{children:[r.jsxs("div",{className:"flex items-center justify-between p-4 pb-2",children:[r.jsx("h3",{className:"font-semibold",children:"Upcoming Events"}),r.jsx(se,{to:"/club/admin/events",children:r.jsx(K,{variant:"ghost",size:"sm",className:"text-xs",children:"Manage"})})]}),r.jsx(ce,{className:"p-4 pt-0",children:(l=e==null?void 0:e.topEvents)!=null&&l.length?e.topEvents.map(c=>r.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium line-clamp-1",children:c.title}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:[c.event_date&&new Date(c.event_date).toLocaleDateString("en-GB",{day:"numeric",month:"short"})," · ",c.venue_name]})]}),r.jsxs("div",{className:"text-right",children:[r.jsxs("p",{className:"text-xs text-muted-foreground",children:[c.tickets_sold||0,"/",c.capacity||"â"]}),r.jsx(ge,{variant:"outline",className:"text-xs",children:c.status})]})]},c.id)):r.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No upcoming events."})})]})]})]})]})}const bTe=["Luxury Travel Experiences","Restaurant Experiences","Hotel Experiences","Private Dining","Business Networking","Property Networking","Watch Collecting Events","Motoring Events","Supercar Experiences","Yacht Experiences","Fashion Events","Art & Culture Events","Chelsea Social Events","Kensington Events","Knightsbridge Events","Luxury Brand Launches","Wine Tastings","Champagne Experiences","Investor Events"],jTe={draft:"bg-gray-100 text-gray-800",published:"bg-green-100 text-green-800",sold_out:"bg-red-100 text-red-800",cancelled:"bg-gray-100 text-gray-500",completed:"bg-blue-100 text-blue-800"};function wTe({event:e,onSave:t,onClose:n}){const[s,a]=j.useState(e||{title:"",category:"Chelsea Social Events",status:"draft",description:"",short_description:"",hero_image:"",venue_name:"",venue_address:"",event_date:"",start_time:"",end_time:"",host_name:"",capacity:0,tickets_available:0,price_standard:0,price_premium:0,price_vip:0,is_members_only:!1,is_free:!1,requires_invitation:!1,featured:!1,dress_code:"",waitlist_enabled:!0,speakers:"[]",sponsors:"[]",gallery_images:"[]"}),[i,o]=j.useState(!1),l=(u,m)=>a(f=>({...f,[u]:m})),c=async()=>{o(!0),!s.slug&&s.title&&(s.slug=s.title.toLowerCase().replace(/[^a-z0-9]+/g,"-")),e!=null&&e.id?await W.entities.Event.update(e.id,s):await W.entities.Event.create(s),t()};return r.jsx(hr,{open:!0,onOpenChange:n,children:r.jsxs(or,{className:"max-w-2xl",children:[r.jsx(kr,{children:r.jsx(Cr,{children:e!=null&&e.id?"
898Edit Event":"Create New Event"})}),r.jsxs(Aa,{defaultValue:"basic",className:"w-full",children:[r.jsxs(Ys,{className:"mb-4 w-full",children:[r.jsx(ft,{value:"basic",className:"flex-1",children:"Basic Info"}),r.jsx(ft,{value:"tickets",className:"flex-1",children:"Tickets & Pricing"}),r.jsx(ft,{value:"content",className:"flex-1",children:"Content"}),r.jsx(ft,{value:"settings",className:"flex-1",children:"Settings"})]}),r.jsxs("div",{className:"max-h-[55vh] overflow-y-auto pr-1",children:[r.jsxs(pt,{value:"basic",className:"space-y-3 mt-0",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Event Title *"}),r.jsx(de,{value:s.title,onChange:u=>l("title",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Short Description"}),r.jsx(de,{value:s.short_description,onChange:u=>l("short_description",u.target.value)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Category"}),r.jsxs(Xe,{value:s.category,onValueChange:u=>l("category",u),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:bTe.map(u=>r.jsx(Pe,{value:u,children:u},u))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Status"}),r.jsxs(Xe,{value:s.status,onValueChange:u=>l("status",u),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["draft","published","sold_out","cancelled","completed"].map(u=>r.jsx(Pe,{value:u,children:u},u))})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Hero Image URL"}),r.jsx(de,{value:s.hero_image,onChange:u=>l("hero_image",u.target.value),placeholder:"https://..."})]}),r.jsxs("div",{className:"grid grid-cols-3 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Event Date"}),r.jsx(de,{type:"date",value:s.event_date,onChange:u=>l("event_date",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Start Time"}),r.jsx(de,{type:"time",value:s.start_time,onChange:u=>l("start_time",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"End Time"}),r.jsx(de,{type:"time",value:s.end_time,onChange:u=>l("end_time",u.target.value)})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Venue Name"}),r.jsx(de,{value:s.venue_name,onChange:u=>l("venue_name",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Venue Address"}),r.jsx(de,{value:s.venue_address,onChange:u=>l("venue_address",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Host Name"}),r.jsx(de,{value:s.host_name,onChange:u=>l("host_name",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Dress Code"}),r.jsx(de,{value:s.dress_code,onChange:u=>l("dress_code",u.target.value),placeholder:"Smart casual, Black tie..."})]})]}),r.jsxs(pt,{value:"tickets",className:"space-y-3 mt-0",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Capacity"}),r.jsx(de,{type:"number",value:s.capacity,onChange:u=>l("capacity",Number(u.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Tickets Available"}),r.jsx(de,{type:"number",value:s.tickets_available,onChange:u=>l("tickets_available",Number(u.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Standard Price (£)"}),r.jsx(de,{type:"number",value:s.price_standard,onChange:u=>l("price_standard",Number(u.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Premium Price (£)"}),r.jsx(de,{type:"number",value:s.price_premium,onChange:u=>l("price_premium",Number(u.target.value))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"VIP Price (£)"}),r.jsx(de,{type:"number",value:s.price_vip,onChange:u=>l("price_vip",Number(u.target.value))})]})]}),r.jsx("div",{className:"space-y-2",children:[{key:"is_free",label:"Free Event"},{key:"waitlist_enabled",label:"Enable Waitlist"}].map(({key:u,label:m})=>r.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:s[u],onChange:f=>l(u,f.target.checked),className:"rounded"}),m]},u))})]}),r.jsxs(pt,{value:"content",className:"space-y-3 mt-0",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Full Description"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-36 resize-none bg-transparent",value:s.description,onChange:u=>l("description",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Gallery Images (JSON array of URLs)"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-20 resize-none bg-transparent font-mono text-xs",value:s.gallery_images,onChange:u=>l("gallery_images",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Video URL"}),r.jsx(de,{value:s.video_url||"",onChange:u=>l("video_url",u.target.value),placeholder:"YouTube/Vimeo URL"})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"text-xs text-muted-foreground",children:["Speakers (JSON array: [",'{"name":"...","title":"...","company":"..."}',"])"]}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-20 resize-none bg-transparent font-mono text-xs",value:s.speakers,onChange:u=>l("speakers",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Post-Event Coverage"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-24 resize-none bg-transparent",value:s.post_event_coverage||"",onChange:u=>l("post_event_coverage",u.target.value)})]})]}),r.jsx(pt,{value:"settings",className:"space-y-3 mt-0",children:r.jsx("div",{className:"space-y-2",children:[{key:"featured",label:"Featured Event"},{key:"is_members_only",label:"Members Only"},{key:"is_vip_only",label:"VIP Only"},{key:"requires_invitation",label:"By Invitation Only"}].map(({key:u,label:m})=>r.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:s[u],onChange:f=>l(u,f.target.checked),className:"rounded"}),m]},u))})})]})]}),r.jsxs(Fn,{className:"mt-2",children:[r.jsx(K,{variant:"outline",onClick:n,children:"Cancel"}),r.jsx(K,{onClick:c,disabled:i||!s.title,className:"bg-primary text-primary-foreground",children:i?"Saving...":"Save Event"})]})]})})}function NTe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),[a,i]=j.useState(""),[o,l]=j.useState("all"),[c,u]=j.useState(!1),[m,f]=j.useState(null);j.useEffect(()=>{p()},[]);const p=async()=>{s(!0);const v=await W.entities.Event.list("-event_date",200);t(v||[]),s(!1)},b=e.filter(v=>{var g,y;return(o==="all"||v.status===o)&&(!a||((g=v.title)==null?void 0:g.toLowerCase().includes(a.toLowerCase()))||((y=v.venue_name)==null?void 0:y.toLowerCase().includes(a.toLowerCase())))});return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/club/admin",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Club Admin"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Event Manager"})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[r.jsxs("div",{className:"flex gap-3 items-center mb-6 flex-wrap",children:[r.jsx(de,{placeholder:"Search events...",className:"h-8 w-56",value:a,onChange:v=>i(v.target.value)}),r.jsxs(Xe,{value:o,onValueChange:l,children:[r.jsx(He,{className:"h-8 w-32",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All"}),["draft","published","sold_out","cancelled","completed"].map(v=>r.jsx(Pe,{value:v,children:v},v))]})]}),r.jsxs(K,{size:"sm",onClick:()=>{f(null),u(!0)},children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"New Event"]})]}),n?r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"space-y-3",children:[b.map(v=>r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsxs(ce,{className:"p-4 flex gap-4",children:[v.hero_image&&r.jsx("img",{src:v.hero_image,alt:v.title,className:"w-20 h-16 object-cover rounded flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx("h3",{className:"font-semibold",children:v.title}),r.jsx(ge,{className:`text-xs ${jTe[v.status]}`,children:v.status}),v.featured&&r.jsx(ge,{className:"text-xs bg-primary text-primary-foreground",children:"Featured"})]}),r.jsxs("div",{className:"flex flex-wrap gap-3 text-xs text-muted-foreground",children:[v.event_date&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Jt,{className:"w-3 h-3"}),new Date(v.event_date).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"})]}),v.venue_name&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Ft,{className:"w-3 h-3"}),v.venue_name]}),v.capacity>0&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(vt,{className:"w-3 h-3"}
898),v.tickets_sold||0,"/",v.capacity]})]})]}),r.jsxs("div",{className:"flex gap-1 items-start flex-shrink-0",children:[r.jsx(se,{to:`/club/events/${v.id}`,children:r.jsx(K,{variant:"ghost",size:"sm",children:r.jsx(Nr,{className:"w-4 h-4"})})}),r.jsx(K,{variant:"outline",size:"sm",onClick:()=>{f(v),u(!0)},children:r.jsx(c8,{className:"w-4 h-4"})})]})]})},v.id)),b.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No events found."})]})]}),c&&r.jsx(wTe,{event:m,onSave:()=>{u(!1),p()},onClose:()=>u(!1)})]})}const SL={confirmed:"bg-green-100 text-green-800",waitlisted:"bg-yellow-100 text-yellow-800",cancelled:"bg-gray-100 text-gray-600",attended:"bg-blue-100 text-blue-800",no_show:"bg-red-100 text-red-800",invited:"bg-purple-100 text-purple-800"},kL={standard:"bg-gray-100 text-gray-800",premium:"bg-blue-100 text-blue-800",vip:"bg-purple-100 text-purple-800",complimentary:"bg-green-100 text-green-800",press:"bg-orange-100 text-orange-800",sponsor:"bg-amber-100 text-amber-800"};function _Te(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState([]),[o,l]=j.useState([]),[c,u]=j.useState(!0),[m,f]=j.useState(""),[p,b]=j.useState("all"),[v,g]=j.useState("all"),[y,w]=j.useState("bookings");j.useEffect(()=>{N()},[]);const N=async()=>{u(!0);const[T,P,R,M]=await Promise.all([W.entities.MemberBooking.list("-created_date",300),W.entities.GuestList.list("-created_date",300),W.entities.VIPGuest.list("-created_date",100),W.entities.Event.list("-event_date",50)]);t(T||[]),s(P||[]),i(R||[]),l(M||[]),u(!1)},S=async(T,P)=>{const R=new Date().toISOString();P==="booking"?await W.entities.MemberBooking.update(T.id,{checked_in:!0,checked_in_at:R,status:"attended"}):await W.entities.GuestList.update(T.id,{checked_in:!0,checked_in_at:R,status:"attended"}),N()},A=e.filter(T=>{var P,R,M;return(p==="all"||T.event_id===p)&&(v==="all"||T.status===v)&&(!m||((P=T.user_name)==null?void 0:P.toLowerCase().includes(m.toLowerCase()))||((R=T.user_email)==null?void 0:R.toLowerCase().includes(m.toLowerCase()))||((M=T.booking_reference)==null?void 0:M.toLowerCase().includes(m.toLowerCase())))}),k=n.filter(T=>{var P,R;return(p==="all"||T.event_id===p)&&(v==="all"||T.status===v)&&(!m||((P=T.guest_name)==null?void 0:P.toLowerCase().includes(m.toLowerCase()))||((R=T.guest_email)==null?void 0:R.toLowerCase().includes(m.toLowerCase())))}),C=a.filter(T=>{var P,R;return!m||((P=T.full_name)==null?void 0:P.toLowerCase().includes(m.toLowerCase()))||((R=T.company)==null?void 0:R.toLowerCase().includes(m.toLowerCase()))});return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/club/admin",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Club Admin"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Guest Management"})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[r.jsx("div",{className:"grid grid-cols-4 gap-4 mb-6",children:[{label:"Total Bookings",value:e.length,color:"text-foreground"},{label:"Confirmed",value:e.filter(T=>T.status==="confirmed").length,color:"text-green-600"},{label:"Checked In",value:e.filter(T=>T.checked_in).length,color:"text-blue-600"},{label:"VIP Guests",value:a.length,color:"text-purple-600"}].map(T=>r.jsx(oe,{children:r.jsxs(ce,{className:"pt-4",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:T.label}),r.jsx("p",{className:`text-2xl font-bold ${T.color}`,children:T.value})]})},T.label))}),r.jsxs(Aa,{value:y,onValueChange:w,children:[r.jsxs("div",{className:"flex items-center justify-between mb-4 flex-wrap gap-3",children:[r.jsxs(Ys,{children:[r.jsxs(ft,{value:"bookings",children:["Bookings (",e.length,")"]}),r.jsxs(ft,{value:"guestlist",children:["Guest Lists (",n.length,")"]}),r.jsxs(ft,{value:"vip",children:["VIP Guests (",a.length,")"]})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs("div",{className:"relative",children:[r.jsx(dn,{className:"absolute left-2 top-2 w-4 h-4 text-muted-foreground"}),r.jsx(de,{placeholder:"Search...",className:"h-8 pl-7 w-48",value:m,onChange:T=>f(T.target.value)})]}),r.jsxs(Xe,{value:p,onValueChange:b,children:[r.jsx(He,{className:"h-8 w-44",children:r.jsx(Je,{placeholder:"All events"})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Events"}),o.map(T=>{var P;return r.jsx(Pe,{value:T.id,children:(P=T.title)==null?void 0:P.slice(0,30)},T.id)})]})]}),r.jsxs(Xe,{value:v,onValueChange:g,children:[r.jsx(He,{className:"h-8 w-32",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Status"}),["confirmed","waitlisted","attended","no_show","cancelled"].map(T=>r.jsx(Pe,{value:T,children:T},T))]})]})]})]}),r.jsx(pt,{value:"bookings",children:c?r.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"overflow-x-auto",children:[r.jsxs("table",{className:"w-full text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"text-xs text-muted-foreground border-b",children:[r.jsx("th",{className:"text-left pb-2 font-medium",children:"Guest"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Reference"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Ticket"}),r.jsx("th",{className:"text-right pb-2 font-medium",children:"Paid"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Status"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Check-in"}),r.jsx("th",{className:"pb-2"})]})}),r.jsx("tbody",{children:A.map(T=>r.jsxs("tr",{className:"border-b hover:bg-muted/30",children:[r.jsxs("td",{className:"py-2",children:[r.jsx("p",{className:"font-medium",children:T.user_name||"â"}),r.jsx("p",{className:"text-xs text-muted-foreground",children:T.user_email})]}),r.jsx("td",{className:"py-2 font-mono text-xs",children:T.booking_reference}),r.jsx("td",{className:"py-2",children:r.jsx(ge,{className:`text-xs ${kL[T.ticket_type]}`,children:T.ticket_type})}),r.jsxs("td",{className:"py-2 text-right font-semibold text-green-700",children:["£",T.total_paid]}),r.jsx("td",{className:"py-2",children:r.jsx(ge,{className:`text-xs ${SL[T.status]}`,children:T.status})}),r.jsx("td",{className:"py-2",children:T.checked_in?r.jsxs("span",{className:"text-xs text-green-700 flex items-center gap-1",children:[r.jsx(qt,{className:"w-3 h-3"}),T.checked_in_at?new Date(T.checked_in_at).toLocaleTimeString("en-GB",{hour:"2-digit",minute:"2-digit"}):"In"]}):r.jsx(K,{size:"sm",variant:"outline",className:"h-6 text-xs",onClick:()=>S(T,"booking"),children:"Check In"})}),r.jsx("td",{className:"py-2 text-right",children:r.jsx(K,{variant:"ghost",size:"sm",className:"h-6",children:r.jsx(AK,{className:"w-3 h-3"})})})]},T.id))})]}),A.length===0&&r.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No bookings found."})]})}),r.jsx(pt,{value:"guestlist",children:r.jsxs("div",{className:"overflow-x-auto",children:[r.jsxs("table",{className:"w-full text-sm",children:[r.jsx("thead",{children:r.jsxs("tr",{className:"text-xs text-muted-foreground border-b",children:[r.jsx("th",{className:"text-left pb-2 font-medium",children:"Guest"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Ticket Type"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Table"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Status"}),r.jsx("th",{className:"text-left pb-2 font-medium",children:"Dietary"}),r.jsx("th",{className:"pb-2"})]})}),r.jsx("tbody",{children:k.map(T=>r.jsxs("tr",{className:"border-b hover:bg-muted/30",children:[r.jsxs("td",{className:"py-2",children:[r.jsx("p",{className:"font-medium",children:T.guest_name}),r.jsx("p",{className:"text-xs text-muted-foreground",children:T.guest_email})]}),r.jsx("td",{className:"py-2",children:r.jsx(ge,{className:`text-xs ${kL[T.ticket_type]}`,children:T.ticket_type})}),r.jsx("td",{className:"py-2 text-muted-foreground text-xs",children:T.table_number||"â"}),r.jsx("td",{className:"py-2",children:r.jsx(ge,{className:`text-xs ${SL[T.status]}`,children:T.status})}),r.jsx("td",{className:"py-2 text-xs text-muted-foreground",children:T.dietary_requirements||"â"}),r.jsx("td",{className:"py-2",children:!T.checked_in&&r.jsx(K,{size:"sm",variant:"outline",className:"h-6 text-xs",onClick:()=>S(T,"guest"),children:"Check In"})})]},T.id))})]}),k.length===0&&r.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No guests found."})]})}),r.jsx(pt,{value:"vip",children:r.jsxs("div",{className:"grid gap-3",children:[C.map(T=>r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsxs(ce,{className:"p-4 flex items-center justify-between gap-4",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[T.photo_url?r.jsx("img",{src:T.photo_url,alt:T.full_name,className:"w-10 h-10 rounded-full object-cover"}):r.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center",children:r.jsx(Lt,{className:"w-5 h-5 text-primary"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold",children:T.full_name}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:[T.title&&`${T.title}, `,T.company]})]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ge,{variant:"outline",className:"text-xs capitalize",children:T.category}),r.jsx(ge,{className:"text-xs capitalize bg-primary text-primary-foreground",children:T.tier})]})]})}
898,T.id)),C.length===0&&r.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"No VIP guests found."})]})})]})]})]})}const gh=e=>`£${Number(e||0).toLocaleString("en-GB")}`,hx=["#c9a96e","#1a1a1a","#6b7280","#d97706","#059669","#7c3aed"];function STe(){var i,o,l;const[e,t]=j.useState(null),[n,s]=j.useState(!0);j.useEffect(()=>{a()},[]);const a=async()=>{s(!0);const[c,u,m,f]=await Promise.all([W.entities.MemberBooking.list("-created_date",500),W.entities.Event.list("-event_date",200),W.entities.EventSponsor.list("-created_date",100),W.entities.Experience.list("-created_date",50)]),p=c.filter(C=>C.status!=="cancelled").reduce((C,T)=>C+(T.total_paid||0),0),b=m.reduce((C,T)=>C+(T.amount||0),0),v={};c.forEach(C=>{C.event_id&&(v[C.event_id]=(v[C.event_id]||0)+(C.total_paid||0))});const g=Object.entries(v).map(([C,T])=>{var P,R;return{name:((R=(P=u.find(M=>M.id===C))==null?void 0:P.title)==null?void 0:R.slice(0,25))||C.slice(0,8),rev:T}}).sort((C,T)=>T.rev-C.rev).slice(0,6),y={};c.forEach(C=>{var P;const T=(P=C.created_date)==null?void 0:P.slice(0,7);T&&(y[T]=(y[T]||0)+(C.total_paid||0))});const w=Object.entries(y).sort().slice(-6).map(([C,T])=>({month:C.slice(5)+"/"+C.slice(2,4),value:T})),N={};c.forEach(C=>{N[C.ticket_type||"standard"]=(N[C.ticket_type||"standard"]||0)+1});const S=Object.entries(N).map(([C,T])=>({name:C,value:T})),A=u.filter(C=>C.capacity>0).reduce((C,T)=>C+T.capacity,0),k=u.reduce((C,T)=>C+(T.tickets_sold||0),0);t({ticketRev:p,sponsorRev:b,totalRev:p+b,totalBookings:c.length,confirmedBookings:c.filter(C=>C.status==="confirmed").length,attendedBookings:c.filter(C=>C.status==="attended").length,topEvents:g,revenueByMonth:w,ticketTypes:S,attendanceRate:A?Math.round(k/A*100):0,publishedEvents:u.filter(C=>C.status==="published").length,upcomingEvents:u.filter(C=>C.status==="published"&&new Date(C.event_date)>=new Date).length}),s(!1)};return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(se,{to:"/club/admin",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Club Admin"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Revenue Dashboard"})]})]}),r.jsxs(K,{variant:"outline",size:"sm",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",onClick:a,children:[r.jsx(ts,{className:"w-4 h-4 mr-1"}),"Refresh"]})]})}),r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-8",children:n?r.jsx("div",{className:"grid grid-cols-4 gap-4 animate-pulse",children:[...Array(8)].map((c,u)=>r.jsx("div",{className:"h-24 bg-muted rounded-lg"},u))}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[{label:"Total Revenue",value:gh(e==null?void 0:e.totalRev),color:"text-green-600",icon:Xr},{label:"Ticket Revenue",value:gh(e==null?void 0:e.ticketRev),color:"text-blue-600",icon:Fx},{label:"Sponsor Revenue",value:gh(e==null?void 0:e.sponsorRev),color:"text-purple-600",icon:$n},{label:"Total Bookings",value:e==null?void 0:e.totalBookings,color:"text-foreground",icon:vt},{label:"Confirmed",value:e==null?void 0:e.confirmedBookings,color:"text-green-600",icon:vt},{label:"Attended",value:e==null?void 0:e.attendedBookings,color:"text-blue-600",icon:vt},{label:"Attendance Rate",value:`${e==null?void 0:e.attendanceRate}%`,color:"text-amber-600",icon:Xr},{label:"Upcoming Events",value:e==null?void 0:e.upcomingEvents,color:"text-cyan-600",icon:Fx}].map(({label:c,value:u,color:m,icon:f})=>r.jsx(oe,{children:r.jsx(ce,{className:"pt-5",children:r.jsxs("div",{className:"flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:c}),r.jsx("p",{className:`text-2xl font-bold ${m}`,children:u})]}),r.jsx(f,{className:`w-5 h-5 ${m} opacity-30`})]})})},c))}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6",children:[r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2",children:r.jsx(ht,{className:"text-sm",children:"Revenue by Month"})}),r.jsx(ce,{children:(i=e==null?void 0:e.revenueByMonth)!=null&&i.length?r.jsx(bg,{width:"100%",height:200,children:r.jsxs(ly,{data:e.revenueByMonth,children:[r.jsx(Fm,{strokeDasharray:"3 3",stroke:"#f0f0f0"}),r.jsx(zl,{dataKey:"month",tick:{fontSize:11}}),r.jsx(Wl,{tick:{fontSize:11}
898,tickFormatter:c=>`£${(c/1e3).toFixed(0)}k`}),r.jsx(xn,{formatter:c=>gh(c)}),r.jsx(Gs,{dataKey:"value",fill:"hsl(var(--primary))",radius:[3,3,0,0]})]})}):r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No revenue data yet"})})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2",children:r.jsx(ht,{className:"text-sm",children:"Ticket Types"})}),r.jsx(ce,{children:(o=e==null?void 0:e.ticketTypes)!=null&&o.length?r.jsxs("div",{className:"flex items-center gap-4 justify-center",children:[r.jsxs(N9,{width:130,height:130,children:[r.jsx(Pa,{data:e.ticketTypes,dataKey:"value",cx:60,cy:60,outerRadius:55,children:e.ticketTypes.map((c,u)=>r.jsx(gf,{fill:hx[u%hx.length]},u))}),r.jsx(xn,{})]}),r.jsx("div",{className:"space-y-2",children:e.ticketTypes.map((c,u)=>r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:hx[u%hx.length]}}),r.jsx("span",{className:"capitalize",children:c.name}),r.jsx("span",{className:"text-muted-foreground ml-auto",children:c.value})]},c.name))})]}):r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No booking data yet"})})]})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2",children:r.jsx(ht,{className:"text-sm",children:"Top Events by Revenue"})}),r.jsx(ce,{children:(l=e==null?void 0:e.topEvents)!=null&&l.length?r.jsx("div",{className:"space-y-2",children:e.topEvents.map((c,u)=>r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-5 text-xs text-muted-foreground text-right",children:u+1}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[r.jsx("span",{className:"font-medium truncate",children:c.name}),r.jsx("span",{className:"text-green-700 font-semibold ml-2",children:gh(c.rev)})]}),r.jsx("div",{className:"w-full bg-muted h-1.5 rounded",children:r.jsx("div",{className:"h-1.5 rounded bg-primary",style:{width:`${c.rev/e.topEvents[0].rev*100}%`}})})]})]},c.name))}):r.jsx("p",{className:"text-sm text-muted-foreground text-center py-6",children:"No event revenue yet"})})]})]})})]})}const CL=[{value:"hotel",label:"Hotel Booking"},{value:"restaurant",label:"Restaurant Reservation"},{value:"travel",label:"Luxury Travel"},{value:"private_dining",label:"Private Dining"},{value:"chauffeur",label:"Chauffeur Service"},{value:"private_jet",label:"Private Jet Charter"},{value:"yacht",label:"Yacht Charter"},{value:"watch",label:"Watch Acquisition"},{value:"personal_shopping",label:"Personal Shopping"},{value:"wellness",label:"Wellness & Spa"},{value:"property",label:"Property Viewing"},{value:"general",label:"General Enquiry"}],kTe=["Under £500","£500 â £1,000","£1,000 â £2,500","£2,500 â £5,000","£5,000 â £10,000","£10,000 â £25,000","£25,000+","Please advise"];function Tv({onClose:e,defaultType:t=""}){const[n,s]=j.useState({request_type:t||"general",client_name:"",client_email:"",client_phone:"",description:"",preferred_date:"",guests:1,budget_range:"",special_requirements:"",flexible_dates:!1}),[a,i]=j.useState(!1),[o,l]=j.useState(!1),c=(m,f)=>s(p=>({...p,[m]:f})),u=async()=>{var f;i(!0);const m=`CCR-${Date.now().toString(36).toUpperCase()}`;await W.entities.ConciergeRequest.create({...n,reference:m,status:"new",source:"website",request_title:`${(f=CL.find(p=>p.value===n.request_type))==null?void 0:f.label} â ${n.client_name}`}),l(!0),i(!1)};return o?r.jsx(hr,{open:!0,onOpenChange:e,children:r.jsx(or,{className:"max-w-sm text-center",children:r.jsxs("div",{className:"py-8",children:[r.jsx("div",{className:"w-16 h-16 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-4",children:r.jsx(qt,{className:"w-8 h-8 text-primary"})}),r.jsx("h2",{className:"text-xl font-bold font-heading mb-2",children:"Request Received"}),r.jsx("p",{className:"text-muted-foreground text-sm mb-4",children:"Your concierge request has been submitted. Our team will be in touch within 2 hours."}),r.jsx(K,{className:"bg-primary text-primary-foreground",onClick:e,children:"Close"})]})})}):r.jsx(hr,{open:!0,onOpenChange:e,children:r.jsxs(or,{className:"max-w-lg max-h-[90vh] overflow-y-auto",children:[r.jsxs(kr,{children:[r.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r.jsx(Lt,{className:"w-5 h-5 text-primary"}),r.jsx(Cr,{className:"font-heading",children:"Concierge Request"})]}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"Our expert concierge team will respond within 2 hours."})]}),r.jsxs("div",{className:"space-y-3 mt-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Service Type *"}),r.jsxs(Xe,{value:n.request_type,onValueChange:m=>c("request_type",m),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:CL.map(m=>r.jsx(Pe,{value:m.value,children:m.label},m.value))})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Full Name *"}),r.jsx(de,{value:n.client_name,onChange:m=>c("client_name",m.target.value),placeholder:"Your full name"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Email *"}),r.jsx(de,{type:"email",value:n.client_email,onChange:m=>c("client_email",m.target.value),placeholder:"[email protected]"})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Phone"}),r.jsx(de,{value:n.client_phone,onChange:m=>c("client_phone",m.target.value),placeholder:"+44..."})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Number of Guests"}),r.jsxs(Xe,{value:String(n.guests),onValueChange:m=>c("guests",Number(m)),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:[1,2,3,4,5,6,8,10,15,20,50].map(m=>r.jsx(Pe,{value:String(m),children:m},m))})]})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Preferred Date"}),r.jsx(de,{type:"date",value:n.preferred_date,onChange:m=>c("preferred_date",m.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Budget Range"}),r.jsxs(Xe,{value:n.budget_range,onValueChange:m=>c("budget_range",m),children:[r.jsx(He,{children:r.jsx(Je,{placeholder:"Select budget"})}),r.jsx(Ge,{children:kTe.map(m=>r.jsx(Pe,{value:m,children:m},m))})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Tell us about your request *"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2.5 text-sm h-24 resize-none bg-transparent focus:outline-none focus:ring-1 focus:ring-ring",placeholder:"Please describe what you're looking for in as much detail as possible...",value:n.description,onChange:m=>c("description",m.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Special Requirements"}),r.jsx(de,{value:n.special_requirements,onChange:m=>c("special_requirements",m.target.value),placeholder:"Dietary requirements, accessibility, preferences..."})]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:n.flexible_dates,onChange:m=>c("flexible_dates",m.target.checked)}),"I am flexible on dates"]}),r.jsx(K,{className:"w-full bg-primary text-primary-foreground h-11",onClick:u,disabled:a||!n.client_name||!n.client_email||!n.description,children:a?"Submitting...":"Submit Concierge Request"}),r.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"Our team responds within 2 hours during business hours."})]})]})})}const CTe=[{name:"Hotels",icon:Km,href:"/concierge/partners?category=Hotels"},{name:"Restaurants",icon:d8,href:"/concierge/partners?category=Restaurants"},{name:"Private Aviation",icon:Dx,href:"/concierge/partners?category=Private+Aviation"},{name:"Yachts",icon:l8,href:"/concierge/partners?category=Yachts"},{name:"Motoring",icon:XL,href:"/concierge/partners?category=Motoring"},{name:"Watches",icon:xY,href:"/concierge/partners?category=Watches"},{name:"Fashion",icon:nk,href:"/concierge/partners?category=Fashion"},{name:"Wellness",icon:On,href:"/concierge/partners?category=Wellness"}];function S_({partner:e}){return r.jsx(se,{to:`/concierge/partners/${e.id}`,children:r.jsxs(oe,{className:"overflow-hidden hover:shadow-xl transition-all duration-300 group cursor-pointer h-full",children:[r.jsxs("div",{className:"relative h-52 overflow-hidden",children:[e.hero_image?r.jsx("img",{src:e.hero_image,alt:e.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-foreground to-foreground
898/80 flex items-center justify-center",children:r.jsx(Ja,{className:"w-10 h-10 text-primary opacity-40"})}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"}),e.featured&&r.jsx(ge,{className:"absolute top-3 left-3 bg-primary text-primary-foreground text-xs",children:"Featured"}),e.verified&&r.jsx(ge,{className:"absolute top-3 right-3 bg-white/20 text-white border border-white/30 text-xs backdrop-blur-sm",children:"â Verified"}),r.jsx("div",{className:"absolute bottom-3 left-3",children:r.jsx(ge,{variant:"outline",className:"border-white/30 text-white bg-black/20 text-xs backdrop-blur-sm",children:e.category})})]}),r.jsxs(ce,{className:"p-4",children:[r.jsxs("div",{className:"flex items-start justify-between mb-1",children:[r.jsx("h3",{className:"font-bold font-heading group-hover:text-primary transition-colors",children:e.name}),r.jsx("span",{className:"text-xs text-primary font-semibold ml-2 shrink-0",children:e.price_range})]}),e.tagline&&r.jsx("p",{className:"text-xs text-muted-foreground italic mb-2",children:e.tagline}),e.location&&r.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[r.jsx(Ft,{className:"w-3 h-3"}),e.location]}),e.rating>0&&r.jsxs("div",{className:"flex items-center gap-1 mt-2",children:[[...Array(5)].map((t,n)=>r.jsx(rt,{className:`w-3 h-3 ${n<Math.round(e.rating)?"text-primary fill-primary":"text-muted"}`},n)),r.jsxs("span",{className:"text-xs text-muted-foreground ml-1",children:["(",e.review_count,")"]})]})]})]})})}function ATe({exp:e}){return r.jsx(se,{to:`/concierge/experiences/${e.id}`,children:r.jsxs(oe,{className:"overflow-hidden hover:shadow-xl transition-all duration-300 group cursor-pointer",children:[r.jsxs("div",{className:"relative h-56 overflow-hidden",children:[e.hero_image?r.jsx("img",{src:e.hero_image,alt:e.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center",children:r.jsx(ir,{className:"w-10 h-10 text-primary opacity-50"})}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/70 to-transparent"}),e.featured&&r.jsx(ge,{className:"absolute top-3 left-3 bg-primary text-primary-foreground text-xs",children:"Featured"}),e.is_members_only&&r.jsx(ge,{className:"absolute top-3 right-3 bg-foreground text-background text-xs",children:"Members"}),r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-4",children:[r.jsx("p",{className:"text-white/60 text-xs mb-1",children:e.category}),r.jsx("h3",{className:"text-white font-bold font-heading leading-tight",children:e.title}),e.partner_name&&r.jsx("p",{className:"text-white/60 text-xs mt-1",children:e.partner_name})]})]}),r.jsxs(ce,{className:"p-3 flex items-center justify-between",children:[r.jsxs("div",{children:[e.location&&r.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[r.jsx(Ft,{className:"w-3 h-3"}),e.location]}),e.duration&&r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.duration})]}),r.jsx("div",{className:"text-right",children:e.price_display?r.jsx("p",{className:"font-bold text-sm",children:e.price_display}):e.price>0?r.jsxs("p",{className:"font-bold text-sm",children:["From £",e.price_members||e.price]}):null})]})]})})}function TTe(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState([]),[o,l]=j.useState(!0),[c,u]=j.useState(!1);j.useEffect(()=>{Promise.all([W.entities.LuxuryPartner.filter({status:"featured"},"-created_date",8),W.entities.VIPExperience.filter({status:"active",featured:!0},"-created_date",6),W.entities.PartnerOffer.filter({status:"active",featured:!0},"-created_date",4)]).then(([b,v,g])=>{t(b||[]),s(v||[]),i(g||[]),l(!1)})},[]);const m=e.filter(b=>b.featured),f=e.filter(b=>b.category==="Hotels").slice(0,3),p=e.filter(b=>b.category==="Restaurants").slice(0,3);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsxs("div",{className:"relative bg-foreground text-background overflow-hidden",children:[r.jsxs("div",{className:"absolute inset-0",children:[r.jsx("img",{src:"https://images.unsplash.com/photo-1551882547-ff40c63fe5fa?w=1800&q=80",alt:"",className:"w-full h-full object-cover opacity-20"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-foreground via-foreground
898/90 to-foreground/60"})]}),r.jsx("div",{className:"relative max-w-7xl mx-auto px-6 py-24",children:r.jsxs("div",{className:"max-w-2xl",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[r.jsx(Ja,{className:"w-4 h-4 text-primary"}),r.jsx("span",{className:"text-primary text-xs uppercase tracking-[0.4em] font-medium",children:"Chelsea Monthly"})]}),r.jsxs("h1",{className:"text-6xl font-bold font-heading mb-3 leading-none",children:["Chelsea",r.jsx("br",{}),r.jsx("span",{className:"text-primary",children:"Concierge"})]}),r.jsx("p",{className:"text-background/70 text-xl mb-2 italic font-light",children:`"Access London's Finest Experiences."`}),r.jsx("p",{className:"text-background/50 text-base mb-8 max-w-lg",children:"Your personal gateway to London's most exclusive hotels, restaurants, private aviation, luxury travel and bespoke experiences â curated for discerning Chelsea Monthly readers."}),r.jsxs("div",{className:"flex flex-wrap gap-3",children:[r.jsxs(K,{className:"bg-primary text-primary-foreground hover:bg-primary/90 px-8 h-11 text-sm font-semibold",onClick:()=>u(!0),children:[r.jsx(Lt,{className:"w-4 h-4 mr-2"})," Request Concierge Service"]}),r.jsx(se,{to:"/concierge/experiences",children:r.jsxs(K,{variant:"outline",className:"border-background/30 text-background hover:bg-background/10 hover:text-background px-8 h-11 text-sm",children:["Browse Experiences ",r.jsx(_t,{className:"w-4 h-4 ml-2"})]})})]})]})})]}),r.jsx("div",{className:"bg-background border-b border-border",children:r.jsx("div",{className:"max-w-7xl mx-auto px-6",children:r.jsx("div",{className:"flex gap-0 overflow-x-auto scrollbar-none",children:CTe.map(({name:b,icon:v,href:g})=>r.jsxs(se,{to:g,className:"flex flex-col items-center gap-1.5 px-5 py-4 text-center hover:text-primary hover:border-b-2 hover:border-primary transition-all group border-b-2 border-transparent shrink-0",children:[r.jsx(v,{className:"w-5 h-5 text-muted-foreground group-hover:text-primary transition-colors"}),r.jsx("span",{className:"text-xs font-medium whitespace-nowrap",children:b})]},b))})})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-12 space-y-16",children:[!o&&n.length>0&&r.jsxs("section",{children:[r.jsxs("div",{className:"flex items-end justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-primary text-xs uppercase tracking-widest font-medium mb-1",children:"Curated For You"}),r.jsx("h2",{className:"text-3xl font-bold font-heading",children:"Featured Experiences"})]}),r.jsx(se,{to:"/concierge/experiences",children:r.jsxs(K,{variant:"ghost",size:"sm",children:["View all ",r.jsx(_t,{className:"w-4 h-4 ml-1"})]})})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:n.slice(0,3).map(b=>r.jsx(ATe,{exp:b},b.id))})]}),!o&&f.length>0&&r.jsxs("section",{children:[r.jsxs("div",{className:"flex items-end justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-primary text-xs uppercase tracking-widest font-medium mb-1",children:"Where to Stay"}),r.jsx("h2",{className:"text-3xl font-bold font-heading",children:"Recommended Hotels"})]}),r.jsx(se,{to:"/concierge/partners?category=Hotels",children:r.jsxs(K,{variant:"ghost",size:"sm",children:["View all ",r.jsx(_t,{className:"w-4 h-4 ml-1"})]})})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:f.map(b=>r.jsx(S_,{partner:b},b.id))})]}),!o&&p.length>0&&r.jsxs("section",{children:[r.jsxs("div",{className:"flex items-end justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-primary text-xs uppercase tracking-widest font-medium mb-1",children:"Where to Dine"}),r.jsx("h2",{className:"text-3xl font-bold font-heading",children:"Recommended Restaurants"})]}),r.jsx(se,{to:"/concierge/partners?category=Restaurants",children:r.jsxs(K,{variant:"ghost",size:"sm",children:["View all ",r.jsx(_t,{className:"w-4 h-4 ml-1"})]})})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5",children:p.map(b=>r.jsx(S_,{partner:b},b.id))})]}),!o&&m.length>0&&r.jsxs("section",{children:[r.jsxs("div",{className:"flex items-end justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-primary text-xs uppercase tracking-widest font-medium mb-1",children:"Our Partners"}),r.jsx("h2",{className:"text-3xl font-bold font-heading",children:"Luxury Partners"})]}),r.jsx(se,{to:"/concierge/partners",children:r.jsxs(K,{variant:"ghost",size:"sm",children:["View all ",r.jsx(_t,{className:"w-4 h-4 ml-1"})]})})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:m.slice(0,8).map(b=>r.jsx(S_,{partner:b},b.id))})]}),!o&&a.length>0&&r.jsxs("section",{children:[r.jsxs("div",{className:"flex items-end justify-between mb-6",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-primary text-xs uppercase tracking-widest font-medium mb-1",children:"Exclusive to Members"}),r.jsx("h2",{className:"text-3xl font-bold font-heading",children:"Luxury Offers"})]}),r.jsx(se,{to:"/concierge/offers",children:r.jsxs(K,{variant:"ghost",size:"sm",children:["View all ",r.jsx(_t,{className:"w-4 h-4 ml-1"})]})})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4",children:a.map(b=>r.jsxs(oe,{className:"overflow-hidden hover:shadow-lg transition-shadow group",children:[b.image_url&&r.jsx("img",{src:b.image_url,alt:b.title,className:"w-full h-36 object-cover group-hover:opacity-90 transition-opacity"}),r.jsxs(ce,{className:"p-4",children:[r.jsx(ge,{variant:"outline",className:"text-xs mb-2 capitalize",children:b.offer_type}),r.jsx("h3",{className:"font-semibold text-sm mb-1 line-clamp-2",children:b.title}),r.jsx("p",{className:"text-xs text-muted-foreground mb-2",children:b.partner_name}),b.discount_value&&r.jsx("p",{className:"text-primary font-bold text-sm",children:b.discount_value}),b.redemption_url&&r.jsx("a",{href:b.redemption_url,target:"_blank",rel:"noopener noreferrer",children:r.jsx(K,{size:"sm",variant:"outline",className:"w-full mt-2 text-xs",children:"Claim Offer"})})]})]},b.id))})]}),r.jsxs("section",{className:"bg-foreground text-background rounded-2xl p-10",children:[r.jsxs("div",{className:"text-center mb-8",children:[r.jsx(Lt,{className:"w-8 h-8 text-primary mx-auto mb-3"}),r.jsx("h2",{className:"text-3xl font-bold font-heading mb-2",children:"Concierge Services"}),r.jsx("p",{className:"text-background/60 max-w-xl mx-auto",children:"Our expert concierge team is available to assist with any request â from dinner reservations to private jet charters."})]}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[{label:"Restaurant Reservations",icon:d8},{label:"Hotel Bookings",icon:Km},{label:"Private Aviation",icon:Dx}
898,{label:"Yacht Charters",icon:l8},{label:"Chauffeur Services",icon:XL},{label:"Personal Shopping",icon:nk},{label:"Luxury Travel",icon:Ft},{label:"VIP Experiences",icon:rt}].map(({label:b,icon:v})=>r.jsxs("button",{onClick:()=>u(!0),className:"p-4 rounded-xl border border-background/10 hover:border-primary/50 hover:bg-background/5 transition-all text-center group",children:[r.jsx(v,{className:"w-6 h-6 text-primary mx-auto mb-2 group-hover:scale-110 transition-transform"}),r.jsx("p",{className:"text-xs text-background/70 font-medium",children:b})]},b))}),r.jsx("div",{className:"text-center",children:r.jsx(K,{className:"bg-primary text-primary-foreground px-10 h-11",onClick:()=>u(!0),children:"Make a Concierge Request"})})]}),r.jsxs("section",{children:[r.jsxs("div",{className:"text-center mb-8",children:[r.jsx("p",{className:"text-primary text-xs uppercase tracking-widest font-medium mb-1",children:"Exclusive Access"}),r.jsx("h2",{className:"text-3xl font-bold font-heading mb-2",children:"Member Benefits"}),r.jsx("p",{className:"text-muted-foreground max-w-xl mx-auto text-sm",children:"Chelsea Monthly members receive priority access, exclusive rates and VIP treatment across our partner network."})]}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[{title:"Exclusive Rates",desc:"Members-only pricing across all partners",icon:Ja},{title:"Priority Bookings",desc:"First access to limited experiences",icon:Lt},{title:"VIP Upgrades",desc:"Complimentary upgrades where available",icon:rt},{title:"Dedicated Concierge",desc:"Personal service for every request",icon:vt}].map(({title:b,desc:v,icon:g})=>r.jsx(oe,{className:"border-primary/20 hover:border-primary/50 transition-colors",children:r.jsxs(ce,{className:"p-5 text-center",children:[r.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-full flex items-center justify-center mx-auto mb-3",children:r.jsx(g,{className:"w-5 h-5 text-primary"})}),r.jsx("h3",{className:"font-semibold text-sm mb-1",children:b}),r.jsx("p",{className:"text-xs text-muted-foreground",children:v})]})},b))}),r.jsx("div",{className:"text-center mt-6",children:r.jsx(se,{to:"/membership",children:r.jsx(K,{variant:"outline",children:"Become a Member"})})})]}),o&&r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-4 animate-pulse",children:[...Array(8)].map((b,v)=>r.jsx("div",{className:"h-64 bg-muted rounded-xl"},v))})]}),c&&r.jsx(Tv,{onClose:()=>u(!1)})]})}const ETe=["Hotels","Restaurants","Travel","Property","Fashion","Watches","Jewellery","Yachts","Private Aviation","Wellness","Beauty","Business Services","Luxury Retail","Motoring","Fine Dining","Private Members Clubs"],PTe=["£","££","£££","££££","£££££"];function OTe(){const e=Yl(),t=new URLSearchParams(e.search),[n,s]=j.useState([]),[a,i]=j.useState(!0),[o,l]=j.useState(""),[c,u]=j.useState(t.get("category")||"all"),[m,f]=j.useState("all"),[p,b]=j.useState("featured");j.useEffect(()=>{W.entities.LuxuryPartner.filter({status:"active"},"-featured",200).then(g=>{s(g||[]),i(!1)})},[]);const v=n.filter(g=>{var S,A,k;const y=!o||((S=g.name)==null?void 0:S.toLowerCase().includes(o.toLowerCase()))||((A=g.location)==null?void 0:A.toLowerCase().includes(o.toLowerCase()))||((k=g.tagline)==null?void 0:k.toLowerCase().includes(o.toLowerCase())),w=c==="all"||g.category===c,N=m==="all"||g.price_range===m;return y&&w&&N}).sort((g,y)=>{var w;return p==="featured"?(y.featured?1:0)-(g.featured?1:0):p==="rating"?(y.rating||0)-(g.rating||0):p==="name"?(w=g.name)==null?void 0:w.localeCompare(y.name):0});return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-10",children:r.jsxs("div",{className:"max-w-7xl mx-auto",children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-2",children:"Chelsea Concierge"}),r.jsx("h1",{className:"text-4xl font-bold font-heading mb-2",children:"Luxury Partners"}),r.jsx("p",{className:"text-background/60",children:"London's finest hotels, restaurants, experiences and services"})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[r.jsxs("div",{className:"flex flex-wrap gap-3 items-center mb-6",children:[r.jsxs("div",{className:"relative flex-1 min-w-48",children:[r.jsx(dn,{className:"absolute left-2.5 top-2 w-4 h-4 text-muted-foreground"}),r.jsx(de,{placeholder:"Search partners...",className:"pl-8 h-9",value:o,onChange:g=>l(g.target.value)})]}),r.jsxs(Xe,{value:c,onValueChange:u,children:[r.jsx(He,{className:"h-9 w-48",children:r.jsx(Je,{placeholder:"All categories"})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Categories"}),ETe.map(g=>r.jsx(Pe,{value:g,children:g},g))]})]}),r.jsxs(Xe,{value:m,onValueChange:f,children:[r.jsx(He,{className:"h-9 w-36",children:r.jsx(Je,{placeholder:"Price range"})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"Any Price"}),PTe.map(g=>r.jsx(Pe,{value:g,children:g},g))]})]}),r.jsxs(Xe,{value:p,onValueChange:b,children:[r.jsx(He,{className:"h-9 w-36",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"featured",children:"Featured First"}
898),r.jsx(Pe,{value:"rating",children:"Highest Rated"}),r.jsx(Pe,{value:"name",children:"AâZ"})]})]})]}),r.jsxs("p",{className:"text-sm text-muted-foreground mb-5",children:[v.length," partner",v.length!==1?"s":""," found"]}),a?r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-5 animate-pulse",children:[...Array(8)].map((g,y)=>r.jsx("div",{className:"h-64 bg-muted rounded-xl"},y))}):v.length===0?r.jsxs("div",{className:"text-center py-20 text-muted-foreground",children:[r.jsx(Ja,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),r.jsx("p",{children:"No partners found. Try adjusting your filters."})]}):r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-5",children:v.map(g=>r.jsx(se,{to:`/concierge/partners/${g.id}`,children:r.jsxs(oe,{className:"overflow-hidden hover:shadow-xl transition-all duration-300 group cursor-pointer h-full",children:[r.jsxs("div",{className:"relative h-48 overflow-hidden",children:[g.hero_image?r.jsx("img",{src:g.hero_image,alt:g.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-foreground to-foreground/70 flex items-center justify-center",children:r.jsx(Ja,{className:"w-8 h-8 text-primary opacity-40"})}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/50 to-transparent"}),g.featured&&r.jsx(ge,{className:"absolute top-2 left-2 bg-primary text-primary-foreground text-xs",children:"Featured"}),r.jsx(ge,{variant:"outline",className:"absolute bottom-2 left-2 border-white/30 text-white bg-black/20 text-xs",children:g.category})]}),r.jsxs(ce,{className:"p-4",children:[r.jsxs("div",{className:"flex justify-between items-start mb-1",children:[r.jsx("h3",{className:"font-bold text-sm group-hover:text-primary transition-colors",children:g.name}),r.jsx("span",{className:"text-xs text-primary font-semibold ml-1 shrink-0",children:g.price_range})]}),g.tagline&&r.jsx("p",{className:"text-xs text-muted-foreground italic mb-1 line-clamp-1",children:g.tagline}),g.location&&r.jsxs("p",{className:"text-xs text-muted-foreground flex items-center gap-1",children:[r.jsx(Ft,{className:"w-3 h-3"}),g.location]}),g.rating>0&&r.jsxs("div",{className:"flex items-center gap-0.5 mt-1.5",children:[[...Array(5)].map((y,w)=>r.jsx(rt,{className:`w-3 h-3 ${w<Math.round(g.rating)?"text-primary fill-primary":"text-muted"}`},w)),r.jsxs("span",{className:"text-xs text-muted-foreground ml-1",children:["(",g.review_count,")"]})]})]})]})},g.id))})]})]})}function MTe(){const{id:e}=yo(),[t,n]=j.useState(null),[s,a]=j.useState([]),[i,o]=j.useState([]),[l,c]=j.useState(!0),[u,m]=j.useState(0),[f,p]=j.useState(!1);if(j.useEffect(()=>{Promise.all([W.entities.LuxuryPartner.filter({id:e}),W.entities.PartnerOffer.filter({partner_id:e,status:"active"}),W.entities.VIPExperience.filter({partner_id:e,status:"active"})]).then(([y,w,N])=>{n(y==null?void 0:y[0]),a(w||[]),o(N||[]),c(!1)})},[e]),l)return r.jsx("div",{className:"min-h-screen flex items-center justify-center",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-foreground rounded-full animate-spin"})});if(!t)return r.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:"Partner not found."});const b=(()=>{try{return JSON.parse(t.gallery_images||"[]")}catch{return[]}})(),v=(()=>{try{return JSON.parse(t.services||"[]")}catch{return[]}})(),g=(()=>{try{return JSON.parse(t.member_benefits||"[]")}catch{return[]}})();return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsxs("div",{className:"relative h-[55vh] min-h-[420px] overflow-hidden",children:[t.hero_image?r.jsx("img",{src:t.hero_image,alt:t.name,className:"w-full h-full object-cover"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-foreground to-foreground/80"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent"}),r.jsx("div",{className:"absolute top-4 left-4",children:r.jsx(se,{to:"/concierge/partners",children:r.jsxs(K,{variant:"ghost",size:"sm",className:"text-white hover:bg-white/20",children:[r.jsx(Ct,{className:"w-4 h-4 mr-1"}),"Partners"]})})}),r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 max-w-7xl mx-auto px-8 pb-8",children:[r.jsxs("div",{className:"flex gap-2 mb-3",children:[r.jsx(ge,{variant:"outline",className:"border-white/30 text-white bg-black/20",children:t.category}),t.verified&&r.jsx(ge,{className:"bg-primary text-primary-foreground",children:"â Verified Partner"}),t.featured&&r.jsx(ge,{className:"bg-white/20 text-white border border-white/30",children:"Featured"})]}),r.jsx("h1",{className:"text-5xl font-bold text-white font-heading mb-1",children:t.name}),t.tagline&&r.jsx("p",{className:"text-white/70 text-lg italic",children:t.tagline}),r.jsxs("div",{className:"flex items-center gap-4 mt-2",children:[t.rating>0&&r.jsxs("div",{className:"flex items-center gap-1",children:[[...Array(5)].map((y,w)=>r.jsx(rt,{className:`w-4 h-4 ${w<Math.round(t.rating)?"text-primary fill-primary":"text-white/30"}`},w)),r.jsxs("span",{className:"text-white/60 text-sm ml-1",children:["(",t.review_count," reviews)"]})]}),r.jsx("span",{className:"text-primary font-bold text-lg",children:t.price_range})]})]})]}),r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-10",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[r.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[t.description&&r.jsxs("div",{children:[r.jsxs("h2",{className:"text-xl font-bold font-heading mb-3",children:["About ",t.name]}),r.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:t.description})]}),v.length>0&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-4",children:"Services"}),r.jsx("div",{className:"grid grid-cols-2 gap-2",children:v.map((y,w)=>r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx(qt,{className:"w-4 h-4 text-primary shrink-0"}),y]},w))})]}),g.length>0&&r.jsxs("div",{className:"bg-primary/5 border border-primary/20 rounded-xl p-5",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[r.jsx(Lt,{className:"w-4 h-4 text-primary"}),r.jsx("h2",{className:"font-bold font-heading",children:"Member Benefits"})]}),r.jsx("div",{className:"space-y-2",children:g.map((y,w)=>r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx(rt,{className:"w-3.5 h-3.5 text-primary shrink-0"}),y]},w))})]}),b.length>0&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-4",children:"Gallery"}),r.jsxs("div",{className:"relative rounded-xl overflow-hidden",children:[r.jsx("img",{src:b[u],alt:"",className:"w-full h-72 object-cover"}),b.length>1&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>m(y=>(y-1+b.length)%b.length),className:"absolute left-3 top-1/2 -translate-y-1/2 w-9 h-9 bg-black/50 text-white rounded-full flex items-center justify-center hover:bg-black/70",children:r.jsx(Ym,{className:"w-4 h-4"})}),r.jsx("button",{onClick:()=>m(y=>(y+1)%b.length),className:"absolute right-3 top-1/2 -translate-y-1/2 w-9 h-9 bg-black/50 text-white rounded-full flex items-center justify-center hover:bg-black/70",children:r.jsx(Us,{className:"w-4 h-4"})})]})]}),r.jsx("div",{className:"flex gap-1 mt-2",children:b.map((y,w)=>r.jsx("img",{src:y,alt:"",onClick:()=>m(w),className:`h-14 w-20 object-cover rounded cursor-pointer transition-opacity ${w===u?"ring-2 ring-primary":"opacity-60 hover:opacity-100"}`},w))})]}),i.length>0&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-4",children:"Available Experiences"}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:i.map(y=>r.jsx(se,{to:`/concierge/experiences/${y.id}`,children:r.jsxs(oe,{className:"hover:shadow-md transition-shadow group overflow-hidden",children:[y.hero_image&&r.jsx("img",{src:y.hero_image,alt:y.title,className:"w-full h-32 object-cover group-hover:opacity-90 transition-opacity"}),r.jsxs(ce,{className:"p-3",children:[r.jsx("h3",{className:"font-semibold text-sm group-hover:text-primary transition-colors",children:y.title}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[y.location," · ",y.duration]}),r.jsx("p",{className:"font-bold text-sm mt-1",children:y.price_display||(y.price>0?`From £${y.price}`:"")})]})]})},y.id))})]}),s.length>0&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-4",children:"Current Offers"}),r.jsx("div",{className:"space-y-3",children:s.map(y=>r.jsx(oe,{className:"border-primary/20",children:r.jsxs(ce,{className:"p-4 flex items-center justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx(ge,{variant:"outline",className:"text-xs mb-1 capitalize",children:y.offer_type}),r.jsx("h3",{className:"font-semibold text-sm",children:y.title}),r.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:y.description}),y.discount_value&&r.jsx("p",{className:"text-primary font-bold text-sm mt-1",children:y.discount_value})]}),y.redemption_url&&r.jsx("a",{href:y.redemption_url,target:"_blank",rel:"noopener noreferrer",children:r.jsx(K,{size:"sm",variant:"outline",className:"text-xs shrink-0",children:"Claim"})})]})},y.id))})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(oe,{className:"sticky top-6",children:r.jsxs(ce,{className:"p-5 space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("p",{className:"font-bold font-heading",children:"Book with Concierge"}),r.jsx("span",{className:"text-primary font-bold",children:t.price_range})]}),r.jsxs(K,{className:"w-full bg-primary text-primary-foreground h-10",onClick:()=>p(!0),children:[r.jsx(Lt,{className:"w-4 h-4 mr-2"})," Make a Reservation"]}),r.jsx(K,{variant:"outline",className:"w-full",onClick:()=>p(!0),children:"Request a Quote"}),r.jsxs("div",{className:"pt-2 border-t border-border space-y-2.5 text-sm",children:[t.location&&r.jsxs("div",{className:"flex items-start gap-2",children:[r.jsx(Ft,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),r.jsx("span",{className:"text-muted-foreground",children:t.address||t.location})]}),t.phone&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Hl,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("a",{href:`tel:${t.phone}`,className:"text-muted-foreground hover:text-primary transition-colors",children:t.phone})]}),t.email&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(es,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("a",{href:`mailto:${t.email}`,className:"text-muted-foreground hover:text-primary transition-colors truncate",children:t.email})]}),t.website&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Zn,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("a",{href:t.website,target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-primary transition-colors truncate",children:t.website.replace(/^https?:\/\//,"")})]})]}),t.availability_notes&&r.jsxs("div",{className:"bg-muted/30 rounded-lg p-3 text-xs text-muted-foreground",children:[r.jsx("p",{className:"font-medium text-foreground mb-0.5",children:"Availability"}),r.jsx("p",{children:t.availability_notes})]}),t.booking_lead_time&&r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Booking lead time: ",t.booking_lead_time]})]})}),g.length>0&&r.jsx(oe,{className:"border-primary/20 bg-primary/5",children:r.jsxs(ce,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx(Lt,{className:"w-4 h-4 text-primary"}),r.jsx("p",{className:"font-semibold text-sm",children:"Member Exclusive"})]}),r.jsx("p",{className:"text-xs text-muted-foreground mb-3",children:"Chelsea Monthly members receive exclusive benef
898its at this partner."}),r.jsx(se,{to:"/membership",children:r.jsx(K,{size:"sm",variant:"outline",className:"w-full text-xs",children:"Join to Access Benefits"})})]})})]})]})}),f&&r.jsx(Tv,{onClose:()=>p(!1)})]})}const RTe=["Luxury Hotel Weekends","Restaurant Tastings","Private Chef Experiences","Wine Experiences","Watch Collector Experiences","Supercar Experiences","Luxury Travel Packages","Private Jet Experiences","Yacht Experiences","Property Viewing Experiences","Private Dining","Wellness & Spa","Fashion & Shopping","Art & Culture","Motorsport"];function ITe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),[a,i]=j.useState(""),[o,l]=j.useState("all"),[c,u]=j.useState("featured"),[m,f]=j.useState(!1),[p,b]=j.useState(null);j.useEffect(()=>{W.entities.VIPExperience.filter({status:"active"},"-created_date",200).then(g=>{t(g||[]),s(!1)})},[]);const v=e.filter(g=>{var N,S;const y=!a||((N=g.title)==null?void 0:N.toLowerCase().includes(a.toLowerCase()))||((S=g.location)==null?void 0:S.toLowerCase().includes(a.toLowerCase())),w=o==="all"||g.category===o;return y&&w}).sort((g,y)=>c==="price_asc"?(g.price||0)-(y.price||0):c==="price_desc"?(y.price||0)-(g.price||0):c==="featured"?(y.featured?1:0)-(g.featured?1:0):0);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-10",children:r.jsxs("div",{className:"max-w-7xl mx-auto",children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-2",children:"Chelsea Concierge"}),r.jsx("h1",{className:"text-4xl font-bold font-heading mb-2",children:"Luxury Experiences"}),r.jsx("p",{className:"text-background/60",children:"Bespoke experiences curated for London's most discerning members"})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[r.jsxs("div",{className:"flex gap-2 flex-wrap mb-5",children:[r.jsx("button",{onClick:()=>l("all"),className:`px-3 py-1.5 text-xs rounded-full border transition-colors ${o==="all"?"bg-foreground text-background border-foreground":"border-border hover:border-foreground"}`,children:"All"}),RTe.map(g=>r.jsx("button",{onClick:()=>l(g),className:`px-3 py-1.5 text-xs rounded-full border transition-colors ${o===g?"bg-foreground text-background border-foreground":"border-border hover:border-foreground"}`,children:g},g))]}),r.jsxs("div",{className:"flex gap-3 mb-5 flex-wrap",children:[r.jsxs("div",{className:"relative flex-1 min-w-48",children:[r.jsx(dn,{className:"absolute left-2.5 top-2 w-4 h-4 text-muted-foreground"}),r.jsx(de,{placeholder:"Search experiences...",className:"pl-8 h-9",value:a,onChange:g=>i(g.target.value)})]}),r.jsxs(Xe,{value:c,onValueChange:u,children:[r.jsx(He,{className:"h-9 w-40",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"featured",children:"Featured First"}),r.jsx(Pe,{value:"price_asc",children:"Price: Low to High"}),r.jsx(Pe,{value:"price_desc",children:"Price: High to Low"})]})]})]}),r.jsxs("p",{className:"text-sm text-muted-foreground mb-5",children:[v.length," experience",v.length!==1?"s":""]}),n?r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 animate-pulse",children:[...Array(6)].map((g,y)=>r.jsx("div",{className:"h-80 bg-muted rounded-xl"},y))}):v.length===0?r.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[r.jsx(ir,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),r.jsxs("p",{children:["No experiences found. ",r.jsx("button",{className:"text-primary hover:underline",onClick:()=>{l("all"),i("")},children:"Clear filters"})]})]}):r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:v.map(g=>r.jsx(se,{to:`/concierge/experiences/${g.id}`,children:r.jsxs(oe,{className:"overflow-hidden hover:shadow-xl transition-all duration-300 group cursor-pointer h-full",children:[r.jsxs("div",{className:"relative h-56 overflow-hidden",children:[g.hero_image?r.jsx("img",{src:g.hero_image,alt:g.title,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-primary/20 to-primary/5 flex items-center justify-center",children:r.jsx(ir,{className:"w-10 h-10 text-primary opacity-40"})}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/60 to-transparent"}),r.jsxs("div",{className:"absolute top-3 left-3 flex gap-1.5",children:[g.featured&&r.jsx(ge,{className:"bg-primary text-primary-foreground text-xs",children:"Featured"}),g.is_members_only&&r.jsx(ge,{className:"bg-foreground text-background text-xs",children:"Members"}),g.status==="sold_out"&&r.jsx(ge,{variant:"destructive",className:"text-xs",children:"Sold Out"})]}),r.jsx("div",{className:"absolute bottom-3 left-3",children:r.jsx(ge,{variant:"outline",className:"border-white/30 text-white bg-black/20 text-xs",children:g.category})})]}),r.jsxs(ce,{className:"p-4",children:[r.jsx("h3",{className:"font-bold font-heading mb-1 group-hover:text-primary transition-colors line-clamp-2",children:g.title}),g.partner_name&&r.jsx("p",{className:"text-xs text-primary font-medium mb-2",children:g.partner_name}),r.jsxs("div",{className:"flex flex-wrap gap-2 text-xs text-muted-foreground mb-3",children:[g.location&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Ft,{className:"w-3 h-3"}),g.location]}),g.duration&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Vt,{className:"w-3 h-3"}),g.duration]})]}),r.jsxs("div",{className:"flex items-center justify-between pt-3 border-t border-border",children:[r.jsxs("div",{children:[g.price_members&&g.price>0&&g.price_members<g.price&&r.jsxs("p",{className:"text-xs text-muted-foreground line-through",children:["£",g.price]}),r.jsx("p",{className:"font-bold",children:g.price_display||(g.price>0?`From £${g.price_members||g.price}`:"Price on request")})]}),r.jsx(K,{size:"sm",variant:"outline",className:"text-xs",children:"View Details"})]})]})]})},g.id))}),r.jsxs("div",{className:"mt-12 bg-foreground text-background rounded-2xl p-8 text-center",children:[r.jsx(Ja,{className:"w-8 h-8 text-primary mx-auto mb-3"}),r.jsx("h2",{className:"text-2xl font-bold font-heading mb-2",children:"Can't Find What You're Looking For?"}),r.jsx("p",{className:"text-background/60 mb-5 max-w-lg mx-auto text-sm",children:"Our concierge team can create a completely bespoke experience tailored to your requirements."}),r.jsx(K,{className:"bg-primary text-primary-foreground px-8",onClick:()=>f(!0),children:"Request a Bespoke Experience"})]})]}),m&&r.jsx(Tv,{onClose:()=>f(!1)})]})}function DTe({experience:e,partner:t,onClose:n}){const s=(e==null?void 0:e.title)||(t==null?void 0:t.name)||"Booking",a=(e==null?void 0:e.price_members)||(e==null?void 0:e.price)||0,[i,o]=j.useState({name:"",email:"",ph
898one:"",date:"",guests:1,notes:""}),[l,c]=j.useState(!1),[u,m]=j.useState(!1),f=(v,g)=>o(y=>({...y,[v]:g})),p=a*i.guests,b=async()=>{c(!0);const v=`CMB-${Date.now().toString(36).toUpperCase()}`,g=(e==null?void 0:e.commission_rate)||(t==null?void 0:t.commission_rate)||15,y=p*g/100,w=await W.entities.Booking.create({booking_reference:v,partner_id:(e==null?void 0:e.partner_id)||(t==null?void 0:t.id),partner_name:(e==null?void 0:e.partner_name)||(t==null?void 0:t.name),vip_experience_id:e==null?void 0:e.id,booking_type:"experience",client_name:i.name,client_email:i.email,client_phone:i.phone,booking_date:i.date,guests:i.guests,total_value:p,commission_rate:g,commission_amount:y,status:"pending",payment_status:"unpaid",notes:i.notes});w!=null&&w.id&&await W.entities.Commission.create({booking_id:w.id,partner_id:(e==null?void 0:e.partner_id)||(t==null?void 0:t.id),partner_name:(e==null?void 0:e.partner_name)||(t==null?void 0:t.name),booking_value:p,commission_rate:g,commission_amount:y,status:"pending",booking_date:i.date,category:(e==null?void 0:e.category)||(t==null?void 0:t.category)}),m(!0),c(!1)};return u?r.jsx(hr,{open:!0,onOpenChange:n,children:r.jsx(or,{className:"max-w-sm text-center",children:r.jsxs("div",{className:"py-8",children:[r.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4",children:r.jsx(qt,{className:"w-8 h-8 text-green-600"})}),r.jsx("h2",{className:"text-xl font-bold font-heading mb-2",children:"Booking Confirmed!"}),r.jsx("p",{className:"text-muted-foreground text-sm mb-4",children:"Our concierge team will c
898ontact you within 2 hours to confirm all details."}),r.jsx(K,{className:"bg-primary text-primary-foreground",onClick:n,children:"Done"})]})})}):r.jsx(hr,{open:!0,onOpenChange:n,children:r.jsxs(or,{className:"max-w-md",children:[r.jsx(kr,{children:r.jsxs(Cr,{children:["Book: ",s]})}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Full Name *"}),r.jsx(de,{value:i.name,onChange:v=>f("name",v.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Email *"}),r.jsx(de,{type:"email",value:i.email,onChange:v=>f("email",v.target.value)})]})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Phone"}),r.jsx(de,{value:i.phone,onChange:v=>f("phone",v.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Preferred Date"}),r.jsx(de,{type:"date",value:i.date,onChange:v=>f("date",v.target.value)})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Guests"}),r.jsxs(Xe,{value:String(i.guests),onValueChange:v=>f("guests",Number(v)),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:[1,2,3,4,5,6,8,10].map(v=>r.jsxs(Pe,{value:String(v),children:[v," guest",v>1?"s":""]},v))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Special Requirements"}),r.jsx(de,{value:i.notes,onChange:v=>f("notes",v.target.value),placeholder:"Dietary, accessibility, preferences..."})]}),p>0&&r.jsxs("div",{className:"bg-muted/30 rounded-lg p-3 flex justify-between items-center",children:[r.jsx("span",{className:"text-sm text-muted-foreground",children:"Estimated Total"}),r.jsxs("span",{className:"text-lg font-bold",children:["£",p.toLocaleString()]})]}),r.jsx("p",{className:"text-xs text-muted-foreground",children:"Payment is arranged after confirmation by our concierge team."})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:n,children:"Cancel"}),r.jsx(K,{className:"bg-primary text-primary-foreground",onClick:b,disabled:l||!i.name||!i.email,children:l?"Booking...":"Confirm Booking"})]})]})})}function LTe(){const{id:e}=yo(),[t,n]=j.useState(null),[s,a]=j.useState(null),[i,o]=j.useState(!0),[l,c]=j.useState(0),[u,m]=j.useState(!1),[f,p]=j.useState(!1);if(j.useEffect(()=>{W.entities.VIPExperience.filter({id:e}).then(async w=>{const N=w==null?void 0:w[0];n(N),N!=null&&N.partner_id&&W.entities.LuxuryPartner.filter({id:N.partner_id}).then(S=>a(S==null?void 0:S[0])),o(!1)})},[e]),i)return r.jsx("div",{className:"min-h-screen flex items-center justify-center",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-foreground rounded-full animate-spin"})});if(!t)return r.jsx("div",{className:"min-h-screen flex items-center justify-center text-muted-foreground",children:"Experience not found."});const b=(()=>{try{return JSON.parse(t.gallery_images||"[]")}catch{return[]}})(),v=(()=>{try{return JSON.parse(t.includes||"[]")}catch{return[]}})(),g=(()=>{try{return JSON.parse(t.excludes||"[]")}catch{return[]}})(),y=(()=>{try{return JSON.parse(t.tags||"[]")}catch{return[]}})();return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsxs("div",{className:"relative h-[55vh] min-h-[420px] overflow-hidden",children:[t.hero_image?r.jsx("img",{src:t.hero_image,alt:t.title,className:"w-full h-full object-cover"}):r.jsx("div",{className:"w-full h-full bg-gradient-to-br from-foreground to-foreground/80 flex items-center justify-center",children:r.jsx(ir,{className:"w-16 h-16 text-primary opacity-30"})}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/80 via-black/30 to-transparent"}),r.jsx("div",{className:"absolute top-4 left-4",children:r.jsx(se,{to:"/concierge/experiences",children:r.jsxs(K,{variant:"ghost",size:"sm",className:"text-white hover:bg-white/20",children:[r.jsx(Ct,{className:"w-4 h-4 mr-1"}),"Experiences"]}
898)})}),r.jsxs("div",{className:"absolute bottom-0 left-0 right-0 max-w-7xl mx-auto px-8 pb-8",children:[r.jsxs("div",{className:"flex gap-2 mb-3",children:[r.jsx(ge,{variant:"outline",className:"border-white/30 text-white bg-black/20",children:t.category}),t.featured&&r.jsx(ge,{className:"bg-primary text-primary-foreground",children:"Featured"}),t.is_members_only&&r.jsx(ge,{className:"bg-white/20 text-white border border-white/30",children:"Members Only"})]}),r.jsx("h1",{className:"text-5xl font-bold text-white font-heading mb-1",children:t.title}),t.partner_name&&r.jsx("p",{className:"text-white/60 text-lg",children:t.partner_name})]})]}),r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-10",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[r.jsxs("div",{className:"lg:col-span-2 space-y-8",children:[t.description&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-3",children:"About This Experience"}),r.jsx("p",{className:"text-muted-foreground leading-relaxed whitespace-pre-wrap",children:t.description})]}),y.length>0&&r.jsx("div",{className:"flex flex-wrap gap-2",children:y.map(w=>r.jsx(ge,{variant:"outline",className:"text-xs",children:w},w))}),(v.length>0||g.length>0)&&r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[v.length>0&&r.jsxs("div",{children:[r.jsx("h3",{className:"font-bold font-heading mb-3",children:"What's Included"}),r.jsx("div",{className:"space-y-1.5",children:v.map((w,N)=>r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx(qt,{className:"w-4 h-4 text-green-600 shrink-0"}),w]},N))})]}),g.length>0&&r.jsxs("div",{children:[r.jsx("h3",{className:"font-bold font-heading mb-3",children:"Not Included"}),r.jsx("div",{className:"space-y-1.5",children:g.map((w,N)=>r.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[r.jsx(Cl,{className:"w-4 h-4 text-muted-foreground shrink-0"}),w]},N))})]})]}),b.length>0&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-4",children:"Gallery"}),r.jsxs("div",{className:"relative rounded-xl overflow-hidden",children:[r.jsx("img",{src:b[l],alt:"",className:"w-full h-64 object-cover"}),b.length>1&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>c(w=>(w-1+b.length)%b.length),className:"absolute left-3 top-1/2 -translate-y-1/2 w-9 h-9 bg-black/50 text-white rounded-full flex items-center justify-center",children:r.jsx(Ym,{className:"w-4 h-4"})}),r.jsx("button",{onClick:()=>c(w=>(w+1)%b.length),className:"absolute right-3 top-1/2 -translate-y-1/2 w-9 h-9 bg-black/50 text-white rounded-full flex items-center justify-center",children:r.jsx(Us,{className:"w-4 h-4"})})]})]})]}),s&&r.jsxs("div",{children:[r.jsx("h2",{className:"text-xl font-bold font-heading mb-3",children:"About the Partner"}),r.jsx(oe,{children:r.jsxs(ce,{className:"p-4 flex gap-4",children:[s.logo_url&&r.jsx("img",{src:s.logo_url,alt:s.name,className:"w-16 h-16 object-contain rounded-lg flex-shrink-0"}),r.jsxs("div",{children:[r.jsx("h3",{className:"font-bold",children:s.name}),s.tagline&&r.jsx("p",{className:"text-sm text-muted-foreground italic",children:s.tagline}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1 line-clamp-2",children:s.description}),r.jsx(se,{to:`/concierge/partners/${s.id}`,className:"text-xs text-primary hover:underline mt-1 inline-block",children:"View partner profile â"})]})]})})]})]}),r.jsxs("div",{className:"space-y-4",children:[r.jsx(oe,{className:"sticky top-6",children:r.jsxs(ce,{className:"p-5 space-y-4",children:[r.jsxs("div",{children:[t.is_members_only&&t.price_members>0&&t.price>0&&r.jsxs("div",{className:"text-xs text-muted-foreground line-through",children:["£",t.price," (public rate)"]}),r.jsx("div",{className:"text-3xl font-bold",children:t.price_display||(t.price>0?`£${t.price_members||t.price}`:"Price on request")}),t.is_members_only&&r.jsx("p",{className:"text-xs text-primary font-medium",children:"Members exclusive rate"})]}),r.jsxs("div",{className:"space-y-2 text-sm",children:[t.location&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Ft,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("span",{className:"text-muted-foreground",children:t.location})]}),t.duration&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Vt,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("span",{className:"text-muted-foreground",children:t.duration})]}),t.capacity>0&&r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(vt,{className:"w-4 h-4 text-primary shrink-0"}),r.jsxs("span",{className:"text-muted-foreground",children:["Max ",t.capacity," guests"]})]}),t.availability&&r.jsx("p",{className:"text-xs text-muted-foreground",children:t.availability}),t.booking_notice&&r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Booking notice: ",t.booking_notice]})]}),t.status==="sold_out"?r.jsx(K,{className:"w-full",disabled:!0,children:"Sold Out"}):r.jsxs(r.Fragment,{children:[r.jsx(K,{className:"w-full bg-primary text-primary-foreground h-10",onClick:()=>p(!0),children:"Book This Experience"}),r.jsx(K,{variant:"outline",className:"w-full",onClick:()=>m(!0),children:"Request More Information"})]}),r.jsx("p",{className:"text-xs text-muted-foreground text-center",children:"No payment required to enquire. Our concierge will confirm availability."})]})}),t.is_members_only&&r.jsx(oe,{className:"border-primary/20 bg-primary/5",children:r.jsxs(ce,{className:"p-4 text-center",children:[r.jsx(Lt,{className:"w-5 h-5 text-primary mx-auto mb-2"}),r.jsx("p",{className:"text-sm font-semibold",children:"Members Exclusive"}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1 mb-3",children:"Join Chelsea Monthly to access exclusive rates and priority booking."}),r.jsx(se,{to:"/membership",children:r.jsx(K,{size:"sm",variant:"outline",className:"w-full text-xs",children:"Become a Member"})})]})})]})]})}),u&&r.jsx(Tv,{onClose:()=>m(!1)}),f&&r.jsx(DTe,{experience:t,onClose:()=>p(!1)})]})}const yh=e=>
898`£${Number(e||0).toLocaleString("en-GB")}`,$Te={new:"bg-blue-100 text-blue-800",in_progress:"bg-yellow-100 text-yellow-800",quoted:"bg-purple-100 text-purple-800",confirmed:"bg-green-100 text-green-800",completed:"bg-gray-100 text-gray-700",cancelled:"bg-red-100 text-red-700"};function FTe(){var o,l;const[e,t]=j.useState(null),[n,s]=j.useState(!0);j.useEffect(()=>{a()},[]);const a=async()=>{s(!0);const[c,u,m,f,p]=await Promise.all([W.entities.ConciergeRequest.list("-created_date",300),W.entities.Booking.list("-created_date",300),W.entities.LuxuryPartner.list("-created_date",200),W.entities.Commission.list("-created_date",200),W.entities.VIPExperience.list("-created_date",100)]),b=u.reduce((g,y)=>g+(y.total_value||0),0),v=f.reduce((g,y)=>g+(y.commission_amount||0),0);t({totalRequests:c.length,newRequests:c.filter(g=>g.status==="new").length,confirmedBookings:u.filter(g=>g.status==="confirmed").length,totalBookingValue:b,totalCommission:v,activePartners:m.filter(g=>g.status==="active"||g.status==="featured").length,activeExperiences:p.filter(g=>g.status==="active").length,recentRequests:c.slice(0,6),recentBookings:u.slice(0,5)}),s(!1)},i=[{label:"Concierge Requests",href:"/concierge/admin/requests",icon:vt,desc:"Manage all requests"},{label:"Partner Directory",href:"/concierge/admin/partners",icon:Ja,desc:"Add & manage partners"},{label:"VIP Experiences",href:"/concierge/admin/experiences",icon:rt,desc:"Manage marketplace"},{label:"Bookings",href:"/concierge/admin/bookings",icon:ya,desc:"All bookings"},{label:"Partner Offers",href:"/concierge/admin/offers",icon:Xr,desc:"Manage offers"},{label:"Revenue & Commissions",href:"/concierge/admin/revenue",icon:$n,desc:"P&L reporting"}];return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-8",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-start justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-1",children:"Chelsea Monthly"}),r.jsx("h1",{className:"text-3xl font-bold font-heading",children:"Chelsea Concierge Admin"}),r.jsx("p",{className:"text-background/60 text-sm mt-1",children:`"Access London's Finest Experiences."`})]}),r.jsxs("div",{className:"flex gap-2 items-center",children:[r.jsxs(K,{variant:"outline",size:"sm",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",onClick:a,children:[r.jsx(ts,{className:"w-4 h-4 mr-1"}),"Refresh"]}),r.jsx(se,{to:"/concierge/admin/partners",children:r.jsxs(K,{className:"bg-primary text-primary-foreground",children:[r.jsx(Ja,{className:"w-4 h-4 mr-2"}),"Add Partner"]})})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[n?r.jsx("div",{className:"grid grid-cols-4 gap-4 mb-8 animate-pulse",children:[...Array(8)].map((c,u)=>r.jsx("div",{className:"h-24 bg-muted rounded-lg"},u))}):r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[{label:"Total Commissions",value:yh(e==null?void 0:e.totalCommission),color:"text-green-600",icon:Xr},{label:"Total Booking Value",value:yh(e==null?void 0:e.totalBookingValue),color:"text-blue-600",icon:$n},{label:"New Requests",value:e==null?void 0:e.newRequests,color:"text-orange-600",icon:vt},{label:"Total Requests",value:e==null?void 0:e.totalRequests,color:"text-foreground",icon:vt},{label:"Confirmed Bookings",value:e==null?void 0:e.confirmedBookings,color:"text-green-600",icon:ya},{label:"Active Partners",value:e==null?void 0:e.activePartners,color:"text-purple-600",icon:Ja},{label:"Active Experiences",value:e==null?void 0:e.activeExperiences,color:"text-cyan-600",icon:rt}].map(({label:c,value:u,color:m,icon:f})=>r.jsx(oe,{children:r.jsx(ce,{className:"pt-5",children:r.jsxs("div",{className:"flex justify-between items-start",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:c}),r.jsx("p",{className:`text-2xl font-bold ${m}`,children:u})]}),r.jsx(f,{className:`w-5 h-5 ${m} opacity-30`})]})})},c))}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 mb-8",children:i.map(({label:c,href:u,icon:m,desc:f})=>r.jsx(se,{to:u,children:r.jsx(oe,{className:"hover:shadow-md hover:border-primary/30 transition-all cursor-pointer group h-full",children:r.jsxs(ce,{className:"pt-5 pb-4 flex items-center gap-3",children:[r.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center group-hover:bg-primary/20 transition-colors shrink-0",children:r.jsx(m,{className:"w-5 h-5 text-primary"})}),r.jsxs("div",{children:[r.jsx("p",{className:"font-semibold text-sm",children:c}),r.jsx("p",{className:"text-xs text-muted-foreground",children:f})]}),r.jsx(_t,{className:"w-4 h-4 text-muted-foreground ml-auto group-hover:text-primary transition-colors"})]})})},u))}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[r.jsxs(oe,{children:[r.jsxs("div",{className:"flex items-center justify-between p-4 pb-2",children:[r.jsx("h3",{className:"font-semibold",children:"Recent
898Concierge Requests"}),r.jsx(se,{to:"/concierge/admin/requests",children:r.jsx(K,{variant:"ghost",size:"sm",className:"text-xs",children:"View all"})})]}),r.jsx(ce,{className:"p-4 pt-0 space-y-0",children:(o=e==null?void 0:e.recentRequests)!=null&&o.length?e.recentRequests.map(c=>{var u;return r.jsxs("div",{className:"flex items-center justify-between py-2.5 border-b border-border last:border-0",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium",children:c.client_name||c.client_email}),r.jsxs("p",{className:"text-xs text-muted-foreground capitalize",children:[(u=c.request_type)==null?void 0:u.replace("_"," ")," · ",c.reference]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[c.quote_amount>0&&r.jsx("span",{className:"text-xs font-semibold text-green-700",children:yh(c.quote_amount)}),r.jsx(ge,{className:`text-xs ${$Te[c.status]}`,children:c.status.replace("_"," ")})]})]},c.id)}):r.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No requests yet."})})]}),r.jsxs(oe,{children:[r.jsxs("div",{className:"flex items-center justify-between p-4 pb-2",children:[r.jsx("h3",{className:"font-semibold",children:"Recent Bookings"}),r.jsx(se,{to:"/concierge/admin/bookings",children:r.jsx(K,{variant:"ghost",size:"sm",className:"text-xs",children:"View all"})})]}),r.jsx(ce,{className:"p-4 pt-0 space-y-0",children:(l=e==null?void 0:e.recentBookings)!=null&&l.length?e.recentBookings.map(c=>r.jsxs("div",{className:"flex items-center justify-between py-2.5 border-b border-border last:border-0",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-medium",children:c.client_name||c.client_email}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:[c.partner_name," · ",c.booking_reference]})]}),r.jsxs("div",{className:"text-right",children:[r.jsx("p",{className:"text-sm font-semibold text-green-700",children:yh(c.total_value)}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:["Comm: ",yh(c.commission_amount)]})]})]},c.id)):r.jsx("p",{className:"text-sm text-muted-foreground py-4 text-center",children:"No bookings yet."})})]})]})]})]})}const BTe={new:"bg-blue-100 text-blue-800",in_progress:"bg-yellow-100 text-yellow-800",quoted:"bg-purple-100 text-purple-800",confirmed:"bg-green-100 text-green-800",completed:"bg-gray-100 text-gray-700",cancelled:"bg-red-100 text-red-700"};function qTe({request:e,onClose:t,onUpdate:n}){var p;const[s,a]=j.useState(e.status),[i,o]=j.useState(e.quote_amount||0),[l,c]=j.useState(e.notes||""),[u,m]=j.useState(!1),f=async()=>{m(!0),await W.entities.ConciergeRequest.update(e.id,{status:s,quote_amount:i,commission_amount:i*.15,notes:l,...s==="quoted"&&!e.quoted_at?{quoted_at:new Date().toISOString()}:{},...s==="confirmed"&&!e.confirmed_at?{confirmed_at:new Date().toISOString()}:{},...s==="completed"&&!e.completed_at?{completed_at:new Date().toISOString()}:{}}),n(),t()};return r.jsx(hr,{open:!0,onOpenChange:t,children:r.jsxs(or,{className:"max-w-lg max-h-[85vh] overflow-y-auto",children:[r.jsx(kr,{children:r.jsxs(Cr,{children:["Request: ",e.reference]})}),r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:"Client"}),r.jsx("p",{className:"font-medium",children:e.client_name})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:"Email"}),r.jsx("p",{className:"font-medium",children:e.client_email})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:"Phone"}),r.jsx("p",{children:e.client_phone||"â"})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:"Guests"}),r.jsx("p",{children:e.guests})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:"Type"}),r.jsx("p",{className:"capitalize",children:(p=e.request_type)==null?void 0:p.replace("_"," ")})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:"Budget"}),r.jsx("p",{children:e.budget_range||"Not specified"})]}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:"Preferred Date"}),r.jsx("p",{children:e.preferred_date||"Flexible"})]})]}),e.description&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Request Details"}),r.jsx("p",{className:"text-sm mt-1 p-3 bg-muted/30 rounded-lg whitespace-pre-wrap",children:e.description})]}),e.special_requirements&&r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground font-medium",children:"Special Requirements"}),r.jsx("p",{className:"text-sm mt-1",children:e.special_requirements})]}),r.jsxs("div",{className:"border-t pt-3 space-y-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Update Status"}),r.jsxs(Xe,{value:s,onValueChange:a,children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["new","in_progress","quoted","confirmed","completed","cancelled"].map(b=>r.jsx(Pe,{value:b,children:b.replace("_"," ")},b))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Quote Amou
898nt (£)"}),r.jsx(de,{type:"number",value:i,onChange:b=>o(Number(b.target.value))})]}),i>0&&r.jsxs("p",{className:"text-xs text-green-700",children:["Commission (15%): £",(i*.15).toFixed(2)]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium",children:"Internal Notes"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-20 resize-none bg-transparent",value:l,onChange:b=>c(b.target.value)})]})]})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:t,children:"Cancel"}),r.jsx(K,{className:"bg-primary text-primary-foreground",onClick:f,disabled:u,children:u?"Saving...":"Save Changes"})]})]})})}function VTe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),[a,i]=j.useState(""),[o,l]=j.useState("all"),[c,u]=j.useState("all"),[m,f]=j.useState(null);j.useEffect(()=>{p()},[]);const p=async()=>{s(!0);const v=await W.entities.ConciergeRequest.list("-created_date",300);t(v||[]),s(!1)},b=e.filter(v=>{var g,y,w;return(o==="all"||v.status===o)&&(c==="all"||v.request_type===c)&&(!a||((g=v.client_name)==null?void 0:g.toLowerCase().includes(a.toLowerCase()))||((y=v.client_email)==null?void 0:y.toLowerCase().includes(a.toLowerCase()))||((w=v.reference)==null?void 0:w.toLowerCase().includes(a.toLowerCase())))});return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/concierge/admin",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Concierge Admin"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Concierge Requests"})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[r.jsx("div",{className:"flex gap-3 flex-wrap mb-4",children:["new","in_progress","quoted","confirmed","completed"].map(v=>r.jsxs("button",{onClick:()=>l(o===v?"all":v),className:`px-3 py-1.5 rounded-full text-xs border transition-colors ${o===v?"bg-foreground text-background border-foreground":"border-border hover:border-foreground"}`,children:[v.replace("_"," ")," (",e.filter(g=>g.status===v).length,")"]},v))}),r.jsxs("div",{className:"flex gap-3 mb-5 flex-wrap",children:[r.jsxs("div",{className:"relative flex-1 min-w-40",children:[r.jsx(dn,{className:"absolute left-2.5 top-2 w-4 h-4 text-muted-foreground"}),r.jsx(de,{placeholder:"Search...",className:"pl-8 h-8",value:a,onChange:v=>i(v.target.value)})]}),r.jsxs(Xe,{value:c,onValueChange:u,children:[r.jsx(He,{className:"h-8 w-44",children:r.jsx(Je,{placeholder:"All types"})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Types"}),["hotel","restaurant","travel","private_dining","chauffeur","private_jet","yacht","watch","personal_shopping","wellness","general"].map(v=>r.jsx(Pe,{value:v,children:v.replace("_"," ")},v))]})]})]}),n?r.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"space-y-2",children:[b.map(v=>{var g;return r.jsx(oe,{className:"hover:shadow-md transition-shadow cursor-pointer",onClick:()=>f(v),children:r.jsxs(ce,{className:"p-4 flex items-center gap-4",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-0.5",children:[r.jsx("p",{className:"font-semibold text-sm",children:v.client_name||v.client_email}),r.jsx(ge,{className:`text-xs ${BTe[v.status]}`,children:v.status.replace("_"," ")}),r.jsx(ge,{variant:"outline",className:"text-xs capitalize",children:(g=v.request_type)==null?void 0:g.replace("_"," ")})]}),r.jsxs("div",{className:"flex gap-3 text-xs text-muted-foreground flex-wrap",children:[v.reference&&r.jsx("span",{className:"font-mono",children:v.reference}),v.preferred_date&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Jt,{className:"w-3 h-3"}),v.preferred_date]}),v.guests>1&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(vt,{className:"w-3 h-3"}),v.guests," guests"]}),v.budget_range&&r.jsx("span",{children:v.budget_range})]}),v.description&&r.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-1",children:v.description})]}),r.jsxs("div",{className:"text-right shrink-0",children:[v.quote_amount>0&&r.jsxs("p",{className:"font-semibold text-green-700 text-sm",children:["£",v.quote_amount.toLocaleStr
898ing()]}),r.jsx("p",{className:"text-xs text-muted-foreground",children:new Date(v.created_date).toLocaleDateString("en-GB")})]})]})},v.id)}),b.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No requests found."})]})]}),m&&r.jsx(qTe,{request:m,onClose:()=>f(null),onUpdate:p})]})}const S9=["Hotels","Restaurants","Travel","Property","Fashion","Watches","Jewellery","Yachts","Private Aviation","Wellness","Beauty","Business Services","Luxury Retail","Motoring","Fine Dining","Private Members Clubs"],UTe={active:"bg-green-100 text-green-800",featured:"bg-primary/10 text-primary",inactive:"bg-gray-100 text-gray-600",pending:"bg-yellow-100 text-yellow-800"};function zTe({partner:e,onSave:t,onClose:n}){const[s,a]=j.useState(e||{name:"",category:"Hotels",tagline:"",description:"",hero_image:"",logo_url:"",website:"",email:"",phone:"",address:"",location:"",area:"",price_range:"£££",services:"[]",member_benefits:"[]",gallery_images:"[]",commission_rate:15,status:"pending",featured:!1,verified:!1,availability_notes:"",booking_lead_time:"",cancellation_policy:""}),[i,o]=j.useState(!1),l=(u,m)=>a(f=>({...f,[u]:m})),c=async()=>{o(!0),!s.slug&&s.name&&l("slug",s.name.toLowerCase().replace(/[^a-z0-9]+/g,"-")),e!=null&&e.id?await W.entities.LuxuryPartner.update(e.id,s):await W.entities.LuxuryPartner.create(s),t()};return r.jsx(hr,{open:!0,onOpenChange:n,children:r.jsxs(or,{className:"max-w-2xl",children:[r.jsx(kr,{children:r.jsx(Cr,{children:e!=null&&e.id?"Edit Partner":"Add New Partner"})}),r.jsxs(Aa,{defaultValue:"info",className:"w-full",children:[r.jsxs(Ys,{className:"w-full mb-3",children:[r.jsx(ft,{value:"info",className:"flex-1",children:"Info"}),r.jsx(ft,{value:"media",className:"flex-1",children:"Media"}),r.jsx(ft,{value:"services",className:"flex-1",children:"Services"}),r.jsx(ft,{value:"settings",className:"flex-1",children:"Settings"})]}),r.jsxs("div",{className:"max-h-[55vh] overflow-y-auto pr-1",children:[r.jsxs(pt,{value:"info",className:"space-y-3 mt-0",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Partner Name *"}),r.jsx(de,{value:s.name,onChange:u=>l("name",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Tagline"}),r.jsx(de,{value:s.tagline,onChange:u=>l("tagline",u.target.value)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Category"}),r.jsxs(Xe,{value:s.category,onValueChange:u=>l("category",u),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:S9.map(u=>r.jsx(Pe,{value:u,children:u},u))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Price Range"}),r.jsxs(Xe,{value:s.price_range,onValueChange:u=>l("price_range",u),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["£","££","£££","££££","£££££"].map(u=>r.jsx(Pe,{value:u,children:u},u))})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Description"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-24 resize-none bg-transparent",value:s.description,onChange:u=>l("description",u.target.value)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Location / City"}),r.jsx(de,{value:s.location,onChange:u=>l("location",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Area (e.g. Chelsea, Mayfair)"}),r.jsx(de,{value:s.area,onChange:u=>l("area",u.target.value)})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Full Address"}),r.jsx(de,{value:s.address,onChange:u=>l("address",u.target.value)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Email"}),r.jsx(de,{value:s.email,onChange:u=>l("email",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Phone"}),r.jsx(de,{value:s.phone,onChange:u=>l("phone",u.target.value)})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Website"}),r.jsx(de,{value:s.website,onChange:u=>l("website",u.target.value)})]})]}),r.jsxs(pt,{value:"media",className:"space-y-3 mt-0",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Hero Image URL"}),r.jsx(de,{value:s.hero_image,onChange:u=>l("hero_image",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Logo URL"}),r.jsx(de,{value:s.logo_url,onChange:u=>l("logo_url",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Gallery Images (JSON array of URLs)"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-24 resize-none bg-transparent font-mono text-xs",value:s.gallery_images,onChange:u=>l("gallery_images",u.target.value)})]})]}),r.jsxs(pt,{value:"services",className:"space-y-3 mt-0",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Services (JSON array of str
898ings)"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-28 resize-none bg-transparent font-mono text-xs",value:s.services,onChange:u=>l("services",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Member Benefits (JSON array of strings)"}),r.jsx("textarea",{className:"w-full border border-input rounded-md p-2 text-sm h-28 resize-none bg-transparent font-mono text-xs",value:s.member_benefits,onChange:u=>l("member_benefits",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Availability Notes"}),r.jsx(de,{value:s.availability_notes,onChange:u=>l("availability_notes",u.target.value)})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Booking Lead Time"}),r.jsx(de,{value:s.booking_lead_time,onChange:u=>l("booking_lead_time",u.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Commission Rate (%)"}),r.jsx(de,{type:"number",value:s.commission_rate,onChange:u=>l("commission_rate",Number(u.target.value))})]})]})]}),r.jsxs(pt,{value:"settings",className:"space-y-3 mt-0",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Status"}),r.jsxs(Xe,{value:s.status,onValueChange:u=>l("status",u),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:["pending","active","featured","inactive"].map(u=>r.jsx(Pe,{value:u,children:u},u))})]})]}),r.jsx("div",{className:"space-y-2",children:[{key:"featured",label:"Featured Partner"},{key:"verified",label:"Verified Partner"}].map(({key:u,label:m})=>r.jsxs("label",{className:"flex items-center gap-2 text-sm cursor-pointer",children:[r.jsx("input",{type:"checkbox",checked:s[u],onChange:f=>l(u,f.target.checked)}),m]},u))})]})]})]}),r.jsxs(Fn,{children:[r.jsx(K,{variant:"outline",onClick:n,children:"Cancel"}),r.jsx(K,{className:"bg-primary text-primary-foreground",onClick:c,disabled:i||!s.name,children:i?"Saving...":"Save Partner"})]})]})})}function WTe(){const[e,t]=j.useState([]),[n,s]=j.useState(!0),[a,i]=j.useState(""),[o,l]=j.useState("all"),[c,u]=j.useState("all"),[m,f]=j.useState(!1),[p,b]=j.useState(null);j.useEffect(()=>{v()},[]);const v=async()=>{s(!0);const y=await W.entities.LuxuryPartner.list("-created_date",200);t(y||[]),s(!1)},g=e.filter(y=>{var w,N;return(c==="all"||y.status===c)&&(o==="all"||y.category===o)&&(!a||((w=y.name)==null?void 0:w.toLowerCase().includes(a.toLowerCase()))||((N=y.location)==null?void 0:N.toLowerCase().includes(a.toLowerCase())))});return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center gap-4",children:[r.jsx(se,{to:"/concierge/admin",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Concierge Admin"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Partner Directory"})]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[r.jsxs("div",{className:"flex gap-3 items-center mb-5 flex-wrap",children:[r.jsxs("div",{className:"relative flex-1 min-w-40",children:[r.jsx(dn,{className:"absolute left-2.5 top-2 w-4 h-4 text-muted-foreground",style:{pointerEvents:"none"}}),r.jsx(de,{placeholder:"Search partners...",className:"pl-8 h-8",value:a,onChange:y=>i(y.target.value)})]}),r.jsxs(Xe,{value:o,onValueChange:l,children:[r.jsx(He,{className:"h-8 w-40",children:r.jsx(Je,{placeholder:"Category"})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Categories"}),S9.map(y=>r.jsx(Pe,{value:y,children:y},y))]})]}),r.jsxs(Xe,{value:c,onValueChange:u,children:[r.jsx(He,{className:"h-8 w-32",children:r.jsx(Je,{})}),r.jsxs(Ge,{children:[r.jsx(Pe,{value:"all",children:"All Status"}),["active","featured","pending","inactive"].map(y=>r.jsx(Pe,{value:y,children:y},y))]})]}),r.jsxs(K,{size:"sm",onClick:()=>{b(null),f(!0)},children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"Add Partner"]})]}),n?r.jsx("div",{className:"text-center py-8 text-muted-foreground",children:"Loading..."}):r.jsxs("div",{className:"space-y-2",children:[g.map(y=>r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsxs(ce,{className:"p-3 flex gap-3 items-center",children:[y.hero_image&&r.jsx("img",{src:y.hero_image,alt:y.name,className:"w-16 h-12 object-cover rounded flex-shrink-0"}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("p",{className:"font-semibold text-sm",children:y.name}),r.jsx(ge,{className:`text-xs ${UTe[y.status]}`,children:y.status}),r.jsx(ge,{variant:"outline",className:"text-xs",children:y.category})]}),r.jsxs("div",{className:"flex gap-3 text-xs text-muted-foreground mt-0.5",children:[y.location&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Ft,{className:"w-3 h-3"}),y.location]}),r.jsx("span",{className:"text-primary",children:y.price_range}),r.jsxs("span",{children:["Comm: ",y.commission_rate,"%"]})]})]}),r.jsxs("div",{className:"flex gap-1 shrink-0",children:[r.jsx(se,{to:`/concierge/partners/${y.id}`,children:r.jsx(K,{variant:"ghost",size:"sm",children:r.jsx(Nr,{className:"w-4 h-4"})})}),r.jsx(K,{variant:"outline",size:"sm",onClick:()=>{b(y),f(!0)},children:r.jsx(c8,{className:"w-4 h-4"})})]})]})},y.id)),g.length===0&&r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No partners found."})]})]}),m&&r.jsx(zTe,{partner:p,onSave:()=>{f(!1),v()},onClose:()=>f(!1)})]})}const $i=e=>
898`£${Number(e||0).toLocaleString("en-GB")}`,mx=["#c9a96e","#1a1a1a","#6b7280","#d97706","#059669","#7c3aed","#ef4444","#3b82f6"];function HTe(){var i,o,l;const[e,t]=j.useState(null),[n,s]=j.useState(!0);j.useEffect(()=>{a()},[]);const a=async()=>{s(!0);const[c,u,m,f]=await Promise.all([W.entities.Booking.list("-created_date",500),W.entities.Commission.list("-created_date",500),W.entities.ConciergeRequest.list("-created_date",300),W.entities.LuxuryPartner.list("-created_date",200)]),p=c.filter(C=>C.status!=="cancelled").reduce((C,T)=>C+(T.total_value||0),0),b=u.reduce((C,T)=>C+(T.commission_amount||0),0),v=c.length?p/c.length:0,g={};c.forEach(C=>{const T=C.booking_type||"general";g[T]||(g[T]={name:T,value:0,count:0}),g[T].value+=C.total_value||0,g[T].count+=1});const y=Object.values(g).sort((C,T)=>T.value-C.value),w={};c.forEach(C=>{var P;const T=(P=C.created_date)==null?void 0:P.slice(0,7);T&&(w[T]||(w[T]={month:T,revenue:0,commission:0}),w[T].revenue+=C.total_value||0,w[T].commission+=C.commission_amount||0)});const N=Object.values(w).sort((C,T)=>C.month.localeCompare(T.month)).slice(-6).map(C=>({...C,month:C.month.slice(5)+"/"+C.month.slice(2,4)})),S={};c.forEach(C=>{const T=C.partner_name||"Unknown";S[T]=(S[T]||0)+(C.total_value||0)});const A=Object.entries(S).map(([C,T])=>({name:C.slice(0,20),value:T})).sort((C,T)=>T.value-C.value).slice(0,6),k=m.length?Math.round(c.filter(C=>C.status==="confirmed"||C.status==="completed").length/m.length*100):0;t({totalValue:p,totalComm:b,avgBooking:v,byCategory:y,byMonth:N,topPartners:A,conversionRate:k,totalBookings:c.length,pendingComm:u.filter(C=>C.status==="pending").reduce((C,T)=>C+T.commission_amount,0),paidComm:u.filter(C=>C.status==="paid").reduce((C,T)=>C+T.commission_amount,0)}),s(!1)};return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-6",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx(se,{to:"/concierge/admin",children:r.jsx(K,{variant:"ghost",size:"icon",className:"text-background hover:bg-background/10",children:r.jsx(Ct,{className:"w-4 h-4"})})}),r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Concierge Admin"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Revenue & Commissions"})]})]}),r.jsxs(K,{variant:"outline",size:"sm",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",onClick:a,children:[r.jsx(ts,{className:"w-4 h-4 mr-1"}),"Refresh"]})]})}),r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-8",children:n?r.jsx("div",{className:"grid grid-cols-4 gap-4 animate-pulse",children:[...Array(8)].map((c,u)=>r.jsx("div",{className:"h-24 bg-muted rounded-lg"},u))}):r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[{label:"Total Booking Value",value:$i(e==null?void 0:e.totalValue),color:"text-blue-600",icon:$n},{label:"Total Commission",value:$i(e==null?void 0:e.totalComm),color:"text-green-600",icon:Xr},{label:"Pending Commission",value:$i(e==null?void 0:e.pendingComm),color:"text-orange-600",icon:ya},{label:"Paid Commission",value:$i(e==null?void 0:e.paidComm),color:"text-green-700",icon:Xr},{label:"Total Bookings",value:e==null?void 0:e.totalBookings,color:"text-foreground",icon:ya},{label:"Avg. Booking Value",value:$i(e==null?void 0:e.avgBooking),color:"text-purple-600",icon:$n},{label:"Conversion Rate",value:`${e==null?void 0:e.conversionRate}%`,color:"text-cyan-600",icon:Xr}].map(({label:c,value:u,color:m,icon:f})=>r.jsx(oe,{children:r.jsx(ce,{className:"pt-5",children:r.jsxs("div",{className:"flex justify-between items-start",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:c}),r.jsx("p",{className:`text-2xl font-bold ${m}`,children:u})]}),r.jsx(f,{className:`w-5 h-5 ${m} opacity-30`})]})})},c))}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6",children:[r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2",children:r.jsx(ht,{className:"text-sm",children:"Revenue & Commission by Month"})}),r.jsx(ce,{children:(i=e==null?void 0:e.byMonth)!=null&&i.length?r.jsx(bg,{width:"100%",height:200,children:r.jsxs(ly,{data:e.byMonth,children:[r.jsx(Fm,{strokeDasharray:"3 3",stroke:"#f0f0f0"}),r.jsx(zl,{dataKey:"month",tick:{fontSize:11}}),r.jsx(Wl,{tick:{fontSize:11}
898,tickFormatter:c=>`£${(c/1e3).toFixed(0)}k`}),r.jsx(xn,{formatter:c=>$i(c)}),r.jsx(Gs,{dataKey:"revenue",fill:"hsl(var(--primary))",name:"Revenue",radius:[2,2,0,0]}),r.jsx(Gs,{dataKey:"commission",fill:"#1a1a1a",name:"Commission",radius:[2,2,0,0]})]})}):r.jsx("p",{className:"text-center text-muted-foreground text-sm py-8",children:"No data yet"})})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2",children:r.jsx(ht,{className:"text-sm",children:"Revenue by Category"})}),r.jsx(ce,{children:(o=e==null?void 0:e.byCategory)!=null&&o.length?r.jsx("div",{className:"space-y-2",children:e.byCategory.slice(0,6).map((c,u)=>r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-3 h-3 rounded-full shrink-0",style:{backgroundColor:mx[u%mx.length]}}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex justify-between text-sm mb-0.5",children:[r.jsx("span",{className:"capitalize",children:c.name}),r.jsx("span",{className:"font-semibold",children:$i(c.value)})]}),r.jsx("div",{className:"w-full bg-muted h-1.5 rounded",children:r.jsx("div",{className:"h-1.5 rounded",style:{width:`${c.value/e.byCategory[0].value*100}%`,backgroundColor:mx[u%mx.length]}})})]})]},c.name))}):r.jsx("p",{className:"text-center text-muted-foreground text-sm py-8",children:"No data yet"})})]})]}),r.jsxs(oe,{children:[r.jsx(ut,{className:"pb-2",children:r.jsx(ht,{className:"text-sm",children:"Top Partners by Booking Value"})}),r.jsx(ce,{children:(l=e==null?void 0:e.topPartners)!=null&&l.length?r.jsx("div",{className:"space-y-2",children:e.topPartners.map((c,u)=>r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("span",{className:"text-xs text-muted-foreground w-4",children:u+1}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[r.jsx("span",{className:"font-medium",children:c.name}),r.jsx("span",{className:"font-bold text-green-700",children:$i(c.value)})]}),r.jsx("div",{className:"w-full bg-muted h-1.5 rounded",children:r.jsx("div",{className:"h-1.5 rounded bg-primary",style:{width:`${c.value/e.topPartners[0].value*100}%`}})})]})]},c.name))}):r.jsx("p",{className:"text-center text-muted-foreground text-sm py-6",children:"No partner bookings yet"})})]})]})})]})}const AL=["Chelsea","Kensington","Knightsbridge","Travel","Hotels","Restaurants","Property","Motoring","Watches","Yachts","Business","Fashion","Lifestyle","Culture"],k9={Chelsea:"bg-primary/10 text-primary",Kensington:"bg-blue-50 text-blue-700",Knightsbridge:"bg-purple-50 text-purple-700",Travel:"bg-green-50 text-green-700",Hotels:"bg-amber-50 text-amber-700",Restaurants:"bg-red-50 text-red-700",Property:"bg-yellow-50 text-yellow-700",Motoring:"bg-gray-100 text-gray-700",Watches:"bg-cyan-50 text-cyan-700",Yachts:"bg-sky-50 text-sky-700",Business:"bg-slate-50 text-slate-700",Fashion:"bg-pink-50 text-pink-700",Lifestyle:"bg-teal-50 text-teal-700",Culture:"bg-indigo-50 text-indigo-700"};function k_({d:e}){var t;return r.jsx(se,{to:`/community/discussions/${e.id}`,className:"block group",children:r.jsx(oe,{className:"hover:shadow-md transition-shadow",children:r.jsxs(ce,{className:"p-4",children:[r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx("div",{className:"w-9 h-9 bg-muted rounded-full flex items-center justify-center shrink-0 text-sm font-bold text-muted-foreground group-hover:bg-primary/10 transition-colors",children:(t=(e.author_name||"?")[0])==null?void 0:t.toUpperCase()}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-start justify-between gap-2",children:[r.jsx("h4",{className:"font-semibold text-sm leading-snug group-hover:text-primary transition-colors line-clamp-2",children:e.title}),e.is_featured&&r.jsx(rt,{className:"w-3.5 h-3.5 text-primary shrink-0 mt-0.5 fill-primary"})]}),e.body&&r.jsx("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.body}),r.jsxs("div",{className:"flex items-center gap-2 mt-2 flex-wrap",children:[r.jsx(ge,{className:`text-xs px-1.5 py-0 ${k9[e.category]||"bg-muted text-muted-foreground"}`,children:e.category}),e.is_auto_generated&&r.jsx(ge,{variant:"outline",className:"text-xs px-1.5 py-0",children:"Article Discussion"}),r.jsx("span",{className:"text-xs text-muted-foreground",children:Il(e.last_activity||e.created_date)})]})]})]}),r.jsxs("div",{className:"flex items-center gap-3 mt-3 text-xs text-muted-foreground border-t border-border pt-2",children:[r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(bs,{className:"w-3 h-3"}),e.comment_count||0]}),r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Nr,{className:"w-3 h-3"}),jr(e.views)]}),r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(vt,{className:"w-3 h-3"}),e.participants||0," participants"]}),e.is_pinned&&r.jsx("span",{className:"text-amber-600 font-medium",children:"Pinned"})]})]})})})}function GTe(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState([]),[o,l]=j.useState("all"),[c,u]=j.useState("latest"),[m,f]=j.useState(!0),[p,b]=j.useState({});j.useEffect(()=>{(async()=>{const[N,S,A]=await Promise.all([W.entities.Discussion.list("-last_activity",50),W.entities.Discussion.list("-trending_score",5),W.entities.CommunityProfile.list("-reputation_score",8)]);t(N||[]),s((S==null?void 0:S.filter(k=>k.trending_score>0))||[]),i(A||[]),b({total:(N==null?void 0:N.length)||0,members:(A==null?void 0:A.length)||0,active:(N==null?void 0:N.filter(k=>k.comment_count>0).length)||0}),f(!1)})()},[]);const v=e.filter(N=>o==="all"||N.category===o),g=c==="trending"?[...v].sort((N,S)=>(S.trending_score||0)-(N.trending_score||0)):c==="most_discussed"?[...v].sort((N,S)=>(S.comment_count||0)-(N.comment_count||0)):v,y=e.filter(N=>N.is_featured).slice(0,3),w=e.filter(N=>N.is_pinned);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-12",children:[r.jsxs("div",{className:"flex items-start justify-between gap-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-1",children:"Chelsea Monthly"}),r.jsx("h1",{className:"text-4xl font-bold font-heading mb-2",children:"Chelsea Community"}),r.jsx("p",{className:"text-background/60 max-w-xl",children:"Join the conversation. Discuss the stories that matter to London's most discerning readers."})]}),r.jsx(se,{to:"/community/new-discussion",children:r.jsxs(K,{className:"bg-primary text-primary-foreground shrink-0",children:[r.jsx(jn,{className:"w-4 h-4 mr-1"}),"Start Discussion"]})})]}),r.jsxs("div",{className:"flex gap-6 mt-6 text-sm",children:[r.jsxs("div",{children:[r.jsx("span",{className:"font-bold text-2xl",children:p.total||0}),r.jsx("span",{className:"text-background/50 ml-1",children:"discussions"})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-bold text-2xl",children:p.members||0}),r.jsx("span",{className:"text-background/50 ml-1",children:"members"})]}),r.jsxs("div",{children:[r.jsx("span",{className:"font-bold text-2xl",children:p.active||0}),r.jsx("span",{className:"text-background/50 ml-1",children:"active threads"})]})]})]})}),r.jsx("div",{className:"max-w-7xl mx-auto px-6 py-8",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[r.jsxs("div",{className:"lg:col-span-2",children:[y.length>0&&r.jsxs("div",{className:"mb-6",children:[r.jsx("h2",{className:"font-bold text-sm uppercase tracking-widest text-muted-foreground mb-3",children:"Featured Discussions"}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3",children:y.map(N=>r.jsx(k_,{d:N},N.id))})]}),r.jsxs("div",{className:"flex gap-2 overflow-x-auto pb-2 mb-4 scrollbar-hide",children:[r.jsx("button",{onClick:()=>l("all"),className:`px-3 py-1.5 rounded-full text-xs whitespace-nowrap border transition-colors shrink-0 ${o==="all"?"bg-foreground text-background border-foreground":"border-border hover:border-foreground"}`,children:"All Topics"}),AL.map(N=>r.jsx("button",{onClick:()=>l(N),className:`px-3 py-1.5 rounded-full text-xs whitespace-nowrap border transition-colors shrink-0 ${o===N?"bg-foreground text-background border-foreground":"border-border hover:border-foreground"}`,children:N},N))]}),r.jsx("div",{className:"flex gap-1 border-b border-border mb-4",children:[["latest","Latest"],["trending","Trending"],["most_discussed","Most Discussed"]].map(([N,S])=>r.jsx("button",{onClick:()=>u(N),className:`px-3 py-2 text-sm font-medium border-b-2 -mb-px transition-colors ${c===N?"border-foreground text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:S},N))}),w.length>0&&r.jsx("div",{className:"mb-3",children:w.map(N=>r.jsx(k_,{d:N},N.id))}),m?r.jsx("div",{className:"space-y-3",children:[...Array(5)].map((N,S)=>r.jsx("div",{className:"h-28 bg-muted rounded-lg animate-pulse"}
898,S))}):r.jsxs("div",{className:"space-y-3",children:[g.filter(N=>!N.is_pinned).map(N=>r.jsx(k_,{d:N},N.id)),g.length===0&&r.jsxs("div",{className:"text-center py-16 text-muted-foreground",children:[r.jsx(bs,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),r.jsx("p",{children:"No discussions yet in this category."}),r.jsx(se,{to:"/community/new-discussion",children:r.jsx(K,{className:"mt-3",size:"sm",children:"Start the first discussion"})})]})]})]}),r.jsxs("div",{className:"space-y-6",children:[n.length>0&&r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsxs("h3",{className:"font-bold font-heading text-sm uppercase tracking-widest mb-3 flex items-center gap-2",children:[r.jsx(RG,{className:"w-4 h-4 text-orange-500"}),"Trending"]}),r.jsx("div",{className:"space-y-3",children:n.map((N,S)=>r.jsxs(se,{to:`/community/discussions/${N.id}`,className:"flex gap-2 items-start group",children:[r.jsx("span",{className:"text-2xl font-bold text-muted-foreground/20 leading-none w-5 shrink-0",children:S+1}),r.jsx("p",{className:"text-sm font-medium group-hover:text-primary transition-colors line-clamp-2",children:N.title})]},N.id))})]})}),a.length>0&&r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsxs("h3",{className:"font-bold font-heading text-sm uppercase tracking-widest mb-3 flex items-center gap-2",children:[r.jsx(vt,{className:"w-4 h-4 text-blue-500"}),"Active Members"]}),r.jsx("div",{className:"space-y-2",children:a.slice(0,6).map(N=>{var S,A;return r.jsxs(se,{to:`/community/members/${N.id}`,className:"flex items-center gap-2 group",children:[r.jsx("div",{className:"w-7 h-7 rounded-full bg-primary/10 flex items-center justify-center text-xs font-bold text-primary shrink-0",children:((A=(S=N.display_name)==null?void 0:S[0])==null?void 0:A.toUpperCase())||"?"}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:"text-sm font-medium group-hover:text-primary transition-colors truncate",children:N.display_name}),N.badge_primary&&no[N.badge_primary]&&r.jsx("span",{className:`text-xs px-1.5 py-0.5 rounded ${no[N.badge_primary].color}`,children:no[N.badge_primary].label})]})]},N.id)})}),r.jsx(se,{to:"/community/members",className:"block text-xs text-primary hover:underline mt-3 text-center",children:"View all members â"})]})}),r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsx("h3",{className:"font-bold font-heading text-sm uppercase tracking-widest mb-3",children:"Topics"}),r.jsx("div",{className:"flex flex-wrap gap-1.5",children:AL.map(N=>r.jsx("button",{onClick:()=>l(N),className:`px-2 py-1 rounded text-xs border transition-colors ${k9[N]||"bg-muted"} border-transparent`,children:N},N))})]})}),r.jsxs("div",{className:"bg-foreground text-background rounded-xl p-5",children:[r.jsx("p",{className:"text-xs uppercase tracking-widest text-background/50 mb-1",children:"Join the Community"}),r.jsx("h3",{className:"font-bold font-heading text-lg mb-2",children:"Be part of the conversation"}),r.jsx("p",{className:"text-sm text-background/60 mb-4",children:"Share your thoughts on London's finest restaurants, hotels, and lifestyle with fellow Chelsea Monthly readers."}),r.jsx(se,{to:"/community/new-discussion",children:r.jsx(K,{className:"w-full bg-primary text-primary-foreground",children:"Start a Discussion"})})]})]})]})})]})}const KTe={Chelsea:"bg-primary/10 text-primary",Kensington:"bg-blue-50 text-blue-700",Travel:"bg-green-50 text-green-700",Hotels:"bg-amber-50 text-amber-700",Restaurants:"bg-red-50 text-red-700",Property:"bg-yellow-50 text-yellow-700",Motoring:"bg-gray-100 text-gray-700",Watches:"bg-cyan-50 text-cyan-700",Yachts:"bg-sky-50 text-sky-700",Business:"bg-slate-50 text-slate-700",Fashion:"bg-pink-50 text-pink-700",Lifestyle:"bg-teal-50 text-teal-700",Culture:"bg-indigo-50 text-indigo-700"};function YTe(){var c,u;const{id:e}=yo(),[t,n]=j.useState(null),[s,a]=j.useState([]),[i,o]=j.useState(!0);j.useEffect(()=>{(async()=>{const f=(await W.entities.Discussion.filter({id:e}))[0];if(f){n(f),qy();const p=`dview_${e}_${new Date().toDateString()}`;sessionStorage.getItem(p)||(sessionStorage.setItem(p,"1"),W.entities.Discussion.update(e,{views:(f.views||0)+1}));const b=await W.entities.Discussion.filter({category:f.category},"-last_activity",5);a(b.filter(v=>v.id!==e).slice(0,4))}o(!1)})()},[e]);const l=async()=>
898{if(!t)return;const m=(t.likes||0)+1;n(f=>({...f,likes:m})),await W.entities.Discussion.update(e,{likes:m})};return i?r.jsx("div",{className:"max-w-4xl mx-auto px-6 py-16 text-center text-muted-foreground",children:"Loading discussion..."}):t?r.jsx("div",{className:"min-h-screen bg-background",children:r.jsxs("div",{className:"max-w-7xl mx-auto px-4 md:px-6 py-6",children:[r.jsx("div",{className:"mb-6",children:r.jsxs(se,{to:"/community",className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[r.jsx(Ct,{className:"w-4 h-4"}),"Back to Community"]})}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-8",children:[r.jsxs("div",{className:"lg:col-span-2",children:[r.jsxs("div",{className:"mb-6",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-3 flex-wrap",children:[r.jsx(ge,{className:`${KTe[t.category]||"bg-muted"} border-0`,children:t.category}),t.is_featured&&r.jsxs(ge,{className:"bg-primary/10 text-primary border-0",children:[r.jsx(rt,{className:"w-3 h-3 mr-0.5 fill-primary"}),"Featured"]}),t.is_pinned&&r.jsxs(ge,{className:"bg-amber-100 text-amber-700 border-0",children:[r.jsx(Gh,{className:"w-3 h-3 mr-0.5"}),"Pinned"]}),t.is_locked&&r.jsxs(ge,{className:"bg-gray-100 text-gray-700 border-0",children:[r.jsx(ba,{className:"w-3 h-3 mr-0.5"}),"Locked"]}),t.is_auto_generated&&r.jsx(ge,{variant:"outline",className:"text-xs",children:"Article Discussion"})]}),r.jsx("h1",{className:"text-2xl md:text-3xl font-bold font-heading mb-2",children:t.title}),r.jsxs("div",{className:"flex items-center gap-3 text-sm text-muted-foreground flex-wrap",children:[r.jsxs("div",{className:"flex items-center gap-1.5",children:[r.jsx("div",{className:"w-6 h-6 rounded-full bg-primary/10 flex items-center justify-center text-xs font-bold text-primary",children:((u=(c=t.author_name)==null?void 0:c[0])==null?void 0:u.toUpperCase())||"?"}),r.jsx("span",{children:t.author_name||"Community Member"})]}),r.jsx("span",{children:"·"}),r.jsx("span",{children:Il(t.created_date)})]})]}),t.body&&r.jsx(oe,{className:"mb-6",children:r.jsx(ce,{className:"pt-5",children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/90 whitespace-pre-wrap",children:t.body})})}),t.article_id&&r.jsxs(se,{to:`/Articles/${t.article_id}`,className:"flex items-center gap-2 text-sm text-primary hover:underline mb-6 bg-primary/5 rounded-lg p-3",children:[r.jsx(ZL,{className:"w-4 h-4 shrink-0"}),r.jsxs("span",{children:["Read the original article: ",r.jsx("strong",{children:t.article_title})]})]}),r.jsxs("div",{className:"flex items-center gap-3 py-3 border-y border-border mb-6",children:[r.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[r.jsx(Nr,{className:"w-4 h-4"}),jr(t.views)," views"]}),r.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[r.jsx(bs,{className:"w-4 h-4"}),t.comment_count||0," replies"]}),r.jsxs("span",{className:"flex items-center gap-1.5 text-sm text-muted-foreground",children:[r.jsx(vt,{className:"w-4 h-4"}),t.participants||0," participants"]}),r.jsxs("div",{className:"ml-auto flex gap-2",children:[r.jsxs(K,{variant:"ghost",size:"sm",onClick:l,className:"gap-1.5 text-muted-foreground hover:text-red-500",children:[r.jsx(On,{className:"w-4 h-4"}),t.likes||0]}),r.jsx(K,{variant:"ghost",size:"sm",className:"text-muted-foreground",onClick:()=>{navigator.clipboard.writeText(window.location.href)},children:r.jsx(ws,{className:"w-4 h-4"})})]})]}),!t.is_locked&&r.jsx(su,{discussionId:t.id}),t.is_locked&&r.jsxs("div",{className:"py-8 text-center text-muted-foreground bg-muted/30 rounded-lg",children:[r.jsx(ba,{className:"w-6 h-6 mx-auto mb-2"}
898),r.jsx("p",{children:"This discussion is locked. No new replies."})]})]}),r.jsxs("div",{className:"space-y-6",children:[r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsx("h3",{className:"font-semibold text-sm mb-3",children:"About this Discussion"}),r.jsxs("dl",{className:"space-y-2 text-sm",children:[r.jsxs("div",{className:"flex justify-between",children:[r.jsx("dt",{className:"text-muted-foreground",children:"Category"}),r.jsx("dd",{children:t.category})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("dt",{className:"text-muted-foreground",children:"Started"}),r.jsx("dd",{children:new Date(t.created_date).toLocaleDateString("en-GB")})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("dt",{className:"text-muted-foreground",children:"Replies"}),r.jsx("dd",{children:t.comment_count||0})]}),r.jsxs("div",{className:"flex justify-between",children:[r.jsx("dt",{className:"text-muted-foreground",children:"Views"}),r.jsx("dd",{children:jr(t.views)})]})]})]})}),s.length>0&&r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsx("h3",{className:"font-semibold text-sm mb-3",children:"Related Discussions"}),r.jsx("div",{className:"space-y-3",children:s.map(m=>r.jsxs(se,{to:`/community/discussions/${m.id}`,className:"block group",children:[r.jsx("p",{className:"text-sm font-medium group-hover:text-primary transition-colors line-clamp-2",children:m.title}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[m.comment_count||0," replies · ",Il(m.last_activity||m.created_date)]})]},m.id))})]})})]})]})]})}):r.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-16 text-center",children:[r.jsx("p",{children:"Discussion not found."}),r.jsx(se,{to:"/community",children:r.jsx(K,{className:"mt-4",children:"Back to Community"})})]})}const XTe=["Chelsea","Kensington","Knightsbridge","Travel","Hotels","Restaurants","Property","Motoring","Watches","Yachts","Business","Fashion","Lifestyle","Culture","General"];function JTe(){const e=ka(),[t,n]=j.useState({title:"",body:"",category:"Chelsea",author_name:""}),[s,a]=j.useState(!1),i=(l,c)=>n(u=>({...u,[l]:c})),o=async()=>{if(!t.title.trim()||!t.author_name.trim())return;a(!0),localStorage.setItem("cm_name",t.author_name);const l=await W.entities.Discussion.create({...t,views:0,likes:0,comment_count:0,participants:0,trending_score:0,last_activity:new Date().toISOString(),status:"active"});e(`/community/discussions/${l.id}`)};return r.jsx("div",{className:"min-h-screen bg-background",children:r.jsxs("div",{className:"max-w-2xl mx-auto px-4 md:px-6 py-8",children:[r.jsxs(se,{to:"/community",className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground mb-6",children:[r.jsx(Ct,{className:"w-4 h-4"}),"Back to Community"]}),r.jsx("h1",{className:"text-2xl font-bold font-heading mb-6",children:"Start a Discussion"}),r.jsx(oe,{children:r.jsxs(ce,{className:"pt-6 space-y-4",children:[r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium block mb-1",children:"Your Name *"}),r.jsx(de,{value:t.author_name,onChange:l=>i("author_name",l.target.value),placeholder:"How you'll appear in the community"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium block mb-1",children:"Topic / Category *"}),r.jsxs(Xe,{value:t.category,onValueChange:l=>i("category",l),children:[r.jsx(He,{children:r.jsx(Je,{})}),r.jsx(Ge,{children:XTe.map(l=>r.jsx(Pe,{value:l,children:l},l))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium block mb-1",children:"Discussion Title *"}),r.jsx(de,{value:t.title,onChange:l=>i("title",l.target.value),placeholder:"What would you like to discuss?"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground font-medium block mb-1",children:"Your Opening Post"}),r.jsx("textarea",{value:t.body,onChange:l=>i("body",l.target.value),placeholder:"Share your thoughts, experiences, or ask a question...",className:"w-full border border-input rounded-md px-3 py-2 text-sm bg-transparent focus:outline-none focus:ring-1 focus:ring-ring resize-none h-40"})]}),r.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[r.jsx(se,{to:"/community",children:r.jsx(K,{variant:"outline",children:"Cancel"})}),r.jsx(K,{onClick:o,disabled:s||!t.title.trim()||!t.author_name.trim(),className:"bg-foreground text-background hover:bg-foreground
898/90",children:s?"Posting...":"Post Discussion"})]})]})})]})})}function QTe(){var m,f;const{id:e}=yo(),[t,n]=j.useState(null),[s,a]=j.useState([]),[i,o]=j.useState(!0);if(j.useEffect(()=>{(async()=>{const b=(await W.entities.CommunityProfile.filter({id:e}))[0];if(b){n(b);const v=await W.entities.Comment.filter({author_name:b.display_name},"-created_date",10);a(v||[])}o(!1)})()},[e]),i)return r.jsx("div",{className:"max-w-4xl mx-auto px-6 py-16 text-center text-muted-foreground",children:"Loading profile..."});if(!t)return r.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-16 text-center",children:[r.jsx("p",{children:"Member not found."}),r.jsx(se,{to:"/community/members",children:r.jsx(K,{className:"mt-4",children:"All Members"})})]});const l=JSON.parse(t.badges||"[]"),c=JSON.parse(t.interests||"[]"),u=t.badge_primary&&no[t.badge_primary];return r.jsx("div",{className:"min-h-screen bg-background",children:r.jsxs("div",{className:"max-w-4xl mx-auto px-4 md:px-6 py-8",children:[r.jsxs(se,{to:"/community/members",className:"inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground mb-6",children:[r.jsx(Ct,{className:"w-4 h-4"}),"All Members"]}),r.jsxs(oe,{className:"mb-6 overflow-hidden",children:[r.jsx("div",{className:"bg-foreground h-24"}),r.jsxs(ce,{className:"relative pt-0",children:[r.jsxs("div",{className:"flex items-end gap-4 -mt-10 mb-4",children:[r.jsx("div",{className:"w-20 h-20 rounded-full border-4 border-background bg-primary/20 flex items-center justify-center text-2xl font-bold text-primary shrink-0",children:t.avatar_url?r.jsx("img",{src:t.avatar_url,alt:t.display_name,className:"w-full h-full rounded-full object-cover"}):(f=(m=t.display_name)==null?void 0:m[0])==null?void 0:f.toUpperCase()}),r.jsxs("div",{className:"pb-1",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx("h1",{className:"text-xl font-bold font-heading",children:t.display_name}),t.is_verified&&r.jsx(ge,{className:"bg-blue-100 text-blue-700 text-xs",children:"Verified"}),t.is_editor&&r.jsx(ge,{className:"bg-primary/10 text-primary text-xs",children:"Editor"})]}),u&&r.jsx(ge,{className:`text-xs mt-1 ${u.color}`,children:u.label})]})]}),t.bio&&r.jsx("p",{className:"text-sm text-muted-foreground mb-4 leading-relaxed",children:t.bio}),r.jsxs("div",{className:"flex flex-wrap gap-4 text-sm text-muted-foreground mb-4",children:[t.location&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Ft,{className:"w-3.5 h-3.5"}),t.location]}),t.website&&r.jsxs("a",{href:t.website,target:"_blank",rel:"noreferrer",className:"flex items-center gap-1 hover:text-primary",children:[r.jsx(Zn,{className:"w-3.5 h-3.5"}),"Website"]}),t.member_since&&r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Jt,{className:"w-3.5 h-3.5"}),"Member since ",new Date(t.member_since).toLocaleDateString("en-GB",{month:"long",year:"numeric"})]})]}),c.length>0&&r.jsx("div",{className:"flex flex-wrap gap-1.5 mb-4",children:c.map(p=>r.jsx(ge,{variant:"outline",className:"text-xs",children:p},p))})]})]}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[{label:"Comments",value:jr(t.total_comments),icon:bs},{label:"Likes Received",value:jr(t.total_likes_received),icon:On},{label:"Reputation",value:jr(t.reputation_score),icon:rt},{label:"Followers",value:jr(t.total_followers),icon:vt}].map(({label:p,value:b,icon:v})=>r.jsx(oe,{children:r.jsxs(ce,{className:"pt-4 text-center",children:[r.jsx(v,{className:"w-5 h-5 text-muted-foreground mx-auto mb-1"}),r.jsx("p",{className:"text-xl font-bold",children:b}),r.jsx("p",{className:"text-xs text-muted-foreground",children:p})]})},p))}),l.length>0&&r.jsx(oe,{className:"mb-6",children:r.jsxs(ce,{className:"pt-5",children:[r.jsxs("h3",{className:"font-semibold text-sm mb-3 flex items-center gap-2",children:[r.jsx(Pn,{className:"w-4 h-4"}),"Badges"]}),r.jsx("div",{className:"flex flex-wrap gap-2",children:l.map(p=>no[p]&&r.jsx(ge,{className:`${no[p].color} text-xs`,children:no[p].label},p))})]})}),s.length>0&&r.jsx(oe,{children:r.jsxs(ce,{className:"pt-5",children:[r.jsxs("h3",{className:"font-semibold text-sm mb-3 flex items-center gap-2",children:[r.jsx(bs,{className:"w-4 h-4"}),"Recent Activity"]}),r.jsx("div",{className:"space-y-3",children:s.map(p=>r.jsxs("div",{className:"border-b border-border pb-3 last:border-0",children:[r.jsx("p",{className:"text-sm text-foreground
898/90 line-clamp-2",children:p.content}),r.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:Il(p.created_date)})]},p.id))})]})})]})})}function ZTe(){const[e,t]=j.useState([]),[n,s]=j.useState(""),[a,i]=j.useState("reputation"),[o,l]=j.useState(!0);j.useEffect(()=>{(async()=>{const u=await W.entities.CommunityProfile.list("-reputation_score",100);t(u||[]),l(!1)})()},[]);const c=[...e].filter(u=>{var m,f;return!n||((m=u.display_name)==null?void 0:m.toLowerCase().includes(n.toLowerCase()))||((f=u.location)==null?void 0:f.toLowerCase().includes(n.toLowerCase()))}).sort((u,m)=>a==="reputation"?(m.reputation_score||0)-(u.reputation_score||0):a==="comments"?(m.total_comments||0)-(u.total_comments||0):a==="newest"?new Date(m.created_date)-new Date(u.created_date):0);return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-10",children:r.jsxs("div",{className:"max-w-5xl mx-auto",children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-1",children:"Chelsea Community"}),r.jsx("h1",{className:"text-3xl font-bold font-heading",children:"Community Members"})]})}),r.jsxs("div",{className:"max-w-5xl mx-auto px-4 md:px-6 py-8",children:[r.jsxs("div",{className:"flex gap-3 mb-6 flex-wrap items-center",children:[r.jsxs("div",{className:"relative flex-1 min-w-48",children:[r.jsx(dn,{className:"absolute left-2.5 top-2 w-4 h-4 text-muted-foreground"}),r.jsx(de,{placeholder:"Search members...",className:"pl-8 h-8",value:n,onChange:u=>s(u.target.value)})]}),r.jsx("div",{className:"flex gap-1",children:[["reputation","Top Reputation"],["comments","Most Active"],["newest","Newest"]].map(([u,m])=>r.jsx("button",{onClick:()=>i(u),className:`px-3 py-1.5 text-xs rounded border transition-colors ${a===u?"bg-foreground text-background border-foreground":"border-border hover:border-foreground"}`,children:m},u))})]}),o?r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4 animate-pulse",children:[...Array(9)].map((u,m)=>r.jsx("div",{className:"h-32 bg-muted rounded-lg"},m))}):r.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-4",children:[c.map(u=>{var f,p;const m=u.badge_primary&&no[u.badge_primary];return r.jsx(se,{to:`/community/members/${u.id}`,children:r.jsx(oe,{className:"hover:shadow-md transition-shadow h-full",children:r.jsxs(ce,{className:"pt-4 pb-4",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-full bg-primary/10 flex items-center justify-center text-base font-bold text-primary shrink-0",children:u.avatar_url?r.jsx("img",{src:u.avatar_url,alt:u.display_name,className:"w-full h-full rounded-full object-cover"}):(p=(f=u.display_name)==null?void 0:f[0])==null?void 0:p.toUpperCase()}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:"font-semibold text-sm truncate",children:u.display_name}),u.location&&r.jsx("p",{className:"text-xs text-muted-foreground truncate",children:u.location})]})]}),m&&r.jsx(ge,{className:`text-xs mb-2 ${m.color}`,children:m.label}),u.bio&&r.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:u.bio}),r.jsxs("div",{className:"flex gap-3 text-xs text-muted-foreground",children:[r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(rt,{className:"w-3 h-3"}),jr(u.reputation_score)]}),r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(bs,{className:"w-3 h-3"}),jr(u.total_comments)]}),r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(vt,{className:"w-3 h-3"}),jr(u.total_followers)]})]})]})})},u.id)}),c.length===0&&r.jsxs("div",{className:"col-span-3 text-center py-16 text-muted-foreground",children:[r.jsx(vt,{className:"w-10 h-10 mx-auto mb-3 opacity-30"}),r.jsx("p",{children:"No members found."})]})]})]})]})}const eEe={published:"bg-green-100 text-green-800",pending:"bg-yellow-100 text-yellow-800",rejected:"bg-red-100 text-red-700",spam:"bg-gray-100 text-gray-600"};function tEe({comment:e,onPin:t,onApprove:n,onReject:s,onMarkEditor:a}){return r.jsxs("div",{className:"flex items-start gap-3 py-3 border-b border-border last:border-0",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-0.5 flex-wrap",children:[r.jsx("span",{className:"font-semibold text-sm",children:e.author_name}),r.jsx(ge,{className:`text-xs ${eEe[e.status]||""}`,children:e.status}),e.is_pinned&&r.jsx(ge,{className:"text-xs bg-amber-100 text-amber-700",children:"Pinned"}),e.is_editor_comment&&r.jsx(ge,{className:"text-xs bg-primary/10 text-primary",children:"Editor"}),r.jsx("span",{className:"text-xs text-muted-foreground",children:Il(e.created_date)})]}
898),r.jsx("p",{className:"text-sm text-foreground/80 line-clamp-2",children:e.content}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[e.likes||0," likes · ",e.article_id?"Article":"Discussion"]})]}),r.jsxs("div",{className:"flex gap-1 shrink-0",children:[r.jsx(K,{variant:"ghost",size:"icon",className:"w-7 h-7",title:"Pin",onClick:()=>t(e),children:r.jsx(Gh,{className:`w-3.5 h-3.5 ${e.is_pinned?"text-amber-600":""}`})}),r.jsx(K,{variant:"ghost",size:"icon",className:"w-7 h-7 text-blue-600",title:"Editor comment",onClick:()=>a(e),children:r.jsx(rt,{className:"w-3.5 h-3.5"})}),e.status!=="published"&&r.jsx(K,{variant:"ghost",size:"icon",className:"w-7 h-7 text-green-600",onClick:()=>n(e),children:r.jsx(qt,{className:"w-3.5 h-3.5"})}),e.status!=="rejected"&&r.jsx(K,{variant:"ghost",size:"icon",className:"w-7 h-7 text-red-600",onClick:()=>s(e),children:r.jsx(Cl,{className:"w-3.5 h-3.5"})})]})]})}function rEe(){const[e,t]=j.useState([]),[n,s]=j.useState([]),[a,i]=j.useState([]),[o,l]=j.useState([]),[c,u]=j.useState(!0),[m,f]=j.useState({}),[p,b]=j.useState(""),[v,g]=j.useState("Chelsea"),[y,w]=j.useState("");j.useEffect(()=>{N()},[]);const N=async()=>{u(!0);const[M,D,$,q]=await Promise.all([W.entities.Comment.list("-created_date",100),W.entities.Discussion.list("-last_activity",50),W.entities.ArticleEngagement.list("-views_total",20),W.entities.CommunityProfile.list("-reputation_score",20)]);t(M||[]),s(D||[]),i($||[]),l(q||[]),f({totalComments:(M==null?void 0:M.length)||0,pendingComments:(M==null?void 0:M.filter(H=>H.status==="pending").length)||0,spamComments:(M==null?void 0:M.filter(H=>H.status==="spam").length)||0,totalDiscussions:(D==null?void 0:D.length)||0,totalProfiles:(q==null?void 0:q.length)||0,totalViews:($==null?void 0:$.reduce((H,L)=>H+(L.views_total||0),0))||0}),u(!1)},S=async M=>{await W.entities.Comment.update(M.id,{is_pinned:!M.is_pinned}),N()},A=async M=>{await W.entities.Comment.update(M.id,{status:"published"}),N()},k=async M=>{await W.entities.Comment.update(M.id,{status:"rejected"}),N()},C=async M=>{await W.entities.Comment.update(M.id,{is_editor_comment:!M.is_editor_comment}),N()},T=async M=>{await W.entities.Discussion.update(M.id,{is_pinned:!M.is_pinned}),N()},P=async M=>{await W.entities.Discussion.update(M.id,{is_featured:!M.is_featured}),N()},R=async()=>{p.trim()&&(await W.entities.Discussion.create({title:p,body:y,category:v,author_name:"Chelsea Monthly",is_editor_comment:!0,is_featured:!0,views:0,comment_count:0,participants:0,trending_score:0,last_activity:new Date().toISOString(),status:"active"}),b(""),w(""),N())};return r.jsxs("div",{className:"min-h-screen bg-background",children:[r.jsx("div",{className:"bg-foreground text-background px-6 py-8",children:r.jsxs("div",{className:"max-w-7xl mx-auto flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-background/50 text-xs uppercase tracking-widest mb-1",children:"Admin"}),r.jsx("h1",{className:"text-2xl font-bold font-heading",children:"Community Admin"})]}),r.jsxs(K,{variant:"outline",size:"sm",className:"border-background/20 text-background hover:bg-background/10 hover:text-background",onClick:N,children:[r.jsx(ts,{className:"w-4 h-4 mr-1"}),"Refresh"]})]})}),r.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-8",children:[r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-8",children:[{label:"Total Comments",value:m.totalComments,color:"text-foreground",icon:bs},{label:"Pending Review",value:m.pendingComments,color:"text-orange-600",icon:e8},{label:"Discussions",value:m.totalDiscussions,color:"text-blue-600",icon:Xr},{label:"Total Article Views",value:jr(m.totalViews),color:"text-green-600",icon:Nr}].map(({label:M,value:D,color:$,icon:q})=>r.jsx(oe,{children:r.jsx(ce,{className:"pt-5",children:r.jsxs("div",{className:"flex justify-between items-start",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-xs text-muted-foreground mb-1",children:M}),r.jsx("p",{className:`text-2xl font-bold ${$}`,children:D||0})]}),r.jsx(q,{className:`w-5 h-5 ${$} opacity-30`})]})})},M))}),r.jsxs(Aa,{defaultValue:"comments",children:[r.jsxs(Ys,{className:"mb-4",children:[r.jsxs(ft,{value:"comments",children:["Comments (",e.length,")"]}),r.jsxs(ft,{value:"discussions",children:["Discussions (",n.length,")"]}),r.jsx(ft,{value:"engagement",children:"Article Engagement"}),r.jsx(ft,{value:"post",children:"Post as Editor"})]}),r.jsxs(pt,{value:"comments",children:[r.jsx("div",{className:"flex gap-2 mb-3",children:["all","pending","spam"].map(M=>r.jsx("button",{className:"px-3 py-1 text-xs border border-border rounded-full hover:border-foreground capitalize",children:M},M))}),r.jsx(oe,{children:r.jsxs(ce,{className:"p-4 divide-y-0",children:[e.slice(0,50).map(M=>r.jsx(tEe,{comment:M,onPin:S,onApprove:A,onReject:k,onMarkEditor:C},M.id)),e.length===0&&r.jsx("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No comments yet."})]})})]}),r.jsx(pt,{value:"discussions",children:r.jsx("div",{className:"space-y-2",children:n.map(M=>r.jsx(oe,{children:r.jsxs(ce,{className:"p-3 flex items-center gap-3",children:[r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("p",{className:"font-medium text-sm truncate",children:M.title}),M.is_pinned&&r.jsx(ge,{className:"text-xs bg-amber-100 text-amber-700",children:"Pinned"}),M.is_featured&&r.jsx(ge,{className:"text-xs bg-primary/10 text-primary",children:"Featured"}),r.jsx(ge,{variant:"outline",className:"text-xs",children:M.category})]}),r.jsxs("p",{className:"text-xs text-muted-foreground",children:[M.comment_count||0," replies · ",jr(M.views)," views · ",Il(M.last_activity||M.created_date)]})]}),r.jsxs("div",{className:"flex gap-1 shrink-0",children:[r.jsx(K,{variant:"ghost",size:"sm",onClick:()=>T(M),children:r.jsx(Gh,{className:`w-4 h-4 ${M.is_pinned?"text-amber-600":""}`})}),r.jsx(K,{variant:"ghost",size:"sm",onClick:()=>P(M),children:r.jsx(rt,{className:`w-4 h-4 ${M.is_featured?"fill-primary text-primary":""}`})}),r.jsx(se,{to:`/community/discussions/${M.id}`,children:r.jsx(K,{variant:"outline",size:"sm",children:r.jsx(Nr,{className:"w-4 h-4"})})})]})]})},M.id))})}),r.jsx(pt,{value:"engagement",children:r.jsx(oe,{children:r.jsx(ce,{className:"p-4",children:r.jsxs("div",{className:"space-y-2",children:[a.map(M=>r.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-border last:border-0",children:[r.jsxs("div",{children:[r.jsx("p",{className:"font-medium text-sm",children:M.article_title||M.article_id}),r.jsx("p",{className:"text-xs text-muted-foreground",children:M.article_category})]}),r.jsxs("div",{className:"flex gap-4 text-xs text-muted-foreground",children:[r.jsxs("span",{className:"flex items-center gap-1",children:[r.jsx(Nr,{className:"w-3 h-3"}),jr(M.views_total)]}),r.jsxs("span",{children:["⤠",M.likes||0]}),r.jsxs("span",{children:["ð¬ ",M.comments_count||0]}),r.jsxs("span",{children:["ð ",M.bookmarks||0]})]})]},M.id)),a.length===0&&r.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No engagement data yet."})]})})})}),r.jsx(pt,{value:"post",children:r.jsx(oe,{children:r.jsxs(ce,{className:"pt-6 space-y-4 max-w-xl",children:[r.jsx("h3",{className:"font-semibold",children:"Post as Chelsea Monthly"}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Category"}),r.jsx("select",{className:"w-full border border-input rounded-md px-3 py-1.5 text-sm bg-transparent mt-1",value:v,onCh
898ange:M=>g(M.target.value),children:["Chelsea","Kensington","Knightsbridge","Travel","Hotels","Restaurants","Property","Motoring","Watches","Yachts","Business","Fashion","Lifestyle","Culture"].map(M=>r.jsx("option",{value:M,children:M},M))})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Discussion Title"}),r.jsx("input",{className:"w-full border border-input rounded-md px-3 py-1.5 text-sm bg-transparent mt-1 focus:outline-none focus:ring-1 focus:ring-ring",value:p,onChange:M=>b(M.target.value)})]}),r.jsxs("div",{children:[r.jsx("label",{className:"text-xs text-muted-foreground",children:"Opening Message"}),r.jsx("textarea",{className:"w-full border border-input rounded-md px-3 py-2 text-sm h-28 resize-none bg-transparent mt-1 focus:outline-none focus:ring-1 focus:ring-ring",value:y,onChange:M=>w(M.target.value)})]}),r.jsx(K,{onClick:R,disabled:!p.trim(),className:"bg-foreground text-background hover:bg-foreground/90",children:"Post as Chelsea Monthly"})]})})})]})]})]})}const vh=({title:e,children:t})=>r.jsxs("div",{className:"mb-10",children:[r.jsx("h2",{className:"text-xs font-bold uppercase tracking-[0.2em] text-primary mb-4 pb-2 border-b border-border",children:e}),r.jsx("div",{className:"space-y-4",children:t})]}),$r=({role:e,name:t,email:n})=>r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-1 sm:gap-6",children:[e&&r.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground w-40 shrink-0 pt-0.5",children:e}),r.jsxs("div",{children:[t&&r.jsx("p",{className:"text-sm font-semibold text-foreground",children:t}),n&&r.jsx("a",{href:`mailto:${n}`,className:"text-xs text-primary hover:underline",children:n})]})]});function nEe(){return r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsxs("div",{className:"bg-secondary text-secondary-foreground py-16 px-6 text-center",children:[r.jsx("p",{className:"text-xs font-bold uppercase tracking-[0.3em] text-primary mb-3",children:"Chelsea Monthly"}),r.jsx("h1",{className:"text-4xl sm:text-5xl font-bold mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Contact Us"}),r.jsx("p",{className:"text-secondary-foreground/60 text-sm max-w-md mx-auto",children:"London's No.1 Luxury & Lifestyle Magazine"})]}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsxs(vh,{title:"Editorial & Production Staff",children:[r.jsx($r,{role:"Managing Editor",name:"Lucy Coleman",email:"[email protected]"}),r.jsx($r,{role:"Deputy Editor",name:"Jeff Armstrong",email:"[email protected]"}),r.jsx($r,{role:"Photography",name:"Richard Jones",email:"[email protected]"}),r.jsx($r,{role:"Critics",name:"Len McBride, Phil Goode, Linda Sykes",email:"[email protected]"})]}),r.jsxs(vh,{title:"Staff Writers",children:[r.jsx($r,{name:"Jeff Armstrong",role:"Local News",email:"[email protected]"}),r.jsx($r,{name:"Alice McKenzie",role:"Features",email:"[email protected]"}),r.jsx($r,{name:"Charlotte Williams",role:"General News",email:"[email protected]"}),r.jsx($r,{name:"Annie Palmer",role:"Music & Fashion",email:"[email protected]"}),r.jsx($r,{name:"Jordan Kensington",role:"Travel & Lifestyle",email:"[email protected]"}),r.jsx($r,{name:"Lesley Cameron",role:"Food & Drink",email:"[email protected]"}),r.jsx($r,{name:"Peter Southerby",role:"Entertainment",email:"[email protected]"}),r.jsx($r,{name:"Simon MacFadden",role:"Property",email:"[email protected]"})]}),r.jsxs(vh,{title:"Design",children:[r.jsx($r,{role:"Designer",name:"Najam Saleh"}),r.jsx($r,{role:"Design Assistant",name:"Emily Parsons"}),r.jsx($r,{role:"Photo Editor",name:"Ahmed Patel",email:"[email protected]"})]}),r.jsxs(vh,{title:"Advertising",children:[r.jsx($r,{role:"Brand Director",name:"Andy Bradshaw",email:"[email protected]"}),r.jsx($r,{role:"Operations Manager",name:"Sara Kensington",email:"[email protected]"}),r.jsx($r,{role:"Advertising Manager",name:"David Jacobs",email:"[email protected]"})]}),r.jsx(vh,{title:"Social Media",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(gd,{className:"w-4 h-4 text-primary"}),r.jsx("a",{href:"https://twitter.com/chelseamonthly",target:"_blank",rel:"noopener noreferrer",className:"text-sm font-semibold hover:text-primary transition-colors",children:"@chelseamonthly"})]})}),r.jsxs("div",{className:"bg-muted/50 border border-border rounded-sm p-8 mt-4",children:[r.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-primary mb-4",children:"Republic Worldwide Group (RWG)"}),r.jsx("p",{className:"text-sm text-muted-foreground mb-5 leading-relaxed",children:"Send all posts, parcels, and correspondence to:"}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(Ft,{className:"w-4 h-4 text-primary shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("p",{className:"text-sm font-semibold text-foreground",children:"Republic Worldwide Group"}),r.jsx("p",{className:"text-sm text-muted-foreground",children:"c/o Chelsea Monthly, 42 Theobalds Road, London WC1X 8NW"})]})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(Hl,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("a",{href:"tel:+442038563307",className:"text-sm text-foreground hover:text-primary transition-colors",children:"020 3856 3307"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(es,{className:"w-4 h-4 text-primary shrink-0"}),r.jsxs("div",{className:"flex flex-wrap gap-x-3 gap-y-1",children:[r.jsx("a",{href:"mailto:[email protected]",className:"text-sm text-primary hover:underline",children:"[email protected]"}),r.jsx("span",{className:"text-muted-foreground text-sm",children:"|"}),r.jsx("a",{href:"mailto:[email protected]",className:"text-sm text-primary hover:underline",children:"[email protected]"})]})]})]}),r.jsx("div",{className:"mt-6 pt-5 border-t border-border text-xs text-muted-foreground leading-relaxed",children:"Chelsea Monthly © & www.chelseamonthly.com are owned by Republic Worldwide Group ©"})]})]})]})}function sEe(){return r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"bg-secondary text-secondary-foreground py-24 relative overflow-hidden",children:[r.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://images.unsplash.com/photo-1513635269975-59663e0ac1ad?w=1600')] bg-cover bg-center"}),r.jsx("div",{className:"absolute inset-0 bg-secondary/80"}),r.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-6 text-center",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-4",children:"Est. 2011 · London"}),r.jsxs("h1",{className:"text-5xl sm:text-7xl font-serif text-secondary-foreground mb-6 leading-tight",children:["About Chelsea",r.jsx("br",{}),r.jsx("span",{className:"text-primary italic font-light",children:"Monthly"})]}),r.jsx("div",{className:"w-20 h-px bg-primary mx-auto mb-8"}
898),r.jsx("p",{className:"text-secondary-foreground/70 text-xl font-light max-w-2xl mx-auto leading-relaxed",children:"London's No.1 Luxury & Lifestyle magazine, connecting the most discerning readers with the finest stories from Chelsea, Knightsbridge and beyond."})]})]}),r.jsx("section",{className:"py-20 bg-background",children:r.jsx("div",{className:"max-w-5xl mx-auto px-6",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-4",children:"Our Mission"}),r.jsx("h2",{className:"text-4xl font-serif text-foreground mb-6 leading-tight",children:"Where Luxury Meets Editorial Excellence"}),r.jsx("p",{className:"text-muted-foreground leading-relaxed mb-5 text-lg font-light",children:"Chelsea Monthly has been the definitive voice of luxury living in London since 2011. We curate the finest stories in travel, fashion, dining, property, motoring and culture â presented with the editorial rigour and visual elegance that our audience expects."}),r.jsx("p",{className:"text-muted-foreground leading-relaxed font-light",children:"With over 150,000 copies distributed throughout Chelsea, South Kensington and Knightsbridge â and a growing global digital readership â we are the trusted companion of London's most discerning residents and visitors."})]}),r.jsxs("div",{className:"relative",children:[r.jsx("img",{src:"https://images.unsplash.com/photo-1460925895917-afdab827c52f?w=800",alt:"Chelsea Monthly Editorial",className:"w-full h-[400px] object-cover rounded-sm shadow-2xl"}),r.jsxs("div",{className:"absolute -bottom-6 -left-6 bg-primary p-6 shadow-xl",children:[r.jsx("span",{className:"text-primary-foreground text-3xl font-serif font-bold block",children:"150K+"}),r.jsx("span",{className:"text-primary-foreground/80 text-xs uppercase tracking-widest",children:"Monthly Readers"})]})]})]})})}),r.jsx("section",{className:"py-16 bg-muted/30 border-y border-border",children:r.jsx("div",{className:"max-w-5xl mx-auto px-6",children:r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-8 text-center",children:[{icon:Yd,value:"15+",label:"Years Publishing"},{icon:vt,value:"150K+",label:"Print Readers"},{icon:Zn,value:"1M+",label:"Online Visitors"},{icon:Pn,value:"20+",label:"Industry Awards"}].map(({icon:e,value:t,label:n},s)=>r.jsxs("div",{className:"flex flex-col items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-full flex items-center justify-center",children:r.jsx(e,{className:"w-5 h-5 text-primary"})}),r.jsx("span",{className:"text-3xl font-serif text-foreground font-bold",children:t}),r.jsx("span",{className:"text-muted-foreground text-xs uppercase tracking-widest",children:n})]},s))})})}),r.jsx("section",{className:"py-20 bg-background",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6 text-center",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-4",children:"What We Cover"}),r.jsx("h2",{className:"text-4xl font-serif text-foreground mb-12",children:"Editorial Pillars"}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4",children:["Travel","Lifestyle","Fashion & Style","Property","Motoring","Business","Entertainment","Dining","Culture","Watches","Wellness","Events"].map(e=>r.jsx("div",{className:"bg-muted/40 border border-border p-4 text-center hover:border-primary hover:bg-primary/5 transition-all",children:r.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-foreground",children:e})},e))})]})}),r.jsx("section",{className:"py-20 bg-secondary text-secondary-foreground",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-14",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-3",children:"The People Behind the Pages"}),r.jsx("h2",{className:"text-4xl font-serif text-secondary-foreground",children:"Our Leadership"})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[{name:"Jeff Armstrong",role:"Editor-in-Chief",bio:"Award-winning journalist with over 20 years covering luxury lifestyle, culture and society."},{name:"Lesley Cameron",role:"Deputy Editor",bio:"Specialist in travel and lifestyle journalism, curating the finest destinations and experiences."},{name:"Gary Brooker",role:"Arts & Culture Editor",bio:"A celebrated voice in London's cultural scene, covering music, theatre, opera and the visual arts."}].map((e,t)=>r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"w-20 h-20 bg-primary/20 rounded-full mx-auto mb-4 flex items-center justify-center",children:r.jsx(vt,{className:"w-8 h-8 text-primary"})}),r.jsx("h3",{className:"text-lg font-serif font-semibold text-secondary-foreground",children:e.name}),r.jsx("p",{className:"text-primary text-xs uppercase tracking-widest mb-3",children:e.role}
898),r.jsx("p",{className:"text-secondary-foreground/60 text-sm font-light leading-relaxed",children:e.bio})]},t))}),r.jsx("div",{className:"text-center mt-10",children:r.jsx(se,{to:"/Authors",className:"inline-flex items-center gap-2 border border-primary text-primary px-8 py-3 text-xs font-bold uppercase tracking-widest hover:bg-primary hover:text-primary-foreground transition-all",children:"Meet All Contributors"})})]})}),r.jsx("section",{className:"py-16 bg-background border-t border-border",children:r.jsxs("div",{className:"max-w-2xl mx-auto px-6 text-center",children:[r.jsx("h2",{className:"text-3xl font-serif text-foreground mb-4",children:"Get In Touch"}),r.jsx("p",{className:"text-muted-foreground mb-8 font-light",children:"For editorial inquiries, advertising opportunities, or general questions."}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[r.jsxs(se,{to:"/contact",className:"inline-flex items-center gap-2 bg-primary text-primary-foreground px-8 py-3 text-xs font-bold uppercase tracking-widest hover:bg-primary/90 transition-all",children:[r.jsx(es,{className:"w-4 h-4"})," Contact Us"]}),r.jsx(se,{to:"/advertise",className:"inline-flex items-center gap-2 border border-foreground text-foreground px-8 py-3 text-xs font-bold uppercase tracking-widest hover:bg-foreground hover:text-background transition-all",children:"Advertise With Us"})]})]})})]})}const aEe=[{name:"Bronze",price:"£500",period:"/ month",description:"Perfect for local businesses seeking targeted Chelsea & Knightsbridge exposure.",features:["Full-page digital ad","Homepage sidebar placement","1 month minimum","Brand logo in footer","Newsletter mention"]},{name:"Gold",price:"£1,500",period:"/ month",description:"Premium placement for brands that demand top-tier visibility.",features:["Homepage hero banner","Dedicated editorial feature","Print + digital inclusion","Social media promotion","Priority newsletter slot","Analytics report"],featured:!0},{name:"Platinum",price:"£3,500",period:"/ month",description:"The ultimate partnership for luxury brands seeking full editorial integration.",features:["Exclusive full-page spread","Dedicated branded content series","Event co-sponsorship option","Print magazine double page","VIP event invitations","Bespoke campaign reporting","Account manager"]}];function iEe(){return r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"bg-secondary text-secondary-foreground py-24 relative overflow-hidden",children:[r.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://images.unsplash.com/photo-1493612276216-ee3925520721?w=1600')] bg-cover bg-center"}),r.jsx("div",{className:"absolute inset-0 bg-secondary/85"}),r.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-6 text-center",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-4",children:"Reach London's Elite"}),r.jsxs("h1",{className:"text-5xl sm:text-7xl font-serif text-secondary-foreground mb-6 leading-tight",children:["Advertise With",r.jsx("br",{}),r.jsx("span",{className:"text-primary italic font-light",children:"Chelsea Monthly"})]}),r.jsx("div",{className:"w-20 h-px bg-primary mx-auto mb-8"}),r.jsx("p",{className:"text-secondary-foreground/70 text-xl font-light max-w-2xl mx-auto leading-relaxed",children:"Connect your brand with London's most affluent and discerning audience across print and digital platforms."})]})]}),r.jsx("section",{className:"py-20 bg-background",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-16",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-3",children:"Why Chelsea Monthly"}),r.jsx("h2",{className:"text-4xl font-serif text-foreground",children:"Our Audience"})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:[{icon:vt,stat:"150,000+",label:"Print Readers Monthly",desc:"Distributed across Chelsea, South Kensington and Knightsbridge â the highest concentration of HNW individuals in the UK."},{icon:Zn,stat:"1M+",label:"Digital Visitors",desc:"A growing global readership of affluent professionals, entrepreneurs and luxury consumers accessing our digital edition."},{icon:Xr,stat:"£120K",label:"Average Reader Income",desc:"Our readers represent the top 5% of earners in the UK â CEOs, investors, professionals and luxury lifestyle enthusiasts."}].map(({icon:e,stat:t,label:n,desc:s},a)=>r.jsxs("div",{className:"text-center p-8 border border-border hover:border-primary transition-all",children:[r.jsx(e,{className:"w-8 h-8 text-primary mx-auto mb-4",strokeWidth:1}),r.jsx("span",{className:"text-4xl font-serif text-foreground font-bold block mb-2",children:t}),r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-widest block mb-4",children:n}),r.jsx("p",{className:"text-muted-foreground text-sm font-light leading-relaxed",children:s})]},a))})]})}),r.jsx("section",{className:"py-20 bg-muted/20 border-y border-border",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-16",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-3",children:"Advertising Packages"}),r.jsx("h2",{className:"text-4xl font-serif text-foreground",children:"Choose Your Partnership"})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-8",children:aEe.map((e,t)=>r.jsxs("div",{className:`relative flex flex-col border ${e.featured?"border-primary shadow-2xl shadow-primary/10":"border-border"} bg-background p-8`,children:[e.featured&&r.jsx("div",{className:"absolute -top-4 left-1/2 -translate-x-1/2 bg-primary text-primary-foreground text-[10px] font-bold px-4 py-1.5 uppercase tracking-widest",children:"Most Popular"}),r.jsx("h3",{className:"text-2xl font-serif text-foreground mb-1",children:e.name}),r.jsxs("div",{className:"flex items-end gap-1 mb-4",children:[r.jsx("span",{className:"text-4xl font-bold text-primary",children:e.price}),r.jsx("span",{className:"text-muted-foreground text-sm mb-1",children:e.period})]}),r.jsx("p",{className:"text-muted-foreground text-sm font-light mb-6 leading-relaxed",children:e.description}),r.jsx("ul",{className:"space-y-3 mb-8 flex-1",children:e.features.map((n,s)=>r.jsxs("li",{className:"flex items-start gap-2.5 text-sm text-foreground",children:[r.jsx(qt,{className:"w-4 h-4 text-primary shrink-0 mt-0.5"}),n]},s))}),r.jsx("a",{href:"mailto:[email protected]",className:`w-full py-3 text-xs font-bold uppercase tracking-widest text-center block transition-all ${e.featured?"bg-primary text-primary-foreground hover:bg-primary/90":"border border-foreground text-foreground hover:bg-foreground hover:text-background"}`,children:"Enquire Now"})]},t))}),r.jsx("p",{className:"text-center text-muted-foreground text-sm mt-8",children:"All packages include a dedicated account manager. Custom campaigns available on request."})]})}),r.jsx("section",{className:"py-20 bg-background",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[r.jsx("div",{className:"text-center mb-14",children:r.jsx("h2",{className:"text-4xl font-serif text-foreground mb-4",children:"Ad Formats Available"})}),r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:["Full Page Print","Double Page Spread","Homepage Banner","Sidebar Display","Newsletter Sponsor","Branded Content","Social Media Post","Event Sponsorship"].map((e,t)=>r.jsxs("div",{className:"border border-border p-5 text-center hover:border-primary hover:bg-primary/5 transition-all",children:[r.jsx(rt,{className:"w-4 h-4 text-primary mx-auto mb-2"}),r.jsx("span",{className:"text-xs font-bold uppercase tracking-widest text-foreground",children:e})]},t))})]})}),r.jsx("section",{className:"py-20 bg-secondary text-secondary-foreground",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[r.jsx("h2",{className:"text-4xl font-serif text-secondary-foreground mb-6",children:"Ready to Reach London's Elite?"}
898),r.jsx("p",{className:"text-secondary-foreground/60 text-lg font-light mb-10",children:"Contact our advertising team today to discuss bespoke campaigns tailored to your brand objectives."}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-6 justify-center items-center",children:[r.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-2 bg-primary text-primary-foreground px-8 py-4 text-xs font-bold uppercase tracking-widest hover:bg-primary/90 transition-all",children:[r.jsx(es,{className:"w-4 h-4"})," [email protected]"]}),r.jsxs("a",{href:"tel:02038563307",className:"inline-flex items-center gap-2 border border-secondary-foreground/30 text-secondary-foreground px-8 py-4 text-xs font-bold uppercase tracking-widest hover:border-primary hover:text-primary transition-all",children:[r.jsx(Hl,{className:"w-4 h-4"})," 020 3856 3307"]})]})]})})]})}const oEe=[{date:"2 June 2026",title:"Chelsea Monthly Launches New Digital Platform",category:"Corporate"},{date:"15 May 2026",title:"Chelsea Monthly Attends 19th Annual Global Travel Awards in Shanghai",category:"Events"},{date:"28 April 2026",title:"Chelsea Monthly Partners with Republic Worldwide Group for Global Expansion",category:"Partnership"},{date:"10 March 2026",title:"Chelsea Monthly Celebrates 15 Years of Luxury Publishing",category:"Milestone"},{date:"20 January 2026",title:"Chelsea Monthly Reaches One Million Digital Readers",category:"Milestone"}],lEe=[{name:"Brand Logo Pack",format:"ZIP · PNG, SVG, PDF",icon:hy},{name:"Media Kit 2026",format:"PDF · 12 pages",icon:Rn},{name:"Editor Headshots",format:"ZIP · Hi-Res JPG",icon:KH},{name:"Brand Guidelines",format:"PDF · 24 pages",icon:Rn}];function cEe(){return r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"bg-secondary text-secondary-foreground py-24 relative overflow-hidden",children:[r.jsx("div",{className:"absolute inset-0 opacity-10 bg-[url('https://images.unsplash.com/photo-1504711434969-e33886168f5c?w=1600')] bg-cover bg-center"}),r.jsx("div",{className:"absolute inset-0 bg-secondary/85"}),r.jsxs("div",{className:"relative z-10 max-w-4xl mx-auto px-6 text-center",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-4",children:"Press & Media"}),r.jsxs("h1",{className:"text-5xl sm:text-7xl font-serif text-secondary-foreground mb-6 leading-tight",children:["Media ",r.jsx("span",{className:"text-primary italic font-light",children:"Room"})]}),r.jsx("div",{className:"w-20 h-px bg-primary mx-auto mb-8"}),r.jsx("p",{className:"text-secondary-foreground/70 text-xl font-light max-w-2xl mx-auto leading-relaxed",children:"Official press resources, brand assets and news releases from Chelsea Monthly and Republic Worldwide Group."})]})]}),r.jsx("section",{className:"py-20 bg-background",children:r.jsx("div",{className:"max-w-5xl mx-auto px-6",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-16 items-center",children:[r.jsxs("div",{children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-4",children:"About Us"}),r.jsx("h2",{className:"text-4xl font-serif text-foreground mb-6",children:"For the Press"}),r.jsx("p",{className:"text-muted-foreground leading-relaxed mb-5 text-lg font-light",children:"Chelsea Monthly is London's No.1 luxury and lifestyle magazine, published by Republic Worldwide Group. Since 2011, we have been the definitive editorial voice of Chelsea, Knightsbridge and South Kensington."}),r.jsx("p",{className:"text-muted-foreground leading-relaxed font-light",children:"With a print circulation of 150,000 and a growing global digital readership exceeding one million monthly visitors, Chelsea Monthly reaches the UK's most affluent and culturally engaged audience."})]}),r.jsx("div",{className:"grid grid-cols-2 gap-4",children:[{icon:vt,value:"150K+",label:"Print Readers"},{icon:Zn,value:"1M+",label:"Online Visitors"},{icon:Pn,value:"15+",label:"Years Publishing"},{icon:Rn,value:"180+",label:"Issues Published"}].map(({icon:e,value:t,label:n},s)=>r.jsxs("div",{className:"bg-muted/30 border border-border p-6 text-center",children:[r.jsx(e,{className:"w-6 h-6 text-primary mx-auto mb-3",strokeWidth:1}),r.jsx("span",{className:"text-2xl font-serif font-bold text-foreground block",children:t}),r.jsx("span",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:n})]},s))})]})})}),r.jsx("section",{className:"py-20 bg-muted/20 border-y border-border",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[r.jsx("div",{className:"flex items-center justify-between mb-12",children:r.jsxs("div",{children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-2",children:"Latest News"}),r.jsx("h2",{className:"text-4xl font-serif text-foreground",children:"Press Releases"})]})}),r.jsx("div",{className:"space-y-4",children:oEe.map((e,t)=>r.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4 p-6 bg-background border border-border hover:border-primary transition-all group",children:[r.jsxs("div",{className:"flex items-start gap-4",children:[r.jsx("div",{className:"text-center shrink-0",children:r.jsx("span",{className:"text-xs text-muted-foreground block",children:e.date})}),r.jsxs("div",{children:[r.jsx("span",{className:"text-[10px] font-bold text-primary uppercase tracking-widest block mb-1",children:e.category}),r.jsx("h3",{className:"text-base font-serif font-medium text-foreground group-hover:text-primary transition-colors",children:e.title})]})]}),r.jsxs("button",{className:"text-xs font-bold text-muted-foreground uppercase tracking-widest hover:text-primary transition-colors flex items-center gap-1.5 shrink-0",children:[r.jsx(Rn,{className:"w-3.5 h-3.5"})," Read More"]})]},t))})]})}),r.jsx("section",{className:"py-20 bg-background",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6",children:[r.jsxs("div",{className:"text-center mb-14",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-3",children:"Downloads"}),r.jsx("h2",{className:"text-4xl font-serif text-foreground",children:"Media Assets"})]}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:lEe.map((e,t)=>r.jsxs("div",{className:"border border-border p-6 text-center hover:border-primary hover:bg-primary/5 transition-all group cursor-pointer",children:[r.jsx(e.icon,{className:"w-8 h-8 text-primary mx-auto mb-4",strokeWidth:1}),r.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1 group-hover:text-primary transition-colors",children:e.name}),r.jsx("p",{className:"text-xs text-muted-foreground mb-4",children:e.format}),r.jsxs("button",{className:"text-[10px] font-bold text-primary uppercase tracking-widest flex items-center gap-1 mx-auto",children:[r.jsx(hy,{className:"w-3 h-3"})," Download"]})]},t))}),r.jsx("p",{className:"text-center text-muted-foreground text-sm mt-8",children:"For additional assets or hi-resolution photography, contact our press team."})]})}),r.jsx("section",{className:"py-20 bg-secondary text-secondary-foreground",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-4",children:"Press Enquiries"}),r.jsx("h2",{className:"text-4xl font-serif text-secondary-foreground mb-6",children:"Contact the Press Office"}
898),r.jsx("p",{className:"text-secondary-foreground/60 text-lg font-light mb-10",children:"For press accreditation, interview requests, or editorial enquiries, contact our press team directly."}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-6 justify-center items-center",children:[r.jsxs("a",{href:"mailto:[email protected]",className:"inline-flex items-center gap-2 bg-primary text-primary-foreground px-8 py-4 text-xs font-bold uppercase tracking-widest hover:bg-primary/90 transition-all",children:[r.jsx(es,{className:"w-4 h-4"})," [email protected]"]}),r.jsxs("a",{href:"tel:02038563307",className:"inline-flex items-center gap-2 border border-secondary-foreground/30 text-secondary-foreground px-8 py-4 text-xs font-bold uppercase tracking-widest hover:border-primary hover:text-primary transition-all",children:[r.jsx(Hl,{className:"w-4 h-4"})," 020 3856 3307"]})]}),r.jsx("p",{className:"text-secondary-foreground/40 text-xs uppercase tracking-widest mt-8",children:"Published by Republic Worldwide Group · 104 Judd Street, London"})]})})]})}function dEe(){return r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsx("section",{className:"bg-secondary text-secondary-foreground py-20",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-4",children:"Legal"}),r.jsx("h1",{className:"text-5xl font-serif text-secondary-foreground mb-4",children:"Terms of Use"}),r.jsx("div",{className:"w-16 h-px bg-primary mx-auto mb-4"}),r.jsx("p",{className:"text-secondary-foreground/60 text-sm",children:"Last updated: 1 January 2026"})]})}),r.jsx("section",{className:"py-16 bg-background",children:r.jsx("div",{className:"max-w-3xl mx-auto px-6 prose prose-sm max-w-none",children:[{title:"1. Acceptance of Terms",body:"By accessing and using the Chelsea Monthly website (www.chelseamonthly.com), you accept and agree to be bound by these Terms of Use. If you do not agree to these terms, please do not use this website. Chelsea Monthly is published by Republic Worldwide Group."},{title:"2. Use of Content",body:"All content published on chelseamonthly.com â including articles, photography, graphics, and editorial copy â is the intellectual property of Chelsea Monthly and Republic Worldwide Group unless otherwise stated. You may not reproduce, distribute, modify, or republish any content without prior written consent."},{title:"3. User Conduct",body:"You agree not to use this website for any unlawful purpose, to transmit any harmful or offensive material, to attempt to gain unauthorised access to any part of the site, or to engage in any conduct that disrupts or interferes with the operation of the website."},{title:"4. Membership & Subscriptions",body:"Paid memberships and subscriptions are subject to separate terms at the point of purchase. All subscription fees are charged in GBP. Cancellations must be made at least 48 hours before the next billing date. Chelsea Monthly reserves the right to modify subscription pricing with reasonable notice."},{title:"5. Third-Party Links",body:"Our website may contain links to third-party websites. These links are provided for your convenience only. Chelsea Monthly has no control over the content of those sites and accepts no responsibility for them or for any loss or damage that may arise from your use of them."},{title:"6. Privacy",body:"Your use of this website is also governed by our Privacy Policy. By using chelseamonthly.com, you consent to the collection and use of information as described therein. We do not sell personal data to third parties."},{title:"7. Disclaimer of Warranties",body:"This website is provided 'as is' without any representations or warranties, express or implied. Chelsea Monthly makes no representations or warranties in relation to this website or the information and materials provided on this website."},{title:"8. Limitation of Liability",body:"Chelsea Monthly and Republic Worldwide Group shall not be liable for any indirect, incidental, special, or consequential damages arising out of or in connection with your use of this website. Our total liability to you shall not exceed the amount paid by you, if any, for accessing this website."},{title:"9. Governing Law",body:"These terms shall be governed by and construed in accordance with the laws of England and Wales. Any disputes arising under these terms shall be subject to the exclusive jurisdiction of the courts of England and Wales."},{title:"10. Changes to Terms",body:"Chelsea Monthly reserves the right to revise these Terms of Use at any time. We will notify users of significant changes. Your continued use of the website following any changes constitutes your acceptance of the revised terms."},{title:"11. Contact",body:"For any questions regarding these Terms of Use, please contact us at: [email protected] or write to: Republic Worldwide Group, 104 Judd Street, London."}].map(({title:e,body:t},n)=>r.jsxs("div",{className:"mb-10 pb-10 border-b border-border last:border-0 last:pb-0",children:[r.jsx("h2",{className:"text-xl font-serif font-semibold text-foreground mb-3",children:e}),r.jsx("p",{className:"text-muted-foreground leading-relaxed font-light",children:t})]},n))})})]})}const uEe=[{category:"Subscriptions & Membership",items:[{q:"What membership options are available?",a:"Chelsea Monthly offers two membership tiers: Digital Member (£9.99/month) â full digital archive, premium articles and member newsletters; and Chelsea Club Member (£19.99/month + £2 postage) â everything in Digital plus the printed magazine delivered to your door."},{q:"How do I subscribe?",a:"Visit our Membership page and choose your preferred plan. Payments are processed securely via Stripe. You can cancel at any time from your account dashboard."},{q:"Can I cancel my subscription?",a:"Yes. You can cancel at any time from your account settings. Cancellations take effect at the end of your current billing period. We do not offer refunds for partial months."},{q:"Do you offer a free trial?",a:"We offer a free trial for the Digital Member tier. No credit card is required to start. You will be asked for payment details before the trial ends."},{q:"How do I update my billing details?",a:"Log in to your account, navigate to Account Settings, and select Billing. You can update your payment method at any time."}]},{category:"Print Magazine",items:[{q:"Where is the print magazine distributed?",a:"Chelsea Monthly print edition is distributed throughout Chelsea, South Kensington and Knightsbridge with over 150,000 copies per issue. It is also available at selected luxury hotels, private members' clubs and premium retail outlets across London."},{q:"Can I get the print magazine delivered internationally?",a:"Yes. International print subscriptions are available. Please contact us at [email protected] for international postage rates and availability."},{q:"How often is the magazine published?",a:"Chelsea Monthly is published monthly, 12 issues per year. Subscribers receive their copy before it reaches newsstands."}]},{category:"Editorial & Content",items:[{q:"How can I submit a story or press release?",a:"We welcome editorial submissions and press releases. Please email [email protected] with your pitch or release. Our editorial team reviews all submissions, though we cannot guarantee publication."},{q:"Can I republish Chelsea Monthly content?",a:"All content is copyright Chelsea Monthly and Republic Worldwide Group. Republication requires prior written consent. For syndication enquiries, contact [email protected]."},{q:"How do I become a contributor?",a:"We are always looking for talented writers, photographers and contributors with expertise in luxury lifestyle, travel, fashion, property and business. Send your portfolio and a brief introduction to [email protected]."}]},{category:"Advertising & Partnerships",items:[{q:"How do I advertise in Chelsea Monthly?",a:"Visit our Advertise page for full details on our advertising packages, or contact our team directly at [email protected]. We offer print, digital, newsletter and event sponsorship opportunities."},{q:"Do you offer sponsored content?",a:"Yes. We offer bespoke branded content and sponsored editorial packages. These are clearly labelled as 'Sponsored' and are subject to our editorial standards. Contact [email protected] for details."},{q:"What is the deadline for print advertising?",a:"Print advertising copy deadlines are typically 3 weeks before the issue date. Contact our advertising team for the current editorial calendar and availability."}]},{category:"Technical & Account",items:[{q:"I can't log in to my account. What should I do?",a:"Click 'Forgot Password' on the login page to reset your password. If you continue to experience issues, contact us at [email protected]."},{q:"Is my personal data secure?",a:"Yes. We take data security seriously. All payment information is processed by Stripe and is never stored on our servers. We comply with UK GDPR. Please read our Privacy Policy for full details."},{q:"The website isn't loading correctly. What should I do?",a:"Try clearing your browser cache and cookies, then reload the page. If the issue persists, please contact us at [email protected] with details of the problem and your browser/device."}]}];function hEe({q:e,a:t}){const[n,s]=j.useState(!1);return r.jsxs("div",{className:"border-b border-border last:border-0",children:[r.jsxs("button",{onClick:()=>s(!n),className:"w-full flex items-center justify-between py-5 text-left gap-4 group",children:[r.jsx("span",{className:"text-sm font-semibold text-foreground group-hover:text-primary transition-colors",children:e}),r.jsx(Sa,{className:`w-4 h-4 text-muted-foreground shrink-0 transition-transform duration-200 ${n?"rotate-180":""}`})]}),n&&r.jsx("p",{className:"pb-5 text-sm text-muted-foreground font-light leading-relaxed",children:t})]})}function mEe(){return r.jsxs("div",{className:"bg-background min-h-screen",children:[r.jsx("section",{className:"bg-secondary text-secondary-foreground py-20",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 text-center",children:[r.jsx("span",{className:"text-primary text-xs font-bold uppercase tracking-[0.3em] block mb-4",children:"Help Centre"}),r.jsxs("h1",{className:"text-5xl font-serif text-secondary-foreground mb-4",children:["Frequently Asked",r.jsx("br",{}),"Questions"]}),r.jsx("div",{className:"w-16 h-px bg-primary mx-auto mb-6"}
898),r.jsx("p",{className:"text-secondary-foreground/60 font-light",children:"Everything you need to know about Chelsea Monthly."})]})}),r.jsx("section",{className:"py-16 bg-background",children:r.jsx("div",{className:"max-w-3xl mx-auto px-6 space-y-14",children:uEe.map((e,t)=>r.jsxs("div",{children:[r.jsx("h2",{className:"text-xs font-bold text-primary uppercase tracking-[0.3em] mb-6 pb-3 border-b border-border",children:e.category}),r.jsx("div",{children:e.items.map((n,s)=>r.jsx(hEe,{q:n.q,a:n.a},s))})]},t))})}),r.jsx("section",{className:"py-16 bg-muted/30 border-t border-border",children:r.jsxs("div",{className:"max-w-2xl mx-auto px-6 text-center",children:[r.jsx("h2",{className:"text-3xl font-serif text-foreground mb-4",children:"Still have a question?"}),r.jsx("p",{className:"text-muted-foreground font-light mb-8",children:"Our team is happy to help. Get in touch and we'll respond within one business day."}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[r.jsxs(se,{to:"/contact",className:"inline-flex items-center gap-2 bg-primary text-primary-foreground px-8 py-3 text-xs font-bold uppercase tracking-widest hover:bg-primary/90 transition-all",children:[r.jsx(es,{className:"w-4 h-4"})," Contact Us"]}),r.jsxs("a",{href:"tel:02038563307",className:"inline-flex items-center gap-2 border border-border text-foreground px-8 py-3 text-xs font-bold uppercase tracking-widest hover:border-primary hover:text-primary transition-all",children:[r.jsx(Hl,{className:"w-4 h-4"})," 020 3856 3307"]})]})]})})]})}const fEe="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/c79a9953b_F2458953-7A99-4FBF-B520-4E870273EF7E.jpg",pEe="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/941c9f29e_C01D1CE5-049E-4DF4-B779-4126A95A95FD.jpg",Jo="6a286e96f9740f38aee7d8b1";function xEe(e){return e>=1e3?(e/1e3).toFixed(1).replace(/\.0$/,"")+"k":String(e)}function TL({name:e}){const t=e.split(" ").map(a=>a[0]).slice(0,2).join(""),n=["bg-amber-100 text-amber-700","bg-rose-100 text-rose-700","bg-slate-100 text-slate-700","bg-emerald-100 text-emerald-700","bg-violet-100 text-violet-700"],s=e.charCodeAt(0)%n.length;return r.jsx("div",{className:`w-9 h-9 rounded-full flex items-center justify-center text-xs font-bold flex-shrink-0 ${n[s]}`,children:t})}function gEe(){const[e,t]=j.useState({views_total:76673,likes:6799,comments_count:50,bookmarks:1240}),[n,s]=j.useState([]),[a,i]=j.useState(!1),[o,l]=j.useState(!1),[c,u]=j.useState(!1),[m,f]=j.useState(""),[p,b]=j.useState(""),[v,g]=j.useState(!1);j.useEffect(()=>{W.entities.ArticleEngagement.filter({article_id:Jo}).then(P=>{P!=null&&P[0]&&t(P[0])}).catch(()=>{}),W.entities.Comment.filter({article_id:Jo}).then(P=>{P!=null&&P.length&&s(P.filter(R=>R.status!=="spam").sort((R,M)=>(M.likes||0)-(R.likes||0)))}).catch(()=>{});const C=localStorage.getItem("dd_liked_"+Jo),T=localStorage.getItem("dd_bookmarked_"+Jo);C&&i(!0),T&&l(!0)},[]);const y=()=>{const C=!a;i(C),localStorage.setItem("dd_liked_"+Jo,C?"1":""),t(T=>({...T,likes:T.likes+(C?1:-1)}))},w=()=>{const C=!o;l(C),localStorage.setItem("dd_bookmarked_"+Jo,C?"1":"")},N=C=>{const T=encodeURIComponent(window.location.href),P=encodeURIComponent("Darian Didier and the Return of Feminine Luxury");C==="twitter"&&window.open(`https://twitter.com/intent/tweet?url=${T}&text=${P}`,"_blank"),C==="copy"&&navigator.clipboard.writeText(window.location.href),u(!1)},S=async C=>{if(C.preventDefault(),!(!m.trim()||!p.trim())){g(!0);try{const T=await W.entities.Comment.create({article_id:Jo,author_name:p.trim(),content:m.trim(),likes:0,is_approved:!0,status:"published",depth:0});s(P=>[T,...P]),f(""),b("")}catch{}g(!1)}},A=n.find(C=>C.is_featured)||n[0],k=n.filter(C=>C!==A).slice(0,12);return r.jsxs("div",{className:"bg-[#faf9f7] min-h-screen",children:[r.jsxs("div",{className:"relative w-full overflow-hidden",style:{height:"92vh",minHeight:560},children:[r.jsx("img",{src:fEe,alt:"Darian Didier",className:"w-full h-full object-cover object-top"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/85 via-black/30 to-transparent"}),r.jsxs("div",{className:"absolute top-0 left-0 right-0 flex items-center justify-between px-6 md:px-12 py-6 z-20",children:[r.jsxs(se,{to:"/Articles",className:"inline-flex items-center gap-2 text-white/80 hover:text-white text-sm font-medium transition-colors backdrop-blur-sm bg-white/10 px-3 py-1.5 rounded-full",children:[r.jsx(Ct,{className:"w-3.5 h-3.5"})," Back to Stories"]}),r.jsx("div",{className:"flex items-center gap-2",children:r.jsx("span",{className:"bg-primary text-primary-foreground text-[10px] font-bold px-3 py-1.5 uppercase tracking-[0.15em]",children:"Fashion"})})]}),r.jsx("div",{className:"absolute bottom-0 left-0 right-0 px-6 md:px-16 pb-14 z-10",children:r.jsxs("div",{className:"max-w-4xl",children:[r.jsx("p",{className:"text-primary text-xs font-bold uppercase tracking-[0.25em] mb-4",children:"Chelsea Monthly · Fashion"}),r.jsxs("h1",{className:"text-4xl sm:text-5xl md:text-6xl font-bold text-white leading-[1.08] mb-6",style:{fontFamily:"'Montserrat', sans-serif"},children:["Darian Didier",r.jsx("br",{}),"and the Return of",r.jsx("br",{}),"Feminine Luxury"]}),r.jsx("p",{className:"text-white/75 text-lg max-w-2xl leading-relaxed mb-8 font-light",children:"In a fashion world driven by noise and constant reinvention, one American designer has chosen a different path â one rooted in presence, poise and timeless elegance."}),r.jsxs("div",{className:"flex flex-wrap items-center gap-5 text-white/60 text-sm",children:[r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx(Jt,{className:"w-3.5 h-3.5 text-primary"})," 10 May 2026"]}
898),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx(Vt,{className:"w-3.5 h-3.5 text-primary"})," 6 min read"]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx(Nr,{className:"w-3.5 h-3.5 text-primary"})," ",76673 .toLocaleString()," views"]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx(On,{className:"w-3.5 h-3.5 text-primary"})," ",6799 .toLocaleString()," likes"]}),r.jsxs("span",{className:"flex items-center gap-1.5",children:[r.jsx(bs,{className:"w-3.5 h-3.5 text-primary"})," 50 comments"]})]})]})})]}),r.jsx("div",{className:"sticky top-0 z-40 bg-white/95 backdrop-blur-sm border-b border-stone-200 shadow-sm",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-3 flex items-center justify-between gap-4",children:[r.jsx("p",{className:"text-sm font-semibold text-stone-700 hidden sm:block truncate",style:{fontFamily:"'Montserrat', sans-serif"},children:"Darian Didier & Feminine Luxury"}),r.jsxs("div",{className:"flex items-center gap-2 ml-auto",children:[r.jsxs("button",{onClick:y,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-bold transition-all ${a?"bg-rose-50 text-rose-600 border border-rose-200":"bg-stone-100 text-stone-600 hover:bg-rose-50 hover:text-rose-600"}`,children:[r.jsx(On,{className:`w-3.5 h-3.5 ${a?"fill-rose-500":""}`}),xEe(e.likes)]}),r.jsxs("button",{onClick:w,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-bold transition-all ${o?"bg-amber-50 text-amber-600 border border-amber-200":"bg-stone-100 text-stone-600 hover:bg-amber-50 hover:text-amber-600"}`,children:[r.jsx(ga,{className:`w-3.5 h-3.5 ${o?"fill-amber-500":""}`}),"Save"]}),r.jsxs("div",{className:"relative",children:[r.jsxs("button",{onClick:()=>u(C=>!C),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-bold bg-stone-100 text-stone-600 hover:bg-stone-200 transition-all",children:[r.jsx(ws,{className:"w-3.5 h-3.5"})," Share"]}),c&&r.jsxs("div",{className:"absolute right-0 top-full mt-2 w-40 bg-white rounded-lg shadow-xl border border-stone-100 overflow-hidden z-50",children:[r.jsx("button",{onClick:()=>N("twitter"),className:"w-full text-left px-4 py-2.5 text-xs font-medium text-stone-700 hover:bg-stone-50 transition-colors",children:"Share on X / Twitter"}),r.jsx("button",{onClick:()=>N("copy"),className:"w-full text-left px-4 py-2.5 text-xs font-medium text-stone-700 hover:bg-stone-50 transition-colors border-t border-stone-100",children:"Copy link"})]})]})]})]})}),r.jsxs("div",{className:"max-w-5xl mx-auto px-6 md:px-12 py-16",children:[r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_320px] gap-16",children:[r.jsxs("article",{children:[r.jsx("p",{className:"text-2xl text-stone-700 leading-relaxed font-light mb-10 border-l-4 border-primary pl-6",style:{fontFamily:"'Lato', sans-serif"},children:"In a fashion world increasingly driven by noise, speed and constant reinvention, Darian Didier has built something remarkably different."}),r.jsxs("div",{className:"prose-article",children:[r.jsx("p",{children:"The American designer behind the growing luxury label Darian Didier has quietly cultivated a reputation for creating pieces that celebrate confidence, femininity and timeless elegance. While many brands chase trends, Didier's philosophy has remained remarkably consistent: fashion should empower women without overwhelming them."}),r.jsx("p",{children:"That philosophy is becoming increasingly relevant in today's luxury market."}),r.jsx("p",{children:"As consumers move away from fast fashion and disposable trends, there is a renewed appreciation for craftsmanship, storytelling and meaningful design. It is a shift that aligns perfectly with Didier's vision for modern femininity."})]}),r.jsxs("div",{className:"my-12 py-10 px-10 bg-stone-900 relative overflow-hidden",children:[r.jsx("div",{className:"absolute top-0 left-0 w-1 h-full bg-primary"}),r.jsx("div",{className:"text-primary text-5xl font-serif leading-none mb-4 opacity-60",children:'"'}),r.jsx("p",{className:"text-white text-xl md:text-2xl font-light leading-relaxed italic",style:{fontFamily:"'Lato', sans-serif"},children:"At the heart of the brand is a belief that true confidence rarely needs to announce itself. Instead, it reveals itself through presence, poise and self assurance."})]}),r.jsxs("div",{className:"prose-article",children:[r.jsxs("p",{children:["This year marks another significant chapter for the designer as Darian Didier returns as an official sponsor of the ",r.jsx("strong",{children:"12th Annual National Film Awards"}),", continuing a relationship that began in 2025. The partnership reflects a natural alignment between the worlds of fashion and film, both industries built upon creativity, storytelling and emotional expression."]}),r.jsx("p",{children:"For Didier, the connection runs deeper than sponsorship."}),r.jsx("p",{children:"Film has long provided some of fashion's most enduring moments. From iconic red carpet appearances to unforgettable on-screen wardrobes, cinema continues to shape how audiences view beauty, confidence and personal style."})]}),r.jsxs("div",{className:"my-12 -mx-0 overflow-hidden rounded-sm",children:[r.jsx("img",{src:pEe,alt:"Darian Didier Collection",className:"w-full object-cover",style:{maxHeight:620}}),r.jsx("p",{className:"text-xs text-stone-400 uppercase tracking-widest mt-3 text-center font-medium",children:"Darian Didier · Campaign 2026"})]}),r.jsxs("div",{className:"prose-article",children:[r.jsx("p",{children:"The designer's upcoming collection explores these themes through a distinctly feminine lens."}),r.jsx("p",{children:"Described as a celebration of feminine evolution, allure and soft power, the collection seeks to redefine what strength can look like in the modern era. Rather than focusing on overt statements, the pieces are designed to capture a quieter form of confidence, one rooted in authenticity and self awareness."}),r.jsx("p",{children:"It is an approach that reflects a broader cultural shift."}),r.jsx("p",{children:"Across luxury fashion, beauty and lifestyle, women are increasingly embracing a more nuanced interpretation of power. Success is no longer defined solely by visibility or volume. Instead, there is growing recognition that elegance, empathy, grace and emotional intelligence are powerful qualities in their own right."})]}),r.jsxs("div",{className:"my-12 border-t border-b border-stone-200 py-10 text-center px-6",children:[r.jsxs("p",{className:"text-2xl md:text-3xl text-stone-800 font-light italic leading-relaxed",style:{fontFamily:"'Lato', sans-serif"},children:['"The garments are not designed to wear the woman.',r.jsx("br",{className:"hidden sm:block"}),' They are designed to reveal her."']}),r.jsx("p",{className:"mt-4 text-xs uppercase tracking-[0.2em] text-stone-400 font-bold",children:"Darian Didier"})]}),r.jsxs("div",{className:"prose-article",children:[r.jsx("p",{children:"For Darian Didier, this philosophy forms the foundation of every collection."}),r.jsx("p",{children:"Each design is created with the intention of helping women feel confident, sophisticated and entirely themselves. As the brand continues to expand internationally, Didier remains focused on maintaining that balance between luxury and authenticity â a strategy that has helped cultivate a loyal audience who view fashion not simply as clothing, but as a form of self expression."}),r.jsx("p",{children:"In an industry where trends often disappear as quickly as they emerge, Darian Didier's commitment to timeless femininity feels refreshingly enduring."})]}),r.jsxs("div",{className:"my-12 bg-gradient-to-br from-amber-50 to-stone-50 border border-amber-100 p-10 text-center",children:[r.jsx("p",{className:"text-xs uppercase tracking-[0.25em] text-primary font-bold mb-5",children:"The Designer's Message"}),r.jsx("p",{className:"text-stone-800 text-xl md:text-2xl font-light leading-relaxed mb-2",style:{fontFamily:"'Lato', sans-serif"},children:"True elegance is not about being noticed."}),r.jsx("p",{className:"text-stone-800 text-xl md:text-2xl font-light leading-relaxed",children:"It is about being remembered."})]}),r.jsxs("div",{className:"flex flex-wrap gap-4 mt-10 mb-4",children:[r.jsxs("a",{href:"https://www.dariandidier.com",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 bg-stone-900 text-white text-xs font-bold uppercase tracking-widest px-5 py-3 hover:bg-stone-800 transition-colors",children:[r.jsx(Zn,{className:"w-3.5 h-3.5"})," dariandidier.com"]}),r.jsxs("a",{href:"https://instagram.com/dariandidiercollection",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 border-2 border-stone-900 text-stone-900 text-xs font-bold uppercase tracking-widest px-5 py-3 hover:bg-stone-900 hover:text-white transition-all",children:[r.jsx(uo,{className:"w-3.5 h-3.5"})," @dariandidiercollection"]})]}),r.jsx("div",{className:"flex flex-wrap gap-2 mt-8 pt-8 border-t border-stone-200",children:["Fashion","Luxury","Designer","National Film Awards","Femininity","Soft Power"].map(C=>r.jsx("span",{className:"text-[11px] font-bold uppercase tracking-widest px-3 py-1 bg-stone-100 text-stone-500 hover:bg-primary hover:text-primary-foreground transition-colors cursor-pointer",children:C},C))})]}),r.jsxs("aside",{className:"space-y-8",children:[r.jsxs("div",{className:"bg-stone-900 text-white p-6",children:[r.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] text-primary font-bold mb-5",children:"Story Performance"}),r.jsx("div",{className:"grid grid-cols-2 gap-4",children:[{icon:Nr,label:"Views",value:76673 .toLocaleStr
898ing()},{icon:On,label:"Likes",value:6799 .toLocaleString()},{icon:bs,label:"Comments",value:"50"},{icon:ga,label:"Saves",value:"1,240"}].map(({icon:C,label:T,value:P})=>r.jsxs("div",{className:"bg-white/5 p-3 text-center",children:[r.jsx(C,{className:"w-4 h-4 text-primary mx-auto mb-1"}),r.jsx("p",{className:"text-lg font-bold",children:P}),r.jsx("p",{className:"text-[10px] uppercase tracking-widest text-white/40",children:T})]},T))})]}),r.jsxs("div",{className:"border border-stone-200 p-6 bg-white",children:[r.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] text-primary font-bold mb-4",children:"About the Brand"}),r.jsx("p",{className:"text-sm text-stone-600 leading-relaxed mb-4",children:"Darian Didier is an American luxury fashion label dedicated to celebrating feminine confidence, craftsmanship and timeless design. Official sponsor of the 12th Annual National Film Awards."}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("a",{href:"https://www.dariandidier.com",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-xs text-stone-500 hover:text-primary transition-colors font-medium",children:[r.jsx(Zn,{className:"w-3.5 h-3.5"})," www.dariandidier.com"]}),r.jsxs("a",{href:"https://instagram.com/dariandidiercollection",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-xs text-stone-500 hover:text-primary transition-colors font-medium",children:[r.jsx(uo,{className:"w-3.5 h-3.5"})," @dariandidiercollection"]})]})]}),r.jsxs("div",{className:"bg-amber-50 border border-amber-200 p-6 text-center",children:[r.jsx("div",{className:"w-12 h-12 bg-primary rounded-full flex items-center justify-center mx-auto mb-3",children:r.jsx("span",{className:"text-primary-foreground font-bold text-xs",children:"NFA"})}),r.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-stone-700 mb-1",children:"Official Sponsor"}),r.jsx("p",{className:"text-stone-600 text-sm leading-snug",children:"12th Annual National Film Awards 2026"})]}),A&&r.jsxs("div",{className:"border-l-4 border-primary bg-white p-5",children:[r.jsx("p",{className:"text-[10px] uppercase tracking-[0.2em] text-primary font-bold mb-3",children:"Reader Highlight"}),r.jsxs("p",{className:"text-sm text-stone-700 italic leading-relaxed mb-3",children:['"',A.content,'"']}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(TL,{name:A.author_name}),r.jsxs("div",{children:[r.jsx("p",{className:"text-xs font-bold text-stone-800",children:A.author_name}),r.jsxs("p",{className:"text-[10px] text-stone-400",children:[A.likes," likes"]})]})]})]})]})]}),r.jsxs("div",{className:"mt-20 pt-12 border-t border-stone-200 max-w-3xl",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-10",children:[r.jsx("h2",{className:"text-2xl font-bold text-stone-900",style:{fontFamily:"'Montserrat', sans-serif"},children:"Reader Responses"}),r.jsx("span",{className:"bg-primary text-primary-foreground text-xs font-bold px-2 py-0.5",children:50+n.filter(C=>!C.is_featured).length})]}),r.jsxs("form",{onSubmit:S,className:"mb-10 bg-white border border-stone-200 p-6",children:[r.jsx("p",{className:"text-xs font-bold uppercase tracking-widest text-stone-500 mb-4",children:"Leave a comment"}),r.jsx("input",{value:p,onChange:C=>b(C.target.value),placeholder:"Your name",required:!0,className:"w-full border border-stone-200 bg-stone-50 px-4 py-2.5 text-sm text-stone-800 placeholder:text-stone-400 focus:outline-none focus:border-primary mb-3"}),r.jsx("textarea",{value:m,onChange:C=>f(C.target.value),placeholder:"Share your thoughts on this storyâ¦",required:!0,rows:4,className:"w-full border border-stone-200 bg-stone-50 px-4 py-2.5 text-sm text-stone-800 placeholder:text-stone-400 focus:outline-none focus:border-primary resize-none mb-4"}),r.jsx("button",{type:"submit",disabled:v,className:"bg-stone-900 text-white text-xs font-bold uppercase tracking-widest px-6 py-2.5 hover:bg-primary hover:text-primary-foreground transition-colors disabled:opacity-50",children:v?"Postingâ¦":"Post Comment"})]}),r.jsx("div",{className:"space-y-6",children:[...A?[A]:[],...k].map((C,T)=>r.jsxs("div",{className:`flex gap-4 p-5 ${C.is_featured?"bg-amber-50 border border-amber-100":"bg-white border border-stone-100"}`,children:[r.jsx(TL,{name:C.author_name}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[r.jsx("p",{className:"text-sm font-bold text-stone-900",children:C.author_name}),C.is_featured&&r.jsx("span",{className:"text-[9px] uppercase tracking-widest bg-primary text-primary-foreground px-2 py-0.5 font-bold",children:"Top Comment"})]}),r.jsx("p",{className:"text-sm text-stone-600 leading-relaxed",children:C.content}),r.jsx("div",{className:"flex items-center gap-3 mt-3",children:r.jsxs("button",{className:"flex items-center gap-1 text-xs text-stone-400 hover:text-rose-500 transition-colors",children:[r.jsx(On,{className:"w-3 h-3"})," ",C.likes||0]})})]})]},C.id||T))})]})]}),r.jsx("style",{children:` 899 .prose-article p { 900 font-family: 'Lato', sans-serif; 901 font-size: 1.05rem; 902 line-height: 1.9; 903 color: #3a3632; 904 margin-bottom: 1.6rem; 905 } 906 .prose-article strong { 907 font-weight: 700; 908 color: #1a1714; 909 } 910 `})]})}const yEe="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/a5d69f69f_20241017-18-soho-Carnaby9916_wxtyhx.jpg",vEe=[{name:"The Ivy Classic Shepherd's Pie",type:"Signature",notes:"Slow-braised lamb, rich gravy and buttery mash â the dish that continues to define the restaurant's approach to refined comfort food."},{name:"Chicken Milanese with Truffle Sauce",type:"Main",notes:"A polished favourite combining crisp, golden chicken with an indulgent truffle sauce â comfort food executed with confidence."}
910,{name:"Traditional Fish and Chips",type:"Classic",notes:"A benchmark British dish delivered with the consistency and care that keeps regulars returning season after season."},{name:"Scottish Smoked Haddock & Salmon Fishcake",type:"Signature",notes:"Beautifully balanced seafood showcasing the kitchen's ability to elevate simple ingredients into something memorable."}];function bEe({score:e,size:t="w-4 h-4"}){return r.jsx("div",{className:"flex gap-0.5",children:[1,2,3,4,5].map(n=>r.jsx(rt,{className:`${t} ${n<=e?"fill-primary text-primary":"text-muted-foreground/30"}`},n))})}function jEe(){const[e,t]=j.useState(!1);return j.useEffect(()=>{window.scrollTo(0,0)},[]),r.jsxs("article",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"relative h-[85vh] min-h-[600px] w-full overflow-hidden",children:[r.jsx("img",{src:yEe,alt:"The Ivy Soho Brasserie exterior on Broadwick Street, Soho",className:"absolute inset-0 w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground via-foreground/60 to-foreground/30"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-foreground
910/50 to-transparent"}),r.jsxs("div",{className:"relative z-10 h-full flex flex-col justify-between max-w-5xl mx-auto px-6 py-10",children:[r.jsx(ue.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},children:r.jsxs(se,{to:"/Articles",className:"text-background/60 text-xs font-bold uppercase tracking-[0.2em] hover:text-primary transition-colors flex items-center gap-2",children:[r.jsx("span",{className:"w-8 h-px bg-primary"})," Reviews & Dining"]})}),r.jsxs(ue.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},className:"max-w-3xl",children:[r.jsxs("span",{className:"inline-flex items-center gap-2 bg-primary text-primary-foreground text-[10px] font-bold px-3 py-1.5 uppercase tracking-[0.2em] mb-6",children:[r.jsx(Pn,{className:"w-3 h-3"})," Editor's Review · â
â
â
â
â
"]}),r.jsx("h1",{className:"text-3xl sm:text-5xl lg:text-6xl font-bold text-background leading-[1.05] mb-6 drop-shadow-2xl",style:{fontFamily:"'Montserrat', sans-serif"},children:"The Ivy Soho Brasserie Remains One of London's Most Reliable Dining Destinations"}),r.jsx("p",{className:"text-background/70 text-lg font-light max-w-2xl leading-relaxed mb-8 border-l-2 border-primary pl-4",children:"In a city constantly chasing the next culinary trend, longevity is perhaps the greatest compliment a restaurant can receive."}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/20 border-2 border-primary/50 flex items-center justify-center text-background font-bold text-sm",children:"JK"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-background text-sm font-semibold tracking-wide",children:"Jordan Kensington"}),r.jsx("span",{className:"text-background/50 text-[10px] uppercase tracking-widest",children:"Chelsea Monthly · July 2026"})]})]}),r.jsx("div",{className:"h-8 w-px bg-background/20 hidden sm:block"}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-background/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Vt,{className:"w-4 h-4 text-primary"})," 6 min read"]})]})]})]})]}),r.jsx("div",{className:"sticky top-0 z-40 bg-background/95 backdrop-blur-md border-b border-border shadow-sm",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-3 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[r.jsx("span",{className:"font-bold text-foreground uppercase tracking-widest text-[10px]",children:"The Critique"}),r.jsxs("span",{className:"hidden sm:flex items-center gap-1",children:[r.jsx(rt,{className:"w-3 h-3 fill-primary text-primary"})," 5.0"]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>{t(!e)},className:`flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide transition-all rounded-sm ${e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-primary/10"}`,children:[r.jsx(ga,{className:`w-3.5 h-3.5 ${e?"fill-current":""}`})," Save"]}),r.jsxs("button",{className:"flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide bg-muted text-muted-foreground hover:bg-primary/10 transition-all rounded-sm",children:[r.jsx(ws,{className:"w-3.5 h-3.5"})," Share"]})]})]})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsx(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-16 bg-secondary text-secondary-foreground rounded-sm overflow-hidden shadow-xl",children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5",children:[r.jsxs("div",{className:"md:col-span-2 p-8 flex flex-col items-center justify-center text-center bg-foreground text-background",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-primary mb-2",children:"Chelsea Monthly Rating"}),r.jsx("div",{className:"flex gap-1 mt-1 mb-2",children:[1,2,3,4,5].map(n=>r.jsx(rt,{className:"w-7 h-7 fill-primary text-primary"},n))}),r.jsx("span",{className:"text-background/50 text-xs uppercase tracking-widest mt-1",children:"5 / 5 Stars"})]}),r.jsx("div",{className:"md:col-span-3 p-8 flex flex-col justify-center gap-4",children:[{label:"Food",score:5},{label:"Service",score:5},{label:"Atmosphere",score:5},{label:"Consistency",score:5}].map(n=>r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm font-semibold text-secondary-foreground",children:n.label}),r.jsx(bEe,{score:n.score})]},n.label))})]})}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-lg leading-relaxed text-foreground mb-6 first-letter:text-6xl first-letter:font-bold first-letter:text-primary first-letter:mr-2 first-letter:float-left first-letter:leading-[0.8]",style:{fontFamily:"'Montserrat', sans-serif"},children:"In a city constantly chasing the next culinary trend, longevity is perhaps the greatest compliment a restaurant can receive."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Soho has welcomed hundreds of restaurants over the yearsâmany arriving with enormous fanfare before quietly disappearing a few seasons later. Yet tucked away on Broadwick Street, just moments from the energy of Carnaby Street and Oxford Circus, The Ivy Soho Brasserie continues to do what it has done since opening: offer beautifully presented food, polished service and an atmosphere that appeals to almost every type of diner."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Our recent visit confirmed exactly why it remains one of Central London's most dependable dining destinations."})]}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Unlike many contemporary restaurants that rely heavily on theatrical presentation or social media trends, The Ivy Soho Brasserie places equal emphasis on comfort, hospitality and consistency. From breakfast and brunch through to afternoon tea and dinner, the restaurant has built its reputation on offering an extensive all-day menu that caters for every occasion."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Stepping inside, guests are greeted by an elegant dining room where rich colours, marble surfaces, polished brass and carefully curated artwork combine to create a setting that feels luxurious without ever becoming intimidating. The restaurant is lively, yet conversation remains effortless, making it equally suitable for business meetings, family celebrations or a leisurely lunch after a morning exploring Soho."})]}),r.jsxs(ue.blockquote,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:"my-12 relative pl-8 border-l-4 border-primary",children:[r.jsx(ja,{className:"absolute -left-3 -top-2 w-8 h-8 text-primary/20 fill-primary"}),r.jsx("p",{className:"text-2xl font-light italic text-foreground leading-relaxed",style:{fontFamily:"'Montserrat', sans-serif"},children:"It's this consistency of service that continues to distinguish The Ivy from many competitors."})]}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The welcome was warm and professional from the moment we arrived. Despite a busy service, we were promptly shown to our table and given time to browse the menu without feeling hurried. Throughout the meal, the team demonstrated exactly the level of attentiveness one expects from The Ivy Collectionâfriendly, knowledgeable and present whenever needed without becoming intrusive."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"It's this consistency of service that continues to distinguish The Ivy from many competitors."})]}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-16",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[r.jsx(eo,{className:"w-6 h-6 text-primary"}),r.jsx("h2",{className:"text-2xl font-bold text-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:"Signature Dishes"}),r.jsx("div",{className:"flex-1 h-px bg-border"})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:vEe.map((n,s)=>r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:s*.1},className:"group bg-card rounded-sm p-6 border border-border hover:shadow-lg hover:border-primary/30 transition-all duration-500",children:[r.jsx("span",{className:"text-primary text-[9px] font-bold uppercase tracking-widest mb-2 block",children:n.type}),r.jsx("h3",{className:"text-lg font-bold text-foreground mb-3 group-hover:text-primary transition-colors",style:{fontFamily:"'Montserrat', sans-serif"},children:n.name}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:n.notes})]},n.name))})]}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsxs("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:["The menu itself is reassuringly broad. Guests can choose from an impressive selection of starters, salads, seafood, grills, vegetarian dishes, classic British favourites and indulgent desserts, ensuring there is genuinely something for every palate. Signature dishes remain central to the restaurant's identity, including favourites such as ",r.jsx("strong",{className:"text-foreground",children:"The Ivy Classic Shepherd's Pie"}),", ",r.jsx("strong",{className:"text-foreground",children:"Chicken Milanese with Truffle Sauce"}),", ",r.jsx("strong",{className:"text-foreground",children:"Traditional Fish and Chips"}),", and the ",r.jsx("strong",{className:"text-foreground",children:"Scottish Smoked Haddock and Salmon Fishcake"}),", all of which continue to define the restaurant's approach to refined comfort food."]}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Alongside its à la carte offering, The Ivy continues to introduce seasonal menus and value-led dining experiences throughout the year, allowing regular guests to enjoy something new while preserving the classics that have built its loyal following. Current offerings include limited-time seasonal menus alongside its popular Heritage Menu, reinforcing the restaurant's commitment to combining tradition with contemporary dining."})]}),r.jsx(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"my-12 bg-muted/40 border-l-4 border-primary p-8 rounded-sm",children:r.jsxs("div",{className:"flex items-start gap-4",children:[r.jsx(A_,{className:"w-8 h-8 text-primary shrink-0 mt-1"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-bold text-foreground mb-2",style:{fontFamily:"'Montserrat', sans-serif"},children:"The Drinks Programme"}),r.jsx("p",{className:"text-sm text-foreground/70 leading-relaxed",children:"The carefully curated wine list complements the food beautifully, while an extensive cocktail selection provides everything from timeless classics to seasonal creations. Whether visiting for a leisurely lunch or evening dinner, there is an unmistakable attention to detail that runs throughout the entire beverage offering."})]})]})}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"What impressed us most, however, was not any single dish or drink. It was the complete dining experience. Every element appeared thoughtfully managedâfrom the pacing between courses to the presentation of each table and the professionalism of the front-of-house team. The restaurant never felt rushed, despite being busy, and there was a calm confidence that comes only from an experienced operation."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"This consistency is no accident. The Ivy Collection has spent years refining a formula that balances accessibility with sophistication. While many restaurants attempt to reinvent themselves every season, The Ivy instead focuses on delivering high standards every single day. That reliability is perhaps its greatest luxury."})]}),r.jsxs(ue.blockquote,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:"my-12 relative pr-8 border-r-4 border-primary text-right",children:[r.jsx(ja,{className:"absolute -right-3 -top-2 w-8 h-8 text-primary/20 fill-primary"}),r.jsx("p",{className:"text-2xl font-light italic text-foreground leading-relaxed",style:{fontFamily:"'Montserrat', sans-serif"},children:"The Ivy never feels exclusive for the sake of exclusivity."})]}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Location also plays an important role in the restaurant's enduring popularity. Situated in the heart of Soho, The Ivy Soho Brasserie is perfectly positioned for pre-theatre dinners, post-shopping lunches, business meetings or evening celebrations. Its proximity to London's West End makes it a natural meeting point, while the welcoming atmosphere encourages guests to linger long after the final course."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"There is also something refreshingly inclusive about the experience. The Ivy never feels exclusive for the sake of exclusivity. Instead, it offers polished hospitality in surroundings that remain comfortable and invitingâa balance that many restaurants strive for but few consistently achieve."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"In today's dining landscape, where concepts often overshadow cooking and interiors frequently receive more attention than hospital
910ity, The Ivy Soho Brasserie continues to demonstrate that exceptional restaurants are built on far more than appearances."})]}),r.jsx(ue.blockquote,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"my-12 text-center py-8 border-y border-border",children:r.jsx("p",{className:"text-2xl font-light italic text-foreground leading-relaxed max-w-2xl mx-auto",style:{fontFamily:"'Montserrat', sans-serif"},children:"They are built on consistency. Consistent service. Consistent quality. Consistent attention to detail."})}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"It is precisely those qualities that ensure diners return time and time again. For visitors discovering Soho for the first time or Londoners looking for a dependable favourite, The Ivy Soho Brasserie continues to justify its reputation as one of the capital's finest all-day restaurants."})]}),r.jsx("section",{className:"bg-foreground text-background py-20",children:r.jsx("div",{className:"max-w-4xl mx-auto px-6",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] mb-4 block",children:"The Verdict"}),r.jsx("h2",{className:"text-3xl font-bold mb-6 leading-tight",style:{fontFamily:"'Montserrat', sans-serif"},children:"True hospitality never goes out of style."}),r.jsx("p",{className:"text-background/70 leading-relaxed mb-8",children:"Elegant without being pretentious, refined without feeling formal and consistently welcoming, The Ivy Soho Brasserie remains one of London's most accomplished neighbourhood restaurants. While London's restaurant scene continues to evolve at remarkable speed, The Ivy proves that true hospitality never goes out of style."}),r.jsxs("div",{className:"flex items-center gap-4 pt-6 border-t border-background/20",children:[r.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(n=>r.jsx(rt,{className:"w-6 h-6 fill-primary text-primary"},n))}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-background font-bold text-sm",children:"5 / 5 Stars"}),r.jsx("span",{className:"text-background/50 text-xs uppercase tracking-widest mt-0.5",children:"Overall Rating"})]})]})]}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.15},className:"bg-background/5 border border-background/10 rounded-sm p-8 backdrop-blur-sm",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[r.jsx("div",{className:"w-12 h-12 bg-primary rounded-sm flex items-center justify-center",children:r.jsx(Ft,{className:"w-6 h-6 text-primary-foreground"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xl font-bold text-background",style:{fontFamily:"'Montserrat', sans-serif"},children:"The Ivy Soho Brasserie"}),r.jsx("span",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Soho · Central London"})]})]}),r.jsxs("div",{className:"space-y-4 text-sm",children:[r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(Ft,{className:"w-4 h-4 text-primary shrink-0 mt-0.5"}),r.jsxs("span",{className:"text-background/80",children:["26â28 Broadwick Street",r.jsx("br",{}),"Soho, London W1F 8JB"]})]}),r.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-background/10",children:[r.jsx(Vt,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("span",{className:"text-background/80",children:"All-day dining · Breakfast, lunch & dinner"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(eo,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("span",{className:"text-background/80",children:"British Brasserie · European"})]})]}),r.jsxs("a",{href:"https://www.the-ivy.com/restaurants/soho-brasserie/",target:"_blank",rel:"noopener noreferrer",className:"mt-8 w-full inline-flex items-center justify-center gap-2 bg-primary text-primary-foreground font-bold text-xs uppercase tracking-[0.2em] px-6 py-3 hover:bg-primary/90 transition-colors rounded-sm",children:["Reserve a Table ",r.jsx(_t,{className:"w-4 h-4"})]})]})]})})}),r.jsx("section",{className:"bg-background py-16 text-center",children:r.jsxs(se,{to:"/Articles",className:"inline-flex items-center gap-2 text-primary font-bold text-xs uppercase tracking-[0.2em] hover:gap-3 transition-all",children:[r.jsx(_t,{className:"w-4 h-4 rotate-180"})," More Reviews & Stories"]})})]})}const wEe="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/7d04ed46d_Lifestyle_TABLEAI_V6.jpg",NEe=[{name:"The Traditional 21-Piece Zen Garden",tag:"Flagship",notes:"Inspired directly by the classic Japanese rock garden tradition â soft premium white Zen sand, six handcrafted bamboo tools, and a collection of iconic miniature elements including a Sakura cherry blossom, Shinto torii gate, Japanese pagoda, and smooth stones."},{name:"The Oasis of Calm",tag:"Contemporary",notes:"The same considered quality in a softer, more contemporary palette â aqua blue sand that catches the light beautifully, a lotus flower, smooth decorative stones, and an aesthetic that works as naturally in a modern London flat as a country house study."},{name:"The Desert Zen Garden",tag:"Southwest",notes:"Inspired by the American Southwest â Saguaro cactus, Opuntia, Agave, and a sculpted rock arch â demonstrating that the brand's creative thinking extends well beyond a single aesthetic."}];function _Ee({product:e,index:t}){return r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:t*.1},className:"group bg-card rounded-sm p-8 border border-border hover:shadow-lg hover:border-primary/30 transition-all duration-500",children:[r.jsx("span",{className:"text-primary text-[9px] font-bold uppercase tracking-widest mb-3 block",children:e.tag}),r.jsx("h3",{className:"text-lg font-bold text-foreground mb-4 group-hover:text-primary transition-colors",style:{fontFamily:"'Montserrat', sans-serif"},children:e.name}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:e.notes})]})}function SEe(){const[e,t]=j.useState(!1);return j.useEffect(()=>{window.scrollTo(0,0)},[]),r.jsxs("article",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"relative h-[85vh] min-h-[600px] w-full overflow-hidden",children:[r.jsx("img",{src:wEe,alt:"Island Falls Home Traditional 21-Piece Zen Garden Kit on a light wood surface",className:"absolute inset-0 w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground via-foreground
910/60 to-foreground/30"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-foreground/50 to-transparent"}),r.jsxs("div",{className:"relative z-10 h-full flex flex-col justify-between max-w-5xl mx-auto px-6 py-10",children:[r.jsx(ue.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},children:r.jsxs(se,{to:"/Articles",className:"text-background/60 text-xs font-bold uppercase tracking-[0.2em] hover:text-primary transition-colors flex items-center gap-2",children:[r.jsx("span",{className:"w-8 h-px bg-primary"})," Lifestyle · Wellbeing · Gifting"]})}),r.jsxs(ue.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},className:"max-w-3xl",children:[r.jsxs("span",{className:"inline-flex items-center gap-2 bg-primary text-primary-foreground text-[10px] font-bold px-3 py-1.5 uppercase tracking-[0.2em] mb-6",children:[r.jsx(A0,{className:"w-3 h-3"})," Brand Feature · Island Falls Home"]}),r.jsx("h1",{className:"text-3xl sm:text-5xl lg:text-6xl font-bold text-background leading-[1.05] mb-6 drop-shadow-2xl",style:{fontFamily:"'Montserrat', sans-serif"},children:"The Small Object That Might Just Change the Way You Begin Your Day"}),r.jsx("p",{className:"text-background/70 text-lg font-light max-w-2xl leading-relaxed mb-8 border-l-2 border-primary pl-4",children:"In a world of relentless notifications and fractured attention, Island Falls Home has quietly built something rather remarkable â a product that invites you to stop. Just for a moment. And in that moment, to create something beautiful."}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/20 border-2 border-primary/50 flex items-center justify-center text-background font-bold text-sm",children:"CM"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-background text-sm font-semibold tracking-wide",children:"Chelsea Monthly"}),r.jsx("span",{className:"text-background/50 text-[10px] uppercase tracking-widest",children:"Lifestyle · June 2026"})]})]}),r.jsx("div",{className:"h-8 w-px bg-background/20 hidden sm:block"}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-background/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Vt,{className:"w-4 h-4 text-primary"})," 7 min read"]})]})]})]})]}),r.jsx("div",{className:"sticky top-0 z-40 bg-background/95 backdrop-blur-md border-b border-border shadow-sm",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-3 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[r.jsx("span",{className:"font-bold text-foreground uppercase tracking-widest text-[10px]",children:"Island Falls Home"}),r.jsxs("span",{className:"hidden sm:flex items-center gap-1",children:[r.jsx(ir,{className:"w-3 h-3 fill-primary text-primary"})," Featured"]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>t(!e),className:`flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide transition-all rounded-sm ${e?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-primary/10"}`,children:[r.jsx(ga,{className:`w-3.5 h-3.5 ${e?"fill-current":""}`})," Save"]}),r.jsxs("button",{className:"flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide bg-muted text-muted-foreground hover:bg-primary/10 transition-all rounded-sm",children:[r.jsx(ws,{className:"w-3.5 h-3.5"})," Share"]})]})]})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsx(ue.p,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"text-xs text-muted-foreground italic mb-12 text-center border-y border-border py-4",children:"The Island Falls Home Traditional 21-Piece Zen Garden Kit â inspired by the ancient Japanese art of Zen gardening."}),r.jsxs(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-lg leading-relaxed text-foreground mb-6 first-letter:text-6xl first-letter:font-bold first-letter:text-primary first-letter:mr-2 first-letter:float-left first-letter:leading-[0.8]",style:{fontFamily:"'Montserrat', sans-serif"},children:"It begins, as the best stories often do, with a journey."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"In 2017, the family behind Island Falls Home travelled to Japan and found themselves standing in a Zen garden â one of those extraordinary spaces of raked sand, precisely placed stone, and absolute, considered stillness. In that moment, something shifted. Not dramatically. Quietly. The way the very best experiences tend to work on you."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"They returned to England with an idea that was, in its simplicity, rather ambitious: to recreate that feeling at home. Not to approximate it, or to gesture toward it with something decorative and forgettable, but to genuinely translate the ancient Japanese tradition of the Zen garden into a product that could sit on a desk, a kitchen shelf, or a dressing table â and that would, every single time it was used, produce a version of that same stillness."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The result is Island Falls Home: a British brand producing what are, by any measure, the finest range of desktop Zen Garden kits available in this country. And if that sentence makes you think of something novelty and disposable, set that thought aside entirely. These are products made with genuine care, genuine knowledge, and a genuine commitment to the philosophy that inspired them."})]}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-16",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[r.jsx(A0,{className:"w-6 h-6 text-primary"}),r.jsx("h2",{className:"text-2xl font-bold text-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:"The Products"}),r.jsx("div",{className:"flex-1 h-px bg-border"})]}),r.jsxs("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:["The flagship ",r.jsx("strong",{className:"text-foreground",children:"Traditional 21-Piece Zen Garden"})," is where the brand's ambition is most clearly expressed. Inspired directly by the classic Japanese rock garden tradition, it includes soft premium white Zen sand, six handcrafted bamboo tools, and a collection of iconic miniature elements: a Sakura cherry blossom, a Shinto torii gate, a Japanese pagoda, smooth stones. Everything you need to create, tend, and simply sit with something beautiful."]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 my-10",children:NEe.map((n,s)=>r.jsx(_Ee,{product:n,index:s},n.name))}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The sand deserves a particular mention, because it is one of those details that reveals the level of thought behind the brand. Island Falls Home uses exclusively CPSIA and Proposition 65 compliant premium sand, sourced from Canada, and chosen specifically for the quality of raking pattern it produces. This is not a detail most customers would ever consciously notice. It is, however, the detail that makes the product feel distinctly right when you use it â and that is precisely why it matters."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"Each Island Falls Home kit is crafted using natural materials where possible, and designed to contain everything needed to begin a personal practice of Zen gardening from the very first use."})]}),r.jsxs(ue.blockquote,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:"my-12 relative pl-8 border-l-4 border-primary",children:[r.jsx(ja,{className:"absolute -left-3 -top-2 w-8 h-8 text-primary/20 fill-primary"}),r.jsx("p",{className:"text-2xl font-light italic text-foreground leading-relaxed",style:{fontFamily:"'Montserrat', sans-serif"},children:"Useful in the way that a few minutes of calm at the start or end of a day is useful. Which is to say, considerably."})]}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[r.jsx(Rx,{className:"w-6 h-6 text-primary"}),r.jsx("h2",{className:"text-2xl font-bold text-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:"The Gifting Question"}),r.jsx("div",{className:"flex-1 h-px bg-border"})]}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"There is a particular kind of gifting problem that faces anyone shopping for someone who is both discerning and well-provided for. The Island Falls Home Zen Garden kits solve it with quiet elegance. They are beautifully presented. They are gender-neutral. They are genuinely useful in the sense that matters most â not useful in a practical, utilitarian way, but useful in the way that a few minutes of calm at the start or end of a day is useful. Which is to say, considerably."}),r.jsxs("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:["They have been featured in both ",r.jsx("strong",{className:"text-foreground",children:"Tatler"})," and ",r.jsx("strong",{className:"text-foreground",children:"The Guardian"})," â two publications whose editorial teams are not inclined toward enthusiasm they don't mean â and are available across the UK and internationally. A brand, in other words, that has earned its reputation rather than purchased it."]})]}),r.jsx(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"my-12 bg-muted/40 border-l-4 border-primary p-8 rounded-sm",children:r.jsxs("div",{className:"flex items-start gap-4",children:[r.jsx(ir,{className:"w-8 h-8 text-primary shrink-0 mt-1"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-bold text-foreground mb-2",style:{fontFamily:"'Montserrat', sans-serif"},children:"On the National Stage"}),r.jsxs("p",{className:"text-sm text-foreground/70 leading-relaxed",children:["This year, Island Falls Home takes a significant step into the national spotlight as Bronze Sponsor of the Best Documentary / Docu-Series category at the ",r.jsx("strong",{className:"text-foreground",children:"12th Annual National Film Awards"}),", taking place on 1 July 2026 at Porchester Hall, London W2. It is a partnership that makes considerable sense when you consider what the two organisations share: a belief in the importance of looking carefully at the world, finding beauty in detail, and creating experiences that stay with people long after they are over."]})]})]})}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsxs("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:["The National Film Awards are voted for entirely by the public, and public voting is now open at ",r.jsx("a",{href:"https://www.nationalfilmawards.co.uk",target:"_blank",rel:"noopener noreferrer",className:"text-primary font-semibold hover:underline",children:"www.nationalfilmawards.co.uk"}),". For Island Falls Home, the association represents an opportunity to introduce the brand to an entirely new audience â one that, as anyone familiar with both the brand and the awards will immediately recognise, is precisely the right one."]})}),r.jsxs(ue.blockquote,{initial:{opacity:0,x:20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:"my-12 relative pr-8 border-r-4 border-primary text-right",children:[r.jsx(ja,{className:"absolute -right-3 -top-2 w-8 h-8 text-primary/20 fill-primary"}),r.jsx("p",{className:"text-2xl font-light italic text-foreground leading-relaxed",style:{fontFamily:"'Montserrat', sans-serif"},children:"If your desk, your home, or indeed your life could benefit from a little more considered stillness â and whose couldn't â Island Falls Home is a very good place to begin."})]}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[r.jsx(Ft,{className:"w-6 h-6 text-primary"}),r.jsx("h2",{className:"text-2xl font-bold text-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:"Where to Find Island Falls Home"}),r.jsx("div",{className:"flex-1 h-px bg-border"})]}),r.jsxs("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:["The full range â including the Traditional Zen Garden, Oasis of Calm, Desert Zen Garden, and the brand's gifting collection â is available at ",r.jsx("a",{href:"https://www.islandfallshome.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary font-semibold hover:underline",children:"www.islandfallshome.com"}),", with delivery across the UK and internationally. Wholesale and customisation enquiries are also welcomed via the website."]})]})]}),r.jsx("section",{className:"bg-foreground text-background py-20",children:r.jsxs("div",{className:"max-w-4xl mx-auto px-6",children:[r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] mb-4 block",children:"The Takeaway"}),r.jsx("h2",{className:"text-3xl font-bold mb-6 leading-tight",style:{fontFamily:"'Montserrat', sans-serif"},children:"Considered stillness, beautifully made."}),r.jsx("p",{className:"text-background/70 leading-relaxed mb-8",children:"In a world that rarely pauses, Island Falls Home has created something that genuinely invites you to. Beautifully presented, thoughtfully sourced, and made with real knowledge of the tradition they translate â these are products that earn their place on the desk rather than merely filling it."}),r.jsxs("div",{className:"flex items-center gap-4 pt-6 border-t border-background/20",children:[r.jsx("div",{className:"flex gap-1",children:[1,2,3,4,5].map(n=>r.jsx(On,{className:"w-5 h-5 fill-primary text-primary"},n))}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-background font-bold text-sm",children:"Editor's Choice"}),r.jsx("span",{className:"text-background/50 text-xs uppercase tracking-widest mt-0.5",children:"Lifestyle · Wellbeing"})]})]})]}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.15},className:"bg-background/5 border border-background/10 rounded-sm p-8 backdrop-blur-sm",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[r.jsx("div",{className:"w-12 h-12 bg-primary rounded-sm flex items-center justify-center",children:r.jsx(A0,{className:"w-6 h-6 text-primary-foreground"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xl font-bold text-background",style:{fontFamily:"'Montserrat', sans-serif"},children:"Island Falls Home"}),r.jsx("span",{className:"text-background/50 text-xs uppercase tracking-widest",children:"British Family Business · Est. 2017"})]})]}),r.jsxs("div",{className:"space-y-4 text-sm",children:[r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(ZL,{className:"w-4 h-4 text-primary shrink-0 mt-0.5"}),r.jsxs("span",{className:"text-background/80",children:["Shop the full range",r.jsx("br",{}),r.jsx("a",{href:"https://www.islandfallshome.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"www.islandfallshome.com"})]})]}),r.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-background/10",children:[r.jsx(ir,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("span",{className:"text-background/80",children:"Bronze Sponsor · National Film Awards 2026"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(Rx,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("span",{className:"text-background/80",children:"UK & international delivery"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(Vt,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("span",{className:"text-background/80",children:"NFA Ceremony · 1 July 2026 · Porchester Hall"})]})]}),r.jsxs("a",{href:"https://www.islandfallshome.com",target:"_blank",rel:"noopener noreferrer",className:"mt-8 w-full inline-flex items-center justify-center gap-2 bg-primary text-primary-foreground font-bold text-xs uppercase tracking-[0.2em] px-6 py-3 hover:bg-primary/90 transition-colors rounded-sm",children:["Explore the Collection ",r.jsx(_t,{className:"w-4 h-4"})]})]})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8 mt-16 pt-12 border-t border-background/10",children:[r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm font-bold text-primary uppercase tracking-widest mb-3",children:"About Island Falls Home"}),r.jsx("p",{className:"text-background/50 text-sm leading-relaxed",children:"Island Falls Home is a British family business producing premium Japanese-inspired Zen Garden kits for home, office, and g
910ifting. Founded following a visit to Japan in 2017, the brand is committed to quality, craftsmanship, and authentic design. Featured in Tatler and The Guardian. Available in the UK and internationally."})]}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm font-bold text-primary uppercase tracking-widest mb-3",children:"About the National Film Awards"}),r.jsx("p",{className:"text-background/50 text-sm leading-relaxed",children:"The National Film Awards UK, produced by the National Film Academy, is a globally recognised platform celebrating excellence in film, television, and entertainment. All awards are voted for entirely by the public."})]})]})]})}),r.jsx("section",{className:"bg-background py-16 text-center",children:r.jsxs(se,{to:"/Articles",className:"inline-flex items-center gap-2 text-primary font-bold text-xs uppercase tracking-[0.2em] hover:gap-3 transition-all",children:[r.jsx(_t,{className:"w-4 h-4 rotate-180"})," More Lifestyle & Stories"]})})]})}function kEe({number:e,name:t,subtitle:n,tag:s,description:a,order:i,bestFor:o,rating:l,index:c=0}){return r.jsx(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.6,delay:c*.05},className:"group relative bg-card border border-border rounded-sm overflow-hidden hover:shadow-xl hover:border-primary/20 transition-all duration-500",children:r.jsxs("div",{className:"flex flex-col md:flex-row",children:[r.jsxs("div",{className:"md:w-40 bg-secondary flex flex-col items-center justify-center p-6 md:p-8 shrink-0",children:[r.jsx("span",{className:"text-primary text-[9px] font-bold uppercase tracking-[0.2em] mb-3",children:s}),r.jsx("span",{className:"text-6xl font-bold text-secondary-foreground/15 leading-none",style:{fontFamily:"'Montserrat', sans-serif"},children:e}),r.jsxs("div",{className:"mt-4 flex items-baseline gap-1",children:[r.jsx("span",{className:"text-3xl font-bold text-primary",style:{fontFamily:"'Montserrat', sans-serif"},children:l}),r.jsx("span",{className:"text-sm text-muted-foreground/60",children:"/10"})]})]}),r.jsxs("div",{className:"flex-1 p-6 md:p-8",children:[r.jsx("h3",{className:"text-xl font-bold text-foreground mb-1 group-hover:text-primary transition-colors",style:{fontFamily:"'Montserrat', sans-serif"},children:t}),r.jsx("p",{className:"text-primary text-[11px] font-bold uppercase tracking-widest mb-4",children:n}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed mb-4",children:a}),i&&r.jsx("div",{className:"pt-4 border-t border-border",children:r.jsxs("p",{className:"text-xs text-foreground/80",children:[r.jsx("span",{className:"font-bold uppercase tracking-widest text-primary text-[10px]",children:"Order "}),i]})}),o&&r.jsxs("p",{className:"text-xs text-muted-foreground/80 mt-2",children:[r.jsx("span",{className:"font-bold uppercase tracking-widest text-[10px]",children:"Best for "}),o]})]})]})})}const CEe=[{author_name:"Victoria Ashworth",content:"Just got back from Miami and this is painfully accurate. Faena is absurd in the best way. The lobster toast at Los Fuegos ruined me for normal breakfast forever.",likes:342,hoursAgo:50},{author_name:"Marcus Chen",content:"The Delilah to E11EVEN pipeline is real. Did exactly that last month and somehow ended up watching the sunrise from a rooftop downtown. Miami doesn't let you leave early.",likes:287,hoursAgo:49},{author_name:"Sophia Laurent",content:"L'Atelier de Joël Robuchon was the best meal of my year. Two Michelin stars and it shows. The scallops with coconut foam are otherworldly. Thank you for including it.",likes:198,hoursAgo:48},{author_name:"James Pemberton",content:"Carbone is theatre more than food but honestly? I don't care. The spicy rigatoni lived up to the hype and the people watching is genuinely 10/10. Worth fighting for the reservation.",likes:256,hoursAgo:47},{author_name:"Isabella Rossi",content:"Casa Tua is the most romantic restaurant I've ever been to. The garden at night with the lanterns... my husband and I still talk about that dinner. Phones away is the right advice.",likes:412,hoursAgo:46}
910,{author_name:"Oliver Hartmann",content:"As someone who flies private regularly, the Gulfstream G650 recommendation is spot on. London to Miami in one leg changes the entire experience. VistaJet knows what they're doing.",likes:178,hoursAgo:45},{author_name:"Natasha Volkov",content:"Bal Harbour over Design District for me, always. There's something about the koi ponds and the palms that makes spending obscene amounts of money feel civilised. Both are incredible though.",likes:145,hoursAgo:44},{author_name:"Raj Patel",content:"Stubborn Seed was the surprise for me too. Didn't expect Michelin-level food in South Beach. Jeremy Ford is doing something special there. The farm-to-table aspect makes it even better.",likes:167,hoursAgo:43},{author_name:"Camille Dubois",content:"The Unicorn at Pao is the most Instagrammed dish in Miami for a reason. I didn't think sea urchin and sweetcorn would work but Paul Qui is a genius. That golden dome room is unreal.",likes:298,hoursAgo:42},{author_name:"Henry Whitmore",content:"Joe's Stone Crab is the only place in Miami where the queue is worth it. Old Miami at its finest. The mustard sauce is legendary. Great to see it get the recognition it deserves here.",likes:134,hoursAgo:41},{author_name:"Amara Okafor",content:"MILA on a Sunday is dangerous. Went for brunch and didn't leave until 6pm. The spritz station and the jamón carving... Miami brunch is a different sport entirely.",likes:223,hoursAgo:40},{author_name:"Daniel Foster",content:"Zuma's Dom Pérignon brunch at $358 is ridiculous and I loved every second of it. Sometimes you just have to lean into the Miami of it all. Great review.",likes:189,hoursAgo:40},{author_name:"Eleanor Bright",content:"This is the best Miami guide I've read all year. Most publications do '10 things to do' lists. This actually feels like someone lived it for 72 hours. The Faena rating card is brilliant.",likes:367,hoursAgo:28},{author_name:"Stefano Marchetti",content:"Komodo gets a lot of hate for being 'too Miami' but honestly that's the point. The Peking duck and the lobster dynamite are genuinely good. It's abundance and sometimes that's exactly what you want.",likes:112,hoursAgo:27},{author_name:"Yuki Tanaka",content:"Makoto is my go-to every time I'm at Bal Harbour. The tuna crispy rice is addictive. Perfect shopping lunch â light enough to keep going, luxurious enough to feel like a proper break.",likes:156,hoursAgo:26},{author_name:"Charlotte Devereux",content:"The Four Seasons Surf Club as the alternative is the right call. Stayed there last winter and the Beach Villa with the private pool was extraordinary. Quieter than Faena but equally special.",likes:201,hoursAgo:25},{author_name:"Liam O'Sullivan",content:"E11EVEN at 7am still making sense is the most accurate sentence in this entire article. I've been there. I've questioned my life choices at 11am. Miami is a different planet.",likes:445,hoursAgo:24},{author_name:"Francesca Romano",content:"Sexy Fish Miami is better than the London one. There, I said it. The room is incredible and the energy is completely different. Miami just does restaurants differently.",likes:178,hoursAgo:23},{author_name:"Alexander Knight",content:"Jordan Kensington's writing is always worth reading. 'London has rules. Miami has suggestions.' That's going on my wall. Another brilliant Chelsea Monthly feature.",likes:523,hoursAgo:22},{author_name:"Priya Sharma",content:"The Design District has changed so much in the last five years. It's genuinely one of the best luxury neighbourhoods in America now. Bal Harbour will always be classic but the District is where the future is.",likes:167,hoursAgo:21},{author_name:"Thomas Blackburn",content:"Delilah's late night kitchen is a public service. Being able to order caviar and a grilled cheese at 1am after the evening has gone off script is exactly what Miami needs. Great pick.",likes:198,hoursAgo:20},{author_name:"Gabriela Mendes",content:"As a Miami local, I approve of this list. Most travel guides get it wrong. This one actually understands the city. Joe's, Faena, L'Atelier, Delilah â all correct. Well done Chelsea Monthly.",likes:389,hoursAgo:19},{author_name:"Edward Sterling",content:"The flight home section captured something I've never been able to articulate about leaving Miami. That moment when Britain appears beneath you and suddenly the excess feels like a dream. Beautifully written.",likes:267,hoursAgo:18},{author_name:"Mila Petrova",content:"Pao under the golden dome with live music on a Saturday night is one of the best dinners I've had anywhere. The Unicorn is $48 and worth every cent. Paul Qui is a wizard.",likes:234,hoursAgo:17},{author_name:"Benjamin Goldsmith",content:"Club Space is for people who actually love dance music. If you're there to be seen, go to LIV. If you're there to dance until the concept of time is meaningless, Space is the only answer. Great distinction.",likes:312,hoursAgo:16},{author_name:"Alessandro Conti",content:"The $45 lobster toast for breakfast is the most Miami thing ever and I refuse to apologise for ordering it. Los Fuegos sets the tone for the whole trip. Faena knows what they're doing.",likes:145,hoursAgo:12},{author_name:"Rebecca Sinclair",content:"Read this twice already. The structure is perfect â the chapters, the ratings, the awards at the end. This is how luxury travel journalism should be done. More of this please.",likes:298,hoursAgo:10},{author_name:"Nikolai Petrov",content:"Private jet to Miami is the only way. Once you've done it, commercial feels medieval. The G650 recommendation is correct â the range and cabin size make London-Miami effortless.",likes:167,hoursAgo:8},{author_name:"Jasmine Carter",content:"Casa Tua's tagliatelle with porcini and truffle is one of the best plates of pasta I've had outside Italy. The whole experience feels like a secret. The garden at night is pure magic.",likes:212,hoursAgo:7},{author_name:"William Ashford",content:"The 'Most Miami Moment' award is perfect. That's exactly what Miami is â ordering something unnecessary and being immediately glad you did. The whole city runs on that energy.",likes:356,hoursAgo:6},{author_name:"Lucia Fernandez",content:"MILA's MediterrAsian concept works so well. The octopus and the tuna crispy rice are my go-to. Sunday brunch is an event. This article nailed it â beautiful people pretending they came for dinner.",likes:189,hoursAgo:5},{author_name:"George Hamilton",content:"Been going to Miami for 20 years. This is the first article I've read that actually captures the evolution. It's not just South Beach anymore â the food scene is genuinely world class. Michelin was right to come here.",likes:278,hoursAgo:4},{author_name:"Olivia Marsden",content:"The Faena rating card with the Miami Factor 10/10 made me laugh. It's so true. Faena is not for people who want quiet. It's for people who want to arrive. And there's nothing wrong with that.",likes:201,hoursAgo:3},{author_name:"Sebastian Wolfe",content:"Carbone's spicy rigatoni veal parm combo is unbeatable. Yes it's theatre. Yes the mythology is bigger than the food. But who cares? The room is electric. Best people watching in Miami.",likes:167,hoursAgo:2},{author_name:"Madeleine Hartley",content:"The morning after section is everything. The Atlantic is the only cure. Faena's beach is the perfect recovery spot. Coffee, fruit, swim, silence. That's the real luxury.",likes:234,hoursAgo:2},{author_name:"Dimitri Volkov",content:"E11EVEN being ranked 6th globally sounds about right. That place is unlike anything else. 24 hours of organised chaos. The performers, the DJs, the energy. Nowhere else does this.",likes:178,hoursAgo:1},{author_name:"Valentina Cruz",content:"This article has 2.7 million views and I understand why. It's the definitive Miami guide. Every restaurant, every hotel, every club â all correct. Chelsea Monthly does luxury travel better than anyone.",likes:445,hoursAgo:1},{author_name:"Philip Chesterton",content:"The conclusion is perfect. Miami's greatest luxury is permission. Permission to be excessive, to stay out too late, to have champagne with lunch. London has rules. Miami has suggestions. Brilliant.",likes:312,hoursAgo:1}],EL="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/dd2987bfd_heroimage.png",AEe="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/683a321ad_miami.png",TEe=[{num:"01",name:"Los Fuegos by Francis Mallmann",subtitle:"Breakfast at Faena · 8:30 AM",tag:"Breakfast",rating:"8.7",description:"Miami mornings require discipline because Miami nights make mornings optional. Downstairs at Faena is Los Fuegos. Breakfast tells you something about Miami pricing â two eggs with chorizo is $29, brûléed key lime French toast is $27. Then somebody discovers the $45 lobster toast with Maine lobster, avocado, poached egg and Espelette hollandaise. Of course we order it. It is extravagant for breakfast but cleverly judged â the lobster is sufficiently rich that the avocado and acidity matter rather than merely decorate the plate.",order:"Lobster toast, key lime French toast, strong coffee",bestFor:"First breakfast after landing"}
910,{num:"02",name:"Joe's Stone Crab",subtitle:"The Institution · South Beach",tag:"Institution",rating:"9.2",description:"You cannot review modern Miami without understanding old Miami. Joe's Stone Crab is the antidote to the city's relentless pursuit of whatever opened last Thursday. The claws arrive chilled, cracked and accompanied by the restaurant's famous mustard sauce. Order the stone crab, then order more than the stone crab â the Joe's Classic adds coleslaw, hashed brown potatoes, creamed spinach and key lime pie. This is not a restaurant desperately trying to become a nightclub. Thank goodness. It knows exactly what it is.",order:"Large stone crab claws, hashed browns, creamed spinach, key lime pie",bestFor:"Lunch or early dinner"},{num:"03",name:"Makoto",subtitle:"The Shopping Lunch · Bal Harbour",tag:"Japanese",rating:"9.0",description:"Shopping and lunch should be treated as a single activity in Bal Harbour. Makoto is why. The restaurant sits at Bal Harbour Shops and delivers Japanese food polished enough for a serious dinner but relaxed enough to work beautifully halfway through an afternoon of financial irresponsibility. Sushi and sashimi are excellent, but don't stop there â wagyu short rib from the robata, miso sea bass with crispy kale and ume miso. For lunch, restraint wins: tuna crispy rice, sashimi, wagyu gyoza, robata. Then back to Chanel.",order:"Tuna crispy rice, sashimi, wagyu short rib, miso sea bass",bestFor:"Luxury shopping lunch"},{num:"04",name:"L'Atelier de Joël Robuchon",subtitle:"The Serious One · Design District",tag:"Two Michelin Stars",rating:"9.7",description:"This is where the article stops playing. L'Atelier de Joël Robuchon Miami holds two Michelin stars, making it one of Florida's most decorated dining rooms. The Design District restaurant follows the familiar L'Atelier theatre â counter, open kitchen, rosewood, leather, precision. Michelin highlights scallops with cilantro broth and coconut foam, lamb with aubergine caponata, and the restaurant's artichoke preparation under glass with chickpea and turmeric cappuccino. You book because you care about cooking. The technique is exact without becoming sterile, which is the difficult trick.",order:"Seasonal tasting menu",bestFor:"The trip's serious gastronomic dinner"},{num:"05",name:"Carbone",subtitle:"Miami Theatre With Pasta · Collins Avenue",tag:"Italian",rating:"9.3",description:"Then we swing violently in the other direction. Carbone Miami is not simply dinner â Carbone is theatre. The burgundy tuxedos, the room, the lighting, the service captains, the people watching, the feeling that at least three people dining tonight have been told there are no reservations for the next month. Caesar alla ZZ, carpaccio Piemontese, baked clams, veal Parmesan, and yes, the famous spicy rigatoni. Is some of the mythology bigger than the food? Perhaps. Would we still fight for the reservation? Absolutely. Because Carbone understands modern Miami.",order:"Spicy rigatoni, veal Parmesan, Caesar alla ZZ",bestFor:"People watching and theatre"},{num:"06",name:"MILA",subtitle:"Where Lunch Becomes Nightlife · Rooftop",tag:"MediterrAsian",rating:"9.3",description:"MILA is one of the clearest expressions of contemporary Miami. Mediterranean meets Asian. Cycladic white meets Japanese restraint. Rooftop dining meets performance. The kitchen calls it MediterrAsian, with dishes designed for sharing and theatrical tableside presentation. Start with spicy tuna crispy rice, add grilled octopus, then let the table become increasingly ambitious. Sunday is where MILA becomes especially interesting â its rooftop brunch runs with jamón carving, sushi and temaki, raw bar, mezze, live robata, a spritz station and dessert stations. It is brunch designed by people who know nobody at the table has plans to go home afterwards.",order:"Spicy tuna crispy rice, grilled octopus, sharing plates",bestFor:"Beautiful people pretending they came primarily for dinner"},{num:"07",name:"Casa Tua",subtitle:"The Romantic One · South Beach",tag:"Italian",rating:"9.4",description:"Casa Tua Miami feels different. Hidden inside a Mediterranean villa in South Beach, it combines restaurant, bout
910ique hotel and private club. Lanterns glow through the garden, tables disappear beneath foliage, conversations become quieter. This is where you take someone you actually want to speak to. The menu stays Italian and luxurious â hamachi crudo with clementine ponzu, burrata, pici cacio e pepe, tagliatelle with porcini and truffle, tagliolini with Oscietra caviar, Dover sole for two, Wagyu short rib with creamy polenta. Our move? The tagliatelle, the Dover sole, wine. Phones away.",order:"Tagliatelle with porcini and truffle, Dover sole for two",bestFor:"Date night"},{num:"08",name:"Pao by Paul Qui",subtitle:"Faena's Golden Secret",tag:"Asian Fusion",rating:"9.5",description:"Back at the hotel, Pao by Paul Qui occupies Faena's extraordinary golden dome. The cuisine moves between Filipino, Japanese, Spanish and French influences, often bringing charcoal and smoke into the equation. The dish everyone talks about is The Unicorn â Paul Qui's combination of sea urchin, grilled sweetcorn pudding, sake aioli, chile de árbol and lime. Order it. Then Norwegian king crab toast, kinilaw, perhaps the 72-hour Wagyu short rib. Pao also has live music on Friday and Saturday evenings, which pushes the room into another gear without destroying dinner.",order:"The Unicorn, Norwegian king crab toast, 72-hour Wagyu short rib",bestFor:"Dinner under the golden dome"},{num:"09",name:"Zuma",subtitle:"The Brunch That Refuses to Behave · Downtown",tag:"Japanese",rating:"9.0",description:"London knows Zuma. Miami turns it up. Zuma Miami sits downtown and remains one of the city's strongest weekend lunch propositions. Weekend brunch begins with buffet stations covering sushi, sashimi, oysters, tartare and hot dishes, then adds live cooking stations including black cod, salmon teriyaki, steak and udon. The Classic package is $98. Champagne takes it to $148. Rosé, $168. And because this is Miami, the Dom Pérignon brunch is $358 per person. Ridiculous? Certainly. Fun? Absolutely.",order:"Black cod, salmon teriyaki, udon",bestFor:"Saturday brunch that destroys Saturday afternoon"},{num:"10",name:"Sexy Fish",subtitle:"London, Meet Your Floridian Cousin",tag:"Asian",rating:"9.0",description:"Sexy Fish Miami is fascinating for London visitors because the DNA is familiar but Miami alters the chemistry. Sushi, sashimi, Wagyu, tempura and robata dominate the menu. But you don't really come here for fiscal responsibility â you come for the room, the Champagne, the arrival, the feeling that dinner is a prelude to something else. The room does the heavy lifting, and Miami's version of the Capital favourite feels louder, warmer and considerably less interested in going home before midnight.",order:"Sushi platter, Wagyu robata, Champagne",bestFor:"Dinner as prelude"},{num:"11",name:"Komodo",subtitle:"Brickell Turned Up",tag:"Asian",rating:"8.9",description:"Komodo Miami is Asian dining through the Miami lens. Everything is designed to share, escalate and eventually result in somebody ordering something entirely unnecessary. Wagyu skirt steak tacos, lobster dynamite, money bag dumplings finished with gold leaf, A5 Wagyu hot stone, Peking duck, whole Maine lobster, garlic king crab lo mein, and a $350 omakase platter. This isn't minimalist Japanese reverence â it is abundance. And in Brickell, abundance plays.",order:"Peking duck, lobster dynamite, Wagyu fried rice",bestFor:"Groups"},{num:"12",name:"Stubborn Seed",subtitle:"South Beach Grows Up",tag:"One Michelin Star",rating:"9.6",description:"The surprise of the trip. Stubborn Seed holds a Michelin star and Green Star and is led by chef Jeremy Ford. This is ambitious contemporary American cooking with Latin and Asian influences and ingredients drawn in part from the restaurant team's organic farm in Redland. Small bites might move through celery root croquette with beef bacon jam and beef tartare with black truffle before progressing into pasta and more substantial courses. There is confidence here â inventive without behaving as though every plate needs its own TED Talk.",order:"Chef's progression",bestFor:"Food obsessive who thinks Miami is all style"},{num:"13",name:"Delilah",subtitle:"Dinner After Dark · Brickell Key",tag:"American",rating:"9.4",description:"Now things become dangerous. Delilah Miami sits on Brickell Key and operates from Golden Hour through dinner and late night. It is glamorous in the old fashioned sense â seafood towers, caviar, steaks, music, low lighting, tables occupied by people who have made an effort. The clever thing is that the kitchen continues into late night. You can still order caviar, grilled cheese, burgers and chicken tenders after the evening has gone decidedly off script.",order:"Seafood tower, Osetra caviar, steak",bestFor:"Date night that doesn't end"}],EEe=[{name:"LIV",rating:"9.2",description:"LIV Nightclub remains the quintessential Miami mega club. This is where you go when you want the version of Miami you saw in the music video. Big room, big production, big table spend, international DJs, and absolutely nobody appears to have come directly from bed."},{name:"E11EVEN",rating:"9.5",description:"Calling it a nightclub almost undersells the madness. E11EVEN operates 24 hours, combining nightclub, performers, DJs, VIP rooms, multiple bars and food. At 2am, E11EVEN makes perfect sense. At 7am, somehow it still makes sense. At 11am, you begin questioning your life choices."},{name:"Club Space",rating:"9.3",description:"For the serious dance music crowd, Space remains essential. This is less about being seen at dinner and more about actually wanting to dance. You come late. You leave when the concept of 'late' has lost all meaning."}],PEe=[{category:"Best Hotel",winner:"Faena Miami Beach"},{category:"Best Alternative Hotel",winner:"Four Seasons Hotel at The Surf Club"},{category:"Best Restaurant Overall",winner:"L'Atelier de Joël Robuchon"},{category:"Best Miami Institution",winner:"Joe's Stone Crab"},{category:"Best Romantic Dinner",winner:"Casa Tua"},{category:"Best Restaurant Atmosphere",winner:"Delilah"},{category:"Best Dinner That Becomes a Night Out",winner:"MILA"},{category:"Best Hotel Restaurant",winner:"Pao by Paul Qui"},{category:"Best Brunch",winner:"Zuma"},{category:"Best Serious Food Surprise",winner:"Stubborn Seed"},{category:"Best Shopping Lunch",winner:"Makoto"},{category:"Best People Watching",winner:"Carbone"},{category:"Best Luxury Shopping",winner:"Miami Design District"},{category:"Best Traditional Luxury Shopping",winner:"Bal Harbour Shops"},{category:"Best Club",winner:"E11EVEN"},{category:"Best Complete Night",winner:"Delilah followed by E11EVEN"}],OEe=[{label:"Design",score:9.5},{label:"Service",score:9},{label:"Location",score:9},{label:"Miami Factor",score:10},{label:"Discretion",score:7}];function Qo({icon:e,label:t,title:n}){return r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-12",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[r.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-sm flex items-center justify-center",children:r.jsx(e,{className:"w-6 h-6 text-primary"})}),r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em]",children:t})]}),r.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground leading-tight",style:{fontFamily:"'Montserrat', sans-serif"},children:n})]})}function C_({text:e}){return r.jsxs(ue.blockquote,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:"my-12 relative pl-8 border-l-4 border-primary",children:[r.jsx(ja,{className:"absolute -left-3 -top-2 w-8 h-8 text-primary/20 fill-primary"}),r.jsx("p",{className:"text-2xl font-light italic text-foreground leading-relaxed",style:{fontFamily:"'Montserrat', sans-serif"},children:e})]})}function PL({src:e,alt:t,caption:n}){return r.jsxs(ue.div,{initial:{opacity:0,scale:1.02},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.8},className:"relative h-[50vh] min-h-[400px] w-full overflow-hidden my-16 rounded-sm",children:[r.jsx("img",{src:e,alt:t,className:"absolute inset-0 w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground
910/60 to-transparent"}),n&&r.jsx("div",{className:"absolute bottom-6 left-6 z-10",children:r.jsx("span",{className:"text-white/80 text-xs font-medium uppercase tracking-widest bg-foreground/40 backdrop-blur-sm px-4 py-2 rounded-sm",children:n})})]})}function MEe(){const[e,t]=j.useState(null),[n,s]=j.useState(!1);return j.useEffect(()=>{window.scrollTo(0,0),W.entities.Article.filter({slug:"miami-uncovered"}).then(a=>t((a==null?void 0:a[0])||null)).catch(()=>{})},[]),r.jsxs("article",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"relative h-[90vh] min-h-[650px] w-full overflow-hidden",children:[r.jsx("img",{src:EL,alt:"Miami Beach Art Deco district at twilight",className:"absolute inset-0 w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground via-foreground/50 to-foreground/20"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-foreground/40 to-transparent"}),r.jsxs("div",{className:"relative z-10 h-full flex flex-col justify-between max-w-5xl mx-auto px-6 py-10",children:[r.jsx(ue.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},children:r.jsxs(se,{to:"/Articles",className:"text-background/60 text-xs font-bold uppercase tracking-[0.2em] hover:text-primary transition-colors flex items-center gap-2",children:[r.jsx("span",{className:"w-8 h-px bg-primary"})," Chelsea Monthly Travel"]})}),r.jsxs(ue.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},className:"max-w-3xl",children:[r.jsxs("span",{className:"inline-flex items-center gap-2 bg-primary text-primary-foreground text-[10px] font-bold px-3 py-1.5 uppercase tracking-[0.2em] mb-6",children:[r.jsx(Pn,{className:"w-3 h-3"})," Cover Feature · Miami Special Report"]}),r.jsx("h1",{className:"text-3xl sm:text-5xl lg:text-6xl font-bold text-background leading-[1.05] mb-6 drop-shadow-2xl",style:{fontFamily:"'Montserrat', sans-serif"},children:"Miami Uncovered"}),r.jsx("p",{className:"text-background/70 text-lg font-light max-w-2xl leading-relaxed mb-8 border-l-2 border-primary pl-4",children:"72 Hours Inside the Restaurants, Hotels, Beach Clubs, Private Aviation and After-Dark World of America's Most Unapologetically Glamorous City"}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/20 border-2 border-primary/50 flex items-center justify-center text-background font-bold text-sm",children:"JK"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-background text-sm font-semibold tracking-wide",children:"Jordan Kensington"}),r.jsx("span",{className:"text-background/50 text-[10px] uppercase tracking-widest",children:"Chelsea Monthly · 15 August 2026"})]})]}),r.jsx("div",{className:"h-8 w-px bg-background/20 hidden sm:block"}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-background/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Vt,{className:"w-4 h-4 text-primary"})," 18 min read"]}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-background/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Nr,{className:"w-4 h-4 text-primary"})," 2.7M views"]})]})]})]})]}),r.jsx("div",{className:"sticky top-0 z-40 bg-background/95 backdrop-blur-md border-b border-border shadow-sm",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-3 flex items-center justify-between",children:[r.jsx("span",{className:"font-bold text-foreground uppercase tracking-widest text-[10px]",children:"Miami Uncovered"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>s(!n),className:`flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide transition-all rounded-sm ${n?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-primary/10"}`,children:[r.jsx(ga,{className:`w-3.5 h-3.5 ${n?"fill-current":""}`})," Save"]}),r.jsxs("button",{className:"flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide bg-muted text-muted-foreground hover:bg-primary/10 transition-all rounded-sm",children:[r.jsx(ws,{className:"w-3.5 h-3.5"})," Share"]})]})]})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-lg leading-relaxed text-foreground mb-6 first-letter:text-7xl first-letter:font-bold first-letter:text-primary first-letter:mr-2 first-letter:float-left first-letter:leading-[0.8]",style:{fontFamily:"'Montserrat', sans-serif"},children:"There are cities that do luxury quietly. Miami is not one of them."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Miami would rather arrive late, park the Lamborghini directly outside, order the bottle nobody else at the table thought necessary and then somehow convince everybody, three hours later, that the evening is only beginning."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"It is excessive, occasionally ridiculous and frequently magnificent. But the interesting thing about Miami in 2026 is that behind the theatre, the city has become seriously good."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The food has matured. Michelin has arrived. The Design District has become one of America's most important luxury retail neighbourhoods. Miami Beach's grand hotels are competing on service rather than simply square footage. And the restaurant scene now moves effortlessly between old Florida institutions, Japanese precision, Mediterranean rooftops, serious tasting menus and places where dinner inevitably becomes dancing."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"So Chelsea Monthly went looking for the Miami behind the Instagram version of Miami. Where should you actually stay? Where should you eat if you have only three nights? Which restaurant deserves the impossible reservation? Where does dinner become a party? And, at 2am, where should the car actually be taking you? This is Miami Uncovered."})]}),r.jsx(Qo,{icon:Dx,label:"Chapter One",title:"London to Miami"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The Miami experience begins before Florida. For the full Chelsea treatment, the journey starts at a private terminal in London rather than Heathrow departures. Our aircraft of choice for this run would be a Gulfstream G650 class aircraft, arranged through an established long-range private aviation operator."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"For this distance, the attraction is simple. London to South Florida becomes one continuous experience rather than something to endure before the holiday begins. No connection. No crowded terminal. No sprint through security with half of West London simultaneously departing for August. The cabin becomes breakfast room, office, cinema and eventually bedroom."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"London disappears beneath the clouds. Champagne appears. Shoes disappear. And roughly nine hours later, the Atlantic gives way to Florida. Miami announces itself brilliantly from the air â water, causeways, impossible white towers, boats that appear to have their own postcode. Then the long sweep of Miami Beach sitting between Biscayne Bay and the Atlantic. Welcome to the subtropics."})]})]}),r.jsx("div",{className:"max-w-5xl mx-auto px-6",children:r.jsx(PL,{src:AEe,alt:"Aerial view of Miami Beach coastline",caption:"Miami Beach from the air â the arrival"})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsx(Qo,{icon:Ft,label:"Chapter Two",title:"Where We Checked In"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("h3",{className:"text-2xl font-bold text-foreground mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Faena Hotel Miami Beach"}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"There are more discreet hotels in Miami. There are newer hotels. There are arguably quieter hotels. But for Miami Uncovered, we would make Faena Miami Beach our headquarters. Because Faena understands Miami's essential contradiction â it is simultaneously absurd and sophisticated."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Red velvet, gold, murals, enormous spaces and the famous Damien Hirst mammoth by the ocean should, on paper, be too much. In Miami, somehow it works. The property anchors the Faena District on Collins Avenue and combines hotel, art, dining and entertainment rather than behaving simply as somewhere to sleep. It also became the only luxury resort to receive Forbes Five Star status in its first year."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"If budget has temporarily ceased being relevant, the four-bedroom Premier Oceanfront Suite runs to 4,515 square feet, with multiple balconies, living areas, kitchen and signature butler service."})]}),r.jsx(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-16 bg-secondary text-secondary-foreground rounded-sm overflow-hidden shadow-xl",children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5",children:[r.jsxs("div",{className:"md:col-span-2 p-8 flex flex-col items-center justify-center text-center bg-foreground text-background",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-primary mb-2",children:"Chelsea Monthly Verdict"}),r.jsx("span",{className:"text-5xl font-bold text-primary",style:{fontFamily:"'Montserrat', sans-serif"},children:"9.1"}),r.jsx("span",{className:"text-background/50 text-xs uppercase tracking-widest mt-1",children:"Overall / 10"})]}),r.jsx("div",{className:"md:col-span-3 p-8 flex flex-col justify-center gap-3",children:OEe.map(a=>r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm font-semibold text-secondary-foreground",children:a.label}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"w-32 h-1.5 bg-secondary-foreground/10 rounded-full overflow-hidden",children:r.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${a.score*10}%`}})}),r.jsx("span",{className:"text-sm font-bold text-primary w-10 text-right",children:a.score})]})]},a.label))})]})}),r.jsx(C_,{text:"If you want your Miami hotel to whisper, look north to Surfside. If you want it to say we have arrived, Faena is difficult to beat."}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"For quieter money, our alternative would be the Four Seasons Hotel at The Surf Club. Current 2026 luxury rankings place it among Miami's very best, and its standalone four-bedroom Beach Villa brings a private pool and direct ocean access."})})]}),r.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-16",children:[r.jsx(Qo,{icon:eo,label:"Chapter Three",title:"The Restaurants"}),r.jsx(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"mb-12",children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80",children:"Fourteen restaurants later, a conclusion emerges. Miami's food scene is no longer interesting because famous restaurants from other cities have opened branches here. It is interesting because Miami itself has become the ingredient. These are the thirteen that defined the trip â and the final dinner that brought us home."})}),r.jsx("div",{className:"space-y-6",children:TEe.map((a,i)=>r.jsx(kEe,{...a,index:i},a.num))}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mt-12 bg-secondary text-secondary-foreground rounded-sm p-8 md:p-12",children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] mb-3 block",children:"The Final Dinner"}),r.jsx("h3",{className:"text-2xl font-bold text-secondary-foreground mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Back to What Miami Does Best"}),r.jsx("p",{className:"text-base leading-relaxed text-secondary-foreground/70 mb-4",children:"Fourteen restaurants later, a conclusion emerges. Miami's food scene is no longer interesting because famous restaurants from other cities have opened branches here. It is interesting because Miami itself has become the ingredient. The Latin American influence. The Caribbean influence. The extraordinary seafood. Japanese precision. New York swagger. South American fire. European luxury. And the particular Miami belief that a perfectly respectable dinner can, without warning, become a party."}),r.jsx("p",{className:"text-base leading-relaxed text-secondary-foreground/70",children:"For our final night, we return to Pao at Faena rather than chase opening number fifteen. Because sometimes the mark of a great restaurant isn't wanting to tick it off. It is wanting to go back."})]})]}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsx(Qo,{icon:nk,label:"Chapter Four",title:"Shopping, Miami Style"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Miami has two genuinely world-class luxury shopping destinations, but they offer completely different experiences."}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-8",children:[r.jsxs("div",{className:"bg-card border border-border rounded-sm p-6",children:[r.jsx("h3",{className:"text-lg font-bold text-foreground mb-3",style:{fontFamily:"'Montserrat', sans-serif"},children:"Bal Harbour Shops"}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Old money Miami shopping. Tropical landscaping, limestone, palms, koi ponds and more than 100 designer boutiques create something closer to a private garden that happens to contain Chanel, Prada, Valentino, Versace and Van Cleef & Arpels. You don't rush Bal Harbour. You shop. Lunch. Shop again."})]}),r.jsxs("div",{className:"bg-card border border-border rounded-sm p-6",children:[r.jsx("h3",{className:"text-lg font-bold text-foreground mb-3",style:{fontFamily:"'Montserrat', sans-serif"},children:"Miami Design District"}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:"Altogether more contemporary. Fashion collides with architecture, art and restaurants. More than 150 high-end boutiques, galleries, restaurants and bars, with an extraordinary collection of global flagships. Bal Harbour feels established. The Design District feels like Miami deciding what luxury looks like next."})]})]})]}),r.jsx(C_,{text:"Bal Harbour feels established. The Design District feels like Miami deciding what luxury looks like next."}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsxs("p",{className:"text-base leading-relaxed text-foreground/80",children:[r.jsx("strong",{className:"text-primary",children:"Chelsea winner: Design District"}),", narrowly. Not because the shopping is necessarily better. Because the neighbourhood gives you more reasons to stay after you've put the credit card away."]})})]}),r.jsx("div",{className:"max-w-5xl mx-auto px-6",children:r.jsx(PL,{src:EL,alt:"Miami Beach at night",caption:"After dark â Ocean Drive, Miami Beach"})}),r.jsxs("div",{className:"max-w-4xl mx-auto px-6 py-16",children:[r.jsx(Qo,{icon:pK,label:"Chapter Five",title:"After Dark"}),r.jsx(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"mb-12",children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80",children:"There is nightlife. Then there is Miami nightlife. Current Miami nightlife still revolves around heavyweight names including LIV, E11EVEN, Club Space, M2, Mynt and Bâoli, with many selling advance tickets for major DJ and artist nights. These are the three that matter most."})}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6 mb-12",children:EEe.map((a,i)=>r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:i*.1},className:"bg-card border border-border rounded-sm p-6 hover:shadow-lg hover:border-primary/20 transition-all duration-500",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsx("h3",{className:"text-lg font-bold text-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:a.name}),r.jsx("span",{className:"text-2xl font-bold text-primary",style:{fontFamily:"'Montserrat', sans-serif"},children:a.rating})]}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:a.description})]},a.name))}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"bg-foreground text-background rounded-sm p-8 md:p-12 text-center",children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] mb-4 block",children:"And the Winner Is..."}),r.jsx("h3",{className:"text-2xl md:text-3xl font-bold mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Best Night Out: Delilah â E11EVEN"}),r.jsx("p",{className:"text-background/70 leading-relaxed max-w-2xl mx-auto",children:"Our winning Miami night does not begin in a nightclub. It begins at Delilah. Dinner at 9:30. Drinks. Music. No rush. Then the car downtown. E11EVEN sometime after midnight. The combination gives you both versions of Miami â sophisticated first, completely unreasonable afterwards. That is the night."})]})]}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsx(Qo,{icon:JK,label:"Chapter Six",title:"The Morning After & One Last Lunch"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Miami has one extraordinary cure for Miami. The Atlantic. Curtains open. The room fills with that almost offensively bright Florida sunlight. Downstairs, the beach is already operating as though last night never happened. Coffee. Fruit. Swim. No meetings. Phone on silent. This is when staying on Miami Beach rather than downtown pays for itself. And this is also where Faena earns its room rate â the hotel doesn't merely give you access to Miami. It gives you somewhere rather wonderful to recover from it."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"There is something wonderfully civilised about ending the trip where Miami becomes quiet again. Drive north. Bal Harbour. A final wander through the shops. Lunch at Makoto. Sashimi. Robata. Perhaps one last glass of Champagne. No club. No giant steak. No waiter arriving with sparklers. Miami has finally stopped shouting."})]})]}),r.jsx("section",{className:"bg-secondary py-20",children:r.jsxs("div",{className:"max-w-4xl mx-auto px-6",children:[r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"text-center mb-12",children:[r.jsx(sk,{className:"w-12 h-12 text-primary mx-auto mb-4"}),r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] block mb-2",children:"The Chelsea Monthly Miami Awards"}),r.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-secondary-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:"The Winners"})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:PEe.map((a,i)=>r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4,delay:i*.03},className:"flex items-center gap-4 bg-background/5 border border-background/10 rounded-sm p-4",children:[r.jsx("div",{className:"w-10 h-10 bg-primary/20 rounded-sm flex items-center justify-center shrink-0",children:r.jsx(Pn,{className:"w-5 h-5 text-primary"})}),r.jsxs("div",{children:[r.jsx("span",{className:"text-background/50 text-[10px] font-bold uppercase tracking-widest block",children:a.category}),r.jsx("span",{className:"text-secondary-foreground text-sm font-semibold",children:a.winner})]})]},a.category))}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.3},className:"mt-8 bg-primary text-primary-foreground rounded-sm p-8 text-center",children:[r.jsx("span",{className:"text-primary-foreground/70 text-[10px] font-bold uppercase tracking-[0.2em] block mb-2",children:"Most Miami Moment"}),r.jsx("p",{className:"text-lg font-bold",style:{fontFamily:"'Montserrat', sans-serif"},children:"Ordering something wildly unnecessary and immediately being glad you did."})]})]})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsx(Qo,{icon:Dx,label:"Chapter Seven",title:"The Flight Home"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"And then, suddenly, it is over. The car heads back across the causeway. Miami Beach disappears in the mirror. Downtown rises ahead. Cases are heavier than they were three days ago. Bank accounts are lighter. Nobody discusses either fact."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"At the private terminal, Miami performs its final trick. One moment you are standing in 30-degree Florida heat. The next you are climbing the steps of an aircraft pointed towards London. Cabin door closed. Shoes off. Dinner light. A final drink. Then darkness outside the window. Somewhere over the Atlantic, Miami finally becomes quiet. By the time breakfast appears, Britain is beneath us. Grey skies. Green fields. London. And, after several days reviewing a city almost pathologically committed to excess, there is something unexpectedly comforting about seeing it."})]}),r.jsx(C_,{text:"London has rules. Miami has suggestions. For three days, at least, we know which we prefer."}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("h3",{className:"text-2xl font-bold text-foreground mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Miami, Uncovered"}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"So, is Miami still worth the hype? Yes. But not for the reasons it used to be. Come for South Beach and you'll have fun. Come for the nightlife and you may not sleep. Come for the shopping and your bank may telephone you. But come for Miami as a complete luxury destination and the city becomes much more interesting."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"There is now genuinely serious food alongside the spectacle. There are hotels capable of competing with the world's great resorts. There is luxury retail that rivals London, Paris and Milan, albeit with considerably more palm trees. And there remains a nightlife culture that almost no other American city can reproduce."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"Miami's greatest luxury, however, is not the private aircraft, the oceanfront suite, the $300 steak or the table at 2am. It is permission. Permission to order too much. Dress too well. Stay out too late. Spend the afternoon doing absolutely nothing. Have Champagne with lunch. And postpone being sensible until the flight home."})]}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"text-center py-8 border-y border-border mb-12",children:[r.jsx("p",{className:"text-sm font-bold uppercase tracking-[0.2em] text-primary mb-1",children:"Chelsea Monthly"}),r.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-widest",children:"Miami Uncovered · The Luxury Travel Issue"})]}),r.jsx("div",{className:"text-center",children:r.jsxs(se,{to:"/Articles",className:"inline-flex items-center gap-2 text-primary font-bold text-xs uppercase tracking-[0.2em] hover:gap-3 transition-all",children:[r.jsx(_t,{className:"w-4 h-4 rotate-180"})," More Chelsea Monthly Stories"]})})]}),e&&r.jsx("section",{className:"bg-background py-16 border-t border-border",children:r.jsx("div",{className:"max-w-3xl mx-auto px-6",children:r.jsx(su,{articleId:e.id,articleDate:e.published_date,customSeeded:CEe})})})]})}const REe=[{author_name:"Olivia Pemberton",content:"This is exactly what Chelsea needs. I've been putting off rebuilding my boutique's website for two years because every developer quote was £8k+. If I can describe it and get a working version, that changes everything for small businesses here.",likes:287,hoursAgo:46},{author_name:"Marcus Chen",content:"Vibe coding is the future. I've been playing with similar tools and the gap between 'I have an idea' and 'I have a working prototype' is closing fast. Made Possible sounds like they're taking it further than most. The conversational refinement is key â that's where the magic happens.",likes:198,hoursAgo:44},{author_name:"Sophia Laurent",content:"The domain connection point is important. Too many of these platforms trap you on their subdomain forever. If Made Possible lets you build, test, then connect your own branded domain, that's the right approach. Chelsea businesses need to own their identity.",likes:234,hoursAgo:42},{author_name:"James Whitmore",content:"As a property consultant in Kensington, I paid £12,000 for a website that took four months and still isn't quite right. If this platform can do 80% of that in an afternoon for a fraction of the cost, it's not just convenient â it's genuinely disruptive.",likes:312,hoursAgo:40},{author_name:"Isabella Rossi",content:"The database-backed applications part is what interests me. A simple website is one thing, but member areas, booking systems, customer portals â that's where most small businesses actually need help. If Made Possible handles that too, it's a different category of tool entirely.",likes:167,hoursAgo:38},{author_name:"Daniel Foster",content:"I run a restaurant in Fulham and our website is genuinely embarrassing. We've been quoted £3,500 for a rebuild. If I can type 'create a website for my restaurant with menu, reservations and gallery' and get something usable, I'd try it today.",likes:256,hoursAgo:36},{author_name:"Charlotte Devereux",content:"'Describe it. Build it. Refine it. Publish it.' â that's the tagline right there. If the execution matches the promise, this is the most significant shift in how small businesses get online since WordPress. Possibly more so, because WordPress still required learning WordPress.",likes:189,hoursAgo:34},{author_name:"Henry Ashworth",content:"The Supabase integration is smart. For businesses that outgrow the basics, being able to connect a proper backend without leaving the platform is the bridge between 'simple site' and 'real application'. That's where a lot of these tools fall short.",likes:145,hoursAgo:32},{author_name:"Amara Okafor",content:"I'm a personal trainer and I've been using Instagram as my 'website' for three years because I couldn't justify the cost of a proper booking platform. This could genuinely change how independent fitness professionals operate. The booking system alone would be worth it.",likes:223,hoursAgo:30},{author_name:"Edward Sterling",content:"Chelsea Monthly covering AI website builders is a sign of how mainstream this has become. Two years ago this would have been a niche tech story. Now it's a business feature. The shift is real.",likes:178,hoursAgo:28},{author_name:"Priya Sharma",content:"The beauty entrepreneur use case is spot on. Before a product launch you need a premium digital presence but you don't want to spend £5k on a site that might need to change once the brand evolves. Being able to refine through conversation is perfect for that pre-launch phase.",likes:167,hoursAgo:26},{author_name:"William Ashford",content:"What I appreciate about this article is it doesn't oversell. It acknowledges that complex projects will still need professional developers. The honest framing makes the case stronger, not weaker. This isn't replacing developers â it's lowering the barrier to entry.",likes:298,hoursAgo:24},{author_name:"Victoria Bright",content:"Just signed up for the early access. The idea of describing my interior design portfolio in plain English and having it built is exactly what I've been waiting for. Chelsea Monthly always finds the businesses that matter before they're everywhere.",likes:145,hoursAgo:12},{author_name:"Thomas Blackburn",content:"The 'collaborating with a digital creative team' framing is perfect. That's exactly how it should feel â not like using software, but like working with someone who understands what you want. The conversational refinement is
910where this differs from template builders.",likes:198,hoursAgo:10},{author_name:"Gabriela Mendes",content:"As someone who's tried Wix, Squarespace and WordPress â they all still feel like you're fighting the platform. The promise of Made Possible is that the platform adapts to you instead. If it delivers, it's a fundamentally different experience.",likes:234,hoursAgo:8},{author_name:"Nikolai Petrov",content:"The ability to connect your own AI provider credentials on appropriate plans is a smart move. Power users will want control over which model is generating their site. That level of flexibility suggests they understand their audience isn't just beginners.",likes:167,hoursAgo:7},{author_name:"Jasmine Carter",content:"I've been waiting for something like this. Every time I've tried to build a website I get stuck on the technical bits and lose interest in the actual content. If I can just describe what I want and focus on the business side, that's the dream.",likes:189,hoursAgo:6},{author_name:"George Hamilton",content:"The start-up prototype use case is underrated. Being able to build a working version to test with real users before investing in custom development could save founders thousands and months of time. That alone justifies the platform's existence.",likes:212,hoursAgo:5},{author_name:"Lucia Fernandez",content:"This is the kind of technology coverage Chelsea Monthly does well â focused on how it affects real businesses rather than just tech for tech's sake. The Chelsea and Kensington angle makes it relevant rather than abstract. More of this please.",likes:267,hoursAgo:4},{author_name:"Sebastian Wolfe",content:"The four-step process is clean: describe, build, refine, publish. If the build quality is there, this could genuinely democratise web development for small businesses. The refinement loop is what will make or break it â that's where most AI builders fall short.",likes:178,hoursAgo:3},{author_name:"Madeleine Hartley",content:"Bookmarked madepossible.ai immediately. My event planning business desperately needs a proper site with booking and enquiry forms but I've been paralysed by the cost and complexity. This could be the answer. Great feature, Chelsea Monthly.",likes:145,hoursAgo:2},{author_name:"Dimitri Volkov",content:"AI-assisted development is moving fast. Made Possible seems to be positioning itself in the right place â not too simple, not too complex. The database and integrations support is what separates it from the template builders. Will be watching this closely.",likes:198,hoursAgo:2},{author_name:"Valentina Cruz",content:"This article has 184K views already and it just published. Clearly hitting a nerve. London's entrepreneurs have been waiting for something like this. The fact that Chelsea Monthly is covering it tells you it's arrived.",likes:234,hoursAgo:1},{author_name:"Philip Chesterton",content:"The conclusion is the best part of this piece. 'People with ideas may no longer need technical expertise before they can begin bringing those ideas to life.' That's not a small claim. If Made Possible delivers on even half of it, it's a significant moment for small business.",likes:312,hoursAgo:1},{author_name:"Eleanor Sinclair",content:"Just shared this with my whole network. Every small business owner in Chelsea should read this. The cost and friction of getting online has been a barrier for too long. Made Possible could genuinely change the landscape for independent businesses.",likes:278,hoursAgo:1}],IEe="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/d8c129c57_generated_image.png",DEe=[{icon:Km,title:"Restaurants",text:"A sophisticated website with menu, reservations and gallery â built in minutes, not weeks."},{icon:bK,title:"Fashion Designers",text:"An online portfolio that looks as refined as the collection itself, without a developer."},{icon:Al,title:"Personal Trainers",text:"A booking platform with scheduling, payments and client management â all by description."},{icon:Zn,title:"Property Consultants",text:"A lead-generation site with listing pages, enquiry forms and agent profiles."}
910,{icon:ir,title:"Beauty Entrepreneurs",text:"A premium digital presence ready before the product even launches."},{icon:s8,title:"Start-ups",text:"A working prototype to test an idea with real users before investing in custom development."}],LEe=[{num:"01",title:"Describe It",text:"Type what you want in plain English. No briefs, no wireframes, no technical specification documents."},{num:"02",title:"Build It",text:"The AI generates layouts, pages, content and functionality across the entire project."},{num:"03",title:"Refine It",text:"Ask for changes through conversation. Warmer, more minimal, more pages â just say it."},{num:"04",title:"Publish It",text:"Launch on a Made Possible subdomain, then connect your own branded domain when ready."}];function Bc({icon:e,label:t,title:n}){return r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-12",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[r.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-sm flex items-center justify-center",children:r.jsx(e,{className:"w-6 h-6 text-primary"})}),r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em]",children:t})]}),r.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground leading-tight",style:{fontFamily:"'Montserrat', sans-serif"},children:n})]})}function OL({text:e}){return r.jsxs(ue.blockquote,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:"my-12 relative pl-8 border-l-4 border-primary",children:[r.jsx(ja,{className:"absolute -left-3 -top-2 w-8 h-8 text-primary/20 fill-primary"}),r.jsx("p",{className:"text-2xl font-light italic text-foreground leading-relaxed",style:{fontFamily:"'Montserrat', sans-serif"},children:e})]})}function $Ee(){const[e,t]=j.useState(null),[n,s]=j.useState(!1);return j.useEffect(()=>{window.scrollTo(0,0),W.entities.Article.filter({slug:"made-possible-ai-london"}).then(a=>t((a==null?void 0:a[0])||null)).catch(()=>{})},[]),r.jsxs("article",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"relative h-[85vh] min-h-[600px] w-full overflow-hidden",children:[r.jsx("img",{src:IEe,alt:"AI-powered website building in a luxury Chelsea workspace",className:"absolute inset-0 w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground via-foreground/50 to-foreground/20"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-foreground
910/40 to-transparent"}),r.jsxs("div",{className:"relative z-10 h-full flex flex-col justify-between max-w-5xl mx-auto px-6 py-10",children:[r.jsx(ue.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},children:r.jsxs(se,{to:"/Articles",className:"text-background/60 text-xs font-bold uppercase tracking-[0.2em] hover:text-primary transition-colors flex items-center gap-2",children:[r.jsx("span",{className:"w-8 h-px bg-primary"})," Chelsea Monthly · Business & Technology"]})}),r.jsxs(ue.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},className:"max-w-3xl",children:[r.jsxs("span",{className:"inline-flex items-center gap-2 bg-primary text-primary-foreground text-[10px] font-bold px-3 py-1.5 uppercase tracking-[0.2em] mb-6",children:[r.jsx(ir,{className:"w-3 h-3"})," Business Feature · Technology"]}),r.jsx("h1",{className:"text-3xl sm:text-5xl lg:text-6xl font-bold text-background leading-[1.05] mb-6 drop-shadow-2xl",style:{fontFamily:"'Montserrat', sans-serif"},children:"Made Possible.ai Brings AI-Powered Website Building to London's Entrepreneurs"}),r.jsx("p",{className:"text-background/70 text-lg font-light max-w-2xl leading-relaxed mb-8 border-l-2 border-primary pl-4",children:"New platform promises to help founders, creatives and small businesses turn an idea into a live website or digital product simply by describing what they want."}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/20 border-2 border-primary/50 flex items-center justify-center text-background font-bold text-sm",children:"CM"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-background text-sm font-semibold tracking-wide",children:"Chelsea Monthly Editorial"}),r.jsx("span",{className:"text-background/50 text-[10px] uppercase tracking-widest",children:"30 August 2026"})]})]}),r.jsx("div",{className:"h-8 w-px bg-background/20 hidden sm:block"}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-background/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Vt,{className:"w-4 h-4 text-primary"})," 8 min read"]}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-background/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Nr,{className:"w-4 h-4 text-primary"})," 184K views"]})]})]})]})]}),r.jsx("div",{className:"sticky top-0 z-40 bg-background/95 backdrop-blur-md border-b border-border shadow-sm",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-3 flex items-center justify-between",children:[r.jsx("span",{className:"font-bold text-foreground uppercase tracking-widest text-[10px]",children:"Made Possible.ai"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>s(!n),className:`flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide transition-all rounded-sm ${n?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-primary/10"}`,children:[r.jsx(ga,{className:`w-3.5 h-3.5 ${n?"fill-current":""}`})," Save"]}),r.jsxs("button",{className:"flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide bg-muted text-muted-foreground hover:bg-primary/10 transition-all rounded-sm",children:[r.jsx(ws,{className:"w-3.5 h-3.5"})," Share"]})]})]})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-lg leading-relaxed text-foreground mb-6 first-letter:text-7xl first-letter:font-bold first-letter:text-primary first-letter:mr-2 first-letter:float-left first-letter:leading-[0.8]",style:{fontFamily:"'Montserrat', sans-serif"},children:"London has never been short of ideas."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"From independent fashion labels and restaurants to consultants, creators, property businesses, event companies and start-ups, the capital is full of entrepreneurs who know exactly what they want to build â but not always how to build it."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Made Possible.ai is aiming to change that."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The new AI-powered website and application builder allows users to create digital projects using ordinary language rather than code."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:'A user can simply type: "Create a beautiful luxury website for my Chelsea-based interior design company with a portfolio, enquiry form, testimonials and consultation booking." Made Possible then begins building the website. No HTML. No CSS. No complicated development environment. Just the idea.'})]}),r.jsx(Bc,{icon:uG,label:"Chapter One",title:"A Different Way to Build Online"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The technology sits within the rapidly growing world of AI-assisted development and vibe coding, where users explain the outcome they want and artificial intelligence helps create the underlying product."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Made Possible is designed to take that concept beyond a traditional website template. Its AI builder can work across an entire project, generating layouts, pages, content and functionality before allowing the customer to continue refining the result through conversation."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"If the homepage feels too corporate, the user can ask for something warmer. If the site needs another page, the AI can add one. If the branding needs to feel more luxurious, minimal, colourful or editorial, the user can request that too."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"The aim is to make building online feel less like programming and more like collaborating with a digital creative team."})]}),r.jsx(OL,{text:"The aim is to make building online feel less like programming and more like collaborating with a digital creative team."}),r.jsx(Bc,{icon:Km,label:"Chapter Two",title:"Particularly Relevant for Chelsea Businesses"}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-8",children:"For independent businesses across Chelsea, Kensington and wider West London, the appeal is easy to understand. A new restaurant may need a sophisticated website quickly. A fashion designer may want an online portfolio. A personal trainer could require a booking platform. A property consultant might want a lead-generation website. A beauty entrepreneur may need a premium digital presence before a product launch."})}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-12",children:DEe.map((a,i)=>r.jsx(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:i*.08},className:"bg-card border border-border rounded-sm p-6 hover:shadow-lg hover:border-primary/20 transition-all duration-500",children:r.jsxs("div",{className:"flex items-start gap-4",children:[r.jsx("div",{className:"w-10 h-10 bg-primary/10 rounded-sm flex items-center justify-center shrink-0",children:r.jsx(a.icon,{className:"w-5 h-5 text-primary"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-foreground mb-1",style:{fontFamily:"'Montserrat', sans-serif"},children:a.title}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:a.text})]})]})},a.title))}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Traditionally, even relatively straightforward websites can involve lengthy discussions with developers, design revisions and significant upfront costs. Made Possible.ai is designed to reduce that friction considerably."})}),r.jsx(Bc,{icon:Zn,label:"Chapter Three",title:"From Temporary Subdomain to Your Own Brand"}),r.jsxs(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Users can initially publish projects using a Made Possible-powered subdomain and, on suitable plans, connect their own domain name. That means a business can build and test its project before connecting its permanent branded address."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"For established Chelsea businesses, that distinction is important: the final website can remain entirely under the company's own identity rather than looking like a generic hosted profile."})]}),r.jsx(Bc,{icon:s8,label:"Chapter Four",title:"More Than Static Web Pages"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Made Possible is also being developed for projects that need more than a homepage and contact form. The platform can support database-backed applications, file storage and integrations that allow users to create more sophisticated digital products."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"That could include member areas, directories, booking systems, customer portals and other online services."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"For more technically experienced businesses, users can also connect external services such as Supabase and, on appropriate plans, work with their own AI provider credentials."})]}),r.jsx(Bc,{icon:Al,label:"Chapter Five",title:"Why This Matters Now"}),r.jsxs(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The wider change taking place in technology is significant. For years, entrepreneurs were told that having a great idea was only the beginning. They still needed somebody who could design it, code it and deploy it."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Artificial intelligence is beginning to challenge that assumption. The founder may increasingly be able to create the first version themselves."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"That does not eliminate the need for professional developers on highly complex projects. What it does is make the starting point far more accessible."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"A restaurant owner does not need to become a programmer. A fashion entrepreneur does not need to learn JavaScript. A consultant does not need to understand server architecture before creating a professional digital presence."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"They can begin with the thing they already understand best: their business."})]}),r.jsx(OL,{text:"Describe it. Build it. Refine it. Publish it."}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-16",children:LEe.map((a,i)=>r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:i*.1},className:"bg-secondary text-secondary-foreground rounded-sm p-6",children:[r.jsx("span",{className:"text-primary text-3xl font-bold block mb-2",style:{fontFamily:"'Montserrat', sans-serif"},children:a.num}),r.jsx("h3",{className:"text-lg font-bold text-secondary-foreground mb-2",style:{fontFamily:"'Montserrat', sans-serif"},children:a.title}),r.jsx("p",{className:"text-sm text-secondary-foreground/70 leading-relaxed",children:a.text})]},a.num))}),r.jsx(Bc,{icon:uK,label:"Chapter Six",title:"London Creativity Meets Artificial Intelligence"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"There is something particularly fitting about a platform such as Made Possible emerging at a time when London's creative and entrepreneurial communities are embracing AI at extraordinary speed. Chelsea has always combined established businesses with ambitious new brands."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Made Possible.ai is effectively betting that the next generation of those businesses will expect technology to work differently. Instead of adapting their idea to whatever a website template allows, they will increasingly expect the software to adapt to them."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"And that may ultimately be the most interesting thing about Made Possible. Its promise is not simply that AI can build websites. It is that people with ideas may no longer need technical expertise before they can begin bringing those ideas to life."})]}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"bg-foreground text-background rounded-sm p-8 md:p-12 text-center mb-12",children:[r.jsx(ir,{className:"w-10 h-10 text-primary mx-auto mb-4"}),r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] block mb-3",children:"Find Out More"}),r.jsx("h3",{className:"text-2xl md:text-3xl font-bold mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Made Possible.ai"}),r.jsx("p",{className:"text-background/70 leading-relaxed max-w-xl mx-auto mb-6",children:"Made Possible.ai is currently undergoing final testing ahead of its wider launch."}),r.jsxs("a",{href:"https://madepossible.ai",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-2 bg-primary text-primary-foreground font-bold text-xs uppercase tracking-[0.2em] px-8 py-4 hover:bg-primary/90 transition-colors rounded-sm",children:["Visit madepossible.ai ",r.jsx(_t,{className:"w-4 h-4"})]})]}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"text-center py-8 border-y border-border mb-12",children:[r.jsx("p",{className:"text-sm font-bold uppercase tracking-[0.2em] text-primary mb-1",children:"Chelsea Monthly"}),r.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-widest",children:"Business & Technology · The Innovation Issue"})]}),r.jsx("div",{className:"text-center",children:r.jsxs(se,{to:"/Articles",className:"inline-flex items-center gap-2 text-primary font-bold text-xs uppercase tracking-[0.2em] hover:gap-3 transition-all",children:[r.jsx(_t,{className:"w-4 h-4 rotate-180"})," More Chelsea Monthly Stories"]})})]}),e&&r.jsx("section",{className:"bg-background py-16 border-t border-border",children:r.jsx("div",{className:"max-w-3xl mx-auto px-6",children:r.jsx(su,{articleId:e.id,articleDate:e.published_date,customSeeded:REe})})})]})}const FEe=[{author_name:"Rajiv Mehta",content:"Finally a review that captures what makes Colonel Saab different. The family story IS the restaurant. You can feel it the moment you walk in â it's not theme-park India, it's someone's actual memories on the walls. Lesley Cameron nailed this.",likes:342,hoursAgo:68},{author_name:"Charlotte Pemberton",content:"The value discussion is the most honest part of this review. Yes it's expensive, but you're paying for the room, the service, the bar programme AND the food. If you want a £12 curry near Charing Cross, there are plenty of options. Colonel Saab is a different category entirely.",likes:287,hoursAgo:66},{author_name:"Arjun Krishnan",content:"As someone from South India, I appreciate that this review actually understands regional cooking. Chicken Chettinad and Kozhi Thenga Paal Curry are genuinely different dishes from genuinely different regions. Most London Indian restaurants mash everything into one 'curry' category. Colonel Saab respects the geography.",likes:398,hoursAgo:64},{author_name:"Victoria Ashworth",content:"The Firozabad glass chandeliers alone are worth the visit. We went for our anniversary and I spent twenty minutes just looking at the walls before we even ordered. The interior is theatrical without being tacky â that's a very difficult balance to strike. This review captures that perfectly.",likes:256,hoursAgo:62},{author_name:"Deepak Sharma",content:"The Memsaab's Tasting Menu is the way to go if it's your first visit. Let the kitchen tell the story in sequence rather than trying to construct one yourself from the à la carte. We did it last month and it was genuinely moving â you can feel the family narrative in the progression of dishes.",likes:312,hoursAgo:60},{author_name:"Olivia Hartwell",content:"The Kolhapuri Lamb Chops at £36.45 are expensive but they are genuinely one of the best lamb dishes I've had in London. The spice rub is precise, the meat is quality, the lime-chilli sauce cuts through perfectly. Don't skip them if you go.",likes:234,hoursAgo:58},{author_name:"Marcus Whitfield",content:"What I respect about this review is it doesn't pretend the service is flawless. The inconsistencies during busy periods are real â we experienced slightly rushed pacing on a Saturday night. But the warmth of the staff more than compensated. Honest criticism makes the praise more credible.",likes:198,hoursAgo:56},{author_name:"Priya Nair",content:"The Tandoori Broccoli is a revelation. I'm vegetarian and usually resigned to ordering paneer everything at Indian restaurants. A kitchen that treats broccoli with the same respect as lamb chops is a kitchen that actually understands vegetables. Urfa chilli with the creamy dressing is genius.",likes:276,hoursAgo:54},{author_name:"James Blackwood",content:"The cocktails are genuinely some of the best in the West End. The Memsaab â bourbon with orange, cinnamon and curry leaf â sounds like it shouldn't work but it absolutely does. Indian ingredients as accents, not gimmicks. That's the difference between a good bar programme and a themed one.",likes:245,hoursAgo:52},{author_name:"Eleanor Forsythe",content:"We went pre-theatre before a show at the Noel Coward and it was perfect. Close enough to walk, grand enough to feel like an occasion, and the service was paced for a theatre schedule without making us feel rushed. This is exactly what Colonel Saab is best for.",likes:189,hoursAgo:50},{author_name:"Sanjay Gupta",content:"The Butter Chicken here is the benchmark. Most London versions are either too sweet or too rich. Colonel Saab's version has proper balance â the tomato acidity is there, the cashew richness is there, and the charred chicken has enough personality to survive the sauce. It became globally famous for a reason and this version reminds you why.",likes:321,hoursAgo:48},{author_name:"Isabella Romano",content:"The Banarasi Amrood Ki Chaat is one of the most interesting dishes I've eaten this year. Guava with tamarind and spiced cream sounds chaotic but it's brilliantly controlled. £12.95 is not cheap for chaat but this isn't street food â it's street-food thinking elevated for a fine dining room. Worth it.",likes:267,hoursAgo:46},{author_name:"Thomas Ashbury",content:"The 'construct contrast' advice is the best dining tip in this entire review. We made the mistake of ordering three cream-heavy dishes on our first visit and the meal became monotonous despite each dish being technically excellent. Next time: grilled, acidic, vegetable, regional curry, rice, bread. Transformed the experience.",likes:234,hoursAgo:44},{author_name:"Ananya Desai",content:"As an Indian living in London, Colonel Saab is the restaurant I take my parents to when they visit. It's the one place that feels like home without being a replica of home. The regional breadth means there's always something that reminds each of us of somewhere. That's rare and that's worth paying for.",likes:389,hoursAgo:42},{author_name:"Henry Cavendish",content:"The Asprey marble bar associated with the Maharaja of Patiala â I had no idea about that until I read this. It changes how you see the room. This isn't decoration, it's curation. The review's point about 'constructing an artificial history' versus genuine family objects is the key distinction.",likes:178,hoursAgo:40},{author_name:"Sophia Laurent",content:"The Rasmalai Milk Cake for dessert is the move. After the depth of the savoury menu, something perfumed and delicate is exactly right. Too many people go for the richest dessert and regret it. Trust the saffron and cardamom â they know what they're doing.",likes:198,hoursAgo:38},{author_name:"William Hartley",content:"9.3/10 ambience on TheFork is if anything slightly low. The room is genuinely extraordinary. The terracotta walls, the velvet canopy, the chandeliers, the art â it's like dining inside a beautifully curated museum that happens to serve excellent food. London has nothing else quite like it.",likes:256,hoursAgo:36},{author_name:"Meera Joshi",content:"Old Delhi's Famous Lamb Curry is the dish I dream about. Keema and lamb pieces in the Delhi style â it tastes like the food my grandmother made. That a central London restaurant can evoke that level of authenticity while maintaining fine-dining presentation is remarkable. Colonel Saab earns its prices.",likes:287,hoursAgo:34},{author_name:"Edward Sterling",content:"The Beef Pepper Fry with Tellicherry black pepper is a masterclass. Kerala-style, coconut and pepper, bold without being aggressive. It's the dish that best demonstrates the review's point about spice meaning layers rather than endurance tests. Order it.",likes:212,hoursAgo:32},{author_name:"Gabriela Mendes",content:"Chelsea Monthly's restaurant reviews are consistently the best in London. They actually understand food rather than just describing interiors and listing prices. The regional analysis here â Chettinad, Kerala, Delhi â shows real knowledge. More of this please.",likes:298,hoursAgo:30},{author_name:"Nikolai Petrov",content:"The 12.5% service charge is clearly stated and the service earns it. Our server explained every dish, navigated my wife's allergies with genuine care, and knew when to disappear. That's hospital
910ity, not choreography. The review's title is perfect.",likes:234,hoursAgo:28},{author_name:"Jasmine Carter",content:"The Kandhari Paneer Tikka with prunes and pomegranate is the most interesting paneer dish I've had. Most places treat paneer as a sauce carrier â here it has sweetness, acidity and depth from the stuffing. Vegetarians are not an afterthought at Colonel Saab. That matters.",likes:245,hoursAgo:26},{author_name:"Daniel Foster",content:"Business dinner here last week and the room absolutely made the impression we needed. Clients from Mumbai were impressed that a London restaurant understood regional Indian cooking this well. The bar programme sealed the deal. Colonel Saab understands its purpose.",likes:189,hoursAgo:24},{author_name:"Lucia Fernandez",content:"Just returned from lunch and this review is spot on. The chandeliers, the art, the warmth â it all works together. The Nadan Meen Curry was the highlight for me. Home-style fish curry that tastes like it was cooked by someone who cares. Lesley Cameron clearly understands this restaurant.",likes:178,hoursAgo:11},{author_name:"Philip Chesterton",content:"The 'contemporary viewpoint with an old soul' description is exactly right. It's modern without losing the soul. That's the trick most ambitious Indian restaurants miss â they go either fully traditional or fully fusion. Colonel Saab threads the needle.",likes:198,hoursAgo:9},{author_name:"Amara Okafor",content:"Pre-theatre dinner here before Hamilton and it was the perfect start to the evening. Walking distance, grand enough to feel special, and the pacing was exactly right for a 7:30 curtain. The chaat to start, tandoor dish, regional curry structure the review recommends worked beautifully.",likes:167,hoursAgo:8},{author_name:"Sebastian Wolfe",content:"The Kunwar cocktail â Indian whisky, Campari, spiced vermouth, rhubarb bitters â is one of the best Negroni-adjacent drinks in London. The rhubarb bitters lift it into something genuinely original. The bar is not an afterthought at Colonel Saab. This review gets that right.",likes:212,hoursAgo:7},{author_name:"Valentina Cruz",content:"This review has nearly 200K views and it deserves every one. The most thoughtful piece on Colonel Saab I've read. The value discussion alone is worth reading â too many reviews either gush or complain. This one contextualises the price within what you're actually paying for.",likes:234,hoursAgo:6},{author_name:"George Hamilton",content:"The Mall Road's Dahi Sev Puri is the perfect opener. Crisp, cooling, tangy, textured â it wakes up your palate without overwhelming it. Start with chaat, as the review says. It sets up the rest of the meal properly.",likes:156,hoursAgo:5},{author_name:"Madeleine Hartley",content:"Booked for my birthday next month after reading this. The 'best for special occasions' recommendation is exactly what I needed to hear. The room sounds perfect for a celebration. Can't wait to try the Memsaab's Tasting Menu.",likes:145,hoursAgo:4},{author_name:"Dimitri Volkov",content:"The fact that OpenTable scores value at 4.1 while food, service and ambience all sit at 4.5-4.6 tells you everything. Colonel Saab is not trying to be value dining. It's trying to be an experience. Judge it on those terms and it delivers. This review frames that correctly.",likes:189,hoursAgo:3},{author_name:"Eleanor Sinclair",content:"The Rose Gulab Jamun is the dessert to order. Perfumed, delicate, recognisably Indian. After the richness of the mains it's exactly the right finish. The review's advice about choosing something perfumed over something richest is spot on.",likes:167,hoursAgo:2},{author_name:"Victoria Bright",content:"Just shared this with my whole network. Every London food lover should read this before visiting Colonel Saab. The 'construct contrast' ordering advice alone will transform your meal. Chelsea Monthly consistently publishes the best restaurant writing in the capital.",likes:245,hoursAgo:1},{author_name:"Thomas Blackburn",content:"The Murgh-e-Malai with saffron and cardamom is beautifully judged. Corn-fed chicken, clay-oven cooked, the marinade is precise. It's the dish that shows the tandoor isn't just for show â the kitchen actually knows how to use it. Order it alongside something regional for contrast.",likes:178,hoursAgo:1}],BEe="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/1601f3233_unnamed1.webp",qEe="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/19a1c7b96_unnamed.webp",VEe=[{label:"Food",score:4.5},{label:"Service",score:4.5},{label:"Décor & Ambience",score:5},{label:"Drinks",score:4.5},{label:"Value",score:4}],UEe=[{name:"Mall Road's Dahi Sev Puri",type:"Chaat",notes:"Crisp puri, cooling yoghurt, sweet-and-tangy sauces and texture from sev. Playful food, carefully controlled."},{name:"Banarasi Amrood Ki Chaat",type:"Chaat · £12.95",notes:"Guava meets tamarind chutney, raspberry, spiced cream and crisp gram-flour noodles. Street-food thinking translated into a central-London dining room."},{name:"Kandhari Paneer Tikka",type:"Vegetarian",notes:"Cottage cheese stuffed with prunes and pomegranate, set against tomato, garlic and mustard. Sweetness, acidity and depth."},{name:"Tandoori Broccoli",type:"Vegetarian",notes:"Tender-stem broccoli from the clay oven with creamy dressing and Urfa chilli. A reminder of how naturally vegetables suit Indian spice architecture."},{name:"Murgh-e-Malai",type:"Tandoor",notes:"Corn-fed chicken breast, marinated and clay-oven cooked, paired with saffron and cardamom."},{name:"Kolhapuri Lamb Chops",type:"Tandoor · £36.45",notes:"Spice-rubbed chops with lime-chilli sauce. Unapologetically indulgent â firmly in special-occasion territory."}
910],zEe=[{name:"Chicken Chettinad",region:"Tamil Nadu",notes:"Aromatic spice profile associated with South India."},{name:"Kozhi Thenga Paal Curry",region:"Kerala",notes:"Coconut milk and spices creating something gentler and more aromatic."},{name:"Nadan Meen Curry",region:"South India",notes:"Home-style fish curry continuing the southern journey."},{name:"Beef Pepper Fry",region:"Kerala",notes:"Coconut and Tellicherry black pepper â bold and warming."},{name:"Old Delhi's Famous Lamb Curry",region:"Delhi",notes:"Keema and pieces of lamb in the style of Delhi meat cooking."},{name:"Butter Chicken",region:"House Signature",notes:"Boneless chicken in a rich tomato-and-cashew gravy. Deliberately luxurious, immediately recognisable."},{name:"Memsaab's Chicken Curry",region:"Family Recipe",notes:"Chicken infused with Indian spices and saffron in a lighter cream sauce with sweet spices. Inspired by the family story behind the restaurant."}],WEe=[{name:"The Colonel Saab",notes:"Paul John Nirvana whisky with chai and coffee liqueur."},{name:"The Memsaab",notes:"Bourbon with orange, cinnamon and curry leaf."},{name:"Kunwar",notes:"Indian whisky, Campari, spiced vermouth and rhubarb bitters."},{name:"Punchu",notes:"Mango vodka, passion fruit, pineapple, lime and orgeat â tropical territory."}];function HEe({score:e,size:t="w-4 h-4"}){return r.jsx("div",{className:"flex gap-0.5 items-center",children:[1,2,3,4,5].map(n=>{const s=e>=n-.5&&e<n,a=e>=n;return r.jsxs("div",{className:"relative",children:[r.jsx(rt,{className:`${t} text-muted-foreground/30`}),(a||s)&&r.jsx("div",{className:"absolute inset-0 overflow-hidden",style:{width:s?"50%":"100%"},children:r.jsx(rt,{className:`${t} fill-primary text-primary`})})]},n)})})}function Va({icon:e,label:t,title:n}){return r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-10",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[r.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-sm flex items-center justify-center",children:r.jsx(e,{className:"w-6 h-6 text-primary"})}),r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em]",children:t})]}),r.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground leading-tight",style:{fontFamily:"'Montserrat', sans-serif"},children:n})]})}function fx({text:e,side:t="left"}){const n=t==="right";return r.jsxs(ue.blockquote,{initial:{opacity:0,x:n?20:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:`my-12 relative ${n?"pr-8 border-r-4 border-primary text-right":"pl-8 border-l-4 border-primary"}`,children:[r.jsx(ja,{className:`absolute ${n?"-right-3":"-left-3"} -top-2 w-8 h-8 text-primary/20 fill-primary`}),r.jsx("p",{className:"text-2xl font-light italic text-foreground leading-relaxed",style:{fontFamily:"'Montserrat', sans-serif"},children:e})]})}function GEe({src:e,alt:t,caption:n}){return r.jsxs(ue.div,{initial:{opacity:0,scale:1.02},whileInView:{opacity:1,scale:1},viewport:{once:!0},transition:{duration:.8},className:"relative h-[55vh] min-h-[420px] w-full overflow-hidden my-16 rounded-sm",children:[r.jsx("img",{src:e,alt:t,className:"absolute inset-0 w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground
910/60 to-transparent"}),n&&r.jsx("div",{className:"absolute bottom-6 left-6 z-10",children:r.jsx("span",{className:"text-white/80 text-xs font-medium uppercase tracking-widest bg-foreground/40 backdrop-blur-sm px-4 py-2 rounded-sm",children:n})})]})}function KEe(){const[e,t]=j.useState(null),[n,s]=j.useState(!1);return j.useEffect(()=>{window.scrollTo(0,0),W.entities.Article.filter({slug:"colonel-saab-trafalgar-square-review"}).then(a=>t((a==null?void 0:a[0])||null)).catch(()=>{})},[]),r.jsxs("article",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"relative h-[88vh] min-h-[620px] w-full overflow-hidden",children:[r.jsx("img",{src:BEe,alt:"Colonel Saab Trafalgar Square â shared Indian feast",className:"absolute inset-0 w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground via-foreground/55 to-foreground/25"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-foreground/45 to-transparent"}),r.jsxs("div",{className:"relative z-10 h-full flex flex-col justify-between max-w-5xl mx-auto px-6 py-10",children:[r.jsx(ue.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},children:r.jsxs(se,{to:"/Articles",className:"text-background/60 text-xs font-bold uppercase tracking-[0.2em] hover:text-primary transition-colors flex items-center gap-2",children:[r.jsx("span",{className:"w-8 h-px bg-primary"})," Reviews & Dining · Indian"]})}),r.jsxs(ue.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},className:"max-w-3xl",children:[r.jsxs("span",{className:"inline-flex items-center gap-2 bg-primary text-primary-foreground text-[10px] font-bold px-3 py-1.5 uppercase tracking-[0.2em] mb-6",children:[r.jsx(Pn,{className:"w-3 h-3"})," Restaurant Review · â
â
â
â
½"]}),r.jsx("h1",{className:"text-3xl sm:text-5xl lg:text-6xl font-bold text-background leading-[1.05] mb-6 drop-shadow-2xl",style:{fontFamily:"'Montserrat', sans-serif"},children:"Colonel Saab Trafalgar Square: Indian Dining with Memory, Theatre and Soul"}),r.jsx("p",{className:"text-background/70 text-lg font-light max-w-2xl leading-relaxed mb-8 border-l-2 border-primary pl-4",children:"London has no shortage of ambitious Indian restaurants. What it has rather fewer of are restaurants that understand that luxury is not simply expensive ingredients, heavy interiors and elaborate presentation."}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/20 border-2 border-primary/50 flex items-center justify-center text-background font-bold text-sm",children:"LC"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-background text-sm font-semibold tracking-wide",children:"Lesley Cameron"}),r.jsx("span",{className:"text-background/50 text-[10px] uppercase tracking-widest",children:"Chelsea Monthly · September 2026"})]})]}),r.jsx("div",{className:"h-8 w-px bg-background/20 hidden sm:block"}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-background/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Vt,{className:"w-4 h-4 text-primary"})," 14 min read"]}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-background/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(rt,{className:"w-4 h-4 text-primary fill-primary"})," 4.6 / 5"]})]})]})]})]}),r.jsx("div",{className:"sticky top-0 z-40 bg-background/95 backdrop-blur-md border-b border-border shadow-sm",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-3 flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[r.jsx("span",{className:"font-bold text-foreground uppercase tracking-widest text-[10px]",children:"Colonel Saab"}),r.jsxs("span",{className:"hidden sm:flex items-center gap-1",children:[r.jsx(rt,{className:"w-3 h-3 fill-primary text-primary"})," 4.6"]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>s(!n),className:`flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide transition-all rounded-sm ${n?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-primary/10"}`,children:[r.jsx(ga,{className:`w-3.5 h-3.5 ${n?"fill-current":""}`})," Save"]}),r.jsxs("button",{className:"flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide bg-muted text-muted-foreground hover:bg-primary/10 transition-all rounded-sm",children:[r.jsx(ws,{className:"w-3.5 h-3.5"})," Share"]})]})]})}),r.jsx("div",{className:"max-w-3xl mx-auto px-6 pt-16",children:r.jsx(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"bg-secondary text-secondary-foreground rounded-sm overflow-hidden shadow-xl",children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5",children:[r.jsxs("div",{className:"md:col-span-2 p-8 flex flex-col items-center justify-center text-center bg-foreground text-background",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-primary mb-2",children:"Lesley Cameron's Rating"}),r.jsx("span",{className:"text-5xl font-bold text-primary",style:{fontFamily:"'Montserrat', sans-serif"},children:"4.6"}),r.jsxs("div",{className:"flex gap-0.5 mt-2",children:[r.jsx(rt,{className:"w-5 h-5 fill-primary text-primary"}),r.jsx(rt,{className:"w-5 h-5 fill-primary text-primary"}),r.jsx(rt,{className:"w-5 h-5 fill-primary text-primary"}),r.jsx(rt,{className:"w-5 h-5 fill-primary text-primary"}),r.jsxs("div",{className:"relative",children:[r.jsx(rt,{className:"w-5 h-5 text-muted-foreground
910/30"}),r.jsx("div",{className:"absolute inset-0 overflow-hidden",style:{width:"60%"},children:r.jsx(rt,{className:"w-5 h-5 fill-primary text-primary"})})]})]}),r.jsx("span",{className:"text-background/50 text-xs uppercase tracking-widest mt-2",children:"Overall / 5"})]}),r.jsx("div",{className:"md:col-span-3 p-8 flex flex-col justify-center gap-3",children:VEe.map(a=>r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-sm font-semibold text-secondary-foreground",children:a.label}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(HEe,{score:a.score}),r.jsx("span",{className:"text-sm font-bold text-primary w-8 text-right",children:a.score.toFixed(1)})]})]},a.label))})]})})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsxs(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-lg leading-relaxed text-foreground mb-6 first-letter:text-7xl first-letter:font-bold first-letter:text-primary first-letter:mr-2 first-letter:float-left first-letter:leading-[0.8]",style:{fontFamily:"'Montserrat', sans-serif"},children:"The best dining rooms create a sense of place."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Colonel Saab at Trafalgar Square does exactly that."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Situated on William IV Street, moments from Trafalgar Square and the West End, Colonel Saab is the second London restaurant created by restaurateur Roop Partap Choudhary. The inspiration is deeply personal: his parents, Colonel Manbeer Choudhary of the Indian Army and his wife Binny, travelled extensively across India, accumulating recipes, memories, artwork and objects along the way. Their son has transformed those journeys into a restaurant that operates partly as dining room, partly as family album and partly as a celebration of the extraordinary regional breadth of Indian cuisine."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"That personal element matters, because without it Colonel Saab could easily have become another extravagant West End Indian restaurant."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"Instead, it feels unusually specific."})]}),r.jsx(Va,{icon:Km,label:"Chapter One",title:"First Impressions"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The exterior gives relatively little indication of what awaits inside. Enter, however, and the visual language changes completely."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The Trafalgar Square restaurant is arranged around a bar and lounge, an expansive main dining room, mezzanine level and private dining spaces. Above it all hangs one of the restaurant's defining visual features: a canopy of elaborate Firozabad glass chandeliers, casting a soft theatrical glow across the room."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"And then there are the objects. This is not the increasingly familiar restaurant trick of buying a collection of vaguely antique-looking pieces from an interior-design supplier and constructing an artificial history around them. Much of the collection relates directly to the Choudhary family's travels."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Paintings, Indian artwork, historic objects, carved pieces and family memorabilia compete for attention. Even the bar has pedigree: previous accounts of the Trafalgar Square restaurant identify its remarkable marble bar as an Asprey piece associated with the Maharaja of Patiala."})]})]}),r.jsx("div",{className:"max-w-5xl mx-auto px-6",children:r.jsx(GEe,{src:qEe,alt:"Colonel Saab Trafalgar Square dining room with Firozabad glass chandeliers",caption:"The dining room â Firozabad glass chandeliers, terracotta walls and family memorabilia"})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-8",children:[r.jsx(fx,{text:"There is a danger with interiors this ornate that the effect becomes theme-park India. Colonel Saab narrowly avoids it."}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Why? Because there is warmth underneath the spectacle. Terracotta and earthy tones soften the visual drama. The lighting is low enough to be flattering but not so dark that you need a telephone torch to decipher dinner. The eclectic artwork gives you reasons to keep looking around the room, while old-style jazz and the general murmur of a busy central-London restaurant prevent the space feeling museum-like."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:'Colonel Saab itself describes the restaurants as having a "contemporary viewpoint with an old soul," which is actually a fair summary of what the room achieves.'}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"It feels grand, but not intimidating. That is harder to achieve than it sounds."})]}),r.jsx(Va,{icon:eo,label:"Chapter Two",title:"The Food: India Without Reducing India to 'Curry'"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Executive Chef Sohan Bhandari leads a menu that deliberately travels rather than settling in one region. His background is in modern Indian cooking, but the interesting thing here is that modernity is generally used as a presentation tool rather than an excuse to erase the original flavours. The restaurant draws on home cooking, street food, royal kitchens and regional dishes from across the subcontinent."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"That distinction becomes clear before the main courses arrive."})]}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-16",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-8",children:[r.jsx(ir,{className:"w-6 h-6 text-primary"}),r.jsx("h3",{className:"text-xl font-bold text-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:"Chaat & Starters"}),r.jsx("div",{className:"flex-1 h-px bg-border"})]}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:UEe.map((a,i)=>r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:i*.08},className:"group bg-card rounded-sm p-6 border border-border hover:shadow-lg hover:border-primary/30 transition-all duration-500",children:[r.jsx("span",{className:"text-primary text-[9px] font-bold uppercase tracking-widest mb-2 block",children:a.type}),r.jsx("h4",{className:"text-lg font-bold text-foreground mb-3 group-hover:text-primary transition-colors",style:{fontFamily:"'Montserrat', sans-serif"},children:a.name}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:a.notes})]},a.name))})]}),r.jsx(fx,{text:"Spice here does not automatically mean chilli. The kitchen is more interested in layers than endurance tests.",side:"right"}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The kitchen is strongest when it remembers that Indian food does not require aggression to announce its presence. Cardamom, mustard, black pepper, coconut, tamarind, fenugreek, saffron, curry leaf and warming roasted spices appear in different combinations. There is heat when a dish requires it, but the cooking is more interested in layers than endurance tests."})}),r.jsx(Va,{icon:eo,label:"Chapter Three",title:"Main Courses: Regional Identity Matters"}),r.jsx(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"The main-course section is where Colonel Saab's ambition becomes most obvious. A diner who knows Indian food only through tikka masala and korma is being offered several different Indias."})}),r.jsx("div",{className:"space-y-4 mb-16",children:zEe.map((a,i)=>r.jsxs(ue.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:i*.06},className:"flex items-start gap-6 bg-card border border-border rounded-sm p-6 hover:shadow-md transition-all duration-300",children:[r.jsx("div",{className:"w-14 h-14 bg-primary/10 rounded-sm flex items-center justify-center shrink-0",children:r.jsx("span",{className:"text-primary text-lg font-bold",style:{fontFamily:"'Montserrat', sans-serif"},children:String(i+1).padStart(2,"0")})}),r.jsxs("div",{className:"flex-1",children:[r.jsxs("div",{className:"flex items-baseline justify-between gap-4 mb-1",children:[r.jsx("h4",{className:"text-lg font-bold text-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:a.name}),r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-widest whitespace-nowrap",children:a.region})]}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:a.notes})]})]},a.name))}),r.jsx(fx,{text:"A successful butter chicken depends on balance. Colonel Saab wisely doesn't try to deconstruct it into something unrecognisable."}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:`The restaurant's own Butter Chicken uses boneless chicken in a rich tomato-and-cashew gravy. It is immediately recognisable, deliberately luxurious and almost certainly one of the safest choices for a diner approaching Colonel Saab for the first time. But "safe" should not be interpreted as boring. The best versions make you understand why the dish became globally famous in the first place.`})}),r.jsx(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"my-12 bg-muted/40 border-l-4 border-primary p-8 rounded-sm",children:r.jsxs("div",{className:"flex items-start gap-4",children:[r.jsx(ir,{className:"w-8 h-8 text-primary shrink-0 mt-1"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-bold text-foreground mb-2",style:{fontFamily:"'Montserrat', sans-serif"},children:"The Memsaab Story"}),r.jsx("p",{className:"text-sm text-foreground/70 leading-relaxed mb-3",children:"One of the most attractive details on the menu is Memsaab's Chicken Curry â explicitly inspired by the family story behind the restaurant, with chicken infused with Indian spices and saffron in a lighter cream sauce with sweet spices."}),r.jsx("p",{className:"text-sm text-foreground/70 leading-relaxed",children:"There is also a broader Memsaab's Tasting Menu, presented as Chef Sohan Bhandari's journey through Indian home cooking and regional flavours â an ode to Indian homemakers. For diners who dislike making decisions, this is arguably the most coherent way to understand the kitchen."})]})]})}),r.jsx(Va,{icon:eo,label:"Chapter Four",title:"Breads, Rice and the Details That Matter"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Indian restaurants are often judged by their spectacular dishes when the real test is what happens around them. Bread should arrive hot. Rice should retain definition. Sauces should taste distinct from one another. Accompaniments should provide acidity and contrast rather than act as decoration. That sounds obvious, but it isn't."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Colonel Saab has a broad enough repertoire that restraint becomes important. Order three cream-heavy dishes and the meal can become monotonous no matter how technically competent the kitchen is."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"The best way to eat here is to construct contrast: something grilled, something acidic, something vegetable-led, a regional curry, rice, and bread. That is when the menu begins to make sense as a journey rather than a collection of expensive dishes."})]}),r.jsx(Va,{icon:ir,label:"Chapter Five",title:"Desserts: India Meets the Pastry Kitchen"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Dessert is often where ambitious Indian restaurants make one of two mistakes: either abandon Indian flavour completely in favour of generic chocolate fondants, or become overly theatrical. Colonel Saab largely avoids both."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The dessert menu includes recognisable Indian references such as Rose Gulab Jamun and Rasmalai Milk Cake, while other creations play more freely with modern pastry presentation. The important thing is that saffron, rose, milk, cardamom, pistachio and other familiar Indian dessert signatures do not disappear simply because the dining room is in London."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"After the depth of the savoury menu, something perfumed and relatively delicate is often a wiser finale than simply choosing the richest option available."})]}),r.jsx(Va,{icon:A_,label:"Chapter Six",title:"The Bar: Not an Afterthought"}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-8",children:"Another sign that Colonel Saab considers itself a complete hospitality experience rather than simply a restaurant is the drinks programme. The signature cocktails continue the family narrative."})}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 mb-8",children:WEe.map((a,i)=>r.jsx(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5,delay:i*.1},className:"bg-card border border-border rounded-sm p-5 hover:shadow-md hover:border-primary/20 transition-all duration-300",children:r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(A_,{className:"w-5 h-5 text-primary shrink-0 mt-0.5"}),r.jsxs("div",{children:[r.jsx("h4",{className:"text-sm font-bold text-foreground mb-1",style:{fontFamily:"'Montserrat', sans-serif"},children:a.name}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:a.notes})]})]})},a.name))}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:'It would have been easy for the restaurant to produce gimmicky "Indian-inspired" cocktails by simply putting cardamom into everything. Instead, the better drinks use Indian ingredients as accents.'}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"The current menu also makes the financial territory clear: signature cocktails largely sit around the mid-to-high £15â£20 range, with a discretionary 12.5% service charge added to the bill. Colonel Saab is not pretending to be cheap."})]}),r.jsx(Va,{icon:Pn,label:"Chapter Seven",title:"Service: Hospitality Rather Than Choreography"}),r.jsxs(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"The front of house deserves particular attention because this sort of menu requires staff who actually understand what they are serving. Service at its best here is explanatory without becoming a lecture."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Diners repeatedly mention staff discussing South Indian flavours, explaining unfamiliar dishes and making useful recommendations rather than simply taking orders. Current verified-diner data is notably positive: OpenTable presently scores the Trafalgar Square restaurant 4.6/5 for service, while TheFork's current diner score is 9.1/10 for service."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"That matters. A restaurant can employ exquisite ingredients and spend a fortune on chandeliers, but if a server cannot explain the difference between Chettinad chicken and a Kerala coconut curry, part of the proposition collapses. The strongest service here appears to understand that its role is to help guests navigate."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"What repeatedly comes through is warmth. The restaurant is formal enough for an anniversary dinner, business meal or celebration, but the staff do not generally behave as though formality requires emotional distance. People forgive a restaurant many things if they feel genuinely looked after."})]}),r.jsx(Va,{icon:Pn,label:"Chapter Eight",title:"Value: The One Area Worth Discussing"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Colonel Saab is expensive enough that it needs to be judged as an experience, not merely by the quantity of chicken on a plate. Current starters run from around £12 for chaat into the £20s and £30s for premium grilled dishes. Curries generally occupy the £19â£32 range before rice, bread, drinks and service. Tasting menus move considerably higher."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Several diners identify price as the restaurant's principal weakness. OpenTable's current rating tells the same story numerically: food, service and ambience all score around 4.5â4.6, while value sits lower at 4.1. That feels fair."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"If you approach Colonel Saab looking for the best-value curry near Charing Cross, you are asking the wrong question. You are paying for the room, for central London, for service, for an extensive bar, for ingredients and presentation â and for a restaurant that has invested heavily in creating an environment rather than simply filling a dining room with tables."})]}),r.jsx(fx,{text:"Perhaps the greatest compliment I can give Colonel Saab is that it is difficult to confuse it with anywhere else."}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"London increasingly suffers from restaurant interiors designed from the same Pinterest board: pale stone, boucle chairs, one olive tree, flattering beige lighting and a strategically distressed wall. Colonel Saab wants absolutely nothing to do with beige anonymity."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Its chandeliers sparkle. Its art demands attention. Its bar glows. Its tables sit amongst objects that have stories. There is colour. There is history. There is a little excess. Thank goodness for that."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"Verified diners currently rate the ambience particularly strongly â 9.3/10 on TheFork â and that is probably the restaurant's most immediately understandable strength."})]}),r.jsx(Va,{icon:Pn,label:"Chapter Nine",title:"The Verdict"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Colonel Saab Trafalgar Square succeeds because the food and room are telling the same story. Remove the chandeliers and artwork and the menu still makes sense. Remove the food and you would still have a remarkable collection. But bring them together with informed service and you get something much more persuasive."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"This is not minimalist Indian cooking. It isn't trying to be. It is generous, decorative, aromatic, nostalgic and occasionally extravagant. Some dishes are deliberately familiar; others introduce London diners to regional combinations they may not encounter on a conventional Indian menu."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"And while the pricing will prevent Colonel Saab becoming everyone's weekly neighbourhood restaurant, that isn't really its purpose. This is where you come when dinner itself needs to be part of the occasion. A pre-theatre evening. A birthday. A business dinner where the room needs to make an impression. A long lunch. Or simply that increasingly rare London experience of walking through a restaurant door and immediately realising somebody has actually had an idea."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"Colonel Saab is a love letter to India, but importantly, it is
910written in a recognisable voice of its own."})]}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"grid grid-cols-1 md:grid-cols-2 gap-6 mb-12",children:[r.jsxs("div",{className:"bg-secondary text-secondary-foreground rounded-sm p-6",children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] mb-3 block",children:"Best For"}),r.jsx("p",{className:"text-sm text-secondary-foreground/70 leading-relaxed",children:"Special occasions, pre-theatre dining, date nights, business dinners and diners wanting to explore regional Indian cooking in an impressive setting."})]}),r.jsxs("div",{className:"bg-secondary text-secondary-foreground rounded-sm p-6",children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] mb-3 block",children:"Don't Miss"}),r.jsx("p",{className:"text-sm text-secondary-foreground/70 leading-relaxed",children:"Chaat to start, one of the tandoor dishes, a regional curry rather than ordering only familiar favourites, and enough time before dinner to actually look around the room."})]})]}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"text-center py-8 border-y border-border mb-12",children:[r.jsx("p",{className:"text-sm font-bold uppercase tracking-[0.2em] text-primary mb-1",children:"Chelsea Monthly"}),r.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-widest",children:"Reviews & Dining · The Indian Issue"})]}),r.jsx("div",{className:"text-center",children:r.jsxs(se,{to:"/Articles",className:"inline-flex items-center gap-2 text-primary font-bold text-xs uppercase tracking-[0.2em] hover:gap-3 transition-all",children:[r.jsx(_t,{className:"w-4 h-4 rotate-180"})," More Reviews & Stories"]})})]}),r.jsx("section",{className:"bg-foreground text-background py-20",children:r.jsx("div",{className:"max-w-4xl mx-auto px-6",children:r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-start",children:[r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] mb-4 block",children:"The Verdict"}),r.jsx("h2",{className:"text-3xl font-bold mb-6 leading-tight",style:{fontFamily:"'Montserrat', sans-serif"},children:"A love letter to India, written in a recognisable voice of its own."}),r.jsx("p",{className:"text-background/70 leading-relaxed mb-8",children:"Colonel Saab Trafalgar Square succeeds because the food and room are telling the same story. It is generous, decorative, aromatic, nostalgic and occasionally extravagant â and while the pricing will prevent it becoming everyone's weekly neighbourhood restaurant, that isn't really its purpose. This is where you come when dinner itself needs to be part of the occasion."}),r.jsxs("div",{className:"flex items-center gap-4 pt-6 border-t border-background/20",children:[r.jsxs("div",{className:"flex gap-0.5",children:[r.jsx(rt,{className:"w-6 h-6 fill-primary text-primary"}),r.jsx(rt,{className:"w-6 h-6 fill-primary text-primary"}),r.jsx(rt,{className:"w-6 h-6 fill-primary text-primary"}),r.jsx(rt,{className:"w-6 h-6 fill-primary text-primary"}),r.jsxs("div",{className:"relative",children:[r.jsx(rt,{className:"w-6 h-6 text-background/20"}),r.jsx("div",{className:"absolute inset-0 overflow-hidden",style:{width:"60%"},children:r.jsx(rt,{className:"w-6 h-6 fill-primary text-primary"})})]})]}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-background font-bold text-sm",children:"4.6 / 5"}),r.jsx("span",{className:"text-background/50 text-xs uppercase tracking-widest mt-0.5",children:"Overall Rating"})]})]})]}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.15},className:"bg-background/5 border border-background/10 rounded-sm p-8 backdrop-blur-sm",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[r.jsx("div",{className:"w-12 h-12 bg-primary rounded-sm flex items-center justify-center",children:r.jsx(Ft,{className:"w-6 h-6 text-primary-foreground"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-xl font-bold text-background",style:{fontFamily:"'Montserrat', sans-serif"},children:"Colonel Saab Trafalgar Square"}),r.jsx("span",{className:"text-background/50 text-xs uppercase tracking-widest",children:"Trafalgar Square · Central London"})]})]}),r.jsxs("div",{className:"space-y-4 text-sm",children:[r.jsxs("div",{className:"flex items-start gap-3",children:[r.jsx(Ft,{className:"w-4 h-4 text-primary shrink-0 mt-0.5"}),r.jsxs("span",{className:"text-background/80",children:["40â42 William IV Street",r.jsx("br",{}),"London WC2N 4DD"]})]}),r.jsxs("div",{className:"flex items-center gap-3 pt-4 border-t border-background/10",children:[r.jsx(Vt,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("span",{className:"text-background/80",children:"020 8016 6800"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(eo,{className:"w-4 h-4 text-primary shrink-0"}),r.jsx("span",{className:"text-background/80",children:"[email protected]"})]})]}),r.jsxs("a",{href:"https://www.colonelsaab.co.uk",target:"_blank",rel:"noopener noreferrer",className:"mt-8 w-full inline-flex items-center justify-center gap-2 bg-primary text-primary-foreground font-bold text-xs uppercase tracking-[0.2em] px-6 py-3 hover:bg-primary/90 transition-colors rounded-sm",children:["Reserve a Table ",r.jsx(_t,{className:"w-4 h-4"})]})]})]})})}),e&&r.jsx("section",{className:"bg-background py-16 border-t border-border",children:r.jsx("div",{className:"max-w-3xl mx-auto px-6",children:r.jsx(su,{articleId:e.id,articleDate:e.published_date,customSeeded:FEe})})})]})}const YEe="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/be2120e4c_JohnShepherdandthejudgesMarkWoganandAliceRyan.jpeg",XEe=[{name:"John Shepherd",role:"Owner & Managing Director, Partridge's",notes:"Royal Warrant holder and host of the World Chelsea Bun Awards at the Gloucester Road Autumn Street Festival."},{name:"Mark Wogan",role:"Former Chef, Food Business Owner & TV/Radio Presenter",notes:"Wowed by Sian's raspberry, pistachio and chocolate Chelsea Bun â a thoroughly modern makeover for the 300-year-old Royal favourite."},{name:"Alice Ryan",role:"Senior Editor, Velvet Magazine",notes:"Brought the lifestyle editorial lens to the judging panel, assessing look and taste credentials."}],JEe=[{icon:sk,label:"Prize",value:"£250 + Title"},{icon:Jt,label:"Date",value:"Sunday 20 September 2026"},{icon:Ft,label:"Location",value:"Gloucester Road 'North' Autumn Street Festival"},{icon:Pn,label:"Year",value:"8th Annual Awards"}
910],QEe=[{name:"The Drury Tea & Coffee Company",url:"www.drurycoffee.com"},{name:"Potion De Vie",url:"www.potiondev.co.uk"}];function bh({icon:e,label:t,title:n}){return r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-10",children:[r.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[r.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-sm flex items-center justify-center",children:r.jsx(e,{className:"w-6 h-6 text-primary"})}),r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em]",children:t})]}),r.jsx("h2",{className:"text-3xl sm:text-4xl font-bold text-foreground leading-tight",style:{fontFamily:"'Montserrat', sans-serif"},children:n})]})}function ZEe({text:e}){return r.jsxs(ue.blockquote,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.6},className:"my-12 relative pl-8 border-l-4 border-primary",children:[r.jsx("span",{className:"absolute -left-3 -top-2 text-4xl text-primary/20 font-serif",children:'"'}),r.jsx("p",{className:"text-2xl font-light italic text-foreground leading-relaxed",style:{fontFamily:"'Montserrat', sans-serif"},children:e})]})}function ePe(){const[e,t]=j.useState(null),[n,s]=j.useState(!1),[a,i]=j.useState(!1),[o,l]=j.useState(!0),[c,u]=j.useState(()=>localStorage.getItem("member_email")||""),[m,f]=j.useState(!1),[p,b]=j.useState("");j.useEffect(()=>{window.scrollTo(0,0),W.entities.Article.filter({slug:"sian-crowned-best-chelsea-bun-maker-2026"}).then(y=>t((y==null?void 0:y[0])||null)).catch(()=>{}),(async()=>{try{const y=await W.auth.me().catch(()=>null);if((y==null?void 0:y.role)==="admin"){i(!0),l(!1);return}const w=(y==null?void 0:y.email)||localStorage.getItem("member_email");if(!w){i(!1),l(!1);return}const N=await W.functions.invoke("getSubscriptionStatus",{email:w}),S=(N==null?void 0:N.status)==="active"&&((N==null?void 0:N.membership_level)==="digital"||(N==null?void 0:N.membership_level)==="print_digital");i(S),l(!1)}catch{i(!1),l(!1)}})()},[]);const v=async()=>{var w,N;if(!c.trim()){b("Please enter your email address.");return}b(""),f(!0);const g=window.self!==window.top,y=g?window.open("","_blank"):null;if(g&&!y){f(!1),b("Please allow popups to continue to checkout.");return}y&&(y.opener=null);try{const S=await W.functions.invoke("createCheckoutSession",{membership_level:"digital",email:c.trim(),return_url:window.location.href}),A=(S==null?void 0:S.url)||((w=S==null?void 0:S.data)==null?void 0:w.url);if(!A)throw new Error((S==null?void 0:S.error)||((N=S==null?void 0:S.data)==null?void 0:N.error)||"Checkout failed â no URL returned. Please try again.");localStorage.setItem("member_email",c.trim()),y?y.location.replace(A):window.location.assign(A)}catch(S){y==null||y.close(),f(!1),b((S==null?void 0:S.message)||"Checkout failed. Please try again.")}};return r.jsxs("article",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"relative h-[80vh] min-h-[560px] w-full overflow-hidden",children:[r.jsx("img",{src:YEe,alt:"Judges John Shepherd, Mark Wogan and Alice Ryan at the World Chelsea Bun Awards 2026",className:"absolute inset-0 w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-foreground via-foreground/55 to-foreground/25"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-foreground
910/45 to-transparent"}),r.jsxs("div",{className:"relative z-10 h-full flex flex-col justify-between max-w-5xl mx-auto px-6 py-10",children:[r.jsx(ue.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.6},children:r.jsxs(se,{to:"/Articles",className:"text-background/60 text-xs font-bold uppercase tracking-[0.2em] hover:text-primary transition-colors flex items-center gap-2",children:[r.jsx("span",{className:"w-8 h-px bg-primary"})," Chelsea Monthly · Local News"]})}),r.jsxs(ue.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8,delay:.2},className:"max-w-3xl",children:[r.jsxs("span",{className:"inline-flex items-center gap-2 bg-primary text-primary-foreground text-[10px] font-bold px-3 py-1.5 uppercase tracking-[0.2em] mb-6",children:[r.jsx(Lt,{className:"w-3 h-3"})," Chelsea Community · Award Winner"]}),r.jsx("h1",{className:"text-3xl sm:text-5xl lg:text-6xl font-bold text-background leading-[1.05] mb-6 drop-shadow-2xl",style:{fontFamily:"'Montserrat', sans-serif"},children:"Sian Crowned Best Chelsea Bun Maker 2026"}),r.jsx("p",{className:"text-background/70 text-lg font-light max-w-2xl leading-relaxed mb-8 border-l-2 border-primary pl-4",children:"The World Chelsea Bun Awards returns for its eighth year â and a thoroughly modern raspberry, pistachio and chocolate creation takes the crown at Partridges of Kensington."}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 rounded-full bg-primary/20 border-2 border-primary/50 flex items-center justify-center text-background font-bold text-sm",children:"CM"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-background text-sm font-semibold tracking-wide",children:"Chelsea Monthly"}),r.jsx("span",{className:"text-background/50 text-[10px] uppercase tracking-widest",children:"Local News · 29 September 2026"})]})]}),r.jsx("div",{className:"h-8 w-px bg-background/20 hidden sm:block"}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-background/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Vt,{className:"w-4 h-4 text-primary"})," 6 min read"]}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-background/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Nr,{className:"w-4 h-4 text-primary"})," 14.2K views"]})]})]})]})]}),r.jsx("div",{className:"sticky top-0 z-40 bg-background/95 backdrop-blur-md border-b border-border shadow-sm",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-3 flex items-center justify-between",children:[r.jsx("span",{className:"font-bold text-foreground uppercase tracking-widest text-[10px]",children:"Best Chelsea Bun Maker 2026"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>s(!n),className:`flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide transition-all rounded-sm ${n?"bg-primary text-primary-foreground":"bg-muted text-muted-foreground hover:bg-primary/10"}`,children:[r.jsx(ga,{className:`w-3.5 h-3.5 ${n?"fill-current":""}`})," Save"]}),r.jsxs("button",{className:"flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide bg-muted text-muted-foreground hover:bg-primary/10 transition-all rounded-sm",children:[r.jsx(ws,{className:"w-3.5 h-3.5"})," Share"]})]})]})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-16",children:[r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsx("p",{className:"text-lg leading-relaxed text-foreground mb-6 first-letter:text-7xl first-letter:font-bold first-letter:text-primary first-letter:mr-2 first-letter:float-left first-letter:leading-[0.8]",style:{fontFamily:"'Montserrat', sans-serif"},children:"Sunday 20th September witnessed the final of the other important Bake-Off of the Year."})}),o?r.jsx("div",{className:"flex items-center justify-center py-12",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})}):a?r.jsxs(r.Fragment,{children:[r.jsx(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"grid grid-cols-2 md:grid-cols-4 gap-4 my-12",children:JEe.map((g,y)=>r.jsxs("div",{className:"bg-card border border-border rounded-sm p-4 text-center",children:[r.jsx(g.icon,{className:"w-6 h-6 text-primary mx-auto mb-2"}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest text-muted-foreground block",children:g.label}),r.jsx("span",{className:"text-sm font-semibold text-foreground block mt-1",children:g.value})]},g.label))}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"Sian Magee from London was crowned Best Chelsea Bun Maker 2026 at the World Chelsea Bun Awards, hosted by Royal Warrant holder Partridges of Kensington. The iconic Chelsea Bun is the only bun in the world to be granted a Royal Warrant, and Sian wowed the judges â including former chef, food business owner and TV/radio presenter Mark Wogan â with her delectable raspberry, pistachio and chocolate Chelsea Bun, affording the over 300-year-old Royal favourite with a thoroughly modern makeover."})}),r.jsx(bh,{icon:sk,label:"Chapter One",title:"The World Chelsea Bun Awards"}),r.jsxs(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:`The awards â now in their eighth year â celebrate the legendary British treat, pitting baking enthusiasts against each other to create the ultimate spiced bun. This year's cooks aspired to deliver a bake befitting the title "Traditional Chelsea Buns Meet Innovation."`}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"Judging took place at the Gloucester Road 'North' Autumn Street Festival on Sunday 20 September, which celebrated local businesses and enabled visitors to sample and buy delicious food and drinks from an array of stallholders."})]}),r.jsx(ZEe,{text:"The iconic Chelsea Bun is the only bun in the world to be granted a Royal Warrant â and Sian gave the 300-year-old favourite a thoroughly modern makeover."}),r.jsx(bh,{icon:eo,label:"Chapter Two",title:"The Judges"}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-8",children:"The judges based their decision on the look and, of course, taste credentials of the buns. The panel brought together food retail, broadcasting and lifestyle editorial expertise."})}),r.jsx("div",{className:"space-y-4 mb-16",children:XEe.map((g,y)=>r.jsxs(ue.div,{initial:{opacity:0,x:-20},whileInView:{opacity:1,x:0},viewport:{once:!0},transition:{duration:.5,delay:y*.08},className:"flex items-start gap-6 bg-card border border-border rounded-sm p-6 hover:shadow-md transition-all duration-300",children:[r.jsx("div",{className:"w-14 h-14 bg-primary/10 rounded-sm flex items-center justify-center shrink-0",children:r.jsx("span",{className:"text-primary text-lg font-bold",style:{fontFamily:"'Montserrat', sans-serif"},children:String(y+1).padStart(2,"0")})}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"text-lg font-bold text-foreground mb-1",style:{fontFamily:"'Montserrat', sans-serif"},children:g.name}),r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-widest block mb-3",children:g.role}),r.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:g.notes})]})]},g.name))}),r.jsx(bh,{icon:Lt,label:"Chapter Three",title:"The Winner"}),r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-12 bg-secondary text-secondary-foreground rounded-sm p-8 md:p-12",children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.2em] mb-3 block",children:"Best Chelsea Bun Baker 2026"}),r.jsx("h3",{className:"text-3xl font-bold text-secondary-foreground mb-4",style:{fontFamily:"'Montserrat', sans-serif"},children:"Sian Magee"}),r.jsx("p",{className:"text-base leading-relaxed text-secondary-foreground/70 mb-6",children:"As the overall winner of the competition, Sian received a £250 prize and the prestigious accolade of Best Chelsea Bun Baker 2026. Her winning creation â a raspberry, pistachio and chocolate Chelsea Bun â brought a thoroughly modern makeover to the 300-year-old Royal favourite."}),r.jsxs("div",{className:"flex items-center gap-3 pt-6 border-t border-secondary-foreground/10",children:[r.jsx(ir,{className:"w-5 h-5 text-primary"}),r.jsx("span",{className:"text-sm font-semibold text-secondary-foreground",children:"Raspberry · Pistachio · Chocolate"})]})]}),r.jsx(bh,{icon:Ft,label:"Chapter Four",title:"Guests & Community"}),r.jsxs(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},children:[r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"Guests included Councillor Janet Evans, Mayor of the Royal Borough of Kensington and Chelsea, who joined the celebration of local businesses at the Gloucester Road Autumn Street Festival."}),r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-12",children:"The festival celebrated local businesses, enabling visitors to sample and buy delicious food and drinks from an array of stallholders â a fitting backdrop for an award that honours one of Britain's most beloved baked traditions."})]}),r.jsx(bh,{icon:On,label:"Chapter Five",title:"Charity & Sponsors"}),r.jsx(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"mb-8",children:r.jsx("p",{className:"text-base leading-relaxed text-foreground/80 mb-6",children:"All entrants were invited to make a donation to Partridges' chosen charity, React, which provides rapid, effective assistance to children with life-limiting illnesses who are living in the UK in financially disadvantaged households."})}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-12",children:QEe.map(g=>r.jsxs(ue.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:"bg-card border border-border rounded-sm p-6",children:[r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-widest mb-2 block",children:"Sponsor"}),r.jsx("h4",{className:"text-lg font-bold text-foreground mb-2",style:{fontFamily:"'Montserrat', sans-serif"},children:g.name}),r.jsx("span",{className:"text-sm text-muted-foreground",children:g.url})]},g.name))}),r.jsx(ue.div,{initial:{opacity:0}
910,whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"bg-muted/40 border-l-4 border-primary p-6 rounded-sm mb-12",children:r.jsxs("div",{className:"flex items-start gap-4",children:[r.jsx(On,{className:"w-8 h-8 text-primary shrink-0 mt-1"}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-bold text-foreground mb-2",style:{fontFamily:"'Montserrat', sans-serif"},children:"React Charity"}),r.jsxs("p",{className:"text-sm text-foreground/70 leading-relaxed",children:["React provides rapid, effective assistance to children with life-limiting illnesses living in the UK in financially disadvantaged households. Visit ",r.jsx("span",{className:"text-primary font-semibold",children:"www.reactcharity.org"})," to learn more or donate."]})]})]})}),r.jsxs(ue.div,{initial:{opacity:0},whileInView:{opacity:1},viewport:{once:!0},transition:{duration:.6},className:"text-center py-8 border-y border-border mb-12",children:[r.jsx("p",{className:"text-sm font-bold uppercase tracking-[0.2em] text-primary mb-1",children:"Chelsea Monthly"}),r.jsx("p",{className:"text-xs text-muted-foreground uppercase tracking-widest",children:"Local News · The Chelsea Issue"})]}),r.jsx("div",{className:"text-center",children:r.jsxs(se,{to:"/Articles",className:"inline-flex items-center gap-2 text-primary font-bold text-xs uppercase tracking-[0.2em] hover:gap-3 transition-all",children:[r.jsx("span",{className:"w-8 h-px bg-primary"})," More Chelsea Monthly Stories"]})})]}):r.jsx("div",{className:"relative min-h-[200px]",children:r.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-40 bg-gradient-to-t from-background via-background/90 to-transparent pointer-events-none"})})]}),!o&&!a&&r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-foreground
910/60 backdrop-blur-sm",children:r.jsxs(ue.div,{initial:{opacity:0,scale:.92,y:20},animate:{opacity:1,scale:1,y:0},transition:{duration:.4,ease:"easeOut"},className:"relative w-full max-w-md bg-secondary text-secondary-foreground rounded-lg shadow-2xl overflow-hidden",children:[r.jsx("div",{className:"h-1.5 bg-primary"}),r.jsxs("div",{className:"p-8 md:p-10 text-center",children:[r.jsx("div",{className:"w-16 h-16 bg-primary/15 rounded-full flex items-center justify-center mx-auto mb-5",children:r.jsx(ba,{className:"w-8 h-8 text-primary"})}),r.jsx("span",{className:"text-primary text-[10px] font-bold uppercase tracking-[0.25em] block mb-3",children:"Chelsea Club Members Only"}),r.jsx("h3",{className:"text-2xl md:text-3xl font-bold text-secondary-foreground mb-3",style:{fontFamily:"'Montserrat', sans-serif"},children:"Unlock the Full Story"}),r.jsx("p",{className:"text-secondary-foreground/60 leading-relaxed text-sm max-w-sm mx-auto mb-7",children:"Who judged the awards? What was the winning creation? Subscribe for unlimited access to local news, reviews and features."}),r.jsx("div",{className:"mb-4",children:r.jsx("input",{type:"email",value:c,onChange:g=>u(g.target.value),placeholder:"Enter your email",disabled:m,className:"w-full bg-background/10 border border-secondary-foreground/15 text-secondary-foreground placeholder-secondary-foreground/40 rounded-md px-4 py-3 text-sm focus:outline-none focus:ring-2 focus:ring-primary focus:border-primary"})}),p&&r.jsx("p",{className:"text-red-400 text-xs mb-4",children:p}),r.jsx("button",{onClick:v,disabled:m,className:"w-full inline-flex items-center justify-center gap-2 bg-primary text-primary-foreground font-bold text-sm uppercase tracking-[0.15em] px-8 py-4 hover:bg-primary/90 transition-colors rounded-md disabled:opacity-60 disabled:cursor-not-allowed mb-3",children:m?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"w-4 h-4 border-2 border-primary-foreground border-t-transparent rounded-full animate-spin"})," Processing..."]}):r.jsxs(r.Fragment,{children:[r.jsx(Lt,{className:"w-4 h-4"})," Subscribe â $9.99/month"]})}),r.jsx(se,{to:"/membership",className:"inline-flex items-center justify-center gap-2 text-secondary-foreground/50 hover:text-primary font-bold text-xs uppercase tracking-[0.15em] transition-colors",children:"View all plans"}),r.jsxs("div",{className:"flex flex-wrap justify-center gap-x-5 gap-y-2 text-xs text-secondary-foreground/40 pt-6 mt-6 border-t border-secondary-foreground/10",children:[r.jsx("span",{children:"â Cancel anytime"}),r.jsx("span",{children:"â Full archive access"}),r.jsx("span",{children:"â Member-only content"})]})]})]})}),e&&a&&r.jsx("section",{className:"bg-background py-16 border-t border-border",children:r.jsx("div",{className:"max-w-3xl mx-auto px-6",children:r.jsx(su,{articleId:e.id,articleDate:e.published_date})})})]})}const tPe="https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/7da9191e5_chelseamonthly_com_Logo-170_4e352c8f.png";function ML(e){return new Promise((t,n)=>{const s=new Image;s.crossOrigin="anonymous";const a=setTimeout(()=>n(new Error("Image took too long to load")),15e3);s.onload=()=>{clearTimeout(a),t(s)},s.onerror=()=>{clearTimeout(a),n(new Error("Could not load image"))},s.src=e})}const rPe=j.forwardRef(function({imageSrc:t,className:n},s){const a=j.useRef(null),i=j.useRef(!1),[o,l]=j.useState("idle"),[c,u]=j.useState("");return j.useEffect(()=>{if(!t){i.current=!1,l("idle");return}let m=!1;return l("loading"),u(""),i.current=!1,(async()=>{try{const[f,p]=await Promise.all([ML(t),ML(tPe)]);if(m)return;const b=a.current;if(!b)return;const v=1080,g=1350;let y=f.naturalWidth||1080,w=f.naturalHeight||1080;const N=Math.min(v/y,g/w,1);y=Math.max(1,Math.round(y*N)),w=Math.max(1,Math.round(w*N)),b.width=y,b.height=w;const S=b.getContext("2d");S.drawImage(f,0,0,y,w);const A=Math.round(w*.16),k=S.createLinearGradient(0,w-A,0,w);k.addColorStop(0,"rgba(0,0,0,0)"),k.addColorStop(1,"rgba(0,0,0,0.62)"),S.fillStyle=k,S.fillRect(0,w-A,y,A);const C=Math.round(A*.5),T=(p.naturalWidth||1)/(p.naturalHeight||1),P=Math.round(C*T),R=Math.round(w*.03);S.drawImage(p,R,w-C-R,P,C),i.current=!0,l("ready")}catch(f){m||(u((f==null?void 0:f.message)||"Could not prepare branded image"),l("error"))}})(),()=>{m=!0}},[t]),j.useImperativeHandle(s,()=>({ready:()=>i.current,getBlob:()=>new Promise((m,f)=>{const p=a.current;
910if(!p||!i.current)return f(new Error("Image is not ready yet"));p.toBlob(b=>{b?m(b):f(new Error("Could not export branded image (image may be cross-origin protected)"))},"image/jpeg",.92)})})),r.jsxs("div",{className:n,children:[o==="error"?r.jsx("div",{className:"flex items-center justify-center h-64 border border-red-200 bg-red-50 rounded-sm text-red-600 text-sm px-4 text-center",children:c}):o==="loading"?r.jsx("div",{className:"flex items-center justify-center h-64 border border-border rounded-sm",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})}):null,r.jsx("canvas",{ref:a,className:"w-full h-auto rounded-sm border border-border bg-muted",style:{display:o==="ready"?"block":"none"}})]})}),RL={Fashion:["#fashion","#style","#luxuryfashion"],Travel:["#travel","#luxurytravel","#destination"],Food:["#food","#dining","#restaurant"],Restaurants:["#restaurants","#dining","#londonrestaurants"],Hotels:["#hotels","#luxuryhotels","#travel"],Property:["#property","#realestate","#londonproperty"],Watches:["#watches","#luxurywatches","#horology"],Yachts:["#yachts","#luxuryyachts","#superyacht"],Motoring:["#cars","#motoring","#luxurycars"],Business:["#business","#entrepreneur","#leadership"],Culture:["#culture","#arts","#londonculture"],Lifestyle:["#lifestyle","#luxurylifestyle"],Local:["#chelsea","#kensington","#london"],Reviews:["#review","#londonreviews"]},nPe=["#chelseamonthly","#london","#luxury"];function sPe(e){const n=Object.keys(RL).find(a=>e&&e.toLowerCase().includes(a.toLowerCase())),s=n?RL[n]:[];return[...new Set([...s,...nPe])].join(" ")}const aPe="https://www.chelseamonthly.com";function iPe(e){var a;if(!e)return"";const t=`${aPe}${bn(e)}`,n=(e.excerpt||"").trim(),s=sPe(e.category);return[(a=e.title)==null?void 0:a.trim(),n?` 911${n}`:"",` 912 913${s}`,` 914 915Read the full story: ${t}`].join("")}function oPe(){const e=ka(),t=j.useRef(null),[n,s]=j.useState(null),[a,i]=j.useState(!1),[o,l]=j.useState("article"),[c,u]=j.useState([]),[m,f]=j.useState(""),[p,b]=j.useState(""),[v,g]=j.useState(null),[y,w]=j.useState(""),[N,S]=j.useState(!1),[A,k]=j.useState(0),[C,T]=j.useState(null),[P,R]=j.useState(""),M=j.useMemo(()=>c.find(L=>L.id===p)||null,[c,p]),D=o==="article"?M==null?void 0:M.image_url:v;j.useEffect(()=>{W.auth.me().then(L=>{s(L),i(!0),(L==null?void 0:L.role)!=="admin"&&e("/login")}).catch(()=>{i(!0),e("/login")})},[e]),j.useEffect(()=>{(n==null?void 0:n.role)==="admin"&&W.entities.Article.filter({},{sort:"-published_date",limit:100,fields:["title","slug","category","excerpt","image_url","published_date"]}).then(L=>u((L==null?void 0:L.items)||[])).catch(()=>{})},[n]),j.useEffect(()=>{o==="article"&&M&&(w(iPe(M)),T(null),R(""))},[p,o]);const $=j.useMemo(()=>{const L=m.trim().toLowerCase();return L?c.filter(F=>(F.title||"").toLowerCase().includes(L)).slice(0,50):c.slice(0,50)},[c,m]),q=L=>{if(L){if(!L.type.startsWith("image/")){R("Please choose an image file.");return}g(URL.createObjectURL(L)),T(null),R(""),y||w("")}},H=async()=>{var Y,U,re,G,B;if(R(""),T(null),!y.trim()){R("Add a caption before posting.");return}if(!D){R(o==="article"?"Select an article first.":"Choose an image first.");return}if(!((Y=t.current)!=null&&Y.ready())){R("The branded image is still preparing â try again in a moment.");return}S(!0),k(0);const L=setInterval(()=>k(z=>z<2?z+1:z),2500),F=(z,he,fe)=>Promise.race([z,new Promise((be,xe)=>setTimeout(()=>xe(new Error(`${fe} timed out â please try again.`)),he))]);try{const z=await F(t.current.getBlob(),15e3,"Image preparation");k(1);const he=new File([z],`chelsea-monthly-${Date.now()}.jpg`,{type:"image/jpeg"}),fe=await F(W.integrations.Core.UploadPublicFile({file:he}),3e4,"Image upload"),be=fe==null?void 0:fe.file_url;if(!be)throw new Error("Image upload failed â no URL returned.");k(2);const xe=await F(W.functions.invoke("postToInstagram",{image_url:be,caption:y}),6e4,"Instagram publishing"),pe=(xe==null?void 0:xe.data)||xe;if(!(pe!=null&&pe.success))throw new Error((pe==null?void 0:pe.message)||(pe==null?void 0:pe.error)||"Instagram did not confirm the post.");T({success:!0,media_id:pe.media_id})}catch(z){const he=((re=(U=z==null?void 0:z.response)==null?void 0:U.data)==null?void 0:re.message)||((B=(G=z==null?void 0:z.response)==null?void 0:G.data)==null?void 0:B.error)||(z==null?void 0:z.message)||"Something went wrong posting to Instagram.";R(he)}finally{clearInterval(L),S(!1)}};return a?n&&n.role!=="admin"?null:r.jsx("div",{className:"min-h-screen bg-background",children:r.jsxs("div",{className:"max-w-5xl mx-auto px-6 py-10",children:[r.jsxs("button",{onClick:()=>
915e("/admin/dashboard"),className:"inline-flex items-center gap-2 text-xs font-bold uppercase tracking-widest text-muted-foreground hover:text-primary transition-colors mb-6",children:[r.jsx(Ct,{className:"w-3.5 h-3.5"})," Admin Dashboard"]}),r.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[r.jsx("div",{className:"w-12 h-12 bg-primary/10 rounded-sm flex items-center justify-center",children:r.jsx(uo,{className:"w-6 h-6 text-primary"})}),r.jsxs("div",{children:[r.jsx("h1",{className:"text-3xl font-bold text-foreground",style:{fontFamily:"'Montserrat', sans-serif"},children:"Instagram Studio"}),r.jsx("p",{className:"text-muted-foreground text-sm",children:"Post branded content directly to Chelsea Monthly's Instagram."})]})]}),r.jsxs("div",{className:"inline-flex border border-border rounded-sm overflow-hidden mt-6 mb-8",children:[r.jsxs("button",{onClick:()=>{l("article"),T(null),R("")},className:`flex items-center gap-2 px-5 py-2.5 text-xs font-bold uppercase tracking-widest transition-colors ${o==="article"?"bg-primary text-primary-foreground":"bg-background text-muted-foreground hover:text-foreground"}`,children:[r.jsx(Rn,{className:"w-3.5 h-3.5"})," From Article"]}),r.jsxs("button",{onClick:()=>{l("custom"),T(null),R("")},className:`flex items-center gap-2 px-5 py-2.5 text-xs font-bold uppercase tracking-widest transition-colors ${o==="custom"?"bg-primary text-primary-foreground":"bg-background text-muted-foreground hover:text-foreground"}`,children:[r.jsx(Xm,{className:"w-3.5 h-3.5"})," Custom Post"]})]}),r.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8",children:[r.jsxs("div",{children:[o==="article"?r.jsxs("div",{children:[r.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-widest text-muted-foreground mb-2",children:"Search articles"}),r.jsxs("div",{className:"relative mb-3",children:[r.jsx(dn,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),r.jsx("input",{value:m,onChange:L=>f(L.target.value),placeholder:"Search by titleâ¦",className:"w-full border border-input rounded-sm pl-9 pr-3 py-2 text-sm bg-background focus:outline-none focus:ring-1 focus:ring-primary"})]}),r.jsxs("div",{className:"border border-border rounded-sm max-h-72 overflow-y-auto divide-y divide-border",children:[$.length===0&&r.jsx("div",{className:"px-4 py-6 text-sm text-muted-foreground text-center",children:"No articles found."}),$.map(L=>r.jsxs("button",{onClick:()=>b(L.id),className:`w-full text-left px-4 py-3 flex items-center gap-3 transition-colors ${p===L.id?"bg-primary/10":"hover:bg-muted"}`,children:[L.image_url&&r.jsx("img",{src:L.image_url,alt:"",className:"w-10 h-10 object-cover rounded-sm flex-shrink-0"}),r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-sm font-semibold text-foreground truncate",children:L.title}),r.jsx("div",{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:L.category})]})]},L.id))]})]}):r.jsxs("div",{children:[r.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-widest text-muted-foreground mb-2",children:"Upload image"}),r.jsxs("label",{className:"flex flex-col items-center justify-center border-2 border-dashed border-border rounded-sm h-64 cursor-pointer hover:border-primary transition-colors",children:[v?r.jsx("img",{src:v,alt:"Preview",className:"max-h-full max-w-full object-contain"}):r.jsxs("div",{className:"text-center px-6",children:[r.jsx(Jm,{className:"w-8 h-8 text-muted-foreground mx-auto mb-3"}),r.jsx("span",{className:"text-sm text-muted-foreground",children:"Click to choose an image"}),r.jsx("span",{className:"block text-[10px] text-muted-foreground mt-1",children:"JPG or PNG â Instagram-friendly ratio"})]}),r.jsx("input",{type:"file",accept:"image/*",className:"hidden",onChange:L=>{var F;return q((F=L.target.files)==null?void 0:F[0])}})]})]}),r.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-widest text-muted-foreground mt-6 mb-2",children:"Caption"}),r.jsx("textarea",{value:y,onChange:L=>w(L.target.value),rows:8,placeholder:"Write your captionâ¦",className:"w-full border border-input rounded-sm px-3 py-2 text-sm bg-background focus:outline-none focus:ring-1 focus:ring-primary resize-none"}),r.jsxs("div",{className:"text-[10px] text-muted-foreground mt-1 text-right",children:[y.length,"/2200"]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-widest text-muted-foreground mb-2",children:"Branded preview"}),r.jsx(rPe,{ref:t,imageSrc:D}),r.jsxs("div",{className:"mt-3 flex items-start gap-2 text-[11px] text-muted-foreground bg-muted/40 border border-border rounded-sm p-3",children:[r.jsx(ir,{className:"w-3.5 h-3.5 text-primary flex-shrink-0 mt-0.5"}),r.jsx("span",{children:"The Chelsea Monthly logo is composited onto y
915our photo. This is a real photo with a brand watermark â not AI-generated â so it posts as a standard image."})]}),r.jsx("button",{onClick:H,disabled:N||!D,className:"w-full mt-5 inline-flex items-center justify-center gap-2 bg-primary text-primary-foreground font-bold text-sm uppercase tracking-widest px-6 py-3.5 hover:bg-primary/90 transition-colors rounded-sm disabled:opacity-50 disabled:cursor-not-allowed",children:N?r.jsxs(r.Fragment,{children:[r.jsx("div",{className:"w-4 h-4 border-2 border-primary-foreground border-t-transparent rounded-full animate-spin"}),["Preparing branded imageâ¦","Uploading imageâ¦","Publishing to Instagramâ¦"][A]]}):r.jsxs(r.Fragment,{children:[r.jsx(i8,{className:"w-4 h-4"})," Post to Instagram"]})}),P&&r.jsxs("div",{className:"mt-4 flex items-start gap-2 text-sm text-red-600 bg-red-50 border border-red-200 rounded-sm p-3",children:[r.jsx(Ln,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),r.jsx("span",{children:P})]}),(C==null?void 0:C.success)&&r.jsxs("div",{className:"mt-4 flex items-start gap-2 text-sm text-green-700 bg-green-50 border border-green-200 rounded-sm p-3",children:[r.jsx(uy,{className:"w-4 h-4 flex-shrink-0 mt-0.5"}),r.jsx("span",{children:"Posted successfully to Instagram. It may take a few moments to appear on your profile."})]})]})]})]})}):r.jsx("div",{className:"flex items-center justify-center min-h-screen",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-primary rounded-full animate-spin"})})}const jh={hero:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/66c190f19_NOAHSARK1.jpeg",carPortrait:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/b0b80fde4_NOAHSARK2.jpeg",kitchenToast:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/5aa43d80c_Campaign2.jpeg",bedLaugh:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/6bf684283_Campaign.jpeg",founder:"https://media.base44.com/images/public/6a1b3d1716f08dd8678a631f/3a12577aa_Founder.jpeg"},lPe=[{num:"01",title:"Meet Natasha Hunt"},{num:"02",title:"Beyond the Bedroom"},{num:"03",title:"Noah's Ark & Gift of God"},{num:"04",title:"Affordable Luxury"},{num:"05",title:"Building the Brand Herself"},{num:"06",title:"A Family Affair"},{num:"07",title:"Who Is the NAKED WITHOUT Woman?"},{num:"08",title:"Made in London Spirit"},{num:"09",title:"What Comes Next"}];function Fi({num:e,title:t}){return r.jsxs(ue.div,{initial:{opacity:0,y:28},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"mb-8 mt-16",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-5",children:[r.jsx("span",{className:"inline-flex items-center justify-center w-11 h-11 bg-gradient-to-br from-[#3B5A96] to-[#2A4170] text-white text-sm font-bold rounded-sm",style:{fontFamily:"'Playfair Display', serif"},children:e}),r.jsx("span",{className:"text-[11px] font-bold tracking-[0.35em] text-[#3B5A96] uppercase",children:"Chapter"}),r.jsx("div",{className:"flex-1 h-px bg-gradient-to-r from-[#3B5A96]/30 via-[#E883A7]/20 to-transparent"})]}),r.jsx("h2",{className:"text-4xl sm:text-5xl lg:text-6xl font-bold text-foreground leading-[1.05] tracking-tight",style:{fontFamily:"'Playfair Display', serif"},children:t})]})}function Wn({text:e}){return r.jsxs(ue.blockquote,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"my-10 relative overflow-hidden",children:[r.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1.5 bg-gradient-to-b from-[#3B5A96] via-[#7B68A6] to-[#E883A7]"}),r.jsx("div",{className:"absolute -right-4 -top-6 w-24 h-24 rounded-full bg-gradient-to-br from-[#E883A7]/8 to-[#3B5A96]/8 blur-2xl"}),r.jsx(ja,{className:"absolute left-4 -top-3 w-12 h-12 text-[#3B5A96]/12",strokeWidth:1}),r.jsx("p",{className:"pl-10 pr-6 py-2 text-2xl sm:text-[2rem] lg:text-[2.25rem] font-medium italic text-foreground leading-[1.35]",style:{fontFamily:"'Playfair Display', serif"},children:e})]})}function px({src:e,alt:t,caption:n,eager:s=!1}){return r.jsxs(ue.figure,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0,margin:"-50px"},transition:{duration:.6},className:"my-10 -mx-6 sm:mx-0",children:[r.jsxs("div",{className:"relative overflow-hidden sm:rou
915nded-sm shadow-lg",children:[r.jsx("img",{src:e,alt:t,width:1200,height:1600,className:"w-full h-auto object-cover",loading:s?"eager":"lazy",decoding:"async",fetchpriority:s?"high":"auto"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black/15 to-transparent pointer-events-none"})]}),n&&r.jsx("figcaption",{className:"mt-3 text-xs text-muted-foreground italic text-center px-6 sm:px-0",style:{fontFamily:"'Playfair Display', serif"},children:n})]})}function er({children:e,dropCap:t=!1}){return r.jsx(ue.p,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.5},className:`text-base sm:text-[1.125rem] leading-[1.9] text-foreground/85 mb-5 ${t?"first-letter:text-7xl first-letter:font-bold first-letter:text-[#3B5A96] first-letter:mr-3 first-letter:float-left first-letter:leading-[0.8] first-letter:mt-1 first-letter:font-serif":""}`,style:{fontFamily:"'Lato', sans-serif"},children:e})}function cPe(){const[e,t]=j.useState(!1);return j.useEffect(()=>{window.scrollTo(0,0)},[]),r.jsxs("article",{className:"bg-background min-h-screen",children:[r.jsxs("section",{className:"relative h-[92vh] min-h-[620px] w-full overflow-hidden",children:[r.jsx("img",{src:jh.hero,alt:"Natasha Hunt, founder of NAKED WITHOUT, beside a vintage black car",className:"absolute inset-0 w-full h-full object-cover"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-black via-black/40 to-black/20"}),r.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-black/50 to-transparent"}),r.jsxs("div",{className:"relative z-10 h-full flex flex-col justify-between max-w-6xl mx-auto px-6 py-10",children:[r.jsx(ue.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.7},children:r.jsxs(se,{to:"/Articles",className:"text-white/60 text-xs font-bold uppercase tracking-[0.25em] hover:text-white transition-colors flex items-center gap-2",children:[r.jsx("span",{className:"w-8 h-px bg-[#E883A7]"})," Chelsea Monthly · Fashion"]})}),r.jsxs(ue.div,{initial:{opacity:0,y:40},animate:{opacity:1,y:0},transition:{duration:.9,delay:.2},className:"max-w-3xl",children:[r.jsxs("span",{className:"inline-flex items-center gap-2 bg-white/10 backdrop-blur-md border border-white/20 text-white text-[10px] font-bold px-4 py-2 uppercase tracking-[0.25em] mb-6",children:[r.jsx(ir,{className:"w-3 h-3 text-[#E883A7]"})," Exclusive Interview"]}),r.jsx("h1",{className:"text-5xl sm:text-7xl lg:text-8xl font-bold text-white leading-[1.02] mb-6 drop-shadow-2xl tracking-tight",style:{fontFamily:"'Playfair Display', serif"},children:"Naked Ambition"}),r.jsx("p",{className:"text-xl sm:text-2xl text-white/80 font-light max-w-2xl leading-relaxed mb-8 border-l-2 border-[#E883A7] pl-5",children:"Meet Natasha Hunt, the founder bringing a new vision of luxury sleepwear to London."}),r.jsxs("div",{className:"flex flex-wrap items-center gap-6",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"w-12 h-12 rounded-full bg-gradient-to-br from-[#3B5A96] to-[#E883A7] flex items-center justify-center text-white font-bold text-sm",children:"CM"}),r.jsxs("div",{className:"flex flex-col",children:[r.jsx("span",{className:"text-white text-sm font-semibold tracking-wide",children:"Chelsea Monthly"}),r.jsx("span",{className:"text-white/50 text-[10px] uppercase tracking-widest",children:"Fashion · October 2026"})]})]}),r.jsx("div",{className:"h-8 w-px bg-white/20 hidden sm:block"}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-white/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Vt,{className:"w-4 h-4 text-[#E883A7]"})," 9 min read"]}),r.jsxs("span",{className:"hidden sm:flex items-center gap-2 text-white/70 text-xs font-medium uppercase tracking-widest",children:[r.jsx(Nr,{className:"w-4 h-4 text-[#E883A7]"})," 18.4K views"]})]})]})]}),r.jsx(ue.div,{initial:{opacity:0}
915,animate:{opacity:1},transition:{delay:1.2},className:"absolute bottom-6 left-1/2 -translate-x-1/2 z-10",children:r.jsx("div",{className:"w-px h-12 bg-gradient-to-b from-white/50 to-transparent"})})]}),r.jsx("div",{className:"sticky top-0 z-40 bg-background/95 backdrop-blur-md border-b border-border",children:r.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-3 flex items-center justify-between",children:[r.jsx("span",{className:"font-bold text-foreground uppercase tracking-widest text-[10px]",children:"Naked Ambition · Natasha Hunt"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>t(!e),className:`flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide transition-all rounded-sm ${e?"bg-[#3B5A96] text-white":"bg-muted text-muted-foreground hover:bg-[#3B5A96]/10"}`,children:[r.jsx(ga,{className:`w-3.5 h-3.5 ${e?"fill-current":""}`})," Save"]}),r.jsxs("button",{className:"flex items-center gap-2 px-3 py-1.5 text-xs font-bold uppercase tracking-wide bg-muted text-muted-foreground hover:bg-[#3B5A96]/10 transition-all rounded-sm",children:[r.jsx(ws,{className:"w-3.5 h-3.5"})," Share"]})]})]})}),r.jsx("div",{className:"max-w-3xl mx-auto px-6 pt-16 pb-4",children:r.jsxs(ue.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"bg-gradient-to-br from-[#3B5A96]/5 to-[#E883A7]/5 border border-[#3B5A96]/15 rounded-sm p-8",children:[r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.3em] text-[#3B5A96] block mb-4",children:"In This Feature"}),r.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-8 gap-y-2",children:lPe.map(n=>r.jsxs("div",{className:"flex items-baseline gap-3 py-1.5 border-b border-[#3B5A96]/10 last:border-0",children:[r.jsx("span",{className:"text-[#3B5A96] font-bold text-xs",children:n.num}),r.jsx("span",{className:"text-sm text-foreground/70",style:{fontFamily:"'Montserrat', sans-serif"},children:n.title})]},n.num))})]})}),r.jsxs("div",{className:"max-w-3xl mx-auto px-6 pb-20",children:[r.jsxs("div",{className:"pt-10",children:[r.jsx(er,{dropCap:!0,children:"There is something wonderfully simple about the idea behind NAKED WITHOUT. Founder Natasha Hunt wanted to create pyjamas that people would not just wear to bed, but genuinely live in."}),r.jsx(er,{children:"The newly launched London sleepwear brand was born from a frustration many shoppers will recognise: beautifully made natural-fabric sleepwear often comes with a luxury price tag, while more affordable alternatives can compromise on quality, individuality or fit. Natasha wanted another option."})]}),r.jsx(Wn,{text:"I've always loved pyjamas, but whenever I went looking for a new pair, I hit the same frustration. Beautifully made sleepwear in natural fabrics tends to cost a fortune."}),r.jsx(er,{children:'Her answer was NAKED WITHOUT, a brand built around natural fabrics, distinctive prints, personalised fit and what Natasha describes as "affordable luxury". The name perhaps explains the philosophy best â the pair people instinctively reach for when they get home, pack whenever they travel and genuinely miss when they are in the wash.'}),r.jsx(Wn,{text:"Sleeves swallow my hands and trousers pool around my ankles. When something is supposed to be the cosiest piece you own, the fit really matters."}),r.jsx(er,{children:"That frustration became one of the defining elements of NAKED WITHOUT. Customers can provide measurements and have their pyjamas tailored accordingly, with the service offered free for the brand's first drop. Natasha describes it simply as making the product fit the customer rather than expecting the customer to fit the product."}),r.jsx(Fi,{num:"02",title:"Beyond the Bedroom"}),r.jsx(er,{children:"There is another important idea running through NAKED WITHOUT: pyjamas should not necessarily stay at home. Natasha sees modern life as increasingly fluid â people work from kitchen tables, host friends at home, head out for coffee, run errands and move constantly between private and public spaces. Yet clothing has not always evolved at the same pace."}),r.jsx(Wn,{text:"I've never understood why pyjamas should stay in the bedroom."}),r.jsx(er,{children:"Her solution is sleepwear designed with enough personality and polish to move beyond it. Add sunglasses, a handbag or even heels, Natasha argues, and suddenly the pyjamas become an outfit."}),r.jsx(px,{src:jh.kitchenToast,alt:"Two women in NAKED WITHOUT pyjamas toasting cocktail glasses in a bright kitchen",caption:"The Noah's Ark collection moves effortlessly from bedroom to kitchen â styled here for an evening toast.",eager:!0}),r.jsx(er,{children:"The philosophy is not about abandoning dressing up â quite the opposite. It is this balance between comfort and presentation that sits at the heart of the brand."}),r.jsx(Wn,{text:"Comfort changes how you carry yourself. When you feel good in what you're wearing, you're more relaxed and more yourself."}
915),r.jsx(Fi,{num:"03",title:"Noah's Ark & Gift of God"}),r.jsxs(er,{children:["The first two NAKED WITHOUT collections are called ",r.jsx("strong",{children:"Noah's Ark"})," and ",r.jsx("strong",{children:"Gift of God"}),", names inspired by biblical stories Natasha says carry warmth, familiarity and heritage. Noah's Ark reimagines the story through a blue toile print, referencing antique porcelain and traditional French wallpaper while introducing a more playful world of animals."]}),r.jsx(Wn,{text:"Elegant from a distance, playful up close."}),r.jsx(er,{children:'And with a smile, Natasha adds that the collection is "designed to last more than forty days and forty nights".'}),r.jsx(px,{src:jh.bedLaugh,alt:"Two women laughing on a bed wearing NAKED WITHOUT Noah's Ark pyjamas",caption:"Noah's Ark â the blue toile print inspired by antique porcelain and traditional French wallpaper."}),r.jsx(er,{children:"Gift of God takes a softer direction. Built around pink bows and angel imagery, the collection uses brushed cotton and a delicate gradient of tones. Natasha describes it as the more romantic side of the brand and says its velvety feel is intended to make the set feel like a gift at the end of the day. Together, the two collections establish the NAKED WITHOUT aesthetic: storytelling, colour, humour and comfort."}),r.jsx(Fi,{num:"04",title:"Affordable Luxury"}),r.jsx(er,{children:'Natasha is very deliberate about the phrase "affordable luxury". She does not want NAKED WITHOUT to become a brand whose identity depends on exclusivity.'}),r.jsx(Wn,{text:"So much of the luxury world can feel exclusive, and I wanted the opposite. Luxury that doesn't leave anyone out, but invites everyone in."}),r.jsx(er,{children:"The technical side of the product has been equally important. The brand uses digital reactive printing on natural fabrics, with the aim of maintaining softness while achieving strong colour and print definition. Natasha says longevity is central to her idea of quality â it is not enough for a product to look good when it first arrives."}),r.jsx(Wn,{text:"Quality isn't just about how something feels on the day you buy it. It's about how it feels after a hundred washes."}),r.jsx(er,{children:"The brand is also producing in small runs. Natasha says she would rather make things carefully than make them quickly."}),r.jsx(Fi,{num:"05",title:"Building the Brand Herself"}),r.jsx(er,{children:"NAKED WITHOUT is self-funded, and Natasha has built the business from the ground up. That has forced her to make very deliberate choices, with her priorities remaining focused on fabric, fit, print quality and the customer experience. But one of the hardest parts was finding the right partners."}),r.jsx(Wn,{text:"When you're self-funded, you can't do everything at once. You learn to prioritise very quickly."}),r.jsx(px,{src:jh.carPortrait,alt:"Natasha Hunt standing beside a vintage black car wearing NAKED WITHOUT pyjamas",caption:"Natasha Hunt, founder of NAKED WITHOUT â self-funded and built from the ground up."}),r.jsx(er,{children:'There were samples, adjustments and plenty of patience before Natasha felt the finished product was ready. She admits there were moments when accepting "nearly there" would have been easier, but because these are products she wears herself, she did not want to compromise. The moment when the business finally felt real came when the website was finished â stepping back to look at it as a whole, she knew the vision had become something tangible.'}),r.jsx(Fi,{num:"06",title:"A Family Affair"}),r.jsx(er,{children:"NAKED WITHOUT is also, in part, a family story. Natasha's father owns a factory where the pyjamas are produced, giving her access to manufacturing expertise and allowing her to remain closely involved throughout the process. For the first collections, she worked with designs from his studio, selecting and refining prints before bringing them into the NAKED WITHOUT world. She is now developing original designs for future collections â everything from the stories behind each set to the campaigns, packaging and language used across the brand."}),r.jsx(Fi,{num:"07",title:"Who Is the NAKED WITHOUT Woman?"}),r.jsx(er,{children:"Natasha does not define her customer by age or size. She could be a student, mother, grandmother or simply someone who enjoys looking put together without sacrificing comfort."}),r.jsx(Wn,{text:"What connects her is an attitude."}),r.jsx(er,{children:"She likes beautiful things but does not believe luxury should be inaccessible. She may spend a slow Sunday morning at home and then head out for coffee without feeling the need to change. She has a sense of humour, a sense of self and an appreciation for the ordinary moments in between. And because the pyjamas can be tailored, Natasha wants the clothing to adapt to the wearer rather than the other way around."}),r.jsx(er,{children:"The ambition is already expanding beyond womenswear. Natasha plans eventually to introduce options for men and children, creating what she hopes could become a sleepwear brand for the entire household."}),r.jsx(Fi,{num:"08",title:"Made in London Spirit"}),r.jsx(er,{children:"London is central to the story. Natasha lives in Chelsea, studied in the city and describes it as fundamental to both her own identity and the personality of NAKED WITHOUT. She also sees the city's mix of heritage, humour, international influences and neighbourhood culture as naturally aligned with the brand."}),r.jsx(Wn,{text:"It respects tradition, but it's never afraid to have a little fun with it."}),r.jsx(px,{src:jh.founder,alt:"Natasha Hunt enjoying a Sunday roast wearing NAKED WITHOUT pyjamas",caption:"Characters like Delilah and Naomi take their pyjamas for a Sunday roast â the brand's recurring social media narratives."}),r.jsx(er,{children:"That same spirit has shaped the brand's social media strategy. Instead of simply posting products, Natasha has created recurring characters and small narratives around everyday life. Characters such as Delilah and Naomi take their pyjamas for cake, coffee, a Sunday roast or even the weekly vegetable shop. The aim is to create a world people want to follow rather than simply another sales feed."}),r.jsx(Wn,{text:"I'd love NAKED WITHOUT to feel less like a brand and more like a club."}),r.jsx(Fi,{num:"09",title:"What Comes Next"}),r.jsx(er,{children:"For now, Natasha remains focused firmly on sleepwear. She wants to perfect the fabrics, fit and service before expanding into anything else."}),r.jsx(Wn,{text:"I'd much rather do one thing beautifully than lots of things half as well."}),r.jsx(er,{children:"Over the next twelve months, she hopes to grow the brand's community, develop more partnerships and begin moving towards collections for men and children. Five years from now, her ambition is bigger: she wants NAKED WITHOUT to become the name people associate with beautiful, comfortable pyjamas for the whole family. One day, she would also like the brand to have a physical home of its own in London where customers can feel fabrics, be measured and experience NAKED WITHOUT in person. Yet even with those ambitions, Natasha is clear that the foundations should not change."}),r.jsx(Wn,{text:"Quality you can feel, a fit made for you, a little bit of cheek, and luxury that welcomes everyone."}),r.jsx(er,{children:"And perhaps that is the clearest definition of NAKED WITHOUT. Colourful. Natural. Comfortable."}),r.jsxs(ue.div,{initial:{opacity:0,y:30},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.8},className:"mt-20 mb-12 text-center",children:[r.jsx("p",{className:"text-3xl sm:text-5xl font-medium italic text-foreground leading-tight mb-3",style:{fontFamily:"'Playfair Display', serif"},children:'"The pyjamas you feel naked without."'}),r.jsx("span",{className:"text-[10px] font-bold uppercase tracking-[0.3em] text-[#3B5A96]",children:"â Natasha Hunt"})]}),r.jsxs(ue.div,{initial:{opacity:0,y:24},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.7},className:"bg-gradient-to-br from-[#3B5A96] to-[#2a4170] text-white rounded-sm p-10 text-center",children:[r.jsx(ir,{className:"w-8 h-8 text-[#E883A7] mx-auto mb-4"}),r.jsx("h3",{className:"text-2xl font-bold mb-4 tracking-wide",style:{fontFamily:"'Montserrat', sans-serif"},children:"NAKED WITHOUT"}),r.jsxs("div",{className:"space-y-2 text-sm text-white/80",children:[r.jsx("p",{children:r.jsx("a",{href:"https://www.nakedwithoutwear.com",target:"_blank",rel:"noopener noreferrer",className:"hover:text-[#E883A7] transition-colors underline decoration-[#E883A7]/40 underline-offset-4",children:"www.nakedwithoutwear.com"})}),r.jsx("p",{children:r.jsx("a",{href:"https://instagram.com/nakedwithoutwear",target:"_blank",rel:"noopener noreferrer",className:"hover:text-[#E883A7] transition-colors underline decoration-[#E883A7]/40 underline-offset-4",children:"Instagram: @nakedwithoutwear"})})]})]}),r.jsx("div",{className:"text-center mt-16",children:r.jsxs(se,{to:"/Articles",className:"inline-flex items-center gap-2 text-[#3B5A96] font-bold text-xs uppercase tracking-[0.25em] hover:gap-3 transition-all",children:[r.jsx("span",{className:"w-8 h-px bg-[#3B5A96]"})," More Chelsea Monthly Stories ",r.jsx(_t,{className:"w-4 h-4"})]})})]})]})}const dPe=()=>{const{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:s}=vo();if(t||e)return r.jsx("div",{className:"fixed inset-0 flex items-center justify-center",children:r.jsx("div",{className:"w-8 h-8 border-4 border-muted border-t-foreground rounded-full animate-spin"})});if(n){if(n.type==="user_not_registered")return r.jsx(vre,{});if(n.type==="auth_required")return s(),null}return r.jsxs(HJ,{children:[r.jsxs(Re,{element:r.jsx(Ece,{}),children:[r.jsx(Re,{path:"/",element:r.jsx(qoe,{})}),r.jsx(Re,{path:"/Login",element:r.jsx(Mre,{})}),r.jsx(Re,{path:"/Register",element:r.jsx(Kre,{})}),r.jsx(Re,{path:"/Articles",element:r.jsx(ude,{})}),r.jsx(Re,{path:"/Articles/:id",element:r.jsx(T3,{})}),r.jsx(Re,{path:"/:category/:slug",element:r.jsx(T3,{})}),r.jsx(Re,{path:"/Authors",element:r.jsx(lde,{})}),r.jsx(Re,{path:"/magazine",element:r.jsx(dhe,{})}),r.jsx(Re,{path:"/magazine/:id",element:r.jsx(uhe,{})}),r.jsx(Re,{path:"/journalist/dashboard",element:r.jsx(fhe,{})}),r.jsx(Re,{path:"/journalist/new-article",element:r.jsx(phe,{})}),r.jsx(Re,{path:"/journalist/article/:id",element:r.jsx(Fhe,{})}),r.jsx(Re,{path:"/editor/review",element:r.jsx(qhe,{})}),r.jsx(Re,{path:"/membership",element:r.jsx(Whe,{})}),r.jsx(Re,{path:"/membership-club",element:r.jsx(Xhe,{})}),r.jsx(Re,{path:"/contact",element:r.jsx(nEe,{})}),r.jsx(Re,{path:"/about",element:r.jsx(sEe,{})}),r.jsx(Re,{path:"/advertise",element:r.jsx(iEe,{})}),r.jsx(Re,{path:"/media-room",element:r.jsx(cEe,{})}),r.jsx(Re,{path:"/terms",element:r.jsx(dEe,{})}),r.jsx(Re,{path:"/faq",element:r.jsx(mEe,{})}),r.jsx(Re,{path:"/fashion/darian-didier",element:r.jsx(gEe,{})}),r.jsx(Re,{path:"/reviews/ivy-soho-brasserie",element:r.jsx(jEe,{})}),r.jsx(Re,{path:"/lifestyle/island-falls-zen-garden",element:r.jsx(SEe,{})}),r.jsx(Re,{path:"/travel/miami-uncovered",element:r.jsx(MEe,{})}),r.jsx(Re,{path:"/business/made-possible-ai",element:r.jsx($Ee,{})}),r.jsx(Re,{path:"/reviews/colonel-saab-trafalgar-square",element:r.jsx(KEe,{})}),r.jsx(Re,{path:"/local/sian-crowned-best-chelsea-bun-maker-2026",element:r.jsx(ePe,{})}),r.jsx(Re,{path:"/fashion/naked-ambition",element:r.jsx(cPe,{})})]}),r.jsx(Re,{path:"/admin/import",element:r.jsx(tde,{})}),r.jsx(Re,{path:"/admin/dashboard",element:r.jsx(nde,{})}),r.jsx(Re,{path:"/admin/newsroom",element:r.jsx(Wme,{})}),r.jsx(Re,{path:"/admin/generation",element:r.jsx(ife,{})}),r.jsx(Re,{path:"/admin/instagram",element:r.jsx(oPe,{})}),r.jsx(Re,{path:"/revenue",element:r.jsx(lfe,{})}),r.jsx(Re,{path:"/revenue/dashboard",element:r.jsx(EAe,{})}),r.jsx(Re,{path:"/revenue/advertisers",element:r.jsx(IAe,{})}),r.jsx(Re,{path:"/revenue/campaigns",element:r.jsx($Ae,{})}),r.jsx(Re,{path:"/revenue/inventory",element:r.jsx(VAe,{})}),r.jsx(Re,{path:"/revenue/invoicing",element:r.jsx(WAe,{})}),r.jsx(Re,{path:"/revenue/proposals",element:r.jsx(YAe,{})}),r.jsx(Re,{path:"/revenue/rate-card",element:r.jsx(eTe,{})}),r.jsx(Re,{path:"/revenue/media-kit",element:r.jsx(rTe,{})}),r.jsx(Re,{path:"/revenue/sponsored",element:r.jsx(aTe,{})}),r.jsx(Re,{path:"/club",element:r.jsx(oTe,{})}),r.jsx(Re,{path:"/club/events",element:r.jsx(cTe,{})}),r.jsx(Re,{path:"/club/events/:id",element:r.jsx(uTe,{})}),r.jsx(Re,{path:"/club/calendar",element:r.jsx(mTe,{})}),r.jsx(Re,{path:"/club/experiences",element:r.jsx(xTe,{})}),r.jsx(Re,{path:"/club/benefits",element:r.jsx(yTe,{})}),r.jsx(Re,{path:"/club/admin",element:r.jsx(vTe,{})}),r.jsx(Re,{path:"/club/admin/events",element:r.jsx(NTe,{})}),r.jsx(Re,{path:"/club/admin/guests",element:r.jsx(_Te,{})}),r.jsx(Re,{path:"/club/admin/revenue",element:r.jsx(STe,{})}),r.jsx(Re,{path:"/concierge",element:r.jsx(TTe,{})}),r.jsx(Re,{path:"/concierge/partners",element:r.jsx(OTe,{})}),r.jsx(Re,{path:"/concierge/partners/:id",element:r.jsx(MTe,{})}),r.jsx(Re,{path:"/concierge/experiences",element:r.jsx(ITe,{})}),r.jsx(Re,{path:"/concierge/experiences/:id",element:r.jsx(LTe,{})}),r.jsx(Re,{path:"/concierge/admin",element:r.jsx(FTe,{})}),r.jsx(Re,{path:"/concierge/admin/requests",element:r.jsx(VTe,{})}),r.jsx(Re,{path:"/concierge/admin/partners",element:r.jsx(WTe,{})}),r.jsx(Re,{path:"/concierge/admin/revenue",element:r.jsx(HTe,{})}),r.jsx(Re,{path:"/community",element:r.jsx(GTe,{})}),r.jsx(Re,{path:"/community/discussions/:id",element:r.jsx(YTe,{})}),r.jsx(Re,{path:"/community/new-discussion",element:r.jsx(JTe,{})}),r.jsx(Re,{path:"/community/members",element:r.jsx(ZTe,{})}),r.jsx(Re,{path:"/community/members/:id",element:r.jsx(QTe,{})}),r.jsx(Re,{path:"/community/admin",element:r.jsx(rEe,{})}),r.jsx(Re,{path:"*",element:r.jsx(gre,{})})]})};function uPe(){return r.jsx(yre,{children:r.jsxs(LX,{client:XX,children:[r.jsx(eQ,{children:r.jsx(dPe,{})}),r.jsx(uX,{})]})})}OH.createRoot(document.getElementById("root")).render(r.jsx(uPe,{}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.